/* /assets/css/nebuleuse.css
   Nébuleuse — charte graphique du site public
   Sombre par défaut, clair automatique (préférence système) ou choisi par le visiteur. */

/* ── Polices auto-hébergées (Lora, SIL OFL 1.1) ─────────────── */
@font-face { font-family: "Lora"; src: url("../fonts/lora.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-italique.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }

/* ── Jetons de couleur : sombre ──────────────────────────────── */
:root {
  color-scheme: dark;
  --fond: #070a14;
  --fond-2: #0b1020;
  --surface: #111829;
  --surface-2: #172036;
  --bord: rgba(150, 172, 222, .17);
  --bord-fort: rgba(150, 172, 222, .34);
  --texte: #e8edf6;
  --texte-2: #b4bfd3;
  --texte-3: #8f9bb3;
  --acc: #8ec5ff;
  --c-astro: #8ec5ff;
  --c-meteo: #5fe3cf;
  --c-vol: #f6c453;
  --c-phys: #c7b8ff;
  --c-alerte: #ff8a8a;
  --ombre: 0 10px 30px rgba(0, 0, 0, .45);
  --ciel: .55;
  --halo: 7px;

  --f-titre: "Lora", Georgia, "Times New Roman", serif;
  --f-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rayon: 12px;
  --large: 1200px;
}

/* ── Jetons de couleur : clair ───────────────────────────────── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --fond: #f6f7fb; --fond-2: #eef1f7; --surface: #ffffff; --surface-2: #f3f5fa;
    --bord: rgba(30, 45, 80, .13); --bord-fort: rgba(30, 45, 80, .28);
    --texte: #131a2b; --texte-2: #39445c; --texte-3: #566079;
    --acc: #1d5bb8; --c-astro: #1d5bb8; --c-meteo: #0b7068; --c-vol: #9a5300; --c-phys: #6a3dcc;
    --ombre: 0 10px 30px rgba(20, 30, 60, .12); --ciel: 0; --c-alerte: #b3261e; --halo: 0px;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --fond: #f6f7fb; --fond-2: #eef1f7; --surface: #ffffff; --surface-2: #f3f5fa;
  --bord: rgba(30, 45, 80, .13); --bord-fort: rgba(30, 45, 80, .28);
  --texte: #131a2b; --texte-2: #39445c; --texte-3: #566079;
  --acc: #1d5bb8; --c-astro: #1d5bb8; --c-meteo: #0b7068; --c-vol: #9a5300; --c-phys: #6a3dcc;
  --ombre: 0 10px 30px rgba(20, 30, 60, .12); --ciel: 0; --c-alerte: #b3261e; --halo: 0px;
}

.th-astro { --th: var(--c-astro); }
.th-meteo { --th: var(--c-meteo); }
.th-vol   { --th: var(--c-vol); }
.th-phys  { --th: var(--c-phys); }

/* ── Base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--fond); color: var(--texte);
  font: 400 1rem/1.6 var(--f-ui); overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/ciel.svg") center top / 900px auto repeat; opacity: var(--ciel);
}
h1, h2, h3 { font-family: var(--f-titre); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: var(--acc); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
svg { width: 1.2em; height: 1.2em; flex-shrink: 0; vertical-align: -.2em; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--surface); padding: .6rem 1rem; border-radius: 8px; }
.evitement:focus { top: .5rem; }
.centre { text-align: center; }
[hidden] { display: none !important; }

/* ── En-tête ─────────────────────────────────────────────────── */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--fond) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bord);
}
.entete-in { max-width: var(--large); margin: 0 auto; padding: .6rem 1rem; display: flex; align-items: center; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .5rem; color: var(--texte); text-decoration: none; flex-shrink: 0; min-height: 44px; }
.logo-marque { width: 30px; height: 30px; color: var(--acc); }
.logo-nom { font-family: var(--f-titre); font-size: 1.3rem; font-weight: 600; letter-spacing: .01em; }

.recherche { position: relative; flex: 1; max-width: 520px; margin: 0 auto; }
.recherche input {
  width: 100%; min-height: 44px; padding: .55rem 1rem .55rem 2.6rem;
  background: var(--surface); color: var(--texte); border: 1px solid var(--bord-fort);
  border-radius: 999px; font: inherit; font-size: 1rem; outline: none;
}
.recherche input::placeholder { color: var(--texte-3); }
.recherche input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 25%, transparent); }
.recherche input::-webkit-search-cancel-button { display: none; }
.recherche-ic { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--texte-3); pointer-events: none; }
.recherche-fermer { display: none; }

