/* ==========================================================================
   Site du cours PCSI — feuille de style
   Palette reprise du gabarit Typst (marine #1D3557).
   ========================================================================== */
@font-face { font-family: "NCM"; src: url("fonts/NewCM10-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "NCM"; src: url("fonts/NewCM10-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "NCM"; src: url("fonts/NewCM10-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "NCM"; src: url("fonts/NewCM10-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "NCM Math"; src: url("fonts/NewCMMath-Regular.woff2") format("woff2"); font-display: swap; }

:root {
  --accent: #1D3557; --accent-mid: #4A6FA5; --accent-soft: #EBF0F8;
  --texte: #111111; --discret: #6B7280; --filet: #C5CEE0; --filet-mid: #8FA3C2;
  --fond: #FBFBF9; --fond-carte: #FFFFFF;
  --rouge: #B91C1C; --rouge-fond: #FFF8F8;
  --vert: #166534; --vert-fond: #F0FDF4;
  --sol: #1E4D8C; --jaune: #A16207; --jaune-fond: #FEFCE8;
  --serif: "NCM", "Latin Modern Roman", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --math: "NCM Math", "Latin Modern Math", "STIX Two Math", "Cambria Math", math;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #9DB8E0; --accent-mid: #7C9BCB; --accent-soft: #1B2638;
    --texte: #E6E6E3; --discret: #9CA3AF; --filet: #374357; --filet-mid: #55688A;
    --fond: #12161D; --fond-carte: #181D26;
    --rouge: #F08A8A; --rouge-fond: #2A1A1C; --vert: #7FD19B; --vert-fond: #15241B;
    --sol: #9DC1F5; --jaune: #E3C26A; --jaune-fond: #2A2615;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #9DB8E0; --accent-mid: #7C9BCB; --accent-soft: #1B2638;
  --texte: #E6E6E3; --discret: #9CA3AF; --filet: #374357; --filet-mid: #55688A;
  --fond: #12161D; --fond-carte: #181D26;
  --rouge: #F08A8A; --rouge-fond: #2A1A1C; --vert: #7FD19B; --vert-fond: #15241B;
  --sol: #9DC1F5; --jaune: #E3C26A; --jaune-fond: #2A2615;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 19px/1.55 var(--serif); }
math { font-family: var(--math); font-size: 1.02em; }
math[display="block"] { margin: .7em 0; overflow-x: auto; overflow-y: hidden; padding: .1em 0; }
a { color: var(--accent-mid); }

/* --- Bandeau ------------------------------------------------------------ */
.bandeau { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .6rem 1.25rem; background: var(--fond-carte); border-bottom: 1px solid var(--filet); font-family: var(--sans); font-size: 15px; }
.marque { font-weight: 700; color: var(--accent); text-decoration: none; letter-spacing: .02em; }
.bandeau nav { display: flex; gap: 1.1rem; align-items: center; }
.bandeau nav a { color: var(--texte); text-decoration: none; }
.bandeau nav a:hover { color: var(--accent-mid); }
.theme { background: none; border: 1px solid var(--filet); border-radius: 6px; color: var(--texte); cursor: pointer; padding: .1rem .45rem; font-size: 15px; }
.pied { text-align: center; color: var(--discret); font: 13px var(--sans); padding: 2rem 1rem 3rem; }

/* --- Mise en page chapitre ---------------------------------------------- */
.mise-en-page { display: grid; grid-template-columns: 17rem minmax(0, 46rem); gap: 3rem; justify-content: center; padding: 0 1.25rem; }
.plan { position: sticky; top: 3.6rem; align-self: start; max-height: calc(100vh - 4rem); overflow-y: auto; padding: 1.5rem 0; font: 14px/1.4 var(--sans); }
.plan ol { list-style: none; padding: 0; margin: 1rem 0; }
.plan li { margin: .3rem 0; }
.plan li.niv-3 { padding-left: 1rem; font-size: 13px; }
.plan li a { color: var(--discret); text-decoration: none; }
.plan li a:hover, .plan li a.actif { color: var(--accent); }
.plan li a.actif { font-weight: 600; }
.onglets { display: flex; border: 1px solid var(--filet); border-radius: 8px; overflow: hidden; }
.onglets a { flex: 1; text-align: center; padding: .45rem; text-decoration: none; color: var(--texte); }
.onglets a[aria-current] { background: var(--accent); color: var(--fond-carte); font-weight: 600; }
.pdfs { display: flex; flex-direction: column; gap: .35rem; border-top: 1px solid var(--filet); padding-top: 1rem; }
.document { padding: 2rem 0 4rem; min-width: 0; }
.surtitre { font: 600 13px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-mid); margin: 0; }
.document h1 { font: 700 2.1rem/1.2 var(--sans); color: var(--accent); margin: .3rem 0 1.5rem; }
.document h2 { font: 700 1.35rem/1.3 var(--sans); color: var(--accent); border-bottom: 2px solid var(--accent); padding-bottom: .25rem; margin: 2.5rem 0 1rem; }
.document h3 { font: 700 1.1rem var(--sans); color: var(--accent); margin: 2rem 0 .75rem; }
.document h4 { font: 600 1rem var(--sans); color: var(--accent-mid); margin: 1.5rem 0 .5rem; }
.document p { margin: .6em 0; }
.outils { display: flex; gap: .5rem; margin-bottom: 1rem; }
.outils button { font: 13px var(--sans); background: var(--fond-carte); color: var(--texte); border: 1px solid var(--filet); border-radius: 6px; padding: .3rem .7rem; cursor: pointer; }

/* --- Environnements ----------------------------------------------------- */
.env { margin: 1.4rem 0; border-top: 1.5px solid var(--accent); }
.env-head { font: 700 15px var(--sans); color: var(--accent); padding: .45rem .8rem .1rem; }
.env-titre { font-weight: 400; }
.env-body { padding: .2rem .8rem .5rem; }
.env-definition { background: var(--accent-soft); }
.env-theoreme { border-left: 4px solid var(--accent); }
.env-proposition, .env-propriete { border-left: 3px solid var(--accent); }
.env-corollaire, .env-consequence, .env-lemme { border-left: 2px solid var(--accent-mid); }
.env-definition, .env-theoreme, .env-proposition, .env-propriete, .env-corollaire, .env-consequence, .env-lemme { border-bottom: 1px solid var(--filet); }
.env-methode { border-top: 0; border-left: 3px solid var(--accent-mid); background: var(--accent-soft); border-radius: 0 6px 6px 0; }
.env-methode .env-head::before { content: "✦ "; }
.env-attention { border-top: 0; border-left: 3px solid var(--rouge); background: var(--rouge-fond); border-radius: 0 6px 6px 0; }
.env-attention .env-head { color: var(--rouge); }
.env-remarque, .env-exemple { border-top: 0; border-left: 1.5px solid var(--filet-mid); }
.env-remarque .env-head { color: var(--discret); }
.env-exemple .env-head { color: var(--accent); }
.env-python { border-top: 0; border-left: 2px solid var(--accent-mid); background: var(--accent-soft); }
.env-histoire { border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); }
.coeur { color: var(--rouge); }

details { margin: .8rem 0; }
details > summary { cursor: pointer; font: 600 14px var(--sans); list-style: none; display: inline-flex; align-items: center; gap: .4rem; user-select: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; transition: transform .15s; display: inline-block; }
details[open] > summary::before { transform: rotate(90deg); }
.demo { border-left: 1.5px solid var(--accent-mid); padding: .1rem 0 .1rem .8rem; }
.demo > summary { color: var(--discret); }
.demo-body::after { content: "□"; display: block; text-align: right; color: var(--accent); }
.solution { border-left: 2px solid var(--sol); padding: .1rem 0 .1rem .8rem; }
.solution > summary { color: var(--sol); }
.correction { background: var(--vert-fond); border-radius: 6px; padding: .5rem .9rem; }
.correction > summary { color: var(--vert); }
.correction[open] > summary { margin-bottom: .4rem; }
.sol { color: var(--sol); }

/* --- Exercices ---------------------------------------------------------- */
.exo { margin: 2rem 0 1.2rem; scroll-margin-top: 4.5rem; }
.exo-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .55rem; font: 15px var(--sans); }
.exo-label { font-weight: 700; color: var(--accent); }
.exo-titre { font-weight: 600; }
.exo-temps { color: var(--discret); font-size: 13px; }
.exo-temps::before { content: "⏱ "; }
.diff { display: inline-flex; gap: 2px; align-self: center; }
.diff .pt { width: 7px; height: 7px; border-radius: 1.5px; border: 1px solid var(--filet-mid); background: var(--accent-soft); }
.diff .pt.on { background: var(--accent); }
.exo-guide { border-left: 3px solid var(--accent-mid); background: var(--accent-soft); padding: .6rem .9rem; }
.exo-synthese { border: 1.5px solid var(--accent); border-radius: 6px; padding: .8rem 1rem; }
.exo-flash .exo-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--filet-mid); background: var(--accent-soft); padding: .05rem .4rem; border-radius: 3px; }

