@charset "UTF-8";
/* =========================================================
   0) Variables + Reset
   ========================================================= */
:root {
  --bg:#ffffff;
  --fg:#111;
  --muted:#6b7280;
  --brand:#0f766e;
  --accent:#b91c1c;
  --border: color-mix(in srgb, var(--fg) 12%, transparent);
  --maxw: 96ch;
  --radius: 14px;
  --s-1:.5rem;
  --s0:.75rem;
  --s1:1rem;
  --s2:1.5rem;
  --s3:2rem;
  --s4:3rem;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 28px rgba(0,0,0,.08);
  /* “Affiche / mouvement social” */
  --sticker: color-mix(in srgb, var(--bg) 86%, transparent);
  --sticker-strong: color-mix(in srgb, var(--bg) 78%, transparent);
  --ink: var(--fg);
  /* Breakpoints */
  --bp-tablet: 720px;
  --bp-desktop: 1024px;
  /* Header height hint (si tu utilises du sticky ailleurs) */
  --header-pad: var(--s2);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:#0b0c0e;
    --fg:#f2f3f5;
    --muted:#9aa0a6;
    --shadow: 0 6px 18px rgba(0,0,0,.35);
    --sticker: color-mix(in srgb, var(--bg) 86%, transparent);
    --sticker-strong: color-mix(in srgb, var(--bg) 78%, transparent);
  }
}
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.6;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-underline-offset: 0.15em;
}

a:hover {
  color: color-mix(in srgb, var(--brand) 70%, var(--accent));
}

.wrapper {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s2) var(--s1);
}

/* Accessibilité */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: #fffbcc;
  color: #000;
  border-radius: 0.5rem;
  z-index: 1000;
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 60%, #fff 40%);
  outline-offset: 2px;
}

/* =========================================================
   1) Header (structure existante)
   - .site-header .bar.two-rows
   - .nav-collapsible (hamburger)
   - .main-nav (menu long desktop)
   - .nav-submenu (sous-menus)
   ========================================================= */
.site-header {
  border-bottom: 1px solid var(--border);
  overflow: visible;
  /* Fond “affiche” */
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 96%, var(--brand) 4%), var(--bg));
}

/* Optionnel : petite bande en haut (si tu l’avais) */
.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #0055A4 0%, #FFFFFF 55%, #EF4135 100%);
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--fg);
  font-weight: 800;
}

.brand .logo {
  width: 40px;
  height: auto;
}

.brand span {
  font-size: clamp(1.1rem, 2.3vw, 1.6rem);
  line-height: 1.2;
}

/* ===================== HEADER : grille desktop (>=1024) ===================== */
@media (min-width: 1024px) {
  .site-header .bar.two-rows {
    display: grid;
    grid-template-columns: auto 1fr; /* burger à gauche, contenu à droite */
    grid-template-areas: "brand brand" "nav1  nav1" "burger nav2" "breadcrumb breadcrumb";
    align-items: center;
    gap: var(--s1);
  }
  .site-header .brand {
    grid-area: brand;
  }
  /* Le menu long devient un bloc avec deux lignes internes */
  .site-header .main-nav {
    grid-area: nav1;
    display: block;
    overflow: visible; /* dropdowns visibles */
    justify-self: stretch;
  }
  /* Les 2 lignes du menu long */
  .site-header .main-nav .nav-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  .site-header .main-nav-1 {
    grid-area: nav1;
    justify-self: center;
  }
  .site-header .main-nav-2 {
    grid-area: nav2;
    justify-self: center;
  }
  /* On positionne la 2e ligne en grille via un wrapper */
  .site-header .main-nav .nav-row-2 {
    justify-content: center;
    margin-top: 0;
  }
  /* Hamburger sur la 2e ligne */
  .site-header .nav-collapsible {
    grid-area: burger;
    justify-self: start;
  }
  .site-header .breadcrumb {
    grid-area: breadcrumb;
  }
  /* Important : éviter que la largeur du menu long “pousse” le burger */
  .site-header .main-nav,
  .site-header .main-nav .nav-row {
    min-width: 0;
  }
}
/* Desktop : hamburger OUI + menu long OUI */
@media (min-width: 1024px) {
  .site-header .main-nav {
    display: flex;
  }
}
/* Anti-chevauchement (sécurité) */
.site-header .nav-collapsible {
  position: relative;
  z-index: 50;
}

