/* =============================================================================
   style.css — l'unique feuille de style du site (pas de framework, pas de build).
   Principe : on habille les BALISES (body, nav, h1, a…) plutôt que d'inventer
   des classes. Le HTML reste lisible et un nouveau contenu est stylé d'office.
   ========================================================================== */

/* 0. POLICE — Latin Modern Roman (la police de LaTeX), copiée dans
   site/fonts/latin-modern/ : licence libre GUST Font License (texte joint),
   fichiers OpenType de CTAN simplement passés au format woff2, sans retouche.
   « swap » : le texte s'affiche tout de suite, la police arrive ensuite. */
@font-face { font-family: "Latin Modern Roman"; src: url("../fonts/latin-modern/lmroman10-regular.woff2") format("woff2");
             font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Latin Modern Roman"; src: url("../fonts/latin-modern/lmroman10-italic.woff2") format("woff2");
             font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Latin Modern Roman"; src: url("../fonts/latin-modern/lmroman10-bold.woff2") format("woff2");
             font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Latin Modern Roman"; src: url("../fonts/latin-modern/lmroman10-bolditalic.woff2") format("woff2");
             font-weight: 600 700; font-style: italic; font-display: swap; }
/* Texte courant des articles : New Computer Modern, graisse « Book ». C'est le
   même dessin que Latin Modern (Computer Modern de Knuth), mais aux déliés
   épaissis pour l'écran : le texte paraît plus net, sans changer de style.
   Fichiers réduits aux alphabets latin et grec (polices GUST, CTAN). */
@font-face { font-family: "New Computer Modern Book"; src: url("../fonts/new-computer-modern/newcm10-book.woff2") format("woff2");
             font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "New Computer Modern Book"; src: url("../fonts/new-computer-modern/newcm10-bookitalic.woff2") format("woff2");
             font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "New Computer Modern Book"; src: url("../fonts/new-computer-modern/newcm10-bold.woff2") format("woff2");
             font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "New Computer Modern Book"; src: url("../fonts/new-computer-modern/newcm10-bolditalic.woff2") format("woff2");
             font-weight: 600 700; font-style: italic; font-display: swap; }

/* 1. VARIABLES — les « propriétés personnalisées » (--nom) centralisent les
   choix : changer une couleur ici la change partout. `color-scheme` prévient
   le navigateur que les deux thèmes existent (barres de défilement, lecteur
   <audio> et champs natifs s'accordent alors tout seuls). */
:root {
  color-scheme: light dark;
  /* Noir, blanc et gris ; deux couleurs seulement : le bleu des liens et le
     rouge des titres. */
  --fond: #ffffff;
  --texte: #141414;     /* presque noir                                       */
  --discret: #5e5e5e;   /* dates, légendes : 6,4:1 sur le blanc (seuil AA 4,5) */
  --accent: #141414;    /* boutons, repères : noir                            */
  --lien: var(--texte); /* liens : à l'encre, soulignés d'or (harmonisé avec l'atlas, 26/11/2026) */
  --titre: #0d1424;     /* titres : bleu nuit, celui de la planche (18:1)     */
  --alerte: #b3131b;    /* erreurs, actions dangereuses : rouge (6,3:1) — seulement là */
  --filet: #dedede;     /* traits de séparation                               */
  --ia: #1e46c2;        /* passages rédigés avec l'IA : bleu soutenu (7,7:1), distinct du noir */
  /* Barre latérale : gris clair ; foncée quand on est connecté. */
  --barre-fond: #f1f1f1; --barre-texte: #1e1e1e; --barre-discret: #5a5a5a; --barre-actif: rgb(0 0 0 / .08);
  --police: "Latin Modern Roman", "Latin Modern", "CMU Serif", Georgia, serif;
  --mesure: 38rem;      /* largeur de colonne : ~70 caractères, lecture aisée */
}

/* 2. THÈME SOMBRE — on ne redéfinit QUE les variables ; aucune autre règle
   n'est à dupliquer. Clair par défaut ; « Auto » suit le réglage du système. */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] { --fond: #121212; --texte: #e8e8e8; --discret: #a6a6a6; --accent: #e8e8e8;
          --lien: var(--texte); --titre: #e9edf7; --alerte: #ff7b7b; --filet: #333333; --ia: #8ab4ff;
          --barre-fond: #1b1b1b; --barre-texte: #e4e4e4; --barre-discret: #a0a0a0; --barre-actif: rgb(255 255 255 / .08); }
}
/* Affichage clair par défaut ; sombre si on le choisit dans la barre (ou Auto + appareil en sombre). */
:root[data-theme="sombre"] { --fond: #121212; --texte: #e8e8e8; --discret: #a6a6a6; --accent: #e8e8e8;
          --lien: var(--texte); --titre: #e9edf7; --alerte: #ff7b7b; --filet: #333333; --ia: #8ab4ff;
          --barre-fond: #1b1b1b; --barre-texte: #e4e4e4; --barre-discret: #a0a0a0; --barre-actif: rgb(255 255 255 / .08); }

/* 3. BASE — `border-box` : padding et bordure comptent DANS la largeur
   déclarée, ce qui évite les débordements sur petit écran. */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0 auto;                     /* auto à gauche/droite = colonne centrée */
  max-width: var(--mesure);
  padding: 1.5rem 1.25rem 4rem;       /* la marge latérale suffit au mobile :   */
  background: var(--fond);            /* aucune media query de mise en page     */
  color: var(--texte);
  /* Latin Modern (section 0), servie par le site lui-même : aucune requête
     à un tiers. Un peu plus petite à l'œil que les polices habituelles,
     d'où 1,15rem. */
  font: 1.15rem/1.6 var(--police);
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;     /* iOS ne grossit pas le texte en paysage */
}

/* 4. NAVIGATION — flex + wrap : les onglets passent à la ligne d'eux-mêmes
   quand la place manque ; inutile d'écrire un menu « burger » en JavaScript. */
nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem;
      padding-bottom: 1rem; border-bottom: 1px solid var(--filet);
      font: .9rem/1.4 var(--police); }  /* sans-serif = « interface » */
nav a { color: var(--discret); text-decoration: none; padding: .35rem 0; }
nav a:hover { color: var(--accent); }
/* La page courante porte aria-current="page" dans le HTML : l'attribut sert
   à la fois aux lecteurs d'écran ET de crochet CSS (pas de classe « active »). */
nav a[aria-current] { color: var(--texte); font-weight: 600; }
nav a:first-child { margin-right: auto; color: var(--texte); } /* le nom, à gauche */

/* 5. TEXTE */
main { margin-top: 3rem; }
/* Échelle des titres (demande de Julien, nov. 2026) : chaque niveau est plus gros
   que le suivant, et h4 reste au-dessus du texte (1,15 rem, voir body).
   Tous en gras, sauf h5 : taille du texte, italique, grisé. */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; text-wrap: balance; }
h1 { font-size: 1.9rem; margin: 0 0 1.5rem; }
h2 { font-size: 1.55rem; margin: 2.75rem 0 .75rem; }
h3 { font-size: 1.35rem; margin: 1.75rem 0 .25rem; }
h4 { font-size: 1.2rem; margin: 1.5rem 0 .25rem; }
h5 { font-size: inherit; font-weight: 400; font-style: italic; color: var(--discret); line-height: 1.4; margin: 1.25rem 0 .25rem; }
p, ul, dl { margin: 0 0 1rem; }

/* Liens : à l'encre, soulignés d'or (DESIGN, « Liens »), sur tout le site, intranet compris. */
a { color: var(--lien); text-underline-offset: .2em; text-decoration-thickness: 1px; text-decoration-color: var(--atlas-or); }
a:hover { text-decoration-thickness: 2px; }
/* Accessibilité : contour net pour la navigation au clavier uniquement
   (:focus-visible ne se déclenche pas au clic de souris). */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* <time> et <small> = informations secondaires (dates, durées, mentions). */
time, small { color: var(--discret); font: .85rem/1.4 var(--police);
              font-variant-numeric: tabular-nums; } /* chiffres de même largeur */

/* 6. LISTES — les listes de <main> servent d'inventaires (CV, ressources,
   archives) : pas de puce, un filet entre les lignes. */
main ul { list-style: none; padding: 0; }
main li { padding: .6rem 0; border-top: 1px solid var(--filet); }
main li > time { display: block; }   /* la date au-dessus de l'intitulé */

/* 7. PODCASTS — un épisode = un <article>. Le lecteur natif <audio> s'étire
   sur toute la colonne ; c'est le navigateur qui le dessine. */
article { padding: 1.5rem 0; border-top: 1px solid var(--filet); }
article h2, article h4 { margin: .15rem 0 .5rem; }   /* tailles : l'échelle ci-dessus (h2 > h4) */
h1, h2, h3 { color: var(--titre); }  /* titres en bleu nuit (le rouge est réservé aux erreurs) */
figure { margin: 0 0 1.5rem; }       /* annule la marge latérale par défaut */
/* <details> : dépliant natif. On ne stylise que le libellé cliquable. */
summary { cursor: pointer; color: var(--lien); margin-bottom: 1rem;
          font: .9rem/1.4 var(--police); }
audio { display: block; width: 100%; margin-top: 1rem; }
img { max-width: 100%; height: auto; }  /* une image ne déborde jamais */

/* 8. PIED DE PAGE */
footer { margin-top: 4rem; padding-top: 1rem; border-top: 1px solid var(--filet);
         color: var(--discret); font: .85rem/1.5 var(--police); }

/* 9. LIEN D'ÉVITEMENT — premier élément de chaque page : hors écran, il
   n'apparaît qu'au premier appui sur Tab, pour sauter la navigation. */
.evitement { position: absolute; left: -999rem; }
.evitement:focus { left: 1rem; top: 1rem; padding: .5rem .75rem; background: var(--fond); }

/* 12. ONGLET DE LANGUE — en haut à droite, seulement sur les pages qui
   existent en plusieurs langues (fabriqué par le serveur, voir pages.py). */
nav.langues { justify-content: flex-end; gap: .25rem; border-bottom: 0; padding: 0 0 .5rem; }
nav.langues a, nav.langues a:first-child { margin: 0; padding: .2rem .6rem; border: 1px solid var(--filet);
  border-radius: 999px; color: var(--discret); font-size: .8rem; }
nav.langues a[aria-current] { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* 13. ARTICLES DU CMS — listes, corps enrichi (images, sons, vidéos, lecteurs
   de podcast), aperçu sur les réseaux. */
article.resume { overflow: hidden; }
article.resume h2 { font-size: 1.15rem; margin: .25rem 0 .4rem; }
article.resume h2 a { color: var(--titre); text-decoration: none; }
article.resume h2 a:hover { color: var(--accent); }
img.vignette { float: right; width: 7rem; aspect-ratio: 1; object-fit: cover; margin: 0 0 .5rem 1rem; border-radius: 4px; }
article.article { border-top: 0; padding-top: 0; }
article.article h1 { margin-bottom: .5rem; }
.meta { margin-bottom: 1.5rem; }
.chapo { font-size: 1.15rem; line-height: 1.55; color: var(--discret); }
figure.une img { width: 100%; border-radius: 4px; }
.corps h2 { margin-top: 2.25rem; }
.corps figure { margin: 2rem 0; }
.corps figcaption { margin-top: .4rem; color: var(--discret); font: .85rem/1.4 var(--police); }
.corps img, .corps video { max-width: 100%; height: auto; border-radius: 4px; }
.corps video, .corps audio { display: block; width: 100%; }
.corps iframe { display: block; max-width: 100%; border: 0; }
.corps iframe[src*="youtube"], .corps iframe[src*="vimeo"], .corps iframe[src*="peertube"] { width: 100%; height: auto; aspect-ratio: 16/9; }
.corps blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--filet); color: var(--discret); }
.corps pre { overflow-x: auto; padding: 1rem; background: var(--filet); border-radius: 4px; font-size: .85rem; }
.corps table { width: 100%; border-collapse: collapse; font-size: .95rem; }
/* Tableaux du texte (glossaires, comparatifs) : une bordure simple et bien visible
   autour de chaque case, tirée de la couleur du texte (elle suit le thème clair/sombre). */
.corps th, .corps td { border: 1px solid color-mix(in srgb, currentColor 45%, transparent); padding: .45rem .65rem;
  text-align: left; vertical-align: top; }
.corps ul { list-style: disc; padding-left: 1.4rem; }
.corps ul li { border: 0; padding: .15rem 0; }
nav.partage { display: block; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--filet); border-bottom: 0; }
nav.partage a, nav.partage a:first-child { display: inline-block; margin: 0 .6rem 0 0; color: var(--lien); }

/* 14. FORMULAIRES (connexion, mot de passe, compte) et AVIS */
.formulaire { display: grid; gap: 1rem; max-width: 24rem; margin-bottom: 1.5rem; }
.formulaire label { display: grid; gap: .3rem; font: .9rem/1.4 var(--police); }
.formulaire label.case { display: flex; gap: .5rem; align-items: center; }
.formulaire input:not([type=checkbox]) { padding: .6rem .7rem; border: 1px solid var(--filet); border-radius: 6px;
  background: var(--fond); color: var(--texte); font: 1rem var(--police); }
.formulaire input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button { font: 600 .95rem var(--police); padding: .6rem 1rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: var(--fond); justify-self: start; }
button.lien { border: 0; background: none; padding: 0; color: var(--lien); font-weight: 400; text-decoration: underline; }
.avis { padding: .75rem 1rem; border: 1px solid color-mix(in srgb, var(--texte) 22%, transparent); background: color-mix(in srgb, var(--filet) 55%, transparent);
  font: .95rem/1.5 var(--police); }
.avis.erreur { border-color: #b3261e; background: color-mix(in srgb, #b3261e 7%, transparent); }
form.compte { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; justify-content: flex-end;
  margin: -2rem 0 2rem; font: .85rem var(--police); }
form.compte button.lien { font-size: .85rem; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; }
dt { color: var(--discret); } dd { margin: 0; }
section.encart { padding: 1rem 1.25rem; border: 1px solid var(--filet); border-radius: 6px; }
section.encart h2 { margin-top: 0; }

/* 10. ÉCRANS LARGES — seule media query de mise en page (« mobile d'abord » :
   les règles ci-dessus valent pour le téléphone, on enrichit au-delà de 40rem).
   Dans les inventaires, la date passe en colonne à gauche de l'intitulé. */
@media (min-width: 40rem) {
  body { padding-top: 3rem; }
  main li:has(> time) { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; }
}

/* 15. BARRE LATÉRALE — fabriquée par le serveur pour chaque visiteur
   (server/pages.py, barre_laterale) : le site ; une fois connecté, en plus,
   les modules de l'intranet de sa catégorie ; en bas, « Se connecter » ou
   « Connecté en tant que … ». Connecté, elle passe en gris foncé.
   Sur téléphone, c'est un bandeau en haut ; à partir de 60rem, une colonne
   fixe à gauche. `body:has(> header)` : seulement les pages du site (pas le
   contenu de l'éditeur du CMS, qui charge aussi cette feuille). */
.theme-barre { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: .8rem 0 0; font: .8rem var(--police);
  color: var(--barre-discret); }
.theme-barre span { margin-right: .2rem; }
.theme-barre button { padding: .1rem .5rem; border: 1px solid var(--barre-discret); border-radius: 999px; background: transparent;
  color: var(--barre-texte); font: inherit; cursor: pointer; }
.theme-barre button[aria-pressed="true"] { background: var(--barre-texte); color: var(--barre-fond); border-color: var(--barre-texte); }
body.connecte { --barre-fond: #232323; --barre-texte: #f1f1f1; --barre-discret: #b4b4b4; --barre-actif: rgb(255 255 255 / .13); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] body.connecte { --barre-fond: #2f2f2f; } }
:root[data-theme="sombre"] body.connecte { --barre-fond: #2f2f2f; }
:root { --barre: 14rem; --dispo: calc(100vw - 2.5rem); }
body > header { margin: -1.5rem -1.25rem 1rem; padding: 1rem 1.25rem .75rem; background: var(--barre-fond); color: var(--barre-texte); }
header nav { border: 0; padding: 0; }
header nav a { color: var(--barre-texte); }
header nav a:hover { color: var(--barre-texte); text-decoration: underline; }
header nav a[aria-current] { font-weight: 700; color: var(--barre-texte); }
header nav a.nom-site, header nav a:first-child { color: var(--barre-texte); }
header nav a.nom-site[aria-current] { background: none; }
header .titre-barre { flex-basis: 100%; margin: .6rem 0 0; color: var(--barre-discret); font: 600 .7rem/1.4 var(--police);
                      text-transform: uppercase; letter-spacing: .08em; }
header .compte-barre { margin-top: .75rem; padding-top: .6rem; border-top: 1px solid var(--barre-actif);
                       font: .85rem/1.45 var(--police); display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; }
header .compte-barre p { margin: 0; color: var(--barre-discret); flex-basis: 100%; }
header .compte-barre strong { color: var(--barre-texte); }
header .compte-barre a, header .compte-barre button.lien { color: var(--barre-texte); }
header .compte-barre form { margin: 0; }
header .bouton-connexion { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--barre-texte); border-radius: 6px;
                           color: var(--barre-texte); text-decoration: none; font-weight: 600; }
header .bouton-connexion:hover { background: var(--barre-texte); color: var(--barre-fond); }
@media (min-width: 40rem) { body > header { margin-top: -3rem; padding-top: 1.25rem; } }
@media (min-width: 60rem) {
  :root { --dispo: calc(100vw - var(--barre) - 5rem); }
  body:has(> header) { max-width: none; margin: 0; padding: 3rem 2.5rem 4rem calc(var(--barre) + 2.5rem); }
  body:has(> header) > main, body:has(> header) > footer { max-width: var(--mesure); margin-left: auto; margin-right: auto; }
  body:has(> header) > main { margin-top: 0; }
  body > header { position: fixed; top: 0; bottom: 0; left: 0; width: var(--barre); margin: 0; overflow-y: auto;
                  display: flex; flex-direction: column; padding: 2.5rem 1rem 1.25rem 1.1rem; }
  header nav:not(.langues) { flex-direction: column; flex-wrap: nowrap; gap: .1rem; }
  header nav:not(.langues) a { margin: 0; padding: .38rem .65rem; border-radius: 6px; }
  header nav:not(.langues) a:hover { background: var(--barre-actif); text-decoration: none; }
  header nav:not(.langues) a[aria-current] { background: var(--barre-actif); }
  header nav a.nom-site, header nav:not(.langues) a:first-child { margin: 0 0 1.25rem; font: 600 1.1rem/1.3 var(--police); }
  header nav.intranet { margin-top: 1.25rem; }
  header nav.intranet a:first-child { margin: 0; font: inherit; }
  header .titre-barre { margin: 0 0 .3rem .65rem; }
  header .compte-barre { margin-top: auto; padding: 1rem .65rem 0; }
  /* L'onglet de langue reste en haut à droite de la page. */
  nav.langues { position: fixed; top: 1.25rem; right: 1.5rem; z-index: 2; padding: 0; }
}

/* 15 bis. ARTICLE SPÉCIAL — une application occupe tout l'écran (cadre) ;
   le bouton « Menu », en haut à gauche, ouvre la barre du site et la
   présentation de l'article par-dessus (élément <details> : sans script). */
body.special { max-width: none; margin: 0; padding: 0; overflow: hidden; }
.appli-speciale { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.menu-special { position: fixed; top: .75rem; left: .75rem; z-index: 10; }
.menu-special > summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; margin: 0;
  padding: .45rem .8rem; border-radius: 999px; background: rgb(20 20 20 / .82); color: #fff;
  font: 600 .85rem/1 var(--police); box-shadow: 0 2px 10px rgb(0 0 0 / .35); cursor: pointer; }
.menu-special > summary::-webkit-details-marker { display: none; }
.menu-special[open] > summary { background: #fff; color: #141414; }
.panneau-special { position: fixed; top: 3.5rem; left: .75rem; bottom: .75rem; width: min(24rem, calc(100vw - 1.5rem));
  overflow-y: auto; background: var(--fond); color: var(--texte); border-radius: 12px; box-shadow: 0 12px 40px rgb(0 0 0 / .45); }
.panneau-special > header { position: static !important; width: auto !important; margin: 0 !important; display: block !important;
  padding: 1.1rem 1rem 1rem !important; border-radius: 12px 12px 0 0; }
.panneau-special header nav:not(.langues) { flex-direction: column; flex-wrap: nowrap; gap: .1rem; }
.panneau-special header nav a { padding: .3rem .5rem; border-radius: 6px; }
.panneau-special header nav a.nom-site { margin: 0 0 .75rem; font: 600 1.05rem/1.3 var(--police); }
.panneau-special header nav.intranet { margin-top: .75rem; }
.panneau-special header .titre-barre { margin: 0 0 .2rem .5rem; }
.panneau-special header .compte-barre { margin-top: .75rem; }
.panneau-special nav.langues { position: static; padding: .75rem 1rem 0; justify-content: flex-start; }
.panneau-special .apropos { padding: 1rem 1.25rem 1.25rem; }
.panneau-special .apropos h1 { font-size: 1.35rem; margin: 0 0 .5rem; }
.panneau-special .apropos .chapo { font-size: 1rem; }

/* 15 ter. PODCASTS — séries (/podcasts/), épisodes, lecteur (Plyr). */
.fil { margin: 0 0 1rem; font: .85rem var(--police); color: var(--discret); }
/* Vitrine des podcasts (/podcasts/ et page d'une série) : noir, ivoire et or,
   grandes capitales espacées, colonne élargie. Le bandeau garde ses couleurs
   sombres dans les deux thèmes. */
:root { --or: var(--atlas-or-texte); --encre: var(--atlas-nuit); --ivoire: var(--atlas-ivoire); }   /* repris de l’atlas (section 20) */
@media (min-width: 60rem) {
  body:has(> header) > main:has(> .vitrine) { max-width: min(72rem, var(--dispo)); }
}
.vitrine { --rayon: 4px; }
.vitrine .surtitre { margin: 0 0 .6rem; font: 600 .72rem/1.2 var(--police); letter-spacing: .22em; text-transform: uppercase; color: var(--or); }
.bandeau-podcasts { position: relative; margin: 0 0 3rem; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  background: radial-gradient(120% 140% at 100% 0%, #2a2520 0%, var(--encre) 55%); color: var(--ivoire); border-radius: var(--rayon); overflow: hidden; }
.bandeau-podcasts::after { content: ""; position: absolute; left: clamp(1.5rem, 5vw, 4rem); right: clamp(1.5rem, 5vw, 4rem); bottom: 0;
  height: 1px; background: linear-gradient(90deg, var(--or), transparent); }
.bandeau-podcasts h1 { margin: 0; color: var(--ivoire); font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 600; letter-spacing: .02em; line-height: 1.05; }
.bandeau-chapo { max-width: 38rem; margin: 1rem 0 0; font-size: 1.15rem; line-height: 1.55; color: color-mix(in srgb, var(--ivoire) 78%, transparent); font-style: italic; }
.bandeau-podcasts .fil, .bandeau-podcasts .fil a { color: color-mix(in srgb, var(--ivoire) 60%, transparent); }
.bandeau-grille { display: grid; grid-template-columns: minmax(10rem, 17rem) 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.bandeau-grille .jaquette, .serie-jaquette img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 2px;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / .65), 0 0 0 1px rgb(255 255 255 / .06); }
@media (max-width: 40rem) { .bandeau-grille { grid-template-columns: 1fr; } .bandeau-grille .jaquette { max-width: 14rem; } }

.chiffres-podcast { display: flex; flex-wrap: wrap; gap: 0; margin: 1.6rem 0 0; }
.chiffres-podcast div { padding: 0 1.4rem; border-left: 1px solid color-mix(in srgb, var(--or) 55%, transparent); }
.chiffres-podcast div:first-child { padding-left: 0; border-left: 0; }
.chiffres-podcast dt { font: 400 .82rem/1.2 var(--police); font-variant: small-caps; letter-spacing: .06em; color: var(--or); }   /* étiquettes : petites capitales (DESIGN) */
.chiffres-podcast dd { margin: .3rem 0 0; font-size: 1.35rem; }
.serie-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 0; }
.bouton-luxe { display: inline-block; padding: .75rem 1.5rem; background: var(--or); color: #fff; border: 1px solid var(--or);
  font: 600 .78rem/1 var(--police); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; border-radius: 1px;
  transition: background .2s, color .2s; }
.bouton-luxe:hover { background: transparent; color: var(--or); text-decoration: none; }
.bouton-luxe.secondaire { background: transparent; color: inherit; border-color: color-mix(in srgb, currentColor 35%, transparent); }
.bouton-luxe.secondaire:hover { border-color: var(--or); color: var(--or); }

/* Page des séries : une carte « vedette » par série */
.serie-vedette { display: grid; grid-template-columns: minmax(12rem, 22rem) 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start;
  margin: 0 0 3.5rem; }
.serie-vedette h2 { margin: 0; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; line-height: 1.1; }
.serie-vedette h2 a { color: var(--texte); text-decoration: none; }
.serie-vedette h2 a:hover { color: var(--or); }
.serie-accroche { margin: .9rem 0 0; font-size: 1.15rem; font-style: italic; color: var(--discret); }
.serie-vedette .chiffres-podcast dd { color: var(--texte); }
.derniers-episodes { margin-top: 2.2rem; }
main .derniers-episodes ol { list-style: none; margin: 0; padding: 0; }
main .derniers-episodes li { padding: 0; border-top: 1px solid var(--filet); }
.derniers-episodes a { display: flex; gap: .8rem; align-items: baseline; padding: .7rem 0; color: var(--texte); text-decoration: none; }
.derniers-episodes a:hover { color: var(--or); }
.derniers-episodes .num { color: var(--or); font-variant-numeric: oldstyle-nums; min-width: 2.2rem; }
.derniers-episodes .duree { margin-left: auto; font-size: .85rem; color: var(--discret); white-space: nowrap; }
@media (max-width: 40rem) { .serie-vedette { grid-template-columns: 1fr; } .serie-jaquette img { max-width: 16rem; } }

/* Page d'une série : description, puis la grille des épisodes */
.description-serie { max-width: 44rem; margin: 0 auto 3rem; font-size: 1.12rem; line-height: 1.7; }
.description-serie > p:first-child::first-letter { float: left; font-size: 3.4em; line-height: .85; padding: .08em .1em 0 0; color: var(--or); }
.titre-section { display: flex; align-items: center; gap: 1.2rem; margin: 0 0 1.8rem; color: var(--texte);
  font: 600 .8rem/1 var(--police); letter-spacing: .24em; text-transform: uppercase; }
.titre-section::before, .titre-section::after { content: ""; flex: 1; height: 1px; background: var(--filet); }
main ol.grille-episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); }
main ol.grille-episodes li { padding: 0; border: 0; }
.carte-episode a { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.1rem; height: 100%; padding: 1.2rem; color: var(--texte); text-decoration: none;
  border: 1px solid var(--filet); border-radius: var(--rayon); background: var(--fond); transition: border-color .2s, transform .2s, box-shadow .2s; }
.carte-episode a:hover { border-color: var(--or); transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgb(0 0 0 / .35); }
.visuel-episode { display: block; width: 5.5rem; height: 5.5rem; }
.visuel-episode img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.numero-seul { display: grid; place-items: center; background: var(--encre); color: var(--or); border-radius: 2px;
  font-size: 2.3rem; font-variant-numeric: oldstyle-nums; letter-spacing: -.02em; }
.carte-episode .meta { display: block; font: .74rem/1.3 var(--police); letter-spacing: .08em; text-transform: uppercase; color: var(--discret); }
.carte-episode strong { display: block; margin: .35rem 0 .35rem; font-size: 1.12rem; font-weight: 600; line-height: 1.3; color: var(--texte); }
.carte-episode a:hover strong { color: var(--or); }
.carte-episode .resume { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .93rem; line-height: 1.5; color: var(--discret); }
/* En sombre, la tuile du numéro se détache un peu du fond (sinon noir sur noir). */
:root[data-theme="sombre"] .numero-seul { background: var(--atlas-nuit-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--or) 30%, transparent); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .numero-seul { background: var(--atlas-nuit-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--or) 30%, transparent); } }
.carte-episode.perdu a { opacity: .55; }
.carte-episode.perdu .numero-seul { background: var(--filet); color: var(--discret); }
.pastille-perdu { padding: .05rem .4rem; border: 1px solid currentColor; border-radius: 999px; font-size: .68rem; letter-spacing: .04em; }
.episode h1 .numero { color: var(--discret); font-weight: 400; }
article.episode { border-top: 0; padding-top: 0; }
.episode > .meta { font-size: .9rem; color: var(--discret); }
.image-episode { margin: 0 0 1.25rem; }
.image-episode img { display: block; width: 100%; max-height: 28rem; object-fit: cover; border-radius: 10px; }
.jaquette-episode { margin: 0 0 1rem; }
.jaquette-episode img { width: 12.5rem; height: 12.5rem; border-radius: 8px; object-fit: cover; box-shadow: 0 6px 24px rgb(0 0 0 / .18); }
.lecteur-podcast { margin: 1rem 0 1.5rem; --plyr-color-main: var(--texte); --plyr-audio-controls-background: var(--fond);
  --plyr-audio-control-color: var(--texte); --plyr-font-family: var(--police); border: 1px solid var(--filet); border-radius: 10px; overflow: hidden; }
