:root {
  --primary: #0284c7;
  --primary-light: #e0f2fe;
  --accent: #16a34a;
  --accent-light: #dcfce7;
  --text-main: #334155;
  --text-dark: #0f172a;
  --border-color: #e2e8f0;
  --accent-teal: #0d9488;
  --accent-coral: #ea580c;
  --accent-emerald: #10b981;
  --accent-indigo: #4f46e5;
  --bg-gradient: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
}

/* body et .wrap : repris de style.css (police, fond et largeur du site) */

/* --- EN-TÊTE --- */
.entete-page {
  padding: 30px 0 20px;
}

.fil-ariane {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 8px;
}

.fil-ariane a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.fil-ariane span { margin: 0 6px; color: #94a3b8; }

#contenu .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 6px;
}

.entete-page h1 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin: 0 0 10px 0;
  font-weight: 800;
  line-height: 1.2;
}

.entete-page p {
  font-size: 0.95rem;
  color: #475569;
  margin: 0;
}

/* --- IMAGE HÉRO --- */
.actu-widget-entete {
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.img-actu-principale {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

/* --- STRUCTURE 2 COLONNES (FIGÉE CÔTE À CÔTE COMME SUR LA PHOTO) --- */
.layout-avec-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 30px;
  align-items: start;
  width: 100%;
}

.contenu-principal {
  min-width: 0;
  width: 100%;
  display: block; /* Annule l'ancienne grid 1fr 300px interne */
}

.sidebar {
  min-width: 0;
  width: 100%;
}

.sidebar-bloc h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 1px;
  margin: 0 0 15px 0;
}

/* --- TITRES DE SECTION --- */
.section-title {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin: 25px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

/* --- GRILLE CHIFFRES CLÉS (2 PAR LIGNE COMME SUR L'EXEMPLE) --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 18px 0 30px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.stat-card .stat-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 1.1rem;
  opacity: 0.5;
}

.stat-card.c-blue { border-top: 3px solid #0284c7; }
.stat-card.c-teal { border-top: 3px solid #0d9488; }
.stat-card.c-orange { border-top: 3px solid #ea580c; }
.stat-card.c-indigo { border-top: 3px solid #4f46e5; }
.stat-card.c-emerald { border-top: 3px solid #10b981; }
.stat-card.c-rose { border-top: 3px solid #f43f5e; }

.stat-number {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.stat-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.3;
}

.stat-tag {
  display: inline-block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 8px;
}

/* --- TIMELINE / RÉTROPLANNING --- */
.timeline-container {
  margin: 20px 0;
  padding-left: 20px;
  border-left: 2px solid #bae6fd;
}

.timeline-step {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

.timeline-badge {
  position: absolute;
  left: -32px;
  top: 16px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.timeline-header h3 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  color: var(--text-dark);
}

.timeline-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.checklist-items {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}

.checklist-items li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.checklist-items li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: #0d9488;
  font-size: 0.8rem;
}

/* --- ENCADRÉS & LISTES --- */
#contenu .encadre {
  border-radius: 10px;
  padding: 14px 18px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9rem;
}