.suggestions {
  position: absolute; top: calc(100% + .4rem); left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--bord-fort); border-radius: var(--rayon);
  box-shadow: var(--ombre); max-height: min(70vh, 480px); overflow-y: auto; padding: .35rem;
}
.sugg-groupe { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--texte-3); padding: .55rem .7rem .25rem; }
.sugg {
  display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; align-items: baseline;
  padding: .55rem .7rem; border-radius: 8px; color: var(--texte); text-decoration: none; min-height: 44px;
}
.sugg[aria-selected="true"], .sugg:hover { background: var(--surface-2); }
.sugg-nom { font-family: var(--f-titre); font-size: 1.05rem; }
.sugg-nom mark { background: none; color: var(--th, var(--acc)); font-weight: 700; }
.sugg-theme { font-size: .75rem; color: var(--th, var(--texte-3)); white-space: nowrap; }
.sugg-def { grid-column: 1 / -1; font-size: .82rem; color: var(--texte-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg-vide { padding: .9rem .8rem; color: var(--texte-2); font-size: .95rem; }
.sugg-vide a { display: inline-block; margin-top: .3rem; }

.actions { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
.bouton-ic {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-width: 44px; min-height: 44px; padding: 0 .6rem; border-radius: 10px;
  background: none; border: 1px solid transparent; color: var(--texte-2);
  font: inherit; font-size: .9rem; text-decoration: none; cursor: pointer;
}
.bouton-ic:hover { color: var(--texte); border-color: var(--bord); }
.bouton-ic[aria-expanded="true"] { color: var(--acc); border-color: var(--bord-fort); }
.seul-mobile { display: none; }

.menu-themes { border-top: 1px solid var(--bord); background: var(--fond-2); max-height: calc(100vh - 64px); overflow-y: auto; }
.menu-grille { max-width: var(--large); margin: 0 auto; padding: 1.2rem 1rem .4rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.menu-titre { display: flex; gap: .45rem; align-items: center; font-family: var(--f-titre); font-weight: 600; color: var(--th); text-decoration: none; margin-bottom: .4rem; font-size: 1.05rem; }
.menu-col ul { list-style: none; margin: 0; padding: 0; }
.menu-col li a { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; color: var(--texte-2); text-decoration: none; font-size: .92rem; }
.menu-col li a:hover { color: var(--texte); }
.nb { color: var(--texte-3); font-size: .8em; font-variant-numeric: tabular-nums; }
.menu-pied { max-width: var(--large); margin: 0 auto; padding: .4rem 1rem 1.2rem; }

/* ── Structure ───────────────────────────────────────────────── */
.contenu { flex: 1; width: 100%; max-width: var(--large); margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.page-etroite { max-width: 880px; margin: 0 auto; }

.fil ol { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem .5rem; font-size: .85rem; color: var(--texte-3); }
.fil li + li::before { content: "›"; margin-right: .5rem; }
.fil a { color: var(--texte-2); text-decoration: none; }
.fil a:hover { color: var(--acc); text-decoration: underline; }

.bouton {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .6rem 1.1rem;
  border-radius: 999px; border: 1px solid var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent);
  color: var(--texte); font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
}
.bouton:hover { background: color-mix(in srgb, var(--acc) 24%, transparent); }
.bouton-second { border-color: var(--bord-fort); background: transparent; font-weight: 500; }
.bouton-second:hover { border-color: var(--acc); background: transparent; }
.lien-discret { background: none; border: 0; padding: .3rem 0; color: var(--texte-3); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }

/* ── Définition ──────────────────────────────────────────────── */
.mise-en-page-def { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 3rem; align-items: start; }
.definition { max-width: 720px; }
.def-theme { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .4rem; font-size: .85rem; letter-spacing: .04em; color: var(--th, var(--acc)); }
.def-theme a { color: inherit; text-decoration: none; }
.def-theme a:hover { text-decoration: underline; }
.def-entete h1 { font-size: clamp(2.1rem, 5.5vw, 3.3rem); margin-bottom: .5rem; }
.niveau { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--texte-2); border: 1px solid var(--bord); border-radius: 999px; padding: .15rem .7rem; }
.niveau-pts { display: inline-flex; gap: 3px; }
.niveau-pts::before { content: "●○○"; font-size: .55rem; letter-spacing: 2px; color: var(--th, var(--acc)); }
.niveau-intermediaire .niveau-pts::before { content: "●●○"; }
.niveau-expert .niveau-pts::before { content: "●●●"; }

.def-illu { margin: 1.5rem 0; }
.def-illu img { display: block; border-radius: var(--rayon); width: 100%; height: auto; background: var(--surface); }
.def-illu figcaption { font-size: .8rem; color: var(--texte-3); margin-top: .4rem; }

.def-principale { margin: 1.6rem 0 2rem; padding-left: 1.1rem; border-left: 3px solid var(--th, var(--acc)); }
.def-principale p { font-family: var(--f-titre); font-size: clamp(1.18rem, 2.4vw, 1.38rem); line-height: 1.65; margin: 0; max-width: 62ch; }
.lien-notion { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--th, var(--acc)) 70%, transparent); text-decoration-thickness: 2px; }
.lien-notion:hover { color: var(--th, var(--acc)); }

.def-bloc { margin: 0 0 1.8rem; }
.def-bloc h2, .nav-cat h2, .theme-niveau h2, .theme-sous h2, .az-groupe h2 { font-size: 1.2rem; }
.def-explication p { font-size: 1.05rem; line-height: 1.75; max-width: 66ch; }
.def-etymologie { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1rem 1.2rem; }
.def-etymologie h2 { font-size: .8rem; font-family: var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--texte-3); margin-bottom: .3rem; }
.def-etymologie p { font-family: var(--f-titre); font-style: italic; color: var(--texte-2); margin: 0; font-size: 1.05rem; }
.def-reperes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.def-reperes h2 { font-size: .8rem; font-family: var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--texte-3); }