.site-header .main-nav {
  max-width: 100%;
}

/* Desktop : hamburger OUI, menu long OUI */
@media (min-width: 1024px) {
  .site-header .main-nav {
    display: flex;
    flex-wrap: wrap; /* 1 seule ligne */
    align-items: center;
    gap: 0.5rem;
    overflow: visible; /* IMPORTANT : le dropdown peut dépasser */
    padding-bottom: 0.25rem;
  }
  .site-header .main-nav > * {
    flex: 0 0 auto;
  }
  .site-header .main-nav .main-link {
    white-space: nowrap;
    flex: 0 0 auto;
  }
}
/* hamburger toujours présent */
.nav-collapsible {
  grid-area: burger;
  position: relative;
  justify-self: start;
}

.nav-collapsible > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--sticker);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 10px 18px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  user-select: none;
}

.nav-collapsible > summary::-webkit-details-marker {
  display: none;
}

.nav-collapsible > summary::before {
  content: "☰";
  font-size: 1.05rem;
  line-height: 1;
}

.nav-collapsible[open] > summary::before {
  content: "✕";
}

/* Panneau hamburger : mobile/tablette = en flux */
.nav-collapsible > .links {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

@media (max-width: 420px) {
  .nav-collapsible > .links {
    grid-template-columns: 1fr;
  }
}
.nav-collapsible > .links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--sticker);
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
}

.nav-collapsible > .links a:hover {
  border-color: color-mix(in srgb, var(--brand) 25%, transparent);
}

/* Actif (hamburger) */
.nav-collapsible > .links a.is-active,
.nav-collapsible > .links a[aria-current=page] {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  background: color-mix(in srgb, var(--brand) 18%, var(--bg) 82%);
}

/* Sous-sections dans le hamburger : <details class="subnav"> ... */
.nav-collapsible details.subnav {
  border-top: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
  padding-top: 0.35rem;
  margin-top: 0.35rem;
}

.nav-collapsible details.subnav > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  padding: 0.35rem 0.35rem 0.35rem 0.1rem;
}

.nav-collapsible details.subnav > summary::-webkit-details-marker {
  display: none;
}

.nav-collapsible details.subnav > summary::before {
  content: "›";
  display: inline-block;
  margin-right: 0.35rem;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}

.nav-collapsible details.subnav[open] > summary::before {
  transform: rotate(90deg);
}

.nav-collapsible details.subnav .links {
  display: grid;
  gap: 0.2rem;
  padding-left: 0.6rem;
}

/* Desktop : panneau hamburger en dropdown (mais hamburger reste visible) */
@media (min-width: var(--bp-desktop)) {
  .nav-collapsible > .links {
    position: absolute;
    top: calc(100% + 0.2rem);
    left: 0;
    z-index: 60;
    display: none;
    grid-template-columns: 1fr;
    min-width: 260px;
    padding: 0.5rem;
    background: color-mix(in srgb, var(--bg) 90%, var(--brand) 10%);
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  }
  .nav-collapsible[open] > .links {
    display: grid;
  }
  .nav-collapsible > .links a {
    justify-content: flex-start;
    padding: 0.55rem 0.7rem;
  }
}
/* -----------------------
   Menu long desktop (main-nav)
   - caché en dessous de 1024
   - 1 seule ligne, scroll horizontal si besoin
   - sous-menus au survol
   ----------------------- */
.main-nav {
  display: none;
}

@media (min-width: var(--bp-desktop)) {
  .bar.two-rows {
    grid-template-columns: auto 1fr;
    grid-template-areas: "brand brand" "burger nav";
  }
  .main-nav {
    grid-area: nav;
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap; /* 2 ligne */
    overflow: visible; /* IMPORTANT : le dropdown peut dépasser */
    /*padding-bottom:.25rem;*/
  }
  .main-nav > * {
    flex: 0 0 auto;
  }
}
/* Boutons menu long */
.main-nav .nav-item {
  position: relative;
}