.lecteur-podcast audio { width: 100%; }
.lecteur-podcast .telecharger { margin: 0; padding: .4rem .9rem .55rem; font: .8rem var(--police); }
.sommaire { margin: 1.5rem 0; padding: .75rem 1rem; border-left: 3px solid var(--filet); }
.sommaire summary { margin-bottom: .4rem; }
.sommaire ol { margin: 0; padding-left: 1.2rem; font-size: .95rem; }
main .sommaire li { padding: .1rem 0; border: 0; }
.transcription h2 { font-size: 1.15rem; margin: 2.25rem 0 .6rem; scroll-margin-top: 1rem; }
.presentation-episode { margin: 1rem 0 1.5rem; }
.transcription-repli { margin: 2rem 0; border-top: 1px solid var(--filet); padding-top: 1rem; }
.transcription-repli > summary { display: inline-block; padding: .5rem 1rem; border: 1px solid var(--texte); border-radius: 6px;
  color: var(--texte); font-weight: 600; cursor: pointer; list-style: none; }
.transcription-repli > summary::-webkit-details-marker { display: none; }
.transcription-repli > summary::before { content: "▸ "; }
.transcription-repli[open] > summary::before { content: "▾ "; }
.avis-ia { margin: 1rem 0; padding: .6rem .9rem; border: 1px solid color-mix(in srgb, var(--texte) 22%, transparent); background: color-mix(in srgb, var(--filet) 55%, transparent); font-size: .9rem; }
nav.sommaire { display: block; border: 0; }
nav.sommaire p { margin: 0 0 .3rem; font-weight: 600; }
.notes-episode { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--filet); font-size: .95rem; }
.notes-episode h2 { font-size: 1rem; }
main .notes-episode li { padding: .25rem 0; border: 0; }
.episodes-voisins { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem;
  border-top: 1px solid var(--filet); font: .9rem/1.4 var(--police); }
.episodes-voisins a[rel=next] { margin-left: auto; text-align: right; }
@media print { .lecteur-podcast, .episodes-voisins, .sommaire { display: none; } }

/* 15 quater. GRAPHIQUES DES ARTICLES (images SVG faites dans le CMS avec d3) */
figure.graphique-d3 { margin: 1.75rem 0; }
figure.graphique-d3 img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--filet); }
figure.graphique-d3 figcaption { margin-top: .4rem; color: var(--discret); font-size: .85rem; }

/* 15 quinquies. MES CLASSES (lycées, classes, invitations) */
.page-classes { max-width: none; }                    /* toute la largeur disponible */
.bloc-classes { margin: 1.5rem 0 2rem; padding-top: .5rem; border-top: 1px solid var(--filet); }
.bloc-classes h2 { margin-bottom: .4rem; }
.discret { color: var(--discret); font-size: .92em; }
.liste-classes { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .4rem; }
.liste-classes.cliquable button { width: 100%; text-align: left; font: inherit; padding: .55rem .8rem; border: 1px solid var(--filet);
  border-radius: 6px; background: transparent; color: var(--texte); cursor: pointer; }
.liste-classes.cliquable button:hover, .liste-classes.cliquable button[aria-current] { border-color: var(--texte); background: var(--filet); }
.page-classes .formulaire.en-ligne, .page-classes .en-ligne { max-width: none; display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.page-classes .formulaire.en-ligne label { flex: 1 1 12rem; margin: 0; }
.page-classes .formulaire.en-ligne button { flex: 0 0 auto; }
.page-classes fieldset { border: 1px solid var(--filet); border-radius: 6px; margin: .6rem 0; }
.page-classes label.case { display: block; font-weight: normal; }
.page-classes .boutons { display: flex; flex-wrap: wrap; gap: .6rem; }
.page-classes button.danger { border-color: var(--alerte); color: var(--alerte); background: transparent; }
.page-classes button.petit { font-size: .85rem; padding: .2rem .55rem; }
/* La fiche d'une classe : sans cadre, à onglets (classes.js). */
.fiche-classe { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--filet); }
.fiche-classe > header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.fiche-classe h3 { margin: 0; font-size: 1.5rem; }
.fiche-classe h4 { margin: 1.4rem 0 .4rem; }
.onglets-classe { display: flex; flex-wrap: wrap; gap: .2rem; margin: .9rem 0 1rem; border-bottom: 1px solid var(--filet); }
.onglets-classe button { font: inherit; padding: .45rem .9rem; border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--discret); cursor: pointer; margin-bottom: -1px; }
.onglets-classe button:hover { color: var(--texte); }
.onglets-classe button[aria-selected="true"] { color: var(--texte); border-bottom-color: var(--atlas-or, currentColor); font-weight: 600; }
.panneau-classe[hidden] { display: none; }
.tableau-eleves.editable input { width: 100%; min-width: 7rem; font: inherit; padding: .3rem .4rem; border: 1px solid transparent;
  border-radius: 4px; background: transparent; color: var(--texte); }
.tableau-eleves.editable input:hover { border-color: var(--filet); }
.tableau-eleves.editable input:focus { border-color: var(--texte); outline: none; background: var(--fond); }
.tableau-eleves.editable input[type=email] { min-width: 13rem; }
.tableau-notes { border-collapse: collapse; }
.tableau-notes th, .tableau-notes td { padding: .35rem .5rem; border-bottom: 1px solid var(--filet); text-align: center; vertical-align: middle; }
.tableau-notes th[scope=row] { text-align: left; white-space: nowrap; font-weight: 500; }
.tableau-notes thead th { font-size: .85rem; font-weight: 600; max-width: 9rem; }
.tableau-notes input.note { width: 4.2rem; text-align: center; font: inherit; font-variant-numeric: tabular-nums; padding: .25rem; border: 1px solid var(--filet); border-radius: 4px; background: var(--fond); color: var(--texte); }
.tableau-notes input.note.enregistre { border-color: var(--atlas-or, #c9a24a); }
.tableau-notes .moyenne { font-weight: 600; font-variant-numeric: tabular-nums; }
.code-classe { margin: 1rem 0; padding: .8rem 1rem; background: var(--filet); border-radius: 6px; }

/* 15 sexies. COURRIER (boîte contact@ dans l'intranet) */
.page-courrier { max-width: 64rem; }
.courrier-barre, .courrier-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin: .5rem 0; }
.courrier-barre .dossier { flex: 0 1 16rem; margin: 0; }
.courrier-barre .recherche { flex: 1 1 16rem; display: flex; gap: .4rem; margin: 0; }
.courrier-barre .recherche input { flex: 1; min-width: 0; }
.courrier-actions .deplacer { margin: 0; font-weight: 400; }
.page-courrier select, .page-courrier input[type=search] { font: inherit; padding: .45rem .5rem; border: 1px solid var(--discret);
  border-radius: 6px; background: var(--fond); color: var(--texte); max-width: 100%; }
.page-courrier button:not(.principal):not(.lien) { background: transparent; color: var(--texte); border-color: var(--discret); }
.page-courrier button:disabled { opacity: .45; cursor: default; }
.page-courrier .courrier-actions button.danger { border-color: var(--alerte); color: var(--alerte); background: transparent; }
.adresse-boite { margin: 0 0 .8rem; }
.courrier-liste { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--filet); }
.courrier-liste li { border-bottom: 1px solid var(--filet); }
.courrier-liste a { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr auto; gap: .2rem 1rem; padding: .55rem .4rem;
  color: var(--texte); text-decoration: none; }
.courrier-liste a:hover, .courrier-liste a:focus-visible { background: var(--filet); }
.courrier-liste .qui, .courrier-liste .objet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.courrier-liste time { color: var(--discret); font-size: .9em; white-space: nowrap; }
.courrier-liste li.non-lu .qui, .courrier-liste li.non-lu .objet { font-weight: 700; }
.courrier-liste li.non-lu a { box-shadow: inset 3px 0 0 var(--lien); }
.courrier-liste .drapeau { color: var(--alerte); }
@media (max-width: 40rem) {
  .courrier-liste a { grid-template-columns: 1fr auto; }
  .courrier-liste .objet { grid-column: 1 / -1; grid-row: 2; }
}
.pagination { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 1rem 0; }
.courrier-message h2 { margin: 1rem 0 .5rem; overflow-wrap: anywhere; }
.courrier-message .entetes { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; margin: 0 0 1rem; font-size: .92rem; }
.courrier-message .entetes dt { color: var(--discret); }
.courrier-message .entetes dd { margin: 0; overflow-wrap: anywhere; }
.courrier-message .pieces { list-style: none; padding: .5rem .8rem; margin: 0 0 1rem; background: var(--filet); border-radius: 6px;
  display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.courrier-message .note-images { margin: 0 0 .4rem; font-size: .85rem; }
.courrier-message iframe.corps-html { width: 100%; min-height: 12rem; border: 1px solid var(--filet); border-radius: 6px; background: #fff; display: block; }
.courrier-message .corps-texte { white-space: pre-wrap; overflow-wrap: anywhere; font: .95rem/1.5 ui-monospace, Menlo, monospace;
  padding: .8rem 1rem; border: 1px solid var(--filet); border-radius: 6px; margin: 0; }
.courrier-redaction { max-width: none; }
.courrier-redaction textarea { font: .95rem/1.5 ui-monospace, Menlo, monospace; width: 100%; padding: .6rem .7rem;
  border: 1px solid var(--filet); border-radius: 6px; background: var(--fond); color: var(--texte); }
.courrier-redaction h2 { margin: .5rem 0 0; }
.courrier-redaction details { margin: -.4rem 0 0; }
.courrier-onglets { display: flex; flex-wrap: wrap; gap: .25rem; margin: .5rem 0 1rem; border-bottom: 1px solid var(--filet); }
.courrier-onglets button { background: transparent; color: var(--texte); border: 0; border-bottom: 3px solid transparent;
  border-radius: 0; padding: .45rem .8rem; font: 600 .95rem var(--police); cursor: pointer; }
.courrier-onglets button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.courrier-redaction label.adresses { position: relative; }
.suggestions { list-style: none; margin: .1rem 0 0; padding: .2rem 0; position: absolute; z-index: 5; left: 0; right: 0;
  background: var(--fond); border: 1px solid var(--discret); border-radius: 6px; box-shadow: 0 4px 16px rgb(0 0 0 / .15);
  max-height: 16rem; overflow-y: auto; font-weight: 400; }
main .suggestions li { padding: .35rem .7rem; cursor: pointer; border: 0; }
.suggestions li:hover { background: var(--filet); }
.courrier-redaction .programmer { margin: 0; }
.etiquettes { line-height: 1.9; }
.etiquette { display: inline-block; margin: 0 .3rem .1rem 0; padding: .05rem .45rem; border: 1px solid var(--filet); border-radius: 999px;
  font-size: .78rem; white-space: nowrap; }
.etiquette.compte, .etiquette.abonne-confirme, .etiquette.envoi-envoye { border-color: var(--accent); color: var(--accent); }
.etiquette.abonne-desinscrit, .etiquette.envoi-annule { color: var(--discret); }
.etiquette.envoi-echec { border-color: var(--alerte); color: var(--alerte); }
.etiquette.envoi-en_cours, .etiquette.envoi-programme { border-style: dashed; }
.erreur-texte { color: var(--alerte); cursor: pointer; font-size: .85rem; }
.ligne-inviter { display: flex; gap: .4rem; max-width: 36rem; margin: 0 0 1rem; }
.ligne-inviter input { flex: 1; min-width: 0; font: inherit; padding: .45rem .5rem; border: 1px solid var(--discret); border-radius: 6px;
  background: var(--fond); color: var(--texte); }
.code-classe span { display: block; font-size: .85rem; color: var(--discret); }
.code-classe strong { font-family: ui-monospace, Menlo, monospace; font-size: 1.6rem; letter-spacing: .12em; margin-right: 1rem; }
.code-classe p { margin: .4rem 0 0; }
.membres { margin: .3rem 0; }
.table-defile { overflow-x: auto; }
.tableau-eleves { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tableau-eleves th, .tableau-eleves td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--filet); vertical-align: top; }
.tableau-eleves td.actions { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; }
.resultat-invitation code { word-break: break-all; }

/* 16. LIENS ENTRE ARTICLES ET CARTE DES IDÉES (/articles/carte) */
.corps a.lien-interne { text-decoration-style: dotted; }
.lien-absent { color: var(--discret); border-bottom: 1px dashed var(--discret); cursor: help; }
section.liens { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--filet);
                display: grid; gap: 0 2rem; }
section.liens h2 { margin: 0 0 .25rem; color: var(--discret); font: 600 .75rem/1.4 var(--police);
                   text-transform: uppercase; letter-spacing: .06em; }
section.liens li { padding: .3rem 0; }
section.liens p { grid-column: 1 / -1; margin: .75rem 0 0; font: .9rem var(--police); }
@media (min-width: 40rem) { section.liens:has(> div + div) { grid-template-columns: 1fr 1fr; } }

body:has(.pleine-largeur) { overflow-x: clip; }
.pleine-largeur { width: min(72rem, var(--dispo)); margin-left: calc((100% - min(72rem, var(--dispo))) / 2); }
/* La carte, façon Obsidian : toile plein cadre, recherche en haut à gauche,
   réglages (roue) en haut à droite, zoom en bas à droite. Interface en sans-serif. */
.carte { --verre: var(--fond); position: relative; height: min(66vh, 52rem); border: 1px solid var(--filet);
         border-radius: 12px; overflow: hidden; touch-action: none; background: var(--fond);
         background-image: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--lien) 5%, transparent), transparent 70%);
         font: .82rem/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
@supports (background: color-mix(in srgb, red 50%, blue)) { .carte { --verre: color-mix(in srgb, var(--fond) 86%, transparent); } }
.carte canvas { display: block; cursor: grab; }
.carte canvas.saisi { cursor: grabbing; }
.carte [hidden] { display: none !important; }
.carte-vide { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--discret); }
.carte-vide[hidden] { display: none; }
/* Bulle de survol */
.carte-bulle { position: absolute; z-index: 3; max-width: 260px; padding: .55rem .75rem; pointer-events: none;
               background: var(--verre); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
               border: 1px solid var(--filet); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .14); }
.carte-bulle strong { display: block; margin-bottom: .15rem; }
.carte-bulle span { display: block; color: var(--discret); }
.carte-bulle .rubrique { display: flex; align-items: center; gap: .35rem; font-size: .75rem; margin-bottom: .2rem; }
.carte-bulle .rubrique i { width: .55rem; height: .55rem; border-radius: 50%; flex: none; }
.carte-bulle small { display: block; margin-top: .35rem; font: .7rem system-ui, sans-serif; color: var(--discret); opacity: .8; }
/* Recherche et état (graphe local) */
.carte-chercher { position: absolute; top: .6rem; left: .6rem; z-index: 2; width: min(19rem, calc(100% - 4.2rem)); }
.carte-loupe { position: absolute; z-index: 1; left: .8rem; top: 0; height: 2.6rem; display: flex; align-items: center; pointer-events: none; color: var(--discret); }
.carte-loupe svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.carte-chercher input { width: 100%; height: 2.6rem; box-sizing: border-box; padding: .5rem .9rem .5rem 2.3rem; border: 1px solid color-mix(in srgb, var(--texte) 28%, transparent); border-radius: 999px;
  background: var(--verre); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--texte);
  font: inherit; box-shadow: 0 2px 10px rgb(0 0 0 / .06); }
.carte-chercher input:focus { outline: 2px solid var(--lien); outline-offset: 1px; }
.carte-trouves, .carte-etat { margin: .35rem 0 0; padding: .3rem .65rem; border-radius: 8px; background: var(--verre);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--discret); font-size: .75rem; width: fit-content; max-width: 100%; }
.carte-etat { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; border: 1px solid var(--filet); color: var(--texte); }
.carte-etat button.lien { padding: 0; border: 0; background: none; color: var(--lien); font: inherit; cursor: pointer; text-decoration: underline; }
/* Boutons ronds */
.carte-bouton { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0; border: 1px solid var(--filet);
  border-radius: 9px; background: var(--verre); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--texte); cursor: pointer; box-shadow: 0 2px 8px rgb(0 0 0 / .07); transition: background .15s, transform .1s; }
.carte-bouton:hover { background: var(--fond); }
.carte-bouton:active { transform: scale(.94); }
.carte-bouton svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.carte-bouton.petit { width: 1.6rem; height: 1.6rem; border-color: transparent; background: none; box-shadow: none; }
.carte-bouton.petit svg { width: .85rem; height: .85rem; }
.carte-boutons { position: absolute; right: .6rem; bottom: .6rem; z-index: 2; display: flex; flex-direction: column; gap: .35rem; }
.carte-bouton-reglages { position: absolute; top: .6rem; right: .6rem; z-index: 2; }
.carte-bouton-reglages[aria-expanded="true"] { background: var(--texte); color: var(--fond); border-color: var(--texte); }
/* Panneau de réglages */
.carte-panneau { position: absolute; top: 3.2rem; right: .6rem; z-index: 2; width: 17.5rem; max-height: calc(100% - 3.8rem);
  overflow: auto; overscroll-behavior: contain; background: var(--verre); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--filet); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / .16); color: var(--texte); }
.carte-panneau-tete { display: flex; align-items: center; justify-content: space-between; padding: .45rem .5rem .35rem .85rem;
  border-bottom: 1px solid var(--filet); }
.carte-section { padding: 0 .85rem; border-bottom: 1px solid var(--filet); }
.carte-section > summary { display: flex; align-items: center; gap: .45rem; margin: 0; padding: .55rem 0; list-style: none;
  color: var(--texte); font: 600 .8rem system-ui, sans-serif; cursor: pointer; user-select: none; }
.carte-section > summary::-webkit-details-marker { display: none; }
.carte-section > summary::before { content: ""; width: .4rem; height: .4rem; border: solid var(--discret); border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg); transition: transform .15s; }
.carte-section[open] > summary::before { transform: rotate(45deg) translate(-1px, -1px); }
.carte-section[open] { padding-bottom: .5rem; }
.carte-reglage { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .32rem 0; cursor: pointer; }
.carte-reglage.curseur { flex-direction: column; align-items: stretch; gap: .2rem; }
.carte-reglage.curseur > span { display: flex; justify-content: space-between; }
.carte-reglage output { color: var(--discret); font-variant-numeric: tabular-nums; }
.carte-reglage input[type=range] { width: 100%; min-height: 1.75rem; margin: 0; accent-color: var(--lien); }   /* 28 px : cible tactile */
.carte-aide { margin: .1rem 0 .35rem; color: var(--discret); font-size: .75rem; line-height: 1.35; }
.carte-aide code { font-size: .72rem; }
/* Interrupteurs, comme ceux d'Obsidian */
input.interrupteur { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 2.1rem; height: 1.2rem; margin: 0;
  border-radius: 999px; background: var(--filet); cursor: pointer; transition: background .18s; }
input.interrupteur::before { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.2rem - 4px); height: calc(1.2rem - 4px);
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .18s; }
input.interrupteur:checked { background: var(--lien); }
input.interrupteur:checked::before { transform: translateX(.9rem); }
input.interrupteur:disabled { opacity: .4; cursor: not-allowed; }
.carte-action { width: 100%; margin-top: .4rem; padding: .4rem .6rem; border: 1px solid var(--filet); border-radius: 8px;
  background: var(--fond); color: var(--texte); font: 600 .78rem system-ui, sans-serif; cursor: pointer; }
.carte-action:hover { border-color: var(--lien); color: var(--lien); }
.carte-groupe { display: flex; align-items: center; gap: .35rem; padding: .2rem 0; }
.carte-groupe input[type=text] { flex: 1; min-width: 0; padding: .3rem .5rem; border: 1px solid var(--filet); border-radius: 6px;
  background: var(--fond); color: var(--texte); font: inherit; }
.carte-groupe input[type=color] { flex: none; width: 1.5rem; height: 1.5rem; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.carte-groupe input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.carte-groupe input[type=color]::-webkit-color-swatch { border: 1px solid var(--filet); border-radius: 50%; }
.carte-groupe input[type=color]::-moz-color-swatch { border: 1px solid var(--filet); border-radius: 50%; }
.carte-panneau-pied { padding: .55rem .85rem .7rem; }
.carte-panneau-pied button.lien { padding: 0; border: 0; background: none; color: var(--discret); font: .75rem system-ui, sans-serif;
  cursor: pointer; text-decoration: underline; }
.carte-panneau .bascule-vue { margin: 0; }
@media (max-width: 40rem) {
  .carte-panneau { left: .6rem; width: auto; }
}
/* Légende = filtre des rubriques */
main ul.carte-legende { display: flex; flex-wrap: wrap; gap: .35rem .45rem; margin: .8rem 0 0; padding: 0;
                        font: .78rem system-ui, sans-serif; color: var(--discret); }
main ul.carte-legende li { padding: 0; border: 0; }
.carte-legende button { display: inline-flex; align-items: center; padding: .22rem .6rem; border: 1px solid var(--filet); border-radius: 999px;
  background: var(--fond); color: var(--texte); font: inherit; cursor: pointer; transition: opacity .15s, border-color .15s; }
.carte-legende button:hover { border-color: var(--discret); }
.carte-legende button.eteinte { opacity: .4; }
.carte-legende button[aria-pressed="true"] { border-color: var(--texte); box-shadow: inset 0 0 0 1px var(--texte); font-weight: 600; }
.carte-legende button.tout { border-style: dashed; color: var(--lien); }
.carte-legende .pastille { display: inline-block; width: .65rem; height: .65rem; margin-right: .4rem;
                           border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.carte-liste { margin-top: 1.5rem; }
.bascule-vue { display: inline-flex; border: 1px solid var(--filet); border-radius: 8px; overflow: hidden; }
.bascule-vue button { padding: .25rem .7rem; border: 0; background: var(--fond); color: var(--texte); font: 600 .75rem system-ui, sans-serif; cursor: pointer; }
.bascule-vue button[aria-pressed="true"] { background: var(--texte); color: var(--fond); }
.carte-3d { position: absolute; inset: 0; }
.carte.chargement::after { content: "Chargement de la vue 3D…"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--discret); }
.carte-bulle-3d { max-width: 260px; padding: .45rem .65rem; border-radius: 8px; background: rgb(20 20 20 / .88); color: #fff;
  font: .8rem/1.4 system-ui, sans-serif; text-align: left; }
.carte-bulle-3d strong { display: block; }
.carte-bulle-3d span { opacity: .8; }
@media (min-width: 60rem) { .carte { height: min(78vh, 54rem); } }
/* Plein écran : la carte occupe tout ; la légende dessous. */
.carte-cadre:fullscreen, .carte-cadre.plein-ecran { display: flex; flex-direction: column; padding: .75rem 1rem;
  background: var(--fond); color: var(--texte); overflow: auto; }
.carte-cadre.plein-ecran { position: fixed; inset: 0; z-index: 1000; }
.carte-cadre:fullscreen .carte, .carte-cadre.plein-ecran .carte { flex: 1 1 auto; min-height: 50vh; height: auto; width: 100%; margin-left: 0; }
body.carte-en-plein-ecran { overflow: hidden; }

/* 17. NOTES DE BAS DE PAGE — appel numéroté dans le texte, liste « Notes » en
   fin d'article (lien ↩ pour revenir). Sur un très grand écran, chaque note
   apparaît en plus dans la marge droite, en face de son appel (à la manière
   des « notes latérales » des livres d'Edward Tufte). */
sup.appel-note { line-height: 0; margin-left: .05em; font: 600 .72em var(--police); }
sup.appel-note a { padding: 0 .1em; text-decoration: none; }
.note-marge { display: none; }
section.notes { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--filet);
                font-size: .92rem; line-height: 1.55; }
section.notes h2 { margin: 0 0 .5rem; color: var(--discret); font: 600 .75rem/1.4 var(--police);
                   text-transform: uppercase; letter-spacing: .06em; }
section.notes ol { margin: 0; padding-left: 1.6rem; }
main section.notes li { padding: .2rem 0; border: 0; }
section.notes li::marker { color: var(--discret); font: .85em var(--police); }
section.notes a[role=doc-backlink] { text-decoration: none; }
section.notes li:target, sup.appel-note a:target {
  background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 3px; }
/* 18. SONDAGES — formulaire de vote, puis résultats (camembert ou
   histogramme dessinés par /js/sondages.js ; sans script, des barres CSS). */
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden;
                      clip-path: inset(50%); white-space: nowrap; }
section.sondage { margin: 2rem 0; padding: 1.25rem 1.4rem; border: 1px solid var(--filet); border-radius: 10px;
                  background: color-mix(in srgb, var(--filet) 22%, var(--fond)); }
.sondage-seul section.sondage { margin-top: 0; }
.sondage-etiquette { margin: 0; color: var(--accent); font: 600 .72rem/1.4 var(--police);
                     text-transform: uppercase; letter-spacing: .08em; }
.corps h2.sondage-titre, h2.sondage-titre { margin: .25rem 0 .5rem; font-size: 1.3rem; }
.sondage-question { margin: 0 0 .5rem; font-weight: 600; }
.sondage-explication { margin: 0 0 .75rem; color: var(--discret); }
.sondage-message { padding: .5rem .75rem; border: 1px solid color-mix(in srgb, var(--texte) 22%, transparent); background: color-mix(in srgb, var(--filet) 55%, transparent); }
.sondage-statut { color: var(--discret); font: .9rem var(--police); }
.sondage-attente { color: var(--discret); font-style: italic; }
form.sondage-vote fieldset { margin: .5rem 0 1rem; padding: 0; border: 0; }
form.sondage-vote legend { padding: 0; margin-bottom: .5rem; font-weight: 600; }
form.sondage-vote label { display: flex; align-items: flex-start; gap: .6rem; margin: .3rem 0; padding: .55rem .75rem;
                          border: 1px solid var(--filet); border-radius: 8px; background: var(--fond); cursor: pointer; }
form.sondage-vote label:hover { border-color: var(--accent); }
form.sondage-vote label:has(input:checked) { border-color: var(--accent);
                          background: color-mix(in srgb, var(--accent) 8%, var(--fond)); }