/* --- Blocs d'introduction ---------------------------------------------- */
.resume { border-left: 3px solid var(--accent); border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); padding: .6rem 1rem; font-style: italic; margin: 1rem 0 1.5rem; }
.resume-titre { font: normal 700 13px var(--sans); color: var(--accent); }
.lettrine-l { float: left; font-size: 3.1em; line-height: .85; font-weight: 700; color: var(--accent); margin: .05em .12em 0 0; font-style: normal; }
.extrait { margin: 1.5rem 0; border-left: 1px solid var(--discret); padding-left: 1rem; font-style: italic; }
.extrait blockquote { margin: 0; }
.extrait figcaption { text-align: right; font: normal 13px var(--sans); color: var(--discret); }
.objectifs { margin: 2rem 0; }
.objectifs-intro { color: var(--discret); font-style: italic; }
.objectifs h3 { font-size: 1rem !important; margin: 1.2rem 0 .4rem !important; }
.obj { display: flex; align-items: baseline; gap: .6rem; padding: .2rem 0; border-bottom: 1px dotted var(--filet); }
.obj-texte { flex: 1; }
.circled { display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; border: 1px solid var(--filet-mid); border-radius: 50%; font: 11px var(--sans); flex: none; }
.niveau { font: 700 10px var(--sans); text-transform: uppercase; letter-spacing: .05em; padding: .1rem .4rem; border-radius: 3px; border: 1px solid; }
.niveau-socle { color: var(--accent); background: var(--accent-soft); }
.niveau-savoirfaire { color: var(--jaune); background: var(--jaune-fond); }
.badge { font: 700 11px var(--sans); text-transform: uppercase; border: 1px solid var(--filet-mid); background: var(--accent-soft); color: var(--accent); padding: .05rem .4rem; border-radius: 3px; }
.afaire { border: 1px solid var(--filet-mid); border-radius: 3px; padding: .15rem .45rem; }
.petittitre { font-weight: 700; font-variant: small-caps; }