.main-nav .main-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--sticker);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 8px 16px rgba(0, 0, 0, 0.06);
  transform: rotate(-0.15deg);
}

.main-nav .main-link:hover {
  transform: translateY(-1px) rotate(0.15deg);
  border-color: color-mix(in srgb, var(--brand) 30%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 16px 26px rgba(0, 0, 0, 0.1);
}

/* Indicateur dropdown */
.main-nav .nav-item.has-sub > .main-link::after {
  content: "▾";
  margin-left: 0;
  font-size: 0.95em;
  opacity: 0.75;
}

.main-nav .nav-item.has-sub > .main-link:hover::after {
  opacity: 1;
}

/* Actif */
.main-nav .main-link.is-active,
.main-nav .main-link[aria-current=page] {
  background: color-mix(in srgb, var(--brand) 16%, var(--bg) 84%);
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
}

/* Sous-menu (desktop) */
.nav-submenu {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  margin-top: 0; /* pas de trou */
  padding: 0.35rem;
  border-radius: 0.8rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 90%, var(--brand) 10%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  z-index: 50;
  gap: 0.35rem;
  white-space: nowrap;
}

.nav-submenu a {
  display: flex;
  align-items: center; /* centrage vertical */
  justify-content: center; /* centrage horizontal */
  min-height: 40px;
  padding: 0.5rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent);
  background: var(--sticker-strong);
  color: var(--fg);
  text-decoration: none;
  font-weight: 650;
}

.nav-submenu a:hover {
  border-color: color-mix(in srgb, var(--brand) 25%, transparent);
}

/* Actif sous-menu */
.main-nav .nav-submenu a.is-active,
.main-nav .nav-submenu a[aria-current=page] {
  background: color-mix(in srgb, var(--brand) 28%, var(--bg) 72%);
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
}

/* Hover/focus uniquement desktop “vrai hover” */
@media (min-width: var(--bp-desktop)) and (hover: hover) and (pointer: fine) {
  .main-nav .nav-item.has-sub:hover > .nav-submenu,
  .main-nav .nav-item.has-sub:focus-within > .nav-submenu {
    display: block; /* block nécessaire pour les colonnes */
  }
}
/* =========================================================
   2) Fil d’Ariane (si présent dans header)
   ========================================================= */
.breadcrumb {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.breadcrumb a {
  color: color-mix(in srgb, var(--fg) 70%, var(--brand));
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .sep {
  opacity: 0.6;
}

/* =========================================================
   3) Layout Chapitre + TOC (au-dessus du texte)
   - basé sur .page-layout + include toc.html
   ========================================================= */
.page-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s2) var(--s1);
}

/* si toc => on garde une colonne (toc au-dessus), comme tu l’as demandé */
.page-layout {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s2) var(--s1);
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

/* TOC : bloc */
.page-toc {
  position: relative;
}

.toc-collapsible {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--sticker);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.toc-collapsible > summary {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  font-weight: 800;
  list-style: none;
}

.toc-collapsible > summary::-webkit-details-marker {
  display: none;
}

.toc-collapsible > summary::after {
  content: "▾";
  opacity: 0.8;
}

.toc-collapsible[open] > summary::after {
  content: "▴";
}

.toc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.7rem 0.2rem;
}

.toc-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.35rem 0.6rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  font-weight: 650;
}

.toc-link:hover {
  border-color: color-mix(in srgb, var(--brand) 25%, transparent);
}

.toc-link.is-active {
  background: var(--brand);
  color: #fff;
  border-color: color-mix(in srgb, var(--brand) 60%, transparent);
}

.toc-top {
  display: inline-block;
  margin: 0.2rem 0.7rem 0.7rem;
  text-decoration: none;
  font-weight: 700;
}

/* =========================================================
   4) Contenu + composants simples
   ========================================================= */