.etiquettes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.etiquettes li { font-size: .88rem; color: var(--texte-2); border: 1px solid var(--bord); border-radius: 999px; padding: .2rem .75rem; }
.etiquettes-liens li { padding: 0; }
.etiquettes-liens a { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .2rem .8rem; color: var(--texte); text-decoration: none; border-radius: 999px; }
.etiquettes-liens a:hover { color: var(--th, var(--acc)); }
.etiquettes-liens li:hover { border-color: var(--th, var(--acc)); }

.def-suite { border-top: 1px solid var(--bord); padding-top: 1.4rem; margin-top: 2rem; }
.def-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.parcours-perso { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.parcours-perso a {
  display: flex; align-items: center; gap: .5rem; min-height: 56px; padding: .6rem .8rem;
  border: 1px solid var(--bord); border-radius: var(--rayon); color: var(--texte); text-decoration: none; background: var(--surface);
}
.parcours-perso a:hover { border-color: var(--bord-fort); }
.parcours-perso .suiv { justify-content: flex-end; text-align: right; grid-column: 2; }
.parcours-perso small { display: block; font-size: .72rem; color: var(--texte-3); letter-spacing: .06em; text-transform: uppercase; }
.parcours-perso span { font-family: var(--f-titre); }

/* ── Navigation contextuelle ─────────────────────────────────── */
.navigation-contextuelle { padding-top: .3rem; }
.nav-cat { margin-bottom: 1.6rem; }
.nav-cat h2 { margin-bottom: .1rem; display: flex; align-items: center; gap: .5rem; }
.nav-cat h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pastille, var(--acc)); }
.nav-comprendre  { --pastille: var(--c-meteo); }
.nav-associe     { --pastille: var(--c-astro); }
.nav-decouvrir   { --pastille: var(--c-vol); }
.nav-approfondir { --pastille: var(--c-phys); }
.nav-confondre   { --pastille: #ff8a8a; }
.nav-aide { font-size: .82rem; color: var(--texte-3); margin-bottom: .6rem; }
.vide { color: var(--texte-3); }

.cartes { display: grid; gap: .45rem; }
.cartes-larges { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; }
.carte {
  display: block; padding: .6rem .85rem; border-radius: 10px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--bord); border-left: 3px solid var(--th, var(--acc));
  color: var(--texte); transition: border-color .15s, background-color .15s;
}
.carte:hover { background: var(--surface-2); border-color: var(--bord-fort); border-left-color: var(--th); }
.carte-nom { display: block; font-family: var(--f-titre); font-weight: 600; font-size: 1.04rem; line-height: 1.3; }
.carte-def { display: block; font-size: .84rem; color: var(--texte-2); line-height: 1.45; margin-top: .15rem; }
.carte-meta { display: block; font-size: .72rem; color: var(--texte-3); margin-top: .25rem; letter-spacing: .02em; }
.carte.vu .carte-nom::after, .liste-noms a.vu::after { content: "déjà vue"; font: 500 .66rem var(--f-ui); color: var(--texte-3); border: 1px solid var(--bord); border-radius: 999px; padding: 0 .4rem; margin-left: .45rem; vertical-align: .15em; letter-spacing: .03em; }
.carte-trouve-def .carte-meta::after { content: " · trouvé dans la définition"; }
.plus { margin-top: .45rem; }
.plus summary { cursor: pointer; color: var(--texte-2); font-size: .9rem; padding: .4rem 0; min-height: 36px; list-style-position: inside; }
.plus summary:hover { color: var(--acc); }
.plus .cartes { margin-top: .3rem; }

