/* ==========================================================================
   PRÉPA ISPITS v9.77 / v9.78 — « Styles » : thèmes qui transforment la plateforme
   v9.78 : + 6 styles académiques (Revue scientifique, Bibliothèque
   universitaire, Thèse, Institutionnel, Cabinet de conseil, Liseuse) ;
   retrait des styles Néo-brutaliste et Terminal.
   v9.80 : + 6 thèmes spéciaux illustrés (Médina, Anatomie de Vinci, Herbier,
   Microscopie, Tafilalet, Grande bibliothèque) ; menu à trois onglets.
   v9.79 : + 7 styles professionnels (Portail universitaire, Suisse, Tableau
   de bord, Bento, Minimaliste, Graphite, Zen) ; menu Thème à deux onglets.
   --------------------------------------------------------------------------
   Les 13 thèmes de themes.css ne changent que des variables (couleurs,
   polices, arrondis). Les 7 « styles » ci-dessous vont plus loin : ils
   redessinent la FORME des composants — cartes, boutons, champs, options de
   QCM, barre du haut, barre latérale, titres, fonds, animations.

   Même mécanique que les thèmes (html[data-theme="…"], mémorisé en local),
   donc rien à changer côté PHP hormis l'entrée du menu. Les polices propres
   à chaque style ne sont chargées QUE lorsque ce style est actif (script du
   <head> de layout.php) : aucun poids supplémentaire pour les autres.

   Règles de sécurité visuelle respectées par tous les styles :
   · le filigrane (.wm-layer) n'est jamais masqué ni recouvert ;
   · les états de correction (.is-good / .is-bad) gardent leurs couleurs :
     les règles communes utilisent :where() (spécificité 0,1,1) et perdent
     donc toujours face à .q-opt.is-good (0,2,0) ;
   · body::before / body::after ne servent qu'aux décors, sans clic
     (pointer-events:none) ;
   · prefers-reduced-motion coupe toutes les animations décoratives.
   ========================================================================== */


/* ==========================================================================
   0. CROCHETS COMMUNS — une seule liste de composants pour les 18 styles.
   Chaque style ne fait que régler des variables --c-*, --b-*, --g-*, --i-*,
   --o-* ; ses particularités viennent ensuite dans sa propre section.
   ========================================================================== */