/* --- Figures, tableaux, grilles ---------------------------------------- */
.figure-svg { margin: 1rem auto; max-width: 100%; overflow-x: auto; padding: 2px; }
.figure-svg > svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.figure-svg-inline > svg, .formule-svg-inline > svg { display: inline-block !important; vertical-align: middle; }
.formule-svg { margin: .7rem 0; overflow-x: auto; }
.formule-svg > svg { margin: 0 auto; display: block; }
svg { color: var(--texte); }
:root[data-theme="dark"] .figure-svg svg, :root[data-theme="dark"] .formule-svg svg, :root[data-theme="dark"] .formule-svg-inline svg, :root[data-theme="dark"] .figure-svg-inline svg { filter: invert(.88) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.figure-svg, .formule-svg, .formule-svg-inline, .figure-svg-inline) svg { filter: invert(.88) hue-rotate(180deg); } }
.align-centre { text-align: center; }
.align-centre > table, .align-centre > .figure-svg { margin-inline: auto; }
.align-droite { text-align: right; }
.grille { display: grid; gap: 1rem; align-items: center; margin: 1rem 0; }
.grille > div { min-width: 0; }
table { border-collapse: collapse; margin: .8rem auto; font-size: .95em; }
td, th { border: 1px solid var(--filet); padding: .3rem .6rem; text-align: center; }
thead th, thead td { background: var(--accent-soft); }
pre, code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85em; }
pre { background: var(--fond-carte); border: 1px solid var(--filet); padding: .7rem; border-radius: 6px; overflow-x: auto; }
ol, ul { padding-left: 1.6em; }
li { margin: .2em 0; }