/* ── Aperçu au survol ────────────────────────────────────────── */
.apercu {
  position: absolute; z-index: 80; max-width: 340px; padding: .8rem 1rem; pointer-events: none;
  background: var(--surface); border: 1px solid var(--bord-fort); border-radius: var(--rayon); box-shadow: var(--ombre);
}
.apercu strong { display: block; font-family: var(--f-titre); font-size: 1.05rem; }
.apercu span { display: block; font-size: .75rem; color: var(--th, var(--texte-3)); margin-bottom: .3rem; }
.apercu p { margin: 0; font-size: .88rem; color: var(--texte-2); line-height: 1.5; }

/* ── Accueil ─────────────────────────────────────────────────── */
.accueil-hero { text-align: center; padding: 1.6rem 0 .6rem; }
.accueil-hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: .2em; letter-spacing: .01em; }
.accueil-sig { font-family: var(--f-titre); font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: var(--texte-2); max-width: 36em; margin: 0 auto .6rem; }
.accueil-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.accueil-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; margin-bottom: 2.8rem; }
.du-jour, .reprendre { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.3rem 1.5rem; }
.du-jour { border-top: 3px solid var(--th); }
.du-jour h2, .reprendre h2 { font-family: var(--f-ui); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-3); }
.du-jour-nom { font-family: var(--f-titre); font-size: 1.7rem; font-weight: 600; margin: 0 0 .3rem; }
.du-jour-nom a { color: var(--texte); text-decoration: none; }
.du-jour-nom a:hover { color: var(--th); }
.du-jour-def { font-family: var(--f-titre); font-size: 1.08rem; color: var(--texte-2); line-height: 1.6; }
.du-jour-meta { font-size: .8rem; color: var(--th); margin: 0; }
.historique-liste { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .1rem; }
.historique-liste a { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; color: var(--texte); text-decoration: none; border-bottom: 1px solid var(--bord); font-family: var(--f-titre); }
.historique-liste a:hover { color: var(--acc); }
.historique-liste small { font-family: var(--f-ui); color: var(--texte-3); font-size: .75rem; }
.accueil-reprendre { max-width: 720px; margin: 0 auto 2.8rem; }
.accueil-themes > h2 { text-align: center; font-size: 1.6rem; margin-bottom: 1.2rem; }
.themes-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; margin-bottom: 1.8rem; }
.theme-carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.3rem 1.3rem 1rem; }
.theme-carte h3 { font-size: 1.25rem; }
.theme-carte h3 a { display: flex; gap: .5rem; align-items: center; color: var(--th); text-decoration: none; }
.theme-carte h3 a:hover { text-decoration: underline; }
.theme-carte > p { color: var(--texte-2); font-size: .92rem; }
.theme-carte .etiquettes { margin-bottom: .8rem; }
.theme-nb { font-size: .8rem; color: var(--texte-3); margin: 0; }

