/* ============================================
   PROGRAMME POITIERS COLLECTIF 2026
   Style intégré à la charte graphique existante
   ============================================ */

/* ===== Variables héritées du thème ===== */
/* Utilise les couleurs déjà définies dans le thème :
   --pc-c1: #2c7071  (vert canard)
   --pc-c2: #00a19a  (vert d'eau)
   --pc-c3: #ead53e  (jaune)
   --pc-c4: #e9427f  (rose/rouge)
*/

/* ===== Hero du programme (bandeau d'introduction) ===== */
.pc-programme-hero {
  background: linear-gradient(135deg, var(--pc-c3) 0%, #f5e070 100%);
  padding: 48px 0;
  margin: 0 0 40px 0;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
  position: relative;
  overflow: hidden;
}

/* Effet de texture subtile */
.pc-programme-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.03) 35px, rgba(255,255,255,.03) 70px);
  pointer-events: none;
}

.pc-programme-hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.pc-programme-hero h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--pc-c1);
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}

.pc-programme-hero__lead {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5;
  color: #2a4d4d;
  margin: 0 0 24px 0;
  font-weight: 500;
}

/* Bouton téléchargement PDF */
.pc-programme-hero__download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--pc-c4);
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 6px 20px rgba(233, 66, 127, 0.3);
  transition: all 0.25s ease;
  border: none;
}

.pc-programme-hero__download:hover {
  background: #c92e65;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(233, 66, 127, 0.4);
  color: #fff;
}

.pc-programme-hero__download svg {
  width: 20px;
  height: 20px;
}

/* ===== Navigation des 10 axes (page parente) ===== */
.pc-programme-nav {
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 16px;
  padding: 32px;
  margin: 0 0 48px 0;
  box-shadow: 0 6px 24px rgba(0,0,0,.04);
}

.pc-programme-nav h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--pc-c1);
  margin: 0 0 24px 0;
  text-align: center;
  position: relative;
  display: inline-block;
  width: 100%;
}

.pc-programme-nav h2::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  width: 80px;
  height: 4px;
  background: var(--pc-c3);
  border-radius: 2px;
}

.pc-programme-axes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}

@media (min-width: 640px) {
  .pc-programme-axes {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pc-programme-axes {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

.pc-axe-card {
  background: linear-gradient(135deg, var(--pc-c1) 0%, var(--pc-c2) 100%);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: #fff;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(44, 112, 113, 0.15);
  position: relative;
  overflow: hidden;
}

/* Effet de shine au hover */
.pc-axe-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.pc-axe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(44, 112, 113, 0.25);
}

.pc-axe-card:hover::before {
  opacity: 1;
}

.pc-axe-number {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 24px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.pc-axe-title {
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  margin: 0;
}

/* ===== Fil d'Ariane (breadcrumb) ===== */
.pc-programme-breadcrumb {
  margin: 0 0 24px 0;
  font-size: 15px;
  color: var(--pc-muted);
}

.pc-programme-breadcrumb a {
  color: var(--pc-c1);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px dotted var(--pc-c1);
  transition: all 0.2s ease;
}

.pc-programme-breadcrumb a:hover {
  border-bottom-style: solid;
  color: var(--pc-c2);
}

/* ===== Layout grille (sommaire + contenu) ===== */
.pc-programme {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .pc-programme {
    grid-template-columns: 320px 1fr !important;
    align-items: start !important;
  }
}

/* ===== Contenu des pages d'axes ===== */
.pc-programme-content {
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 16px rgba(0,0,0,.03);
}

@media (max-width: 768px) {
  .pc-programme-content {
    padding: 24px;
  }
}

/* Titre principal de l'axe */
.pc-programme-content h1 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--pc-c1);
  margin: 0 0 24px 0;
  padding-bottom: 20px;
  border-bottom: 4px solid var(--pc-c3);
  letter-spacing: -0.01em;
}

/* Chapeau introductif */
.pc-programme-content > p:first-of-type {
  font-size: 19px;
  line-height: 1.65;
  color: #374151;
  margin-bottom: 32px;
  font-weight: 500;
}

/* H2 : Sections principales */
.pc-programme-content h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  color: var(--pc-c2);
  margin: 48px 0 20px 0;
  padding-left: 20px;
  border-left: 6px solid var(--pc-c2);
  line-height: 1.3;
}

/* H3 : Sous-sections */
.pc-programme-content h3 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  color: var(--pc-c4);
  margin: 32px 0 16px 0;
  text-transform: none;
  position: relative;
  padding-left: 16px;
}

.pc-programme-content h3::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--pc-c3);
  font-weight: 800;
}

/* H4 : Sous-sous-sections */
.pc-programme-content h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--pc-text);
  margin: 24px 0 12px 0;
  text-transform: none;
}