/* --- Accueil & progression --------------------------------------------- */
.accueil { max-width: 48rem; margin: 0 auto; padding: 2.5rem 1.25rem 3rem; }
.accueil h1 { font: 700 2.4rem/1.15 var(--sans); color: var(--accent); margin: 0 0 .4rem; }
.accueil h2 { font: 700 1.3rem var(--sans); color: var(--accent); margin: 2.5rem 0 1rem; }
.sous-titre { font: 1.15rem var(--sans); color: var(--accent-mid); margin-top: 0; }
.cette-semaine { background: var(--fond-carte); border: 1px solid var(--filet); border-left: 4px solid var(--accent); border-radius: 8px; padding: .5rem 1.25rem 1rem; margin-top: 2rem; font-family: var(--sans); font-size: 16px; }
.cette-semaine h2 { margin-top: .8rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-mid); }
.carte-semaine { font-size: 1.2rem; margin: .4rem 0 .8rem; }
.carte-semaine a { font-weight: 600; color: var(--accent); }
.liste-chapitres { list-style: none; padding: 0; margin: 0; font-family: var(--sans); font-size: 16px; }
.liste-chapitres li { display: grid; grid-template-columns: 2.5rem 1fr auto; gap: .8rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--filet); }
.liste-chapitres .num { font-weight: 700; color: var(--accent-mid); font-size: 1.2rem; }
.liste-chapitres .titre { color: var(--texte); font-weight: 600; text-decoration: none; }
.liste-chapitres a.titre:hover { color: var(--accent-mid); }
.liste-chapitres .liens { display: flex; gap: .8rem; font-size: 14px; color: var(--discret); }
.liste-chapitres .a-venir .titre { color: var(--discret); font-weight: 400; }
.semaines { list-style: none; padding: 0; font-family: var(--sans); font-size: 16px; }
.semaines li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: .65rem .75rem; border-bottom: 1px solid var(--filet); }
.semaines .date { color: var(--discret); }
.semaines .vacances .quoi { color: var(--discret); font-style: italic; }
.semaines .quoi a { color: var(--accent); }
.semaines li.courante { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 4px; }
.semaines li.courante .date { color: var(--accent); font-weight: 700; }
.semaines li.courante .date::after { content: "en cours"; display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.semaines li.passee { opacity: .6; }
.note { display: block; color: var(--discret); font-size: 14px; }

/* --- Mobile ------------------------------------------------------------- */
@media (max-width: 900px) {
  body { font-size: 17px; }
  .mise-en-page { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 16px; }
  .plan { position: static; max-height: none; padding-bottom: 0; }
  .plan ol { display: none; }
  .document h1 { font-size: 1.7rem; }
  .grille { grid-template-columns: minmax(0, 1fr) !important; }
  .bandeau { padding: .6rem 16px; }
  .accueil { padding: 1.5rem 16px 2rem; }
  .liste-chapitres li { grid-template-columns: 2rem 1fr; }
  .liste-chapitres .liens { grid-column: 2; }
  .semaines li { grid-template-columns: 1fr; gap: .2rem; }
}
@media print { .bandeau, .plan, .outils, .pied { display: none; } details { display: block; } }

/* overline(...) : trait au-dessus du groupe (voir build_site.py) */
math .surligne { border-top: .055em solid currentColor; padding-top: .1em; margin-inline: .04em; }
.semaines li.a-venir .date::after { content: "prévu"; display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

/* Liens externes (remplacent les QR codes du PDF) */
.lien-externe { display: inline-flex; flex-direction: column; gap: .1rem; padding: .45rem .7rem; border: 1px solid var(--filet-mid); border-radius: 8px; background: var(--fond-carte); text-decoration: none; color: var(--accent); font: 600 14px/1.3 var(--sans); max-width: 12rem; }
.lien-externe:hover { border-color: var(--accent); }
.lien-site { font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); }

/* --- Page d'accueil ------------------------------------------------------ */
.hero { background: var(--accent-soft); border-bottom: 1px solid var(--filet); }
.hero-int { max-width: 48rem; margin: 0 auto; padding: 3.5rem 1.25rem 3rem; }
.hero h1 { font: 700 clamp(2rem, 5vw, 3rem)/1.1 var(--sans); color: var(--accent); margin: .5rem 0 1rem; text-wrap: balance; letter-spacing: -.01em; }
.hero-texte { font-size: 1.15rem; max-width: 38rem; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.bouton { display: inline-block; padding: .65rem 1.1rem; border-radius: 8px; border: 1.5px solid var(--accent); color: var(--accent); text-decoration: none; font: 600 15px var(--sans); background: var(--fond-carte); }
.bouton.plein { background: var(--accent); color: var(--fond-carte); }
.bouton:hover { border-color: var(--accent-mid); }
.bouton:focus-visible, .lien-externe:focus-visible { outline: 2px solid var(--accent-mid); outline-offset: 2px; }
.usages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.usages article { border-top: 3px solid var(--accent); background: var(--fond-carte); padding: .9rem 1rem 1rem; border-radius: 0 0 8px 8px; }
.usages h3 { font: 700 1rem var(--sans); color: var(--accent); margin: 0 0 .4rem; }
.usages p { margin: 0; font-size: .95rem; }
.pour-qui ul { padding-left: 1.2em; }
.apropos p { color: var(--discret); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 900px) { .usages { grid-template-columns: minmax(0, 1fr); } .hero-int { padding: 2rem 16px; } }

.pied a { color: inherit; }
.choix-style { display: inline-flex; align-items: center; gap: .35rem; color: var(--discret); font-size: 13px; }
.choix-style select { font: 13px var(--sans); color: var(--texte); background: var(--fond-carte); border: 1px solid var(--filet); border-radius: 6px; padding: .1rem .3rem; }
@media (max-width: 600px) { .choix-style { display: none; } }

/* ==========================================================================
   STYLE « MODERNE » : texte sans empattement, cartes arrondies,
   une couleur par type d'environnement.
   ========================================================================== */
:root[data-style="moderne"] {
  --serif: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --accent: #0E5A6B; --accent-mid: #2A8195; --accent-soft: #E7F3F5;
  --fond: #FFFFFF; --fond-carte: #F6F8F9; --filet: #DCE3E6; --filet-mid: #A9BCC2;
  --c-def: #E8F0FB; --c-def-t: #1F4E99; --c-thm: #F1ECFA; --c-thm-t: #5B3A9E;
  --c-met: #E8F6EE; --c-met-t: #1E6B43; --c-ex: #F6F8F9;
}
@media (prefers-color-scheme: dark) { :root[data-style="moderne"]:not([data-theme="light"]) {
  --accent: #7CC7D6; --accent-mid: #5AAFC1; --accent-soft: #14272C; --fond: #101415; --fond-carte: #171D1F;
  --filet: #2A3538; --filet-mid: #46595E; --c-def: #172234; --c-def-t: #9DBDF0; --c-thm: #231B33; --c-thm-t: #C3ADF0;
  --c-met: #152A1F; --c-met-t: #8FD6AE; --c-ex: #171D1F; } }
:root[data-style="moderne"][data-theme="dark"] {
  --accent: #7CC7D6; --accent-mid: #5AAFC1; --accent-soft: #14272C; --fond: #101415; --fond-carte: #171D1F;
  --filet: #2A3538; --filet-mid: #46595E; --c-def: #172234; --c-def-t: #9DBDF0; --c-thm: #231B33; --c-thm-t: #C3ADF0;
  --c-met: #152A1F; --c-met-t: #8FD6AE; --c-ex: #171D1F; }
[data-style="moderne"] body { font-size: 17px; line-height: 1.65; }
[data-style="moderne"] .document h2 { border-bottom: 0; font-size: 1.55rem; }
[data-style="moderne"] .document h2::before { content: ""; display: block; width: 2.5rem; height: 4px; border-radius: 2px; background: var(--accent-mid); margin-bottom: .6rem; }
[data-style="moderne"] .env { border: 0 !important; border-radius: 12px; padding: .2rem 0 .3rem; background: var(--c-ex); }
[data-style="moderne"] .env-head { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; padding-top: .7rem; }
[data-style="moderne"] .env-titre { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; color: var(--texte); }
[data-style="moderne"] .env-definition { background: var(--c-def); }
[data-style="moderne"] .env-definition .env-head { color: var(--c-def-t); }
[data-style="moderne"] :is(.env-theoreme, .env-proposition, .env-propriete, .env-corollaire, .env-consequence, .env-lemme) { background: var(--c-thm); }
[data-style="moderne"] :is(.env-theoreme, .env-proposition, .env-propriete, .env-corollaire, .env-consequence, .env-lemme) .env-head { color: var(--c-thm-t); }
[data-style="moderne"] .env-methode { background: var(--c-met); }
[data-style="moderne"] .env-methode .env-head { color: var(--c-met-t); }
[data-style="moderne"] .env-attention { background: var(--rouge-fond); }
[data-style="moderne"] :is(.demo, .solution) { border: 1px solid var(--filet); border-radius: 10px; padding: .5rem .9rem; }
[data-style="moderne"] .correction { border-radius: 10px; }
[data-style="moderne"] .exo { border: 1px solid var(--filet); border-radius: 12px; padding: .9rem 1.1rem; }
[data-style="moderne"] .hero { background: linear-gradient(180deg, var(--accent-soft), var(--fond)); border-bottom: 0; }
[data-style="moderne"] .bouton { border-radius: 999px; }
[data-style="moderne"] .usages article { border-top: 0; border-radius: 12px; border: 1px solid var(--filet); }

/* ==========================================================================
   STYLE « MANUEL » : esprit livre de mathématiques, tout en Computer
   Modern, petites capitales, énoncés en italique, couleur bordeaux discrète.
   ========================================================================== */
:root[data-style="manuel"] {
  --sans: "NCM", "Latin Modern Roman", Georgia, serif;
  --accent: #7A1E2C; --accent-mid: #9C4452; --accent-soft: #F7F1F1;
  --texte: #1A1A1A; --discret: #5E5A57; --filet: #CFC8C6; --filet-mid: #9E9391;
  --fond: #FFFFFF; --fond-carte: #FFFFFF;
}
@media (prefers-color-scheme: dark) { :root[data-style="manuel"]:not([data-theme="light"]) {
  --accent: #E39AA5; --accent-mid: #C9808B; --accent-soft: #261A1C; --texte: #E8E4E2; --discret: #A8A09C;
  --filet: #3B3434; --filet-mid: #5E5454; --fond: #151313; --fond-carte: #1B1818; } }
:root[data-style="manuel"][data-theme="dark"] {
  --accent: #E39AA5; --accent-mid: #C9808B; --accent-soft: #261A1C; --texte: #E8E4E2; --discret: #A8A09C;
  --filet: #3B3434; --filet-mid: #5E5454; --fond: #151313; --fond-carte: #1B1818; }
[data-style="manuel"] .document h1 { font-weight: 400; font-size: 2.4rem; text-align: center; font-variant: small-caps; }
[data-style="manuel"] .surtitre { text-align: center; letter-spacing: .2em; }
[data-style="manuel"] .document h2 { font-weight: 700; font-variant: small-caps; border-bottom: .5px solid var(--texte); }
[data-style="manuel"] .document h3 { font-weight: 700; font-style: italic; }
[data-style="manuel"] .env { border: 0 !important; background: none !important; margin: 1.2rem 0; }
[data-style="manuel"] .env-head { padding: 0 0 .2rem; font-size: inherit; font-variant: small-caps; color: var(--texte); }
[data-style="manuel"] .env-titre { font-weight: 400; font-style: italic; }
[data-style="manuel"] .env-body { padding: 0; }
[data-style="manuel"] .env-body > :first-child { margin-top: 0; }
[data-style="manuel"] :is(.env-theoreme, .env-proposition, .env-propriete, .env-corollaire, .env-lemme, .env-consequence) .env-body { font-style: italic; }
[data-style="manuel"] :is(.env-definition, .env-theoreme, .env-proposition, .env-propriete) { border-left: 2px solid var(--accent) !important; padding-left: .9rem; }
[data-style="manuel"] .env-methode .env-head::before { content: ""; }
[data-style="manuel"] .demo { border: 0; padding: 0; }
[data-style="manuel"] .demo > summary { font: italic 1rem var(--serif); color: var(--texte); }
[data-style="manuel"] details > summary { font-family: var(--serif); font-size: 1rem; }
[data-style="manuel"] .correction { background: none; border-top: .5px solid var(--filet); border-bottom: .5px solid var(--filet); border-radius: 0; }
[data-style="manuel"] .exo-label { font-variant: small-caps; font-size: 1.05rem; }
[data-style="manuel"] .bandeau, [data-style="manuel"] .plan, [data-style="manuel"] .outils button, [data-style="manuel"] .liste-chapitres, [data-style="manuel"] .semaines { font-family: var(--serif); }
[data-style="manuel"] .hero { background: none; border-bottom: .5px solid var(--filet); text-align: center; }
[data-style="manuel"] .hero h1 { font-weight: 400; font-variant: small-caps; }
[data-style="manuel"] .hero-texte { margin-inline: auto; }
[data-style="manuel"] .hero-actions { justify-content: center; }
[data-style="manuel"] .bouton { border-radius: 0; font-family: var(--serif); }
[data-style="manuel"] .usages article { border-top: .5px solid var(--texte); background: none; border-radius: 0; }
[data-style="manuel"] .onglets a[aria-current] { background: none; color: var(--accent); text-decoration: underline; }