form.sondage-vote input { margin-top: .35rem; accent-color: var(--accent); }
form.sondage-vote button { padding: .55rem 1.2rem; border: 1px solid var(--accent); border-radius: 6px;
                           background: var(--accent); color: var(--fond); font: 600 .95rem var(--police); cursor: pointer; }
form.sondage-vote button:disabled { opacity: .6; cursor: wait; }
/* Résultats sans script : un tableau à barres. */
.sondage-table { width: 100%; border-collapse: collapse; font: .9rem/1.4 var(--police); }
.sondage-table caption { text-align: left; color: var(--discret); padding-bottom: .4rem; }
.sondage-table th, .sondage-table td { padding: .35rem .4rem; border-bottom: 1px solid var(--filet); text-align: left; }
.sondage-table thead th { color: var(--discret); font-weight: 500; }
.sondage-table th[scope=row] { font-weight: 400; }
.sondage-table tr.mien th { font-weight: 600; }
.sondage-barre { width: 40%; }
.sondage-barre span { display: block; height: .7rem; min-width: 2px; border-radius: 3px; background: var(--accent); }
/* Résultats dessinés par d3 */
.sondage-graphique { margin-top: .5rem; }
.sondage-camembert { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.sondage-camembert svg { flex: none; max-width: 100%; height: auto; }
.sondage-camembert .part { cursor: default; transition: transform .2s, opacity .2s; }
main ul.sondage-legende { flex: 1 1 14rem; margin: 0; font: .9rem/1.4 var(--police); }
main ul.sondage-legende li { display: grid; grid-template-columns: .8rem 1fr auto; align-items: baseline; gap: .6rem;
                             padding: .35rem .4rem; border: 0; border-radius: 6px; }
ul.sondage-legende li.eclaire { background: var(--filet); }
ul.sondage-legende li.mien .libelle { font-weight: 600; }
ul.sondage-legende .pastille { width: .8rem; height: .8rem; border-radius: 3px; align-self: center; }
ul.sondage-legende .chiffres { color: var(--discret); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sondage-histogramme { display: block; overflow: visible; }
.sondage-total { margin: .75rem 0 0; color: var(--discret); font: .85rem var(--police); }

/* 16 ter. ACCUEIL = LA CARTE, VERSION « NUIT » (pages.page_carte(accueil=True)).
   Juste la carte : plein cadre à droite de la barre de navigation, fond noir,
   sans titre, légende, recherche ni réglages (carte.js les crée, on les masque).
   Sur téléphone (barre en haut), la carte occupe la largeur et presque tout
   l'écran sous la barre. */
.carte.carte-accueil { position: relative; width: 100vw; margin-left: calc(50% - 50vw); height: calc(100svh - 7rem);
  border: 0; border-radius: 0; background: #000; background-image: none; }
.carte-accueil .carte-panneau, .carte-accueil .carte-bouton-reglages,
.carte-accueil .carte-boutons { display: none !important; }
/* Recherche de l'accueil : discrète (petite, presque transparente, gris clair sur
   noir), elle s'affirme au survol et quand on tape. Même fonctionnement que sur
   l'onglet Carte : la galaxie ne garde que les articles qui mentionnent le mot. */
/* Recherche de l'accueil : bien visible (fond, bord clair, loupe dorée), plus franche au survol et en saisie. */
.carte-accueil .carte-chercher { top: 1rem; left: 1rem; width: min(22rem, calc(100% - 2rem)); }
.carte-accueil .carte-loupe { color: #f5c518; }
.carte-accueil .carte-chercher input { border: 1px solid rgb(255 255 255 / .32); background: rgb(22 22 22 / .82);
  color: #f3f1ea; box-shadow: 0 6px 24px rgb(0 0 0 / .5), inset 0 0 0 1px rgb(255 255 255 / .04);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: .92rem; transition: border-color .2s, box-shadow .2s; }
.carte-accueil .carte-chercher input:hover { border-color: rgb(255 255 255 / .5); }
.carte-accueil .carte-chercher input::placeholder { color: rgb(243 241 234 / .7); }
.carte-accueil .carte-chercher input:focus { outline: 0; border-color: #f5c518; box-shadow: 0 0 0 3px rgb(245 197 24 / .22), 0 6px 24px rgb(0 0 0 / .5); }
.carte-accueil .carte-trouves { background: rgb(255 255 255 / .06); color: rgb(243 241 234 / .75);
  -webkit-backdrop-filter: none; backdrop-filter: none; }
.carte-accueil .carte-etat { display: none !important; }
/* Colonne « Thèmes » de l'accueil (carte.js, colonneThemes) : bouton enrouleur
   discret en haut à droite ; déroulée, une colonne de petits boutons. */
.themes-nuit { position: absolute; top: 1rem; right: 1rem; z-index: 2; max-height: calc(100% - 2rem); display: flex;
  flex-direction: column; align-items: flex-end; font: .78rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  opacity: .6; transition: opacity .2s; }
.themes-nuit:hover, .themes-nuit[open], .themes-nuit:focus-within { opacity: 1; }
.themes-nuit > summary { list-style: none; cursor: pointer; padding: .35rem .75rem; margin: 0; border: 1px solid rgb(255 255 255 / .18);
  border-radius: 999px; background: rgb(255 255 255 / .06); color: #f3f1ea; user-select: none; }
.themes-nuit > summary::-webkit-details-marker { display: none; }
.themes-nuit > summary::after { content: " ▾"; color: rgb(243 241 234 / .6); }
.themes-nuit[open] > summary::after { content: " ▴"; }
.themes-nuit-liste { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; margin-top: .4rem;
  overflow-y: auto; padding-right: .1rem; }
.themes-nuit-liste button { padding: .15rem .55rem; border: 0; border-radius: 999px; background: transparent;
  color: rgb(243 241 234 / .7); font: inherit; cursor: pointer; text-align: right; }
.themes-nuit-liste button:hover { color: #fff; background: rgb(255 255 255 / .06); }
.themes-nuit-liste button[aria-pressed="true"] { color: #f5c518; }
.themes-nuit-liste button[aria-pressed="true"]::before { content: "● "; font-size: .7em; vertical-align: .1em; }
.themes-nuit-liste button.tous { margin-top: .3rem; color: rgb(243 241 234 / .5); text-decoration: underline; }
/* Invite « Appuyer sur Entrée pour y aller » (carte.js, majInvite) : discrète,
   en bas à gauche, tant qu'un point est choisi. Claire sur l'onglet Carte,
   sombre sur la galaxie de l'accueil. */
.carte-entree { position: absolute; left: 1rem; bottom: 1rem; z-index: 2; padding: .35rem .7rem; border-radius: 6px;
  border: 1px solid var(--filet, #ddd); background: var(--fond, #fff); color: var(--discret, #666);
  font: .75rem/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; pointer-events: none; opacity: .9; }
.carte-entree[hidden] { display: none; }
.carte-entree kbd { padding: 0 .3rem; border: 1px solid currentColor; border-radius: 3px; font: inherit; }
.carte-accueil .carte-entree { background: rgb(18 18 18 / .85); border-color: rgb(255 255 255 / .15); color: rgb(243 241 234 / .75); }
.carte-accueil .carte-entree kbd { color: #f5c518; }
/* Sur l'accueil, le curseur d'écartement est déjà en bas : l'invite monte au-dessus à gauche. */
.carte-accueil .carte-entree { bottom: 3.4rem; }
/* Bandeau « Écartement » de l'accueil (carte.js, bandeauEcart) : un fin
   curseur en bas au centre, presque effacé tant qu'on ne le survole pas. */
.ecart-nuit { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 2; display: flex;
  align-items: center; gap: .5rem; padding: .3rem .8rem; border: 1px solid rgb(255 255 255 / .12); border-radius: 999px;
  background: rgb(255 255 255 / .04); color: rgb(243 241 234 / .6); font: .7rem/1 system-ui, sans-serif; white-space: pre;
  opacity: .45; transition: opacity .2s; }
.ecart-nuit:hover, .ecart-nuit:focus-within { opacity: 1; }
.ecart-nuit input { width: min(12rem, 40vw); height: 1rem; margin: 0; accent-color: #f5c518; background: transparent; cursor: pointer; }
/* Téléphone : à gauche, pour laisser la place au sélecteur 2D / 3D à droite. */
@media (max-width: 36rem) { .ecart-nuit { left: 1rem; transform: none; } .ecart-nuit input { width: 34vw; } }
/* Sélecteur 2D / 3D de l'accueil : discret, en bas à droite (sur téléphone,
   la carte s'ouvre en 2D ; on peut passer en 3D d'un toucher). */
.outils-nuit { position: absolute; right: calc(1rem + 2.5rem + .6rem); bottom: 1rem; z-index: 2; display: flex; align-items: center; gap: .5rem;
  height: 2.5rem; }
.globale-nuit { display: inline-flex; align-items: center; gap: .4rem; height: 2rem; padding: 0 .8rem; border: 1px solid rgb(255 255 255 / .18);
  border-radius: 999px; background: rgb(255 255 255 / .06); color: rgb(243 241 234 / .75); opacity: .7; cursor: pointer;
  font: .75rem/1 system-ui, -apple-system, "Segoe UI", sans-serif; transition: opacity .2s, border-color .2s; }
.globale-nuit:hover, .globale-nuit:focus-visible { opacity: 1; border-color: #f5c518; color: #f3f1ea; }
.globale-nuit svg { width: .95rem; height: .95rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 36rem) { .globale-nuit span { display: none; } }
body:not(:has(#messagerie)) .outils-nuit { right: 1rem; }
/* La bulle de la messagerie (messagerie.js) se range au bout de ce groupe, à la même taille. */
body:has(.carte-accueil) #messagerie { --msg-droite: 1rem; --msg-bas: 1rem; --msg-taille: 2.5rem;
  --msg-fond: rgb(30 30 30 / .9); --msg-texte: #f3f1ea; --msg-bord: 1px solid rgb(255 255 255 / .22); }
.vue-nuit { display: flex; height: 2rem; gap: 0; opacity: .7;
  transition: opacity .2s; border: 1px solid rgb(255 255 255 / .18); border-radius: 999px; overflow: hidden;
  font: .75rem/1 system-ui, -apple-system, "Segoe UI", sans-serif; }
.vue-nuit:hover, .vue-nuit:focus-within { opacity: 1; }
.vue-nuit button { padding: .35rem .7rem; border: 0; background: rgb(255 255 255 / .06); color: rgb(243 241 234 / .7);
  font: inherit; cursor: pointer; }
.vue-nuit button[aria-pressed="true"] { color: #111; background: #f5c518; }
.themes-nuit-liste button[hidden] { display: none; }
.carte-accueil .carte-bulle { background: rgb(18 18 18 / .92); border-color: #333; color: #f3f1ea;
  -webkit-backdrop-filter: none; backdrop-filter: none; }
.carte-accueil .carte-bulle span, .carte-accueil .carte-bulle small { color: #b5b5b5; }
.carte-accueil .carte-vide { color: #8a8a8a; }
body:has(.carte-accueil) > footer, body:has(.carte-accueil) .carte-liste { display: none; }
/* Téléphone : la carte touche la barre du haut (plus de bande blanche de 60 px
   entre les deux) et descend jusqu'au bas de l'écran. La barre fait une ligne
   (≈ 4,1rem, voir « barre-mobile ») ; svh : la hauteur sans la barre d'adresse. */
@media (max-width: 59.99rem) {
  body:has(.carte-accueil) { padding-bottom: 0; }
  body:has(.carte-accueil) > header.barre-site { margin-bottom: 0; }
  body:has(.carte-accueil) > main { margin-top: 0; }
  .carte.carte-accueil { height: calc(100svh - 4.1rem); }
}
@media (min-width: 60rem) {
  .carte.carte-accueil { position: fixed; top: 0; right: 0; bottom: 0; left: var(--barre); width: auto; height: auto; margin: 0; }
}

/* Titres posés sur la carte 3D de l'accueil (carte.js, etiquettesNuit). */
.etiquettes-3d { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.etiquette-3d { position: absolute; left: 0; top: 0; white-space: nowrap; color: #f3f1ea;
  font: 500 12px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .01em;
  text-shadow: 0 0 3px #000, 0 0 6px #000, 0 1px 2px #000; will-change: transform; }
.etiquette-3d.theme { color: #f5c518; font-weight: 650; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.etiquette-3d.active { color: #fff; font-size: 14px; font-weight: 700; }
.etiquette-3d[hidden] { display: none; }
.carte-accueil .carte-bulle-3d { background: rgb(18 18 18 / .94); border: 1px solid #333; }
.carte-accueil.chargement::after { color: #8a8a8a; }

/* 16 bis. BARRE DE DROITE D'UN ARTICLE — informations annexes, imprimer, PDF,
   carte des liens, renvois repliés, partage. Sous le texte sur téléphone ; à
   droite, collante, sur grand écran (et les notes en marge gardent leur place). */
.annexes { margin-top: 2.5rem; padding: 1rem 1.1rem; border: 1px solid var(--filet); border-radius: 12px;
  font: .85rem/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--texte); }
.annexes dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: 0 0 1rem; }
.annexes dt { color: var(--discret); }
.annexes dd { margin: 0; text-align: right; }
.annexes time, .annexes small { font: inherit; color: inherit; }
.annexe-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.annexe-actions .annexe-bouton { min-width: 4.2rem; }   /* Imprimer, PDF, Word : à la ligne plutôt que coupés */
.annexe-bouton { flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: .35rem; padding: .45rem .6rem;
  border: 1px solid var(--filet); border-radius: 8px; background: var(--fond); color: var(--texte); font: 600 .8rem system-ui, sans-serif;
  text-decoration: none; cursor: pointer; }
.annexe-bouton[hidden] { display: none; }
.annexe-bouton:hover { border-color: var(--texte); text-decoration: none; }
.annexe-bouton[data-imprimer]::before { content: "⎙"; font-size: 1rem; line-height: 1; }
a.annexe-bouton[download]::before { content: "⇩"; }
.annexe-carte { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; padding: .65rem .8rem; border-radius: 10px;
  background: var(--texte); color: var(--fond); font-weight: 600; text-decoration: none; line-height: 1.3; }
.annexe-carte:hover { opacity: .9; text-decoration: none; }
.annexe-carte-icone { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: radial-gradient(circle at 30% 35%, currentColor 0 .14rem, transparent .16rem),
              radial-gradient(circle at 72% 30%, currentColor 0 .12rem, transparent .14rem),
              radial-gradient(circle at 55% 75%, currentColor 0 .17rem, transparent .19rem);
  box-shadow: inset 0 0 0 1.5px currentColor; opacity: .9; }
.annexe-liens { border-top: 1px solid var(--filet); }
.annexe-liens > summary { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: .55rem 0;
  color: var(--texte); font-weight: 600; list-style: none; cursor: pointer; }
.annexe-liens > summary::-webkit-details-marker { display: none; }
.annexe-liens > summary span { min-width: 1.6rem; padding: .05rem .45rem; border-radius: 999px; background: var(--filet);
  color: var(--texte); font-size: .75rem; text-align: center; }
.annexe-liens > summary::after { content: ""; width: .4rem; height: .4rem; margin-left: .5rem; border: solid var(--discret);
  border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .15s; }
.annexe-liens[open] > summary::after { transform: rotate(-135deg); }
.annexe-liens > summary span { margin-left: auto; }
main .annexe-liens ul { margin: 0 0 .6rem; padding: 0; list-style: none; max-height: 16rem; overflow: auto; }
main .annexe-liens li { padding: .25rem 0; border: 0; }
.annexe-partage { margin: .6rem 0 0; padding-top: .6rem; border-top: 1px solid var(--filet); }
.annexe-partage span { display: block; color: var(--discret); margin-bottom: .2rem; }
.annexe-partage a { margin-right: .6rem; }
/* Encadré « Bibliographie » de la barre de droite (pages.bloc_bibliographie) :
   notes au format MLA, numérotées, avec un léger fond pour le distinguer. */
.annexe-biblio { margin: 0 0 .9rem; padding: .7rem .8rem .6rem; border: 1px solid var(--filet); border-radius: 10px;
  background: color-mix(in srgb, var(--texte) 3%, var(--fond)); }
.annexe-biblio h2 { margin: 0 0 .45rem; font: 600 .72rem/1.3 system-ui, sans-serif; text-transform: uppercase;
  letter-spacing: .07em; color: var(--discret); }
main .annexe-biblio ol { margin: 0; padding-left: 1.2rem; }
main .annexe-biblio li { padding: 0 0 .45rem; border: 0; font: .8rem/1.45 var(--police); text-indent: 0; }
.annexe-biblio li em { font-style: italic; }
.annexe-biblio-note { margin: .2rem 0 0; font: .82rem/1.35 var(--police); color: var(--discret); }
/* Annexes déplacées dans la barre de droite (pages.sortir_annexes) : fils
   d'Ariane en tête, mentions de fin et lien de retour en bas. */
.annexe-chemins { margin: 0 0 .9rem; padding-bottom: .7rem; border-bottom: 1px solid var(--filet); }
.annexes .annexe-chemins p.fil { margin: 0 0 .35rem; padding: 0; border: 0; font: .78rem/1.45 system-ui, sans-serif; color: var(--discret); }
.annexes .annexe-chemins p.fil:last-child { margin-bottom: 0; }
.annexes .annexe-chemins a { color: var(--lien); }
.annexe-mentions { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--filet); }
.annexe-mentions p { margin: 0 0 .4rem; }
.annexe-mentions small { font: .78rem/1.45 system-ui, sans-serif; color: var(--discret); }
.annexe-retour { margin: .7rem 0 0; padding-top: .6rem; border-top: 1px solid var(--filet); font-size: .8rem; }
@media print { .annexes { display: none; } .article-cadre { display: block; } }
/* Barre de droite d'un épisode de podcast (podcasts_site._barre_episode) :
   références (liens) de l'épisode, contact, épisodes voisins. */
.annexe-references { margin: 0 0 .9rem; padding-top: .7rem; border-top: 1px solid var(--filet); }
.annexe-references h2 { margin: 0 0 .45rem; font: 600 .72rem/1.3 system-ui, sans-serif; text-transform: uppercase;
  letter-spacing: .07em; color: var(--discret); }
main .annexe-references ul { margin: 0; padding-left: 1rem; list-style: disc; }
main .annexe-references li { padding: 0 0 .4rem; border: 0; }
.annexe-references p { margin: 0 0 .4rem; }
.annexe-references a, .annexe-contact a { overflow-wrap: anywhere; }
.annexe-episodes { display: grid; gap: .5rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--filet); }
.annexe-episodes a { display: block; padding: .5rem .65rem; border: 1px solid var(--filet); border-radius: 8px; color: var(--texte); text-decoration: none; }
.annexe-episodes a:hover { border-color: var(--texte); }
.annexe-episodes a span { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--discret); }
.annexe-episodes a[rel=next] { text-align: right; }
.annexes-episode .annexe-actions .annexe-bouton::before { content: "⇩"; }


/* 19. BOUTON PDF d'un article (dans la ligne de date) */
a.lien-pdf { font: .85rem/1.4 var(--police); white-space: nowrap; }
a.lien-pdf::before { content: "⇩ "; }

@media (min-width: 134rem) {   /* assez de place entre le texte et la fiche (atlas : intervalles égaux) */
  body:has(> header) .note-marge { display: block; float: right; clear: right; position: relative;
    width: 14rem; margin: .2rem -16.5rem .6rem 0; color: var(--discret); font: .8rem/1.45 var(--police); }
  .note-marge > sup { margin-right: .2rem; color: var(--accent); font-weight: 600; }
}

/* 11. MOUVEMENT ET IMPRESSION — défilement doux vers les ancres, sauf si la
   personne a demandé moins d'animations ; à l'impression (utile pour le CV),
   ni navigation ni pied de page, encre noire sur papier blanc. */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print {
  header, nav, footer, .evitement, form.compte, .carte, a.lien-pdf { display: none; }
  body, body:has(> header) { max-width: none; padding: 0; --fond: #fff; --texte: #000; --accent: #000; }
}

/* 15 quater. COURS — page « Cours » (/pages/cours) : une vignette par thème. */
main ul.vignettes-cours { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
main ul.vignettes-cours li { padding: 0; border: 0; margin: 0; }
.vignette-cours { display: block; height: 100%; padding: .9rem 1rem; border: 1px solid var(--filet); border-radius: 10px;
  color: var(--texte); text-decoration: none; }
a.vignette-cours:hover { border-color: var(--texte); }
.vignette-cours .numero { display: block; font: .8rem var(--police); color: var(--discret); }
.vignette-cours strong { display: block; color: var(--titre); font-size: 1.15rem; margin: .1rem 0 .35rem; }
.vignette-cours .question { display: block; font-size: .92rem; line-height: 1.45; }
.vignette-cours.a-venir { border-style: dashed; color: var(--discret); }

/* 15 quinquies. COURS — bascule « Texte intégral / L’essentiel » (sans script :
   deux boutons radio et le sélecteur ~), et citations longues détachées. */
.bascule-cours > input { position: absolute; opacity: 0; pointer-events: none; }
.choix-version { display: flex; gap: .5rem; margin: 0 0 1.5rem; font: .95rem var(--police); }
.choix-version label { padding: .35rem .9rem; border: 1px solid var(--filet); border-radius: 999px; cursor: pointer;
  white-space: nowrap; }                    /* « Texte intégral » sur une ligne, même sur téléphone */
@media (max-width: 26rem) { .choix-version label { padding: .35rem .65rem; } }
#version-integrale:checked ~ .choix-version label[for="version-integrale"],
#version-essentielle:checked ~ .choix-version label[for="version-essentielle"] { border-color: var(--titre); color: var(--titre); font-weight: 600; }
.bascule-cours > input:focus-visible ~ .choix-version label { outline: 2px solid var(--titre); outline-offset: 2px; }
.version-essentielle { display: none; }
#version-essentielle:checked ~ .version-integrale { display: none; }
#version-essentielle:checked ~ .version-essentielle { display: block; }
blockquote.citation { margin: 1.2rem 0; padding: .7rem 1.1rem; border-left: 3px solid var(--titre);
  background: color-mix(in srgb, var(--titre) 5%, transparent); color: var(--texte); font-size: .95em; }
blockquote.citation p { margin: .3rem 0; }
blockquote.citation footer { margin-top: .4rem; font-size: .85em; font-variant: small-caps; color: var(--discret); }
/* Titre donné par Julien à un texte d'auteur (pas le titre de l'œuvre) : noir, gras,
   décalé vers la droite (en retrait par rapport à la marge du texte). */
blockquote.citation .titre-texte { margin: 0 0 .45rem 1.5rem; font-weight: 700; color: var(--texte); }
@media print { .choix-version, .version-essentielle { display: none !important; } .version-integrale { display: block !important; } }

/* Mes classes › Dictons : liste d'élèves et envoi du lien avec le code */
.dictons-classe { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--filet); }
.dictons-classe details { margin: .75rem 0; }
.dictons-classe textarea { width: 100%; font-family: ui-monospace, monospace; font-size: .85rem; }
.dictons-classe code { word-break: break-all; }
.pastille-etat { display: inline-block; padding: .05rem .5rem; border-radius: 1rem; font-size: .8rem; white-space: nowrap;
  border: 1px solid currentColor; }
.pastille-etat.ok { color: #1b7a3a; }
.pastille-etat.attente { color: #9a6500; }
.pastille-etat.ko { color: #a33; }

/* =============================================================================
   Page « Recherche » (pages.page_recherche) : champ, options, pastilles de
   thèmes avec leur nombre de résultats, résultats avec extrait surligné.
   ============================================================================= */
form.recherche { margin: 0 0 1.25rem; }
.recherche-ligne { display: flex; gap: .5rem; }
.recherche-ligne input { flex: 1; min-width: 0; font: inherit; padding: .6rem .8rem; border: 1px solid var(--discret);
  border-radius: 8px; background: var(--fond); color: var(--texte); }
.recherche-ligne input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.recherche-ligne button { font: inherit; padding: .6rem 1rem; border: 0; border-radius: 8px; background: var(--titre);
  color: var(--fond); cursor: pointer; }
.recherche-options { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .6rem; font-size: .9rem; color: var(--discret); }
.recherche-options select { font: inherit; margin-left: .3rem; padding: .2rem .35rem; border: 1px solid var(--discret);
  border-radius: 6px; background: var(--fond); color: var(--texte); }
.recherche-aide { margin: .5rem 0 0; font-size: .8rem; color: var(--discret); }
.recherche-aide code { font-size: .95em; padding: 0 .25rem; border-radius: 4px; background: color-mix(in srgb, var(--discret) 15%, transparent); }
.recherche-themes { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1rem; }
.recherche-themes a { padding: .2rem .65rem; border: 1px solid color-mix(in srgb, var(--discret) 45%, transparent); border-radius: 999px;
  font-size: .82rem; color: var(--texte); text-decoration: none; }
.recherche-themes a span { color: var(--discret); font-size: .9em; }
.recherche-themes a:hover { border-color: var(--accent); }
.recherche-themes a[aria-current] { background: var(--titre); border-color: var(--titre); color: var(--fond); }
.recherche-themes a[aria-current] span { color: inherit; opacity: .75; }
.recherche-compte, .recherche-vide { color: var(--discret); font-size: .9rem; }
article.resultat { padding: .2rem 0 .9rem; border-bottom: 1px solid color-mix(in srgb, var(--discret) 20%, transparent); }
article.resultat .extrait { margin: 0; font-size: .93rem; line-height: 1.55; color: var(--discret); }
article.resultat mark { background: color-mix(in srgb, #f5c518 45%, transparent); color: var(--texte); padding: 0 .1em; border-radius: 2px; }
@media (max-width: 36rem) { .recherche-ligne { flex-direction: column; } }

/* Recherche : la rangée des genres (Textes, Devoirs et corrigés, Repères du bac, Articles et cours), au-dessus des thèmes */
.recherche-genres { margin-bottom: .4rem; }
.recherche-genres a { font-weight: 600; }

/* Encadré d'un article (bouton « Encadré » de l'éditeur) : titre, fond légèrement grisé,
   contenu libre. Le gris suit le thème (clair ou sombre). */
.encadre { margin: 1.4rem 0; padding: .9rem 1.15rem; border-radius: 6px;
  background: color-mix(in srgb, var(--texte, #141414) 6%, var(--fond)); }
.encadre > :first-child { margin-top: 0; }
.encadre > :last-child { margin-bottom: 0; }
.encadre-titre { font-weight: 700; margin: 0 0 .5rem; }

/* Passage rédigé avec l'IA (bouton « IA » de l'éditeur) : texte en bleu sombre ;
   au survol, l'infobulle du navigateur (attribut title) dit « Paragraphe rédigé avec IA ». */
.redige-ia { color: var(--ia, #1e46c2); cursor: help; }

/* Fichier à télécharger depuis un article (diaporama, PDF…) */
.telechargement { margin: 1.2rem 0; }
.bouton-telecharger { display: inline-block; padding: .55rem 1rem; border-radius: 6px; text-decoration: none;
  background: var(--accent); color: var(--fond); font-weight: 600; }
.bouton-telecharger::before { content: "⬇ "; }
.bouton-telecharger:hover, .bouton-telecharger:focus-visible { opacity: .85; text-decoration: none; }
.telechargement small { color: var(--discret); margin-left: .4rem; }
@media print { .bouton-telecharger { background: none; color: inherit; padding: 0; text-decoration: underline; } }


/* =============================================================================
   20. L'ATLAS DES IDÉES — page d'un article (pages.planche, pages.constellation).
   Une seule zone sombre : la planche du titre, avec la constellation de l'article
   (ses vrais renvois, recalculés à chaque affichage). Dessous, tout est clair :
   la colonne de lecture (~75 signes) et la fiche, à trois intervalles égaux
   (barre de gauche–texte, texte–fiche, fiche–bord). Latin Modern partout.
   ============================================================================= */
:root { --atlas-nuit: #0d1424; --atlas-nuit-2: #1d2a4a; --atlas-or: #c9a24a; --atlas-or-texte: #7d6224;
        --atlas-ivoire: #f1efe8; --atlas-voile: #f3f5f9; --atlas-encre: #15161a;
        --atlas-colonne: 38rem;   /* ~75 signes (resserrée en nov. 2026, demande de Julien) */ --atlas-fiche: 15.6rem;
        --atlas-esp: max(3rem, calc((100% - var(--atlas-colonne) - var(--atlas-fiche)) / 3)); }
:root[data-theme="sombre"] { --atlas-voile: #1a1f2b; --atlas-encre: #e8e8e8; --atlas-or-texte: #d9b866; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --atlas-voile: #1a1f2b; --atlas-encre: #e8e8e8; --atlas-or-texte: #d9b866; } }

body:has(.planche) ::selection { background: color-mix(in srgb, var(--atlas-or) 35%, transparent); }
.titre-imprime { display: none; }

/* La planche */
.planche { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 2rem;
  margin: -1.5rem -1.25rem 2.5rem; padding: 2.5rem 1.25rem 2rem; overflow: hidden; color: var(--atlas-ivoire);
  background: radial-gradient(120% 140% at 85% 15%, var(--atlas-nuit-2) 0, #121b30 45%, var(--atlas-nuit) 100%); }
.planche::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--atlas-or) 60%, transparent) 30%, transparent); }
.planche-texte { flex: 0 1 34rem; min-width: 0; }
.planche h1 { margin: 0 0 .7rem; color: var(--atlas-ivoire); font-weight: 600; font-size: clamp(2.1rem, 3.6vw, 3.4rem);
  line-height: 1.06; letter-spacing: .005em; }
.planche .chapo { margin: 0 0 1.1rem; color: #c9cbd6; font-style: italic; font-size: 1.15rem; }
.planche-infos { margin: 0; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: #9aa1b5; }
.planche-infos .notion { color: var(--teinte, var(--atlas-or)); }
.planche-infos .morceau { white-space: nowrap; }      /* la ligne ne se coupe qu'aux « · » */
.planche-infos time { color: inherit; font: inherit; }
svg.constellation { flex: 0 1 44rem; width: 100%; height: auto; max-height: 16.5rem; }   /* la planche reste vers 330 px */
/* La même constellation en liste d'étoiles : seulement sur écran étroit, où le dessin serait illisible */
.constellation-liste { display: none; margin: 0; padding: 0; list-style: none; }
main .constellation-liste li { padding: 0; border: 0; }
.constellation-liste a { display: flex; align-items: baseline; gap: .6rem; padding: .32rem 0; color: #d6d9e3; text-decoration: none;
  font-size: .95rem; border-bottom: 1px solid rgb(255 255 255 / .08); }
.constellation-liste a:hover, .constellation-liste a:focus-visible { color: var(--atlas-ivoire); }
.constellation-liste i { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--teinte); transform: translateY(-.1rem); }
.constellation-liste .plus a { color: var(--atlas-or); border-bottom: 0; font-size: .85rem; letter-spacing: .06em; }
svg.constellation .traits line { stroke: var(--atlas-or); stroke-opacity: .45; stroke-width: 1; }
svg.constellation .centre { fill: var(--atlas-or); }
svg.constellation .halo { fill: none; stroke: var(--atlas-or); stroke-opacity: .35; }
svg.constellation text { fill: #b9bfd0; font: 12.5px/1 var(--police); font-variant: small-caps; letter-spacing: .05em; }
svg.constellation text.plus { fill: var(--atlas-or); font-size: 13px; letter-spacing: .08em; }
svg.constellation a circle { transition: r .2s ease-out; }
svg.constellation a:hover text, svg.constellation a:focus-visible text { fill: var(--atlas-ivoire); }
svg.constellation a:focus-visible { outline: none; }
svg.constellation a:focus-visible circle { stroke: var(--atlas-ivoire); stroke-width: 1.5; }

/* La colonne de lecture */
body:has(.planche) .article .corps { color: var(--atlas-encre); }
/* Taille du texte (choix de Julien) : 1,25 rem sur téléphone (inchangé : la ligne y est déjà courte), 1,2 rem sur un ordinateur pas large, 1,1 rem sur grand écran.
   Police : New Computer Modern Book (voir les @font-face en tête), Latin Modern en secours. */
body:has(.planche) .article .corps { font-family: "New Computer Modern Book", var(--police); font-size: 1.25rem; line-height: 1.6; }
@media (min-width: 48rem) { body:has(.planche) .article .corps { font-size: 1.2rem; line-height: 1.62; } }
@media (min-width: 75rem) { body:has(.planche) .article .corps { font-size: 1.1rem; line-height: 1.65; } }
body:has(.planche) .corps > :first-child { margin-top: 0; }   /* le haut du texte s'aligne sur celui de la fiche */
body:has(.planche) .corps :is(h1, h2, h3) { color: var(--atlas-encre); font-weight: 600; }
/* Intertitres du texte : en em, donc proportionnels au texte (1,1 à 1,25 rem selon l'écran),
   toujours h1 > h2 > h3 > h4 > texte ; h5 = taille du texte, italique, grisé, non gras. */
body:has(.planche) .corps h1 { margin: 2.8rem 0 .8rem; font-size: 1.6em; }
body:has(.planche) .corps h2 { margin: 2.6rem 0 .7rem; font-size: 1.4em; }
body:has(.planche) .corps h3 { margin: 2rem 0 .5rem; font-size: 1.2em; font-style: italic; font-weight: 600; }   /* en gras (demande de Julien) */
body:has(.planche) .corps h4 { margin: 1.6rem 0 .4rem; font-size: 1.07em; color: var(--atlas-encre); font-weight: 600; }
body:has(.planche) .corps h5 { margin: 1.3rem 0 .3rem; font-size: 1em; }
/* Numéro automatique des intertitres (I. / A. / 1. / i., posé par pages.numeroter_intertitres) */
.numero-titre { font-variant-numeric: lining-nums; }
body:has(.planche) .corps a, body:has(.planche) .corps a:visited { color: inherit; text-decoration: underline;
  text-decoration-color: var(--atlas-or); text-decoration-thickness: 1px; text-underline-offset: .22em; }
body:has(.planche) .corps a:hover { text-decoration-thickness: 2px; }
body:has(.planche) :focus-visible { outline: 2px solid var(--atlas-or); outline-offset: 2px; }

/* Les textes d'auteurs : un voile, un filet d'or au-dessus, la légende en petites capitales */
body:has(.planche) blockquote.citation { position: relative; margin: 2rem 0; padding: 1.3rem 1.6rem 1rem; border: 0;
  border-top: 1px solid var(--atlas-or); background: var(--atlas-voile); color: var(--atlas-encre); font-size: .98em; }
body:has(.planche) blockquote.citation .titre-texte { margin: 0 0 .6rem 1.5rem; color: var(--atlas-encre); }
body:has(.planche) blockquote.citation footer { margin-top: .9rem; padding-top: .55rem; border-top: 1px solid var(--filet);
  color: var(--discret); font-size: .82em; font-variant: small-caps; letter-spacing: .03em; }

/* La fiche (barre de droite) : même police, petites capitales, filets fins */
body:has(.planche) .annexes { border: 0; border-left: 1px solid var(--filet); border-radius: 0; padding: .2rem 0 1rem 1.3rem;
  font: .88rem/1.45 var(--police); }
body:has(.planche) .annexes dt { font-variant: small-caps; letter-spacing: .03em; }
body:has(.planche) .annexe-bouton { border-radius: 0; font: .82rem var(--police); font-variant: small-caps; letter-spacing: .04em; }
body:has(.planche) .annexe-carte { justify-content: center; border-radius: 0; background: var(--atlas-nuit); color: var(--atlas-ivoire);
  font: 600 .9rem/1.3 var(--police); }
body:has(.planche) .annexe-carte:hover { background: var(--atlas-nuit-2); opacity: 1; }
body:has(.planche) .annexe-biblio { border-radius: 0; border: 0; border-top: 1px solid var(--atlas-or); background: none; padding: .7rem 0 .2rem; }
body:has(.planche) .annexe-biblio h2, body:has(.planche) .annexe-references h2 { font: 600 .7rem/1.3 var(--police); letter-spacing: .22em;
  color: var(--atlas-or-texte); }
body:has(.planche) .annexe-liens > summary { font: 600 .88rem var(--police); }
body:has(.planche) .annexe-chemins p.fil, body:has(.planche) .annexe-mentions small, body:has(.planche) .annexe-biblio-note { font-family: var(--police); }

body:has(.planche) .article { position: relative; }

/* Grand écran : planche pleine largeur, puis colonne et fiche à intervalles égaux */
@media (min-width: 60rem) {
  body:has(.planche) { padding: 0 0 4rem var(--barre); }
  body:has(.planche) > main { max-width: none; margin: 0; }
  body:has(.planche) > footer { margin-left: var(--atlas-esp); margin-right: var(--atlas-esp); max-width: none; }
  .planche { margin: 0 0 4rem; padding: 3.2rem var(--atlas-esp) 2.4rem; min-height: 20rem; }
  .article-cadre { display: grid; grid-template-columns: 1fr minmax(0, var(--atlas-colonne)) 1fr var(--atlas-fiche) 1fr; align-items: start; }
  .article-cadre > .article { grid-column: 2; }
  /* Tout ce qui n'est pas la fiche (questions d'une séance, séances voisines…) reste sous le texte, dans sa colonne. */
  .article-cadre > :not(.annexes) { grid-column: 2; }
  /* Sans fiche (séance transmise) : la colonne se centre, sans place vide à droite. */
  .article-cadre:not(:has(> .annexes)) { grid-template-columns: 1fr minmax(0, var(--atlas-colonne)) 1fr; }
  .article-cadre > .annexes { grid-column: 4; margin-top: 0; position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow: auto; }
  .article-cadre .article > .meta { display: none; }
}
/* Entre les deux : la fiche passe sous le texte, la colonne se centre */
@media (min-width: 60rem) and (max-width: 74.99rem) {
  .article-cadre { grid-template-columns: 1fr minmax(0, var(--atlas-colonne)) 1fr; }
  .article-cadre > .annexes { grid-column: 2; position: static; max-height: none; border-left: 0; padding-left: 0; border-top: 1px solid var(--filet); }
}
/* Téléphone : la constellation passe sous le titre */
@media (max-width: 47.99rem) {
  body:has(.planche) > main { margin-top: 0; }
  .planche { flex-direction: column; align-items: stretch; gap: .9rem; margin-top: 0; padding: 1.4rem 1.25rem 1.1rem; }
  .planche h1 { font-size: 2rem; margin-bottom: .45rem; }
  .planche .chapo { font-size: 1.02rem; margin-bottom: .7rem; }
  .planche-infos { font-size: .7rem; letter-spacing: .1em; }
  .constellation-liste a { padding: .25rem 0; font-size: .92rem; }
  body:has(.planche) blockquote.citation { margin-left: -.25rem; margin-right: -.25rem; padding: 1rem 1rem .8rem; }
  .planche-texte { flex: none; }          /* en colonne, la base de 34rem deviendrait une hauteur */
  svg.constellation { display: none; }
  .constellation-liste { display: block; }
}
@media print {
  .planche { display: none; }
  .titre-imprime { display: block; }
  body:has(.planche) blockquote.citation { background: none; }
}
body:has(.planche) .annexes a, body:has(.planche) .annexes a:visited { color: inherit; text-decoration: underline;
  text-decoration-color: var(--atlas-or); text-decoration-thickness: 1px; text-underline-offset: .2em; }
body:has(.planche) .annexes a.annexe-carte, body:has(.planche) .annexes a.annexe-bouton { text-decoration: none; }
body:has(.planche) .annexes a.annexe-carte { color: var(--atlas-ivoire); }
/* Bascule « Texte intégral / L'essentiel » des cours, dans l'atlas : encre et or plutôt que le rouge */
body:has(.planche) .choix-version label { border-radius: 0; font-variant: small-caps; letter-spacing: .04em; }
body:has(.planche) #version-integrale:checked ~ .choix-version label[for="version-integrale"],
body:has(.planche) #version-essentielle:checked ~ .choix-version label[for="version-essentielle"] {
  border-color: var(--atlas-nuit); background: var(--atlas-nuit); color: var(--atlas-ivoire); }
body:has(.planche) .bascule-cours > input:focus-visible ~ .choix-version label { outline-color: var(--atlas-or); }

/* Atlas, retouches de la relecture : bouton principal visible en sombre, boutons sans pictogrammes, téléphone sans bande blanche */
:root[data-theme="sombre"] body:has(.planche) .annexe-carte { background: var(--atlas-nuit-2); box-shadow: inset 0 0 0 1px var(--atlas-or); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] body:has(.planche) .annexe-carte { background: var(--atlas-nuit-2); box-shadow: inset 0 0 0 1px var(--atlas-or); } }
body:has(.planche) .annexe-bouton::before, body:has(.planche) a.annexe-bouton[download]::before { content: none; }
@media (max-width: 59.99rem) { body:has(.planche) > header { margin-bottom: 0; } }
/* En sombre, la bascule active des cours se détache comme le bouton principal (fond plus clair, liseré d'or) */
:root[data-theme="sombre"] body:has(.planche) #version-integrale:checked ~ .choix-version label[for="version-integrale"],
:root[data-theme="sombre"] body:has(.planche) #version-essentielle:checked ~ .choix-version label[for="version-essentielle"] {
  background: var(--atlas-nuit-2); border-color: var(--atlas-or); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] body:has(.planche) #version-integrale:checked ~ .choix-version label[for="version-integrale"],
  :root[data-theme="auto"] body:has(.planche) #version-essentielle:checked ~ .choix-version label[for="version-essentielle"] {
    background: var(--atlas-nuit-2); border-color: var(--atlas-or); } }

/* =============================================================================
   21. RECHERCHE ET PODCASTS AUX COULEURS DE L'ATLAS
   Même monde que la page d'un article (section 20) : un seul bandeau de nuit
   (bleu nuit, filet d'or, ivoire), puis tout en clair ; Latin Modern, petites
   capitales pour les libellés, coins droits, l'or pour la sélection.
   ============================================================================= */
/* Recherche : bandeau de nuit avec le titre et le champ */
.bandeau-atlas { position: relative; margin: 0 0 2.25rem; padding: clamp(2rem, 5vw, 3.2rem) clamp(1.25rem, 4vw, 3rem) clamp(1.6rem, 4vw, 2.4rem);
  background: radial-gradient(120% 140% at 100% 0%, var(--atlas-nuit-2) 0%, var(--atlas-nuit) 60%); color: var(--atlas-ivoire); }
.bandeau-atlas::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, var(--atlas-or), color-mix(in srgb, var(--atlas-or) 0%, transparent)); }
.bandeau-atlas h1 { margin: 0 0 .5rem; color: var(--atlas-ivoire); font-weight: 600; font-size: clamp(2.1rem, 3.6vw, 3.4rem); line-height: 1.06; }
.bandeau-atlas .chapo { margin: 0 0 1.6rem; color: #c9cbd6; font-style: italic; font-size: 1.15rem; }
.bandeau-atlas form.recherche { margin: 0; }
.bandeau-atlas .recherche-ligne input { padding: .75rem .9rem; border: 1px solid #3a4666; border-radius: 0; background: #fff; color: #15161a;
  font-size: 1.1rem; }
.bandeau-atlas .recherche-ligne input:focus { outline: 2px solid var(--atlas-or); outline-offset: 1px; }
.bandeau-atlas .recherche-ligne button { padding: .75rem 1.4rem; border: 1px solid var(--atlas-or); border-radius: 0; background: var(--atlas-or);
  color: var(--atlas-nuit); font-variant: small-caps; letter-spacing: .05em; font-size: 1.05rem; }
.bandeau-atlas .recherche-ligne button:hover { background: transparent; color: var(--atlas-or); }
.bandeau-atlas .recherche-options { color: #9aa1b5; font-variant: small-caps; letter-spacing: .03em; font-size: .95rem; }
.bandeau-atlas .recherche-options select { border: 1px solid #3a4666; border-radius: 0; background: var(--atlas-nuit); color: var(--atlas-ivoire);
  font-variant: normal; letter-spacing: 0; }
.bandeau-atlas .recherche-aide { color: #9aa1b5; font-size: .85rem; }
.bandeau-atlas .recherche-aide code { border-radius: 0; background: color-mix(in srgb, var(--atlas-ivoire) 12%, transparent); color: var(--atlas-ivoire); }
/* Dessous : filtres en petites capitales, coins droits ; le filtre choisi en bleu nuit, liseré d'or */
.recherche-themes a { border-radius: 0; border-color: var(--filet); font-variant: small-caps; letter-spacing: .03em; font-size: .9rem; }
.recherche-themes a:hover { border-color: var(--atlas-or); }
.recherche-themes a[aria-current] { background: var(--atlas-nuit-2); border-color: var(--atlas-or); color: var(--atlas-ivoire); }
.recherche-genres a { font-weight: 400; font-size: .98rem; }
.recherche-compte { font-variant: small-caps; letter-spacing: .04em; }
article.resultat { padding: .6rem 0 1.1rem; border-bottom: 1px solid var(--filet); }
article.resultat small { font-variant: small-caps; letter-spacing: .05em; color: var(--discret); }
article.resultat h2 { margin: .15rem 0 .35rem; font-weight: 600; font-size: 1.35rem; }
article.resultat h2 a { color: var(--texte); text-decoration: none; }
article.resultat h2 a:hover { text-decoration: underline; text-decoration-color: var(--atlas-or); text-underline-offset: .18em; }
article.resultat .extrait { font-size: 1rem; }
article.resultat mark { background: color-mix(in srgb, var(--atlas-or) 30%, transparent); border-radius: 0; }

/* Podcasts : le bandeau passe au bleu nuit de l'atlas, l'or redevient l'or de la planche */
.vitrine { --rayon: 0; }
.bandeau-podcasts { --or: var(--atlas-or);
  background: radial-gradient(120% 140% at 100% 0%, var(--atlas-nuit-2) 0%, var(--atlas-nuit) 60%); }
.bandeau-podcasts::after { left: 0; right: 0; }
.vitrine .surtitre { font: 400 .78rem/1.2 var(--police); letter-spacing: .16em; }
.chiffres-podcast dt { font-weight: 400; letter-spacing: .16em; }
.bandeau-grille .jaquette, .serie-jaquette img, .visuel-episode img, .numero-seul { border-radius: 0; }
/* Action principale : bleu nuit comme « Voir les pages proches » ; sur le bandeau, or sur nuit */
.bouton-luxe { background: var(--atlas-nuit); border-color: var(--atlas-nuit); color: var(--atlas-ivoire); border-radius: 0;
  font: 400 1rem/1 var(--police); font-variant: small-caps; letter-spacing: .06em; text-transform: none; }
.bouton-luxe:hover { background: var(--atlas-nuit-2); border-color: var(--atlas-nuit-2); color: var(--atlas-ivoire); }
.bandeau-podcasts .bouton-luxe { background: var(--atlas-or); border-color: var(--atlas-or); color: var(--atlas-nuit); }
.bandeau-podcasts .bouton-luxe:hover { background: transparent; color: var(--atlas-or); }
.bouton-luxe.secondaire { background: transparent; color: inherit; border-color: var(--filet); }
.bouton-luxe.secondaire:hover { background: transparent; border-color: var(--atlas-or); color: inherit; }
.carte-episode a:hover { transform: none; box-shadow: none; }
.pastille-perdu { border-radius: 0; font-variant: small-caps; }
.image-episode img, .jaquette-episode img { border-radius: 0; }
/* En sombre, le bouton principal se détache comme dans la fiche (fond plus clair, liseré d'or) */
:root[data-theme="sombre"] .serie-vedette .bouton-luxe:not(.secondaire) { background: var(--atlas-nuit-2); border-color: var(--atlas-or); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .serie-vedette .bouton-luxe:not(.secondaire) { background: var(--atlas-nuit-2); border-color: var(--atlas-or); }
  :root[data-theme="auto"] { --atlas-or-texte: #d9b866; } }
.numero-seul { color: var(--atlas-or); }   /* l'or de la planche sur la tuile de nuit */
.bandeau-grille .jaquette, .serie-jaquette img { box-shadow: 0 30px 60px -24px rgb(13 20 36 / .55); }

/* =============================================================================
   22. BARRE DU HAUT SUR TÉLÉPHONE — une seule ligne : le nom du site, puis
   des menus déroulants (Menu, Intranet, Compte). Ce sont des <details> : ils
   s'ouvrent sans script. À partir de 60rem, la colonne de gauche reprend.
   ============================================================================= */
.barre-mobile { display: none; }
@media (max-width: 59.99rem) {
  body > header.barre-site { position: relative; z-index: 20; padding-top: .7rem; padding-bottom: .7rem; }
  body > header.barre-site > nav.principale, body > header.barre-site > nav.intranet,
  body > header.barre-site > .compte-barre, body > header.barre-site > .theme-barre { display: none; }
  .barre-mobile { display: flex; align-items: baseline; gap: .75rem; flex-wrap: nowrap; }   /* noms et menus sur la même ligne de texte */
  .barre-mobile > a.nom-site { margin: 0 auto 0 0; font: 600 1rem/1.2 var(--police); color: var(--barre-texte);
    text-decoration: none; white-space: nowrap; flex: none; }
  .barre-mobile .nom-court { display: none; }
  .deroulant { position: relative; }
  .deroulant > summary { list-style: none; cursor: pointer; padding: .3rem 0; font: .92rem/1.2 var(--police);
    font-variant: small-caps; letter-spacing: .04em; color: var(--barre-texte); white-space: nowrap; }
  .deroulant > summary::-webkit-details-marker { display: none; }
  .deroulant > summary::after { content: ""; display: inline-block; width: .38em; height: .38em; margin: 0 0 .2em .45em;
    border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
  .deroulant[open] > summary { text-decoration: underline; text-decoration-color: var(--atlas-or); text-underline-offset: .3em; }
  .deroulant[open] > summary::after { transform: rotate(225deg); margin-bottom: -.05em; }
  /* z-index et bord : le panneau passe devant la page (le bot, la carte) et s'en détache nettement. */
  .deroulant-panneau { position: absolute; z-index: 40; top: calc(100% + .7rem); left: 50%; transform: translateX(-50%); min-width: 13rem;
    display: flex; flex-direction: column; padding: .5rem 0; background: var(--barre-fond); border: 1px solid rgb(255 255 255 / .12); border-top: 1px solid var(--atlas-or);
    box-shadow: 0 18px 40px -12px rgb(0 0 0 / .45); }
  .deroulant.a-droite .deroulant-panneau { left: auto; right: 0; transform: none; }
  .deroulant-panneau a, .deroulant-panneau button.lien { display: block; padding: .55rem 1rem; color: var(--barre-texte);
    text-decoration: none; font: .98rem/1.3 var(--police); text-align: left; }
  .deroulant-panneau a:hover { background: var(--barre-actif); }
  .deroulant-panneau a[aria-current] { font-weight: 700; box-shadow: inset 2px 0 0 var(--atlas-or); }
  .deroulant-panneau p { margin: 0; padding: .4rem 1rem .2rem; color: var(--barre-discret); font: .85rem/1.4 var(--police); }
  .deroulant-panneau p strong { color: var(--barre-texte); }
  .deroulant-panneau form { margin: 0; }
  .deroulant-panneau .theme-barre { margin: .4rem 0 0; padding: .6rem 1rem .3rem; border-top: 1px solid var(--barre-actif); }
}
/* Écran étroit (et trois menus quand on est connecté) : nom abrégé, menus resserrés */
@media (max-width: 26rem) {
  .barre-mobile:has(> details:nth-of-type(3)) { gap: .5rem; }
  .barre-mobile:has(> details:nth-of-type(3)) .nom-long { display: none; }
  .barre-mobile:has(> details:nth-of-type(3)) .nom-court { display: inline; }
  .barre-mobile:has(> details:nth-of-type(3)) .deroulant > summary { font-size: .84rem; letter-spacing: .01em; }
}
/* Très petits téléphones (320 px) avec trois menus : sans chevrons, plus serrés */
@media (max-width: 23rem) {
  .barre-mobile:has(> details:nth-of-type(3)) { gap: .45rem; }
  .barre-mobile:has(> details:nth-of-type(3)) .deroulant > summary { font-size: .8rem; letter-spacing: 0; }
  .barre-mobile:has(> details:nth-of-type(3)) .deroulant > summary::after { display: none; }
}
/* Article spécial : le panneau « Menu » garde la barre complète */
.panneau-special .barre-mobile { display: none !important; }

/* Bouton discret « Modifier » (pages.barre_laterale) : seulement pour qui peut écrire
   dans le CMS, en haut à droite de la page d'un article ; il s'affirme au survol. */
.modifier-page { position: fixed; top: .8rem; right: .8rem; z-index: 30; padding: .25rem .7rem;
  font: .85rem/1.2 var(--police); font-variant: small-caps; letter-spacing: .05em; text-decoration: none;
  color: var(--atlas-ivoire); background: color-mix(in srgb, var(--atlas-nuit) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--atlas-or) 45%, transparent); opacity: .6; transition: opacity .2s; }
.modifier-page:hover, .modifier-page:focus-visible { opacity: 1; color: var(--atlas-ivoire); border-color: var(--atlas-or); text-decoration: none; }
/* Téléphone : en bas à gauche, sur le texte — donc opaque, sinon illisible (contraste 1,15 à l'audit) */
@media (max-width: 59.99rem) { .modifier-page { top: auto; bottom: 1rem; right: auto; left: 1rem; opacity: 1;
  background: var(--atlas-nuit); border-color: var(--atlas-or); box-shadow: 0 6px 18px -6px rgb(0 0 0 / .45); } }
@media print { .modifier-page { display: none; } }

/* Podcasts : le bandeau de nuit prend toute la largeur disponible (de la barre de gauche
   au bord droit, du haut de la page), comme la planche des articles ; son contenu reste
   aligné sur la colonne de la page. 50% = largeur de <main>, 100vw - barre = place dispo. */
body:has(.bandeau-podcasts) { overflow-x: clip; }
.vitrine > .bandeau-podcasts { --plein: 100vw; --decal: calc((var(--plein) - 100%) / 2);
  margin-left: calc(-1 * var(--decal)); margin-right: calc(-1 * var(--decal)); margin-top: -1rem;
  padding-left: calc(var(--decal) + clamp(0rem, 2vw, 1.5rem)); padding-right: calc(var(--decal) + clamp(0rem, 2vw, 1.5rem)); }
@media (min-width: 60rem) {
  .vitrine > .bandeau-podcasts { --plein: calc(100vw - var(--barre)); margin-top: -3rem; }
}
body > main:has(> .vitrine > .bandeau-podcasts:first-child) { margin-top: 0; }   /* téléphone : pas de blanc entre la barre et le bandeau */

/* Page d'un épisode de podcast (podcasts_site.page_episode) : la même planche que les
   articles ; à droite, l'image de l'épisode au lieu de la constellation. */
.planche-episode h1 .numero { color: var(--atlas-or); font-weight: 400; margin-right: .15em; }
.planche-infos a.serie { color: var(--atlas-or); text-decoration: none; }
.planche-infos a.serie:hover { text-decoration: underline; }
.planche-image { flex: none; margin: 0; }
.planche-image img { display: block; width: clamp(9rem, 17vw, 15rem); height: auto; aspect-ratio: 1; object-fit: cover;
  box-shadow: 0 30px 60px -24px rgb(0 0 0 / .6), 0 0 0 1px rgb(255 255 255 / .06); }
@media (max-width: 47.99rem) { .planche-image img { width: 7.5rem; } }
body:has(.planche-episode) .lecteur-podcast { margin: 0 0 2rem; }
body:has(.planche-episode) .article.episode .avis { margin-top: 0; }
@media (max-width: 47.99rem) { .planche-image { display: none; } }   /* téléphone : le titre d'abord */
body:has(.planche-episode) .lecteur-podcast { border-radius: 0; border-color: var(--filet); }
body:has(.planche-episode) .avis, body:has(.planche-episode) .avis-ia { border: 0; border-top: 1px solid var(--atlas-or); border-radius: 0;
  background: var(--atlas-voile); color: var(--atlas-encre); }
body:has(.planche-episode) .annexe-episodes a { border-radius: 0; }
body:has(.planche-episode) .annexe-episodes a:hover { border-color: var(--atlas-or); }
body:has(.planche-episode) .annexe-episodes a span { font-variant: small-caps; text-transform: none; letter-spacing: .05em; font-size: .85rem; }
body:has(.planche-episode) .transcription-repli > summary { border-radius: 0; border-color: var(--atlas-nuit); background: var(--atlas-nuit);
  color: var(--atlas-ivoire); font-variant: small-caps; letter-spacing: .05em; }
body:has(.planche-episode) .sommaire { border-left: 1px solid var(--atlas-or); }
body:has(.planche-episode) .annexe-episodes { display: flex; flex-direction: column; gap: .5rem; }

/* =============================================================================
   23. RECHERCHE SOBRE — pas de bandeau : titre, champ, puis les cases à cocher
   (genres et thèmes) visibles d'emblée ; encre, filets fins, coins droits.
   ============================================================================= */
.recherche-sobre { margin: 0 0 1.75rem; }
.recherche-sobre .recherche-ligne input { padding: .65rem .8rem; border: 1px solid var(--texte); border-radius: 0; font-size: 1.05rem;
  background: var(--fond); color: var(--texte); }
.recherche-sobre .recherche-ligne input:focus { outline: 2px solid var(--atlas-or); outline-offset: 1px; }
.recherche-sobre .recherche-ligne button { padding: .65rem 1.2rem; border: 1px solid var(--atlas-nuit); border-radius: 0;
  background: var(--atlas-nuit); color: var(--atlas-ivoire); font-variant: small-caps; letter-spacing: .05em; }
.recherche-sobre .recherche-ligne button:hover { background: var(--atlas-nuit-2); }
.recherche-sobre .recherche-aide { margin: .45rem 0 0; }
.recherche-sobre .recherche-aide code { border-radius: 0; }
.recherche-cases { margin: 1.1rem 0 0; padding: .7rem 0 0; border: 0; border-top: 1px solid var(--filet);
  display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.recherche-cases legend { float: left; width: 100%; margin: 0 0 .35rem; padding: 0; font-variant: small-caps; letter-spacing: .06em;
  color: var(--discret); font-size: .95rem; }
.recherche-cases .case { display: inline-flex; align-items: center; gap: .35rem; font-size: .95rem; cursor: pointer; white-space: nowrap; }
.recherche-cases input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--atlas-nuit); }
.recherche-cases .nb { color: var(--discret); font-size: .85em; }
.recherche-sobre .recherche-options { margin-top: 1rem; padding-top: .7rem; border-top: 1px solid var(--filet); }
.recherche-sobre .recherche-options select { border-radius: 0; }
:root[data-theme="sombre"] .recherche-cases input { accent-color: var(--atlas-or); }
:root[data-theme="sombre"] .recherche-sobre .recherche-ligne button { background: var(--atlas-nuit-2); border-color: var(--atlas-or); }
main:has(> .recherche-sobre) > h1 { margin: 0 0 1.1rem; color: var(--texte); font-weight: 600; font-size: clamp(2rem, 3.2vw, 2.8rem); line-height: 1.1; }

/* =============================================================================
   24. NEWSLETTER ET CV, SOBRES — comme la page Recherche : pas de bandeau,
   titre à l'encre en Latin Modern, filets fins, coins droits, petites
   capitales pour les libellés, bleu nuit seulement pour le bouton d'action.
   ============================================================================= */
main.page-newsletter > h1, main.page-cv > h1 { margin: 0 0 1rem; color: var(--texte); font-weight: 600;
  font-size: clamp(2rem, 3.2vw, 2.8rem); line-height: 1.1; }
main.page-newsletter > p:first-of-type, main.page-cv > .chapo { font-style: italic; font-size: 1.15rem; color: var(--discret); }
main.page-newsletter .formulaire { max-width: 30rem; padding-top: 1rem; border-top: 1px solid var(--filet); }
main.page-newsletter .formulaire label { font-variant: small-caps; letter-spacing: .04em; font-size: .95rem; color: var(--discret); }
main.page-newsletter .formulaire label.case { font-variant: normal; letter-spacing: 0; color: var(--texte); align-items: flex-start; }
main.page-newsletter .formulaire label.case input { margin-top: .3rem; accent-color: var(--atlas-nuit); }
main.page-newsletter .formulaire input:not([type=checkbox]) { border: 1px solid var(--texte); border-radius: 0; font-variant: normal; color: var(--texte); }
main.page-newsletter .formulaire input:focus { outline: 2px solid var(--atlas-or); }
main.page-newsletter button:not(.lien) { border-radius: 0; border-color: var(--atlas-nuit); background: var(--atlas-nuit); color: var(--atlas-ivoire);
  font-weight: 400; font-variant: small-caps; letter-spacing: .05em; font-size: 1.05rem; }
main.page-newsletter button:not(.lien):hover { background: var(--atlas-nuit-2); }
main.page-newsletter .avis { border-left: 0; border-top: 1px solid var(--atlas-or); border-radius: 0; background: var(--atlas-voile); color: var(--atlas-encre); }
main.page-newsletter .avis.erreur { border-top-color: #b3131b; }
main.page-cv h2 { margin: 2.4rem 0 .8rem; padding-top: .7rem; border-top: 1px solid var(--filet); color: var(--texte);
  font-weight: 600; font-variant: small-caps; letter-spacing: .06em; font-size: 1.3rem; }
main.page-cv li time { font-variant: small-caps; letter-spacing: .04em; color: var(--discret); }
main.page-cv a { color: inherit; text-decoration-color: var(--atlas-or); text-underline-offset: .18em; }
:root[data-theme="sombre"] main.page-newsletter button:not(.lien) { background: var(--atlas-nuit-2); border-color: var(--atlas-or); }
main.page-cv h3 { font-size: 1.15rem; }   /* sous le h2 du CV (1,3 rem) : l'échelle reste décroissante */
main.page-cv :is(h1, h2, h3, h4, h5, strong, cite), main.page-newsletter :is(h1, h2, h3) { color: var(--texte); }   /* aucun rouge */

/* =============================================================================
   25. SÉCURITÉ ET ANALYTICS (pages.page_securite, admin) — sobre comme la
   Recherche : encre, filets fins, petites capitales, coins droits ; l'or
   pour les barres, le rouge seulement pour une jauge en alerte.
   ============================================================================= */
@media (min-width: 60rem) { body:has(.page-analytics) > main { max-width: min(72rem, var(--dispo)); } }
.page-analytics h1 { margin: 0 0 .4rem; color: var(--texte); font-weight: 600; font-size: clamp(2rem, 3.2vw, 2.8rem); }
.page-analytics h2 { margin: 2.2rem 0 .5rem; padding-top: .6rem; border-top: 1px solid var(--filet); color: var(--texte);
  font-weight: 600; font-variant: small-caps; letter-spacing: .06em; font-size: 1.25rem; }
.page-analytics .detail, .analytics-source { color: var(--discret); font-size: .88rem; margin: 0 0 .6rem; }
.analytics-intervalle { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem 1rem; margin: 1.2rem 0; padding: .8rem 0;
  border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); }
.analytics-presets { flex-basis: 100%; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.analytics-presets a { padding: .2rem .65rem; border: 1px solid var(--filet); color: var(--texte); text-decoration: none;
  font-variant: small-caps; letter-spacing: .03em; font-size: .92rem; }
.analytics-presets a:hover { border-color: var(--atlas-or); }
.analytics-presets a[aria-current] { background: var(--atlas-nuit-2); border-color: var(--atlas-or); color: var(--atlas-ivoire); }
.analytics-intervalle label { display: flex; align-items: center; gap: .4rem; font-variant: small-caps; color: var(--discret); }
.analytics-intervalle input { font: inherit; font-variant: normal; padding: .35rem .5rem; border: 1px solid var(--texte); border-radius: 0;
  background: var(--fond); color: var(--texte); }
.analytics-intervalle button { border-radius: 0; border-color: var(--atlas-nuit); background: var(--atlas-nuit); color: var(--atlas-ivoire);
  font-weight: 400; font-variant: small-caps; letter-spacing: .05em; }
.analytics-direct { margin: 0 0 1rem; }
.analytics-cles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0; margin: 0 0 1.2rem;
  border-top: 1px solid var(--atlas-or); }
.analytics-cles > div { padding: .7rem .9rem .6rem 0; }
.analytics-cles dt { font-variant: small-caps; letter-spacing: .05em; color: var(--discret); }
.analytics-cles dd { margin: .1rem 0 0; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.analytics-cles dd.detail { font-size: .78rem; line-height: 1.3; }
.analytics-rythme { display: flex; align-items: flex-end; gap: 1px; height: 6.5rem; margin: 0 0 .4rem; padding-bottom: 1px;
  border-bottom: 1px solid var(--filet); }
.analytics-rythme span { flex: 1 1 0; min-width: 1px; background: var(--atlas-or); opacity: .85; }
.analytics-rythme span:hover { opacity: 1; background: var(--atlas-nuit-2); }
.analytics-grille { display: grid; gap: 0 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.analytics-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.analytics-table th { text-align: left; font-weight: 400; font-variant: small-caps; letter-spacing: .04em; color: var(--discret);
  border-bottom: 1px solid var(--texte); padding: .3rem .5rem .3rem 0; }
.analytics-table td { padding: .32rem .5rem .32rem 0; border-bottom: 1px solid var(--filet); vertical-align: top; }
/* Parcours d'un compte : une ligne de jour avant ses pages, l'adresse en petit sous le titre. */
.analytics-table.parcours tr.jour th { padding-top: 1.1rem; color: var(--atlas-encre); font-variant: small-caps; font-weight: 600; letter-spacing: .04em; }
.analytics-table.parcours td small { color: var(--discret); word-break: break-all; }
.analytics-table.parcours td:first-child, .analytics-table.parcours thead th:first-child { width: 1%; white-space: nowrap; padding-right: 1.25rem; text-align: left; font-variant-numeric: tabular-nums; }
.analytics-table .nb { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.analytics-table td.barre { width: 40%; }
.analytics-table td.barre span { display: block; height: .55rem; margin-top: .45rem; background: var(--atlas-or); }
.analytics-table .ip { font-family: ui-monospace, Menlo, monospace; font-size: .85em; white-space: nowrap; }
.analytics-table .agent { color: var(--discret); font-size: .85em; }
.analytics-table tr.robot td { color: var(--discret); }
.analytics-table a { color: inherit; text-decoration-color: var(--atlas-or); }
.analytics-defile { overflow-x: auto; }
.jauge { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr minmax(8rem, auto); gap: .8rem; align-items: center; margin: .45rem 0; }
.jauge-nom { font-variant: small-caps; letter-spacing: .04em; }
.jauge-barre { height: .7rem; border: 1px solid var(--filet); }
.jauge-barre span { display: block; height: 100%; background: var(--atlas-nuit-2); }
.jauge.alerte .jauge-barre span { background: #b3131b; }
.jauge-val { font-size: .88rem; color: var(--discret); font-variant-numeric: tabular-nums; }
@media (max-width: 40rem) { .jauge { grid-template-columns: 1fr; gap: .2rem; } }
.analytics-mention { margin-top: 2rem; color: var(--discret); }
:root[data-theme="sombre"] .jauge-barre span { background: var(--atlas-or); }

/* Sécurité et analytics : onglets internes, explications, filtres, cartographie, sauvegarde */
.onglets-internes { display: flex; flex-wrap: wrap; gap: 0; margin: 1rem 0 1.2rem; border-bottom: 1px solid var(--texte); }
.onglets-internes a { padding: .5rem .9rem .45rem; color: var(--discret); text-decoration: none; font-variant: small-caps; letter-spacing: .04em;
  border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; }
.onglets-internes a:hover { color: var(--texte); }
.onglets-internes a[aria-current] { color: var(--texte); background: var(--fond); border-color: var(--texte); border-top: 2px solid var(--atlas-or); }
.analytics-aide { margin: 0 0 1.2rem; padding: .6rem .9rem; background: var(--atlas-voile); border-top: 1px solid var(--atlas-or); font-size: .92rem; }
.analytics-aide summary { cursor: pointer; font-variant: small-caps; letter-spacing: .04em; color: var(--discret); }
.analytics-aide p { margin: .4rem 0 0; line-height: 1.55; }
.analytics-filtres { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem 1rem; margin: 0 0 1rem; padding: .7rem 0;
  border-bottom: 1px solid var(--filet); }
.analytics-filtres label { display: flex; flex-direction: column; gap: .2rem; font-variant: small-caps; color: var(--discret); font-size: .9rem; }
.analytics-filtres input, .analytics-filtres select { font: inherit; font-variant: normal; padding: .3rem .45rem; border: 1px solid var(--texte);
  border-radius: 0; background: var(--fond); color: var(--texte); }
.analytics-filtres button, .ajout-blocage button, .sauvegarde-boutons button { border-radius: 0; border-color: var(--atlas-nuit);
  background: var(--atlas-nuit); color: var(--atlas-ivoire); font-weight: 400; font-variant: small-caps; letter-spacing: .05em; }
.sauvegarde-boutons { display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0 1rem; }
.sauvegarde-boutons button.secondaire { background: transparent; color: var(--texte); border-color: var(--texte); }
form.bloquer { margin: 0; }
form.bloquer button.petit { padding: .1rem .5rem; border-radius: 0; border: 1px solid var(--filet); background: transparent; color: var(--discret);
  font: .8rem var(--police); font-variant: small-caps; }
form.bloquer button.petit:hover { border-color: #b3131b; color: #b3131b; }
form.bloquer button.debloquer { border-color: #b3131b; color: #b3131b; }
.analytics-table tr.bloquee td:first-child { color: #b3131b; text-decoration: line-through; }
.ajout-blocage { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem 1rem; margin: 1rem 0 .3rem; }
.ajout-blocage label { display: flex; flex-direction: column; gap: .2rem; font-variant: small-caps; color: var(--discret); font-size: .9rem; }
.ajout-blocage input { font: inherit; font-variant: normal; padding: .35rem .5rem; border: 1px solid var(--texte); border-radius: 0; background: var(--fond); color: var(--texte); }
.blocage-etat { padding: .45rem .7rem; border-left: 2px solid var(--atlas-or); background: var(--atlas-voile); font-size: .92rem; }
.page-analytics .pastille-etat { display: inline-block; padding: 0 .45rem; border: 1px solid currentColor; font-size: .8rem; font-variant: small-caps; white-space: nowrap; }
.page-analytics .pastille-etat.ok { color: #2e7d32; }
.page-analytics .pastille-etat.ko { color: #b3131b; }
.carto { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .5rem 0; }
.carto-noeud { padding: .5rem .8rem; border: 1px solid var(--texte); text-align: center; font-variant: small-caps; letter-spacing: .04em; }
.carto-noeud small { font-variant: normal; letter-spacing: 0; color: var(--discret); }
.carto-fleche { color: var(--atlas-or); font-size: 1.3rem; }
main ul.carto-routes { flex: 1 1 22rem; margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--atlas-or); }
main ul.carto-routes li { display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; padding: .35rem .7rem; border-top: 0; border-bottom: 1px solid var(--filet); }
.carto-domaines { font-weight: 600; }
.carto-cibles { color: var(--discret); font-family: ui-monospace, Menlo, monospace; font-size: .85em; }
.page-analytics h3 { margin: 1.2rem 0 .2rem; font-size: 1.05rem; font-weight: 600; color: var(--texte); }
:root[data-theme="sombre"] .page-analytics .pastille-etat.ok { color: #7bc67e; }
.onglets-internes a, .onglets-internes a:first-child { flex: none; margin: 0 0 -1px; font: inherit; font-variant: small-caps; }
.page-analytics .pastille-etat { border-radius: 0; }
.page-analytics td.agent { word-break: break-all; }

/* =============================================================================
   26. EN DEHORS DES COURS (pages.page_interventions) — même monde sobre que la
   Recherche : titre à l'encre, années en petites capitales, une ligne d'or
   pour chaque année, filtres discrets en petites capitales.
   ============================================================================= */
.page-interventions > h1 { margin: 0 0 .4rem; color: var(--texte); font-weight: 600; font-size: clamp(2rem, 3.2vw, 2.8rem); line-height: 1.1; }
.page-interventions > .chapo { margin: 0 0 1.2rem; font-style: italic; color: var(--discret); font-size: 1.1rem; }
.interventions-filtres { margin: 0 0 1.6rem; padding: .5rem 0; border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet);
  font-size: .9rem; line-height: 1.9; color: var(--discret); }
.interventions-filtres .filtre-titre { display: inline-block; min-width: 4rem; font-variant: small-caps; letter-spacing: .05em; }
.interventions-filtres a { color: var(--discret); text-decoration: none; font-variant: small-caps; letter-spacing: .03em; }
.interventions-filtres a:hover { color: var(--texte); }
.interventions-filtres a[aria-current] { color: var(--texte); text-decoration: underline; text-decoration-color: var(--atlas-or); text-underline-offset: .25em; }
.interventions-annee { margin: 2.2rem 0 .4rem; padding-top: .5rem; border-top: 1px solid var(--atlas-or); color: var(--texte);
  font-weight: 600; font-variant: small-caps; letter-spacing: .08em; font-size: 1.45rem; }
main ol.interventions-liste { list-style: none; margin: 0; padding: 0; }
main ol.interventions-liste li.intervention { padding: .9rem 0 1rem; border-top: 0; border-bottom: 1px solid var(--filet); }
.intervention-tete { margin: 0; font-size: .85rem; color: var(--discret); font-variant: small-caps; letter-spacing: .05em; }
.intervention-tete time { color: var(--texte); }
.intervention-genre::before, .intervention-theme::before { content: "·"; margin: 0 .45em; color: var(--atlas-or); }
.intervention h3 { margin: .15rem 0 .2rem; font-size: 1.25rem; font-weight: 600; line-height: 1.25; color: var(--texte); }
.intervention h3 a { color: inherit; text-decoration: none; }
.intervention h3 a:hover { text-decoration: underline; text-decoration-color: var(--atlas-or); text-underline-offset: .18em; }
.intervention-lieu { margin: 0; font-size: .9rem; color: var(--discret); font-style: italic; }
.intervention-chapo { margin: .35rem 0 0; font-size: .98rem; line-height: 1.55; }
body:has(.planche) .annexe-diapo, body:has(.planche) .annexe-original { grid-column: 1 / -1; }
/* Transcriptions (« En dehors des cours ») : un repère de temps discret toutes les 10 minutes */
.corps p.horodatage { margin: 1.6rem 0 .3rem; font-variant: small-caps; letter-spacing: .06em; color: var(--discret);
  border-top: 1px solid var(--filet); padding-top: .3rem; }
.corps p.avis-ia { font-size: .9rem; }
/* « En dehors des cours » présenté comme « Cours » : filtres discrets dans la fiche de droite */
.annexe-filtre { margin: 0 0 1.1rem; padding-top: .6rem; border-top: 1px solid var(--atlas-or); }
.annexe-filtre h2 { margin: 0 0 .35rem; font: 600 .7rem/1.3 var(--police); letter-spacing: .22em; text-transform: uppercase; color: var(--atlas-or-texte); }
main .annexe-filtre ul { list-style: none; margin: 0; padding: 0; }
main .annexe-filtre li { padding: 0; border: 0; }
.annexe-filtre a { display: flex; justify-content: space-between; gap: .5rem; padding: .18rem 0; color: var(--texte); text-decoration: none;
  font-variant: small-caps; letter-spacing: .03em; font-size: .92rem; }
.annexe-filtre a span { color: var(--discret); font-variant-numeric: tabular-nums; }
.annexe-filtre a:hover { text-decoration: underline; text-decoration-color: var(--atlas-or); }
.annexe-filtre a[aria-current] { font-weight: 600; box-shadow: inset 2px 0 0 var(--atlas-or); padding-left: .5rem; }
.page-interventions .interventions-annee { margin: 2rem 0 .8rem; }
.vignettes-interventions .vignette-cours strong { font-size: 1.05rem; line-height: 1.3; }
body:has(.planche) .corps a.vignette-cours, body:has(.planche) .corps a.vignette-cours * { text-decoration: none; }

/* Barre d'écoute d'une intervention (pages.barre_ecoute) : réservée aux amis et anciens élèves */
.barre-ecoute { margin: 0 0 2rem; padding: .8rem 1rem 1rem; background: var(--atlas-voile); border-top: 1px solid var(--atlas-or); }
.barre-ecoute-titre { margin: 0 0 .55rem; font-variant: small-caps; letter-spacing: .05em; color: var(--atlas-encre); }
.barre-ecoute-titre span { margin-left: .5rem; color: var(--discret); font-size: .85em; font-style: italic; font-variant: normal; letter-spacing: 0; }
.barre-ecoute .lecteur-podcast { margin: 0; border: 0; border-radius: 0; --plyr-color-main: var(--atlas-or);
  --plyr-audio-controls-background: transparent; --plyr-audio-control-color: var(--atlas-encre); --plyr-range-thumb-background: var(--atlas-nuit); }
@media print { .barre-ecoute { display: none; } }

/* Liens de téléchargement dans un article (<ul class="telechargements">) : de vrais boutons, comme ceux de la fiche */
body:has(.planche) .corps ul.telechargements { list-style: none; display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0 1.4rem; padding: 0; }
body:has(.planche) .corps ul.telechargements li { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
body:has(.planche) .corps ul.telechargements a { display: inline-flex; align-items: center; gap: .5rem; min-width: 8.5rem; justify-content: center;
  padding: .7rem 1.3rem; background: var(--atlas-nuit); border: 1px solid var(--atlas-nuit); color: var(--atlas-ivoire);
  text-decoration: none; font-variant: small-caps; letter-spacing: .06em; font-size: 1.05rem; transition: background .15s, border-color .15s; }
body:has(.planche) .corps ul.telechargements a::before { content: "↓"; color: var(--atlas-or); font-variant: normal; }
body:has(.planche) .corps ul.telechargements a:hover { background: var(--atlas-nuit-2); border-color: var(--atlas-or); }
body:has(.planche) .corps ul.telechargements small { color: var(--discret); font-size: .8rem; }
:root[data-theme="sombre"] body:has(.planche) .corps ul.telechargements a { background: var(--atlas-nuit-2); border-color: var(--atlas-or); }

/* =============================================================================
   27. ÉCOUTE FLOTTANTE (js/ecoute.js) — le lecteur qui joue se fixe en bas de
   l'écran et suit la navigation : bleu nuit, filet d'or, comme la planche.
   ============================================================================= */
/* Une ligne fine en bas, sur toute la largeur (à droite de la barre de gauche sur ordinateur) :
   titre à gauche, lecteur au milieu, croix à droite. */
.ecoute-flottante { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: 3rem;
  display: flex; align-items: center; gap: .9rem; padding: 0 .6rem 0 1rem;
  background: var(--atlas-nuit); color: var(--atlas-ivoire); border-top: 1px solid var(--atlas-or); }
@media (min-width: 60rem) { .ecoute-flottante { left: var(--barre); } }
.ecoute-flottante-tete { display: contents; }
.ecoute-flottante-titre { order: 1; flex: 0 1 18rem; min-width: 0; color: var(--atlas-ivoire); text-decoration: none; font-variant: small-caps;
  letter-spacing: .04em; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecoute-flottante-titre:hover { color: var(--atlas-or); }
.ecoute-flottante-lecteur { order: 2; flex: 1; min-width: 0; }
.ecoute-flottante-fermer { order: 3; flex: none; padding: 0 .35rem; border: 0; background: none; color: var(--atlas-ivoire);
  font-size: 1.2rem; line-height: 1; cursor: pointer; opacity: .75; }
.ecoute-flottante-fermer:hover { color: var(--atlas-or); opacity: 1; }
/* body > .ecoute-flottante : plus précis que « body:has(.planche-episode) .lecteur-podcast » (marge de 2rem
   sous le lecteur des pages d'épisode), qui sinon décalait le lecteur vers le haut dans la barre. */
body > .ecoute-flottante .lecteur-podcast { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  --plyr-color-main: var(--atlas-or); --plyr-audio-controls-background: transparent; --plyr-audio-control-color: var(--atlas-ivoire);
  --plyr-control-spacing: 6px; }
.ecoute-flottante .plyr--audio .plyr__controls { padding: 0; }
.ecoute-flottante audio { width: 100%; height: 2rem; }
body.avec-ecoute { padding-bottom: 4.5rem; }
@media (max-width: 40rem) {
  .ecoute-flottante { gap: .5rem; padding-left: .7rem; }
  .ecoute-flottante-titre { flex-basis: 6.5rem; font-size: .8rem; }
  .ecoute-flottante .plyr__volume, .ecoute-flottante [data-plyr="settings"], .ecoute-flottante .plyr__time--duration { display: none; }
}
/* Téléphone : bulle plus petite (44 px, taille minimale d'une cible tactile) et plus près du
   coin, pour moins couvrir la fin des lignes du texte. */
@media (max-width: 59.99rem) { body:not(:has(.carte-accueil)) #messagerie { --msg-taille: 44px; --msg-droite: 12px; --msg-bas: 12px; } }
body.avec-ecoute #messagerie { --msg-bas: 64px; }      /* variable lue par la bulle (messagerie.js, shadow DOM) */
@media print { .ecoute-flottante { display: none; } }

/* Lecteurs dans la page, sur téléphone : la barre de progression passe sur sa propre
   ligne, en pleine largeur, au-dessus des boutons (sinon volume et réglages la
   réduisaient à quelques pixels) ; le curseur de volume s'efface (bouton muet gardé). */
@media (max-width: 30rem) {
  main .lecteur-podcast .plyr--audio .plyr__controls { flex-wrap: wrap; row-gap: .35rem; }
  main .lecteur-podcast .plyr__progress__container { order: -1; flex: 1 0 100%; margin: 0; padding: 0 .3rem; }
  main .lecteur-podcast .plyr__volume input[type="range"] { display: none; }
  main .lecteur-podcast .plyr__volume { min-width: 0; max-width: none; width: auto; }
  main .lecteur-podcast .plyr__time { margin-left: auto; }
  main .lecteur-podcast .plyr__time + .plyr__time { margin-left: 0; }
}

/* Pages de textes des débats (bioéthique) : la source sous chaque titre, discrète ; la note
   de présentation du professeur, encadrée d'un filet d'or, distincte du texte de l'auteur. */
.corps .source-texte { margin: -.3rem 0 1rem; font-size: .9em; color: var(--discret); }
.corps .note-presentation { margin: 0 0 1.2rem; padding: .7rem 1rem; border: 1px solid color-mix(in srgb, var(--atlas-or) 55%, transparent);
  background: color-mix(in srgb, var(--atlas-or) 7%, transparent); font-size: .92em; }
.corps .note-presentation p { margin: 0; }

/* =====================================================================
   TEXTES — l'onglet « Textes » (bibliographie commentée, pages.page_textes)
   et les pages « Texte – … » (classe .est-texte sur le cadre de l'article).
   Un même vocabulaire : l'or de l'atlas pour le genre « Texte », l'auteur en
   petites capitales, le titre en italique, la source en petit, puis la
   présentation. Les textes eux-mêmes se lisent sur une « feuille » sobre.
   ===================================================================== */
.planche-genre { margin: 0 0 .5rem; font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; }
.planche-genre a { color: var(--atlas-or); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--atlas-or) 45%, transparent); }
.planche-genre a:hover { border-bottom-color: var(--atlas-or); }
.planche-genre span { color: var(--atlas-ivoire); }

/* La présentation (premier paragraphe) : en italique, comme une notice. */
.est-texte .corps > p:first-child { font-style: italic; color: var(--discret); max-width: 38rem; }
/* La feuille : le texte sans bordure rouge, plus de souffle, guillemet d'ouverture en or. */
.est-texte blockquote.citation { position: relative; margin: 1.6rem 0; padding: 1.6rem clamp(1rem, 3vw, 2.2rem) 1.2rem;
  border: 1px solid var(--filet); border-left: 1px solid var(--filet); border-radius: 4px;
  background: color-mix(in srgb, var(--atlas-or) 4%, var(--fond)); font-size: 1em; line-height: 1.7; }
.est-texte blockquote.citation::before { content: "“"; position: absolute; top: .55rem; left: .7rem;
  color: var(--atlas-or); font: 400 2.6rem/1 Georgia, serif; opacity: .8; }
.est-texte blockquote.citation .titre-texte { margin: 0 0 1rem; font-size: .78rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--atlas-or-texte); }
.est-texte blockquote.citation p + p { text-indent: 1.5em; }
.est-texte blockquote.citation footer { margin-top: 1.1rem; text-align: right; font-size: .9em; }
.est-texte blockquote.citation footer::before { content: "— "; }
.cite-dans { margin-top: 2rem; padding-top: .8rem; border-top: 1px solid var(--filet); font-size: .9em; color: var(--discret); }

/* Page de thème : le lien vers les textes du chapitre. */
.vers-textes { margin: 0 0 1.4rem; }
.vers-textes a { display: inline-block; padding: .35rem .9rem; border: 1px solid var(--atlas-or); border-radius: 999px;
  color: var(--atlas-or-texte); text-decoration: none; font-size: .9rem; }
.vers-textes a:hover { background: color-mix(in srgb, var(--atlas-or) 12%, transparent); }

/* L'onglet « Textes » */
.page-textes .chapo-textes { margin: 0 0 1.2rem; font-style: italic; color: var(--discret); font-size: 1.05rem; }
.textes-reserves { font-size: .9rem; }
.biblio-theme { margin: 2.2rem 0 0; }
.page-textes .biblio-theme:first-of-type { margin-top: 1rem; }
.biblio-theme h2 { margin: 0 0 1rem; padding-bottom: .4rem; border-bottom: 1px solid var(--filet); font-weight: 600; font-size: 1.4rem; }
/* La teinte de la notion ne vit que sur la planche : sur le papier, le titre est à l'encre et la
   notion se signale par sa pastille (un astre, donc ronde). */
.biblio-theme h2 .notion { color: var(--texte); }
.biblio-theme h2 .notion::before { content: ""; display: inline-block; width: .5em; height: .5em; margin: 0 .45em .12em 0;
  border-radius: 50%; background: var(--teinte, var(--atlas-or)); vertical-align: middle; }
.biblio-theme h2 small { font-size: .8rem; color: var(--discret); letter-spacing: .05em; }
.biblio-textes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.biblio-texte { display: grid; gap: .15rem; padding-top: .75rem; border-top: 1px solid color-mix(in srgb, var(--atlas-or) 70%, transparent); }
.biblio-texte:first-child { padding-top: 0; border-top: 0; }    /* le filet du titre de chapitre suffit */
.biblio-auteur { font-variant: small-caps; letter-spacing: .04em; font-weight: 600; color: var(--texte); }
.biblio-titre { font-style: italic; font-size: 1.05rem; }
.biblio-titre a { text-decoration: none; }
.biblio-titre a:hover { text-decoration: underline; }
.biblio-source { font-size: .82rem; color: var(--discret); }
.biblio-presentation { margin-top: .2rem; font-size: .95rem; line-height: 1.55; max-width: 44rem; }
.biblio-texte.reserve .biblio-titre::after { content: " · réservé aux enseignants"; font-style: normal; font-size: .75rem; color: var(--discret); }
@media print { .textes-reserves { display: none; } }

/* ===================================================== SUGGESTIONS (professeurs)
   js/suggestion.js : le texte modifiable sur place, un bandeau en bas de l'écran,
   la fenêtre d'envoi ; barre de droite : l'historique des contributions. */
.annexe-suggerer { flex-basis: 100%; }
.article .corps.en-suggestion { outline: 2px dashed var(--lien); outline-offset: .6rem; border-radius: 2px; caret-color: var(--lien); }
.article .corps.en-suggestion:focus { outline-style: solid; }
body:has(.suggestion-panneau) { padding-bottom: 9rem; }
.suggestion-panneau { position: fixed; z-index: 50; left: 50%; bottom: 1rem; transform: translateX(-50%);
  width: min(44rem, calc(100% - 2rem)); padding: .8rem 1rem; background: var(--fond); color: var(--texte);
  border: 1px solid var(--texte); box-shadow: 0 .5rem 1.6rem rgb(0 0 0 / .18); font: .95rem var(--police); }
.suggestion-panneau p { margin: 0 0 .4rem; }
.suggestion-etat { color: var(--discret); font-size: .88rem; min-height: 1.2em; }
.suggestion-etat.erreur, .suggestion-erreur { color: var(--alerte); }
.suggestion-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.suggestion-actions button { font: inherit; padding: .4rem .9rem; border: 1px solid var(--texte); background: var(--fond); color: var(--texte); cursor: pointer; }
.suggestion-actions button.principal { background: var(--texte); color: var(--fond); }
.suggestion-actions button:disabled { opacity: .55; cursor: wait; }
.suggestion-dialogue { width: min(42rem, calc(100% - 2rem)); max-height: calc(100vh - 2rem); padding: 1.2rem 1.4rem; border: 1px solid var(--texte);
  background: var(--fond); color: var(--texte); font: 1rem var(--police); }
.suggestion-dialogue.petit { width: min(26rem, calc(100% - 2rem)); }
.suggestion-dialogue::backdrop { background: rgb(0 0 0 / .45); }
.suggestion-dialogue h2 { margin: 0 0 .3rem; font-size: 1.2rem; }
.suggestion-dialogue .sous { margin: 0 0 .8rem; color: var(--discret); }
.suggestion-liste { max-height: 14rem; overflow: auto; margin: 0 0 1rem; padding: .4rem 0 .4rem 1.6rem; border-block: 1px solid var(--filet); font-size: .9rem; }
.suggestion-liste li { margin: .3rem 0; }
.suggestion-liste small { color: var(--discret); }
.suggestion-liste del, .suggestion-dialogue del { color: #a1121a; background: #fde8e8; }
.suggestion-liste ins, .suggestion-dialogue ins { color: #11612f; background: #e3f6e8; text-decoration: none; }
.suggestion-champ { display: block; margin: 0 0 .9rem; border: 0; padding: 0; }
.suggestion-champ textarea { display: block; width: 100%; margin-top: .3rem; font: inherit; padding: .4rem; border: 1px solid var(--discret); background: var(--fond); color: var(--texte); }
.suggestion-champ legend { padding: 0; margin-bottom: .3rem; }
.suggestion-champ label { display: block; margin: .2rem 0; }
.suggestion-champ small { color: var(--discret); }
.suggestion-merci { padding: .7rem 1rem; border-left: 3px solid #1f7a3f; background: #eef8f1; color: #14361f; }
.annexe-historique ol { margin: 0 0 .6rem; padding: 0; list-style: none; max-height: 16rem; overflow: auto; font-size: .85rem; }
.annexe-historique li { padding: .3rem 0; border-bottom: 1px solid var(--filet); }
.annexe-historique li:last-child { border-bottom: 0; }
.annexe-historique .quand { color: var(--discret); }
.annexe-historique .qui { font-weight: 600; }
.annexe-historique .anonyme { font-weight: 400; font-style: italic; }
.annexe-historique .partielle { color: var(--discret); }
.annexe-historique .quoi { display: block; }
/* sombre : choisi (data-theme="sombre") ou suivant l'appareil (auto) */
:root[data-theme="sombre"] .suggestion-merci { background: #12301d; color: #d6f2df; }
:root[data-theme="sombre"] :is(.suggestion-liste, .suggestion-dialogue) del { background: #4a1517; color: #ffd2d2; }
:root[data-theme="sombre"] :is(.suggestion-liste, .suggestion-dialogue) ins { background: #12351f; color: #ccf3d8; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .suggestion-merci { background: #12301d; color: #d6f2df; }
  :root[data-theme="auto"] :is(.suggestion-liste, .suggestion-dialogue) del { background: #4a1517; color: #ffd2d2; }
  :root[data-theme="auto"] :is(.suggestion-liste, .suggestion-dialogue) ins { background: #12351f; color: #ccf3d8; } }
/* Bouton de second rang dans un formulaire (« Non, garder deux comptes ») : filet, sans fond. */
.formulaire button.secondaire { background: transparent; color: inherit; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
.formulaire.choix-fusion { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Page que seule l'administration peut lire (api.py, pages.reservee_admin) : un fond
   parchemin, pour ne jamais la confondre avec une page que d'autres voient. */
:root { --fond-perso: #f5efdf; }
:root[data-theme="sombre"] { --fond-perso: #221e14; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --fond-perso: #221e14; } }
body.page-perso, body.page-perso main { background: var(--fond-perso); }

/* « Mes classes » : onglets Gestion des élèves / Mémori élèves (memori.js) ----------- */
.onglets-classes { margin: 0 0 1.25rem; }
.page-classes .bouton-fichier { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem 1rem; border: 1px solid var(--texte); cursor: pointer; font-variant: small-caps; letter-spacing: .03em; }
.page-classes .bouton-fichier:hover { border-color: var(--atlas-or); }
.memori-liste { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; }
.memori-liste a { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .8rem 1rem; border: 1px solid var(--filet); color: inherit; text-decoration: none; }
.memori-liste a:hover { border-color: var(--atlas-or); }
.memori-liste strong { grid-column: 1 / -1; }
.memori-jauge { display: inline-block; width: 7rem; height: 4px; background: var(--filet); vertical-align: middle; }
.memori-jauge i { display: block; height: 100%; background: var(--atlas-or); }
.memori-champs { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; margin: 0 0 1rem; }
.memori-champs label { display: flex; flex-direction: column; gap: .25rem; font-variant: small-caps; color: var(--discret); }
.memori-champs input, .memori-champs select { font: 1rem var(--police); padding: .45rem .5rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); min-width: 14rem; }
.memori-grille { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .9rem .7rem; }
@media (max-width: 480px) { .memori-grille { grid-template-columns: repeat(3, 1fr); gap: .6rem .5rem; } }
.memori-grille li { border: 0; padding: 0; }
.memori-grille img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--filet); }
.memori-grille.edition input { width: 100%; margin-top: .3rem; font: .85rem var(--police); padding: .25rem .3rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); }
.memori-grille button { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; position: relative; }
.memori-grille button:focus-visible { outline: 2px solid var(--atlas-or); outline-offset: 2px; }
.memori-grille .photo { display: block; position: relative; }
.memori-grille .nom { display: block; margin-top: .3rem; font-size: .88rem; line-height: 1.25; min-height: 2.2em; }
.memori-grille.cache-noms button:not(.revelee) .nom { color: transparent; background: var(--filet); }
.memori-grille.cache-photos button:not(.revelee) .photo img { visibility: hidden; }
.memori-grille.cache-photos button:not(.revelee) .photo { background: var(--filet); aspect-ratio: 3 / 4; }
.pastille-su { position: absolute; top: .3rem; right: .3rem; background: var(--atlas-nuit); color: var(--atlas-or); font-size: .75rem; padding: 0 .3rem; }
.sans-photo { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; background: var(--filet); font-size: 2rem; color: var(--discret); }
.memori-tete { margin: 0 0 1rem; }
.memori-tete h2 { margin: .4rem 0 .2rem; }
.memori-tete .retour { font-size: .9rem; }
.memori-modes, .memori-cacher { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0; }
.memori-modes button, .memori-genres button, .memori-cacher button, .memori-actions button, .memori-fin button, .memori-carte > button {
  min-height: 2.75rem; padding: .45rem .9rem; border: 1px solid var(--filet); background: transparent; color: var(--texte); font: 1rem var(--police); font-variant: small-caps; letter-spacing: .03em; cursor: pointer; }
.memori-modes button[aria-pressed="true"], .memori-genres button[aria-pressed="true"], .memori-cacher button[aria-pressed="true"] { border-color: var(--atlas-or); box-shadow: inset 0 -2px 0 var(--atlas-or); }
.page-classes button.primaire { background: var(--atlas-nuit); color: #f1efe8; border-color: var(--atlas-nuit); }
.page-classes button.danger { color: var(--alerte); border-color: var(--alerte); }
.memori-carte { max-width: 22rem; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: .9rem; align-items: stretch; }
.memori-carte .photo { display: block; }
.memori-carte .photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.memori-carte .photo.masquee { background: var(--filet); }
.memori-carte .nom { font-size: 1.3rem; font-weight: 600; margin: 0; min-height: 1.6em; }
.memori-carte .nom.masquee { color: var(--discret); }
.memori-choix { display: grid; gap: .5rem; }
.memori-choix button { min-height: 3rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); font: 1.02rem var(--police); cursor: pointer; }
.memori-choix button.bon { border-color: var(--atlas-or); background: color-mix(in srgb, var(--atlas-or) 14%, var(--fond)); font-weight: 600; }
.memori-choix button.faux { border-color: var(--alerte); color: var(--alerte); }
.memori-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: .6rem 0; }
.memori-progres { text-align: center; }
.memori-fin { text-align: center; padding: 2rem 0; }
.memori-reglages { margin-top: 2.5rem; color: var(--discret); }

/* Transmission de cours : l'onglet d'enregistrement (transmission.js) ------------------ */
.page-transmission .primaire, .page-transmission button { min-height: 2.75rem; padding: .45rem 1rem; border: 1px solid var(--filet); background: transparent; color: var(--texte); font: 1rem var(--police); font-variant: small-caps; letter-spacing: .03em; cursor: pointer; }
.page-transmission button.primaire, .cours-questions button.primaire { background: var(--atlas-nuit); color: #f1efe8; border-color: var(--atlas-nuit); }
.page-transmission button.danger { color: var(--alerte); border-color: var(--alerte); }
.tr-nouveau { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin: 0 0 1.5rem; }
.tr-nouveau label { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 16rem; font-variant: small-caps; color: var(--discret); }
.tr-nouveau input, .tr-nouveau select, .tr-titre, .tr-lien input { font: 1rem var(--police); padding: .5rem .6rem; border: 1px solid var(--filet); border-radius: 0; background: var(--fond); color: var(--texte); min-height: 2.6rem; }
.tr-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.tr-liste a { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .8rem 1rem; border: 1px solid var(--filet); color: inherit; text-decoration: none; }
.tr-liste a:hover { border-color: var(--atlas-or); }
.tr-liste .aide { grid-column: 1 / -1; }
.tr-etat { font-size: .85rem; font-variant: small-caps; color: var(--discret); }
.tr-etat[data-etat="pret"] { color: var(--atlas-nuit); }
.tr-etat[data-etat="traitement"], .tr-etat[data-etat="enregistrement"] { color: var(--atlas-or); }
.tr-etat[data-etat="erreur"] { color: var(--alerte); }
.tr-titre { width: 100%; font-size: 1.35rem; font-weight: 600; border-color: transparent; padding-left: 0; }
.tr-titre:hover, .tr-titre:focus { border-color: var(--filet); padding-left: .6rem; }
.tr-micro { margin: 1.2rem 0 2rem; padding: 1.5rem 1rem; border: 1px solid var(--filet); text-align: center; display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.page-transmission .tr-gros { min-height: 4.5rem; min-width: min(100%, 22rem); font-size: 1.35rem; background: var(--atlas-nuit); color: #f1efe8; border-color: var(--atlas-nuit); }
.page-transmission .tr-gros.en-cours { background: transparent; color: var(--texte); border: 2px solid var(--alerte); }
.page-transmission .tr-terminer { border-color: var(--texte); }
.tr-chrono { display: flex; align-items: center; gap: .7rem; margin: 0; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.tr-point { width: .8rem; height: .8rem; border-radius: 50%; background: var(--alerte); }   /* fixe : le chronomètre qui avance dit déjà que ça enregistre */
.tr-point.pause { background: var(--discret); }
.tr-niveau { display: inline-block; width: 6rem; height: 6px; background: var(--filet); }
.tr-niveau i { display: block; height: 100%; width: 0; background: var(--atlas-or); transition: width .1s linear; }
.tr-bloc { margin: 0 0 2rem; }
.tr-case { display: flex; gap: .5rem; align-items: baseline; margin: .3rem 0 .6rem; }
.tr-lien { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.tr-lien[hidden] { display: none; }
.tr-lien input { flex: 1 1 18rem; min-width: 0; font-size: .9rem; }
.tr-classe { border: 1px solid var(--filet); margin: 0 0 .5rem; padding: .5rem .8rem; }
.tr-classe summary { display: flex; justify-content: space-between; gap: 1rem; cursor: pointer; }
.tr-classe ul { list-style: none; padding: 0; margin: .6rem 0 .2rem; columns: 2 14rem; }
.tr-classe li { break-inside: avoid; padding: .15rem 0; }
.tr-questions { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.tr-questions li { border-top: 1px solid var(--filet); padding-top: .6rem; }
.tr-questions p { margin: .2rem 0; }
.tr-q { font-style: italic; }
.tr-reglages { margin-top: 2.5rem; color: var(--discret); }

/* La page d'un cours transmis (cours-transmis.js) ------------------------------------ */
.cours-outils { font-size: .9rem; margin: 0 0 .5rem; }
.cours-transmis .meta { color: var(--discret); margin-top: -.4rem; }
.cours-lecteur { margin: 1.2rem 0 1.6rem; }
.cours-lecteur .aide { margin: .45rem 0 0; font-size: .85rem; }
.cours-fil { font-size: .9rem; margin: 0 0 .3rem; font-variant: small-caps; letter-spacing: .04em; }
.cours-transmis .chapo { margin: .4rem 0 0; }
.cours-transmis a.horodatage { font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--discret); text-decoration: none; border: 1px solid var(--filet); padding: 0 .35rem; margin-right: .35rem; white-space: nowrap; }
.cours-transmis a.horodatage:hover { color: var(--texte); border-color: var(--atlas-or); }
/* Karaoké : le paragraphe entendu ressort, les autres restent lisibles. */
.cours-transmis .corps p { transition: background-color .25s ease, color .25s ease; }
.cours-transmis .corps p.ecoute { background: color-mix(in srgb, var(--atlas-or) 16%, transparent); box-shadow: 0 0 0 .4rem color-mix(in srgb, var(--atlas-or) 16%, transparent); color: var(--texte); }
@media (prefers-reduced-motion: reduce) { .cours-transmis .corps p { transition: none; } }
.cours-voisins { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.5rem; margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--filet); }
.cours-voisins a[rel="next"] { margin-left: auto; text-align: right; }
.cours-serie .seances { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.cours-serie .seance { padding: 1.1rem 0; border-top: 1px solid var(--filet); }
.cours-serie .seance h2 { margin: .2rem 0 .4rem; font-size: 1.25rem; }
.cours-serie .seance h2 a { text-decoration: none; }
.cours-serie .seance h2 a:hover { text-decoration: underline; }
.seance-tete { margin: 0; font-size: .88rem; color: var(--discret); }
.seance-num { font-variant: small-caps; letter-spacing: .05em; color: var(--atlas-encre, var(--texte)); }
.seance-chapo { margin: 0; color: var(--discret); line-height: 1.55; }
.tr-chapo { color: var(--discret); font-style: italic; }
.tr-seances { list-style: none; }
.cours-questions { margin: 2.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--filet); }
/* Questions sur une séance, en conversation avec AuriachBot (cours-transmis.js) */
.cours-chat { display: flex; flex-direction: column; gap: .7rem; max-height: 34rem; overflow-y: auto; padding: .4rem .2rem 1rem; }
.chat-ligne { display: flex; gap: .55rem; align-items: flex-end; }
.chat-moi { justify-content: flex-end; }
.chat-bulle { max-width: min(36rem, 85%); padding: .6rem .9rem; border-radius: 1.1rem; line-height: 1.5; overflow-wrap: anywhere; }
.chat-bulle p { margin: 0 0 .5rem; } .chat-bulle p:last-child { margin-bottom: 0; }
.chat-moi .chat-bulle { background: var(--atlas-nuit); color: #f1efe8; border-bottom-right-radius: .3rem; }
.chat-bot .chat-bulle { background: color-mix(in srgb, var(--texte) 6%, var(--fond)); border: 1px solid var(--filet); border-bottom-left-radius: .3rem; }
.chat-avatar { flex: 0 0 2rem; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  background: var(--atlas-nuit); color: var(--atlas-or); }
.chat-niveau { display: block; margin-top: .25rem; font-size: .72rem; font-variant: small-caps; letter-spacing: .04em; opacity: .7; text-align: right; }
.chat-bot .cours-q-sources { margin-top: .6rem; padding: .5rem 0 0; border-top: 1px solid var(--filet); list-style: none; }
.chat-bot .cours-q-sources li { border: 0; padding: .15rem 0; margin: 0; }
.chat-bot .cours-q-sources li::before { content: "→ "; color: var(--discret); }
.chat-patience { display: block; margin-top: .35rem; font-size: .82rem; color: var(--discret); font-style: italic; }
.chat-bot.attente .chat-bulle { padding: .75rem 1rem; }
.points { display: inline-flex; gap: .3rem; align-items: center; height: .9rem; color: var(--discret); }
.points i { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; opacity: .3; animation: chat-points 1.2s infinite ease-in-out; }
.points i:nth-child(2) { animation-delay: .18s; } .points i:nth-child(3) { animation-delay: .36s; }
@keyframes chat-points { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: .9; transform: translateY(-.2rem); } }
@media (prefers-reduced-motion: reduce) { .points i { animation: none; opacity: .6; } }
.chat-saisie { margin-top: .8rem; }
.chat-niveaux { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 .45rem; }
.chat-niveaux label { cursor: pointer; }
.chat-niveaux input { position: absolute; opacity: 0; pointer-events: none; }
.chat-niveaux span:not(.chat-reste) { display: inline-block; padding: .25rem .75rem; border: 1px solid var(--filet); border-radius: 1rem; font-size: .85rem; }
.chat-niveaux input:checked + span { border-color: var(--atlas-nuit); background: var(--atlas-nuit); color: #f1efe8; }
.chat-niveaux input:focus-visible + span { outline: 2px solid var(--atlas-or); outline-offset: 2px; }
.chat-reste { margin-left: auto; font-size: .8rem; color: var(--discret); }
.chat-champ { display: flex; gap: .5rem; align-items: flex-end; }
.chat-champ textarea { flex: 1; resize: none; max-height: 10rem; padding: .6rem .9rem; border: 1px solid var(--filet); border-radius: 1.3rem; background: var(--fond); color: var(--texte); font: 1rem var(--police); }
.chat-champ button { flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: var(--atlas-nuit); color: #f1efe8; display: grid; place-items: center; cursor: pointer; }
.chat-champ button:disabled { opacity: .45; cursor: default; }
.chat-champ button svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.cours-q { margin: 0 0 1.2rem; }
.cours-q-question { font-weight: 600; margin: 0 0 .3rem; }
.cours-q-reponse { padding-left: 1rem; border-left: 1px solid var(--filet); }
.cours-q-form { display: flex; flex-direction: column; gap: .5rem; }
.cours-q-form textarea { font: 1rem var(--police); padding: .5rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); }
.cours-q-form button { align-self: flex-start; min-height: 2.75rem; padding: .45rem 1rem; border: 1px solid var(--atlas-nuit); font: 1rem var(--police); font-variant: small-caps; cursor: pointer; }
.cours-q-niveau { font-weight: 400; font-size: .8rem; font-variant: small-caps; letter-spacing: .04em; color: var(--discret); margin-left: .4rem; }
.cours-q-niveaux { border: 1px solid var(--filet); padding: .5rem .8rem .7rem; margin: 0; display: grid; gap: .45rem; }
.cours-q-niveaux legend { padding: 0 .3rem; font-variant: small-caps; color: var(--discret); }
.cours-q-niveaux label { display: block; line-height: 1.4; }
.cours-q-sources { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .92rem; }
.cours-q-sources li { margin: .3rem 0; }
.cours-q-sources q { color: var(--discret); font-style: italic; }
.cours-q-attente { font-style: italic; }

/* Sécurité et analytics › MCP et API (reglages-api.js) */
.api-cle { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin: .8rem 0; }
.api-cle label { flex-basis: 100%; font-variant: small-caps; color: var(--discret); }
.api-cle input, #partage-recherche { flex: 1 1 18rem; font: 1rem var(--police); padding: .45rem .6rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); }
.api-cle button { min-height: 2.6rem; padding: .4rem 1rem; border: 1px solid var(--texte); background: transparent; color: var(--texte); font: 1rem var(--police); font-variant: small-caps; cursor: pointer; }
.partage-modes { border: 1px solid var(--filet); padding: .5rem .8rem .7rem; margin: .6rem 0; display: grid; gap: .35rem; }
.partage-modes legend { padding: 0 .3rem; font-variant: small-caps; color: var(--discret); }
.partage-liste label[for] { display: block; margin: .4rem 0 .2rem; font-variant: small-caps; color: var(--discret); }
#partage-recherche { width: 100%; box-sizing: border-box; }
.partage-personnes { list-style: none; padding: 0; margin: .4rem 0 .8rem; max-height: 16rem; overflow-y: auto; }
.partage-personnes li { padding: .2rem 0; }
.partage-personnes .detail { margin-left: .4rem; font-size: .85rem; }

/* Séance transmise : prises de parole d'élèves (voix distinguées par Voxtral, transmission.py) */
.cours-transmis .corps p.parole-eleve { margin-left: 1.6rem; padding: .45rem .8rem; border-radius: .6rem; font-style: italic;
  background: color-mix(in srgb, var(--atlas-or) 11%, transparent); }
.cours-transmis .corps p.parole-eleve .locuteur { font-style: normal; font-variant: small-caps; letter-spacing: .05em; color: var(--discret); margin-right: .3rem; }
/* Transmission de cours : voix de référence */
.tr-voix audio { display: block; width: 100%; max-width: 28rem; margin: .4rem 0 .8rem; }
.tr-voix-actions { display: grid; gap: .6rem; }
.tr-voix-actions > button { justify-self: start; }
.tr-voix-podcast { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-top: .6rem; }
.tr-voix-podcast label { display: flex; flex-direction: column; gap: .2rem; font-variant: small-caps; color: var(--discret); }
.tr-voix-podcast select, .tr-voix-podcast input { font: 1rem var(--police); padding: .4rem .5rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); }
.tr-voix-podcast input[type=number] { width: 6rem; }
/* Séance transmise : passage dicté (texte des élèves, en gras ; transmission.py) */
.cours-transmis .corps p.dictee strong { font-weight: 700; }
/* Séance transmise : interrupteur Original / Version retouchée (administration) */
.cours-versions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 1rem; }
.cours-versions button { padding: .3rem .8rem; border: 1px solid var(--filet); border-radius: 1rem; background: transparent; color: var(--texte); font: .9rem var(--police); cursor: pointer; }
.cours-versions button[aria-pressed="true"] { background: var(--atlas-nuit); border-color: var(--atlas-nuit); color: #f1efe8; }
.cours-versions .aide { font-size: .8rem; }
.tr-retouche { margin: .4rem 0 .8rem; }
/* L'enregistreur dans une fenêtre à part (transmission.js, mode « enregistreur ») */
.page-enregistreur .tr-enreg-titre { font-weight: 600; font-size: 1.1rem; margin: 0 0 .2rem; }
.page-enregistreur .tr-micro { margin-top: .6rem; }
.tr-coupure { margin: 0 0 .4rem; }
/* Transmission : réunions, appli Android */
.tr-nouvelle-reunion textarea { font: 1rem var(--police); padding: .45rem .6rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); min-width: 16rem; }
.tr-code { font-size: 1.1rem; } .tr-code strong { font-size: 1.6rem; letter-spacing: .12em; font-family: ui-monospace, monospace; }
.tr-appareil { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem 0; }
.cours-transmis .participants { color: var(--discret); margin: .2rem 0 0; }
.cours-transmis .corps p.tour .intervenant { font-weight: 700; }

/* =============================================================================
   NOTES (notes.js, /pages/notes/) — refaites en nov. 2026 (demande de Julien) :
   toute la largeur ; à gauche la liste cherchable, à droite la note ouverte sur la
   moitié de l'écran. Monde de l'atlas : papier plat, filets d'un pixel, angles
   droits, or en trait (sélection, curseur, focus), Latin Modern ; le texte d'une
   note se lit en New Computer Modern Book, comme celui des articles.
   ============================================================================= */
.page-notes { max-width: none; padding: 0; border: 0; }
.nt { --nt-gauche-fond: color-mix(in srgb, var(--atlas-voile) 70%, var(--fond));
      --nt-pas: 1.5rem;                                     /* marge intérieure des deux volets */
      --nt-plein: var(--atlas-nuit); --nt-plein-2: var(--atlas-nuit-2); --nt-sur-plein: var(--atlas-ivoire);   /* bouton principal, mode actif */
      display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--filet); }
/* Thème sombre : le bleu nuit se perdrait sur le fond noir ; le « plein » devient ivoire, le texte nuit. */
:root[data-theme="sombre"] .nt { --nt-plein: var(--atlas-ivoire); --nt-plein-2: #d9d6cc; --nt-sur-plein: var(--atlas-nuit); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .nt { --nt-plein: var(--atlas-ivoire); --nt-plein-2: #d9d6cc; --nt-sur-plein: var(--atlas-nuit); } }
.nt ::selection { background: color-mix(in srgb, var(--atlas-or) 35%, transparent); }
.nt :focus-visible { outline: 2px solid var(--atlas-or); outline-offset: 2px; border-radius: 0; }
.nt input, .nt textarea { caret-color: var(--atlas-or-texte); }

/* Boutons : texte seul, angles droits, filet d'un pixel */
.nt-bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 2.25rem; padding: .3rem .85rem;
  border: 1px solid var(--filet); border-radius: 0; background: var(--fond); color: var(--texte);
  font: 400 .95rem/1.2 var(--police); white-space: nowrap; cursor: pointer; transition: border-color .15s ease-out, background-color .15s ease-out; }
.nt-bouton:hover { border-color: var(--texte); }
.nt-bouton.primaire { background: var(--nt-plein); border-color: var(--nt-plein); color: var(--nt-sur-plein); font-weight: 600; }
.nt-bouton.primaire:hover { background: var(--nt-plein-2); border-color: var(--nt-plein-2); }
.nt-bouton.danger { color: var(--alerte); }
.nt-bouton.danger:hover { border-color: var(--alerte); }
.nt-lien { all: unset; cursor: pointer; color: var(--discret); text-decoration: underline; text-decoration-color: var(--atlas-or);
  text-underline-offset: .2em; font-size: .9rem; }
.nt-lien:hover { color: var(--texte); }
.nt-vide { margin: 2rem var(--nt-pas); color: var(--discret); font-style: italic; }

/* ---- Volet de gauche : la liste ---- */
.nt-gauche { display: flex; flex-direction: column; min-width: 0; background: var(--nt-gauche-fond); }
.nt-gauche-tete { display: grid; gap: .65rem; padding: 1.1rem var(--nt-pas) .9rem; border-bottom: 1px solid var(--filet); background: var(--nt-gauche-fond); }
.nt-ligne { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nt-nom { margin: 0; font: 600 1.45rem/1.2 var(--police); color: var(--texte); }
.nt-compte { margin-left: .4rem; font: 400 .9rem var(--police); font-variant: small-caps; letter-spacing: .03em; color: var(--discret); font-variant-numeric: tabular-nums; }
.nt-cherche { position: relative; }
.nt-cherche input { width: 100%; min-height: 2.6rem; padding: .45rem 2.4rem .45rem .8rem; border: 1px solid var(--filet); border-radius: 0;
  background: var(--fond); color: var(--texte); font: 1.05rem var(--police); }
.nt-cherche input::placeholder { color: var(--discret); opacity: 1; }
.nt-cherche input:focus { border-color: var(--atlas-or); outline: none; box-shadow: 0 0 0 1px var(--atlas-or); }
.nt-cherche input::-webkit-search-cancel-button { cursor: pointer; }
.nt-cherche kbd { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); padding: 0 .4rem; border: 1px solid var(--filet);
  color: var(--discret); font: .8rem/1.5 var(--police); pointer-events: none; }
.nt-cherche input:focus + kbd, .nt-cherche input:not(:placeholder-shown) + kbd { display: none; }
#nt-dossiers { justify-self: start; max-width: 100%; min-height: 2.1rem; padding: .2rem .5rem; border: 1px solid var(--filet); border-radius: 0;
  background: var(--fond); color: var(--texte); font: .92rem var(--police); cursor: pointer; }

.nt-liste-zone { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--filet) transparent; }
main .nt-liste { list-style: none; margin: 0; padding: 0; }
main .nt-liste li { position: relative; padding: 0; border: 0; border-bottom: 1px solid var(--filet); }
/* La case de sélection, dans la marge gauche de chaque note : visible au survol, au clavier,
   dès qu'une note est cochée, et toujours sur un écran tactile. */
.nt-choix { position: absolute; z-index: 1; left: calc(var(--nt-pas) / 2 - .45rem); top: .95rem; appearance: none; width: .9rem; height: .9rem; margin: 0;
  border: 1px solid var(--discret); border-radius: 0; background: var(--fond); cursor: pointer; opacity: 0; transition: opacity .12s ease-out; }
.nt-choix:checked { background: var(--nt-plein); border-color: var(--nt-plein); box-shadow: inset 0 0 0 2px var(--fond); }
.nt-liste li:hover .nt-choix, .nt-choix:focus-visible, .nt[data-selection] .nt-choix { opacity: 1; }
@media (hover: none) { .nt-choix { opacity: 1; } }
.nt-liste li.choisie .nt-item { background: color-mix(in srgb, var(--atlas-or) 12%, transparent); }
.nt-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.nt-filtres .nt-lien { font-size: .88rem; }
.nt-selection { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; padding: .55rem .7rem; border: 1px solid var(--atlas-or);
  background: var(--fond); font: .9rem var(--police); }
.nt-selection-nb { color: var(--texte); font-variant-numeric: tabular-nums; }
.nt-selection select { max-width: 11rem; min-height: 2rem; padding: .15rem .4rem; border: 1px solid var(--filet); border-radius: 0; background: var(--fond); color: var(--texte); font: .9rem var(--police); }
.nt-selection .nt-bouton { min-height: 2rem; padding: .15rem .7rem; font-size: .9rem; }
.nt-toast:not([hidden]) { position: fixed; z-index: 30; left: 1rem; bottom: 1rem; display: flex; align-items: center; gap: 1rem; max-width: min(34rem, calc(100vw - 2rem));
  padding: .7rem 1rem; background: var(--nt-plein); color: var(--nt-sur-plein); font: .95rem var(--police);
  box-shadow: 0 6px 20px rgb(0 0 0 / .18); animation: nt-toast .22s cubic-bezier(.16, 1, .3, 1); }
.nt-toast .nt-lien { color: inherit; font-weight: 600; font-size: .95rem; }
@keyframes nt-toast { from { opacity: 0; transform: translateY(.5rem); } }
@media (prefers-reduced-motion: reduce) { .nt-toast:not([hidden]) { animation: none; } }
.nt-item { all: unset; box-sizing: border-box; display: grid; gap: .15rem; width: 100%; padding: .65rem var(--nt-pas) .7rem; cursor: pointer;
  transition: background-color .12s ease-out; }
.nt-item:hover { background: color-mix(in srgb, var(--texte) 4%, transparent); }
.nt-item[aria-current] { background: var(--fond); box-shadow: inset 0 0 0 1px var(--filet); }
.nt-item:focus-visible { outline: 2px solid var(--atlas-or); outline-offset: -2px; }
.nt-item-haut { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.nt-item-titre { font: 600 .97rem/1.3 var(--police); color: var(--texte); overflow-wrap: anywhere; }
.nt-item[aria-current] .nt-item-titre { text-decoration: underline; text-decoration-color: var(--atlas-or); text-underline-offset: .22em; text-decoration-thickness: 1px; }
.nt-item time { flex: none; color: var(--discret); font: .78rem var(--police); font-variant-numeric: tabular-nums; }
.nt-item-dossier { font: .78rem/1.3 var(--police); font-variant: small-caps; letter-spacing: .03em; color: var(--atlas-or-texte); }
.nt-item-extrait { font: .85rem/1.45 var(--police); color: var(--discret);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt mark { background: color-mix(in srgb, var(--atlas-or) 32%, transparent); color: inherit; padding: 0 .05em; }

/* ---- Volet de droite : la note ---- */
.nt-droite { min-width: 0; background: var(--fond); }
.nt-note-barre { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
  padding: .75rem var(--nt-pas); border-bottom: 1px solid var(--filet); background: var(--fond); }
.nt-modes { display: inline-flex; }
.nt-modes .nt-bouton + .nt-bouton { margin-left: -1px; }
.nt-modes .nt-bouton[aria-pressed="true"] { background: var(--nt-plein); border-color: var(--nt-plein); color: var(--nt-sur-plein); position: relative; }
.nt-etat { color: var(--discret); font: .88rem var(--police); font-style: italic; }
.nt-date { color: var(--discret); font: .8rem var(--police); font-variant-numeric: tabular-nums; }
.nt-date { margin-left: auto; }   /* à droite de la barre, avant les outils du mode Écrire */
.nt-outils { display: inline-flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }   /* mode Écrire (la date n'y est pas) */
.nt-outils .nt-bouton { min-height: 2rem; padding: .2rem .65rem; font-size: .88rem; }
.nt-outils label.nt-bouton { margin: 0; }
.nt-retour { display: none; }
.nt-bandeau:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0; padding: .7rem var(--nt-pas);
  border-bottom: 1px solid var(--alerte); background: color-mix(in srgb, var(--alerte) 8%, var(--fond)); }

/* La feuille : une colonne de lecture (~70 signes), centrée dans la moitié droite */
.nt-feuille { max-width: 44rem; margin: 0 auto; padding: 2rem var(--nt-pas) 5rem; }
.nt-titre { margin: 0 0 .35rem; font: 600 2rem/1.15 var(--police); color: var(--texte); text-wrap: balance; overflow-wrap: anywhere; }
.nt-note-meta { margin: 0 0 1.75rem; padding-bottom: .8rem; border-bottom: 1px solid var(--atlas-or); color: var(--discret); font: .92rem var(--police); }
.nt-note-meta span { font-variant: small-caps; letter-spacing: .03em; color: var(--atlas-or-texte); }

main .nt-pieces { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.5rem; padding: 0; }
main .nt-pieces li { display: inline-flex; align-items: baseline; gap: .5rem; padding: .35rem .7rem; border: 1px solid var(--filet); font: .92rem var(--police); }
.nt-piece-info { color: var(--discret); font-size: .85rem; }

/* Le texte rendu : la police et l'interligne des articles */
.nt-rendu { font: 1.2rem/1.65 "New Computer Modern Book", var(--police); color: var(--atlas-encre); overflow-wrap: break-word; }
@media (min-width: 75rem) { .nt-rendu { font-size: 1.15rem; } }
.nt-rendu > :first-child { margin-top: 0; }
.nt-rendu p, .nt-rendu ul, .nt-rendu ol, .nt-rendu blockquote, .nt-rendu pre { margin: 0 0 1em; }
.nt-rendu :is(h1, h2, h3, h4, h5, h6) { font-family: var(--police); color: var(--atlas-encre); line-height: 1.25; margin: 1.8em 0 .5em; }
.nt-rendu h1 { font-size: 1.55em; }
.nt-rendu h2 { font-size: 1.35em; }
.nt-rendu h3 { font-size: 1.18em; font-style: italic; }
.nt-rendu h4 { font-size: 1.05em; }
.nt-rendu :is(h5, h6) { font-size: 1em; font-weight: 400; font-style: italic; color: var(--discret); }
main .nt-rendu ul { list-style: disc; padding-left: 1.4em; }
main .nt-rendu ol { list-style: decimal; padding-left: 1.6em; }
main .nt-rendu li { padding: .1em 0; border: 0; }
.nt-rendu li::marker { color: var(--atlas-or-texte); }
main .nt-rendu ul.cases { list-style: none; padding-left: 0; }
main .nt-rendu ul.cases li { display: flex; gap: .55em; align-items: baseline; }
.nt-rendu ul.cases input { flex: none; appearance: none; width: .85em; height: .85em; margin: 0; border: 1px solid var(--atlas-encre); border-radius: 0;
  background: var(--fond); opacity: 1; transform: translateY(.1em); }
.nt-rendu ul.cases input:checked { background: var(--nt-plein); box-shadow: inset 0 0 0 2px var(--fond); }
.nt-rendu ul.cases li.fait span { color: var(--discret); text-decoration: line-through; text-decoration-color: var(--atlas-or); }
.nt-rendu blockquote { padding: .9em 1.2em .1em; border-top: 1px solid var(--atlas-or); background: var(--atlas-voile); font-size: .97em; }
.nt-rendu a { color: inherit; text-decoration: underline; text-decoration-color: var(--atlas-or); text-underline-offset: .22em; text-decoration-thickness: 1px; }
.nt-rendu a:hover { text-decoration-thickness: 2px; }
.nt-rendu code { font: .85em ui-monospace, Menlo, monospace; padding: .05em .3em; background: var(--atlas-voile); }
.nt-rendu pre { padding: .8em 1em; overflow-x: auto; background: var(--atlas-voile); border-top: 1px solid var(--filet); }
.nt-rendu pre code { padding: 0; background: none; }
.nt-rendu hr { border: 0; border-top: 1px solid var(--filet); margin: 2em 0; }

/* Mode Écrire : le titre, le dossier, puis le texte brut qui grandit avec la note */
.nt-titre-champ { width: 100%; margin: 0 0 .6rem; padding: .2rem 0 .4rem; border: 0; border-bottom: 1px solid var(--filet); border-radius: 0;
  background: transparent; color: var(--texte); font: 600 2rem/1.15 var(--police); }
.nt-titre-champ:focus { outline: none; border-bottom-color: var(--atlas-or); }
.nt-champs { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.5rem; margin: 0 0 1.2rem; }
.nt-champs label { display: flex; align-items: center; gap: .5rem; margin: 0; color: var(--discret); font: .95rem var(--police); font-variant: small-caps; letter-spacing: .03em; }
.nt-champs input:not([type]) { min-width: min(18rem, 60vw); padding: .3rem .55rem; border: 1px solid var(--filet); border-radius: 0;
  background: var(--fond); color: var(--texte); font: .95rem var(--police); font-variant: normal; letter-spacing: 0; }
.nt-champs .nt-case { font-variant: normal; letter-spacing: 0; font-size: .9rem; }
.nt-case input { accent-color: var(--nt-plein); }
#nt-texte { display: block; width: 100%; min-height: 20rem; resize: none; overflow: hidden; padding: 1rem 1.1rem; border: 1px solid var(--filet); border-radius: 0;
  background: var(--fond); color: var(--texte); font: .98rem/1.7 ui-monospace, Menlo, monospace; tab-size: 4; }
#nt-texte:focus { outline: none; border-color: var(--atlas-or); }
#nt-texte::placeholder { color: var(--discret); opacity: 1; }
.nt-astuce { color: var(--discret); font: italic .88rem var(--police); }
/* Glisser-déposer : un cadre or sur toute la feuille, et la consigne au milieu */
.nt-feuille { position: relative; }
.nt-feuille.nt-depot::after { content: attr(data-depot); position: absolute; inset: .75rem; z-index: 3; display: grid; place-items: center; padding: 1rem;
  border: 1px dashed var(--atlas-or); background: color-mix(in srgb, var(--fond) 88%, transparent); color: var(--texte);
  font: 600 1.15rem var(--police); text-align: center; pointer-events: none; }
.nt-aide { margin: .6rem 0 0; color: var(--discret); font: .85rem/1.8 var(--police); }
.nt-aide code { margin-right: .3rem; padding: .05rem .3rem; border: 1px solid var(--filet); font: .78rem ui-monospace, Menlo, monospace; }

/* Grand écran : le pied de page s'efface, la page prend toute la place à droite de la barre du
   site ; la note occupe exactement la moitié de l'écran, la liste le reste. Chaque volet défile seul. */
@media (min-width: 60rem) {
  body:has(.page-notes) { padding: 0 0 0 var(--barre); }
  body:has(.page-notes) > main { max-width: none; margin: 0; }
  body:has(.page-notes) > footer { display: none; }
  .nt { grid-template-columns: minmax(0, 1fr) 50vw; height: 100vh; height: 100dvh; border-top: 0; }
  .nt-gauche { border-right: 1px solid var(--filet); overflow: hidden; }
  .nt-droite { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--filet) transparent; }
  .nt { --nt-pas: 1.75rem; }
}
@media (min-width: 100rem) { .nt { --nt-pas: 2.25rem; } .nt-feuille { padding-top: 2.75rem; } }
/* Téléphone et petite tablette : la liste, puis la note en entier (« ← Notes » pour revenir) */
@media (max-width: 59.99rem) {
  body:has(.page-notes) > main { margin-top: 0; }
  body:has(.page-notes) > header { margin-bottom: 0; }
  .nt { --nt-pas: 1.25rem; margin: 0 -1.25rem; }
  .nt[data-vue="liste"] .nt-droite, .nt[data-vue="note"] .nt-gauche { display: none; }
  .nt-retour { display: inline-flex; }
  .nt-outils { margin-left: 0; }
  .nt-titre, .nt-titre-champ { font-size: 1.65rem; }
  .nt-feuille { padding-top: 1.5rem; }
  .nt-rendu { font-size: 1.15rem; }
  .nt-cherche kbd { display: none; }
}
/* Séances : chapitre posé à la main pendant l'enregistrement */
.cours-transmis .corps h2.chapitre { font-variant: small-caps; letter-spacing: .03em; }
.tr-chapitre { display: flex; gap: .4rem; width: min(100%, 30rem); }
.tr-chapitre input { flex: 1; font: 1rem var(--police); padding: .45rem .6rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); }
.tr-chapitres { list-style: none; padding: 0; margin: 0; text-align: left; width: min(100%, 30rem); }
.tr-chapitres li { padding: .15rem 0; border: 0; }
/* Séance : documents (OCR) */
.docs-seance { margin-top: 2rem; }
.doc-seance { margin: 0 0 1.5rem; }
.doc-seance img { max-width: 100%; height: auto; display: block; border: 1px solid var(--filet); }
.doc-ocr { margin-top: .5rem; }
/* Séances : notions importantes du chapo, passages surlignés */
.chapo-notions { margin: .4rem 0 1rem; padding-left: 0; list-style: none; color: var(--discret); }
.chapo-notions li { padding: .1rem 0 .1rem 1.1em; text-indent: -1.1em; border: 0; }
.chapo-notions li::before { content: "–"; display: inline-block; width: 1.1em; text-indent: 0; }
.cours-transmis mark.important { background: color-mix(in srgb, var(--atlas-or) 38%, transparent); color: inherit; padding: 0 .1rem; }
/* Séance : photo du tableau placée dans le texte ; visionneuse plein écran (cours-transmis.js) */
.doc-dans-le-texte { margin: 1rem 0 1.4rem; }
.doc-seance .zoomable { all: unset; display: block; cursor: zoom-in; }
.doc-seance .zoomable:focus-visible { outline: 2px solid var(--atlas-or); outline-offset: 3px; }
.doc-seance .zoomable img { max-width: 100%; max-height: 60vh; height: auto; display: block; margin: 0 auto; border: 1px solid var(--filet); }
.doc-seance figcaption { font-size: .85rem; color: var(--discret); text-align: center; margin-top: .3rem; }
.visionneuse { position: fixed; inset: 0; z-index: 1000; background: rgb(8 9 11 / .94); display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.visionneuse[hidden] { display: none; }
.visionneuse img { max-width: 96vw; max-height: 88vh; transform-origin: center; user-select: none; -webkit-user-drag: none; touch-action: none; }
.visionneuse-fermer { position: absolute; top: .8rem; right: 1rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: rgb(255 255 255 / .12); color: #fff; font-size: 1.6rem; cursor: pointer; }
.visionneuse-aide { position: absolute; bottom: .6rem; left: 0; right: 0; text-align: center; color: rgb(255 255 255 / .6); font-size: .8rem; margin: 0; }
html.visionneuse-ouverte { overflow: hidden; }
.dictee-recherche { width: 100%; box-sizing: border-box; font: 1rem var(--police); padding: .45rem .6rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); margin: .4rem 0; }
/* Version retouchée d'une séance : les échanges en dialogue (transmission._html_retouche) */
.cours-transmis .corps .echange { margin: .9rem 0 1.1rem; padding-left: .9rem; border-left: 2px solid var(--filet); }
.cours-transmis .corps .echange .replique { margin: .25rem 0; }
.cours-transmis .corps .echange .qui { font-variant: small-caps; letter-spacing: .04em; color: var(--discret); margin-right: .35rem; }
.cours-transmis .corps .echange .replique.eleve { font-style: italic; }
.cours-transmis .corps .echange .replique.eleve .qui { font-style: normal; }
.cours-transmis .corps .echange .replique.inconnu { color: var(--texte); }

/* ------------------------------------------------ Accueil : le mot de bienvenue (pages.page_bienvenue) */
/* Une page à part : le texte seul, centré dans l'écran, en taille de texte courant ; un trait d'or. */
.bienvenue { min-height: calc(100svh - 12rem); display: grid; place-items: center; padding: 2rem 0; }
.bienvenue-texte { max-width: 29rem; text-align: center; font-size: 1.08rem; line-height: 1.75; color: var(--texte); }
.bienvenue-texte::before { content: ""; display: block; width: 2.5rem; height: 1px; margin: 0 auto 1.6rem; background: var(--atlas-or); }
.bienvenue h1 { margin: 0 0 .35rem; font-size: inherit; font-weight: 600; line-height: inherit; text-wrap: balance; }
.bienvenue p { margin: 0; text-wrap: pretty; }
.bienvenue a { color: inherit; text-decoration-color: var(--atlas-or); text-decoration-thickness: 1px; text-underline-offset: .22em; }
.bienvenue a:hover { color: var(--or); }
body:has(.bienvenue) > footer { display: none; }

/* ------------------------------------------------ Chatbot public (/chatbot ; chatbot-public.js) */
/* Une page à part : la nuit de la carte, plein cadre ; la conversation au centre. */
.chatbot-public { min-height: 100svh; padding: 3.5rem 1.25rem 3rem; box-sizing: border-box;
  background: radial-gradient(120% 80% at 50% 0%, var(--atlas-nuit-2) 0%, var(--atlas-nuit) 60%); color: var(--atlas-ivoire); }
/* Grand écran : toute la place à droite de la barre, sans marge blanche (comme les planches). */
@media (min-width: 60rem) {
  body:has(.chatbot-public) { padding: 0 0 0 var(--barre); }
  body:has(.chatbot-public) > main { max-width: none; margin: 0; }
  body:has(.chatbot-public) > footer { display: none; }
}
/* Téléphone : bord à bord sous la barre du haut. */
@media (max-width: 59.99rem) {
  body:has(.chatbot-public) > header { margin-bottom: 0; }
  body:has(.chatbot-public) > main { margin-top: 0; }
  .chatbot-public { width: 100vw; margin-left: calc(50% - 50vw); min-height: calc(100svh - 3.5rem); padding-top: 2rem; }
}
.chatbot-cadre { max-width: 40rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.2rem; }
.chatbot-public h1 { margin: 0; font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); color: var(--atlas-ivoire); }
.chatbot-intro { margin: 0; color: #c9cbd6; font-size: 1.08rem; line-height: 1.6; max-width: 36rem; }
.chatbot-fil { display: flex; flex-direction: column; gap: .9rem; }
.chatbot-fil:empty { display: none; }
.chatbot-bulle { max-width: 88%; padding: .8rem 1.05rem; border-radius: 1rem; line-height: 1.55; }
.chatbot-bulle p { margin: 0; }
.chatbot-bulle.moi { align-self: flex-end; background: rgb(241 239 232 / .1); border: 1px solid rgb(241 239 232 / .18); border-bottom-right-radius: .3rem; }
.chatbot-bulle.bot { align-self: flex-start; background: rgb(201 162 74 / .1); border: 1px solid rgb(201 162 74 / .35); border-bottom-left-radius: .3rem; }
.chatbot-bulle.erreur { border-color: rgb(229 115 115 / .6); background: rgb(229 115 115 / .1); }
.chatbot-reflechit .points { color: var(--atlas-or); }
.chatbot-sources-titre { margin-top: .7rem !important; font-size: .9rem; color: #c9cbd6; }
.chatbot-sources { margin: .25rem 0 0; padding: 0; list-style: none; }
.chatbot-sources li { padding: .1rem 0; border: 0; }
.chatbot-sources a { color: var(--atlas-ivoire); text-decoration-color: var(--atlas-or); text-underline-offset: .2em; }
.chatbot-sources a:hover { color: var(--atlas-or); }
.chatbot-form { display: flex; flex-direction: column; gap: .6rem; margin-top: .4rem; }
.chatbot-consentement { padding: .9rem 1rem; border: 1px solid rgb(241 239 232 / .25); border-radius: .8rem; background: rgb(13 20 36 / .6); }
.chatbot-consentement label { display: flex; gap: .55rem; align-items: flex-start; cursor: pointer; font-size: 1rem; }
.chatbot-consentement input { width: 1.2rem; height: 1.2rem; margin: .2rem 0 0; flex: none; accent-color: var(--atlas-or); }
.chatbot-consentement p { margin: .5rem 0 0 1.75rem; font-size: .88rem; line-height: 1.5; color: #b9bdcc; }
.chatbot-consentement.a-cocher { border-color: var(--atlas-or); box-shadow: 0 0 0 3px rgb(201 162 74 / .25); }
.chatbot-champ textarea { width: 100%; box-sizing: border-box; min-height: 5.5rem; resize: vertical; padding: .85rem 1rem; border-radius: .8rem;
  border: 1px solid rgb(241 239 232 / .3); background: rgb(13 20 36 / .7); color: var(--atlas-ivoire); font: inherit; font-size: 1.05rem; line-height: 1.5; }
.chatbot-champ textarea::placeholder { color: rgb(241 239 232 / .62); }
.chatbot-champ textarea:focus-visible { outline: 2px solid var(--atlas-or); outline-offset: 2px; border-color: transparent; }
.chatbot-pied { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.chatbot-reste { color: #c9cbd6; font-size: .92rem; margin-right: auto; }
.chatbot-compte { color: #9aa1b5; font-size: .85rem; font-variant-numeric: tabular-nums; }
.chatbot-pied button { min-height: 2.75rem; padding: 0 1.3rem; border-radius: 1.4rem; border: 0; background: var(--atlas-or); color: var(--atlas-nuit);
  font: inherit; font-weight: 600; cursor: pointer; }
.chatbot-pied button:hover { background: #d8b45e; }
.chatbot-pied button:disabled { opacity: .5; cursor: not-allowed; }
.chatbot-pied button:focus-visible { outline: 2px solid var(--atlas-ivoire); outline-offset: 3px; }
.chatbot-public ::selection { background: rgb(201 162 74 / .4); color: var(--atlas-ivoire); }

/* Sécurité et analytics › Chatbot public : le journal des questions */
.bot-q-liste { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; }
.bot-q { padding: .9rem 1rem; border: 1px solid var(--filet); border-radius: .6rem; }
.bot-q-erreur { border-color: #d98a8a; }
.bot-q-meta { margin: 0 0 .35rem; font-size: .85rem; color: var(--discret); font-variant-numeric: tabular-nums; }
.bot-q-question { margin: 0 0 .5rem; font-weight: 600; }
.bot-q-reponse { margin: 0; }
.bot-q-sources { margin: .5rem 0 0; padding-left: 1.2rem; font-size: .9rem; }
.bot-q-recherche { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; margin: 1rem 0; }
.bot-q-pages { display: flex; gap: 1rem; justify-content: space-between; }
.bot-v-tri { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: .5rem 0 1rem; }
.bot-v-tri a { padding: .3rem .8rem; border: 1px solid var(--filet); border-radius: 1rem; text-decoration: none; color: inherit; }
.bot-v-tri a[aria-current="true"] { background: var(--atlas-nuit); border-color: var(--atlas-nuit); color: #f1efe8; }
.bot-v-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.bot-v { border: 1px solid var(--filet); border-radius: .6rem; padding: .2rem .9rem; }
.bot-v summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; padding: .55rem 0; }
.bot-v-id { font-weight: 600; font-variant-numeric: tabular-nums; }
.bot-v-n { color: var(--or); }
.bot-v-dates { color: var(--discret); font-size: .88rem; }
.bot-v .bot-q-liste { margin: .3rem 0 .8rem; }
.chatbot-plus { margin: .4rem 0 0; padding-top: 1rem; border-top: 1px solid rgb(241 239 232 / .14); font-size: .92rem; line-height: 1.6; color: #b9bdcc; }
.chatbot-plus a { color: var(--atlas-ivoire); text-decoration-color: var(--atlas-or); text-underline-offset: .2em; }
.chatbot-plus a:hover { color: var(--atlas-or); }

/* Texte courant : pas de mot seul en dernière ligne (navigateurs qui le savent). */
.corps p, .chapo, .planche .chapo, .biblio-presentation, .accueil p { text-wrap: pretty; }
/* Le bot, compte connecté : la messagerie en pleine page (#messagerie-page), dans le cadre nuit. */
.chatbot-cadre-large { max-width: 60rem; height: calc(100svh - 7rem); }
.chatbot-messagerie { flex: 1; min-height: 24rem; border: 0; background: none; overflow: hidden; }   /* sans cadre : à même la nuit */
.chatbot-messagerie > #messagerie { display: block; height: 100%; }
.chatbot-messagerie .chatbot-intro { padding: 1.5rem 0; color: #b9bdcc; }
@media (max-width: 59.99rem) { .chatbot-cadre-large { height: calc(100svh - 6.5rem); } }
/* La page « Le bot » rougit avec la complexité active (--rougeur, 0 à 1, posée par messagerie.js). */
.chatbot-connecte { background: radial-gradient(120% 80% at 50% 0%,
  color-mix(in srgb, #7a1018 calc(var(--rougeur, 0) * 100%), var(--atlas-nuit-2)) 0%,
  color-mix(in srgb, #2a070a calc(var(--rougeur, 0) * 100%), var(--atlas-nuit)) 60%); transition: background .6s ease-out; }

/* Mémori : « Qui c'est ? », entrée « Tous mes élèves », page seule (/pages/memori, appli Android). */
.memori-qui .memori-question { font-size: 1.35rem; font-style: italic; color: var(--discret, #666); }
.memori-qui .nom { font-size: 1.35rem; font-weight: 600; }
.memori-qui .nom .aide { display: block; font-size: .8rem; font-weight: 400; }
.memori-qui .memori-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.memori-global { margin-top: 1rem; }
.memori-global a { border-color: currentColor; }
.memori-par-classe { margin: 1.5rem 0 0; font-size: .82rem; font-variant: all-small-caps; letter-spacing: .06em; color: var(--discret, #666); }
.page-memori { padding-top: 1rem; }
/* La photo tient avec ses boutons dans l'écran (téléphone, appli). */
.memori-carte .photo img { height: min(52svh, 29rem); width: auto; max-width: 100%; margin: 0 auto; }
/* Mémori : infos privées sur les élèves. */
.memori-infos { margin: 0; font-style: italic; white-space: pre-line; text-align: left; }
.memori-infos-edit { text-align: left; font-size: .9rem; }
.memori-infos-edit summary { cursor: pointer; color: var(--discret, #666); }
.memori-infos-edit textarea, .memori-fiches textarea { width: 100%; margin-top: .4rem; font: inherit; padding: .5rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); }
textarea.enregistre { border-color: var(--atlas-or); transition: border-color .2s; }
.memori-lien-fiches { margin: 1rem 0 0; }
.memori-filtre { width: 100%; margin: .5rem 0 1rem; padding: .55rem .7rem; font: inherit; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); }
.memori-fiches { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.memori-fiches li { display: grid; grid-template-columns: 5rem 1fr; gap: .9rem; align-items: start; }
.memori-fiches .photo img { width: 5rem; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.memori-fiches .nom { margin: 0; }
.memori-fiches select[data-sexe] { margin-left: .4rem; font: inherit; font-size: .8rem; padding: 0 .2rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); }

.memori-genres { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 .6rem; }
.memori-genres button[aria-pressed="true"], .memori-modes button[aria-pressed="true"] { font-weight: 600; }
.memori-genres .aide { font-size: .75rem; }
.memori-vide { text-align: center; padding: 2rem 0; }
.memori-verrou { margin: 0 0 .5rem; flex-basis: 100%; }
.memori-apercu { flex-basis: 100%; border: 1px solid var(--filet); padding: .8rem 1rem; margin: .3rem 0; }
.memori-apercu ul { margin: .3rem 0 .6rem; padding-left: 1.2rem; }

/* Sécurité et analytics › Schémas du site / du bot (server/schemas_page.py, Mermaid : js/schemas.js). */
.sch-bloc { margin: 2.2rem 0 0; }
.sch-bloc > h2 { margin-bottom: .3rem; }
.sch-lire { font-size: .9rem; color: var(--discret); margin: 1rem 0 0; }
.sch-mermaid { margin: .8rem 0 0; padding: 1rem; border: 1px solid var(--filet); overflow-x: auto; background: var(--fond); }
.sch-mermaid pre.mermaid { margin: 0; background: none; border: 0; padding: 0; text-align: center; white-space: pre; font-size: .8rem; color: var(--discret); }
.sch-mermaid pre.mermaid svg { max-width: 100%; height: auto; }
.sch-mermaid pre.sch-erreur { text-align: left; }
.sch-legende { margin: .4rem 0 0; font-size: .8rem; color: var(--discret); }

/* Mes classes › Conseil de classe : une fiche par élève (photo, moyenne, dernières copies, remarques). */
.conseil-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; }
.conseil-fiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr)); gap: 1rem 1.4rem; margin-top: .8rem; }
.conseil-fiche { display: grid; grid-template-columns: 6rem 1fr; gap: .9rem; padding: .9rem 0; border-top: 1px solid var(--filet); break-inside: avoid; }
.conseil-photo img, .conseil-photo span { width: 6rem; aspect-ratio: 3 / 4; object-fit: cover; display: grid; place-items: center;
  background: var(--filet); color: var(--discret); font-size: 1.6rem; }
.conseil-corps header { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.conseil-corps h4 { margin: 0; font-size: 1.05rem; }
.conseil-moyenne { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.conseil-copies { list-style: none; margin: .4rem 0; padding: 0; display: grid; gap: .35rem; font-size: .9rem; }
.conseil-copies li { display: grid; grid-template-columns: 1fr auto; gap: 0 .6rem; }
.conseil-copies p { grid-column: 1 / -1; margin: .1rem 0 0; font-style: italic; line-height: 1.4; }
.conseil-memori { font-size: .88rem; margin: .3rem 0; }
.conseil-remarques { display: block; font-size: .85rem; margin-top: .4rem; }
.conseil-remarques textarea { width: 100%; font: inherit; font-size: .92rem; margin-top: .2rem; padding: .4rem; border: 1px solid var(--filet); background: var(--fond); color: var(--texte); }
.conseil-remarques textarea.enregistre { border-color: var(--atlas-or, #c9a24a); }
@media print {
  body.impression-conseil .barre-site, body.impression-conseil .onglets-classe, body.impression-conseil .fiche-classe > header,
  body.impression-conseil .conseil-tete button, body.impression-conseil .bloc-classes > :not(.detail-classe):not(h2) { display: none !important; }
  body.impression-conseil .panneau-classe:not([data-panneau="conseil"]) { display: none !important; }
  body.impression-conseil .conseil-fiches { grid-template-columns: 1fr 1fr; }
  body.impression-conseil .conseil-remarques textarea { border: 0; padding: 0; resize: none; }
}

/* Mes classes › thèmes ouverts aux élèves (lycée, classe). */
.grille-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .25rem 1rem; margin: .6rem 0 .8rem; }
.grille-themes .numero-theme { display: inline-block; min-width: 1.4em; color: var(--discret); font-variant-numeric: tabular-nums; }
.themes-lycee { margin: .4rem 0 .8rem; }
.themes-lycee summary { cursor: pointer; }

/* Mes classes › tableau de gestion des lycées (administration). */
.tableau-lycees td.nombre { text-align: center; font-variant-numeric: tabular-nums; }
.tableau-lycees select { font: inherit; max-width: 12rem; }
.gestion-lycees h3 { margin: 1.4rem 0 .4rem; font-size: 1.05rem; }

/* Accueil : le bouton et le formulaire de l'administration (accueil.js). */
.accueil-edition { width: min(36rem, 100%); }
.accueil-edition textarea { width: 100%; font: inherit; }
.accueil-edition textarea.code { font: .9rem/1.5 ui-monospace, Menlo, monospace; }

/* ------------------------------------------------ Sujets de dissertation (/pages/sujets ; sujets.py, sujets.js) */
.page-sujets .chapo { margin-top: .2rem; }
.sujets-filtres { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; margin: 1.2rem 0 .4rem; }
.sujets-filtres label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; color: var(--discret); }
.sujets-filtres label.case { flex-direction: row; align-items: center; gap: .4rem; color: var(--texte); padding-bottom: .4rem; }
.sujets-filtres input[type=search] { min-width: min(22rem, 80vw); }
.sujets-filtres input, .sujets-filtres select { font: inherit; font-size: .95rem; padding: .35rem .5rem; border: 1px solid var(--filet);
  border-radius: 6px; background: var(--fond); color: var(--texte); }
.sujets-compte { min-height: 1.2em; margin: .2rem 0 .8rem; }
.sujets-theme { border-top: 1px solid var(--filet); }
.sujets-theme > summary { cursor: pointer; padding: .7rem 0; font-size: 1.08rem; list-style: none; }
.sujets-theme > summary::-webkit-details-marker { display: none; }
.sujets-theme > summary small { color: var(--discret); font-size: .85rem; margin-left: .4rem; }
.sujets-theme[hidden] { display: none; }
.sujets-liste { margin: 0 0 1rem; padding-left: 1.4rem; display: grid; gap: .35rem; }
.sujet { line-height: 1.45; }
.sujet[hidden] { display: none; }
.sujet-meta, .sujet-notions { margin-left: .5rem; font-size: .82rem; color: var(--discret); }
.sujet-meta { font-variant-numeric: tabular-nums; }
.sujet-notions::before { content: "· "; }
.sujet-corrige { margin-left: .5rem; font-size: .85rem; font-weight: 600; padding: .05rem .45rem; border: 1px solid var(--atlas-or, #c9a24a);
  border-radius: 999px; text-decoration: none; color: var(--texte); white-space: nowrap; }
.sujet-corrige:hover { background: rgb(201 162 74 / .15); }
.sujet-modifier { margin-left: .5rem; font-size: .8rem; color: var(--discret); }
.sujet-edition { margin: .5rem 0 .8rem; padding: .7rem 0; border-top: 1px dashed var(--filet); }
.sujets-ajout { margin: .4rem 0 1rem; }
.sujets-ajout > summary { cursor: pointer; font-weight: 600; }
.sujets-source { margin-top: 2rem; }

/* Recherche d'une page (champ « Corrigé » des sujets de dissertation : page et CMS). */
.chercheur-pages { list-style: none; margin: .2rem 0 0; padding: .2rem 0; max-height: 16rem; overflow: auto;
  border: 1px solid var(--filet, #ccc); border-radius: 6px; background: var(--fond, #fff); }
.chercheur-pages[hidden] { display: none; }
.chercheur-pages button { display: block; width: 100%; text-align: left; padding: .35rem .6rem; border: 0; background: none;
  font: inherit; color: inherit; cursor: pointer; }
.chercheur-pages button:hover, .chercheur-pages button:focus { background: rgb(201 162 74 / .15); }
.chercheur-pages button span { display: block; font-size: .8em; }
.chercheur-pages li.aide, .chercheur-pages li.discret { padding: .35rem .6rem; }

/* Mes classes : toute la largeur disponible (la colonne de lecture, 38rem, ne s'y applique pas). */
body:has(.page-classes) > main { max-width: var(--dispo); }
/* Sujets de dissertation : plus large que la lecture, pour les filtres. */
body:has(.page-sujets) > main { max-width: min(64rem, var(--dispo)); }

.sj-rediger, .sujet-rediger { margin-top: .8rem; padding-top: .6rem; border-top: 1px dashed var(--filet, #ccc); }
.sj-rediger > summary, .sujet-rediger > summary { cursor: pointer; font-weight: 600; }
.sj-rediger textarea, .sujet-rediger textarea { width: 100%; font: .9rem/1.5 ui-monospace, Menlo, monospace; }
.sujet-rediger label { display: block; margin: .4rem 0; }
.sujet-rediger input { width: 100%; }

/* =============================================================================
   LA MATRIXEUSE — exercices de dissertation (/pages/exercices ; exercices.py, exercices.js)

   Deux mondes :
   - la LISTE des sessions, dans la page ordinaire du site (classes .mx-tete, .mx-sessions…) ;
   - le « MODE JEU » (.mx-ecran) : un calque qui couvre tout l'écran, par-dessus le site, avec
     trois tenues — .mx-chargement (nuit, image de fond, barre qui se remplit : l'écran de
     chargement d'un jeu vidéo), .mx-epreuve (les couleurs du site, pour écrire longtemps) et
     .mx-resultat (la couleur de la note : --mx-couleur et --mx-encre, posées par le script).
   Tout reprend l'atlas : bleu nuit, or, ivoire, Latin Modern, angles droits.
   ============================================================================= */
body:has(.page-exercices) > main { max-width: min(52rem, var(--dispo)); }
.mx-surtitre { margin: 0 0 .5rem; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--or); }
.mx-tete h1 { margin: 0; }
.mx-tete .chapo { margin-top: .5rem; max-width: 38rem; }

/* --- La liste des sessions : un grand numéro, l'état, un bouton. */
main ol.mx-sessions { list-style: none; margin: 2rem 0; padding: 0; }
main ol.mx-sessions > li { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 1rem 1.2rem; align-items: center;
  padding: 1.1rem 0; border-top: 1px solid var(--filet); }
.mx-session-numero { font-size: 3rem; line-height: 1; text-align: center; color: var(--or); font-variant-numeric: lining-nums; }
.mx-session h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.mx-session h2 span { font-weight: 400; }
.mx-session p { margin: .15rem 0 0; }
.mx-session-etat { font-size: .95rem; }
.mx-session button { border-radius: 0; background: var(--atlas-nuit); border-color: var(--atlas-nuit); color: var(--atlas-ivoire); white-space: nowrap; }
.mx-session button:hover { background: var(--atlas-nuit-2); }
:root[data-theme="sombre"] .mx-session button { background: var(--atlas-nuit-2); border-color: var(--atlas-or); }
.mx-session.fermee .mx-session-numero { color: var(--discret); }
.mx-suivi { margin-top: 3rem; }
.mx-suivi h2 { font-size: 1.25rem; margin-bottom: .2rem; }

/* --- Tableaux (fautes, points) : dans la page comme dans le mode jeu. */
.mx-fautes, .mx-points { width: 100%; border-collapse: collapse; font-size: .95rem; margin-top: .8rem; }
.mx-fautes th, .mx-fautes td, .mx-points th, .mx-points td { padding: .45rem .6rem .45rem 0; border-top: 1px solid var(--filet); text-align: left; vertical-align: top; }
.mx-fautes thead th { border-top: 0; font-size: .78rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--discret); }
.mx-fautes del { text-decoration-color: var(--alerte); }
.mx-fautes .nombre, .mx-points .nombre { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 0; }
.mx-fautes tr.repetee td { background: color-mix(in srgb, var(--alerte) 9%, transparent); }
.mx-fautes tr.repetee em { color: var(--alerte); font-style: normal; }
.mx-points th { font-weight: 600; }
.mx-points th small { display: block; font-weight: 400; font-size: .9rem; color: var(--discret); margin-top: .15rem; }
.mx-points tr.perte .nombre { color: var(--alerte); font-weight: 600; }

/* --- Le mode jeu : le calque. */
html.mx-ouvert { overflow: hidden; }
.mx-ecran { position: fixed; inset: 0; z-index: 1000; overflow-y: auto; overscroll-behavior: contain;
  font-family: var(--police); background: var(--fond); color: var(--texte); }
.mx-ecran button { border-radius: 0; }
.mx-quitter { position: absolute; top: 1rem; right: 1.25rem; z-index: 2; padding: .3rem .2rem; border: 0; background: none;
  color: inherit; font-weight: 400; font-size: .9rem; text-decoration: underline; text-underline-offset: .2em; }
.mx-bouton { font-size: 1.05rem; padding: .7rem 1.3rem; background: var(--atlas-or); border-color: var(--atlas-or); color: var(--atlas-nuit); }
.mx-bouton:hover:not(:disabled) { filter: brightness(1.08); }
.mx-bouton:disabled { opacity: .45; cursor: not-allowed; }
.mx-bouton:focus-visible, .mx-quitter:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* --- Chargement : l'écran d'attente d'un jeu vidéo. Le contenu est calé en bas à gauche, sur
       l'image assombrie par un voile (le texte reste lisible quelle que soit l'image). */
.mx-chargement { background: var(--atlas-nuit); color: var(--atlas-ivoire); }
.mx-chargement .mx-fond { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mx-chargement .mx-voile { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(13 20 36 / .55) 0%, rgb(13 20 36 / .78) 45%, rgb(13 20 36 / .96) 100%); }
.mx-centre { position: relative; z-index: 1; min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: flex-start; max-width: 50rem; padding: 5rem clamp(1.25rem, 6vw, 5rem) clamp(2rem, 7vh, 4.5rem); }
.mx-chargement .mx-surtitre { color: var(--atlas-or); }
.mx-titre { margin: 0; font-size: clamp(2.1rem, 3.6vw, 3.4rem); font-weight: 400; line-height: 1.06; color: var(--atlas-ivoire); }
.mx-sous { margin: .5rem 0 0; color: #c9cbd6; }
.mx-message { font-size: 1.25rem; line-height: 1.5; max-width: 36rem; }
.mx-consignes { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .9rem; }
.mx-consignes li { font-size: 1.3rem; line-height: 1.4; opacity: 0; transform: translateY(.5rem); transition: opacity .5s ease, transform .5s ease; }
.mx-consignes li.visible { opacity: 1; transform: none; }
.mx-consigne-n { display: block; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--atlas-or); }
/* La barre : un cadre d'or, un remplissage en segments (les « crans » d'une jauge de jeu). */
.mx-barre { width: min(100%, 34rem); height: .85rem; margin-top: 2.2rem; padding: 2px; box-sizing: border-box; border: 1px solid var(--atlas-or); }
.mx-barre span { display: block; height: 100%; width: 0; transition: width .12s linear;
  background: repeating-linear-gradient(90deg, var(--atlas-or) 0 .55rem, transparent .55rem .7rem); }
.mx-barre.indeterminee { overflow: hidden; }
.mx-barre.indeterminee span { width: 35%; animation: mx-va-et-vient 1.6s ease-in-out infinite alternate; }
@keyframes mx-va-et-vient { from { transform: translateX(-10%); } to { transform: translateX(196%); } }
.mx-pourcent { margin: .5rem 0 0; font-size: .9rem; letter-spacing: .06em; color: #c9cbd6; font-variant-numeric: tabular-nums; min-height: 1.4em; }
.mx-commencer { margin-top: 1.2rem; }
.mx-avis { margin: .9rem 0 0; font-size: .9rem; color: #9aa1b5; max-width: 34rem; }
@media (prefers-reduced-motion: reduce) {
  .mx-consignes li { transition: none; }
  .mx-barre span { transition: none; }
  .mx-barre.indeterminee span { animation: none; width: 100%; opacity: .6; }
}

/* --- L'épreuve : un bandeau fixe (chrono en haut à gauche), puis la copie, en colonne de lecture. */
.mx-bandeau { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 1.2rem; padding: .55rem 1.25rem;
  background: var(--atlas-nuit); color: var(--atlas-ivoire); }
.mx-bandeau .mx-quitter { position: static; margin-left: auto; }
.mx-bandeau .mx-sauve { color: #9aa1b5; font-size: .82rem; }
.mx-bandeau-titre { margin: 0; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--atlas-or); }
.mx-chrono { display: flex; gap: 1.3rem; font-variant-numeric: tabular-nums lining-nums; }
.mx-chrono span { display: flex; flex-direction: column; line-height: 1.1; }
.mx-chrono small { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #9aa1b5; }
.mx-chrono b { font-size: 1.5rem; font-weight: 400; }
.mx-chrono-reste b { color: var(--atlas-or); }
.mx-chrono-reste.presse b { color: #ff8f8f; }
.mx-copie { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1.25rem 5rem; }
.mx-sujet { margin: 0 0 2rem; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 400; line-height: 1.15; color: var(--titre); }
.mx-introduction { background: var(--atlas-voile); color: var(--atlas-encre); padding: 1.3rem 1.6rem 1rem; font-size: 1.1rem; line-height: 1.6; }
.mx-introduction p { margin: 0 0 .8rem; }
.mx-probleme { margin: 1.5rem 0 0; padding: .2rem 0 .2rem 1.2rem; border-left: 3px solid var(--atlas-or); font-size: 1.25rem; line-height: 1.5; }
.mx-probleme p { margin: 0; }
.mx-rappel { margin-top: 1.5rem; padding: 1rem 1.2rem; border: 1px solid var(--filet); }
.mx-rappel summary { cursor: pointer; font-weight: 600; }
.mx-plan { margin-top: 2.5rem; }
.mx-regle { margin: 0 0 1.2rem; color: var(--discret); font-style: italic; }
.mx-champ { display: grid; grid-template-columns: 4.2rem 1fr; gap: .8rem; align-items: start; margin-top: .7rem; }
.mx-champ.niveau-1 { margin-top: 2rem; }
.mx-champ.niveau-2 { margin-left: 2rem; }
.mx-champ label { padding-top: .5rem; font-size: 1.15rem; font-variant-numeric: lining-nums; white-space: nowrap; }
.mx-champ.niveau-1 label { font-weight: 600; font-size: 1.3rem; color: var(--titre); }
.mx-champ textarea { width: 100%; box-sizing: border-box; resize: none; overflow: hidden; font: 1.15rem/1.5 var(--police);
  padding: .5rem .7rem; border: 1px solid var(--filet); border-radius: 0; background: var(--fond); color: var(--texte); }
.mx-champ.niveau-1 textarea { font-size: 1.25rem; border-color: color-mix(in srgb, var(--texte) 40%, transparent); }
.mx-champ textarea:focus { outline: 2px solid var(--atlas-or); outline-offset: 1px; border-color: var(--texte); }
.mx-soumission { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.5rem;
  padding-top: 1.2rem; border-top: 1px solid var(--filet); }
.mx-soumission p { margin: 0; }
@media (max-width: 40rem) {
  .mx-bandeau { gap: .8rem; padding: .5rem .9rem; flex-wrap: wrap; }
  .mx-bandeau-titre, .mx-bandeau .mx-sauve { display: none; }
  .mx-champ { grid-template-columns: 1fr; gap: .2rem; }
  .mx-champ.niveau-2 { margin-left: 1rem; }
  .mx-champ label { padding-top: 0; }
  main ol.mx-sessions > li { grid-template-columns: 3rem 1fr; }
  main ol.mx-sessions > li button { grid-column: 1 / -1; justify-self: stretch; }
  .mx-session-numero { font-size: 2.2rem; }
}

/* --- Le résultat : tout l'écran prend la couleur de la note (--mx-couleur), la note est posée
       dessus (--mx-encre) ; les textes à lire sont sur des cartes aux couleurs du site. */
.mx-resultat { background: var(--mx-couleur, var(--atlas-nuit)); color: var(--mx-encre, #fff); }
.mx-bilan { max-width: 46rem; margin: 0 auto; padding: 4rem 1.25rem 5rem; }
.mx-resultat .mx-surtitre { color: inherit; opacity: .85; }
.mx-note { margin: 0; line-height: .95; font-variant-numeric: lining-nums; }
.mx-note b { font-size: clamp(5.5rem, 20vw, 11rem); font-weight: 400; letter-spacing: -.02em; }
.mx-note span { font-size: clamp(1.6rem, 5vw, 3rem); margin-left: .3rem; }
.mx-statut { margin: .6rem 0 2rem; font-size: 1rem; }
.mx-carte { background: var(--fond); color: var(--texte); padding: 1.4rem 1.6rem; margin-top: 1rem; }
.mx-carte h2 { margin: 0 0 .5rem; font-size: .78rem; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--or); }
.mx-carte p { margin: 0; font-size: 1.2rem; line-height: 1.6; }
.mx-detail > summary { cursor: pointer; font-weight: 600; }
.mx-relecture { margin: .8rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
.mx-relecture dt { font-variant-numeric: lining-nums; white-space: nowrap; }
.mx-relecture dt.niveau-1 { font-weight: 600; margin-top: .6rem; }
.mx-relecture dt.niveau-1 + dd { margin-top: .6rem; }
.mx-relecture dd { margin: 0; }
.mx-suite { margin-top: 2rem; display: grid; gap: .8rem; justify-items: start; }
.mx-suite p { margin: 0; max-width: 34rem; }
/* Sur la couleur de la note, les boutons sont à l'encre du fond (lisibles du rouge au vert). */
.mx-resultat .mx-suite .mx-bouton { background: var(--mx-encre); border-color: var(--mx-encre); color: var(--mx-couleur); }
.mx-resultat .mx-suite .mx-bouton.secondaire { background: transparent; color: var(--mx-encre); }

/* Mes classes : la case « Dys. » (élève dyslexique) et les notes d'exercices, non modifiables ici. */
.tableau-eleves.editable .col-dys { text-align: center; }
.tableau-eleves.editable .col-dys input { width: auto; min-width: 0; }
.tableau-notes td.note-exercice { text-align: center; font-variant-numeric: tabular-nums; color: var(--discret); }
/* Pendant une session, la bulle de la messagerie et du bot (messagerie.js) est retirée de l'écran :
   on ne demande pas au bot de faire son plan. */
html.mx-ouvert #messagerie { display: none; }
.mx-detail[open] > summary { margin-bottom: .4rem; }