.lead {
  font-size: 1.05rem;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: var(--s1);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s1);
  background: color-mix(in srgb, var(--bg) 96%, var(--brand) 4%);
  box-shadow: var(--shadow);
}

.note {
  padding: var(--s1);
  border-left: 4px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-radius: 0.5rem;
}

.note.attention {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
}

th {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  text-align: left;
}

tbody tr:nth-child(odd) {
  background: color-mix(in srgb, var(--bg) 98%, var(--brand) 2%);
}

/* =========================================================
   5) Motion + Print
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .site-header, .site-footer, .page-toc {
    display: none !important;
  }
  .wrapper, .page-layout, .page-main {
    max-width: 100%;
    padding: 0;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}
/* FIX anti-chevauchement : le menu long ne doit jamais recouvrir le burger */
.site-header .main-nav {
  min-width: 0;
  max-width: 100%;
}

.site-header .nav-collapsible {
  position: relative;
  z-index: 50;
}

@media (min-width: 1024px) {
  .site-header .main-nav .nav-break {
    flex-basis: 100%;
    height: 0;
  }
}
/* Desktop : sous-menus visibles au survol/focus */
@media (min-width: 1024px) {
  .main-nav .nav-item.has-sub {
    position: relative;
  }
  .main-nav .nav-item.has-sub:hover > .nav-submenu,
  .main-nav .nav-item.has-sub:focus-within > .nav-submenu {
    display: block; /* block nécessaire pour les colonnes */
  }
}
.site-header {
  overflow: visible;
}

.site-header .bar {
  overflow: visible;
}

.main-nav .nav-item {
  position: relative;
}

.nav-submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