/* ── Thèmes, index, recherche ────────────────────────────────── */
.theme-entete { margin-bottom: 2rem; }
.theme-entete h1 { font-size: clamp(2rem, 5vw, 3rem); }
.theme-intro { font-family: var(--f-titre); font-size: 1.2rem; color: var(--texte-2); max-width: 40em; }
.theme-compte { color: var(--texte-3); font-size: .9rem; }
.theme-niveau, .theme-sous, .theme-autres { margin-bottom: 2.2rem; }
.theme-sous h2 a { color: var(--texte); text-decoration: none; }
.theme-sous h2 a:hover { color: var(--th); text-decoration: underline; }
.liste-noms { list-style: none; margin: 0; padding: 0; columns: 3 200px; column-gap: 1.5rem; }
.liste-noms li { break-inside: avoid; }
.liste-noms a { display: block; padding: .32rem 0; min-height: 36px; color: var(--texte); text-decoration: none; font-family: var(--f-titre); font-size: 1.02rem; border-bottom: 1px solid transparent; }
.liste-noms a:hover { color: var(--th, var(--acc)); }
.liste-noms li[class^="th-"] a::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--th); margin-right: .55rem; vertical-align: .15em; }
.liste-noms a.tout { color: var(--acc); font-family: var(--f-ui); font-size: .9rem; }
.az-lettres { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1rem 0 2rem; position: sticky; top: 64px; z-index: 5; background: var(--fond); padding: .5rem 0; }
.az-lettres a { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; border: 1px solid var(--bord); border-radius: 8px; text-decoration: none; color: var(--texte); font-family: var(--f-titre); font-weight: 600; }
.az-lettres a:hover { border-color: var(--acc); color: var(--acc); }
.az-groupe { margin-bottom: 1.8rem; }
.az-groupe h2 { font-size: 1.8rem; color: var(--acc); border-bottom: 1px solid var(--bord); padding-bottom: .3rem; }
.aucun { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.3rem 1.5rem; }