/* Paragraphes */
.pc-programme-content p {
  font-size: 17px;
  line-height: 1.75;
  margin: 0 0 18px 0;
  color: var(--pc-text);
}

/* Emphase forte (gras) */
.pc-programme-content strong {
  font-weight: 700;
  color: var(--pc-c1);
}

/* Listes */
.pc-programme-content ul,
.pc-programme-content ol {
  margin: 20px 0;
  padding-left: 32px;
}

.pc-programme-content li {
  margin-bottom: 12px;
  line-height: 1.7;
  font-size: 17px;
}

.pc-programme-content ul li::marker {
  color: var(--pc-c4);
  font-weight: 800;
}

.pc-programme-content ol li::marker {
  color: var(--pc-c1);
  font-weight: 800;
}

/* Citations / Encadrés */
.pc-programme-content blockquote {
  background: linear-gradient(135deg, #fff8e1 0%, #fff9c4 100%);
  border-left: 6px solid var(--pc-c3);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  font-style: normal;
}

.pc-programme-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Encadré "À retenir" */
.pc-highlight {
  background: #f0fffd;
  border: 2px solid var(--pc-c2);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  position: relative;
}

.pc-highlight::before {
  content: "💡";
  position: absolute;
  top: -14px;
  left: 20px;
  background: #fff;
  padding: 0 8px;
  font-size: 20px;
}

.pc-highlight h4 {
  color: var(--pc-c2);
  margin-top: 0;
  font-size: 18px;
  font-weight: 800;
}

/* Liens dans le contenu */
.pc-programme-content a {
  color: white;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

.pc-programme-content a:hover {
  color: white;
  text-decoration-thickness: 2px;
}

/* ===== Navigation entre pages (précédent/suivant) ===== */
.pc-programme-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin: 48px 0 0 0;
  padding-top: 32px;
  border-top: 2px solid var(--pc-border);
}

@media (max-width: 768px) {
  .pc-programme-pagination {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.pc-programme-pagination a {
  background: #fff;
  border: 2px solid var(--pc-border);
  border-radius: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--pc-text);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  min-height: 60px;
  text-align: center;
}

.pc-programme-pagination a:hover {
  background: var(--pc-c1);
  color: #fff;
  border-color: var(--pc-c1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 112, 113, 0.2);
}

.pc-programme-pagination a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.pc-programme-pagination .pc-btn-prev svg {
  order: -1;
}

.pc-programme-pagination .pc-btn-next svg {
  order: 1;
}

.pc-programme-pagination .pc-btn-sommaire {
  background: var(--pc-c3);
  color: var(--pc-c1);
  border-color: var(--pc-c3);
  font-weight: 800;
}

.pc-programme-pagination .pc-btn-sommaire:hover {
  background: var(--pc-c1);
  color: #fff;
  border-color: var(--pc-c1);
}

/* ===== Sommaire latéral (TOC) ===== */
.pc-programme-toc {
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 16px;
  padding: 24px;
}

/* Mobile : accordéon collapsible */
@media (max-width: 1023px) {
  .pc-programme-toc {
    position: static;
    max-height: none;
    margin-bottom: 24px;
    padding: 0;
    border: 2px solid var(--pc-c2);
  }
  
  .pc-programme-toc h3 {
    margin: 0;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    position: relative;
    background: #f0fffd;
    border-radius: 14px 14px 0 0;
  }
  
  .pc-programme-toc h3::after {
    content: "▼";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: transform 0.3s ease;
  }
  
  .pc-programme-toc.toc-collapsed h3::after {
    transform: translateY(-50%) rotate(-90deg);
  }
  
  .pc-programme-toc nav {
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
    transition: all 0.3s ease;
  }
  
  .pc-programme-toc.toc-collapsed nav {
    max-height: 0;
    padding: 0;
    overflow: hidden;
  }
}

/* Desktop : sticky */
@media (min-width: 1024px) {
  .pc-programme-toc {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 20px !important;
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
    align-self: start !important;
    z-index: 10;
  }
}

.pc-programme-toc h3 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pc-c1);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--pc-border);
}

.pc-programme-toc nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pc-programme-toc a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--pc-text);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 600;
  line-height: 1.4;
}

.pc-programme-toc a:hover {
  background: #f0fffd;
  color: var(--pc-c1);
  padding-left: 16px;
}

.pc-programme-toc .toc-h2 {
  font-weight: 700;
}

.pc-programme-toc .toc-h3 {
  padding-left: 20px;
  font-weight: 500;
  font-size: 13px;
  opacity: 0.9;
}

/* Scrollbar personnalisée pour le sommaire */
.pc-programme-toc::-webkit-scrollbar {
  width: 6px;
}

.pc-programme-toc::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.pc-programme-toc::-webkit-scrollbar-thumb {
  background: var(--pc-c2);
  border-radius: 3px;
}