/* ===================== MENU LONG : sous-menus 2 niveaux (thèmes -> chapitres) ===================== */
/* ===================== MENU LONG : sous-menus 2 niveaux (thèmes -> chapitres) ===================== */
/* ===================== MENU LONG : sous-menus 2 niveaux (thèmes -> chapitres) ===================== */
/* ===================== MENU LONG : sous-menus 2 niveaux (thèmes -> chapitres) ===================== */
/* 1) Le sous-menu de niveau 1 devient une LISTE verticale (pas une grille/colonnes) */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .main-nav .nav-submenu {
    display: none; /* reste caché par défaut */
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
    /* IMPORTANT : panneau lisible */
    flex-direction: column; /* <— au lieu de “flex en ligne” */
    align-items: stretch;
    gap: 0.35rem;
    min-width: 260px;
    width: max-content;
    /*padding: .45rem;*/
    border-radius: 0.8rem;
    border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
    background: color-mix(in srgb, var(--bg) 92%, var(--brand) 8%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    z-index: 1000;
    /* IMPORTANT : plus de boîte scrollable */
    max-height: none;
    overflow: visible;
    /* IMPORTANT : pas flex-colonne -> colonnes automatiques */
    column-width: 220px; /* ajuste la largeur “cible” d’une colonne */
    column-gap: 0.45rem;
  }
  /* Vos items thème (div) doivent être positionnés pour accueillir le panneau 2 */
  .main-nav .nav-submenu .subnav-item {
    position: static;
    break-inside: avoid; /* évite qu’un item soit coupé entre colonnes */
    margin: 0;
  }
  /* Style du lien thème (remplace l'ancien .nav-submenu a "plat") */
  .main-nav .nav-submenu .subnav-link {
    display: flex;
    align-items: center;
    justify-content: center; /* centrage horizontal */
    min-height: 40px;
    /*padding: .55rem .9rem;*/
    border-radius: 0.7rem;
    border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    color: var(--fg);
    text-decoration: none;
    white-space: nowrap;
  }
  .main-nav .nav-submenu .subnav-link:hover {
    border-color: color-mix(in srgb, var(--brand) 25%, transparent);
  }
  /* 2) Le sous-menu de niveau 2 (chapitres) : caché par défaut + panneau à droite */
  .main-nav .nav-submenu-2 {
    display: none; /* <— clé : cache les chapitres tant qu’on ne survole pas un thème */
    position: absolute;
    top: 0;
    left: calc(100% + 0.4rem); /* panneau à droite du thème */
    margin: 0;
    /*flex-direction: column;*/
    /*align-items: stretch;*/
    /*gap: .25rem;*/
    /*min-width: 320px;*/
    /*width: max-content;*/
    /*padding: .45rem;*/
    border-radius: 0.8rem;
    border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
    background: color-mix(in srgb, var(--bg) 92%, var(--brand) 8%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    z-index: 1100;
    /* IMPORTANT : plus de boîte scrollable */
    max-height: none;
    overflow: visible;
    /* Colonnes pour éviter une liste trop haute */
    column-width: 320px; /* les titres de chapitres sont longs */
    column-gap: 0.45rem;
  }
  .main-nav .nav-submenu-2::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -0.4rem; /* même valeur que ton gap */
    width: 0.4rem; /* pont invisible */
  }
  /* Afficher les chapitres seulement quand on survole / focus un thème */
  .main-nav .subnav-item.has-sub:hover > .nav-submenu-2,
  .main-nav .subnav-item.has-sub:focus-within > .nav-submenu-2 {
    display: block; /* block nécessaire pour les colonnes */
  }
  /* Style des liens chapitre */
  .main-nav .nav-submenu-2 a {
    display: flex;
    align-items: center;
    justify-content: center; /* centrage horizontal */
    min-height: 38px;
    /*padding: .5rem .85rem;$*/
    border-radius: 0.7rem;
    border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    color: var(--fg);
    text-decoration: none;
    white-space: wrap;
    break-inside: avoid;
    margin: 0;
  }
  .main-nav .nav-submenu-2 a:hover {
    border-color: color-mix(in srgb, var(--brand) 25%, transparent);
  }
}
/* Tactile / mobile : on évite les sous-menus hover dans le menu long */
@media (hover: none), (pointer: coarse) {
  .main-nav .nav-submenu,
  .main-nav .nav-submenu-2 {
    display: none !important;
  }
}
/* ===================== FIN FIN FIN : MENU LONG : sous-menus 2 niveaux (thèmes -> chapitres) ===================== */
/* ===================== FIN FIN FIN : MENU LONG : sous-menus 2 niveaux (thèmes -> chapitres) ===================== */
/* ===================== FIN FIN FIN : MENU LONG : sous-menus 2 niveaux (thèmes -> chapitres) ===================== */
/* ===================== LARGEUR AUTO DES BOUTONS .nav-submenu-2 =================== */
/* ===================== LARGEUR AUTO DES BOUTONS .nav-submenu-2 =================== */
/* ===================== LARGEUR AUTO DES BOUTONS .nav-submenu-2 =================== */
/* ===================== LARGEUR AUTO DES BOUTONS .nav-submenu-2 =================== */
/* 1) Le panneau du sous-menu : on laisse les boutons prendre leur largeur */
.nav-submenu-2 {
  display: flex;
  flex-wrap: wrap; /* ✅ les boutons peuvent passer à la ligne */
  gap: 0.4rem;
  align-items: stretch;
  /*white-space: normal;*/ /* ✅ autorise le retour à la ligne dans le panneau */
  max-width: 100%;
}

/* 2) Les boutons : largeur = contenu (texte) */
.nav-submenu-2 a {
  display: flex;
  align-items: center;
  justify-content: center;
  /*width: auto;*/ /* ✅ pas de largeur forcée */
  max-width: 100%; /* ne dépasse jamais le panneau */
  flex: 1 1 180px; /* ✅ ne s’étire pas, ne rétrécit pas */
  white-space: wrap; /* ✅ AUTORISE le retour à la ligne */
  width: max-content;
  word-break: normal;
  overflow-wrap: anywhere;
  text-align: center;
  padding: 0.5rem 0.8rem; /* ajuste si besoin */
  line-height: 1.2;
}

/* Option “sécurité” si un label est trop long */
.nav-submenu-2 a {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis; /* … si vraiment trop long */
}