/* Cartes et panneaux */
html:is([data-theme="verre"],[data-theme="cahier"],[data-theme="journal"],[data-theme="neumo"],[data-theme="clinique"],[data-theme="revue"],[data-theme="biblio"],[data-theme="these"],[data-theme="institution"],[data-theme="conseil"],[data-theme="liseuse"],[data-theme="portail"],[data-theme="suisse"],[data-theme="dashboard"],[data-theme="bento"],[data-theme="minimal"],[data-theme="graphite"],[data-theme="zen"],[data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"])
:where(.mod-card,.lesson,.q-card,.qcard,.fiche,.exam-intro,.exam-q,.exam-timer,.glo-item,.syn-block,
  .keycard,.zone-card,.avis-card,.avis-summary,.avis-form-card,.ann-card,.ann-form-card,.prof-card,
  .jeu-card,.jeu-bloc,.jeu-plateau,.jeu-fin-card,.jeu-global,.tut-chat,.tut-offre,.tut-bandeau,.tut-etat,
  .tut-hist,.pp-carte,.pp-doc,.astuce-card,.act-card,.act-toc,.act-kpi,.act-stat,.guide-card,.guide-step,
  .lock-card,.pager-link,.feat,.inst-card,.t-panel,.t-kpi,.pm-card,.pm-offre,.share-card,.md-card,
  .une-carte,.rec-bloc,.ident-form,.ident-choice,.obt-step,.pa-card,.isp-def,.isp-kpi,.isp-miss,.isp-fil,
  .tu-card,.hstat,.maint-card,.sc-sum,.sig-box,.theme-menu,.zoneswitch-menu,.tour-pop,.aide-panneau){
  background:var(--c-bg,var(--card));
  border:var(--c-bd,1px solid var(--line));
  box-shadow:var(--c-sh,var(--sh-1));
  -webkit-backdrop-filter:var(--c-blur,none);backdrop-filter:var(--c-blur,none);
}
/* Cartes cliquables : survol */
html:is([data-theme="verre"],[data-theme="cahier"],[data-theme="journal"],[data-theme="neumo"],[data-theme="clinique"],[data-theme="revue"],[data-theme="biblio"],[data-theme="these"],[data-theme="institution"],[data-theme="conseil"],[data-theme="liseuse"],[data-theme="portail"],[data-theme="suisse"],[data-theme="dashboard"],[data-theme="bento"],[data-theme="minimal"],[data-theme="graphite"],[data-theme="zen"],[data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"])
:where(.mod-card,.lesson,.pager-link,.zone-card,.jeu-card,.astuce-card,.guide-card,.pp-carte,.inst-card):hover{
  box-shadow:var(--c-sh-h,var(--sh-2));transform:var(--c-tf-h,translateY(-2px));
}
html:is([data-theme="verre"],[data-theme="cahier"],[data-theme="journal"],[data-theme="neumo"],[data-theme="clinique"],[data-theme="revue"],[data-theme="biblio"],[data-theme="these"],[data-theme="institution"],[data-theme="conseil"],[data-theme="liseuse"],[data-theme="portail"],[data-theme="suisse"],[data-theme="dashboard"],[data-theme="bento"],[data-theme="minimal"],[data-theme="graphite"],[data-theme="zen"],[data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"])
:where(.mod-card.is-locked):hover{transform:none;box-shadow:var(--c-sh,var(--sh-1));}

/* Boutons pleins */
html:is([data-theme="verre"],[data-theme="cahier"],[data-theme="journal"],[data-theme="neumo"],[data-theme="clinique"],[data-theme="revue"],[data-theme="biblio"],[data-theme="these"],[data-theme="institution"],[data-theme="conseil"],[data-theme="liseuse"],[data-theme="portail"],[data-theme="suisse"],[data-theme="dashboard"],[data-theme="bento"],[data-theme="minimal"],[data-theme="graphite"],[data-theme="zen"],[data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"])
:where(.btn-primary,.btn-gold,.chip-primary,.chip-gold){
  background:var(--b-bg,var(--blue));color:var(--b-txt,var(--btn-txt,#fff));
  border:var(--b-bd,1px solid transparent);box-shadow:var(--b-sh,var(--sh-1));
  border-radius:var(--b-r,var(--r-sm));font-family:var(--b-font,var(--ui));
  text-transform:var(--b-tt,none);letter-spacing:var(--b-ls,normal);
}
html:is([data-theme="verre"],[data-theme="cahier"],[data-theme="journal"],[data-theme="neumo"],[data-theme="clinique"],[data-theme="revue"],[data-theme="biblio"],[data-theme="these"],[data-theme="institution"],[data-theme="conseil"],[data-theme="liseuse"],[data-theme="portail"],[data-theme="suisse"],[data-theme="dashboard"],[data-theme="bento"],[data-theme="minimal"],[data-theme="graphite"],[data-theme="zen"],[data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"])
:where(.btn-primary,.btn-gold,.chip-primary,.chip-gold):hover{
  background:var(--b-bg-h,var(--blue-deep));color:var(--b-txt-h,var(--b-txt,var(--btn-txt,#fff)));
  box-shadow:var(--b-sh-h,var(--sh-2));transform:var(--b-tf-h,translateY(-1px));
}
/* Boutons contour, puces, commandes de la barre du haut */
html:is([data-theme="verre"],[data-theme="cahier"],[data-theme="journal"],[data-theme="neumo"],[data-theme="clinique"],[data-theme="revue"],[data-theme="biblio"],[data-theme="these"],[data-theme="institution"],[data-theme="conseil"],[data-theme="liseuse"],[data-theme="portail"],[data-theme="suisse"],[data-theme="dashboard"],[data-theme="bento"],[data-theme="minimal"],[data-theme="graphite"],[data-theme="zen"],[data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"])
:where(.btn-ghost,.chip,.btn-mini,.theme-btn,.zoneswitch-btn,.burger,.topbar-back){
  background:var(--g-bg,var(--card));border:var(--g-bd,1px solid var(--line));
  box-shadow:var(--g-sh,none);border-radius:var(--g-r,var(--r-sm));
  font-family:var(--b-font,var(--ui));
}
html:is([data-theme="verre"],[data-theme="cahier"],[data-theme="journal"],[data-theme="neumo"],[data-theme="clinique"],[data-theme="revue"],[data-theme="biblio"],[data-theme="these"],[data-theme="institution"],[data-theme="conseil"],[data-theme="liseuse"],[data-theme="portail"],[data-theme="suisse"],[data-theme="dashboard"],[data-theme="bento"],[data-theme="minimal"],[data-theme="graphite"],[data-theme="zen"],[data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"])
:where(.btn-primary,.btn-gold,.btn-ghost,.chip,.btn-mini,.theme-btn,.q-opt:not(:disabled)):active{
  transform:var(--b-tf-a,none);box-shadow:var(--b-sh-a,none);
}
/* Champs de saisie */
html:is([data-theme="verre"],[data-theme="cahier"],[data-theme="journal"],[data-theme="neumo"],[data-theme="clinique"],[data-theme="revue"],[data-theme="biblio"],[data-theme="these"],[data-theme="institution"],[data-theme="conseil"],[data-theme="liseuse"],[data-theme="portail"],[data-theme="suisse"],[data-theme="dashboard"],[data-theme="bento"],[data-theme="minimal"],[data-theme="graphite"],[data-theme="zen"],[data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"])
:where(.keyinput,.pm-form input,.pm-form select,.pm-form textarea,.avis-textarea){
  background:var(--i-bg,var(--card));border:var(--i-bd,1.5px solid var(--line));
  box-shadow:var(--i-sh,none);border-radius:var(--i-r,var(--r-sm));color:var(--ink);
}
/* Options de QCM (les états .is-good / .is-bad restent prioritaires) */
html:is([data-theme="verre"],[data-theme="cahier"],[data-theme="journal"],[data-theme="neumo"],[data-theme="clinique"],[data-theme="revue"],[data-theme="biblio"],[data-theme="these"],[data-theme="institution"],[data-theme="conseil"],[data-theme="liseuse"],[data-theme="portail"],[data-theme="suisse"],[data-theme="dashboard"],[data-theme="bento"],[data-theme="minimal"],[data-theme="graphite"],[data-theme="zen"],[data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"])
:where(.q-opt){
  background:var(--o-bg,var(--card));border:var(--o-bd,1.5px solid var(--line));
  box-shadow:var(--o-sh,none);border-radius:var(--o-r,var(--r-md));
}

/* Transition douce lors du changement (déjà posée par app.js : .theme-anim) */
html.theme-anim,html.theme-anim *{transition:background-color .35s ease,color .35s ease,border-color .35s ease!important;}

@media (prefers-reduced-motion: reduce){
  html[data-theme] body::before,html[data-theme] body::after
}


/* ==========================================================================
   1. VERRE (Glassmorphism) — fond lumineux animé, panneaux translucides
   floutés, reflets. Style sombre ; flou allégé sur mobile (performances).
   ========================================================================== */
html[data-theme="verre"]{
  --paper:#0b1026; --paper-2:rgba(255,255,255,.07); --card:rgba(255,255,255,.08);
  --line:rgba(255,255,255,.17); --line-soft:rgba(255,255,255,.09);
  --ink:#f3f5ff; --ink-2:#d0d6f2; --ink-3:#a3acd4; --ink-4:#7a83ad;
  --blue:#93b6ff; --blue-deep:#c1d4ff; --blue-soft:rgba(147,182,255,.22); --blue-tint:rgba(147,182,255,.10);
  --btn-txt:#0b1026;
  --ok:#62e6b4; --ok-bg:rgba(98,230,180,.16); --warn:#ffcb72; --warn-bg:rgba(255,203,114,.15);
  --err:#ff8fa0; --err-bg:rgba(255,143,160,.16);
  --star:#ffd36e; --star-deep:#ffc44a;
  --display:"Outfit",system-ui,sans-serif; --read:"Outfit",system-ui,sans-serif; --ui:"Outfit",system-ui,sans-serif;
  --r-sm:12px; --r-md:18px; --r-lg:24px;
  --sh-1:0 4px 18px rgba(0,0,0,.22); --sh-2:0 10px 34px rgba(0,0,0,.32); --sh-3:0 18px 50px rgba(0,0,0,.45);
  --topbar-bg:rgba(11,16,38,.38);
  --bg-img:none;
  --c-bg:linear-gradient(135deg,rgba(255,255,255,.12),rgba(255,255,255,.04));
  --c-bd:1px solid rgba(255,255,255,.18);
  --c-sh:0 8px 32px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.20);
  --c-sh-h:0 16px 46px rgba(0,0,0,.36),inset 0 1px 0 rgba(255,255,255,.30);
  --c-blur:blur(18px) saturate(150%);
  --b-bg:linear-gradient(135deg,#93b6ff,#c9a2ff); --b-bg-h:linear-gradient(135deg,#aac6ff,#d8b8ff);
  --b-sh:0 6px 22px rgba(150,140,255,.45); --b-sh-h:0 10px 30px rgba(150,140,255,.6); --b-r:999px;
  --g-bg:rgba(255,255,255,.08); --g-bd:1px solid rgba(255,255,255,.2); --g-r:999px;
  --i-bg:rgba(255,255,255,.07); --i-bd:1px solid rgba(255,255,255,.22);
  --o-bg:rgba(255,255,255,.06); --o-bd:1px solid rgba(255,255,255,.18);
  color-scheme:dark;
}
html[data-theme="verre"] body{color-scheme:dark;background-color:#0b1026;}
/* Nappes de lumière (décor fixe, derrière tout, sans clic) */
html[data-theme="verre"] body::before{content:"";position:fixed;inset:-20%;z-index:-1;pointer-events:none;
  background:
    radial-gradient(38% 38% at 18% 22%,rgba(122,92,255,.60),transparent 70%),
    radial-gradient(34% 34% at 82% 18%,rgba(0,196,255,.42),transparent 70%),
    radial-gradient(42% 42% at 62% 86%,rgba(255,84,170,.36),transparent 70%),
    radial-gradient(30% 30% at 30% 80%,rgba(0,230,170,.25),transparent 70%);
  filter:blur(30px);animation:verre-drift 26s ease-in-out infinite alternate;}
@keyframes verre-drift{
  0%{transform:translate3d(0,0,0) rotate(0deg) scale(1);}
  50%{transform:translate3d(3%,-2%,0) rotate(8deg) scale(1.06);}
  100%{transform:translate3d(-3%,3%,0) rotate(-6deg) scale(1.02);}
}
html[data-theme="verre"] .topbar{border-bottom:1px solid rgba(255,255,255,.14);-webkit-backdrop-filter:blur(20px) saturate(160%);backdrop-filter:blur(20px) saturate(160%);}
html[data-theme="verre"] .brand-badge{background:linear-gradient(135deg,#93b6ff,#c9a2ff);color:#0b1026;border-radius:12px;box-shadow:0 4px 16px rgba(150,140,255,.5);}
html[data-theme="verre"] .sidebar{background:rgba(255,255,255,.04);border-right:1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);}
html[data-theme="verre"] .sidebar a{border-radius:14px;}
html[data-theme="verre"] .sidebar a:hover{background:rgba(255,255,255,.08);}
html[data-theme="verre"] .sidebar a.is-active{background:linear-gradient(135deg,rgba(147,182,255,.28),rgba(201,162,255,.2));
  color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 4px 16px rgba(0,0,0,.2);}
html[data-theme="verre"] .page-title,html[data-theme="verre"] .reader-title,html[data-theme="verre"] .landing-title{
  background:linear-gradient(90deg,#ffffff 0%,#c4d4ff 50%,#e4c4ff 100%);-webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;color:transparent;}
html[data-theme="verre"] h1,html[data-theme="verre"] h2,html[data-theme="verre"] h3{font-weight:600;letter-spacing:-.015em;}
html[data-theme="verre"] .stat-row{border-color:rgba(255,255,255,.14);}
html[data-theme="verre"] .reader-sec{border-left:2px solid transparent;border-image:linear-gradient(180deg,#93b6ff,#c9a2ff,transparent) 1;}
html[data-theme="verre"] .reader-intro::first-letter{color:#c9a2ff;}
html[data-theme="verre"] .reader-schema{background:rgba(147,182,255,.08);border:1px solid rgba(147,182,255,.3);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);}
html[data-theme="verre"] .q-bar{background:rgba(255,255,255,.1);height:6px;}
html[data-theme="verre"] .q-bar i{background:linear-gradient(90deg,#93b6ff,#c9a2ff);box-shadow:0 0 12px rgba(180,160,255,.8);}
html[data-theme="verre"] .q-opt:hover:not(:disabled){background:rgba(147,182,255,.14);border-color:rgba(147,182,255,.6);box-shadow:0 0 0 3px rgba(147,182,255,.15);}
html[data-theme="verre"] .q-expl{background:rgba(147,182,255,.1);border-left-color:#c9a2ff;}
html[data-theme="verre"] .lesson-tag{background:rgba(255,255,255,.1);}
html[data-theme="verre"] .chip-danger{border-color:rgba(255,143,160,.4);}
html[data-theme="verre"] .chip-warn{border-color:rgba(255,203,114,.4);}
html[data-theme="verre"] .content :is(table,.act-table-wrap,.isp-table-wrap){color:var(--ink);}
html[data-theme="verre"] select option{background:#1a2040;color:#f3f5ff;}
@media (max-width:900px){
  html[data-theme="verre"] .sidebar{background:rgba(14,20,48,.88);}
}
@media (max-width:760px){
  html[data-theme="verre"]{--c-blur:blur(10px);}
  html[data-theme="verre"] body::before{filter:blur(20px);animation-duration:40s;}
}


/* ==========================================================================
   2. CAHIER D'ÉTUDIANT — papier Seyès, marge rouge, titres manuscrits,
   surligneur fluo, post-it scotchés, bordures « tracées à la main ».
   ========================================================================== */
html[data-theme="cahier"]{
  --paper:#fdfcf6; --paper-2:#f4f1e4; --card:#fffef9;
  --line:#c3cfe3; --line-soft:#dde5f1;
  --ink:#1c2a4a; --ink-2:#2f3f63; --ink-3:#56638a; --ink-4:#8791ad;
  --blue:#1f4fb5; --blue-deep:#163a88; --blue-soft:#fff3a3; --blue-tint:#eef3fd;
  --ok:#2e7d32; --ok-bg:#e1f3e1; --warn:#a86200; --warn-bg:#fff0cf; --err:#c62828; --err-bg:#fde3e3;
  --star:#f2b300; --star-deep:#d89e00;
  --display:"Caveat","Segoe Print","Comic Sans MS",cursive;
  --ui:"Patrick Hand","Segoe Print","Comic Sans MS",cursive;
  --read:"Nunito",system-ui,sans-serif;
  --r-sm:4px; --r-md:6px; --r-lg:8px;
  --sh-1:1px 2px 0 rgba(28,42,74,.06); --sh-2:2px 4px 10px rgba(28,42,74,.10); --sh-3:3px 8px 22px rgba(28,42,74,.16);
  --topbar-bg:rgba(253,252,246,.94);
  --bg-img:none;
  /* bordure « au crayon » : arrondis irréguliers */
  --wobble:255px 15px 225px 15px/15px 225px 15px 255px;
  --c-bd:1px solid #d3dcea; --c-sh:2px 3px 0 rgba(28,42,74,.06),0 6px 14px rgba(28,42,74,.05);
  --c-sh-h:3px 6px 0 rgba(28,42,74,.08),0 12px 24px rgba(28,42,74,.10); --c-tf-h:rotate(-.4deg) translateY(-2px);
  --b-bd:2px solid #163a88; --b-r:var(--wobble); --b-sh:2px 3px 0 rgba(22,58,136,.35); --b-sh-h:3px 5px 0 rgba(22,58,136,.35);
  --g-bd:2px solid #56638a; --g-r:var(--wobble); --g-bg:#fffef9;
  --i-bd:2px solid #56638a; --i-r:var(--wobble); --i-bg:#fffef9;
  --o-bd:2px solid #8791ad; --o-r:var(--wobble); --o-bg:#fffef9;
}
html[data-theme="cahier"] body{font-size:17px;}
/* Papier Seyès sur la zone de contenu + marge rouge */
html[data-theme="cahier"] .content{
  background-color:#fdfcf6;
  background-image:
    repeating-linear-gradient(to bottom,transparent 0 31px,rgba(79,112,196,.30) 31px 32px),
    repeating-linear-gradient(to bottom,transparent 0 7px,rgba(79,112,196,.11) 7px 8px),
    repeating-linear-gradient(to right,transparent 0 31px,rgba(79,112,196,.08) 31px 32px);
  padding-left:62px;}
html[data-theme="cahier"] .content::before{content:"";position:absolute;top:0;bottom:0;left:38px;width:0;
  border-left:2px solid rgba(214,55,55,.62);pointer-events:none;z-index:0;}
/* Barre latérale : couverture avec reliure à spirale */
html[data-theme="cahier"] .sidebar{background-color:#f6f0dd;border-right:none;
  background-image:radial-gradient(circle at calc(100% - 11px) 14px,#b9ae90 0 5px,#e9e0c6 5.5px 6.5px,transparent 7px);
  background-size:100% 28px;background-repeat:repeat-y;padding-right:30px;}
html[data-theme="cahier"] .sidebar-label{font-family:var(--display);font-size:1.25rem;text-transform:none;letter-spacing:0;color:#c62828;font-weight:700;}
html[data-theme="cahier"] .sidebar a{font-size:1.05rem;border-radius:var(--wobble);}
html[data-theme="cahier"] .sidebar a:hover{background:rgba(255,236,110,.35);}
html[data-theme="cahier"] .sidebar a.is-active{background:linear-gradient(transparent 12%,rgba(255,229,60,.75) 12% 88%,transparent 88%);color:var(--ink);font-weight:400;}
html[data-theme="cahier"] .topbar{border-bottom:2px dashed #c3cfe3;}
html[data-theme="cahier"] .brand-badge{background:#c62828;border-radius:50%;transform:rotate(-8deg);}
html[data-theme="cahier"] .brand-txt strong{font-size:1.5rem;font-weight:700;}
html[data-theme="cahier"] .theme-btn-txt,html[data-theme="cahier"] .topbar-out{font-size:1rem;}
/* Titres manuscrits (le Caveat est petit : on agrandit) */
html[data-theme="cahier"] h1,html[data-theme="cahier"] h2,html[data-theme="cahier"] h3,html[data-theme="cahier"] h4{font-weight:700;letter-spacing:0;}
html[data-theme="cahier"] .page-title,html[data-theme="cahier"] .reader-title{font-size:clamp(2.5rem,5vw,3.4rem);color:#163a88;line-height:1.05;}
html[data-theme="cahier"] .page-title{text-decoration:underline;text-decoration-color:rgba(198,40,40,.6);text-decoration-thickness:2px;text-underline-offset:8px;text-decoration-style:wavy;}
html[data-theme="cahier"] .section-title{font-size:2rem;border-bottom:none;color:#163a88;}
html[data-theme="cahier"] .eyebrow,html[data-theme="cahier"] .reader-eyebrow,html[data-theme="cahier"] .landing-eyebrow{
  font-family:var(--ui);text-transform:none;letter-spacing:0;font-size:1.05rem;color:#c62828;font-weight:400;}
html[data-theme="cahier"] .stat b{font-family:var(--display);font-size:2.3rem;color:#c62828;}
html[data-theme="cahier"] .stat-row{border-top:2px dashed #c3cfe3;border-bottom:2px dashed #c3cfe3;}
/* Cartes de modules : post-it scotchés */
html[data-theme="cahier"] .mod-grid{gap:26px;}
html[data-theme="cahier"] .mod-card{--c-bd:0 solid transparent;--c-sh:2px 6px 12px rgba(60,50,0,.16);border-radius:2px;
  padding-top:30px;--c-sh-h:4px 12px 22px rgba(60,50,0,.22);}
html[data-theme="cahier"] .mod-card:nth-child(4n+1){--c-bg:#fff59d;--rot:-1.2deg;}
html[data-theme="cahier"] .mod-card:nth-child(4n+2){--c-bg:#ffd6e8;--rot:.9deg;}
html[data-theme="cahier"] .mod-card:nth-child(4n+3){--c-bg:#cdf5dc;--rot:-.5deg;}
html[data-theme="cahier"] .mod-card:nth-child(4n+4){--c-bg:#d3e8ff;--rot:1.3deg;}
html[data-theme="cahier"] .mod-card:not(:hover){transform:rotate(var(--rot,0deg));}
html[data-theme="cahier"] .mod-card:hover{--c-tf-h:rotate(0) scale(1.03);}
html[data-theme="cahier"] .mod-card.is-locked{--c-bg:#eeeae0;}
html[data-theme="cahier"] .mod-card::before{content:"";position:absolute;top:-11px;left:50%;width:84px;height:24px;
  transform:translateX(-50%) rotate(-3deg);background:rgba(255,255,255,.55);border:1px solid rgba(0,0,0,.06);
  box-shadow:0 1px 2px rgba(0,0,0,.08);}
html[data-theme="cahier"] .mod-card h3{font-size:1.75rem;line-height:1.05;}
html[data-theme="cahier"] .mod-card p{font-family:var(--ui);font-size:1.02rem;color:var(--ink-2);}
html[data-theme="cahier"] .mod-card-num{font-family:var(--display);font-size:1.4rem;color:#c62828;}
html[data-theme="cahier"] .mod-card-meta{border-top:1px dashed rgba(28,42,74,.25);font-size:.95rem;}
html[data-theme="cahier"] .lesson{border-radius:var(--wobble);}
html[data-theme="cahier"] .lesson-num{font-family:var(--display);font-size:1.8rem;color:#c62828;}
html[data-theme="cahier"] .lesson-body h3{font-family:var(--ui);font-size:1.15rem;font-weight:400;}
html[data-theme="cahier"] .lesson-tag,html[data-theme="cahier"] .chip{border-radius:var(--wobble);}
/* Lecteur : surligneur et marge */
html[data-theme="cahier"] .reader-head{border-bottom:2px dashed #c3cfe3;}
html[data-theme="cahier"] .reader-sub{font-family:var(--ui);font-style:normal;}
html[data-theme="cahier"] .reader-intro::first-letter{font-family:var(--display);color:#c62828;font-size:3.6em;}
html[data-theme="cahier"] .reader-sec{border-left:none;padding-left:0;}
html[data-theme="cahier"] .reader-sec>h2{font-size:2rem;color:#163a88;}
html[data-theme="cahier"] .reader-sec>h2 .sec-num{font-family:var(--ui);font-size:1rem;color:#c62828;}
html[data-theme="cahier"] .reader-sec li::marker{content:"✎  ";color:#c62828;}
html[data-theme="cahier"] :is(.reader-sec,.reader-intro,.fiche,.q-expl) :is(strong,b){
  background:linear-gradient(transparent 52%,rgba(255,229,60,.8) 52% 92%,transparent 92%);padding:0 2px;}
html[data-theme="cahier"] .reader-schema{background:#fff9c4;border:none;border-radius:2px;transform:rotate(-.4deg);
  box-shadow:2px 6px 14px rgba(60,50,0,.14);}
html[data-theme="cahier"] .reader-schema h4{font-family:var(--display);font-size:1.4rem;text-transform:none;letter-spacing:0;color:#c62828;}
/* QCM */
html[data-theme="cahier"] .q-text{font-family:var(--ui);font-size:1.35rem;font-weight:400;}
html[data-theme="cahier"] .q-opt{font-size:1.08rem;}
html[data-theme="cahier"] .q-opt:hover:not(:disabled){background:rgba(255,236,110,.35);border-color:#163a88;}
html[data-theme="cahier"] .q-bar{height:10px;border:2px solid #56638a;border-radius:var(--wobble);background:transparent;}
html[data-theme="cahier"] .q-bar i{background:repeating-linear-gradient(-45deg,#1f4fb5 0 4px,transparent 4px 7px);}
html[data-theme="cahier"] .q-expl{border-left:3px solid #c62828;background:rgba(255,255,255,.7);}
html[data-theme="cahier"] .fiche-title{font-size:2.1rem;border-bottom:2px dashed #c3cfe3;}
html[data-theme="cahier"] .fiche-point{border-left:2px solid rgba(214,55,55,.5);}
html[data-theme="cahier"] .fiche-point h4{font-size:1.5rem;}
@media (max-width:760px){
  html[data-theme="cahier"] .content{padding-left:34px;}
  html[data-theme="cahier"] .content::before{left:20px;}
  html[data-theme="cahier"] .mod-card:nth-child(n){--rot:0deg;}
}


/* ==========================================================================
   3. JOURNAL / PRESSE — papier journal, filets noirs, titres serif très
   contrastés, lettrines, texte justifié, aucune ombre ni arrondi.
   ========================================================================== */
html[data-theme="journal"]{
  --paper:#f2eee4; --paper-2:#e8e2d4; --card:#f7f4ec;
  --line:#1a1a1a; --line-soft:#c7bfae;
  --ink:#141414; --ink-2:#2a2a2a; --ink-3:#545454; --ink-4:#787878;
  --blue:#8b1e1e; --blue-deep:#661313; --blue-soft:#e8d8cf; --blue-tint:#efe6dc;
  --ok:#2f5d3a; --ok-bg:#dfe6d6; --warn:#7a5400; --warn-bg:#efe2c2; --err:#8b1e1e; --err-bg:#f0dcd6;
  --star:#141414; --star-deep:#141414;
  --display:"Playfair Display",Georgia,"Times New Roman",serif;
  --read:"Source Serif 4",Georgia,serif;
  --ui:"Libre Franklin",Arial,sans-serif;
  --r-sm:0px; --r-md:0px; --r-lg:0px;
  --sh-1:none; --sh-2:none; --sh-3:0 0 0 1px #141414;
  --topbar-bg:#f2eee4;
  /* grain d'impression très léger (SVG en data: autorisé par la CSP) */
  --bg-img:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .06 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  --c-bd:1px solid #1a1a1a; --c-sh:none; --c-sh-h:none; --c-tf-h:none;
  --b-bg:#141414; --b-bg-h:#8b1e1e; --b-txt:#f2eee4; --b-sh:none; --b-sh-h:none; --b-tf-h:none;
  --b-tt:uppercase; --b-ls:.14em; --b-bd:1px solid #141414;
  --g-bg:transparent; --g-bd:1px solid #141414;
  --i-bg:#fbf9f3; --i-bd:1px solid #141414;
  --o-bg:#f7f4ec; --o-bd:1px solid #141414;
}
html[data-theme="journal"] .btn-primary,html[data-theme="journal"] .btn-gold{font-size:.78rem;padding:13px 22px;}
html[data-theme="journal"] h1,html[data-theme="journal"] h2,html[data-theme="journal"] h3{letter-spacing:-.005em;}
/* Bandeau de titre (la barre du haut devient l'en-tête du quotidien) */
html[data-theme="journal"] .topbar{border-bottom:4px double #141414;backdrop-filter:none;}
html[data-theme="journal"] .brand-badge{background:#141414;color:#f2eee4;border-radius:0;}
html[data-theme="journal"] .brand-txt strong{font-family:"UnifrakturMaguntia","Old English Text MT",var(--display);font-size:1.55rem;font-weight:400;letter-spacing:.01em;}
html[data-theme="journal"] .brand-txt small{font-family:var(--ui);text-transform:uppercase;letter-spacing:.18em;font-size:.62rem;color:#141414;}
html[data-theme="journal"] .topbar-out,html[data-theme="journal"] .topbar-zone{text-transform:uppercase;letter-spacing:.14em;font-size:.72rem;color:#141414;}
html[data-theme="journal"] .topbar-zone{background:none;border:1px solid #141414;border-radius:0;}
/* Rubriques */
html[data-theme="journal"] .sidebar{background:var(--paper);border-right:1px solid #141414;}
html[data-theme="journal"] .sidebar-label{color:#141414;border-top:3px double #141414;border-bottom:1px solid #141414;
  padding:6px 12px;letter-spacing:.2em;font-size:.66rem;}
html[data-theme="journal"] .sidebar a{border-radius:0;font-family:var(--read);font-size:.98rem;color:#2a2a2a;border-bottom:1px dotted #c7bfae;margin-bottom:0;}
html[data-theme="journal"] .sidebar a:hover{background:#e8e2d4;}
html[data-theme="journal"] .sidebar a.is-active{background:#141414;color:#f2eee4;font-weight:600;}
/* Titres */
html[data-theme="journal"] .eyebrow,html[data-theme="journal"] .reader-eyebrow,html[data-theme="journal"] .landing-eyebrow{
  display:inline-block;color:#8b1e1e;letter-spacing:.24em;font-size:.68rem;border-top:1px solid #141414;border-bottom:1px solid #141414;padding:5px 2px;}
html[data-theme="journal"] .page-title,html[data-theme="journal"] .reader-title{font-weight:900;font-size:clamp(2.2rem,4.4vw,3.4rem);line-height:1.02;letter-spacing:-.02em;}
html[data-theme="journal"] .page-sub,html[data-theme="journal"] .reader-sub{font-family:var(--read);font-style:italic;}
html[data-theme="journal"] .section-title{font-family:var(--ui);text-transform:uppercase;letter-spacing:.2em;font-size:.82rem;font-weight:800;
  border-bottom:1px solid #141414;border-top:4px double #141414;padding:9px 0 8px;}
html[data-theme="journal"] .stat-row{border-top:1px solid #141414;border-bottom:1px solid #141414;gap:0;}
html[data-theme="journal"] .stat{padding:0 26px;border-right:1px solid #c7bfae;}
html[data-theme="journal"] .stat:first-child{padding-left:0;}
html[data-theme="journal"] .stat b{font-weight:900;color:#141414;}
html[data-theme="journal"] .stat span{text-transform:uppercase;letter-spacing:.14em;font-size:.66rem;}
/* Modules : articles en colonnes séparées par des filets */
html[data-theme="journal"] .mod-grid{gap:0;border-top:1px solid #141414;}
html[data-theme="journal"] .mod-card{--c-bg:transparent;--c-bd:0 solid transparent;border-right:1px solid #c7bfae;border-bottom:1px solid #c7bfae;padding:20px 22px 22px;}
html[data-theme="journal"] .mod-card:hover{--c-bg:#e8e2d4;}
html[data-theme="journal"] .mod-card:hover h3{text-decoration:underline;text-underline-offset:3px;}
html[data-theme="journal"] .mod-card h3{font-weight:700;font-size:1.35rem;}
html[data-theme="journal"] .mod-card p{font-family:var(--read);font-size:.98rem;color:#2a2a2a;}
html[data-theme="journal"] .mod-card-num{font-family:var(--ui);font-size:.66rem;letter-spacing:.2em;color:#8b1e1e;text-transform:uppercase;}
html[data-theme="journal"] .mod-card-num::before{content:"N° ";}
html[data-theme="journal"] .mod-card-meta{border-top:1px solid #141414;font-family:var(--ui);text-transform:uppercase;letter-spacing:.12em;font-size:.66rem;}
html[data-theme="journal"] .lesson-list{gap:0;border-top:1px solid #141414;}
html[data-theme="journal"] .lesson{--c-bg:transparent;--c-bd:0 solid transparent;border-bottom:1px solid #c7bfae;}
html[data-theme="journal"] .lesson:hover{--c-bg:#e8e2d4;--c-tf-h:none;}
html[data-theme="journal"] .lesson-num{font-family:var(--display);font-style:italic;font-weight:900;font-size:1.7rem;color:#8b1e1e;}
html[data-theme="journal"] .lesson-tag,html[data-theme="journal"] .chip{border-radius:0;background:transparent;border:1px solid #141414;
  text-transform:uppercase;letter-spacing:.1em;font-size:.64rem;color:#141414;}
/* Lecteur : lettrine, texte justifié, intro sur deux colonnes (grand écran) */
html[data-theme="journal"] .reader-head{border-bottom:4px double #141414;text-align:center;}
html[data-theme="journal"] .reader-meta{justify-content:center;text-transform:uppercase;letter-spacing:.12em;font-size:.7rem;}
html[data-theme="journal"] .reader-intro{text-align:justify;hyphens:auto;-webkit-hyphens:auto;}
html[data-theme="journal"] .reader-intro::first-letter{font-family:var(--display);font-weight:900;font-size:4.4em;line-height:.8;color:#141414;padding:8px 10px 0 0;}
html[data-theme="journal"] .reader-sec{border-left:none;padding-left:0;}
html[data-theme="journal"] .reader-sec>h2{font-weight:800;font-size:1.55rem;border-top:1px solid #141414;padding-top:12px;}
html[data-theme="journal"] .reader-sec>h2 .sec-num{color:#8b1e1e;letter-spacing:.2em;font-size:.68rem;text-transform:uppercase;}
html[data-theme="journal"] .reader-sec p,html[data-theme="journal"] .reader-sec li{text-align:justify;hyphens:auto;-webkit-hyphens:auto;}
html[data-theme="journal"] .reader-sec li::marker{content:"■  ";color:#141414;font-size:.7em;}
html[data-theme="journal"] .reader-schema{background:#e8e2d4;border:2px solid #141414;padding-top:0;}
html[data-theme="journal"] .reader-schema h4{display:inline-block;background:#141414;color:#f2eee4;padding:4px 10px;margin:0 0 12px -24px;letter-spacing:.18em;}
/* QCM : double cadre */
html[data-theme="journal"] :is(.q-card,.qcard,.fiche,.exam-intro,.keycard){box-shadow:0 0 0 5px var(--paper),0 0 0 6px #141414;}
html[data-theme="journal"] .q-progress{text-transform:uppercase;letter-spacing:.14em;font-size:.7rem;color:#141414;}
html[data-theme="journal"] .q-bar{height:3px;background:#c7bfae;border-radius:0;}
html[data-theme="journal"] .q-bar i{background:#141414;border-radius:0;}
html[data-theme="journal"] .q-text{font-family:var(--display);font-weight:700;font-size:1.35rem;}
html[data-theme="journal"] .q-opt{font-family:var(--read);}
html[data-theme="journal"] .q-opt:hover:not(:disabled){background:#e8e2d4;border-color:#141414;}
html[data-theme="journal"] .q-expl{border-left:4px solid #141414;background:#e8e2d4;font-style:italic;}
html[data-theme="journal"] .fiche-title{border-bottom:4px double #141414;font-weight:900;}
html[data-theme="journal"] .fiche-point{border-left:none;padding-left:0;border-bottom:1px dotted #c7bfae;padding-bottom:14px;}
html[data-theme="journal"] .fiche-point h4{color:#141414;}
@media (max-width:760px){
  html[data-theme="journal"] .stat{padding:0 14px;}
  html[data-theme="journal"] .mod-card{border-right:none;}
}


/* ==========================================================================
   4. NEUMORPHISME — surfaces d'une seule matière, en relief ou en creux,
   éclairées par deux ombres (claire en haut à gauche, sombre en bas à droite).
   ========================================================================== */
html[data-theme="neumo"]{
  --paper:#e4e9f0; --paper-2:#dde3eb; --card:#e4e9f0;
  --line:#cfd7e2; --line-soft:#d8dfe8;
  --ink:#2d3748; --ink-2:#4a5568; --ink-3:#6b7a90; --ink-4:#98a4b6;
  --blue:#5468e0; --blue-deep:#3f52c7; --blue-soft:#e4e9f0; --blue-tint:#e9edf6;
  --ok:#2f8a66; --ok-bg:#dcefe6; --warn:#a0690f; --warn-bg:#f3e8d2; --err:#c24848; --err-bg:#f5e0e0;
  --display:"Nunito",system-ui,sans-serif; --read:"Nunito",system-ui,sans-serif; --ui:"Nunito",system-ui,sans-serif;
  --r-sm:14px; --r-md:20px; --r-lg:28px;
  --nm-dark:#bec7d4; --nm-light:#ffffff;
  --nm-out:8px 8px 16px var(--nm-dark),-8px -8px 16px var(--nm-light);
  --nm-out-sm:4px 4px 9px var(--nm-dark),-4px -4px 9px var(--nm-light);
  --nm-in:inset 4px 4px 9px var(--nm-dark),inset -4px -4px 9px var(--nm-light);
  --sh-1:var(--nm-out-sm); --sh-2:var(--nm-out); --sh-3:12px 12px 26px var(--nm-dark),-12px -12px 26px var(--nm-light);
  --topbar-bg:#e4e9f0; --bg-img:none;
  --c-bg:#e4e9f0; --c-bd:1px solid rgba(255,255,255,.4); --c-sh:var(--nm-out);
  --c-sh-h:12px 12px 24px var(--nm-dark),-12px -12px 24px var(--nm-light); --c-tf-h:translateY(-2px);
  --b-bg:linear-gradient(145deg,#6679ee,#4b5ed4); --b-bg-h:linear-gradient(145deg,#7084f2,#5165dc);
  --b-bd:0 solid transparent; --b-r:999px; --b-sh:5px 5px 11px var(--nm-dark),-5px -5px 11px var(--nm-light);
  --b-sh-h:7px 7px 14px var(--nm-dark),-7px -7px 14px var(--nm-light);
  --b-tf-a:translateY(1px); --b-sh-a:var(--nm-in);
  --g-bg:#e4e9f0; --g-bd:0 solid transparent; --g-sh:var(--nm-out-sm); --g-r:999px;
  --i-bg:#e4e9f0; --i-bd:1px solid transparent; --i-sh:var(--nm-in); --i-r:14px;
  --o-bg:#e4e9f0; --o-bd:1.5px solid transparent; --o-sh:var(--nm-out-sm); --o-r:16px;
}
html[data-theme="neumo"] h1,html[data-theme="neumo"] h2,html[data-theme="neumo"] h3{font-weight:800;letter-spacing:-.01em;}
html[data-theme="neumo"] .topbar{border-bottom:none;box-shadow:0 6px 14px rgba(190,199,212,.55);backdrop-filter:none;}
html[data-theme="neumo"] .brand-badge{background:#e4e9f0;color:var(--blue);border-radius:12px;box-shadow:var(--nm-out-sm);}
html[data-theme="neumo"] .topbar-zone{background:#e4e9f0;box-shadow:var(--nm-in);}
html[data-theme="neumo"] .sidebar{background:#e4e9f0;border-right:none;box-shadow:6px 0 14px rgba(190,199,212,.45);}
html[data-theme="neumo"] .sidebar a{border-radius:14px;margin-bottom:6px;}
html[data-theme="neumo"] .sidebar a:hover{background:#e4e9f0;box-shadow:var(--nm-out-sm);}
html[data-theme="neumo"] .sidebar a.is-active{background:#e4e9f0;color:var(--blue);box-shadow:var(--nm-in);font-weight:800;}
html[data-theme="neumo"] .eyebrow,html[data-theme="neumo"] .reader-eyebrow,html[data-theme="neumo"] .landing-eyebrow{
  display:inline-block;padding:6px 14px;border-radius:999px;box-shadow:var(--nm-in);}
html[data-theme="neumo"] .section-title{border-bottom:none;}
html[data-theme="neumo"] .stat-row{border:none;gap:18px;}
html[data-theme="neumo"] .stat{padding:14px 22px;border-radius:20px;box-shadow:var(--nm-out-sm);min-width:110px;}
html[data-theme="neumo"] .stat b{color:var(--blue);font-weight:800;}
html[data-theme="neumo"] .mod-grid{gap:26px;}
html[data-theme="neumo"] .mod-card-num{display:inline-grid;place-items:center;width:42px;height:42px;border-radius:50%;box-shadow:var(--nm-in);color:var(--blue);font-weight:800;}
html[data-theme="neumo"] .mod-card-meta{border-top:none;}
html[data-theme="neumo"] .mod-card.is-locked{opacity:.7;}
html[data-theme="neumo"] .lesson-list{gap:16px;}
html[data-theme="neumo"] .lesson-num{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;box-shadow:var(--nm-in);color:var(--blue);font-size:1.05rem;font-weight:800;}
html[data-theme="neumo"] .lesson-tag,html[data-theme="neumo"] .chip{box-shadow:var(--nm-out-sm);}
html[data-theme="neumo"] .lesson-tag{background:#e4e9f0;box-shadow:var(--nm-in);}
html[data-theme="neumo"] .reader-head{border-bottom:none;}
html[data-theme="neumo"] .reader-sec{border-left:none;padding:24px 26px;border-radius:24px;box-shadow:var(--nm-out);}
html[data-theme="neumo"] .reader-sec>h2 .sec-num{display:inline-block;padding:3px 12px;border-radius:999px;box-shadow:var(--nm-in);margin-bottom:10px;}
html[data-theme="neumo"] .reader-schema{background:#e4e9f0;border:none;border-radius:20px;box-shadow:var(--nm-in);}
html[data-theme="neumo"] .q-bar{height:12px;box-shadow:var(--nm-in);background:#e4e9f0;}
html[data-theme="neumo"] .q-bar i{background:linear-gradient(90deg,#6679ee,#4b5ed4);box-shadow:0 0 8px rgba(84,104,224,.4);}
html[data-theme="neumo"] .q-opt:hover:not(:disabled){background:#e4e9f0;box-shadow:var(--nm-in);border-color:transparent;}
html[data-theme="neumo"] .q-opt.is-good{box-shadow:var(--nm-in);border-color:var(--ok);}
html[data-theme="neumo"] .q-opt.is-bad{box-shadow:var(--nm-in);border-color:var(--err);}
html[data-theme="neumo"] .q-expl{background:#e4e9f0;border-left:none;border-radius:16px;box-shadow:var(--nm-in);}
html[data-theme="neumo"] .fiche-title{border-bottom:none;}
html[data-theme="neumo"] .fiche-point{border-left:none;padding:14px 18px;border-radius:16px;box-shadow:var(--nm-in);}
html[data-theme="neumo"] .theme-item.is-active{box-shadow:var(--nm-in);}
html[data-theme="neumo"] .crumbs{display:inline-flex;padding:8px 16px;border-radius:999px;box-shadow:var(--nm-in);}


/* ==========================================================================
   5. CLINIQUE / DOSSIER MÉDICAL — papier millimétré type ECG, fiches à
   onglet, références de dossier, étiquettes en chasse fixe, croix rouge.
   ========================================================================== */
html[data-theme="clinique"]{
  --paper:#f1f6f8; --paper-2:#e4edf1; --card:#ffffff;
  --line:#c4d3dc; --line-soft:#dee8ee;
  --ink:#0f2230; --ink-2:#2b4354; --ink-3:#577083; --ink-4:#879dac;
  --blue:#00796b; --blue-deep:#005a4f; --blue-soft:#d4eeea; --blue-tint:#ebf7f5;
  --ok:#2e7d32; --ok-bg:#e2f2e3; --warn:#a86200; --warn-bg:#fff0d4; --err:#c62828; --err-bg:#fde4e4;
  --display:"IBM Plex Sans Condensed","Arial Narrow",sans-serif;
  --read:"IBM Plex Sans",system-ui,sans-serif;
  --ui:"IBM Plex Sans",system-ui,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;
  --r-sm:2px; --r-md:3px; --r-lg:4px;
  --sh-1:0 1px 0 rgba(15,34,48,.06); --sh-2:0 4px 14px rgba(15,34,48,.08); --sh-3:0 10px 30px rgba(15,34,48,.14);
  --topbar-bg:#ffffff;
  --bg-img:
    linear-gradient(rgba(0,121,107,.07) 1px,transparent 1px),
    linear-gradient(90deg,rgba(0,121,107,.07) 1px,transparent 1px),
    linear-gradient(rgba(0,121,107,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(0,121,107,.035) 1px,transparent 1px);
  --c-bd:1px solid #c4d3dc; --c-sh:0 1px 0 rgba(15,34,48,.05); --c-sh-h:0 6px 18px rgba(15,34,48,.10); --c-tf-h:none;
  --b-tt:uppercase; --b-ls:.08em; --b-sh:none; --b-sh-h:0 0 0 3px rgba(0,121,107,.2); --b-tf-h:none;
  --b-font:"IBM Plex Sans Condensed","Arial Narrow",sans-serif;
  --g-bd:1px solid #c4d3dc;
  --i-bd:1px solid #9fb3c0;
  --o-bd:1px solid #c4d3dc;
}
html[data-theme="clinique"] body{background-size:100px 100px,100px 100px,20px 20px,20px 20px;}
html[data-theme="clinique"] :where(.keyinput):focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(0,121,107,.18);}
/* Barre du haut : en-tête de formulaire hospitalier */
html[data-theme="clinique"] .topbar{border-top:4px solid var(--blue);border-bottom:1px solid #c4d3dc;backdrop-filter:none;}
html[data-theme="clinique"] .brand-badge{background:#fff;color:#c62828;border:2px solid #c62828;border-radius:2px;font-weight:700;}
html[data-theme="clinique"] .brand-txt strong{font-family:var(--display);text-transform:uppercase;letter-spacing:.06em;font-weight:700;}
html[data-theme="clinique"] .brand-txt small{font-family:var(--mono);font-size:.66rem;text-transform:uppercase;}
html[data-theme="clinique"] .topbar-zone{font-family:var(--mono);border-radius:2px;}
/* Barre latérale : onglets de classeur */
html[data-theme="clinique"] .sidebar{background:#ffffff;border-right:1px solid #c4d3dc;counter-reset:cl-grp;}
html[data-theme="clinique"] .sidebar-group{counter-increment:cl-grp;}
html[data-theme="clinique"] .sidebar-label{font-family:var(--mono);font-weight:500;color:var(--ink-3);letter-spacing:.08em;}
html[data-theme="clinique"] .sidebar-label::before{content:counter(cl-grp,decimal-leading-zero) " · ";color:var(--blue);}
html[data-theme="clinique"] .sidebar a{border-radius:0;border-left:4px solid transparent;margin-bottom:0;}
html[data-theme="clinique"] .sidebar a:hover{background:#f1f6f8;border-left-color:#c4d3dc;}
html[data-theme="clinique"] .sidebar a.is-active{background:var(--blue-tint);border-left-color:var(--blue);color:var(--blue-deep);}
/* Titres */
html[data-theme="clinique"] .eyebrow,html[data-theme="clinique"] .reader-eyebrow,html[data-theme="clinique"] .landing-eyebrow{
  font-family:var(--mono);font-weight:500;display:inline-block;background:var(--blue);color:#fff;padding:3px 9px;letter-spacing:.1em;}
html[data-theme="clinique"] .page-title,html[data-theme="clinique"] .reader-title{font-weight:700;letter-spacing:-.005em;}
html[data-theme="clinique"] .section-title{text-transform:uppercase;letter-spacing:.08em;font-size:1.05rem;border-bottom:2px solid var(--blue);}
html[data-theme="clinique"] .stat-row{background:#fff;border:1px solid #c4d3dc;border-top:4px solid var(--blue);padding:16px 22px;}
html[data-theme="clinique"] .stat b{font-family:var(--mono);font-weight:500;color:var(--blue-deep);}
html[data-theme="clinique"] .stat span{font-family:var(--mono);text-transform:uppercase;font-size:.68rem;letter-spacing:.08em;}
/* Cartes = fiches de dossier à onglet */
html[data-theme="clinique"] :where(.mod-card,.q-card,.qcard,.fiche,.exam-intro,.keycard,.zone-card,.prof-card,.tut-chat,.avis-form-card){border-top:4px solid var(--blue);}
html[data-theme="clinique"] .mod-card{border-top:4px solid var(--blue);}
html[data-theme="clinique"] .mod-card:nth-child(3n+2){border-top-color:#1565c0;}
html[data-theme="clinique"] .mod-card:nth-child(3n+3){border-top-color:#6a4fa3;}
html[data-theme="clinique"] .mod-card.is-locked{border-top-color:#879dac;}
html[data-theme="clinique"] .mod-card-num{font-family:var(--mono);font-weight:500;font-size:.72rem;color:var(--ink-3);letter-spacing:.06em;}
html[data-theme="clinique"] .mod-card-num::before{content:"RÉF. MOD-";}
html[data-theme="clinique"] .mod-card h3{font-weight:700;}
html[data-theme="clinique"] .mod-card-meta{font-family:var(--mono);font-size:.72rem;text-transform:uppercase;}
html[data-theme="clinique"] .lesson{border-left:4px solid var(--blue);}
html[data-theme="clinique"] .lesson-num{font-family:var(--mono);font-size:1rem;color:var(--blue);background:var(--blue-tint);border:1px solid var(--blue-soft);padding:4px 6px;}
html[data-theme="clinique"] .lesson-tag,html[data-theme="clinique"] .chip{border-radius:2px;font-family:var(--mono);font-weight:500;text-transform:uppercase;font-size:.66rem;letter-spacing:.05em;}
html[data-theme="clinique"] .lesson-tag{border:1px solid #c4d3dc;background:#fff;}
/* Lecteur : compte rendu structuré */
html[data-theme="clinique"] .reader-head{border-bottom:2px solid var(--blue);}
html[data-theme="clinique"] .reader-sub{font-style:normal;}
html[data-theme="clinique"] .reader-meta{font-family:var(--mono);font-size:.74rem;text-transform:uppercase;}
html[data-theme="clinique"] .reader-intro::first-letter{font-family:inherit;font-size:1em;float:none;padding:0;color:inherit;font-weight:inherit;}
html[data-theme="clinique"] .reader-intro{background:#fff;border:1px solid #c4d3dc;border-left:4px solid var(--blue);padding:18px 22px;font-size:1.06rem;}
html[data-theme="clinique"] .reader-sec{border-left:1px solid #c4d3dc;}
html[data-theme="clinique"] .reader-sec>h2{font-weight:700;}
html[data-theme="clinique"] .reader-sec>h2 .sec-num{display:inline-block;font-family:var(--mono);font-weight:500;background:var(--blue-tint);border:1px solid var(--blue-soft);padding:1px 8px;}
html[data-theme="clinique"] .reader-sec p,html[data-theme="clinique"] .reader-sec li{font-size:1.04rem;}
html[data-theme="clinique"] .reader-sec li::marker{content:"▸ ";color:var(--blue);}
html[data-theme="clinique"] .reader-schema{background:#fff;border:1px dashed var(--blue);border-radius:2px;}
html[data-theme="clinique"] .reader-schema h4{font-family:var(--mono);font-weight:500;background:var(--blue-tint);display:inline-block;padding:2px 8px;}
/* QCM : formulaire */
html[data-theme="clinique"] .q-progress{font-family:var(--mono);font-weight:500;text-transform:uppercase;font-size:.72rem;}
html[data-theme="clinique"] .q-bar{height:8px;border-radius:0;background:#e4edf1;
  background-image:linear-gradient(90deg,#c4d3dc 1px,transparent 1px);background-size:10% 100%;}
html[data-theme="clinique"] .q-bar i{border-radius:0;}
html[data-theme="clinique"] .q-text{font-weight:600;font-size:1.14rem;}
html[data-theme="clinique"] .q-opt:hover:not(:disabled){background:var(--blue-tint);border-color:var(--blue);}
html[data-theme="clinique"] .q-expl{border-left:4px solid var(--blue);background:#fff;border-top:1px solid #c4d3dc;border-right:1px solid #c4d3dc;border-bottom:1px solid #c4d3dc;}
html[data-theme="clinique"] .fiche-title{border-bottom:2px solid var(--blue);text-transform:uppercase;letter-spacing:.04em;font-size:1.3rem;}
html[data-theme="clinique"] .fiche-point{border-left:3px solid var(--blue-soft);}
html[data-theme="clinique"] .fiche-point h4{font-family:var(--display);color:var(--blue-deep);}
html[data-theme="clinique"] .exam-timer #exam-clock{font-family:var(--mono);}


/* ==========================================================================
   STYLES ACADÉMIQUES (v9.78) — principes communs aux six styles suivants :
   · jamais de blanc pur ni de noir pur : blancs cassés, encres adoucies ;
   · un seul accent peu saturé + une couleur secondaire discrète ;
   · contraste confortable pour la lecture longue (≈ 9:1 à 13:1), pas maximal ;
   · aucune animation décorative : la forme passe par la typographie, les
     filets, les marges et la structure de la page.
   ========================================================================== */


/* ==========================================================================
   6. REVUE SCIENTIFIQUE — l'allure d'un article de grande revue médicale :
   filet bordeaux, « Résumé » encadré, sections numérotées, figures légendées.
   ========================================================================== */
html[data-theme="revue"]{
  --paper:#f8f7f3; --paper-2:#efede7; --card:#fdfcf9;
  --line:#dcd8cf; --line-soft:#e8e5de;
  --ink:#212428; --ink-2:#3b4046; --ink-3:#686e75; --ink-4:#949aa0;
  --blue:#7a2632; --blue-deep:#5e1b25; --blue-soft:#f1e4e4; --blue-tint:#f6efee;
  --ok:#2f6a52; --ok-bg:#e5efe9; --warn:#8a6420; --warn-bg:#f4ecd9; --err:#9b2f2f; --err-bg:#f5e5e3;
  --star:#b58a35; --star-deep:#9c762b;
  --display:"Source Serif 4",Georgia,serif; --read:"Source Serif 4",Georgia,serif;
  --ui:"Source Sans 3","Source Sans Pro",system-ui,sans-serif;
  --r-sm:2px; --r-md:2px; --r-lg:3px;
  --sh-1:none; --sh-2:0 2px 10px rgba(33,36,40,.06); --sh-3:0 8px 26px rgba(33,36,40,.10);
  --topbar-bg:#fdfcf9; --bg-img:none;
  --c-bd:1px solid #dcd8cf; --c-sh:none; --c-sh-h:0 2px 10px rgba(33,36,40,.06); --c-tf-h:none;
  --b-sh:none; --b-sh-h:none; --b-tf-h:none;
  --g-bd:1px solid #cfcac0;
  --o-bd:1px solid #dcd8cf;
}
html[data-theme="revue"] .topbar{border-top:3px solid #7a2632;border-bottom:1px solid #dcd8cf;backdrop-filter:none;}
html[data-theme="revue"] .brand-badge{background:#7a2632;border-radius:2px;}
html[data-theme="revue"] .brand-txt strong{font-weight:700;letter-spacing:.01em;}
html[data-theme="revue"] .brand-txt small{font-variant:small-caps;letter-spacing:.06em;font-size:.78rem;}
html[data-theme="revue"] .sidebar{background:#f8f7f3;border-right:1px solid #dcd8cf;}
html[data-theme="revue"] .sidebar-label{color:#7a2632;letter-spacing:.14em;border-bottom:1px solid #dcd8cf;padding-bottom:6px;margin-left:12px;margin-right:12px;padding-left:0;}
html[data-theme="revue"] .sidebar a{border-radius:0;border-left:2px solid transparent;}
html[data-theme="revue"] .sidebar a:hover{background:#efede7;}
html[data-theme="revue"] .sidebar a.is-active{background:transparent;border-left-color:#7a2632;color:#212428;font-weight:600;}
html[data-theme="revue"] .eyebrow,html[data-theme="revue"] .reader-eyebrow,html[data-theme="revue"] .landing-eyebrow{
  color:#7a2632;letter-spacing:.16em;border-left:3px solid #7a2632;padding-left:9px;}
html[data-theme="revue"] .page-title,html[data-theme="revue"] .reader-title{font-weight:700;letter-spacing:-.012em;}
html[data-theme="revue"] .reader-sub,html[data-theme="revue"] .page-sub{font-style:normal;color:#3b4046;}
html[data-theme="revue"] .section-title{font-family:var(--ui);font-size:.8rem;font-weight:700;text-transform:uppercase;letter-spacing:.14em;
  color:#7a2632;border-bottom:1px solid #212428;}
html[data-theme="revue"] .stat-row{border-top:1px solid #212428;border-bottom:1px solid #212428;}
html[data-theme="revue"] .stat b{font-weight:600;color:#212428;}
html[data-theme="revue"] .stat span{font-variant:small-caps;letter-spacing:.05em;font-size:.86rem;}
html[data-theme="revue"] .mod-card{border-top:2px solid #212428;}
html[data-theme="revue"] .mod-card-num{font-family:var(--ui);font-size:.72rem;letter-spacing:.14em;color:#7a2632;}
html[data-theme="revue"] .mod-card-num::before{content:"MODULE ";}
html[data-theme="revue"] .mod-card h3{font-weight:700;}
html[data-theme="revue"] .mod-card-meta{border-top:1px solid #e8e5de;}
html[data-theme="revue"] .lesson-num{color:#7a2632;font-weight:600;}
html[data-theme="revue"] .lesson-tag,html[data-theme="revue"] .chip{border-radius:2px;}
/* Lecteur : article */
html[data-theme="revue"] .reader-head{border-bottom:1px solid #212428;}
html[data-theme="revue"] .reader-meta{font-variant:small-caps;letter-spacing:.04em;}
html[data-theme="revue"] .reader-intro{background:#efede7;border-left:3px solid #7a2632;padding:16px 22px 16px;font-size:1.06rem;line-height:1.7;}
html[data-theme="revue"] .reader-intro::before{content:"Résumé";display:block;font-family:var(--ui);font-size:.72rem;font-weight:700;
  letter-spacing:.16em;text-transform:uppercase;color:#7a2632;margin-bottom:6px;}
html[data-theme="revue"] .reader-intro::first-letter{font-family:inherit;font-size:1em;float:none;padding:0;color:inherit;font-weight:inherit;line-height:inherit;}
html[data-theme="revue"] .reader-sec{border-left:none;padding-left:0;}
html[data-theme="revue"] .reader-sec>h2{font-size:1.28rem;font-weight:700;}
html[data-theme="revue"] .reader-sec>h2 .sec-num{display:inline;font-family:var(--display);font-size:1em;color:#7a2632;margin-right:6px;letter-spacing:0;}
html[data-theme="revue"] .reader-sec li::marker{content:"–  ";color:#7a2632;}
html[data-theme="revue"] .reader-sec a{text-decoration:underline;text-underline-offset:2px;text-decoration-color:rgba(122,38,50,.4);}
html[data-theme="revue"] .reader-schema{background:#fdfcf9;border:1px solid #dcd8cf;border-top:2px solid #212428;border-radius:0;}
html[data-theme="revue"] .reader-schema h4{font-family:var(--ui);color:#212428;}
html[data-theme="revue"] .reader-schema h4::before{content:"Encadré — ";color:#7a2632;}
/* QCM */
html[data-theme="revue"] :is(.q-card,.qcard,.fiche,.exam-intro){border-top:2px solid #212428;}
html[data-theme="revue"] .q-bar{height:3px;border-radius:0;background:#e8e5de;}
html[data-theme="revue"] .q-bar i{border-radius:0;}
html[data-theme="revue"] .q-opt:hover:not(:disabled){background:#f6efee;border-color:#7a2632;}
html[data-theme="revue"] .q-expl{border-left:3px solid #7a2632;background:#efede7;}
html[data-theme="revue"] .fiche-title{border-bottom:1px solid #212428;}
html[data-theme="revue"] .fiche-point{border-left:2px solid #e8e5de;}
html[data-theme="revue"] .fiche-point h4{color:#212428;}


/* ==========================================================================
   7. BIBLIOTHÈQUE UNIVERSITAIRE — ivoire, bleu marine et or vieilli ;
   Garamond, petites capitales, doubles filets dorés, cadres d'ouvrage ancien.
   ========================================================================== */
html[data-theme="biblio"]{
  --paper:#f5f1e6; --paper-2:#ece6d6; --card:#fbf8f0;
  --line:#dcd2bb; --line-soft:#e7dfcb;
  --ink:#1f2433; --ink-2:#3a4052; --ink-3:#686c78; --ink-4:#969892;
  --blue:#1f3354; --blue-deep:#15243d; --blue-soft:#e3e3dc; --blue-tint:#eeebe1;
  --gold:#9a7b3c; --gold-soft:rgba(154,123,60,.35);
  --btn-txt:#f5f1e6;
  --ok:#3d6a4c; --ok-bg:#e3eadd; --warn:#8a6420; --warn-bg:#f1e6cc; --err:#8f3232; --err-bg:#f3e1dc;
  --star:#9a7b3c; --star-deep:#806430;
  --display:"Cormorant Garamond","EB Garamond",Garamond,Georgia,serif;
  --read:"EB Garamond",Garamond,Georgia,serif;
  --ui:"EB Garamond",Garamond,Georgia,serif;
  --r-sm:2px; --r-md:3px; --r-lg:4px;
  --sh-1:none; --sh-2:0 3px 14px rgba(31,36,51,.08); --sh-3:0 10px 30px rgba(31,36,51,.14);
  --topbar-bg:#1f3354; --bg-img:none;
  --c-bd:1px solid #dcd2bb;
  --c-sh:inset 0 0 0 4px #fbf8f0,inset 0 0 0 5px rgba(154,123,60,.32);
  --c-sh-h:inset 0 0 0 4px #fbf8f0,inset 0 0 0 5px rgba(154,123,60,.6),0 4px 16px rgba(31,36,51,.08); --c-tf-h:none;
  --b-bd:1px solid #1f3354; --b-sh:none; --b-sh-h:none; --b-tf-h:none; --b-ls:.06em;
  --g-bd:1px solid #c9bc9c; --g-bg:#fbf8f0;
  --i-bd:1px solid #c9bc9c; --i-bg:#fdfbf6;
  --o-bd:1px solid #dcd2bb; --o-bg:#fbf8f0;
}
html[data-theme="biblio"] body{font-size:17px;}
html[data-theme="biblio"] :where(.btn-primary,.btn-gold,.chip-primary,.chip,.btn-ghost,.sidebar-label,.eyebrow,.reader-eyebrow,.landing-eyebrow,.lesson-tag,.mod-card-meta,.q-progress,.stat span){
  font-variant:small-caps;font-feature-settings:"smcp";}
/* Dos de reliure : barre du haut marine, filet doré */
html[data-theme="biblio"] .topbar{border-bottom:3px double #9a7b3c;backdrop-filter:none;}
html[data-theme="biblio"] .brand-badge{background:transparent;color:#d9c08a;border:1px solid #9a7b3c;border-radius:2px;}
html[data-theme="biblio"] .brand-txt strong{color:#f5f1e6;font-size:1.2rem;letter-spacing:.03em;}
html[data-theme="biblio"] .brand-txt small{color:#cdbf9c;font-variant:small-caps;letter-spacing:.08em;font-size:.82rem;}
html[data-theme="biblio"] .topbar-out,html[data-theme="biblio"] .topbar-zone{color:#e9dfc6;}
html[data-theme="biblio"] .topbar-zone{background:rgba(255,255,255,.08);}
html[data-theme="biblio"] .topbar :where(.theme-btn,.burger,.zoneswitch-btn,.topbar-back){background:transparent;border-color:rgba(217,192,138,.55);color:#f5f1e6;}
html[data-theme="biblio"] .topbar .burger span{background:#f5f1e6;}
html[data-theme="biblio"] .topbar .zoneswitch-cur{color:#f5f1e6;}
html[data-theme="biblio"] .sidebar{background:#f5f1e6;border-right:1px solid #dcd2bb;}
html[data-theme="biblio"] .sidebar-label{color:#9a7b3c;font-size:.92rem;text-transform:none;letter-spacing:.08em;font-weight:600;}
html[data-theme="biblio"] .sidebar a{font-size:1.02rem;border-radius:2px;}
html[data-theme="biblio"] .sidebar a:hover{background:#ece6d6;}
html[data-theme="biblio"] .sidebar a.is-active{background:#1f3354;color:#f5f1e6;}
/* Titres : page d'ouvrage */
html[data-theme="biblio"] h1,html[data-theme="biblio"] h2,html[data-theme="biblio"] h3{font-weight:600;letter-spacing:0;}
html[data-theme="biblio"] .eyebrow,html[data-theme="biblio"] .reader-eyebrow,html[data-theme="biblio"] .landing-eyebrow{
  text-transform:none;color:#9a7b3c;font-size:.95rem;letter-spacing:.1em;font-weight:600;}
html[data-theme="biblio"] .page-title,html[data-theme="biblio"] .reader-title{font-size:clamp(2.1rem,4vw,2.9rem);color:#1f3354;font-weight:600;}
html[data-theme="biblio"] .page-title::after,html[data-theme="biblio"] .reader-title::after{content:"❦";display:block;font-size:.9rem;color:#9a7b3c;margin-top:10px;}
html[data-theme="biblio"] .section-title{font-size:1.6rem;color:#1f3354;border-bottom:none;padding-bottom:12px;
  background:linear-gradient(#9a7b3c,#9a7b3c) left bottom/100% 1px no-repeat,linear-gradient(#9a7b3c,#9a7b3c) left calc(100% - 4px)/100% 1px no-repeat;}
html[data-theme="biblio"] .stat-row{border-top:1px solid #9a7b3c;border-bottom:1px solid #9a7b3c;}
html[data-theme="biblio"] .stat b{color:#1f3354;font-weight:600;font-size:2rem;}
html[data-theme="biblio"] .stat span{font-size:.95rem;}
html[data-theme="biblio"] :is(.stat b,.q-progress,.mod-card-meta,.reader-meta){font-variant-numeric:lining-nums;}
html[data-theme="biblio"] .mod-card{padding:26px;}
html[data-theme="biblio"] .mod-card h3{color:#1f3354;font-size:1.4rem;}
html[data-theme="biblio"] .mod-card p{font-family:var(--read);font-size:1rem;}
html[data-theme="biblio"] .mod-card-num{font-family:var(--display);font-style:italic;color:#9a7b3c;font-size:1.05rem;}
html[data-theme="biblio"] .mod-card-num::before{content:"Tome ";}
html[data-theme="biblio"] .mod-card-meta{border-top:1px solid #e7dfcb;}
html[data-theme="biblio"] .lesson-num{font-family:var(--display);font-style:italic;color:#9a7b3c;}
html[data-theme="biblio"] .lesson-body h3{font-size:1.15rem;}
/* Lecteur */
html[data-theme="biblio"] .reader-head{text-align:center;border-bottom:none;}
html[data-theme="biblio"] .reader-meta{justify-content:center;}
html[data-theme="biblio"] .reader-intro{font-size:1.2rem;}
html[data-theme="biblio"] .reader-intro::first-letter{font-family:var(--display);color:#1f3354;font-size:3.6em;font-weight:600;padding:4px 10px 0 0;}
html[data-theme="biblio"] .reader-sec{border-left:none;padding-left:0;}
html[data-theme="biblio"] .reader-sec>h2{font-size:1.55rem;color:#1f3354;}
html[data-theme="biblio"] .reader-sec>h2 .sec-num{font-family:var(--display);font-style:italic;font-weight:500;font-size:1rem;letter-spacing:.04em;color:#9a7b3c;}
html[data-theme="biblio"] .reader-sec p,html[data-theme="biblio"] .reader-sec li{font-size:1.14rem;}
html[data-theme="biblio"] .reader-sec li::marker{color:#9a7b3c;}
html[data-theme="biblio"] .reader-schema{background:#fbf8f0;border:1px solid #dcd2bb;border-radius:2px;box-shadow:inset 0 0 0 4px #fbf8f0,inset 0 0 0 5px rgba(154,123,60,.4);}
html[data-theme="biblio"] .reader-schema h4{font-family:var(--display);font-size:1.05rem;text-transform:none;letter-spacing:.04em;color:#1f3354;font-style:italic;}
/* QCM */
html[data-theme="biblio"] .q-text{font-size:1.3rem;}
html[data-theme="biblio"] .q-opt{font-family:var(--read);font-size:1.08rem;}
html[data-theme="biblio"] .q-opt:hover:not(:disabled){background:#eeebe1;border-color:#1f3354;}
html[data-theme="biblio"] .q-bar{height:3px;background:#e7dfcb;}
html[data-theme="biblio"] .q-bar i{background:#9a7b3c;}
html[data-theme="biblio"] .q-expl{background:#eeebe1;border-left:2px solid #9a7b3c;}
html[data-theme="biblio"] .fiche-title{color:#1f3354;border-bottom:1px solid #9a7b3c;}
html[data-theme="biblio"] .fiche-point{border-left:1px solid #9a7b3c;}
html[data-theme="biblio"] .fiche-point h4{color:#1f3354;}


/* ==========================================================================
   8. THÈSE / LaTeX — la page d'un mémoire : texte sur « feuille » blanc
   cassé, titre centré façon \maketitle, résumé en retrait, numérotation
   1.1, environnements « Définition » en gras + italique. Noir et gris.
   ========================================================================== */
html[data-theme="these"]{
  --paper:#ecebe7; --paper-2:#e3e2dd; --card:#fdfdfa;
  --line:#c9c8c2; --line-soft:#deddd8;
  --ink:#1c1c1c; --ink-2:#333333; --ink-3:#5f5f5f; --ink-4:#8a8a88;
  --blue:#2a3f7a; --blue-deep:#1d2d59; --blue-soft:#e4e6ee; --blue-tint:#f0f1f4;
  --ok:#2f5d3a; --ok-bg:#e4ece4; --warn:#7a5a1a; --warn-bg:#f1eadb; --err:#8e2b2b; --err-bg:#f3e3e1;
  --star:#6b6b6b; --star-deep:#4f4f4f;
  --display:"STIX Two Text","Latin Modern Roman","Computer Modern",Georgia,serif;
  --read:"STIX Two Text","Latin Modern Roman",Georgia,serif;
  --ui:"STIX Two Text","Latin Modern Roman",Georgia,serif;
  --r-sm:0px; --r-md:0px; --r-lg:0px;
  --sh-1:none; --sh-2:0 1px 4px rgba(0,0,0,.12); --sh-3:0 4px 18px rgba(0,0,0,.16);
  --topbar-bg:#fdfdfa; --bg-img:none;
  --measure:66ch;
  --c-bd:1px solid #c9c8c2; --c-sh:0 1px 3px rgba(0,0,0,.08); --c-sh-h:0 2px 8px rgba(0,0,0,.14); --c-tf-h:none;
  --b-bg:#1c1c1c; --b-bg-h:#333333; --b-txt:#fdfdfa; --b-bd:1px solid #1c1c1c; --b-sh:none; --b-sh-h:none; --b-tf-h:none;
  --g-bd:1px solid #1c1c1c; --g-bg:transparent;
  --i-bd:1px solid #8a8a88; --i-bg:#fdfdfa;
  --o-bd:1px solid #c9c8c2; --o-bg:#fdfdfa;
}
html[data-theme="these"] body{font-size:17px;}
html[data-theme="these"] :where(.btn-primary,.btn-gold,.btn-ghost,.chip,.sidebar-label,.eyebrow,.reader-eyebrow,.landing-eyebrow,.lesson-tag,.q-progress,.stat span,.mod-card-meta){
  font-variant:small-caps;text-transform:none;letter-spacing:.04em;}
html[data-theme="these"] .topbar{border-bottom:1px solid #c9c8c2;backdrop-filter:none;}
html[data-theme="these"] .brand-badge{background:#1c1c1c;border-radius:0;}
html[data-theme="these"] .brand-txt strong{font-weight:600;}
html[data-theme="these"] .brand-txt small{font-style:italic;}
/* La barre latérale devient une table des matières */
html[data-theme="these"] .sidebar{background:#fdfdfa;border-right:1px solid #c9c8c2;counter-reset:toc;}
html[data-theme="these"] .sidebar-group{counter-increment:toc;}
html[data-theme="these"] .sidebar-label{color:#1c1c1c;font-size:.98rem;font-weight:700;}
html[data-theme="these"] .sidebar-label::before{content:counter(toc) "  ";}
html[data-theme="these"] .sidebar a{border-radius:0;font-size:.98rem;color:#333;}
html[data-theme="these"] .sidebar a:hover{background:transparent;text-decoration:underline;text-underline-offset:3px;}
html[data-theme="these"] .sidebar a.is-active{background:transparent;color:#1c1c1c;font-weight:700;}
html[data-theme="these"] .sidebar a.is-active::after{content:"←";margin-left:auto;color:#8a8a88;font-weight:400;}
/* Le contenu est posé sur une feuille */
html[data-theme="these"] .content>*:not(.wm-layer){max-width:calc(var(--measure) + 96px);}
html[data-theme="these"] :is(.page-head,.reader){background:#fdfdfa;box-shadow:0 1px 4px rgba(0,0,0,.12);padding:44px 48px;max-width:calc(var(--measure) + 96px);}
html[data-theme="these"] .page-head{text-align:center;}
html[data-theme="these"] h1,html[data-theme="these"] h2,html[data-theme="these"] h3,html[data-theme="these"] h4{font-weight:700;letter-spacing:0;}
html[data-theme="these"] .eyebrow,html[data-theme="these"] .reader-eyebrow{color:#5f5f5f;font-weight:400;font-size:.95rem;}
html[data-theme="these"] .page-title,html[data-theme="these"] .reader-title{font-size:clamp(1.7rem,3vw,2.2rem);font-weight:400;}
html[data-theme="these"] .page-sub,html[data-theme="these"] .reader-sub{font-style:italic;color:#333;}
html[data-theme="these"] .section-title{font-size:1.3rem;border-bottom:none;}
html[data-theme="these"] .stat-row{border-top:1.5px solid #1c1c1c;border-bottom:1.5px solid #1c1c1c;}
html[data-theme="these"] .stat b{font-family:var(--display);font-weight:400;color:#1c1c1c;}
html[data-theme="these"] .mod-card h3{font-size:1.15rem;}
html[data-theme="these"] .mod-card-num{font-family:var(--display);font-weight:700;color:#1c1c1c;}
html[data-theme="these"] .mod-card-num::before{content:"Chapitre ";font-weight:400;}
html[data-theme="these"] .mod-card-meta{border-top:1px solid #deddd8;}
html[data-theme="these"] .lesson-num{font-family:var(--display);font-weight:700;color:#1c1c1c;}
html[data-theme="these"] .lesson-tag,html[data-theme="these"] .chip{border-radius:0;}
/* \maketitle + résumé */
html[data-theme="these"] .reader-head{text-align:center;border-bottom:none;}
html[data-theme="these"] .reader-meta{justify-content:center;font-style:italic;}
html[data-theme="these"] .reader-intro{font-size:.98rem;line-height:1.65;margin:0 7% 34px;text-align:justify;hyphens:auto;-webkit-hyphens:auto;}
html[data-theme="these"] .reader-intro::before{content:"Résumé";display:block;text-align:center;font-weight:700;font-size:.98rem;margin-bottom:6px;}
html[data-theme="these"] .reader-intro::first-letter{font-family:inherit;font-size:1em;float:none;padding:0;color:inherit;font-weight:inherit;line-height:inherit;}
html[data-theme="these"] .reader-sec{border-left:none;padding-left:0;}
html[data-theme="these"] .reader-sec>h2{font-size:1.3rem;}
html[data-theme="these"] .reader-sec>h2 .sec-num{display:inline;font-family:var(--display);font-size:1em;color:#1c1c1c;margin-right:14px;letter-spacing:0;}
html[data-theme="these"] .reader-sec p{text-align:justify;hyphens:auto;-webkit-hyphens:auto;text-indent:1.5em;margin-bottom:.4em;}
html[data-theme="these"] .reader-sec li{text-align:justify;hyphens:auto;-webkit-hyphens:auto;}
html[data-theme="these"] .reader-sec li::marker{content:"•  ";color:#1c1c1c;}
/* Environnement « Définition » : titre gras en ligne, corps en italique */
html[data-theme="these"] .reader-schema{background:transparent;border:none;border-radius:0;padding:4px 0;margin:18px 0;}
html[data-theme="these"] .reader-schema h4{display:inline;font-family:var(--display);font-size:1.05rem;font-weight:700;text-transform:none;letter-spacing:0;color:#1c1c1c;margin-right:6px;}
html[data-theme="these"] .reader-schema h4::after{content:".";}
html[data-theme="these"] .reader-schema-body{display:inline;font-style:italic;font-family:var(--read);}
html[data-theme="these"] .reader-sec a,html[data-theme="these"] .crumbs a{color:#2a3f7a;}
/* QCM : copie d'examen */
html[data-theme="these"] .q-text{font-weight:400;}
html[data-theme="these"] .q-opt{font-family:var(--read);}
html[data-theme="these"] .q-opt:hover:not(:disabled){background:#f0f1f4;border-color:#1c1c1c;}
html[data-theme="these"] .q-bar{height:2px;background:#deddd8;border-radius:0;}
html[data-theme="these"] .q-bar i{background:#1c1c1c;border-radius:0;}
html[data-theme="these"] .q-expl{background:transparent;border-left:1.5px solid #1c1c1c;font-style:italic;}
html[data-theme="these"] .q-expl strong{font-style:normal;}
html[data-theme="these"] .fiche-title{border-bottom:1.5px solid #1c1c1c;font-weight:400;}
html[data-theme="these"] .fiche-point{border-left:none;padding-left:0;}
html[data-theme="these"] .fiche-point h4{color:#1c1c1c;}
@media (max-width:760px){
  html[data-theme="these"] :is(.page-head,.reader){padding:26px 20px;}
  html[data-theme="these"] .reader-intro{margin:0 0 28px;}
}


/* ==========================================================================
   9. INSTITUTIONNEL — la sobriété d'un rapport officiel : bandeau bleu
   ardoise, grille rigoureuse, intertitres sur bande grise, encadrés
   « Point clé ». Tout en sans-serif.
   ========================================================================== */
html[data-theme="institution"]{
  --paper:#f3f5f7; --paper-2:#e8ecf0; --card:#fdfdfd;
  --line:#d3dae1; --line-soft:#e3e8ed;
  --ink:#1c2733; --ink-2:#384654; --ink-3:#627080; --ink-4:#8e9aa6;
  --blue:#1f4e79; --blue-deep:#173b5c; --blue-soft:#dde7f0; --blue-tint:#edf2f7;
  --accent2:#4f7f86;
  --ok:#2e6b4f; --ok-bg:#e2efe8; --warn:#8a6420; --warn-bg:#f4ecd8; --err:#a03a3a; --err-bg:#f6e4e3;
  --display:"Source Sans 3","Source Sans Pro",system-ui,sans-serif;
  --read:"Source Sans 3","Source Sans Pro",system-ui,sans-serif;
  --ui:"Source Sans 3","Source Sans Pro",system-ui,sans-serif;
  --r-sm:3px; --r-md:4px; --r-lg:5px;
  --sh-1:0 1px 2px rgba(28,39,51,.05); --sh-2:0 3px 10px rgba(28,39,51,.08); --sh-3:0 10px 28px rgba(28,39,51,.12);
  --topbar-bg:#1f4e79; --bg-img:none;
  --c-bd:1px solid #d3dae1; --c-sh:0 1px 2px rgba(28,39,51,.05); --c-sh-h:0 4px 14px rgba(28,39,51,.09); --c-tf-h:none;
  --b-sh:none; --b-sh-h:none; --b-tf-h:none;
}
html[data-theme="institution"] body{font-size:16.5px;}
html[data-theme="institution"] .topbar{border-bottom:4px solid #4f7f86;backdrop-filter:none;}
html[data-theme="institution"] .brand-badge{background:#fdfdfd;color:#1f4e79;border-radius:3px;}
html[data-theme="institution"] .brand-txt strong{color:#fdfdfd;font-weight:700;}
html[data-theme="institution"] .brand-txt small{color:#c9d8e6;}
html[data-theme="institution"] .topbar-out{color:#dfe8f1;}
html[data-theme="institution"] .topbar-zone{background:rgba(255,255,255,.12);color:#fdfdfd;}
html[data-theme="institution"] .topbar :where(.theme-btn,.burger,.zoneswitch-btn,.topbar-back){background:transparent;border-color:rgba(255,255,255,.4);color:#fdfdfd;}
html[data-theme="institution"] .topbar .burger span{background:#fdfdfd;}
html[data-theme="institution"] .topbar .zoneswitch-cur{color:#fdfdfd;}
html[data-theme="institution"] .sidebar{background:#fdfdfd;border-right:1px solid #d3dae1;padding-top:0;}
html[data-theme="institution"] .sidebar-group{margin-bottom:10px;}
html[data-theme="institution"] .sidebar-label{background:#e8ecf0;color:#384654;margin:0 -16px 6px;padding:8px 28px;letter-spacing:.08em;}
html[data-theme="institution"] .sidebar-group:first-child .sidebar-label{margin-top:0;}
html[data-theme="institution"] .sidebar a{border-radius:3px;}
html[data-theme="institution"] .sidebar a.is-active{background:#dde7f0;color:#173b5c;box-shadow:inset 3px 0 0 #1f4e79;}
html[data-theme="institution"] h1,html[data-theme="institution"] h2,html[data-theme="institution"] h3{font-weight:700;letter-spacing:-.005em;}
html[data-theme="institution"] .page-head{border-left:5px solid #1f4e79;padding-left:20px;}
html[data-theme="institution"] .eyebrow,html[data-theme="institution"] .reader-eyebrow,html[data-theme="institution"] .landing-eyebrow{color:#4f7f86;}
html[data-theme="institution"] .page-title,html[data-theme="institution"] .reader-title{color:#1c2733;}
html[data-theme="institution"] .section-title{background:#e8ecf0;border-bottom:none;border-left:5px solid #1f4e79;padding:10px 16px;font-size:1.1rem;}
html[data-theme="institution"] .stat-row{background:#fdfdfd;border:1px solid #d3dae1;padding:0;gap:0;}
html[data-theme="institution"] .stat{flex:1;padding:16px 20px;border-right:1px solid #d3dae1;min-width:110px;}
html[data-theme="institution"] .stat:last-child{border-right:none;}
html[data-theme="institution"] .stat b{color:#1f4e79;font-weight:700;}
html[data-theme="institution"] .mod-card{border-top:3px solid #1f4e79;}
html[data-theme="institution"] .mod-card:nth-child(2n){border-top-color:#4f7f86;}
html[data-theme="institution"] .mod-card-num{font-family:var(--ui);font-weight:700;color:#627080;font-size:.8rem;letter-spacing:.06em;}
html[data-theme="institution"] .mod-card-num::before{content:"AXE ";}
html[data-theme="institution"] .lesson-num{font-family:var(--ui);font-weight:700;color:#fdfdfd;background:#1f4e79;border-radius:3px;min-width:34px;padding:4px 0;font-size:1rem;}
html[data-theme="institution"] .lesson-tag{border-radius:3px;background:#edf2f7;color:#1f4e79;}
/* Lecteur : rapport */
html[data-theme="institution"] .reader-head{border-bottom:3px solid #1f4e79;}
html[data-theme="institution"] .reader-sub{font-style:normal;}
html[data-theme="institution"] .reader-intro{font-size:1.1rem;color:#384654;}
html[data-theme="institution"] .reader-intro::first-letter{font-family:inherit;font-size:1em;float:none;padding:0;color:inherit;font-weight:inherit;line-height:inherit;}
html[data-theme="institution"] .reader-sec{border-left:none;padding-left:0;}
html[data-theme="institution"] .reader-sec>h2{display:flex;gap:12px;align-items:baseline;border-bottom:1px solid #d3dae1;padding-bottom:8px;}
html[data-theme="institution"] .reader-sec>h2 .sec-num{display:inline-grid;place-items:center;min-width:30px;height:30px;padding:0 6px;margin:0;
  background:#1f4e79;color:#fdfdfd;border-radius:3px;font-size:.85rem;letter-spacing:0;flex-shrink:0;}
html[data-theme="institution"] .reader-sec p,html[data-theme="institution"] .reader-sec li{font-size:1.06rem;line-height:1.7;}
html[data-theme="institution"] .reader-sec li::marker{content:"■  ";font-size:.7em;color:#4f7f86;}
html[data-theme="institution"] .reader-schema{background:#edf2f7;border:1px solid #c9d7e5;border-left:5px solid #4f7f86;border-radius:3px;}
html[data-theme="institution"] .reader-schema h4{color:#1f4e79;}
html[data-theme="institution"] .reader-schema h4::before{content:"ⓘ  Point clé — ";}
/* QCM */
html[data-theme="institution"] .q-card,html[data-theme="institution"] .qcard{border-top:3px solid #1f4e79;}
html[data-theme="institution"] .q-text{font-weight:600;}
html[data-theme="institution"] .q-opt:hover:not(:disabled){background:#edf2f7;border-color:#1f4e79;}
html[data-theme="institution"] .q-bar{height:6px;border-radius:0;}
html[data-theme="institution"] .q-bar i{border-radius:0;}
html[data-theme="institution"] .q-expl{background:#edf2f7;border-left:4px solid #4f7f86;}
html[data-theme="institution"] .fiche-title{border-bottom:3px solid #1f4e79;}
html[data-theme="institution"] .fiche-point{border-left:3px solid #4f7f86;}
html[data-theme="institution"] .fiche-point h4{color:#1f4e79;font-family:var(--ui);}


/* ==========================================================================
   10. CABINET DE CONSEIL — clarté d'une note de synthèse : bleu nuit, un
   seul accent bleu, grands titres serif, chiffres clés en grand, cartes à
   filet latéral, beaucoup d'air.
   ========================================================================== */
html[data-theme="conseil"]{
  --paper:#fafaf9; --paper-2:#f1f2f4; --card:#fdfdfd;
  --line:#dfe2e6; --line-soft:#eceef1;
  --ink:#0f2233; --ink-2:#34485a; --ink-3:#66778a; --ink-4:#95a3b1;
  --blue:#1d5fa8; --blue-deep:#0f2233; --blue-soft:#e3ecf6; --blue-tint:#f0f5fa;
  --ok:#2d6a4f; --ok-bg:#e3f0e9; --warn:#8a6420; --warn-bg:#f4ecd8; --err:#a33a3a; --err-bg:#f6e4e3;
  --display:"DM Serif Display",Georgia,serif;
  --read:"Inter",system-ui,sans-serif; --ui:"Inter",system-ui,sans-serif;
  --r-sm:2px; --r-md:2px; --r-lg:2px;
  --sh-1:none; --sh-2:0 6px 20px rgba(15,34,51,.07); --sh-3:0 12px 32px rgba(15,34,51,.12);
  --topbar-bg:#fdfdfd; --bg-img:none;
  --c-bd:1px solid #dfe2e6; --c-sh:none; --c-sh-h:0 8px 24px rgba(15,34,51,.08); --c-tf-h:translateY(-2px);
  --b-bg:#0f2233; --b-bg-h:#1d5fa8; --b-sh:none; --b-sh-h:none; --b-tf-h:none;
  --g-bd:1px solid #0f2233; --g-bg:transparent;
  --o-bd:1px solid #dfe2e6;
}
html[data-theme="conseil"] .topbar{border-bottom:1px solid #dfe2e6;backdrop-filter:none;}
html[data-theme="conseil"] .brand-badge{background:#0f2233;border-radius:0;}
html[data-theme="conseil"] .brand-txt strong{font-size:1.15rem;font-weight:400;}
html[data-theme="conseil"] .sidebar{background:#fafaf9;border-right:1px solid #dfe2e6;}
html[data-theme="conseil"] .sidebar-label{color:#95a3b1;}
html[data-theme="conseil"] .sidebar a{border-radius:0;}
html[data-theme="conseil"] .sidebar a:hover{background:#f1f2f4;}
html[data-theme="conseil"] .sidebar a.is-active{background:transparent;color:#0f2233;font-weight:700;box-shadow:inset 3px 0 0 #1d5fa8;}
html[data-theme="conseil"] h1,html[data-theme="conseil"] h2,html[data-theme="conseil"] h3{font-weight:400;letter-spacing:-.005em;}
html[data-theme="conseil"] .eyebrow,html[data-theme="conseil"] .reader-eyebrow,html[data-theme="conseil"] .landing-eyebrow{color:#1d5fa8;letter-spacing:.14em;}
html[data-theme="conseil"] .page-title,html[data-theme="conseil"] .reader-title{font-size:clamp(2.2rem,4.2vw,3.1rem);line-height:1.08;color:#0f2233;}
html[data-theme="conseil"] .page-sub{font-size:1.1rem;color:#34485a;}
html[data-theme="conseil"] .section-title{font-size:1.6rem;border-bottom:none;}
html[data-theme="conseil"] .section-title::after{content:"";display:block;width:48px;height:3px;background:#1d5fa8;margin-top:10px;}
/* Chiffres clés */
html[data-theme="conseil"] .stat-row{border-top:1px solid #0f2233;border-bottom:none;gap:0;padding-top:24px;}
html[data-theme="conseil"] .stat{padding:0 34px 0 0;margin-right:34px;border-right:1px solid #dfe2e6;}
html[data-theme="conseil"] .stat:last-child{border-right:none;}
html[data-theme="conseil"] .stat b{font-family:var(--display);font-weight:400;font-size:2.6rem;color:#0f2233;line-height:1;}
html[data-theme="conseil"] .stat span{text-transform:uppercase;letter-spacing:.1em;font-size:.7rem;font-weight:600;}
/* Cartes à filet latéral */
html[data-theme="conseil"] .mod-grid{gap:22px;}
html[data-theme="conseil"] .mod-card{box-shadow:inset 3px 0 0 #1d5fa8;padding:24px 24px 22px 26px;}
html[data-theme="conseil"] .mod-card:hover{--c-sh-h:inset 3px 0 0 #1d5fa8,0 8px 24px rgba(15,34,51,.08);}
html[data-theme="conseil"] .mod-card.is-locked{box-shadow:inset 3px 0 0 #95a3b1;}
html[data-theme="conseil"] .mod-card h3{font-size:1.45rem;}
html[data-theme="conseil"] .mod-card-num{font-family:var(--ui);font-size:.72rem;font-weight:700;letter-spacing:.14em;color:#1d5fa8;}
html[data-theme="conseil"] .mod-card-meta{border-top:1px solid #eceef1;font-weight:600;color:#0f2233;}
html[data-theme="conseil"] .lesson{box-shadow:inset 3px 0 0 #1d5fa8;}
html[data-theme="conseil"] .lesson:hover{--c-sh-h:inset 3px 0 0 #1d5fa8,0 8px 24px rgba(15,34,51,.08);}
html[data-theme="conseil"] .lesson-num{font-family:var(--display);font-size:1.6rem;color:#0f2233;}
html[data-theme="conseil"] .lesson-tag{border-radius:0;background:#f0f5fa;color:#1d5fa8;}
/* Lecteur : note de synthèse */
html[data-theme="conseil"] .reader-head{border-bottom:1px solid #0f2233;}
html[data-theme="conseil"] .reader-sub{font-style:normal;color:#34485a;}
html[data-theme="conseil"] .reader-intro{font-family:var(--display);font-size:1.3rem;line-height:1.5;color:#0f2233;}
html[data-theme="conseil"] .reader-intro::first-letter{font-family:inherit;font-size:1em;float:none;padding:0;color:inherit;font-weight:inherit;line-height:inherit;}
html[data-theme="conseil"] .reader-sec{border-left:none;padding-left:0;}
html[data-theme="conseil"] .reader-sec>h2{font-size:1.55rem;}
html[data-theme="conseil"] .reader-sec>h2 .sec-num{font-family:var(--ui);color:#1d5fa8;letter-spacing:.14em;font-size:.72rem;}
html[data-theme="conseil"] .reader-sec p,html[data-theme="conseil"] .reader-sec li{font-size:1.03rem;line-height:1.75;}
html[data-theme="conseil"] .reader-sec li::marker{color:#1d5fa8;}
html[data-theme="conseil"] .reader-schema{background:#f0f5fa;border:none;border-left:3px solid #0f2233;border-radius:0;}
html[data-theme="conseil"] .reader-schema h4{color:#0f2233;}
html[data-theme="conseil"] .reader-schema h4::before{content:"À retenir — ";color:#1d5fa8;}
/* QCM */
html[data-theme="conseil"] .q-text{font-family:var(--display);font-weight:400;font-size:1.45rem;line-height:1.3;}
html[data-theme="conseil"] .q-opt:hover:not(:disabled){background:#f0f5fa;border-color:#1d5fa8;}
html[data-theme="conseil"] .q-bar{height:3px;border-radius:0;}
html[data-theme="conseil"] .q-bar i{border-radius:0;}
html[data-theme="conseil"] .q-expl{background:#f0f5fa;border-left:3px solid #0f2233;}
html[data-theme="conseil"] .fiche-title{border-bottom:1px solid #0f2233;}
html[data-theme="conseil"] .fiche-point{border-left:3px solid #1d5fa8;}
html[data-theme="conseil"] .fiche-point h4{color:#0f2233;}
@media (max-width:560px){
  html:is([data-theme="conseil"],[data-theme="institution"]) .stat-row{display:grid;grid-template-columns:1fr 1fr;}
  html[data-theme="conseil"] .stat{padding:0 0 16px;margin:0;border-right:none;}
  html[data-theme="conseil"] .stat b{font-size:2rem;}
  html[data-theme="institution"] .stat{border-right:1px solid #d3dae1;border-bottom:1px solid #d3dae1;}
  html[data-theme="institution"] .stat:nth-child(2n){border-right:none;}
  html[data-theme="institution"] .stat:nth-last-child(-n+2){border-bottom:none;}
}


/* ==========================================================================
   11. LISEUSE — le confort d'une liseuse en mode sépia : contraste doux,
   police Literata conçue pour la lecture longue, interface effacée,
   interligne généreux, séparateurs « · · · » entre les sections.
   ========================================================================== */
html[data-theme="liseuse"]{
  --paper:#f7efdc; --paper-2:#efe5cc; --card:#f9f2e2;
  --line:#e2d5b8; --line-soft:#ebe0c7;
  --ink:#4a3a2c; --ink-2:#5e4c3b; --ink-3:#86725d; --ink-4:#a8977f;
  --blue:#8a5a34; --blue-deep:#6e4526; --blue-soft:#eddcc0; --blue-tint:#f2e6cf;
  --btn-txt:#f9f2e2;
  --ok:#4f6b3d; --ok-bg:#e6e8cf; --warn:#8a6420; --warn-bg:#f1e3c4; --err:#9a4332; --err-bg:#f2dccd;
  --star:#b08030; --star-deep:#977028;
  --display:"Literata",Georgia,serif; --read:"Literata",Georgia,serif; --ui:"Literata",Georgia,serif;
  --r-sm:6px; --r-md:8px; --r-lg:10px;
  --sh-1:none; --sh-2:none; --sh-3:0 8px 26px rgba(74,58,44,.12);
  --topbar-bg:rgba(247,239,220,.96); --bg-img:none;
  --measure:62ch;
  --c-bg:#f9f2e2; --c-bd:1px solid #ebe0c7; --c-sh:none; --c-sh-h:none; --c-tf-h:none;
  --b-bg:#8a5a34; --b-bg-h:#6e4526; --b-sh:none; --b-sh-h:none; --b-tf-h:none;
  --g-bd:1px solid #e2d5b8; --g-bg:transparent;
  --i-bd:1px solid #e2d5b8; --i-bg:#fbf6ea;
  --o-bd:1px solid #e2d5b8; --o-bg:#f9f2e2;
}
html[data-theme="liseuse"] body{font-size:17px;}
/* Interface effacée */
html[data-theme="liseuse"] .topbar{border-bottom:1px solid #ebe0c7;}
html[data-theme="liseuse"] .brand-badge{background:#e9dcc0;color:#8a5a34;border-radius:8px;}
html[data-theme="liseuse"] .brand-txt strong{font-weight:500;}
html[data-theme="liseuse"] .sidebar{background:#f7efdc;border-right:1px solid #ebe0c7;}
html[data-theme="liseuse"] .sidebar-label{color:#a8977f;text-transform:none;letter-spacing:.02em;font-weight:500;font-style:italic;font-size:.82rem;}
html[data-theme="liseuse"] .sidebar a{font-weight:400;color:#5e4c3b;}
html[data-theme="liseuse"] .sidebar a:hover{background:#efe5cc;}
html[data-theme="liseuse"] .sidebar a.is-active{background:#eddcc0;color:#4a3a2c;font-weight:500;}
html[data-theme="liseuse"] h1,html[data-theme="liseuse"] h2,html[data-theme="liseuse"] h3{font-weight:500;letter-spacing:-.005em;}
html[data-theme="liseuse"] .eyebrow,html[data-theme="liseuse"] .reader-eyebrow,html[data-theme="liseuse"] .landing-eyebrow{
  text-transform:none;letter-spacing:.02em;font-style:italic;font-weight:400;color:#86725d;font-size:.92rem;}
html[data-theme="liseuse"] .section-title{border-bottom:none;font-weight:500;}
html[data-theme="liseuse"] .stat-row{border-color:#ebe0c7;}
html[data-theme="liseuse"] .stat b{font-weight:500;color:#6e4526;}
html[data-theme="liseuse"] .mod-card-num,html[data-theme="liseuse"] .lesson-num{font-weight:400;font-style:italic;color:#a8977f;}
html[data-theme="liseuse"] .mod-card h3{font-weight:500;}
html[data-theme="liseuse"] .mod-card-meta{border-top:1px solid #ebe0c7;}
html[data-theme="liseuse"] .lesson-tag{background:#efe5cc;}
html[data-theme="liseuse"] .crumbs{font-style:italic;}
/* Lecture : colonne centrée, interligne généreux */
html[data-theme="liseuse"] .reader-head{text-align:center;border-bottom:none;}
html[data-theme="liseuse"] .reader-head :is(.rx-bar,.reactions,.rx-row){justify-content:center;}
html[data-theme="liseuse"] .reader-meta{justify-content:center;}
html[data-theme="liseuse"] .reader-title{font-weight:500;}
html[data-theme="liseuse"] .reader-intro{font-size:1.14rem;line-height:1.9;}
html[data-theme="liseuse"] .reader-intro::first-letter{font-family:inherit;font-size:1em;float:none;padding:0;color:inherit;font-weight:inherit;line-height:inherit;}
html[data-theme="liseuse"] .reader-sec{border-left:none;padding-left:0;}
html[data-theme="liseuse"] .reader-sec+.reader-sec::before{content:"·  ·  ·";display:block;text-align:center;color:#a8977f;letter-spacing:.3em;margin:-8px 0 30px;}
html[data-theme="liseuse"] .reader-sec>h2{font-size:1.3rem;text-align:center;}
html[data-theme="liseuse"] .reader-sec>h2 .sec-num{font-style:italic;font-weight:400;color:#a8977f;letter-spacing:.02em;}
html[data-theme="liseuse"] .reader-sec p,html[data-theme="liseuse"] .reader-sec li{font-size:1.12rem;line-height:1.9;}
html[data-theme="liseuse"] .reader-sec li::marker{color:#a8977f;}
html[data-theme="liseuse"] .reader-schema{background:#f2e6cf;border:none;border-radius:8px;}
html[data-theme="liseuse"] .reader-schema h4{text-transform:none;letter-spacing:.02em;font-style:italic;font-weight:500;color:#6e4526;}
html[data-theme="liseuse"] .q-text{font-weight:500;}
html[data-theme="liseuse"] .q-opt:hover:not(:disabled){background:#f2e6cf;border-color:#c9b48d;}
html[data-theme="liseuse"] .q-bar{height:3px;background:#ebe0c7;}
html[data-theme="liseuse"] .q-bar i{background:#a8977f;}
html[data-theme="liseuse"] .q-expl{background:#f2e6cf;border-left:2px solid #c9b48d;}
html[data-theme="liseuse"] .fiche-title{border-bottom:1px solid #ebe0c7;font-weight:500;}
html[data-theme="liseuse"] .fiche-point{border-left:1px solid #e2d5b8;}
html[data-theme="liseuse"] .fiche-point h4{color:#6e4526;font-weight:500;}
html[data-theme="liseuse"] ::selection{background:#eddcc0;}


/* ==========================================================================
   STYLES PROFESSIONNELS (v9.79) — mêmes principes que les styles académiques
   (fonds cassés, un accent peu saturé, contraste confortable, pas
   d'animation décorative) ; certains changent en plus la DISPOSITION :
   Portail (menu horizontal à rubriques déroulantes), Tableau de bord
   (barre latérale sombre), Bento (tuiles de tailles variées).
   ========================================================================== */


/* ==========================================================================
   13. PORTAIL UNIVERSITAIRE — en-tête blanc, bandeau de navigation bordeaux
   horizontal à rubriques déroulantes (ordinateur), contenu centré.
   Sur mobile, le menu reste le tiroir habituel (aux couleurs du portail).
   ========================================================================== */
html[data-theme="portail"]{
  --paper:#f4f2ef; --paper-2:#ebe8e3; --card:#fcfbf9;
  --line:#dcd7cf; --line-soft:#e8e4de;
  --ink:#24211f; --ink-2:#3f3b37; --ink-3:#6c6660; --ink-4:#9a948d;
  --blue:#6b1e2c; --blue-deep:#521522; --blue-soft:#f0e3e4; --blue-tint:#f6eeee;
  --ok:#2f6a4f; --ok-bg:#e3eee7; --warn:#8a6420; --warn-bg:#f4ecd8; --err:#9b2f2f; --err-bg:#f5e3e1;
  --display:"Merriweather",Georgia,serif; --read:"Open Sans",system-ui,sans-serif; --ui:"Open Sans",system-ui,sans-serif;
  --r-sm:3px; --r-md:4px; --r-lg:6px;
  --sh-1:0 1px 2px rgba(36,33,31,.05); --sh-2:0 4px 14px rgba(36,33,31,.08); --sh-3:0 12px 30px rgba(36,33,31,.14);
  --topbar-bg:#fcfbf9; --bg-img:none;
  --c-bd:1px solid #dcd7cf; --c-sh:0 1px 2px rgba(36,33,31,.05); --c-sh-h:0 6px 18px rgba(36,33,31,.09); --c-tf-h:none;
  --b-sh:none; --b-sh-h:none; --b-tf-h:none;
}
html[data-theme="portail"] h1,html[data-theme="portail"] h2,html[data-theme="portail"] h3{font-weight:700;letter-spacing:-.01em;}
html[data-theme="portail"] .topbar{border-bottom:none;backdrop-filter:none;}
html[data-theme="portail"] .brand-badge{background:#6b1e2c;border-radius:3px;}
html[data-theme="portail"] .brand-txt strong{font-family:var(--display);color:#6b1e2c;}
html[data-theme="portail"] .eyebrow,html[data-theme="portail"] .reader-eyebrow,html[data-theme="portail"] .landing-eyebrow{color:#6b1e2c;}
html[data-theme="portail"] .page-head{border-bottom:1px solid #dcd7cf;padding-bottom:22px;}
html[data-theme="portail"] .page-title,html[data-theme="portail"] .reader-title{color:#24211f;}
html[data-theme="portail"] .section-title{border-bottom:2px solid #6b1e2c;display:inline-block;padding-right:18px;}
html[data-theme="portail"] .stat b{font-family:var(--display);color:#6b1e2c;}
html[data-theme="portail"] .mod-card{border-top:5px solid #6b1e2c;}
html[data-theme="portail"] .mod-card-num{font-family:var(--ui);font-weight:700;font-size:.75rem;letter-spacing:.08em;color:#6c6660;}
html[data-theme="portail"] .mod-card-num::before{content:"UE ";}
html[data-theme="portail"] .mod-card h3{font-size:1.12rem;}
html[data-theme="portail"] .lesson-num{font-family:var(--display);color:#6b1e2c;}
html[data-theme="portail"] .reader-sec{border-left:3px solid #f0e3e4;}
html[data-theme="portail"] .reader-sec>h2 .sec-num{color:#6b1e2c;}
html[data-theme="portail"] .reader-schema{background:#f6eeee;border:1px solid #e9d6d8;border-left:4px solid #6b1e2c;}
html[data-theme="portail"] .reader-schema h4{color:#6b1e2c;}
html[data-theme="portail"] .q-opt:hover:not(:disabled){background:#f6eeee;border-color:#6b1e2c;}
html[data-theme="portail"] .q-expl{border-left:4px solid #6b1e2c;}
html[data-theme="portail"] .fiche-point{border-left:3px solid #f0e3e4;}
/* Mobile : tiroir aux couleurs du portail */
html[data-theme="portail"] .sidebar{background:#fcfbf9;}
html[data-theme="portail"] .sidebar a.is-active{background:#6b1e2c;color:#fcfbf9;}
/* Ordinateur : le tiroir devient le bandeau de navigation */
@media (min-width:901px){
  html[data-theme="portail"]{scroll-padding-top:124px;}
  html[data-theme="portail"] .shell{flex-direction:column;}
  html[data-theme="portail"] .sidebar{width:100%;height:auto;position:sticky;top:60px;z-index:45;overflow:visible;
    display:flex;align-items:stretch;flex-wrap:wrap;padding:0 max(24px,calc((100% - 1200px) / 2));
    background:#6b1e2c;border-right:none;border-bottom:3px solid #521522;box-shadow:0 2px 8px rgba(36,33,31,.12);}
  html[data-theme="portail"] .sidebar-foot{display:none;}
  html[data-theme="portail"] .sidebar-group{position:relative;margin:0;height:48px;display:flex;flex-direction:column;}
  html[data-theme="portail"] .sidebar-label{display:flex;align-items:center;height:48px;margin:0;padding:0 18px;cursor:default;
    color:#f3e7e8;font-size:.78rem;letter-spacing:.1em;white-space:nowrap;}
  html[data-theme="portail"] .sidebar-label::after{content:"▾";margin-left:8px;font-size:.8em;opacity:.7;}
  html[data-theme="portail"] .sidebar-group:hover>.sidebar-label,
  html[data-theme="portail"] .sidebar-group:focus-within>.sidebar-label{background:#521522;color:#fff;}
  html[data-theme="portail"] .sidebar-group:has(a.is-active)>.sidebar-label{box-shadow:inset 0 -3px 0 #f4f2ef;color:#fff;}
  /* Rubriques déroulantes */
  /* Les liens sont posés en absolu sous l'intitulé (hauteur fixe de 44 px
     par ligne) : la rubrique garde la largeur de son intitulé. */
  html[data-theme="portail"] .sidebar-label{flex-shrink:0;}
  html[data-theme="portail"] .sidebar-group>a{display:none;position:absolute;left:0;width:280px;height:44px;box-sizing:border-box;
    margin:0;border-radius:0;padding:0 18px;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    background:#fcfbf9;color:#3f3b37;border-left:1px solid #dcd7cf;border-right:1px solid #dcd7cf;
    box-shadow:0 10px 24px rgba(36,33,31,.10);z-index:1;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(1){top:48px;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(2){top:92px;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(3){top:136px;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(4){top:180px;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(5){top:224px;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(6){top:268px;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(7){top:312px;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(8){top:356px;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(9){top:400px;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(10){top:444px;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(11){top:488px;}
  html[data-theme="portail"] .sidebar-group>a:nth-of-type(12){top:532px;}
  html[data-theme="portail"] .sidebar-group>a:last-child{border-bottom:1px solid #dcd7cf;border-radius:0 0 4px 4px;}
  html[data-theme="portail"] .sidebar-group:hover>a,
  html[data-theme="portail"] .sidebar-group:focus-within>a{display:flex;}
  html[data-theme="portail"] .sidebar-group>a:hover{background:#f6eeee;color:#6b1e2c;}
  html[data-theme="portail"] .sidebar-group>a.is-active{background:#f0e3e4;color:#6b1e2c;box-shadow:inset 3px 0 0 #6b1e2c,0 10px 24px rgba(36,33,31,.10);}
  html[data-theme="portail"] .content{width:100%;max-width:1200px;margin:0 auto;padding-left:24px;padding-right:24px;}
}


/* ==========================================================================
   14. SUISSE — style typographique international : grille stricte, fer à
   gauche, titres massifs très serrés, numéros géants, un seul rouge.
   ========================================================================== */
html[data-theme="suisse"]{
  --paper:#f4f2ee; --paper-2:#eae7e1; --card:#f9f8f5;
  --line:#cfcbc3; --line-soft:#e2dfd8;
  --ink:#191919; --ink-2:#333333; --ink-3:#666462; --ink-4:#95928d;
  --blue:#c8332b; --blue-deep:#a3261f; --blue-soft:#f2dcd9; --blue-tint:#f6ebe8;
  --ok:#2e6a4a; --ok-bg:#e1ede5; --warn:#8a6420; --warn-bg:#f3ead7; --err:#a3261f; --err-bg:#f4e0dd;
  --display:"Inter Tight","Helvetica Neue",Helvetica,Arial,sans-serif;
  --read:"Inter Tight","Helvetica Neue",Helvetica,Arial,sans-serif;
  --ui:"Inter Tight","Helvetica Neue",Helvetica,Arial,sans-serif;
  --r-sm:0px; --r-md:0px; --r-lg:0px;
  --sh-1:none; --sh-2:none; --sh-3:0 10px 30px rgba(25,25,25,.12);
  --topbar-bg:#f4f2ee; --bg-img:none;
  --c-bg:transparent; --c-bd:0 solid transparent; --c-sh:none; --c-sh-h:none; --c-tf-h:none;
  --b-bg:#191919; --b-bg-h:#c8332b; --b-sh:none; --b-sh-h:none; --b-tf-h:none;
  --g-bd:1.5px solid #191919; --g-bg:transparent;
  --i-bd:1.5px solid #191919; --i-bg:#f9f8f5;
  --o-bd:1px solid #cfcbc3; --o-bg:#f9f8f5;
}
html[data-theme="suisse"] h1,html[data-theme="suisse"] h2,html[data-theme="suisse"] h3,html[data-theme="suisse"] h4{font-weight:700;letter-spacing:-.025em;}
html[data-theme="suisse"] .btn-primary,html[data-theme="suisse"] .btn-gold{font-weight:700;}
html[data-theme="suisse"] .topbar{border-bottom:2px solid #191919;backdrop-filter:none;}
html[data-theme="suisse"] .brand-badge{background:#c8332b;border-radius:0;}
html[data-theme="suisse"] .brand-txt strong{font-weight:800;letter-spacing:-.02em;}
html[data-theme="suisse"] .sidebar{background:#f4f2ee;border-right:1px solid #cfcbc3;}
html[data-theme="suisse"] .sidebar-label{color:#c8332b;font-weight:800;letter-spacing:.04em;}
html[data-theme="suisse"] .sidebar a{border-radius:0;font-weight:500;}
html[data-theme="suisse"] .sidebar a:hover{background:#eae7e1;}
html[data-theme="suisse"] .sidebar a.is-active{background:transparent;color:#191919;font-weight:800;box-shadow:inset 4px 0 0 #c8332b;}
/* Titres */
html[data-theme="suisse"] .eyebrow,html[data-theme="suisse"] .reader-eyebrow,html[data-theme="suisse"] .landing-eyebrow{color:#c8332b;font-weight:800;letter-spacing:.06em;}
html[data-theme="suisse"] .page-title,html[data-theme="suisse"] .reader-title{font-size:clamp(2.4rem,5.2vw,4rem);font-weight:800;line-height:.98;letter-spacing:-.04em;}
html[data-theme="suisse"] .page-sub,html[data-theme="suisse"] .reader-sub{font-size:1.12rem;font-style:normal;font-weight:500;color:#333;}
html[data-theme="suisse"] .section-title{font-size:1.9rem;font-weight:800;letter-spacing:-.03em;border-bottom:none;border-top:2px solid #191919;padding-top:12px;}
html[data-theme="suisse"] .stat-row{border-top:2px solid #191919;border-bottom:none;}
html[data-theme="suisse"] .stat b{font-size:2.8rem;font-weight:800;letter-spacing:-.04em;color:#191919;line-height:1;}
html[data-theme="suisse"] .stat span{font-weight:600;}
/* Modules : colonnes de grille, numéros géants */
html[data-theme="suisse"] .mod-grid{gap:34px 26px;}
html[data-theme="suisse"] .mod-card{border-top:2px solid #191919;padding:14px 0 0;}
html[data-theme="suisse"] .mod-card:hover .mod-card-num{color:#191919;}
html[data-theme="suisse"] .mod-card:hover h3{color:#c8332b;}
html[data-theme="suisse"] .mod-card-num{font-family:var(--display);font-size:3.6rem;font-weight:800;letter-spacing:-.05em;line-height:.9;color:#c8332b;}
html[data-theme="suisse"] .mod-card h3{font-size:1.3rem;font-weight:800;}
html[data-theme="suisse"] .mod-card-meta{border-top:1px solid #cfcbc3;font-weight:600;}
html[data-theme="suisse"] .mod-card.is-locked .mod-card-num{color:#95928d;}
html[data-theme="suisse"] .lesson{border-top:1px solid #191919;padding-left:0;padding-right:0;}
html[data-theme="suisse"] .lesson-num{font-family:var(--display);font-size:2rem;font-weight:800;letter-spacing:-.04em;color:#c8332b;}
html[data-theme="suisse"] .lesson-body h3{font-weight:700;}
html[data-theme="suisse"] .lesson-tag,html[data-theme="suisse"] .chip{border-radius:0;}
/* Lecteur */
html[data-theme="suisse"] .reader-head{border-bottom:2px solid #191919;}
html[data-theme="suisse"] .reader-intro{font-size:1.24rem;font-weight:500;line-height:1.55;letter-spacing:-.01em;}
html[data-theme="suisse"] .reader-intro::first-letter{font-family:inherit;font-size:1em;float:none;padding:0;color:inherit;font-weight:inherit;line-height:inherit;}
html[data-theme="suisse"] .reader-sec{border-left:none;padding-left:0;border-top:1px solid #cfcbc3;padding-top:18px;}
html[data-theme="suisse"] .reader-sec>h2{font-size:1.55rem;font-weight:800;}
html[data-theme="suisse"] .reader-sec>h2 .sec-num{display:block;font-family:var(--display);font-size:2.6rem;font-weight:800;letter-spacing:-.05em;line-height:1;color:#c8332b;margin-bottom:6px;}
html[data-theme="suisse"] .reader-sec p,html[data-theme="suisse"] .reader-sec li{font-size:1.04rem;line-height:1.7;}
html[data-theme="suisse"] .reader-sec li::marker{content:"—  ";color:#c8332b;}
html[data-theme="suisse"] .reader-schema{background:transparent;border:none;border-top:4px solid #c8332b;border-radius:0;padding:14px 0 0;}
html[data-theme="suisse"] .reader-schema h4{color:#191919;font-weight:800;}
/* QCM */
html[data-theme="suisse"] :is(.q-card,.qcard,.fiche,.exam-intro,.keycard,.prof-card,.avis-form-card){--c-bg:#f9f8f5;border-top:4px solid #191919;padding-left:24px;padding-right:24px;}
html[data-theme="suisse"] .q-text{font-size:1.3rem;font-weight:800;letter-spacing:-.02em;}
html[data-theme="suisse"] .q-opt{font-weight:500;}
html[data-theme="suisse"] .q-opt:hover:not(:disabled){border-color:#191919;background:#f9f8f5;}
html[data-theme="suisse"] .q-bar{height:4px;border-radius:0;background:#e2dfd8;}
html[data-theme="suisse"] .q-bar i{border-radius:0;background:#c8332b;}
html[data-theme="suisse"] .q-expl{background:transparent;border-left:4px solid #c8332b;}
html[data-theme="suisse"] .fiche-title{font-weight:800;letter-spacing:-.03em;border-bottom:2px solid #191919;}
html[data-theme="suisse"] .fiche-point{border-left:none;padding-left:0;border-top:1px solid #cfcbc3;padding-top:12px;}
html[data-theme="suisse"] .fiche-point h4{color:#191919;font-weight:800;}


/* ==========================================================================
   15. TABLEAU DE BORD — l'allure d'un logiciel professionnel : barre
   latérale sombre et compacte, indicateurs en tuiles, contenu dense.
   ========================================================================== */
html[data-theme="dashboard"]{
  --paper:#f2f3f6; --paper-2:#e9ebf0; --card:#fcfcfd;
  --line:#e0e3ea; --line-soft:#eceef2;
  --ink:#1c2130; --ink-2:#394155; --ink-3:#687086; --ink-4:#969db0;
  --blue:#5b63d3; --blue-deep:#454cb5; --blue-soft:#e6e8fa; --blue-tint:#f0f1fc;
  --ok:#2c8a5e; --ok-bg:#e1f3ea; --warn:#9a6a14; --warn-bg:#f8eed8; --err:#c0453f; --err-bg:#fae6e4;
  --display:"Inter",system-ui,sans-serif; --read:"Inter",system-ui,sans-serif; --ui:"Inter",system-ui,sans-serif;
  --r-sm:7px; --r-md:10px; --r-lg:12px;
  --sh-1:0 1px 2px rgba(28,33,48,.05); --sh-2:0 4px 14px rgba(28,33,48,.08); --sh-3:0 14px 34px rgba(28,33,48,.16);
  --topbar-bg:#fcfcfd; --bg-img:none; --sidebar-w:236px;
  --c-bd:1px solid #e0e3ea; --c-sh:0 1px 2px rgba(28,33,48,.05); --c-sh-h:0 6px 18px rgba(28,33,48,.09); --c-tf-h:translateY(-1px);
  --b-sh:0 1px 2px rgba(28,33,48,.12); --b-sh-h:0 3px 10px rgba(91,99,211,.3); --b-tf-h:none;
}
html[data-theme="dashboard"] body{font-size:15px;}
html[data-theme="dashboard"] h1,html[data-theme="dashboard"] h2,html[data-theme="dashboard"] h3{font-weight:700;letter-spacing:-.015em;}
html[data-theme="dashboard"] .topbar{border-bottom:1px solid #e0e3ea;backdrop-filter:none;}
html[data-theme="dashboard"] .brand-badge{background:#5b63d3;border-radius:8px;}
/* Barre latérale sombre */
html[data-theme="dashboard"] .sidebar{background:#1f2430;border-right:none;padding:20px 12px;}
html[data-theme="dashboard"] .sidebar-label{color:#6f7890;letter-spacing:.1em;}
html[data-theme="dashboard"] .sidebar a{color:#b8bfcf;border-radius:7px;padding:8px 12px;font-size:.88rem;}
html[data-theme="dashboard"] .sidebar a:hover{background:#2a3040;color:#eef0f5;}
html[data-theme="dashboard"] .sidebar a.is-active{background:#323a4e;color:#f4f5f9;box-shadow:inset 3px 0 0 #8f96f0;}
html[data-theme="dashboard"] .sidebar a.is-locked{color:#5c647a;}
html[data-theme="dashboard"] .sidebar-foot,html[data-theme="dashboard"] .sidebar-foot .mute{color:#6f7890;}
html[data-theme="dashboard"] .sidebar::-webkit-scrollbar-thumb{background:#394155;}
/* En-tête et indicateurs */
html[data-theme="dashboard"] .eyebrow,html[data-theme="dashboard"] .reader-eyebrow,html[data-theme="dashboard"] .landing-eyebrow{color:#687086;}
html[data-theme="dashboard"] .page-title,html[data-theme="dashboard"] .reader-title{font-size:clamp(1.7rem,3vw,2.1rem);}
html[data-theme="dashboard"] .section-title{font-size:1.05rem;border-bottom:none;}
html[data-theme="dashboard"] .stat-row{border:none;gap:14px;padding:0;margin:22px 0 26px;}
html[data-theme="dashboard"] .stat{flex:1 1 150px;background:#fcfcfd;border:1px solid #e0e3ea;border-radius:12px;padding:16px 18px;box-shadow:0 1px 2px rgba(28,33,48,.05);}
html[data-theme="dashboard"] .stat b{font-size:1.8rem;font-weight:700;color:#1c2130;letter-spacing:-.02em;}
html[data-theme="dashboard"] .stat span{font-size:.8rem;color:#687086;}
html[data-theme="dashboard"] .stat:first-child{border-top:3px solid #5b63d3;}
html[data-theme="dashboard"] .mod-grid{gap:14px;}
html[data-theme="dashboard"] .mod-card{padding:18px 20px;}
html[data-theme="dashboard"] .mod-card-num{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:8px;
  background:#f0f1fc;color:#5b63d3;font-family:var(--ui);font-size:.85rem;font-weight:700;}
html[data-theme="dashboard"] .mod-card h3{font-size:1.02rem;}
html[data-theme="dashboard"] .mod-card p{font-size:.88rem;}
html[data-theme="dashboard"] .mod-card-meta{border-top:1px solid #eceef2;font-size:.8rem;}
html[data-theme="dashboard"] .lesson-num{background:#f0f1fc;color:#5b63d3;border-radius:8px;min-width:34px;padding:5px 0;font-size:.95rem;font-weight:700;font-family:var(--ui);}
html[data-theme="dashboard"] .lesson-tag{border-radius:6px;background:#f0f1fc;color:#454cb5;}
/* Lecteur */
html[data-theme="dashboard"] .reader-head{border-bottom:1px solid #e0e3ea;}
html[data-theme="dashboard"] .reader-sub{font-style:normal;}
html[data-theme="dashboard"] .reader-intro{font-size:1.04rem;}
html[data-theme="dashboard"] .reader-intro::first-letter{font-family:inherit;font-size:1em;float:none;padding:0;color:inherit;font-weight:inherit;line-height:inherit;}
html[data-theme="dashboard"] .reader-sec{border-left:none;padding:20px 22px;background:#fcfcfd;border:1px solid #e0e3ea;border-radius:12px;}
html[data-theme="dashboard"] .reader-sec>h2{font-size:1.15rem;}
html[data-theme="dashboard"] .reader-sec>h2 .sec-num{display:inline-block;background:#f0f1fc;color:#5b63d3;border-radius:6px;padding:2px 8px;margin-bottom:8px;}
html[data-theme="dashboard"] .reader-sec p,html[data-theme="dashboard"] .reader-sec li{font-size:.98rem;line-height:1.7;}
html[data-theme="dashboard"] .reader-schema{background:#f0f1fc;border:1px solid #dcdff8;border-radius:10px;}
html[data-theme="dashboard"] .reader-schema h4{color:#454cb5;}
html[data-theme="dashboard"] .q-opt:hover:not(:disabled){background:#f0f1fc;border-color:#5b63d3;}
html[data-theme="dashboard"] .q-bar{height:6px;background:#eceef2;}
html[data-theme="dashboard"] .q-expl{background:#f0f1fc;border-left:3px solid #5b63d3;}
html[data-theme="dashboard"] .fiche-point{border-left:3px solid #e6e8fa;}
html[data-theme="dashboard"] .fiche-point h4{color:#1c2130;}


/* ==========================================================================
   16. BENTO — grandes tuiles arrondies de tailles variées, typographie
   très grande et serrée, gris très clair ; les modules forment une
   mosaïque (une tuile large toutes les six sur grand écran).
   ========================================================================== */
html[data-theme="bento"]{
  --paper:#f1f1f3; --paper-2:#e8e8ec; --card:#fbfbfc;
  --line:#e2e2e7; --line-soft:#ebebef;
  --ink:#1b1c20; --ink-2:#3a3c44; --ink-3:#6b6e78; --ink-4:#9a9ca5;
  --blue:#2f5fb3; --blue-deep:#244b8f; --blue-soft:#e4ebf7; --blue-tint:#eef2fa;
  --ok:#2c7d57; --ok-bg:#e2f1e9; --warn:#946616; --warn-bg:#f6ecd6; --err:#b8443e; --err-bg:#f8e4e2;
  --display:"Manrope",system-ui,sans-serif; --read:"Manrope",system-ui,sans-serif; --ui:"Manrope",system-ui,sans-serif;
  --r-sm:12px; --r-md:18px; --r-lg:26px;
  --sh-1:0 1px 2px rgba(27,28,32,.04); --sh-2:0 8px 26px rgba(27,28,32,.07); --sh-3:0 18px 44px rgba(27,28,32,.14);
  --topbar-bg:rgba(241,241,243,.9); --bg-img:none;
  --c-bd:1px solid rgba(27,28,32,.05); --c-sh:0 1px 2px rgba(27,28,32,.04),0 8px 24px rgba(27,28,32,.04);
  --c-sh-h:0 2px 4px rgba(27,28,32,.05),0 16px 36px rgba(27,28,32,.08); --c-tf-h:translateY(-2px);
  --b-r:999px; --b-sh:none; --b-sh-h:none; --b-tf-h:none; --g-r:999px;
  --o-r:16px; --i-r:14px;
}
html[data-theme="bento"] h1,html[data-theme="bento"] h2,html[data-theme="bento"] h3{font-weight:800;letter-spacing:-.03em;}
html[data-theme="bento"] .topbar{border-bottom:none;}
html[data-theme="bento"] .brand-badge{background:#1b1c20;border-radius:12px;}
html[data-theme="bento"] .brand-txt strong{font-weight:800;letter-spacing:-.02em;}
html[data-theme="bento"] .sidebar{background:#f1f1f3;border-right:none;}
html[data-theme="bento"] .sidebar-label{color:#9a9ca5;}
html[data-theme="bento"] .sidebar a{border-radius:12px;font-weight:600;}
html[data-theme="bento"] .sidebar a:hover{background:#e8e8ec;}
html[data-theme="bento"] .sidebar a.is-active{background:#fbfbfc;color:#1b1c20;box-shadow:0 1px 2px rgba(27,28,32,.06),0 4px 12px rgba(27,28,32,.05);}
html[data-theme="bento"] .eyebrow,html[data-theme="bento"] .reader-eyebrow,html[data-theme="bento"] .landing-eyebrow{color:#6b6e78;}
html[data-theme="bento"] .page-title,html[data-theme="bento"] .reader-title{font-size:clamp(2.3rem,4.8vw,3.5rem);line-height:1.02;letter-spacing:-.045em;}
html[data-theme="bento"] .page-sub{font-size:1.12rem;}
html[data-theme="bento"] .section-title{font-size:1.7rem;border-bottom:none;}
/* Indicateurs en tuiles */
html[data-theme="bento"] .stat-row{border:none;gap:14px;padding:0;margin:26px 0;}
html[data-theme="bento"] .stat{flex:1 1 140px;background:#fbfbfc;border-radius:22px;padding:20px 22px;box-shadow:0 1px 2px rgba(27,28,32,.04),0 8px 24px rgba(27,28,32,.04);}
html[data-theme="bento"] .stat:first-child{background:#1b1c20;}
html[data-theme="bento"] .stat:first-child b,html[data-theme="bento"] .stat:first-child span{color:#f1f1f3;}
html[data-theme="bento"] .stat b{font-size:2.5rem;font-weight:800;letter-spacing:-.05em;color:#1b1c20;line-height:1;}
html[data-theme="bento"] .stat span{font-weight:600;}
/* Mosaïque de modules */
html[data-theme="bento"] .mod-grid{gap:16px;grid-auto-flow:dense;}
html[data-theme="bento"] .mod-card{padding:26px;min-height:190px;}
html[data-theme="bento"] .mod-card h3{font-size:1.3rem;}
html[data-theme="bento"] .mod-card-num{font-family:var(--ui);font-weight:800;color:#9a9ca5;}
html[data-theme="bento"] .mod-card-meta{border-top:none;font-weight:700;color:#2f5fb3;}
@media (min-width:1100px){
  html[data-theme="bento"] .mod-card:nth-child(6n+1){grid-column:span 2;--c-bg:#e4ebf7;}
  html[data-theme="bento"] .mod-card:nth-child(6n+1) h3{font-size:1.9rem;max-width:18ch;}
  html[data-theme="bento"] .mod-card:nth-child(6n+5){--c-bg:#ece9f5;}
}
html[data-theme="bento"] .lesson{border-radius:20px;}
html[data-theme="bento"] .lesson-num{font-weight:800;color:#2f5fb3;}
html[data-theme="bento"] .lesson-tag{border-radius:999px;}
/* Lecteur */
html[data-theme="bento"] .reader-head{border-bottom:none;}
html[data-theme="bento"] .reader-sub{font-style:normal;}
html[data-theme="bento"] .reader-intro{background:#fbfbfc;border-radius:22px;padding:22px 26px;font-size:1.1rem;box-shadow:0 1px 2px rgba(27,28,32,.04);}
html[data-theme="bento"] .reader-intro::first-letter{font-family:inherit;font-size:1em;float:none;padding:0;color:inherit;font-weight:inherit;line-height:inherit;}
html[data-theme="bento"] .reader-sec{border-left:none;padding-left:0;}
html[data-theme="bento"] .reader-sec>h2{font-size:1.45rem;}
html[data-theme="bento"] .reader-sec>h2 .sec-num{color:#2f5fb3;}
html[data-theme="bento"] .reader-schema{background:#e4ebf7;border:none;border-radius:22px;}
html[data-theme="bento"] .reader-schema h4{color:#244b8f;}
html[data-theme="bento"] .q-text{font-size:1.25rem;font-weight:700;letter-spacing:-.015em;}
html[data-theme="bento"] .q-opt:hover:not(:disabled){background:#eef2fa;border-color:#2f5fb3;}
html[data-theme="bento"] .q-bar{height:8px;}
html[data-theme="bento"] .q-expl{background:#eef2fa;border-left:none;border-radius:16px;}
html[data-theme="bento"] .fiche-point{border-left:none;background:#f1f1f3;border-radius:16px;padding:14px 18px;}


/* ==========================================================================
   17. MINIMALISTE — un pur document : ni cadres appuyés ni ombres, gris
   chauds, beaucoup d'air, encadrés « 💡 » discrets.
   ========================================================================== */
html[data-theme="minimal"]{
  --paper:#fbfbfa; --paper-2:#f1f0ec; --card:#fbfbfa;
  --line:#e7e6e2; --line-soft:#efeeea;
  --ink:#37352f; --ink-2:#4a4843; --ink-3:#787774; --ink-4:#a19f9a;
  --blue:#37352f; --blue-deep:#1f1e1b; --blue-soft:#ecebe7; --blue-tint:#f3f2ef;
  --ok:#448361; --ok-bg:#e8f1ec; --warn:#9a6a14; --warn-bg:#f8efd9; --err:#c4554d; --err-bg:#fbe8e6;
  --display:"Inter",system-ui,sans-serif; --read:"Inter",system-ui,sans-serif; --ui:"Inter",system-ui,sans-serif;
  --r-sm:4px; --r-md:6px; --r-lg:8px;
  --sh-1:none; --sh-2:0 1px 3px rgba(55,53,47,.08); --sh-3:0 8px 26px rgba(55,53,47,.14);
  --topbar-bg:#fbfbfa; --bg-img:none;
  --c-bd:1px solid #ebeae6; --c-sh:none; --c-sh-h:none; --c-tf-h:none;
  --b-sh:none; --b-sh-h:none; --b-tf-h:none;
  --g-bd:1px solid #e0dfdb; --g-bg:transparent;
  --o-bd:1px solid #e3e2de;
}
html[data-theme="minimal"] h1,html[data-theme="minimal"] h2,html[data-theme="minimal"] h3{font-weight:700;letter-spacing:-.015em;}
html[data-theme="minimal"] .topbar{border-bottom:1px solid #efeeea;backdrop-filter:none;}
html[data-theme="minimal"] .brand-badge{background:#37352f;border-radius:4px;}
html[data-theme="minimal"] .brand-txt strong{font-weight:600;}
html[data-theme="minimal"] .sidebar{background:#f4f3ef;border-right:none;}
html[data-theme="minimal"] .sidebar-label{text-transform:none;letter-spacing:0;font-weight:600;font-size:.76rem;color:#8a8883;}
html[data-theme="minimal"] .sidebar a{border-radius:4px;padding:6px 10px;font-size:.9rem;color:#5a5853;font-weight:400;}
html[data-theme="minimal"] .sidebar a:hover{background:#eae9e4;}
html[data-theme="minimal"] .sidebar a.is-active{background:#e8e7e2;color:#37352f;font-weight:500;}
html[data-theme="minimal"] .eyebrow,html[data-theme="minimal"] .reader-eyebrow,html[data-theme="minimal"] .landing-eyebrow{text-transform:none;letter-spacing:0;font-weight:500;color:#787774;font-size:.88rem;}
html[data-theme="minimal"] .page-title,html[data-theme="minimal"] .reader-title{font-size:clamp(2rem,3.8vw,2.6rem);}
html[data-theme="minimal"] .page-sub,html[data-theme="minimal"] .reader-sub{font-style:normal;color:#787774;}
html[data-theme="minimal"] .section-title{border-bottom:none;font-size:1.25rem;}
html[data-theme="minimal"] .stat-row{border-color:#efeeea;}
html[data-theme="minimal"] .stat b{color:#37352f;font-weight:600;}
html[data-theme="minimal"] .mod-card:hover,html[data-theme="minimal"] .lesson:hover{--c-bg:#f3f2ef;}
html[data-theme="minimal"] .mod-card-num{color:#a19f9a;font-family:var(--ui);font-weight:500;}
html[data-theme="minimal"] .mod-card h3{font-size:1.05rem;font-weight:600;}
html[data-theme="minimal"] .mod-card-meta{border-top:none;color:#787774;font-weight:400;}
html[data-theme="minimal"] .lesson-num{color:#a19f9a;font-family:var(--ui);font-weight:500;}
html[data-theme="minimal"] .lesson-body h3{font-weight:600;}
html[data-theme="minimal"] .lesson-tag,html[data-theme="minimal"] .chip{background:#f1f0ec;border-color:transparent;border-radius:4px;color:#5a5853;}
html[data-theme="minimal"] a{text-decoration-color:rgba(55,53,47,.35);}
/* Lecteur */
html[data-theme="minimal"] .reader-head{border-bottom:none;}
html[data-theme="minimal"] .reader-intro{font-size:1.06rem;}
html[data-theme="minimal"] .reader-intro::first-letter{font-family:inherit;font-size:1em;float:none;padding:0;color:inherit;font-weight:inherit;line-height:inherit;}
html[data-theme="minimal"] .reader-sec{border-left:none;padding-left:0;}
html[data-theme="minimal"] .reader-sec>h2{font-size:1.4rem;font-weight:600;}
html[data-theme="minimal"] .reader-sec>h2 .sec-num{color:#a19f9a;font-weight:500;}
html[data-theme="minimal"] .reader-sec p,html[data-theme="minimal"] .reader-sec li{font-size:1.02rem;line-height:1.75;}
html[data-theme="minimal"] .reader-schema{background:#f1f0ec;border:none;border-radius:4px;padding:16px 18px 16px 50px;position:relative;}
html[data-theme="minimal"] .reader-schema::before{content:"💡";position:absolute;left:18px;top:15px;font-size:1.05rem;}
html[data-theme="minimal"] .reader-schema h4{color:#37352f;text-transform:none;letter-spacing:0;}
html[data-theme="minimal"] .q-opt:hover:not(:disabled){background:#f3f2ef;border-color:#d6d5d0;}
html[data-theme="minimal"] .q-bar{height:3px;background:#efeeea;}
html[data-theme="minimal"] .q-bar i{background:#37352f;}
html[data-theme="minimal"] .q-expl{background:#f1f0ec;border-left:none;border-radius:4px;}
html[data-theme="minimal"] .fiche-point{border-left:2px solid #e7e6e2;}
html[data-theme="minimal"] .fiche-point h4{color:#37352f;}


/* ==========================================================================
   18. GRAPHITE — sombre professionnel pour la révision du soir : anthracite
   (pas de noir), texte gris clair (pas de blanc), accent bleu acier doux.
   ========================================================================== */
html[data-theme="graphite"]{
  --paper:#1f2227; --paper-2:#262a30; --card:#262a30;
  --line:#363b43; --line-soft:#2d3138;
  --ink:#d9dde2; --ink-2:#b8bec6; --ink-3:#8d949e; --ink-4:#697079;
  --blue:#86a8c8; --blue-deep:#a9c2da; --blue-soft:rgba(134,168,200,.16); --blue-tint:rgba(134,168,200,.08);
  --btn-txt:#16191d;
  --ok:#83bb9d; --ok-bg:rgba(131,187,157,.13); --warn:#d3b26e; --warn-bg:rgba(211,178,110,.12);
  --err:#d98e89; --err-bg:rgba(217,142,137,.13);
  --star:#d3b26e; --star-deep:#c29f55;
  --display:"Inter",system-ui,sans-serif; --read:"Inter",system-ui,sans-serif; --ui:"Inter",system-ui,sans-serif;
  --r-sm:6px; --r-md:8px; --r-lg:10px;
  --sh-1:none; --sh-2:0 4px 16px rgba(0,0,0,.25); --sh-3:0 14px 36px rgba(0,0,0,.4);
  --topbar-bg:#1b1e22; --bg-img:none;
  --c-bd:1px solid #363b43; --c-sh:none; --c-sh-h:0 6px 20px rgba(0,0,0,.25); --c-tf-h:none;
  --b-sh:none; --b-sh-h:none; --b-tf-h:none;
  --g-bd:1px solid #3f454e; --g-bg:transparent;
  --i-bg:#1b1e22; --i-bd:1px solid #3f454e;
  --o-bg:#262a30; --o-bd:1px solid #363b43;
  color-scheme:dark;
}
html[data-theme="graphite"] body{color-scheme:dark;background-color:#1f2227;}
html[data-theme="graphite"] h1,html[data-theme="graphite"] h2,html[data-theme="graphite"] h3{font-weight:650;letter-spacing:-.015em;color:#e4e7eb;}
html[data-theme="graphite"] .topbar{border-bottom:1px solid #2d3138;backdrop-filter:none;}
html[data-theme="graphite"] .brand-badge{background:#86a8c8;color:#16191d;border-radius:6px;}
html[data-theme="graphite"] .sidebar{background:#1b1e22;border-right:1px solid #2d3138;}
html[data-theme="graphite"] .sidebar-label{color:#697079;}
html[data-theme="graphite"] .sidebar a{color:#a8aeb7;}
html[data-theme="graphite"] .sidebar a:hover{background:#262a30;color:#d9dde2;}
html[data-theme="graphite"] .sidebar a.is-active{background:#2b3038;color:#e4e7eb;box-shadow:inset 3px 0 0 #86a8c8;}
html[data-theme="graphite"] .eyebrow,html[data-theme="graphite"] .reader-eyebrow,html[data-theme="graphite"] .landing-eyebrow{color:#86a8c8;}
html[data-theme="graphite"] .section-title{border-bottom:1px solid #363b43;}
html[data-theme="graphite"] .stat-row{border-color:#363b43;}
html[data-theme="graphite"] .stat b{color:#e4e7eb;}
html[data-theme="graphite"] .mod-card-num,html[data-theme="graphite"] .lesson-num{color:#86a8c8;}
html[data-theme="graphite"] .mod-card-meta{border-top:1px solid #2d3138;}
html[data-theme="graphite"] .lesson-tag{background:#2d3138;color:#b8bec6;}
html[data-theme="graphite"] .reader-sub{font-style:normal;}
html[data-theme="graphite"] .reader-intro::first-letter{color:#86a8c8;}
html[data-theme="graphite"] .reader-sec{border-left:2px solid #363b43;}
html[data-theme="graphite"] .reader-sec p,html[data-theme="graphite"] .reader-sec li{line-height:1.8;}
html[data-theme="graphite"] .reader-sec strong,html[data-theme="graphite"] .fiche strong{color:#e8ebef;}
html[data-theme="graphite"] .reader-schema{background:#262a30;border:1px solid #363b43;border-left:3px solid #86a8c8;}
html[data-theme="graphite"] .reader-schema h4{color:#a9c2da;}
html[data-theme="graphite"] .q-opt:hover:not(:disabled){background:#2b3038;border-color:#86a8c8;}
html[data-theme="graphite"] .q-bar{background:#2d3138;}
html[data-theme="graphite"] .q-expl{background:#1b1e22;border-left:3px solid #86a8c8;}
html[data-theme="graphite"] .fiche-point{border-left:2px solid #363b43;}
html[data-theme="graphite"] .fiche-point h4{color:#a9c2da;}
html[data-theme="graphite"] select option{background:#1f2227;color:#d9dde2;}


/* ==========================================================================
   19. ZEN — papier washi, énormément d'espace, typographie fine, un seul
   accent vermillon (le sceau), traits courts pour séparer.
   ========================================================================== */
html[data-theme="zen"]{
  --paper:#f3efe6; --paper-2:#ebe5d8; --card:#f6f2ea;
  --line:#e0d8c8; --line-soft:#e9e2d4;
  --ink:#2e2a26; --ink-2:#4a443d; --ink-3:#7d766c; --ink-4:#a59d91;
  --blue:#b0503a; --blue-deep:#8e3d2b; --blue-soft:#efe0d6; --blue-tint:#f3e8df;
  --btn-txt:#f6f2ea;
  --ok:#5e7550; --ok-bg:#e6e9da; --warn:#8a6420; --warn-bg:#f1e5ca; --err:#a4452f; --err-bg:#f2ddd3;
  --display:"Newsreader",Georgia,serif; --read:"Newsreader",Georgia,serif; --ui:"Jost",system-ui,sans-serif;
  --r-sm:2px; --r-md:2px; --r-lg:3px;
  --sh-1:none; --sh-2:none; --sh-3:0 12px 34px rgba(46,42,38,.12);
  --topbar-bg:#f3efe6; --bg-img:none;
  --c-bg:transparent; --c-bd:0 solid transparent; --c-sh:none; --c-sh-h:none; --c-tf-h:none;
  --b-bg:#2e2a26; --b-bg-h:#b0503a; --b-sh:none; --b-sh-h:none; --b-tf-h:none; --b-tt:uppercase; --b-ls:.16em;
  --g-bd:1px solid #2e2a26; --g-bg:transparent;
  --i-bd:1px solid #cfc6b4; --i-bg:#f6f2ea;
  --o-bd:1px solid #e0d8c8; --o-bg:transparent;
}
html[data-theme="zen"] body{font-size:17px;}
html[data-theme="zen"] .btn-primary,html[data-theme="zen"] .btn-gold{font-size:.74rem;font-weight:500;padding:14px 26px;}
html[data-theme="zen"] h1,html[data-theme="zen"] h2,html[data-theme="zen"] h3{font-weight:300;letter-spacing:-.005em;}
html[data-theme="zen"] .topbar{border-bottom:1px solid #e9e2d4;backdrop-filter:none;}
html[data-theme="zen"] .brand-badge{background:#b0503a;border-radius:2px;}
html[data-theme="zen"] .brand-txt strong{font-family:var(--display);font-weight:400;font-size:1.15rem;}
html[data-theme="zen"] .brand-txt small{font-family:var(--ui);letter-spacing:.12em;text-transform:uppercase;font-size:.62rem;}
html[data-theme="zen"] .sidebar{background:#f3efe6;border-right:none;padding-top:34px;}
html[data-theme="zen"] .sidebar-group{margin-bottom:30px;}
html[data-theme="zen"] .sidebar-label{letter-spacing:.28em;font-weight:500;color:#a59d91;font-size:.64rem;}
html[data-theme="zen"] .sidebar a{font-weight:400;color:#4a443d;border-radius:2px;}
html[data-theme="zen"] .sidebar a:hover{background:transparent;color:#b0503a;}
html[data-theme="zen"] .sidebar a.is-active{background:transparent;color:#b0503a;font-weight:500;}
html[data-theme="zen"] .sidebar a.is-active .sidebar-ico{color:#b0503a;}
/* Espace et titres fins */
@media (min-width:901px){ html[data-theme="zen"] .content{padding:56px 64px 100px;} }
html[data-theme="zen"] .eyebrow,html[data-theme="zen"] .reader-eyebrow,html[data-theme="zen"] .landing-eyebrow{
  font-family:var(--ui);letter-spacing:.3em;font-weight:400;font-size:.68rem;color:#7d766c;}
html[data-theme="zen"] .eyebrow::before,html[data-theme="zen"] .reader-eyebrow::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#b0503a;margin-right:12px;vertical-align:middle;}
html[data-theme="zen"] .page-title,html[data-theme="zen"] .reader-title{font-size:clamp(2.3rem,4.6vw,3.3rem);font-weight:300;line-height:1.1;}
html[data-theme="zen"] .page-sub,html[data-theme="zen"] .reader-sub{font-style:italic;font-weight:300;color:#7d766c;}
html[data-theme="zen"] .section-title{font-weight:300;font-size:1.7rem;border-bottom:none;}
html[data-theme="zen"] .section-title::after{content:"";display:block;width:32px;height:1px;background:#b0503a;margin-top:14px;}
html[data-theme="zen"] .stat-row{border-top:1px solid #e0d8c8;border-bottom:1px solid #e0d8c8;gap:48px;padding:26px 0;}
html[data-theme="zen"] .stat b{font-weight:300;font-size:2.2rem;color:#2e2a26;}
html[data-theme="zen"] .stat span{font-family:var(--ui);letter-spacing:.2em;text-transform:uppercase;font-size:.62rem;}
/* Modules : aérés, séparés par un trait fin */
html[data-theme="zen"] .mod-grid{gap:44px 36px;}
html[data-theme="zen"] .mod-card{border-top:1px solid #e0d8c8;padding:22px 0 0;}
html[data-theme="zen"] .mod-card:hover h3{color:#b0503a;}
html[data-theme="zen"] .mod-card-num{font-family:var(--ui);letter-spacing:.24em;font-size:.68rem;color:#b0503a;}
html[data-theme="zen"] .mod-card h3{font-size:1.4rem;font-weight:400;}
html[data-theme="zen"] .mod-card p{font-style:italic;color:#7d766c;}
html[data-theme="zen"] .mod-card-meta{border-top:none;font-family:var(--ui);letter-spacing:.12em;text-transform:uppercase;font-size:.66rem;}
html[data-theme="zen"] .lesson{border-top:1px solid #e0d8c8;padding-left:0;padding-right:0;}
html[data-theme="zen"] .lesson-num{font-weight:300;font-size:1.6rem;color:#b0503a;}
html[data-theme="zen"] .lesson-body h3{font-weight:400;font-size:1.15rem;}
html[data-theme="zen"] .lesson-tag,html[data-theme="zen"] .chip{border-radius:2px;font-family:var(--ui);letter-spacing:.08em;}
/* Lecteur */
html[data-theme="zen"] .reader-head{border-bottom:none;text-align:center;}
html[data-theme="zen"] .reader-meta{justify-content:center;font-family:var(--ui);letter-spacing:.1em;}
html[data-theme="zen"] .reader-head::after{content:"";display:block;width:32px;height:1px;background:#b0503a;margin:26px auto 0;}
html[data-theme="zen"] .reader-intro{font-size:1.18rem;line-height:1.95;font-weight:300;}
html[data-theme="zen"] .reader-intro::first-letter{font-family:inherit;font-size:1em;float:none;padding:0;color:inherit;font-weight:inherit;line-height:inherit;}
html[data-theme="zen"] .reader-sec{border-left:none;padding-left:0;margin-top:52px;}
html[data-theme="zen"] .reader-sec>h2{font-weight:400;font-size:1.5rem;}
html[data-theme="zen"] .reader-sec>h2 .sec-num{font-family:var(--ui);letter-spacing:.3em;font-size:.66rem;color:#b0503a;font-weight:400;}
html[data-theme="zen"] .reader-sec p,html[data-theme="zen"] .reader-sec li{font-size:1.12rem;line-height:1.95;}
html[data-theme="zen"] .reader-sec li::marker{content:"—  ";color:#a59d91;}
html[data-theme="zen"] .reader-schema{background:transparent;border:none;border-left:1px solid #b0503a;border-radius:0;padding:6px 0 6px 22px;}
html[data-theme="zen"] .reader-schema h4{font-family:var(--ui);letter-spacing:.2em;font-weight:400;font-size:.7rem;color:#b0503a;}
/* QCM */
html[data-theme="zen"] :is(.q-card,.qcard,.fiche,.exam-intro,.keycard,.prof-card,.avis-form-card){border-top:1px solid #e0d8c8;padding-left:0;padding-right:0;}
html[data-theme="zen"] .q-progress{font-family:var(--ui);letter-spacing:.14em;text-transform:uppercase;font-size:.66rem;}
html[data-theme="zen"] .q-text{font-weight:400;font-size:1.35rem;}
html[data-theme="zen"] .q-opt{font-size:1.06rem;}
html[data-theme="zen"] .q-opt:hover:not(:disabled){background:#f6f2ea;border-color:#b0503a;}
html[data-theme="zen"] .q-bar{height:1px;background:#e0d8c8;border-radius:0;}
html[data-theme="zen"] .q-bar i{background:#b0503a;border-radius:0;}
html[data-theme="zen"] .q-expl{background:transparent;border-left:1px solid #b0503a;font-style:italic;}
html[data-theme="zen"] .fiche-title{font-weight:300;border-bottom:1px solid #e0d8c8;}
html[data-theme="zen"] .fiche-point{border-left:none;padding-left:0;}
html[data-theme="zen"] .fiche-point h4{font-weight:400;color:#2e2a26;}


/* Menus flottants : toujours opaques dans les styles aux cartes transparentes */
html:is([data-theme="suisse"],[data-theme="zen"]) :is(.theme-menu,.zoneswitch-menu,.tour-pop,.aide-panneau){
  background:var(--card);border:1px solid var(--line);box-shadow:var(--sh-3);}
@media (max-width:560px){
  html[data-theme="zen"] .stat-row{gap:22px;}
  html[data-theme="zen"] .stat b{font-size:1.8rem;}
  html[data-theme="zen"] .content{padding-left:20px;padding-right:20px;}
}


/* ==========================================================================
   20. MENU THÈME À DEUX ONGLETS (v9.79) — « Thèmes simples » / « Thèmes
   avancés ». Valable pour tous les thèmes et tous les styles.
   ========================================================================== */
.theme-tabs{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:0 0 6px;
  background:var(--paper-2);border-radius:var(--r-sm);position:sticky;top:-6px;z-index:2;}
.theme-tab{font-family:var(--ui);font-size:.82rem;font-weight:600;color:var(--ink-3);background:transparent;border:0;
  border-radius:calc(var(--r-sm) - 2px);padding:9px 8px;cursor:pointer;white-space:nowrap;}
.theme-tab:hover{color:var(--ink);}
.theme-tab.is-on{background:var(--card);color:var(--ink);box-shadow:var(--sh-1),0 0 0 1px var(--line);}
.theme-pane{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:2px;}
.theme-pane[hidden]{display:none!important;}
/* Dans le menu, les onglets gardent une forme neutre quel que soit le style */
html[data-theme] .theme-tab{text-transform:none;letter-spacing:0;}
html[data-theme="verre"] .theme-tabs{background:rgba(255,255,255,.08);}
html[data-theme="verre"] .theme-tab.is-on{background:rgba(255,255,255,.16);}
html[data-theme="dashboard"] .theme-menu,html[data-theme="graphite"] .theme-menu{color:var(--ink);}


/* ==========================================================================
   12. AJUSTEMENTS MOBILES COMMUNS
   ========================================================================== */
@media (max-width:900px){
  /* Tiroir fermé : son ombre ne doit pas dépasser sur le bord de l'écran
     (ombres marquées de certains styles). */
  html:is([data-theme="verre"],[data-theme="cahier"],[data-theme="journal"],[data-theme="neumo"],[data-theme="clinique"],[data-theme="revue"],[data-theme="biblio"],[data-theme="these"],[data-theme="institution"],[data-theme="conseil"],[data-theme="liseuse"],[data-theme="portail"],[data-theme="suisse"],[data-theme="dashboard"],[data-theme="bento"],[data-theme="minimal"],[data-theme="graphite"],[data-theme="zen"],[data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"])
  .sidebar:not(.is-open){box-shadow:none;}
}
@media (max-width:560px){
  html[data-theme="journal"] .brand-txt strong{font-size:1.15rem;white-space:nowrap;}
  html[data-theme="cahier"] .brand-txt strong{font-size:1.25rem;white-space:nowrap;}
  html[data-theme="clinique"] .brand-txt strong{white-space:nowrap;}
}
/* Icône ◐ du bouton Thème : police système, présente sur tous les appareils */
html[data-theme] .theme-btn-ico{font-family:system-ui,"Segoe UI Symbol","Apple Symbols","Noto Sans Symbols 2",sans-serif;}


/* ==========================================================================
   THÈMES SPÉCIAUX (v9.80) — illustrations originales générées pour la
   plateforme (Higgsfield), converties en WebP et hébergées sur le site
   (public/assets/themes/<thème>/), comme l'exige la CSP (img-src 'self').
   Une image n'est téléchargée QUE si son thème est actif : les règles
   ci-dessous ne s'appliquent qu'à html[data-theme="…"].
   Règles de lisibilité : le texte des cours est toujours posé sur un
   panneau opaque ; les images servent de décor (fond, barre latérale,
   bandeau d'en-tête), jamais sous un paragraphe.
   ========================================================================== */

/* Bandeau illustré commun : l'en-tête de page (.page-head) devient une
   image pleine largeur avec un voile pour garder le titre lisible. */
html:is([data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"]) .page-head{
  position:relative;padding:38px 36px 34px;border-radius:var(--r-lg);overflow:hidden;max-width:none;
  background-size:cover;background-position:center;min-height:190px;margin-bottom:26px;}
html:is([data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"]) .page-head>*{position:relative;max-width:640px;}
@media (max-width:760px){
  html:is([data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"]) .page-head{padding:26px 20px 22px;min-height:150px;}
}
/* Barre latérale illustrée : l'image occupe le bas, un fondu la relie au
   haut uni où se trouvent les premiers liens. */
html:is([data-theme="medina"],[data-theme="vinci"],[data-theme="herbier"],[data-theme="micro"],[data-theme="tafilalet"],[data-theme="grandebib"]) .sidebar{
  background-repeat:no-repeat;background-size:100% auto,cover;background-position:top,center bottom;}


/* ==========================================================================
   21. MÉDINA — murs en tadelakt, frise de zellige, cèdre sculpté, arcs du
   riad. Émeraude, cobalt et ocre sur sable.
   ========================================================================== */
html[data-theme="medina"]{
  --paper:#efe2cb; --paper-2:#e6d6ba; --card:#fbf6ec;
  --line:#dcc9a6; --line-soft:#e8dbc2;
  --ink:#2c2118; --ink-2:#4a3a2c; --ink-3:#7a6650; --ink-4:#a08c72;
  --blue:#1f5e4a; --blue-deep:#164536; --blue-soft:#dcebe2; --blue-tint:#eef4ee;
  --ok:#2c6b4c; --ok-bg:#e1eee4; --warn:#9a6a14; --warn-bg:#f5e8cc; --err:#a3392e; --err-bg:#f6e0da;
  --star:#b8862b; --star-deep:#9c7022;
  --display:"Marcellus",Georgia,serif; --read:"Source Serif 4",Georgia,serif; --ui:"Mulish",system-ui,sans-serif;
  --r-sm:4px; --r-md:6px; --r-lg:10px;
  --sh-1:0 1px 2px rgba(44,33,24,.08); --sh-2:0 6px 18px rgba(44,33,24,.12); --sh-3:0 14px 34px rgba(44,33,24,.2);
  --topbar-bg:#f6ecdb;
  --bg-img:url("../themes/medina/plaster.webp");
  --c-bg:#fbf6ec; --c-bd:1px solid #dcc9a6; --c-sh:0 2px 8px rgba(44,33,24,.07); --c-sh-h:0 8px 22px rgba(44,33,24,.14); --c-tf-h:translateY(-2px);
  --b-sh:none; --b-sh-h:0 4px 12px rgba(31,94,74,.3); --b-tf-h:none;
}
html[data-theme="medina"] body{background-size:512px 512px;}
/* Frise de zellige sous la barre du haut */
html[data-theme="medina"] .topbar{border-bottom:none;box-shadow:0 2px 6px rgba(44,33,24,.12);}
html[data-theme="medina"] .topbar::after{content:"";position:absolute;left:0;right:0;bottom:-8px;height:8px;pointer-events:none;
  background:url("../themes/medina/zellige.webp") center/56px 56px repeat-x;}
html[data-theme="medina"] .brand-badge{background:#1f5e4a;border-radius:4px;box-shadow:inset 0 0 0 2px #b8862b;}
html[data-theme="medina"] .brand-txt strong{font-family:var(--display);font-size:1.15rem;}
/* Barre latérale en cèdre sculpté */
html[data-theme="medina"] .sidebar{border-right:none;padding-top:32px;
  background-image:linear-gradient(rgba(38,22,12,.80),rgba(38,22,12,.80)),url("../themes/medina/side.webp");background-size:cover,cover;background-position:center,center;}
html[data-theme="medina"] .sidebar-label{color:#d9b56a;letter-spacing:.14em;}
html[data-theme="medina"] .sidebar a{color:#f1e4cc;}
html[data-theme="medina"] .sidebar a:hover{background:rgba(255,240,210,.10);color:#fff;}
html[data-theme="medina"] .sidebar a.is-active{background:rgba(255,240,210,.14);color:#fff;box-shadow:inset 3px 0 0 #3f9a78;}
html[data-theme="medina"] .sidebar a.is-locked{color:#a58f72;}
html[data-theme="medina"] .sidebar-foot,html[data-theme="medina"] .sidebar-foot .mute{color:#b9a283;}
/* Bandeau du riad */
html[data-theme="medina"] .page-head{background-image:linear-gradient(90deg,rgba(28,18,10,.82) 0%,rgba(28,18,10,.55) 55%,rgba(28,18,10,.15) 100%),url("../themes/medina/banner.webp");}
html[data-theme="medina"] .page-head :is(.page-title,.page-sub,.eyebrow){color:#fbf3e3;}
html[data-theme="medina"] .page-head .eyebrow{color:#e3c07a;}
html[data-theme="medina"] h1,html[data-theme="medina"] h2,html[data-theme="medina"] h3{font-weight:400;letter-spacing:.01em;}
html[data-theme="medina"] .eyebrow,html[data-theme="medina"] .reader-eyebrow{color:#1f5e4a;}
html[data-theme="medina"] .section-title{border-bottom:none;padding-bottom:14px;
  background:linear-gradient(#1f5e4a,#1f5e4a) left bottom/64px 3px no-repeat;}
html[data-theme="medina"] .stat b{font-family:var(--display);color:#1f5e4a;}
html[data-theme="medina"] .mod-card{border-top:4px solid #1f5e4a;}
html[data-theme="medina"] .mod-card:nth-child(3n+2){border-top-color:#23408e;}
html[data-theme="medina"] .mod-card:nth-child(3n+3){border-top-color:#b8862b;}
html[data-theme="medina"] .mod-card-num{font-family:var(--display);color:#b8862b;}
html[data-theme="medina"] .lesson-num{font-family:var(--display);color:#1f5e4a;}
html[data-theme="medina"] .reader-head{border-bottom:none;}
html[data-theme="medina"] .reader-head::after{content:"";display:block;height:10px;margin-top:20px;border-radius:2px;
  background:url("../themes/medina/zellige.webp") 0 0/40px 40px repeat-x;}
html[data-theme="medina"] .reader-intro::first-letter{color:#1f5e4a;font-family:var(--display);}
html[data-theme="medina"] .reader-sec{border-left:2px solid #dcc9a6;}
html[data-theme="medina"] .reader-sec>h2 .sec-num{color:#b8862b;}
html[data-theme="medina"] .reader-schema{background:#fbf6ec;border:1px solid #dcc9a6;border-top:4px solid #1f5e4a;}
html[data-theme="medina"] .reader-schema h4{color:#1f5e4a;}
html[data-theme="medina"] .q-opt:hover:not(:disabled){background:#eef4ee;border-color:#1f5e4a;}
html[data-theme="medina"] .q-expl{border-left:4px solid #1f5e4a;background:#f3ecdd;}
html[data-theme="medina"] .fiche-point{border-left:3px solid #dcc9a6;}


/* ==========================================================================
   22. ANATOMIE DE VINCI — parchemin, planches à l'encre sépia et à la
   sanguine, typographie d'imprimerie de la Renaissance.
   ========================================================================== */
html[data-theme="vinci"]{
  --paper:#eadcc0; --paper-2:#e0cfae; --card:#f6ecd8;
  --line:#d3bd94; --line-soft:#e1d0ae;
  --ink:#33241a; --ink-2:#4d3a2a; --ink-3:#7a634b; --ink-4:#a08a6c;
  --blue:#8e3f25; --blue-deep:#6d2f1a; --blue-soft:#ecd9c6; --blue-tint:#f2e5d3;
  --ok:#4f6a36; --ok-bg:#e5e6cf; --warn:#8a6420; --warn-bg:#f0e1c0; --err:#9c3a2a; --err-bg:#f1dccb;
  --star:#8e3f25; --star-deep:#6d2f1a;
  --display:"IM Fell English",Georgia,serif; --read:"EB Garamond",Garamond,Georgia,serif; --ui:"EB Garamond",Garamond,Georgia,serif;
  --r-sm:2px; --r-md:3px; --r-lg:4px;
  --sh-1:none; --sh-2:0 4px 14px rgba(51,36,26,.12); --sh-3:0 12px 30px rgba(51,36,26,.2);
  --topbar-bg:#efe3cb;
  --bg-img:url("../themes/vinci/paper.webp");
  --c-bg:#f6ecd8; --c-bd:1px solid #d3bd94; --c-sh:0 1px 0 rgba(51,36,26,.06),inset 0 0 40px rgba(160,120,70,.08);
  --c-sh-h:0 6px 18px rgba(51,36,26,.14),inset 0 0 40px rgba(160,120,70,.08); --c-tf-h:none;
  --b-bg:#6d2f1a; --b-bg-h:#8e3f25; --b-sh:none; --b-sh-h:none; --b-tf-h:none;
  --g-bg:transparent; --g-bd:1px solid #a08a6c;
}
html[data-theme="vinci"] body{font-size:17px;background-size:512px 512px;}
/* Étude du cœur dans la marge droite, sur grand écran, derrière le contenu */
@media (min-width:1500px){
  html[data-theme="vinci"] body::after{content:"";position:fixed;right:0;bottom:0;width:300px;height:530px;z-index:-1;pointer-events:none;
    background:url("../themes/vinci/heart.webp") center/contain no-repeat;opacity:.45;mix-blend-mode:multiply;}
}
html[data-theme="vinci"] .topbar{border-bottom:3px double #8a6f4e;backdrop-filter:none;}
html[data-theme="vinci"] .brand-badge{background:#6d2f1a;border-radius:50%;}
html[data-theme="vinci"] .brand-txt strong{font-family:var(--display);font-size:1.25rem;font-weight:400;}
html[data-theme="vinci"] .sidebar{border-right:1px solid #cdb68b;
  background-image:linear-gradient(#efe3cb 0%,rgba(239,227,203,.94) 45%,rgba(239,227,203,.55) 100%),url("../themes/vinci/side.webp");
  background-size:cover,cover;background-position:center,center bottom;}
html[data-theme="vinci"] .sidebar-label{font-family:var(--display);color:#8e3f25;text-transform:none;letter-spacing:.02em;font-size:.95rem;font-weight:400;font-style:italic;}
html[data-theme="vinci"] .sidebar a{font-size:1.02rem;}
html[data-theme="vinci"] .sidebar a:hover{background:rgba(142,63,37,.08);}
html[data-theme="vinci"] .sidebar a.is-active{background:rgba(142,63,37,.12);color:#6d2f1a;}
html[data-theme="vinci"] .page-head{border:1px solid #cdb68b;
  background-image:linear-gradient(90deg,rgba(246,236,216,.96) 0%,rgba(246,236,216,.86) 45%,rgba(246,236,216,.1) 100%),url("../themes/vinci/banner.webp");}
html[data-theme="vinci"] h1,html[data-theme="vinci"] h2,html[data-theme="vinci"] h3{font-weight:400;letter-spacing:0;}
html[data-theme="vinci"] .page-title,html[data-theme="vinci"] .reader-title{font-size:clamp(2.2rem,4.2vw,3rem);}
html[data-theme="vinci"] .eyebrow,html[data-theme="vinci"] .reader-eyebrow{font-family:var(--display);font-style:italic;text-transform:none;letter-spacing:.02em;color:#8e3f25;font-size:1.02rem;font-weight:400;}
html[data-theme="vinci"] .section-title{font-size:1.6rem;border-bottom:1px solid #a08a6c;}
html[data-theme="vinci"] .stat b{font-family:var(--read);font-weight:500;color:#6d2f1a;font-variant-numeric:lining-nums;}
html[data-theme="vinci"] .mod-card-num{font-family:var(--display);font-style:italic;color:#8e3f25;}
html[data-theme="vinci"] .mod-card-num::before{content:"Planche ";}
html[data-theme="vinci"] .mod-card h3{font-size:1.35rem;}
html[data-theme="vinci"] .lesson-num{font-family:var(--display);color:#8e3f25;}
html[data-theme="vinci"] .reader-head{border-bottom:3px double #a08a6c;}
html[data-theme="vinci"] .reader-intro{font-size:1.2rem;}
html[data-theme="vinci"] .reader-intro::first-letter{font-family:var(--display);color:#8e3f25;font-size:3.8em;}
html[data-theme="vinci"] .reader-sec{border-left:1px solid #cdb68b;}
html[data-theme="vinci"] .reader-sec>h2{font-size:1.55rem;}
html[data-theme="vinci"] .reader-sec>h2 .sec-num{font-family:var(--display);font-style:italic;color:#8e3f25;letter-spacing:0;text-transform:none;font-size:1rem;}
html[data-theme="vinci"] .reader-sec p,html[data-theme="vinci"] .reader-sec li{font-size:1.14rem;}
html[data-theme="vinci"] .reader-schema{background:#f1e4cb;border:1px solid #cdb68b;box-shadow:inset 0 0 0 4px #f1e4cb,inset 0 0 0 5px rgba(142,63,37,.3);}
html[data-theme="vinci"] .reader-schema h4{font-family:var(--display);text-transform:none;letter-spacing:0;font-style:italic;color:#8e3f25;font-size:1.1rem;}
html[data-theme="vinci"] .q-text{font-size:1.28rem;}
html[data-theme="vinci"] .q-opt{font-size:1.08rem;}
html[data-theme="vinci"] .q-opt:hover:not(:disabled){background:#f2e5d3;border-color:#8e3f25;}
html[data-theme="vinci"] .q-bar i{background:#8e3f25;}
html[data-theme="vinci"] .q-expl{background:#f1e4cb;border-left:2px solid #8e3f25;font-style:italic;}
html[data-theme="vinci"] .fiche-point{border-left:1px solid #cdb68b;}
html[data-theme="vinci"] .fiche-point h4{font-family:var(--display);font-weight:400;color:#6d2f1a;}


/* ==========================================================================
   23. HERBIER — papier aquarelle, planches de plantes médicinales, brins
   de lavande ; sauge et lavande sur crème.
   ========================================================================== */
html[data-theme="herbier"]{
  --paper:#f7f3e8; --paper-2:#efe9d9; --card:#fdfbf4;
  --line:#e0d8c3; --line-soft:#ebe5d4;
  --ink:#2f3a2c; --ink-2:#465244; --ink-3:#6f7a68; --ink-4:#9aa293;
  --blue:#5b7a52; --blue-deep:#435d3c; --blue-soft:#e3ebdc; --blue-tint:#eff3ea;
  --accent2:#7b6ba8;
  --ok:#4f7a45; --ok-bg:#e4efdd; --warn:#98702a; --warn-bg:#f4ead3; --err:#a4483e; --err-bg:#f6e2dc;
  --star:#c29a3a; --star-deep:#a88430;
  --display:"Cormorant Garamond",Georgia,serif; --read:"Lora",Georgia,serif; --ui:"Karla",system-ui,sans-serif;
  --r-sm:4px; --r-md:6px; --r-lg:10px;
  --sh-1:none; --sh-2:0 4px 16px rgba(47,58,44,.08); --sh-3:0 12px 30px rgba(47,58,44,.14);
  --topbar-bg:#fbf8f0;
  --bg-img:url("../themes/herbier/paper.webp");
  --c-bg:#fdfbf4; --c-bd:1px solid #e0d8c3; --c-sh:0 1px 3px rgba(47,58,44,.05); --c-sh-h:0 8px 22px rgba(47,58,44,.10); --c-tf-h:translateY(-2px);
  --b-sh:none; --b-sh-h:none; --b-tf-h:none;
}
html[data-theme="herbier"] body{background-size:512px 512px;}
html[data-theme="herbier"] .topbar{border-bottom:1px solid #e0d8c3;}
html[data-theme="herbier"] .brand-badge{background:#5b7a52;border-radius:50%;}
html[data-theme="herbier"] .brand-txt strong{font-family:var(--display);font-size:1.3rem;font-weight:600;font-style:italic;}
html[data-theme="herbier"] .sidebar{border-right:1px solid #e0d8c3;
  background-image:linear-gradient(#fbf8f0 0%,rgba(251,248,240,.95) 50%,rgba(251,248,240,.55) 100%),url("../themes/herbier/side.webp");
  background-size:cover,cover;background-position:center,center bottom;}
html[data-theme="herbier"] .sidebar-label{font-family:var(--display);font-style:italic;font-size:1.02rem;text-transform:none;letter-spacing:0;color:#7b6ba8;font-weight:600;}
html[data-theme="herbier"] .sidebar a:hover{background:rgba(91,122,82,.08);}
html[data-theme="herbier"] .sidebar a.is-active{background:rgba(91,122,82,.14);color:#435d3c;}
/* Frise d'herbes : le titre se pose dans la partie haute, restée crème */
html[data-theme="herbier"] .page-head{border:1px solid #e0d8c3;min-height:300px;padding-bottom:150px;
  background-image:linear-gradient(to bottom,rgba(252,247,235,.97) 0%,rgba(252,247,235,.88) 38%,rgba(252,247,235,0) 68%),url("../themes/herbier/banner.webp");
  background-position:center,center bottom;background-size:cover,100% auto;background-repeat:no-repeat;background-color:#fcf7eb;}
@media (max-width:760px){ html[data-theme="herbier"] .page-head{padding-bottom:90px;background-size:170% auto;} }
html[data-theme="herbier"] h1,html[data-theme="herbier"] h2,html[data-theme="herbier"] h3{font-weight:600;letter-spacing:0;}
html[data-theme="herbier"] .page-title,html[data-theme="herbier"] .reader-title{font-style:italic;font-size:clamp(2.3rem,4.4vw,3.2rem);color:#2f3a2c;}
html[data-theme="herbier"] .eyebrow,html[data-theme="herbier"] .reader-eyebrow{color:#7b6ba8;}
html[data-theme="herbier"] .section-title{font-style:italic;font-size:1.8rem;border-bottom:none;padding-left:44px;
  background:url("../themes/herbier/sprig.webp") left center/36px 36px no-repeat;}
html[data-theme="herbier"] .stat b{font-family:var(--display);font-weight:600;color:#435d3c;font-size:2.1rem;}
html[data-theme="herbier"] .mod-card{background-image:url("../themes/herbier/sprig.webp");background-repeat:no-repeat;background-position:right -14px bottom -14px;background-size:110px 110px;}
html[data-theme="herbier"] .mod-card-num{font-family:var(--display);font-style:italic;color:#7b6ba8;font-size:1.1rem;}
html[data-theme="herbier"] .mod-card h3{font-size:1.45rem;font-style:italic;}
html[data-theme="herbier"] .mod-card p{max-width:80%;}
html[data-theme="herbier"] .lesson-num{font-family:var(--display);font-style:italic;color:#7b6ba8;}
html[data-theme="herbier"] .reader-head{border-bottom:1px solid #e0d8c3;}
html[data-theme="herbier"] .reader-intro::first-letter{font-family:var(--display);color:#5b7a52;font-style:italic;}
html[data-theme="herbier"] .reader-sec{border-left:2px solid #e3ebdc;}
html[data-theme="herbier"] .reader-sec>h2{font-size:1.7rem;font-style:italic;}
html[data-theme="herbier"] .reader-sec>h2 .sec-num{color:#7b6ba8;font-style:normal;}
html[data-theme="herbier"] .reader-sec li::marker{content:"❧  ";color:#5b7a52;}
html[data-theme="herbier"] .reader-schema{background:#f3f6ee;border:1px solid #d8e2cf;border-radius:8px;}
html[data-theme="herbier"] .reader-schema h4{color:#435d3c;}
html[data-theme="herbier"] .q-opt:hover:not(:disabled){background:#eff3ea;border-color:#5b7a52;}
html[data-theme="herbier"] .q-expl{background:#f3f6ee;border-left:3px solid #7b6ba8;}
html[data-theme="herbier"] .fiche-point{border-left:2px solid #d8e2cf;}
html[data-theme="herbier"] .fiche-point h4{font-family:var(--display);font-style:italic;font-size:1.3rem;color:#435d3c;}


/* ==========================================================================
   24. MICROSCOPIE — laboratoire de nuit : cellules en fluorescence en fond,
   réseau de neurones dans la barre latérale, panneaux sombres translucides.
   ========================================================================== */
html[data-theme="micro"]{
  --paper:#070b18; --paper-2:#101729; --card:rgba(13,20,38,.9);
  --line:rgba(120,190,215,.18); --line-soft:rgba(120,190,215,.1);
  --ink:#d7e3ee; --ink-2:#b3c3d3; --ink-3:#8499ad; --ink-4:#61758a;
  --blue:#62c6d6; --blue-deep:#9fe0ea; --blue-soft:rgba(98,198,214,.16); --blue-tint:rgba(98,198,214,.08);
  --btn-txt:#061019;
  --ok:#6fd0a0; --ok-bg:rgba(111,208,160,.13); --warn:#e0bd6b; --warn-bg:rgba(224,189,107,.12); --err:#ef8a8a; --err-bg:rgba(239,138,138,.13);
  --star:#e0bd6b; --star-deep:#cda653;
  --display:"IBM Plex Sans",system-ui,sans-serif; --read:"IBM Plex Sans",system-ui,sans-serif; --ui:"IBM Plex Sans",system-ui,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,monospace;
  --r-sm:6px; --r-md:8px; --r-lg:12px;
  --sh-1:none; --sh-2:0 8px 26px rgba(0,0,0,.4); --sh-3:0 16px 40px rgba(0,0,0,.55);
  --topbar-bg:rgba(7,11,24,.88); --bg-img:none;
  --c-bg:rgba(13,20,38,.88); --c-bd:1px solid rgba(120,190,215,.18); --c-sh:0 4px 20px rgba(0,0,0,.3);
  --c-sh-h:0 0 0 1px rgba(98,198,214,.5),0 10px 30px rgba(0,0,0,.45); --c-tf-h:none; --c-blur:blur(6px);
  --b-bg:linear-gradient(135deg,#62c6d6,#8b86e8); --b-bg-h:linear-gradient(135deg,#7fd3e0,#a09cf0); --b-sh:0 4px 16px rgba(98,198,214,.3); --b-sh-h:0 6px 22px rgba(98,198,214,.45); --b-tf-h:none;
  --g-bg:rgba(13,20,38,.6); --g-bd:1px solid rgba(120,190,215,.3);
  --i-bg:rgba(5,9,20,.8); --i-bd:1px solid rgba(120,190,215,.28);
  --o-bg:rgba(13,20,38,.85); --o-bd:1px solid rgba(120,190,215,.2);
  color-scheme:dark;
}
html[data-theme="micro"] body{color-scheme:dark;background-color:#070b18;}
html[data-theme="micro"] body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(rgba(7,11,24,.72),rgba(7,11,24,.86)),url("../themes/micro/bg.webp") center/cover no-repeat;}
html[data-theme="micro"] .topbar{border-bottom:1px solid rgba(120,190,215,.16);}
html[data-theme="micro"] .brand-badge{background:linear-gradient(135deg,#62c6d6,#8b86e8);color:#061019;border-radius:8px;}
html[data-theme="micro"] .sidebar{border-right:1px solid rgba(120,190,215,.14);
  background-image:linear-gradient(rgba(6,10,22,.9) 0%,rgba(6,10,22,.82) 45%,rgba(6,10,22,.45) 100%),url("../themes/micro/side.webp");
  background-size:cover,cover;background-position:center,center bottom;}
html[data-theme="micro"] .sidebar-label{font-family:var(--mono);color:#62c6d6;letter-spacing:.08em;}
html[data-theme="micro"] .sidebar a{color:#b3c3d3;}
html[data-theme="micro"] .sidebar a:hover{background:rgba(98,198,214,.1);color:#e6f1f8;}
html[data-theme="micro"] .sidebar a.is-active{background:rgba(98,198,214,.16);color:#e6f1f8;box-shadow:inset 3px 0 0 #62c6d6;}
html[data-theme="micro"] .page-head{border:1px solid rgba(120,190,215,.18);
  background-image:linear-gradient(90deg,rgba(7,11,24,.94) 0%,rgba(7,11,24,.7) 50%,rgba(7,11,24,.2) 100%),url("../themes/micro/banner.webp");}
html[data-theme="micro"] h1,html[data-theme="micro"] h2,html[data-theme="micro"] h3{font-weight:500;letter-spacing:-.01em;color:#e6f1f8;}
html[data-theme="micro"] .page-title,html[data-theme="micro"] .reader-title{font-weight:300;font-size:clamp(2.2rem,4.4vw,3.1rem);}
html[data-theme="micro"] .eyebrow,html[data-theme="micro"] .reader-eyebrow,html[data-theme="micro"] .landing-eyebrow{font-family:var(--mono);color:#62c6d6;letter-spacing:.1em;}
html[data-theme="micro"] .section-title{border-bottom:1px solid rgba(120,190,215,.2);font-weight:400;}
html[data-theme="micro"] .stat-row{border-color:rgba(120,190,215,.18);}
html[data-theme="micro"] .stat b{font-family:var(--mono);font-weight:400;color:#9fe0ea;}
html[data-theme="micro"] .mod-card-num,html[data-theme="micro"] .lesson-num{font-family:var(--mono);color:#62c6d6;}
html[data-theme="micro"] .mod-card-num::before{content:"ÉCH. ";}
html[data-theme="micro"] .mod-card-meta{border-top:1px solid rgba(120,190,215,.12);}
html[data-theme="micro"] .lesson-tag{background:rgba(98,198,214,.1);color:#9fe0ea;}
html[data-theme="micro"] :is(.reader,.fiche-page) {background:rgba(10,16,32,.9);border:1px solid rgba(120,190,215,.14);border-radius:12px;padding:30px 34px;}
html[data-theme="micro"] .reader-sub{font-style:normal;}
html[data-theme="micro"] .reader-intro::first-letter{color:#62c6d6;}
html[data-theme="micro"] .reader-sec{border-left:1px solid rgba(120,190,215,.22);}
html[data-theme="micro"] .reader-sec>h2 .sec-num{font-family:var(--mono);color:#62c6d6;}
html[data-theme="micro"] .reader-sec strong,html[data-theme="micro"] .fiche strong{color:#eef6fb;}
html[data-theme="micro"] .reader-schema{background:rgba(98,198,214,.07);border:1px solid rgba(98,198,214,.28);}
html[data-theme="micro"] .reader-schema h4{font-family:var(--mono);color:#9fe0ea;}
html[data-theme="micro"] .q-opt:hover:not(:disabled){background:rgba(98,198,214,.1);border-color:#62c6d6;}
html[data-theme="micro"] .q-bar{background:rgba(120,190,215,.14);}
html[data-theme="micro"] .q-bar i{background:linear-gradient(90deg,#62c6d6,#8b86e8);}
html[data-theme="micro"] .q-expl{background:rgba(5,9,20,.7);border-left:3px solid #62c6d6;}
html[data-theme="micro"] .fiche-point{border-left:2px solid rgba(120,190,215,.22);}
html[data-theme="micro"] .fiche-point h4{color:#9fe0ea;}
html[data-theme="micro"] select option{background:#070b18;color:#d7e3ee;}
@media (max-width:760px){
  html[data-theme="micro"] :is(.reader,.fiche-page){padding:20px 16px;}
  html[data-theme="micro"]{--c-blur:none;}
}


/* ==========================================================================
   25. TAFILALET — dunes de Merzouga à l'aube en fond, palmeraie du Ziz dans
   la barre latérale, ksar en pisé en bandeau. Terre cuite et vert palme.
   ========================================================================== */
html[data-theme="tafilalet"]{
  --paper:#f6ede2; --paper-2:#efe2d2; --card:rgba(255,250,243,.93);
  --line:#e6d3bc; --line-soft:#eee1d0;
  --ink:#33241c; --ink-2:#4f3b2e; --ink-3:#7d6655; --ink-4:#a68f7c;
  --blue:#b0552a; --blue-deep:#8c4120; --blue-soft:#f3dfd1; --blue-tint:#f8ebe1;
  --accent2:#5d6b3a;
  --ok:#5d6b3a; --ok-bg:#e8e9d6; --warn:#a0701f; --warn-bg:#f5e6c9; --err:#a63c2c; --err-bg:#f6dfd6;
  --star:#c98a2e; --star-deep:#ae7524;
  --display:"Fraunces",Georgia,serif; --read:"Source Serif 4",Georgia,serif; --ui:"Inter",system-ui,sans-serif;
  --r-sm:6px; --r-md:10px; --r-lg:14px;
  --sh-1:0 1px 3px rgba(51,36,28,.06); --sh-2:0 8px 22px rgba(51,36,28,.1); --sh-3:0 16px 36px rgba(51,36,28,.18);
  --topbar-bg:rgba(255,248,238,.9); --bg-img:none;
  --c-bg:rgba(255,250,243,.93); --c-bd:1px solid rgba(214,188,160,.7); --c-sh:0 4px 14px rgba(120,70,40,.07);
  --c-sh-h:0 12px 28px rgba(120,70,40,.14); --c-tf-h:translateY(-2px);
  --b-sh:0 3px 10px rgba(176,85,42,.25); --b-sh-h:0 6px 16px rgba(176,85,42,.35); --b-tf-h:none;
}
html[data-theme="tafilalet"] body{background-color:#f6ede2;}
html[data-theme="tafilalet"] body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(rgba(250,243,234,.62),rgba(250,243,234,.80)),url("../themes/tafilalet/bg.webp") center bottom/cover no-repeat;}
html[data-theme="tafilalet"] .topbar{border-bottom:1px solid rgba(214,188,160,.6);}
html[data-theme="tafilalet"] .brand-badge{background:#b0552a;border-radius:8px;}
html[data-theme="tafilalet"] .brand-txt strong{font-family:var(--display);font-weight:600;}
html[data-theme="tafilalet"] .sidebar{border-right:none;
  background-image:linear-gradient(rgba(42,26,14,.84) 0%,rgba(42,26,14,.74) 45%,rgba(42,26,14,.42) 100%),url("../themes/tafilalet/side.webp");
  background-size:cover,cover;background-position:center,center;}
html[data-theme="tafilalet"] .sidebar-label{color:#e7b98a;letter-spacing:.12em;}
html[data-theme="tafilalet"] .sidebar a{color:#f4e6d6;}
html[data-theme="tafilalet"] .sidebar a:hover{background:rgba(255,235,210,.1);color:#fff;}
html[data-theme="tafilalet"] .sidebar a.is-active{background:rgba(255,235,210,.16);color:#fff;box-shadow:inset 3px 0 0 #e0874f;}
html[data-theme="tafilalet"] .sidebar a.is-locked{color:#b59c86;}
html[data-theme="tafilalet"] .sidebar-foot,html[data-theme="tafilalet"] .sidebar-foot .mute{color:#c9ae94;}
html[data-theme="tafilalet"] .page-head{
  background-image:linear-gradient(90deg,rgba(255,248,238,.96) 0%,rgba(255,248,238,.88) 50%,rgba(255,248,238,.15) 92%),url("../themes/tafilalet/banner.webp");background-position:center bottom;}
html[data-theme="tafilalet"] h1,html[data-theme="tafilalet"] h2,html[data-theme="tafilalet"] h3{font-weight:600;letter-spacing:-.01em;}
html[data-theme="tafilalet"] .eyebrow,html[data-theme="tafilalet"] .reader-eyebrow{color:#b0552a;}
html[data-theme="tafilalet"] .section-title{border-bottom:none;}
html[data-theme="tafilalet"] .section-title::after{content:"";display:block;width:56px;height:3px;border-radius:3px;background:linear-gradient(90deg,#b0552a,#e0874f);margin-top:10px;}
html[data-theme="tafilalet"] .stat-row{border-color:rgba(214,188,160,.8);}
html[data-theme="tafilalet"] .stat b{font-family:var(--display);color:#8c4120;}
html[data-theme="tafilalet"] .mod-card-num,html[data-theme="tafilalet"] .lesson-num{font-family:var(--display);color:#b0552a;}
html[data-theme="tafilalet"] :is(.reader,.fiche-page){background:rgba(255,250,243,.94);border:1px solid rgba(214,188,160,.7);border-radius:14px;padding:30px 34px;}
html[data-theme="tafilalet"] .reader-intro::first-letter{color:#b0552a;}
html[data-theme="tafilalet"] .reader-sec{border-left:2px solid #f3dfd1;}
html[data-theme="tafilalet"] .reader-sec>h2 .sec-num{color:#5d6b3a;}
html[data-theme="tafilalet"] .reader-schema{background:#fbf1e6;border:1px solid #ecd6bf;border-left:4px solid #5d6b3a;}
html[data-theme="tafilalet"] .reader-schema h4{color:#5d6b3a;}
html[data-theme="tafilalet"] .q-opt:hover:not(:disabled){background:#f8ebe1;border-color:#b0552a;}
html[data-theme="tafilalet"] .q-expl{background:#fbf1e6;border-left:3px solid #b0552a;}
html[data-theme="tafilalet"] .fiche-point{border-left:2px solid #f3dfd1;}
@media (max-width:760px){
  html[data-theme="tafilalet"] :is(.reader,.fiche-page){padding:20px 16px;}
  html[data-theme="tafilalet"] .page-head{background-image:linear-gradient(rgba(255,248,238,.9),rgba(255,248,238,.72)),url("../themes/tafilalet/banner.webp");}
}


/* ==========================================================================
   26. GRANDE BIBLIOTHÈQUE — la salle de lecture en fond, les rayonnages
   dans la barre latérale ; le contenu est une grande feuille posée sur le
   bureau, avec la lampe de lecture en bandeau.
   ========================================================================== */
html[data-theme="grandebib"]{
  --paper:#f4ecdc; --paper-2:#ebe0cb; --card:#fbf6ea;
  --line:#dccdb0; --line-soft:#e8dcc6;
  --ink:#2b2119; --ink-2:#46382b; --ink-3:#77654f; --ink-4:#9f8e77;
  --blue:#2f4f3a; --blue-deep:#223b2b; --blue-soft:#dfe7dc; --blue-tint:#eef2ea;
  --ok:#3e6b47; --ok-bg:#e1ecdf; --warn:#98702a; --warn-bg:#f3e6c8; --err:#9b3b2e; --err-bg:#f4ddd4;
  --star:#b48a3a; --star-deep:#9a7630;
  --display:"Libre Baskerville",Georgia,serif; --read:"Libre Baskerville",Georgia,serif; --ui:"Source Sans 3",system-ui,sans-serif;
  --r-sm:3px; --r-md:4px; --r-lg:6px;
  --sh-1:none; --sh-2:0 6px 18px rgba(43,33,25,.12); --sh-3:0 18px 44px rgba(0,0,0,.35);
  --topbar-bg:#241a12; --bg-img:none;
  --c-bg:#fbf6ea; --c-bd:1px solid #dccdb0; --c-sh:0 1px 2px rgba(43,33,25,.06); --c-sh-h:0 8px 20px rgba(43,33,25,.12); --c-tf-h:none;
  --b-sh:none; --b-sh-h:none; --b-tf-h:none;
}
html[data-theme="grandebib"] body{background-color:#1d150e;}
html[data-theme="grandebib"] body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(rgba(20,14,8,.55),rgba(20,14,8,.7)),url("../themes/grandebib/bg.webp") center/cover no-repeat;}
/* Barre du haut en bois sombre */
html[data-theme="grandebib"] .topbar{border-bottom:1px solid #4a3622;backdrop-filter:none;}
html[data-theme="grandebib"] .brand-badge{background:#2f4f3a;border-radius:3px;box-shadow:inset 0 0 0 1px #b48a3a;}
html[data-theme="grandebib"] .brand-txt strong{font-family:var(--display);color:#f1e6d0;}
html[data-theme="grandebib"] .brand-txt small{color:#bfa987;}
html[data-theme="grandebib"] .topbar-out{color:#e3d4b8;}
html[data-theme="grandebib"] .topbar-zone{background:rgba(255,255,255,.08);color:#f1e6d0;}
html[data-theme="grandebib"] .topbar :where(.theme-btn,.burger,.zoneswitch-btn,.topbar-back){background:transparent;border-color:rgba(214,190,150,.45);color:#f1e6d0;}
html[data-theme="grandebib"] .topbar .burger span{background:#f1e6d0;}
html[data-theme="grandebib"] .topbar .zoneswitch-cur{color:#f1e6d0;}
/* Rayonnages */
html[data-theme="grandebib"] .sidebar{border-right:none;
  background-image:linear-gradient(rgba(26,18,11,.88) 0%,rgba(26,18,11,.8) 50%,rgba(26,18,11,.6) 100%),url("../themes/grandebib/side.webp");
  background-size:cover,cover;background-position:center,center;}
html[data-theme="grandebib"] .sidebar-label{color:#c9a868;letter-spacing:.12em;}
html[data-theme="grandebib"] .sidebar a{color:#eadcc2;}
html[data-theme="grandebib"] .sidebar a:hover{background:rgba(255,240,210,.09);color:#fff;}
html[data-theme="grandebib"] .sidebar a.is-active{background:rgba(255,240,210,.15);color:#fff;box-shadow:inset 3px 0 0 #c9a868;}
html[data-theme="grandebib"] .sidebar a.is-locked{color:#9d8b73;}
html[data-theme="grandebib"] .sidebar-foot,html[data-theme="grandebib"] .sidebar-foot .mute{color:#b39e7e;}
/* La grande feuille posée sur le bureau */
@media (min-width:901px){
  html[data-theme="grandebib"] .content{margin:26px 30px 40px;background:#f4ecdc;border-radius:4px;box-shadow:0 18px 50px rgba(0,0,0,.45);}
}
@media (max-width:900px){
  html[data-theme="grandebib"] .content{margin:10px;background:#f4ecdc;border-radius:4px;box-shadow:0 10px 30px rgba(0,0,0,.4);}
}
html[data-theme="grandebib"] .page-head{
  background-image:linear-gradient(90deg,rgba(24,17,10,.2) 0%,rgba(24,17,10,.75) 55%,rgba(24,17,10,.9) 100%),url("../themes/grandebib/banner.webp");background-position:left center;}
html[data-theme="grandebib"] .page-head>*{margin-left:auto;text-align:right;}
html[data-theme="grandebib"] .page-head :is(.page-title,.page-sub){color:#f6ecd8;}
html[data-theme="grandebib"] .page-head .eyebrow{color:#d8b877;}
html[data-theme="grandebib"] h1,html[data-theme="grandebib"] h2,html[data-theme="grandebib"] h3{font-weight:700;letter-spacing:-.01em;}
html[data-theme="grandebib"] .eyebrow,html[data-theme="grandebib"] .reader-eyebrow{color:#2f4f3a;}
html[data-theme="grandebib"] .section-title{font-size:1.35rem;border-bottom:1px solid #b9a680;}
html[data-theme="grandebib"] .stat b{font-family:var(--display);color:#2f4f3a;}
html[data-theme="grandebib"] .mod-card{border-top:3px solid #2f4f3a;}
html[data-theme="grandebib"] .mod-card-num{font-family:var(--display);font-style:italic;color:#8a6a33;}
html[data-theme="grandebib"] .mod-card-num::before{content:"Vol. ";}
html[data-theme="grandebib"] .lesson-num{font-family:var(--display);color:#2f4f3a;}
html[data-theme="grandebib"] .reader-head{border-bottom:1px solid #b9a680;}
html[data-theme="grandebib"] .reader-intro::first-letter{color:#2f4f3a;}
html[data-theme="grandebib"] .reader-sec{border-left:2px solid #e2d5bb;}
html[data-theme="grandebib"] .reader-sec p,html[data-theme="grandebib"] .reader-sec li{font-size:1.02rem;line-height:1.85;}
html[data-theme="grandebib"] .reader-sec>h2 .sec-num{color:#8a6a33;}
html[data-theme="grandebib"] .reader-schema{background:#f8f1e2;border:1px solid #dccdb0;border-left:4px solid #2f4f3a;}
html[data-theme="grandebib"] .reader-schema h4{color:#2f4f3a;}
html[data-theme="grandebib"] .q-opt:hover:not(:disabled){background:#eef2ea;border-color:#2f4f3a;}
html[data-theme="grandebib"] .q-expl{background:#f8f1e2;border-left:3px solid #2f4f3a;}


/* Menu Thème : trois onglets (les intitulés peuvent passer sur deux lignes) */
.theme-tabs{grid-template-columns:repeat(3,1fr);}
.theme-tab{white-space:normal;line-height:1.2;padding:8px 4px;font-size:.78rem;}