.encadre-icon { font-size: 1.2rem; margin-top: 2px; }
.encadre.tip { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.encadre.info { background: #f0f9ff; border: 1px solid #bae6fd; color: #0369a1; }
.encadre.warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.encadre.contact { background: #f8fafc; border: 1px solid #cbd5e1; color: #334155; }

.styled-list {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.styled-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.styled-list .icon-bullet {
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--primary);
}

/* --- GRILLES DU CONTENU HTML --- */
.grid-2col, .grid-3col, .grid-housing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin: 18px 0;
}

.card-box, .card-housing {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 15px 0;
}

.data-table th, .data-table td {
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.data-table th { background: #f8fafc; font-weight: 700; }
.highlight-row { background: #f0fdf4; }

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* =============================================
   Ajouts SEO / mobile / accessibilité (septembre 2026)
   ============================================= */

/* --- EN-TÊTE : date de mise à jour et fil d'Ariane --- */
.entete-page .entete-maj {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: #64748b;
}

.fil-ariane .fil-courant {
  margin: 0;
  color: #475569;
}

/* --- IMAGE HÉRO (désormais un <figure>) --- */
figure.actu-widget-entete {
  margin: 0 0 30px 0;
}

/* --- ESPACEMENTS (auparavant en style en ligne) --- */
.bloc-chiffres,
.bloc-timeline {
  margin-bottom: 40px;
}

.bloc-conclusion {
  margin-top: 35px;
}

/* --- TIMELINE passée en liste ordonnée --- */
ol.timeline-container {
  list-style: none;
  margin: 20px 0;
}

/* --- CARTES ILLUSTRÉES (activités, hébergements, restaurants…) --- */
.card-housing {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-housing-img {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #e2e8f0;
}

.card-housing-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-housing-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.card-housing-content {
  padding: 16px;
}

.card-housing-content h3,
.card-box h3 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-housing-content p,
.card-box p {
  margin: 0;
  font-size: 0.9rem;
}

.card-box ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 0.9rem;
}

.card-box ul li {
  margin-bottom: 6px;
}

/* --- BADGES (tableau des balades) --- */
.badge-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #ffedd5; color: #c2410c; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-current { background: #dcfce7; color: #15803d; }
.badge-history { background: #f1f5f9; color: #475569; }

/* --- LIENS DANS LE CONTENU --- */
.contenu-texte-libre p a,
.contenu-texte-libre li a {
  color: #0369a1;
  font-weight: 600;
  text-decoration: underline;
}

/* --- ACCORDÉONS (FAQ) --- */
.accordion-group {
  margin: 18px 0 30px;
}

.accordion-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
}

.accordion-trigger:hover { background: #f8fafc; }

.accordion-trigger .chevron {
  color: var(--primary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-item.active .chevron { transform: rotate(180deg); }

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 18px;
  font-size: 0.9rem;
  transition: max-height 0.35s ease-out;
}

.accordion-item.active .accordion-content { padding-bottom: 14px; }

/* --- SOURCES --- */
.sources-editoriales {
  margin: 30px 0 10px;
  padding: 16px 18px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #ffffff;
  font-size: 0.88rem;
}

.sources-editoriales .sources-titre {
  margin: 0 0 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.sources-editoriales ul {
  margin: 0;
  padding-left: 18px;
}

.sources-editoriales li { margin-bottom: 4px; }

.sources-editoriales a {
  color: #0369a1;
  text-decoration: underline;
  font-weight: 600;
}

/* --- BARRE LATÉRALE : titre (H2) et cartes du hub (conseil.php) --- */
.sidebar-bloc .sidebar-titre {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 1px;
  margin: 0 0 15px 0;
}

.grid-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 15px 0 25px;
}

.sidebar .grid-hub {
  grid-template-columns: 1fr;
  margin: 0;
}

.card-hub {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-hub:hover {
  transform: translateY(-3px);
  border-color: #bae6fd;
  box-shadow: 0 8px 20px -8px rgba(15, 23, 42, 0.15);
}

.card-hub-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.card-hub-titre {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.card-hub p {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}

.card-hub-link {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- FOCUS CLAVIER VISIBLE --- */
.card-hub:focus-visible,
.accordion-trigger:focus-visible,
.sources-editoriales a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* --- MOBILE : la barre latérale passe sous le contenu --- */
@media (max-width: 960px) {
  .layout-avec-sidebar {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 560px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .entete-page h1 {
    font-size: 1.5rem;
  }

  .timeline-container {
    padding-left: 16px;
  }

  .timeline-badge {
    left: -28px;
  }
}

/* --- RÉDUCTION DES ANIMATIONS --- */
@media (prefers-reduced-motion: reduce) {
  .fade-in-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Réduit l'espace vide entre l'image d'en-tête et le contenu */
.section-hero-img { padding-bottom: 0 !important; }
.section-hero-img + .section { padding-top: 24px !important; }
.section-hero-img figure { margin-bottom: 0 !important; }

/* Titre de page sur toute la largeur (style.css le limite à 22ch) */
.entete-page h1 {
  max-width: none !important;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.18;
  text-wrap: wrap;
}
.entete-page .fil-ariane { padding: 0 0 10px; margin-bottom: 12px; border-bottom: 0; }

/* Barre latérale visible pendant tout le défilement */
@media (min-width: 961px) {
  .sidebar {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding-right: 4px;
  }
}

/* Listes justifiées comme les paragraphes, avec césure */
.contenu-principal > p,
.contenu-texte-libre > p,
.contenu-texte-libre .styled-list li,
.checklist-items li {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* =============================================================
   BARRE LATÉRALE FLOTTANTE : le contenu l'habille, puis reprend
   toute la largeur dès qu'elle se termine (pas de colonne vide).
   ============================================================= */
@media (min-width: 961px) {
  .layout-flottant { display: flow-root !important; }
  .layout-flottant > .sidebar {
    float: right;
    width: 300px;
    margin: 0 0 28px 36px;
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  .layout-flottant > .contenu-principal { display: block; min-width: 0; }
}
@media (max-width: 960px) {
  .layout-flottant { display: flex !important; flex-direction: column; }
  .layout-flottant > .sidebar { order: 2; float: none; width: auto; margin: 30px 0 0; }
  .layout-flottant > .contenu-principal { order: 1; }
}
/* Encadrés à fond ou bordure : rangés à côté de la barre latérale */
.contenu-principal :is(.timeline-step, .accordion-item, .sources-editoriales, .sources-section,
  .etape-scolarisation, .intro-editoriale, .section-bloc, .visual-gallery, .info-badge-box,
  .checklist-box, details, figure) {
  display: flow-root;
}

/* Les tableaux se rétrécissent pour tenir à côté de la barre latérale (avec défilement horizontal si besoin) */
.layout-flottant .contenu-principal .table-responsive { width: auto; }

/* Écran moyen / mobile : la barre latérale occupe toute la largeur */
@media (max-width: 960px) {
  .layout-flottant { align-items: stretch !important; }
  .layout-flottant > .sidebar { width: auto !important; align-self: stretch; }
}

/* Chapeau de l'en-tête sur toute la largeur, sans mots coupés */
.entete-page p { max-width: none !important; }
.entete-page p:not(.entete-maj) { -webkit-hyphens: manual; hyphens: manual; }

/* --- ICÔNES (emoji, sans Font Awesome) --- */
.ico { font-style: normal; line-height: 1; flex: none; }
#contenu .eyebrow::before { content: none; }

/* --- CRÉDITS PHOTO --- */
figure.actu-widget-entete, .card-housing-img { position: relative; }
.credit-hero, .credit-carte {
  position: absolute; right: 8px; bottom: 8px; margin: 0;
  background: rgba(15, 23, 42, .72); color: #fff;
  font-size: .72rem; line-height: 1.3; padding: 2px 8px; border-radius: 4px;
}

/* ==========================================================================
   GALERIE PHOTO
   ========================================================================== */
.galerie-sommaire { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.galerie-sommaire a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--border-color); border-radius: 999px;
  background: #fff; color: var(--text-dark); font-weight: 600; font-size: 0.9rem; text-decoration: none;
}
.galerie-sommaire a:hover { border-color: var(--primary); color: var(--primary); }
.galerie-sommaire small { color: #64748b; font-weight: 400; }
.album { margin-bottom: 34px; scroll-margin-top: 90px; }
.album-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 14px; }
.album-photo { margin: 0; background: #fff; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.album-photo > a { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #e2e8f0; }
.album-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.album-photo > a:hover img { transform: scale(1.04); }
.album-photo figcaption { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 0.9rem; }
.album-photo figcaption strong { color: var(--text-dark); }
.album-lien { color: var(--primary); font-weight: 600; text-decoration: none; font-size: 0.85rem; }
.album-photo .credit-photo { font-size: 0.72rem; color: #64748b; }
.galerie-vide { padding: 20px; border: 1px dashed var(--border-color); border-radius: 12px; text-align: center; }
@media (max-width: 520px) { .album-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