.pc-programme-toc::-webkit-scrollbar-thumb:hover {
  background: var(--pc-c1);
}

.pc-programme-toc h3 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pc-c1);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--pc-border);
}

.pc-programme-toc nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pc-programme-toc a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--pc-text);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 600;
  line-height: 1.4;
}

.pc-programme-toc a:hover {
  background: #f0fffd;
  color: var(--pc-c1);
  padding-left: 16px;
}

.pc-programme-toc .toc-h2 {
  font-weight: 700;
}

.pc-programme-toc .toc-h3 {
  padding-left: 20px;
  font-weight: 500;
  font-size: 13px;
  opacity: 0.9;
}

/* Scrollbar personnalisée pour le sommaire */
.pc-programme-toc::-webkit-scrollbar {
  width: 6px;
}

.pc-programme-toc::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.pc-programme-toc::-webkit-scrollbar-thumb {
  background: var(--pc-c2);
  border-radius: 3px;
}

.pc-programme-toc::-webkit-scrollbar-thumb:hover {
  background: var(--pc-c1);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .pc-programme-toc {
    position: static;
    max-height: none;
    margin-bottom: 32px;
  }
}

/* ===== Navigation des axes (dans la page parente) ===== */
.pc-axes-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 32px 0 40px 0;
  padding: 24px;
  background: #f8fafb;
  border-radius: 12px;
  border: 1px solid var(--pc-border);
}

@media (min-width: 640px) {
  .pc-axes-nav {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pc-axe-nav-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--pc-text);
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 15px;
}

.pc-axe-nav-item:hover {
  background: var(--pc-c1);
  color: #fff;
  border-color: var(--pc-c1);
  transform: translateX(4px);
}

.pc-axe-nav-number {
  background: var(--pc-c1);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

/* .pc-axe-nav-item:hover .pc-axe-nav-number {
  background: #fff;
  color: var(--pc-c1);
} */

.pc-axe-nav-title {
  line-height: 1.3;
}

/* Bouton PDF dans la navigation */
.pc-axe-nav-pdf {
  grid-column: 1 / -1;
  background: var(--pc-c4);
  color: #fff;
  border-color: var(--pc-c4);
  justify-content: center;
  font-weight: 700;
}

.pc-axe-nav-pdf:hover {
  background: #c92e65;
  border-color: #c92e65;
  color: #fff;
  transform: translateY(-2px);
}

.pc-axe-nav-pdf svg {
  flex-shrink: 0;
}

/* ===== Navigation des axes (dans la page parente, entre titre et contenu) ===== */
.pc-axes-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 32px 0 40px 0;
}

@media (min-width: 640px) {
  .pc-axes-nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.pc-axe-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid var(--pc-border);
  border-radius: 10px;
  text-decoration: none !important; /* Forcer : pas de soulignement */
  color: var(--pc-text);
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 15px;
}

.pc-axe-nav-item:hover {
  border-color: var(--pc-c1);
  background: #f0fffd;
  transform: translateX(2px);
  text-decoration: none !important; /* Forcer au hover aussi */
}

.pc-axe-nav-number {
  background: var(--pc-c1);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.pc-axe-nav-title {
  line-height: 1.3;
  color: var(--pc-c1);
  text-decoration: none !important; /* Forcer sur le titre aussi */
}

/* Bouton PDF dans la navigation */
.pc-axe-nav-pdf {
  grid-column: 1 / -1;
  background: var(--pc-c4);
  color: #fff;
  border-color: var(--pc-c4);
  justify-content: center;
  font-weight: 700;
  margin-top: 12px;
  padding: 16px;
}

.pc-axe-nav-pdf .pc-axe-nav-title {
  color: #fff;
}

.pc-axe-nav-pdf:hover {
  background: #c92e65;
  border-color: #c92e65;
  transform: translateY(-2px);
}

.pc-axe-nav-pdf svg {
  flex-shrink: 0;
}

/* ===== Bouton "retour en haut" flottant ===== */
.pc-back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--pc-c1);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(44, 112, 113, 0.3);
  transition: all 0.3s ease;
  z-index: 999;
  border: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.pc-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pc-back-to-top:hover {
  background: var(--pc-c2);
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(44, 112, 113, 0.4);
}

.pc-back-to-top:active {
  transform: translateY(-2px);
}

.pc-back-to-top svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .pc-back-to-top {
    width: 48px;
    height: 48px;
    bottom: 20px;
    right: 20px;
  }
  
  .pc-back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* ===== Utilitaires ===== */
.pc-text-center {
  text-align: center;
}

.pc-text-muted {
  color: var(--pc-muted);
}

.pc-mb-small {
  margin-bottom: 16px;
}

.pc-mb-medium {
  margin-bottom: 32px;
}

.pc-mb-large {
  margin-bottom: 48px;
}