/* ── Pied de page ────────────────────────────────────────────── */
.pied { border-top: 1px solid var(--bord); background: var(--fond-2); }
.pied-in { max-width: var(--large); margin: 0 auto; padding: 2rem 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.pied-nom { font-family: var(--f-titre); font-size: 1.2rem; font-weight: 600; margin: 0; }
.pied-sig { color: var(--texte-3); font-size: .88rem; margin: 0; }
.pied-liens { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; }
.pied-liens a { color: var(--texte-2); text-decoration: none; font-size: .9rem; display: inline-block; padding: .35rem 0; }
.pied-liens a:hover { color: var(--acc); text-decoration: underline; }

/* ── Orbite : navigation par cercles reliés (accueil, Explorer, miniature) ── */
.oc-comprendre  { --oc: var(--c-meteo); }
.oc-associe     { --oc: var(--c-astro); }
.oc-approfondir { --oc: var(--c-phys); }
.oc-decouvrir   { --oc: var(--c-vol); }
.oc-confondre   { --oc: var(--c-alerte); }
.oc-elargir     { --oc: var(--texte-2); }
.oc-theme       { --oc: var(--th, var(--acc)); }
.orbite [class*="th-"] { --oc: var(--th); }

.orbite { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem 2rem; align-items: center; margin: 0 0 2.8rem; }
.orbite-scene { position: relative; min-width: 0; }
.orbite-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

.o-t { text-anchor: middle; font-family: var(--f-ui); fill: var(--texte); pointer-events: none; -webkit-user-select: none; user-select: none; }
.o-t-titre { font-family: var(--f-titre); font-weight: 600; }
.o-t-sur { fill: var(--th, var(--acc)); letter-spacing: .06em; text-transform: uppercase; }
.o-t-sous { fill: var(--texte-3); }
.o-t-hub { font-weight: 600; }
.o-t-nb { fill: var(--oc, var(--texte-3)); font-variant-numeric: tabular-nums; }
.o-t-plus { fill: var(--oc, var(--acc)); font-weight: 600; }
.o-ic { color: var(--oc, var(--acc)); pointer-events: none; }

.o-noeud { cursor: pointer; outline: none; text-decoration: none; transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .35s; }
.o-noeud .o-c { fill: var(--surface); stroke: var(--oc, var(--acc)); stroke-width: 1.5; transition: fill .2s, stroke-width .2s; }
.o-hub .o-c { fill: color-mix(in srgb, var(--oc, var(--acc)) 13%, var(--fond)); filter: drop-shadow(0 0 var(--halo) color-mix(in srgb, var(--oc, var(--acc)) 50%, transparent)); }
.o-hub.o-ouvert .o-c { fill: color-mix(in srgb, var(--oc, var(--acc)) 30%, var(--fond)); stroke-width: 2.6; }
.o-centre .o-c { fill: var(--fond-2); stroke: var(--th, var(--acc)); stroke-width: 2; filter: drop-shadow(0 0 var(--halo) color-mix(in srgb, var(--th, var(--acc)) 55%, transparent)); }
.o-halo { fill: none; stroke: var(--th, var(--acc)); stroke-width: 1; stroke-dasharray: 2 7; opacity: .35; }
g.o-centre { cursor: default; }
.o-noeud:hover .o-c, .o-choisi .o-c { fill: color-mix(in srgb, var(--oc, var(--th, var(--acc))) 24%, var(--surface)); stroke-width: 2.6; }
.o-noeud:focus-visible .o-c { stroke: var(--texte); stroke-width: 3; }
.o-vu .o-t-sat { fill: var(--texte-2); }
.o-pastille { fill: var(--oc, var(--acc)); }
.o-noeud.o-entre { opacity: 0; }

.o-trait { stroke: var(--oc, var(--bord-fort)); stroke-width: 1.2; opacity: .38; transition: opacity .5s .25s; }
.o-trait-actif { opacity: .85; stroke-width: 1.8; }
.o-trait-sat { opacity: .55; }
.o-trait.o-entre { opacity: 0; }
.o-depart .o-noeud:not(.o-elu), .o-depart .o-trait { opacity: 0; transition: opacity .3s, transform .5s cubic-bezier(.2, .8, .2, 1); }

.orbite-outils { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; pointer-events: none; }
.orbite-rond {
  pointer-events: auto; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  width: 66px; height: 66px; border-radius: 50%; border: 1px solid var(--bord-fort); background: var(--surface);
  color: var(--texte-2); font: inherit; font-size: .66rem; line-height: 1.1; cursor: pointer;
}
.orbite-rond:hover { color: var(--texte); border-color: var(--acc); }
.orbite-rond[data-orbite-act="hasard"] { margin-left: auto; }

.orbite-info { min-height: 5.2em; max-width: 44em; margin: .7rem auto 0; text-align: center; font-size: .9rem; line-height: 1.45; color: var(--texte-2); }
.orbite-info strong { display: block; font-family: var(--f-titre); font-size: 1.08rem; color: var(--oc, var(--texte)); }
.orbite-info-meta { display: block; font-size: .74rem; color: var(--texte-3); letter-spacing: .02em; }
.orbite-info-def, .orbite-info-invite { display: block; }
.orbite-info-invite { font-family: var(--f-titre); font-size: 1.05rem; padding-top: .8em; }
.orbite-info-go { display: inline-flex; align-items: center; min-height: 40px; margin-top: .4rem; padding: .3rem 1.1rem; border: 1px solid var(--acc); border-radius: 999px; color: var(--texte); font-weight: 600; text-decoration: none; background: color-mix(in srgb, var(--acc) 14%, transparent); }

/* En colonne, le bandeau reste visible en bas de l'écran pendant qu'on parcourt les satellites */
.orbite[data-mode="colonne"] .orbite-info {
  position: sticky; bottom: .5rem; z-index: 5; min-height: 0; margin-top: 1rem; padding: .6rem .9rem;
  background: var(--surface); border: 1px solid var(--bord-fort); border-radius: var(--rayon); box-shadow: var(--ombre);
}

.orbite-panneau { background: var(--surface); border: 1px solid var(--bord); border-top: 3px solid var(--th, var(--acc)); border-radius: var(--rayon); padding: 1.3rem 1.5rem; }
.orbite-p-sur { font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--th, var(--texte-3)); margin: 0 0 .3rem; }
.orbite-p-titre { font-size: 1.7rem; margin: 0 0 .5rem; }
.orbite-p-texte { font-family: var(--f-titre); font-size: 1.06rem; line-height: 1.6; color: var(--texte-2); margin: .9rem 0 0; }
.orbite-p-etym { font-family: var(--f-titre); font-style: italic; font-size: .92rem; color: var(--texte-3); margin: .7rem 0 0; }
.orbite-p-liens { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.orbite-p-liens .bouton { font-size: .9rem; padding: .5rem 1rem; }

.orbite-voyage { grid-column: 1 / -1; display: flex; align-items: center; gap: .8rem; min-width: 0; }
.orbite-voyage p { margin: 0; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-3); white-space: nowrap; }
.orbite-voyage ol { display: flex; align-items: center; list-style: none; margin: 0; padding: .3rem 0; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.orbite-voyage li { display: flex; align-items: center; flex-shrink: 0; }
.orbite-voyage li + li::before { content: ""; width: 20px; height: 1px; background: var(--bord-fort); }
.orbite-voyage button {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .2rem .75rem .2rem .55rem; white-space: nowrap;
  border: 1px solid var(--bord); border-radius: 999px; background: none; color: var(--texte-2); font: inherit; font-size: .85rem; cursor: pointer;
}
.orbite-voyage button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--oc, var(--acc)); }
.orbite-voyage button:hover { color: var(--texte); border-color: var(--bord-fort); }
.orbite-voyage button[aria-current] { color: var(--texte); border-color: var(--oc, var(--acc)); cursor: default; }
.orbite-voyage button[aria-current]::before { background: var(--oc, var(--acc)); }