/* ===================== FOOTER ===================== */
/* ===================== FOOTER ===================== */
/* ===================== FOOTER ===================== */
/* ===================== FOOTER ===================== */
/* ===================== FOOTER ===================== */
.site-footer {
  margin-top: var(--s4);
  border-top: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
  background: color-mix(in srgb, var(--bg) 92%, var(--brand) 8%);
}

.footer-inner {
  padding: var(--s3) var(--s1);
  display: grid;
  gap: var(--s2);
  align-items: start;
}

.footer-title {
  font-weight: 800;
  text-decoration: none;
  color: var(--fg);
}

.footer-title:hover {
  color: var(--brand);
}

.footer-tagline {
  margin: 0.35rem 0 0;
  color: var(--muted);
  max-width: 52ch;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.4rem 0.7rem;
  border-radius: 0.75rem;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
  background: var(--sticker, color-mix(in srgb, var(--bg) 88%, transparent));
  color: var(--fg);
}

.footer-nav a:hover {
  border-color: color-mix(in srgb, var(--brand) 30%, transparent);
}

.footer-meta {
  color: var(--muted);
}

.footer-small {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
}

.footer-small a {
  color: inherit;
}

.footer-small a:hover {
  color: var(--brand);
}

/* Desktop : 3 colonnes */
@media (min-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
  .footer-meta {
    text-align: right;
  }
}
/* ===================== FIN FIN FIN FOOTER ===================== */
/* ===================== FIN FIN FIN FOOTER ===================== */
/* ===================== FIN FIN FIN FOOTER ===================== */
/* ===================== FIN FIN FIN FOOTER ===================== */
/* ===================== TENTATIVE RESOLUTION PROBLEME MENU QUI DISPARAIT ===================== */
/* ===================== TENTATIVE RESOLUTION PROBLEME MENU QUI DISPARAIT ===================== */
/* ===================== TENTATIVE RESOLUTION PROBLEME MENU QUI DISPARAIT ===================== */
/* Par défaut : caché */
.has-sub .nav-submenu {
  display: none;
}

/* Visible quand on survole le parent (bouton OU sous-menu) */
.has-sub:hover .nav-submenu,
.has-sub:focus-within .nav-submenu { /* bonus clavier */
  display: block;
}

/* ===================== TENTATIVE RESOLUTION PROBLEME MENU QUI DISPARAIT ===================== */
/* ===================== TENTATIVE RESOLUTION PROBLEME MENU QUI DISPARAIT ===================== */
/* ===================== TENTATIVE RESOLUTION PROBLEME MENU QUI DISPARAIT ===================== */
/* FIX hover : garder le sous-menu visible quand on passe du bouton au menu */
.main-nav .nav-item.has-sub,
.main-nav .subnav-item.has-sub {
  position: relative;
}

/* Sous-menu niveau 1 */
.main-nav .nav-item.has-sub > .nav-submenu {
  display: none;
}

.main-nav .nav-item.has-sub:hover > .nav-submenu,
.main-nav .nav-item.has-sub:focus-within > .nav-submenu {
  display: block;
}

/* Sous-menu niveau 2 */
.main-nav .subnav-item.has-sub > .nav-submenu-2 {
  display: none;
}

.main-nav .subnav-item.has-sub:hover > .nav-submenu-2,
.main-nav .subnav-item.has-sub:focus-within > .nav-submenu-2 {
  display: block;
}

/* ===================== TENTATIVE RESOLUTION PROBLEME MENU QUI DISPARAIT ===================== */
/* ===================== TENTATIVE RESOLUTION PROBLEME MENU QUI DISPARAIT ===================== */
/* ===================== TENTATIVE RESOLUTION PROBLEME MENU QUI DISPARAIT ===================== */
/* ===================== TENTATIVE ALIGNEMENT DES MENUS ===================== */
/* ===================== TENTATIVE ALIGNEMENT DES MENUS ===================== */
/* ===================== TENTATIVE ALIGNEMENT DES MENUS ===================== */

/*# sourceMappingURL=main.css.map */