.orbite-secours { padding: 1rem 0; }
.orbite-secours-centre { font-family: var(--f-titre); font-size: 1.5rem; font-weight: 600; margin: 0 0 .5rem; }
.orbite-secours h3 { font-size: 1.05rem; margin: 1rem 0 .4rem; }

.orbite-mini { margin: 0 0 1.8rem; text-align: center; }
.orbite-mini .orbite-svg { max-width: 340px; margin: 0 auto; }
.orbite-mini .o-t-titre { font-size: 13.5px; }
.orbite-mini .o-t-hub { font-size: 9.6px; }
.orbite-mini .o-t-nb { font-size: 10.5px; }
.orbite-mini-lien { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; font-size: .9rem; text-decoration: none; }
.orbite-mini-lien:hover { text-decoration: underline; }
.page-explorer .contenu { padding-top: 1rem; }

/* ── Tablette ────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .mise-en-page-def { grid-template-columns: 1fr; gap: 1rem; }
  .navigation-contextuelle { border-top: 1px solid var(--bord); padding-top: 1.6rem; }
  .navigation-contextuelle .cartes { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .menu-grille { grid-template-columns: repeat(2, 1fr); }
  .orbite { grid-template-columns: minmax(0, 1fr); }
  .orbite-panneau { max-width: 720px; width: 100%; margin: 0 auto; }
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .entete-in { gap: .4rem; padding: .4rem .6rem .4rem .9rem; }
  .logo-nom { font-size: 1.15rem; }
  .actions .lib { display: none; }
  .actions { margin-left: auto; }
  .seul-mobile { display: inline-flex; }
  .recherche { display: none; }
  /* backdrop-filter crée un bloc conteneur : à retirer pour que la recherche couvre tout l'écran */
  .recherche-ouverte .entete { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--fond); }
  .recherche-ouverte { overflow: hidden; }
  .recherche-ouverte .recherche {
    display: block; position: fixed; inset: 0; z-index: 90; max-width: none; margin: 0;
    background: var(--fond); padding: .7rem .7rem 0 .7rem;
  }
  .recherche-ouverte .recherche input { padding-right: 3.2rem; font-size: 1.05rem; }
  .recherche-ouverte .recherche-ic { left: 1.65rem; top: 1.85rem; }
  .recherche-ouverte .recherche-fermer {
    display: inline-flex; position: absolute; right: .9rem; top: .8rem; width: 42px; height: 42px;
    align-items: center; justify-content: center; background: none; border: 0; color: var(--texte-2); cursor: pointer;
  }
  .recherche-ouverte .suggestions { position: static; margin-top: .6rem; max-height: calc(100vh - 80px); border: 0; box-shadow: none; background: transparent; padding: 0; }
  .menu-grille { grid-template-columns: 1fr; gap: 1rem; }
  .contenu { padding-top: 1rem; }
  .def-principale { padding-left: .85rem; }
  .parcours-perso { grid-template-columns: 1fr; }
  .parcours-perso .suiv { grid-column: 1; }
  .accueil-hero { padding: .6rem 0 .2rem; }
  .liste-noms { columns: 1; }
  .az-lettres { top: 52px; }
  .orbite-rond { width: 58px; height: 58px; font-size: .62rem; }
  .orbite-voyage p { display: none; }
}

/* ── Animations réduites ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ── Impression ──────────────────────────────────────────────── */
@media print {
  .entete, .pied, .navigation-contextuelle, .def-suite, .orbite, body::before { display: none !important; }
  body { background: #fff; color: #000; }
}
