/*
Theme Name: Cours Valéry
Description: Le site de cours de français de B. Valéry, dans l'univers de 1YearHero : bannières de niveau, carte de l'année et journal de quête.
Version: 1.7.3
Requires PHP: 8.1
Author: B. Valéry
Text Domain: cours-valery
*/

@font-face { font-family: "Atkinson Hyperlegible"; src: url("assets/fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("assets/fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("assets/fonts/Cinzel-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("assets/fonts/Cinzel-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("assets/fonts/PlayfairDisplay-BlackItalic.woff2") format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }

:root {
  --nuit: #221340;
  --nuit-claire: #2A1B4D;
  --or: #F5C84C;
  --velin: #F4ECDD;
  --parchemin: #FBF7EE;
  --brun: #7A541A;
  --filet: #C9A35A;
  --texte: #2B2140;
  --doux: #5D5470;
  --bleu: #2F62D9;
  --rouge: #A8321F;
  --essentiel: #A61B1B;
  --essentiel-fond: #FBE9E4;
  --titre: "Cinzel", Georgia, serif;
  --corps: "Atkinson Hyperlegible", Verdana, sans-serif;
  --etoiles: radial-gradient(circle at 20% 30%, rgba(255, 230, 166, .9) 1px, transparent 1.6px), radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .7) 1px, transparent 1.6px), radial-gradient(circle at 45% 85%, rgba(255, 255, 255, .5) 1px, transparent 1.6px);
  --etoiles-taille: 130px 110px, 190px 170px, 240px 200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--corps); font-size: 18px; line-height: 1.55; color: var(--texte); background: var(--velin); overflow-x: clip; }
img { max-width: 100%; height: auto; }
a { color: var(--brun); }
a:hover { color: var(--bleu); }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.25; text-wrap: balance; }

.cadre { max-width: 1240px; margin: 0 auto; padding-left: clamp(16px, 3vw, 32px); padding-right: clamp(16px, 3vw, 32px); }
.bloc { padding-top: 40px; padding-bottom: 12px; display: flex; flex-direction: column; gap: 18px; }
.bloc-serre { padding-top: 28px; padding-bottom: 0; gap: 12px; }
main > .bloc:last-child, main > div.bloc:last-child { padding-bottom: 48px; }
.invisible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.evitement { position: absolute; left: 8px; top: -60px; z-index: 10; padding: 10px 16px; color: var(--nuit); background: var(--or); border-radius: 8px; }
.evitement:focus { top: 8px; }
.icone { flex: none; }

.contenu :is(h2, h3)[id] { scroll-margin-top: 48px; }

/* En-tête */
.entete { background-color: var(--niveau); transition: background-color .25s ease; }
.entete-cadre { padding-top: 8px; padding-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 28px; }
.logo { display: inline-flex; flex-direction: column; align-items: flex-start; padding-top: 5px; color: var(--or); text-decoration: none; }
.logo-cours { margin-left: 2px; font-family: var(--titre); font-weight: 600; font-size: 12px; line-height: 1; letter-spacing: .46em; text-transform: uppercase; color: #fff; }
.logo-nom { padding: 0 .2em .18em 0; margin-bottom: -.14em; font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 900; font-size: 40px; line-height: 1.02; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo-nom { background: linear-gradient(100deg, #FFE9A8 0%, #F5C84C 21%, #FFF3C9 29%, #E0AC36 50%, #FFE9A8 71%, #F5C84C 100%) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}
.logo:hover { color: var(--or); }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; }
.menu > a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 700; color: #fff; text-decoration: none; }
.menu > a:hover { color: var(--or); }
.menu > a.menu-jeu { min-height: 38px; margin-left: 8px; padding: 0 14px; color: var(--nuit); background: var(--or); border-radius: 10px; }
.menu > a.menu-jeu:hover { color: var(--nuit); filter: brightness(1.08); }
.menu > a.menu-jeu::after { display: none; }
.recherche { position: relative; }
.lecture { position: relative; }
.lecture summary { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-family: var(--corps); font-weight: 700; font-size: 20px; color: var(--or); cursor: pointer; list-style: none; }
.lecture summary::-webkit-details-marker { display: none; }
.lecture-panneau { position: absolute; right: 0; z-index: 60; display: flex; flex-direction: column; gap: 12px; width: min(340px, 92vw); max-height: calc(100vh - 90px); overflow-y: auto; padding: 14px; color: var(--texte); background: #FBF7EE; border: 1.5px solid var(--filet); border-radius: 12px; box-shadow: 0 12px 28px rgba(34, 19, 64, .2); text-align: left; letter-spacing: normal; word-spacing: normal; }
.lecture-partie { display: flex; flex-direction: column; gap: 8px; }
.lecture-partie + .lecture-partie { padding-top: 12px; border-top: 1.5px dashed var(--filet); }
.lecture-titre { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 18px; }
.lecture-choix { display: flex; align-items: center; gap: 6px; }
.lecture-choix > span { flex: 0 0 64px; font-size: 15px; font-weight: 700; color: var(--doux); }
.lecture-choix button { flex: 1; min-height: 44px; padding: 0 4px; font: inherit; font-size: 15px; font-weight: 700; color: var(--texte); background: #fff; border: 1.5px solid var(--filet); border-radius: 8px; cursor: pointer; }
.lecture-tailles button:nth-of-type(2) { font-size: 1.15em; }
.lecture-tailles button:nth-of-type(3) { font-size: 1.3em; }
.lecture-choix:not(.lecture-fonds) button[aria-pressed="true"] { color: #fff; background: var(--niveau, var(--nuit)); border-color: var(--niveau, var(--nuit)); }
.lecture-fonds button { flex: 0 0 36px; min-height: 36px; height: 36px; padding: 0; border-radius: 50%; }
.lecture-fonds [data-lecture-fond="creme"] { background: #FFF8E1; }
.lecture-fonds [data-lecture-fond="jaune"] { background: #FFF3A8; }
.lecture-fonds [data-lecture-fond="bleu"] { background: #DCEBFA; }
.lecture-fonds [data-lecture-fond="vert"] { background: #DDF2DF; }
.lecture-fonds [data-lecture-fond="rose"] { background: #FBE3EC; }
.lecture-fonds button[aria-pressed="true"] { color: var(--texte); border: 3px solid var(--nuit); box-shadow: 0 0 0 2px #fff inset; }
.lecture-case { display: flex; align-items: flex-start; gap: 10px; min-height: 40px; font-size: 15px; line-height: 1.35; cursor: pointer; }
.lecture-case input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--niveau, var(--nuit)); }
.lecture-exemple { margin-left: 4px; font-weight: 700; }
.lecture-ecouter { min-height: 48px; font: inherit; font-weight: 700; color: var(--nuit); background: var(--or); border: 0; border-radius: 8px; cursor: pointer; }
.lecture-aide { margin: -2px 0 0; font-size: 14px; color: var(--doux); }
.lecture-zero { align-self: center; min-height: 40px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--doux); background: none; border: 0; text-decoration: underline; cursor: pointer; }

/* Taille et texte aéré (mise en forme recommandée pour les élèves dys). */
html.lecture-taille-1 main { zoom: 1.15; }
html.lecture-taille-2 main { zoom: 1.3; }
html.lecture-espace main { letter-spacing: .06em; word-spacing: .2em; }
html.lecture-espace main :is(p, li, td, dd, blockquote, figcaption, .jeu-question) { line-height: 1.9; text-align: left !important; hyphens: none; }
html.lecture-espace main :is(p, li, dd, blockquote) { max-width: 62ch; }
html.lecture-espace main :is(p, li, td, dd) + :is(p, li) { margin-top: .9em; }
html.lecture-espace main :is(em, i, cite):not(.cv-syl *) { font-style: normal; font-weight: 700; }

/* Syllabes en couleur, une sur deux. */
.syl-a { color: #B3261E; }
.syl-b { color: #1F4FC2; }
main a .syl-a, main a .syl-b { text-decoration: inherit; }
main :is(.bouton, [class*="bouton"], .reviser-choix button[data-etat]) :is(.syl-a, .syl-b) { color: inherit; }

/* Fonds colorés : ils remplacent le vélin et le parchemin partout où ils servent. */
html[data-cv-fond="creme"] { --velin: #FFF4D6; --parchemin: #FFF8E1; }
html[data-cv-fond="jaune"] { --velin: #FFEC8A; --parchemin: #FFF3A8; }
html[data-cv-fond="bleu"] { --velin: #CFE2F7; --parchemin: #DCEBFA; }
html[data-cv-fond="vert"] { --velin: #CDEBD0; --parchemin: #DDF2DF; }
html[data-cv-fond="rose"] { --velin: #F7D5E1; --parchemin: #FBE3EC; }
html[data-cv-fond] body { background-image: none; }

/* La règle de lecture : deux voiles laissent une bande claire autour de la ligne lue. */
.regle-lecture > div { position: fixed; z-index: 55; left: 0; right: 0; background: rgba(20, 12, 40, .5); pointer-events: none; }
.regle-lecture > div:first-child { top: 0; }
.regle-lecture > div:last-child { bottom: 0; }

/* Lire au doigt, et ce qui est en train d'être lu. */
html.lecture-doigt main :is(h1, h2, h3, h4, p, li, td, th, blockquote, figcaption, dt, dd, .jeu-question) { cursor: pointer; }
html.lecture-doigt main :is(p, li, td, blockquote, dd):hover { background: rgba(245, 200, 76, .16); border-radius: 4px; }
.cv-lu { background: rgba(245, 200, 76, .32) !important; border-radius: 4px; box-shadow: 0 0 0 4px rgba(245, 200, 76, .32); }
::highlight(cv-mot) { background: #F5C84C; color: #221340; }
.lecteur { position: fixed; z-index: 70; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); display: flex; gap: 8px; padding: 8px; background: var(--nuit); border: 2px solid var(--or); border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transform: translateX(-50%); }
.lecteur[hidden] { display: none; }
.lecteur button { min-height: 48px; padding: 0 18px; white-space: nowrap; font: inherit; font-weight: 700; color: var(--nuit); background: var(--or); border: 0; border-radius: 999px; cursor: pointer; }
.lecteur button + button { color: #fff; background: transparent; border: 1.5px solid rgba(255, 255, 255, .5); }
.cv-haut-parleur { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 0 -6px; color: var(--nuit); background: var(--or); border: 0; border-radius: 50%; cursor: pointer; }
.cv-haut-parleur + .jeu-question { margin-top: 0; }

html.lecture-calme *, html.lecture-calme *::before, html.lecture-calme *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.lecture-calme canvas[aria-hidden="true"] { display: none; }
.recherche summary { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--or); cursor: pointer; list-style: none; }
.recherche summary::-webkit-details-marker { display: none; }
.recherche form { position: absolute; right: 0; z-index: 5; display: flex; gap: 6px; width: min(340px, 86vw); padding: 10px; background: var(--parchemin); border: 1.5px solid var(--filet); border-radius: 12px; }
.recherche input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 10px; font: inherit; border: 1.5px solid var(--brun); border-radius: 8px; }
.recherche button { min-height: 44px; padding: 0 12px; font: inherit; font-weight: 700; color: #fff; background: var(--niveau); border: 0; border-radius: 8px; cursor: pointer; }

/* Bandeau de page */
.heros { color: #fff; background-color: var(--niveau); background-image: var(--etoiles); background-size: var(--etoiles-taille); transition: background-color .25s ease; }
.heros a { color: #fff; }
.heros-pile { padding-top: clamp(20px, 3vw, 36px); padding-bottom: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 22px; }
.heros-pile-serree { padding-top: 14px; padding-bottom: 28px; gap: 14px; }
.surtitre { margin: 0 0 6px; font-weight: 700; color: var(--or); }
.titre-geant { margin: 0; font-family: var(--titre); font-weight: 700; font-size: clamp(32px, 5vw, 58px); line-height: 1.14; }
.titre-grand { margin: 0; font-family: var(--titre); font-weight: 700; font-size: clamp(28px, 4vw, 44px); line-height: 1.18; }
.titre-section { margin: 0; font-size: clamp(26px, 3.2vw, 32px); }
.ariane { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 16px; }
.heros-niveau-ligne { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.heros-niveau-ligne img { width: auto; height: clamp(110px, 16vw, 170px); margin-bottom: -28px; }

/* Bannières */
.dialogue { display: flex; flex-wrap: wrap; align-items: stretch; gap: 22px 36px; }
.dialogue-niveaux { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.dialogue-choix { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 22px; color: var(--texte); }
.etape-dialogue { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 22px; color: var(--or); }
.etape-dialogue-sombre { color: var(--texte); }
.bannieres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(6px, 1.4vw, 16px); }
.banniere { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; color: #fff; text-decoration: none; transition: translate .16s ease; }
.banniere:hover { color: #fff; translate: 0 -4px; }
.banniere-tissu { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 10px 4px 26px; border-top: 6px solid transparent; text-align: center; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%); }
.banniere[aria-current] .banniere-tissu { border-top-color: var(--or); }
.banniere-niveau { font-family: var(--titre); font-weight: 700; font-size: clamp(28px, 4vw, 46px); line-height: 1.1; }
.banniere-detail { font-size: 16px; line-height: 1.3; }
.banniere-nom { font-size: 18px; font-weight: 700; }
.banniere-extra { min-height: 1.3em; font-size: 15px; font-weight: 700; color: var(--or); }
.banniere img { width: auto; height: clamp(92px, 17vw, 210px); object-fit: contain; opacity: .72; transform-origin: bottom; transition: opacity .16s ease, scale .16s ease; }
.banniere[aria-current] img { opacity: 1; scale: 1.06; }

/* Parchemin */
.carte-parchemin { position: relative; background: var(--parchemin); border: 1.5px solid var(--filet); border-radius: 14px; box-shadow: 0 0 0 4px rgba(201, 163, 90, .18); }
.maitre { display: flex; align-items: center; gap: 12px; }
.maitre-icone { display: flex; align-items: center; justify-content: center; flex: none; width: 52px; height: 52px; color: var(--or); background: var(--brun); border: 2px solid var(--filet); border-radius: 12px; }
.maitre-nom { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 19px; line-height: 1.25; }
.maitre-rang { margin: 0; font-size: 16px; color: var(--doux); }
.choix { display: flex; flex-direction: column; gap: 6px; }
.heros .choix a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 6px 12px; font-weight: 700; color: var(--texte); text-decoration: none; background: #fff; border: 1.5px solid var(--filet); border-radius: 10px; }
.heros .choix a:hover { color: var(--bleu); border-color: var(--bleu); }

/* Reprise et code de classe */
.heros a.reprise { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; min-height: 72px; padding: 12px 20px; color: var(--nuit); background: var(--or); border-radius: 14px; text-decoration: none; transition: translate .16s ease; }
.heros a.reprise:hover { color: var(--nuit); translate: 0 -2px; }
.reprise-texte { min-width: 0; display: flex; flex-direction: column; }
.reprise-classe { font-size: 16px; font-weight: 700; }
.reprise-titre { font-family: var(--titre); font-weight: 700; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.25; }
.reprise-action { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 19px; }
.bandeau-classe { margin: 0; padding: 14px 20px; font-weight: 700; color: var(--nuit); background: var(--or); border-radius: 14px; }
.bandeau-code { padding: 0 20px; color: var(--nuit); background: var(--or); border-radius: 14px; }
.bandeau-code summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; font-family: var(--titre); font-weight: 700; font-size: clamp(20px, 2.4vw, 26px); cursor: pointer; list-style: none; }
.bandeau-code summary::-webkit-details-marker { display: none; }
.bandeau-code[open] { padding-bottom: 18px; }
.bandeau-code .cvc-code { max-width: 420px; }

.cvc-code { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.cvc-code label { font-family: var(--titre); font-weight: 700; font-size: 20px; }
.cvc-code input[type="text"] { width: 100%; height: 50px; padding: 0 12px; font: inherit; color: var(--texte); background: #fff; border: 1.5px solid var(--brun); border-radius: 10px; }
.cvc-code button { min-height: 50px; padding: 0 18px; font: inherit; font-weight: 700; color: #fff; background: var(--niveau); border: 0; border-radius: 10px; cursor: pointer; }
.cvc-erreur { margin: 0; font-weight: 700; color: var(--rouge); }
.cvc-sortie button { min-height: 44px; padding: 0 8px; font: inherit; font-weight: 700; color: var(--brun); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.cvc-titre { margin: 0 0 6px; font-family: var(--titre); font-weight: 700; font-size: 24px; line-height: 1.25; }
.cvc-verrou > p { margin-top: 0; }
.porte { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; max-width: 760px; padding: 26px; }
.porte img { flex: none; width: auto; height: 190px; }
.porte-texte { flex: 1 1 280px; min-width: 0; }

/* Rattrapage */
.rattrapage { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.rattrapage a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 14px; font-weight: 700; color: var(--texte); text-decoration: none; background: #fff; border: 1px solid #E2D8C4; border-radius: 10px; }

/* Minute et palmarès */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 24px; }
.minute, .palmares { display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 16px; }
.minute { color: var(--nuit); background: var(--or); }
.minute h2 { margin: 0; font-size: clamp(24px, 3vw, 30px); }
.minute-surtitre { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 24px; }
.minute-choix { display: flex; flex-wrap: wrap; gap: 10px; }
.minute-choix button { min-height: 50px; padding: 0 20px; font: inherit; font-weight: 700; color: var(--texte); background: var(--parchemin); border: 1.5px solid var(--nuit); border-radius: 10px; cursor: pointer; }
.minute-choix button[data-etat="juste"] { color: #fff; background: #0F7A5C; }
.minute-choix button[data-etat="faux"] { color: #fff; background: var(--rouge); }
.minute-retour { margin: 0; min-height: 56px; font-weight: 700; }
.minute-encore { align-self: flex-start; min-height: 48px; padding: 0 18px; font: inherit; font-weight: 700; color: var(--or); background: var(--nuit); border: 0; border-radius: 10px; cursor: pointer; }
.minute-encore[hidden] { display: none; }
.palmares { justify-content: space-between; align-items: flex-start; gap: 20px; color: #fff; background-color: var(--niveau); background-image: var(--etoiles); background-size: var(--etoiles-taille); transition: background-color .25s ease; }
.palmares .icone { color: var(--or); }
.palmares p { margin: 6px 0 0; font-size: 20px; }

.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; font-weight: 700; text-decoration: none; border: 2px solid transparent; border-radius: 12px; transition: translate .16s ease; }
.bouton:hover { translate: 0 -2px; }
.bouton-or, .bouton-or:hover { color: var(--nuit); background: var(--or); }
.bouton-contour, .bouton-contour:hover { color: #fff; background: transparent; border-color: var(--or); }
.bouton-niveau, .bouton-niveau:hover { color: #fff; background: var(--niveau); }
.boutons { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }

/* Classes et pratique */
.grille-classes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.fiche-classe, .fiche-pratique { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: #fff; border: 1px solid #E2D8C4; border-radius: 12px; }
.fiche-classe h3, .fiche-pratique h3 { margin: 0; font-size: 22px; }
.fiche-classe p, .fiche-pratique p { margin: 0; }
.fiche-classe p:empty { display: none; }
.grille-classe-seule { grid-template-columns: 1fr; }
.espace-bloc { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid #EFE7D6; }
.espace-bloc:first-child { padding-top: 0; border-top: 0; }
.espace-bloc h4 { margin: 0; font-family: var(--titre, inherit); font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: #7A5B12; }
.espace-controles, .espace-seances { margin: 0; padding-left: 1.2em; }
.espace-controles li, .espace-seances li { margin: 2px 0; }
.espace-plan summary { min-height: 44px; line-height: 44px; font-weight: 700; cursor: pointer; }
.espace-plan .plan-cadre { margin-top: 8px; }
.fiche-classe-regler { margin-top: auto; padding-top: 8px; font-size: 14px; }
.bandeau-controle { display: flex; align-items: center; gap: 10px; color: #fff; background: #8E2A1E; }
.bandeau-controle strong { color: #FFE08A; }
.heros a.bandeau-revoir { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 18px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .14); border: 2px dashed var(--or); border-radius: 14px; text-decoration: none; }
.heros a.bandeau-revoir[hidden] { display: none; }
.heros a.bandeau-revoir span { flex: 1; }
.heros a.bandeau-revoir:hover { background: rgba(255, 255, 255, .22); }
#infos .cvc-sortie { align-self: flex-start; }
.fiche-pratique ul { margin: 0; padding-left: 20px; }
.chapo { max-width: 44em; display: flex; flex-direction: column; gap: 8px; }
.chapo p { margin: 0; }
.grille-pratique { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }

.unyearhero { margin-top: 40px; color: #fff; background-color: var(--nuit); background-image: var(--etoiles); background-size: var(--etoiles-taille); }
.unyearhero-cadre { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.unyearhero-texte { flex: 999 1 460px; min-width: 0; max-width: 40em; display: flex; flex-direction: column; gap: 12px; }
.unyearhero-texte .titre-section { color: var(--or); font-family: var(--titre); }
.unyearhero-texte p { margin: 0; }
.unyearhero-heros { flex: 1 1 260px; display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.unyearhero-heros img { width: auto; height: 190px; }

/* Carte de l'année */
.carte { overflow-x: auto; border: 2px solid var(--filet); border-radius: 16px; }
.carte-plan { position: relative; width: 100%; height: 340px; background: var(--parchemin); }
.carte-regions { position: absolute; inset: 0; display: flex; }
.carte-regions > div { min-width: 0; padding: 10px 14px; hyphens: auto; overflow-wrap: anywhere; font-family: var(--titre); font-weight: 700; font-size: 16px; line-height: 1.2; color: var(--texte); }
.carte-plan svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.etape { position: absolute; translate: -50% -28px; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 112px; color: var(--texte); text-align: center; text-decoration: none; transition: translate .16s ease; }
a.etape:hover { color: var(--texte); translate: -50% -32px; }
.etape-numero { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; font-family: var(--titre); font-weight: 700; font-size: 18px; color: #fff; background: var(--niveau); border: 3px solid var(--parchemin); border-radius: 50%; }
.etape-nom { font-size: 15px; font-weight: 700; line-height: 1.2; }
.etape-ici .etape-numero { width: 64px; height: 64px; font-size: 22px; color: var(--nuit); background: var(--or); border-color: var(--niveau); box-shadow: 0 0 0 6px rgba(245, 200, 76, .45); }
.etape-venir .etape-numero { color: var(--doux); background: #E8DFCB; }

/* Séquence */
.colonnes { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 28px 36px; }
.colonne-principale { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.journal { padding: 18px 14px; }
.journal-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 16px; padding: 0 12px 6px; }
.journal-tete h2 { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 24px; }
.journal-tete a { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; }
.journal-vide { margin: 0; padding: 12px; }
.journal-liste { margin: 0; padding: 0; list-style: none; }
.seance { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 12px; color: var(--texte); text-decoration: none; border-radius: 12px; }
a.seance:hover { color: var(--texte); background: #F3E9D2; }
.seance-derniere, a.seance-derniere:hover { background: var(--or); }
.seance-fermee { color: var(--doux); }
.seance-texte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.seance-nom { font-weight: 700; font-size: 19px; line-height: 1.3; }
.seance-note { font-size: 15px; font-weight: 700; }
.seance-note-boss { color: var(--rouge); }
.medaille { display: flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; font-family: var(--titre); font-weight: 700; font-size: 19px; color: #fff; background: var(--niveau); border-radius: 50%; }
.medaille-fermee { color: var(--doux); background: #E8DFCB; }
.medaille-boss { color: #fff; background: var(--rouge); }
.compagnon { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; text-align: center; }
.compagnon img { width: auto; height: 210px; object-fit: contain; }
.compagnon-classe { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 24px; }
.progression { align-self: stretch; display: flex; flex-direction: column; gap: 6px; }
.progression p { margin: 0; font-weight: 700; }
.progression-barre { height: 14px; background: #E8DFCB; border-radius: 8px; overflow: hidden; }
.progression-barre > div { height: 100%; background: var(--niveau); }

/* Réviser */
.reviser-chapo { margin: 4px 0 0; }
.reviser-note { margin: 0; padding: 12px 16px; background: #F3E9D2; border-left: 4px solid var(--brun); border-radius: 8px; }
.reviser-attente { display: flex; align-items: center; gap: 12px; margin: 0; padding: 16px 18px; font-weight: 700; color: var(--doux); background: var(--parchemin); border: 1.5px dashed var(--filet); border-radius: 12px; }
.reviser-portes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.reviser-porte { display: flex; align-items: center; gap: 14px; min-height: 92px; padding: 14px 16px; font: inherit; text-align: left; color: var(--texte); background: var(--parchemin); border: 2px solid var(--filet); border-radius: 14px; cursor: pointer; }
.reviser-porte:hover:not(:disabled), .reviser-porte[aria-pressed="true"] { border-color: var(--niveau); box-shadow: 0 0 0 2px var(--niveau); }
.reviser-porte:disabled { color: var(--doux); opacity: .7; cursor: default; }
.reviser-porte-icone { display: flex; align-items: center; justify-content: center; flex: none; width: 52px; height: 52px; color: #fff; background: var(--niveau); border-radius: 50%; }
.reviser-porte-texte { min-width: 0; display: flex; flex-direction: column; }
.reviser-porte-texte strong { font-family: var(--titre); font-size: 19px; line-height: 1.25; }
.reviser-porte-texte small { font-size: 16px; }
.reviser-porte-boss { color: #fff; background-color: var(--nuit); background-image: var(--etoiles); background-size: var(--etoiles-taille); border-color: var(--or); }
.reviser-porte-boss .reviser-porte-icone { color: var(--nuit); background: var(--or); }
.reviser-porte-boss:hover:not(:disabled), .reviser-porte-boss[aria-pressed="true"] { border-color: var(--or); box-shadow: 0 0 0 2px var(--or); }
.reviser-scene { display: flex; flex-direction: column; gap: 14px; padding: clamp(16px, 3vw, 26px); background: var(--parchemin); border: 1.5px solid var(--filet); border-radius: 16px; scroll-margin-top: 16px; }
.reviser-scene[hidden] { display: none; }
.reviser-scene:focus { outline: none; }
.reviser-scene[data-scene="boss"] { padding: 0; overflow: hidden; border-color: var(--or); }
.reviser-scene h3 { margin: 0; font-family: var(--titre); font-size: 24px; }
.reviser-zone { display: flex; flex-direction: column; gap: 14px; }
.reviser-filtre { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 700; }
.reviser-filtre select { flex: 1 1 240px; min-width: 0; max-width: 100%; min-height: 46px; padding: 0 10px; font: inherit; font-weight: 400; color: var(--texte); background: #fff; border: 1.5px solid var(--filet); border-radius: 10px; }
.reviser-compteur { margin: 0; font-weight: 700; color: var(--doux); }
.reviser-consigne { margin: 0; text-align: center; }
.reviser-question { margin: 0; font-size: clamp(20px, 2.6vw, 24px); font-weight: 700; line-height: 1.35; }
.reviser-brouillon { display: inline-block; margin-right: 8px; padding: 1px 8px; font-size: 14px; font-weight: 700; color: #fff; vertical-align: middle; background: var(--brun); border-radius: 8px; }
.reviser-choix { display: flex; flex-direction: column; gap: 10px; }
.reviser-choix button { min-height: 52px; padding: 8px 18px; font: inherit; font-weight: 700; text-align: left; color: var(--texte); background: #fff; border: 1.5px solid var(--nuit); border-radius: 10px; cursor: pointer; }
.reviser-choix button:hover:not(:disabled) { background: #F3E9D2; }
.reviser-choix button:disabled { cursor: default; opacity: 1; }
.reviser-choix button[data-etat="juste"] { color: #fff; background: #0F7A5C; border-color: #0F7A5C; }
.reviser-choix button[data-etat="faux"] { color: #fff; background: var(--rouge); border-color: var(--rouge); }
.reviser-retour { margin: 0; min-height: 1.5em; font-weight: 700; }
.reviser-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.reviser-action { min-height: 50px; padding: 0 20px; font: inherit; font-weight: 700; color: #fff; background: var(--niveau); border: 0; border-radius: 10px; cursor: pointer; }
.reviser-action-seconde { color: var(--texte); background: #E8DFCB; }
.reviser-bilan { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 24px; }
.carte-memoire { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 220px; padding: 22px; font: inherit; font-size: clamp(20px, 2.6vw, 24px); font-weight: 700; line-height: 1.4; text-align: center; color: #fff; background: var(--niveau); border: 0; border-radius: 16px; cursor: pointer; }
.carte-notion { font-size: 15px; font-weight: 700; letter-spacing: .03em; opacity: .85; }
.carte-rappel { font-size: 16px; color: var(--doux); }
.controle-partie { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 20px; color: var(--niveau); }
.controle-note { margin: 0; font-family: var(--titre); font-weight: 700; font-size: clamp(38px, 7vw, 54px); line-height: 1.1; color: var(--niveau); }
.controle-parties { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.controle-parties li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 14px; padding: 6px 0; border-bottom: 1px solid var(--filet); }
.controle-correction { display: grid; gap: 12px; }
.controle-correction h4 { margin: 8px 0 0; font-family: var(--titre); font-size: 20px; }
.controle-correction p { margin: 0; }
.controle-enonce { color: var(--doux); }
.copie-partie { display: grid; gap: 14px; padding-top: 12px; border-top: 1px solid var(--filet); }
.copie-question { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.copie-question > label, .copie-question > legend { padding: 0; font-weight: 700; line-height: 1.4; }
.copie-question textarea {
  width: 100%; min-height: 112px; padding: 10px 12px; font: inherit; font-size: 17px; line-height: 1.5; color: var(--texte, #2B2140);
  background: #fff; border: 1px solid var(--filet); border-radius: 8px; resize: vertical;
}
.copie-question textarea:focus-visible { outline: 3px solid var(--niveau); outline-offset: 1px; }
.copie-choix { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.copie-choix input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--niveau); }
.copie-avis:empty { display: none; }
.copie-avis { display: grid; gap: 8px; padding: 12px 14px; background: #fff; border: 1px solid var(--filet); border-radius: 8px; }
.copie-avis p { margin: 0; font-weight: 700; }
.copie-ligne { display: grid; gap: 8px; }
.copie-ligne p { margin: 0; }
.copie-reponse, .copie-corrige { padding: 8px 12px; border-radius: 8px; }
.copie-reponse { background: #fff; border: 1px solid var(--filet); }
.copie-reponse p { white-space: pre-wrap; overflow-wrap: anywhere; }
.copie-corrige { background: color-mix(in srgb, var(--niveau) 10%, #fff); border-left: 4px solid var(--niveau); }
.copie-reponse small, .copie-corrige small { display: block; font-weight: 700; color: var(--doux); }
.copie-verdicts { display: flex; flex-wrap: wrap; gap: 8px; }
.copie-verdicts button {
  flex: 1 1 100px; min-height: 44px; padding: 6px 12px; font: inherit; font-weight: 700; color: var(--niveau);
  background: #fff; border: 2px solid var(--niveau); border-radius: 8px; cursor: pointer;
}
.copie-verdicts button[aria-pressed="true"] { color: #fff; background: var(--niveau); }
.copie-auto { font-weight: 700; color: var(--doux); }
.carte-memoire[data-face="verso"] { font-size: clamp(18px, 2.2vw, 21px); font-weight: 400; color: var(--texte); background: #fff; border: 2px solid var(--niveau); cursor: default; animation: retourner .35s ease-out; }
@keyframes retourner { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }

.boss-arene { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: clamp(18px, 3vw, 28px); color: #fff; text-align: center; background-color: var(--nuit); background-image: var(--etoiles); background-size: var(--etoiles-taille); }
.boss-arene h3 { font-size: clamp(24px, 3.4vw, 32px); color: var(--or); }
.boss-arene p { margin: 0; }
.boss-image { flex: none; width: 200px; height: auto; color: var(--niveau); filter: drop-shadow(0 0 16px rgba(245, 200, 76, .35)); }
.boss-endormi .boss-image { opacity: .55; filter: grayscale(.6); }
.boss-vaincu .boss-image { transform: rotate(180deg); opacity: .6; }
.boss-replique { font-style: italic; font-size: 20px; min-height: 1.5em; }
.boss-medaille { font-family: var(--titre); font-weight: 700; font-size: 22px; color: var(--or); }
.boss-action { color: var(--nuit); background: var(--or); }
.boss-combat { align-items: stretch; text-align: left; }
.boss-tete { display: flex; align-items: center; gap: 16px; }
.boss-tete .boss-image { width: clamp(84px, 22vw, 150px); }
.boss-infos { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.boss-jauge { height: 16px; background: rgba(255, 255, 255, .2); border-radius: 8px; overflow: hidden; }
.boss-jauge > div { height: 100%; background: var(--rouge); transition: width .3s; }
.boss-coeurs { font-size: 28px; line-height: 1; color: var(--or); }
.boss-combat .reviser-choix button { color: var(--texte); background: var(--parchemin); border-color: var(--filet); }
.boss-combat .reviser-choix button:hover:not(:disabled) { background: #fff; }
.boss-combat .reviser-choix button[data-etat="juste"] { color: #fff; background: #0F7A5C; border-color: #fff; }
.boss-combat .reviser-choix button[data-etat="faux"] { color: #fff; background: var(--rouge); border-color: #fff; }
.boss-rappel { align-self: stretch; padding: 12px 16px; text-align: left; color: var(--texte); background: var(--parchemin); border-radius: 10px; }
.boss-rappel ul { margin: 6px 0 0; padding-left: 20px; }
.boss-touche { animation: secouer .35s; }
.boss-critique { animation: secouer .25s 2; }
.boss-attaque { animation: bondir .4s; }
@keyframes secouer { 25% { transform: translateX(-8px) rotate(-3deg); } 75% { transform: translateX(8px) rotate(3deg); } }
@keyframes bondir { 40% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) {
  .carte-memoire[data-face="verso"], .boss-touche, .boss-critique, .boss-attaque { animation: none; }
  .boss-jauge > div { transition: none; }
}

/* Niveau */
.titre-region { margin: 10px 0 0; font-family: var(--titre); font-weight: 700; font-size: 21px; }
.chapitres { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 12px; }
.chapitre { display: flex; align-items: center; gap: 14px; height: 100%; min-height: 76px; padding: 10px 14px; color: var(--texte); text-decoration: none; background: #fff; border: 1px solid #E2D8C4; border-radius: 12px; transition: translate .16s ease; }
a.chapitre:hover { color: var(--texte); border-color: var(--niveau); translate: 0 -2px; }
.chapitre-venir { color: var(--doux); background: transparent; border-style: dashed; }
.chapitre-texte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.chapitre-nom { font-weight: 700; line-height: 1.3; }
.chapitre-note { font-size: 15px; color: var(--doux); }
.annexes { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }

/* Contenu écrit dans l'éditeur */
.contenu { min-width: 0; }
.contenu-seul { max-width: 860px; width: 100%; padding: clamp(18px, 3vw, 34px); background: var(--parchemin); border: 1.5px solid var(--filet); border-radius: 14px; }
.contenu > :first-child { margin-top: 0; }
.contenu > :last-child { margin-bottom: 0; }
.contenu h2 { font-size: clamp(24px, 3vw, 30px); }
.contenu h3 { font-size: 23px; }
.contenu h4 { font-size: 20px; }
.contenu img { border-radius: 8px; }
.contenu table { width: 100%; border-collapse: collapse; background: #fff; }
.contenu th, .contenu td { padding: 8px 10px; text-align: left; vertical-align: top; border: 1px solid #D9CDB4; }
.contenu .wp-block-table { overflow-x: auto; }
.contenu figcaption { font-size: 16px; color: var(--doux); }
.contenu blockquote { margin-left: 0; padding: 4px 0 4px 16px; border-left: 4px solid var(--filet); }
.contenu iframe { max-width: 100%; }
.contenu .wp-block-button__link { font-weight: 700; color: #fff; background: var(--niveau); border-radius: 10px; }
.contenu input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), .contenu textarea, .contenu select { max-width: 100%; min-height: 44px; padding: 6px 10px; font: inherit; border: 1.5px solid var(--brun); border-radius: 8px; }

/* Ambiance de séquence : un ciel, un paysage, et les couleurs qui vont avec. */
.avec-ambiance { background: var(--fond-ambiance); }
.heros-ambiance { position: relative; overflow: hidden; background: linear-gradient(var(--ciel-haut) 45%, var(--ciel-bas)); }
.heros-ambiance .scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(150px, 22vw, 270px); }
.heros-ambiance .heros-pile { position: relative; padding-bottom: clamp(136px, 19vw, 232px); }
.heros-ambiance :is(h1, .surtitre, .devise, .ariane) { text-shadow: 0 1px 8px rgba(0, 0, 0, .55); }
.heros-ambiance-basse .scene { height: clamp(110px, 13vw, 160px); }
.heros-ambiance-basse .heros-pile { padding-bottom: clamp(96px, 11vw, 132px); }
.heros-ambiance .scene.scene-image { top: 0; height: 100%; object-fit: cover; filter: brightness(.62); }
.devise { max-width: 44em; margin: 8px 0 0; font-size: clamp(17px, 2vw, 20px); font-style: italic; }
.grande-question { position: relative; width: min(760px, calc(100% - 32px)); margin: 30px auto 0; padding: 22px 20px 16px; text-align: center; background: var(--parchemin); border: 2px solid var(--niveau); border-radius: 14px; }
.grande-question h2 { position: absolute; top: 0; left: 50%; translate: -50% -50%; margin: 0; padding: 3px 14px; font-family: var(--titre); font-size: 16px; color: #fff; white-space: nowrap; background: var(--niveau); border-radius: 999px; }
.grande-question p { margin: 0; font-size: clamp(18px, 2.2vw, 21px); font-weight: 700; }
.scene-nuage { animation: scene-derive 26s ease-in-out infinite alternate; }
.scene-flotte { animation: scene-flotte 6s ease-in-out infinite; }
.scene-tourne { animation: scene-tourne 40s linear infinite; }
.scene-etoiles { animation: scene-scintille 5s ease-in-out infinite alternate; }
@keyframes scene-derive { to { translate: 46px 0; } }
@keyframes scene-flotte { 50% { translate: 0 -6px; } }
@keyframes scene-tourne { to { rotate: 360deg; } }
@keyframes scene-scintille { to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) {
  .scene-nuage, .scene-flotte, .scene-tourne, .scene-etoiles { animation: none; }
}

/* L'essentiel : ce que le professeur a mis en rouge. Les couleurs de l'ancien thème sont toutes ramenées ici. */
.contenu :is(p, div, ul, ol).has-vivid-red-color,
.contenu :is(p, ul, ol).has-black-background-color,
.contenu :is(p, ul, ol).has-red-background-color,
.contenu :is(p, ul, ol).has-yellow-background-color,
.contenu :is(p, ul, ol).has-vivid-red-background-color {
  position: relative; margin: 14px 0; padding: 12px 16px; font-weight: 700;
  color: var(--essentiel) !important; background: var(--essentiel-fond) !important;
  border-left: 6px solid var(--essentiel); border-radius: 0 10px 10px 0;
}
.contenu :is(ul, ol).has-black-background-color { padding-left: 36px; }
.contenu .has-black-background-color :is(strong, b) { color: inherit; }
.contenu p.has-vivid-red-color:not(.has-vivid-red-color + .has-vivid-red-color)::before,
.contenu p.has-black-background-color:not(.has-black-background-color + .has-black-background-color)::before,
.contenu p.has-red-background-color::before,
.contenu p.has-yellow-background-color::before {
  content: "À retenir"; display: block; margin-bottom: 4px; font-family: var(--titre); font-size: 15px; font-weight: 700; letter-spacing: .04em;
}
.contenu p.has-vivid-red-color + p.has-vivid-red-color,
.contenu p.has-black-background-color + p.has-black-background-color,
.contenu p.has-vivid-red-background-color + p.has-vivid-red-background-color { margin-top: -14px; border-radius: 0; }
.contenu mark.has-vivid-red-color, .contenu span.has-vivid-red-color {
  padding: 1px 3px; font-weight: 700; color: var(--essentiel) !important; background: var(--essentiel-fond) !important; border-radius: 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.contenu .has-gray-background-color { padding: 6px 10px; background: #EFE7D6; border-radius: 8px; }

.voisines { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: 860px; width: 100%; }
.voisine { flex: 1 1 280px; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 14px; font-weight: 700; color: var(--texte); text-decoration: none; background: #fff; border: 1px solid #E2D8C4; border-radius: 12px; }
.voisine span { min-width: 0; }
.voisine small { display: block; font-size: 15px; color: var(--doux); }
.voisine-suivante { justify-content: flex-end; text-align: right; }

.resultats { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.resultats li { padding: 14px 16px; background: #fff; border: 1px solid #E2D8C4; border-radius: 12px; }
.resultats a { font-weight: 700; }
.resultats p { margin: 4px 0 0; }

/* Pied de page */
.pied { margin-top: 0; color: #fff; background: var(--nuit); border-top: 2px solid var(--filet); }
.pied a:not(.bouton) { color: #fff; }
.pied-colonnes { padding-top: 44px; padding-bottom: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 28px; }
.pied-colonnes > div { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pied h2 { margin: 0; font-family: var(--titre); font-size: 22px; color: var(--or); }
.pied p { margin: 0; }
.pied .bouton { min-height: 48px; font-size: 16px; }
.pied-bas { padding-bottom: 28px; font-size: 15px; }

@media (max-width: 640px) {
  .banniere-detail { display: none; }
  .menu > a { padding: 0 8px; }
}
/* Animations : tout est réservé à qui n'a pas demandé moins de mouvement. Le contenu reste lisible sans elles. */
@view-transition { navigation: auto; }
.eclat { position: fixed; z-index: 9999; width: 10px; height: 10px; pointer-events: none; background: var(--or); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
@media (prefers-reduced-motion: no-preference) {
  .heros :is(.titre-geant, .titre-grand, .surtitre, .devise) { animation: monter .6s cubic-bezier(.2, .7, .2, 1) both; }
  .heros :is(.titre-geant, .titre-grand) { animation-delay: .08s; }
  .heros .devise { animation-delay: .22s; }
  .heros-ambiance .scene { translate: 0 var(--parallaxe, 0); animation: scene-lever 1s cubic-bezier(.2, .7, .2, 1) both; }
  .grande-question { animation: derouler .6s .3s cubic-bezier(.2, .7, .2, 1) both; transform-origin: top; }

  .a-reveler { opacity: 0; transform: translateY(20px); }
  .a-reveler.revele { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--rang, 0) * 45ms); }

  .banniere { animation: monter .55s calc(var(--rang, 0) * 80ms) cubic-bezier(.2, .7, .2, 1) both; }
  .banniere-tissu { transform-origin: top; transition: transform .25s ease; }
  .banniere:hover .banniere-tissu { animation: flotter-tissu 1.2s ease-in-out infinite; }
  .banniere[aria-current] img { animation: respirer 3.4s ease-in-out infinite; }

  .etape-ici .etape-numero { animation: halo 2.2s ease-in-out infinite; }
  a.etape:hover .etape-numero { animation: bondir .4s; }
  .medaille { transition: scale .18s ease, rotate .18s ease; }
  a.seance { transition: background-color .15s ease, translate .15s ease; }
  a.seance:hover { translate: 6px 0; }
  a.seance:hover .medaille { scale: 1.12; rotate: -6deg; }
  .seance-derniere { animation: appel 2.6s ease-in-out infinite; }
  .progression-barre > div { animation: remplir 1.1s .2s cubic-bezier(.2, .7, .2, 1) both; }
  .reviser-porte { transition: translate .15s ease, box-shadow .15s ease, border-color .15s ease; }
  .reviser-porte:hover:not(:disabled) { translate: 0 -3px; }
  .reviser-porte:hover:not(:disabled) .reviser-porte-icone { animation: bondir .4s; }
  .reviser-zone, .boss-arene { animation: monter .35s ease both; }
  .reviser-choix button { transition: translate .12s ease, background-color .12s ease; }
  .reviser-choix button:hover:not(:disabled) { translate: 4px 0; }
  .reviser-choix button[data-etat="juste"], .minute-choix button[data-etat="juste"] { animation: bondir .35s; }
  .reviser-choix button[data-etat="faux"], .minute-choix button[data-etat="faux"] { animation: secouer .35s; }
  .controle-note { animation: tampon .5s cubic-bezier(.2, 1.4, .4, 1) both; }
  .boss-vaincu .boss-medaille { animation: tampon .6s .2s cubic-bezier(.2, 1.4, .4, 1) both; }
  .boss-image { animation: gronder 4s ease-in-out infinite; }

  .logo:hover .logo-nom { animation: reflet 1.1s ease; }
  .bouton { position: relative; overflow: hidden; }
  .bouton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); translate: -110% 0; pointer-events: none; }
  .bouton:hover::after { translate: 110% 0; transition: translate .6s ease; }

  .contenu .a-reveler.revele:is(.has-vivid-red-color, .has-black-background-color, .has-red-background-color, .has-yellow-background-color, .has-vivid-red-background-color) { animation: lueur 1s .3s ease; }
}
@keyframes reflet { to { background-position: -100% 0; } }
@keyframes monter { from { opacity: 0; transform: translateY(16px); } }
@keyframes scene-lever { from { opacity: 0; transform: translateY(26px); } }
@keyframes derouler { from { opacity: 0; transform: scaleY(.6); } }
@keyframes flotter-tissu { 50% { transform: skewX(-2deg) rotate(.6deg); } }
@keyframes respirer { 50% { transform: translateY(-4px); } }
@keyframes halo { 50% { box-shadow: 0 0 0 12px rgba(245, 200, 76, .18); } }
@keyframes appel { 50% { box-shadow: 0 0 0 4px rgba(245, 200, 76, .45); } }
@keyframes remplir { from { width: 0; } }
@keyframes tampon { from { opacity: 0; transform: scale(1.7) rotate(-5deg); } }
@keyframes gronder { 50% { transform: translateY(-5px) scale(1.015); } }
@keyframes lueur { 40% { box-shadow: 0 0 0 5px rgba(245, 200, 76, .55); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
/* Le décor : aurore, étoiles qui scintillent, dorures et remparts. */
body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M28 20l8 8-8 8-8-8z' fill='none' stroke='%23C9A35A' stroke-opacity='.16'/%3E%3C/svg%3E"); }
.entete { position: relative; z-index: 3; box-shadow: 0 2px 0 rgba(245, 200, 76, .6), 0 8px 18px rgba(34, 19, 64, .22); }
.menu > a { position: relative; }
.menu > a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 7px; height: 2px; background: var(--or); transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.menu > a:hover::after, .menu > a:focus-visible::after { transform: scaleX(1); }

.heros:not(.heros-ambiance) { position: relative; isolation: isolate; overflow: clip; }
.heros:not(.heros-ambiance) > * { position: relative; z-index: 1; }
.heros:not(.heros-ambiance) > .poussiere { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.heros:not(.heros-ambiance)::before { content: ""; position: absolute; inset: -30% -12%; z-index: 0; pointer-events: none; background: radial-gradient(38% 55% at 18% 28%, rgba(245, 200, 76, .22), transparent 70%), radial-gradient(42% 60% at 84% 14%, rgba(255, 255, 255, .16), transparent 70%), radial-gradient(52% 60% at 58% 100%, rgba(34, 19, 64, .55), transparent 72%); }
.heros:not(.heros-ambiance)::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: var(--etoiles); background-size: 170px 150px, 230px 210px, 290px 240px; background-position: 40px 30px; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .heros:not(.heros-ambiance) .titre-geant, .salle-fiche .heros .titre-grand { padding-bottom: .08em; background: linear-gradient(100deg, #FFF6D8 0%, #FFE08A 28%, #FFFDF2 50%, #FFD766 72%, #FFF6D8 100%) 0 0 / 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}
.banniere { filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .28)); }
.heros .choix a { transition: translate .14s ease, border-color .14s ease, color .14s ease; }
.heros .choix a:hover { translate: 0 -2px; }

.titre-section { font-family: var(--titre); }
.titre-section::after { content: ""; display: block; width: 132px; height: 14px; margin-top: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='14'%3E%3Cpath d='M0 7h54M78 7h54' stroke='%23C9A35A' stroke-width='2'/%3E%3Cpath d='M66 1l6 6-6 6-6-6z' fill='%23C9A35A'/%3E%3C/svg%3E") left center no-repeat; }
.carte-parchemin { background-image: radial-gradient(120% 80% at 50% 0%, #fff, transparent 62%); box-shadow: 0 0 0 4px rgba(201, 163, 90, .18), 0 14px 30px rgba(34, 19, 64, .1); }
.bouton-or, .bouton-or:hover { background: linear-gradient(180deg, #FFE08A, var(--or) 55%, #E7B23B); box-shadow: 0 3px 0 #B8862A, 0 8px 18px rgba(34, 19, 64, .22); }
.bouton-or:active { translate: 0 2px; box-shadow: 0 1px 0 #B8862A; }
.fiche-classe, .fiche-pratique { box-shadow: 0 8px 18px rgba(34, 19, 64, .07); transition: transform .14s ease-out, box-shadow .2s ease; }
.fiche-classe:hover, .fiche-pratique:hover { box-shadow: 0 14px 28px rgba(34, 19, 64, .13); }

.annonce-salle { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding: clamp(20px, 3vw, 30px); color: #fff; text-decoration: none; background: var(--etoiles), linear-gradient(120deg, color-mix(in srgb, var(--niveau) 70%, var(--nuit)), var(--nuit) 75%); background-size: var(--etoiles-taille), 100% 100%; border: 2px solid var(--or); border-radius: 18px; box-shadow: 0 14px 30px rgba(34, 19, 64, .25); transition: translate .16s ease, box-shadow .2s ease; }
.annonce-salle:hover { color: #fff; translate: 0 -3px; box-shadow: 0 20px 38px rgba(34, 19, 64, .34); }
.annonce-salle-texte { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.annonce-salle-texte small { font-size: 16px; font-weight: 700; color: var(--or); }
.annonce-salle-texte strong { font-family: var(--titre); font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; }
.annonce-salle-action { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 22px; font-weight: 700; color: var(--nuit); background: linear-gradient(180deg, #FFE08A, var(--or) 55%, #E7B23B); border-radius: 12px; box-shadow: 0 3px 0 #B8862A; }

/* Accueil : la minute du jour d'emblée, les raccourcis en une ligne. */
.heros-accueil .heros-pile { gap: 16px; }
.heros-accueil .dialogue-niveaux { flex: 1 1 520px; }
.heros-accueil .minute { flex: 1 1 400px; min-width: 0; padding: 20px 22px; gap: 8px; box-shadow: 0 16px 34px rgba(0, 0, 0, .28); }
.heros-accueil .minute h2 { font-size: clamp(21px, 2.4vw, 26px); }
.heros-accueil .minute-surtitre { font-size: 20px; }
.heros-accueil .minute-retour { min-height: 28px; font-size: 17px; }
.heros-accueil .banniere img { height: clamp(92px, 13vw, 168px); }
.heros .choix { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 10px; }
.heros .choix a { min-height: 52px; padding: 6px 14px; font-size: 16px; line-height: 1.2; color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); border-radius: 12px; }
.heros .choix a .icone { flex: none; color: var(--or); }
.heros .choix a:hover { color: var(--or); border-color: var(--or); }
.annonce-salle { flex-direction: column; align-items: flex-start; justify-content: space-between; }
.annonce-salle-texte { flex: 0 1 auto; }
@media (max-width: 960px) {
  .heros .choix { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .menu > a.menu-jeu { margin-left: 0; padding: 0 10px; }
  /* Sur téléphone, les deux boutons ronds rejoignent la ligne du logo. */
  .entete-cadre { position: relative; }
  .entete .lecture, .entete .recherche { position: absolute; top: 15px; }
  .entete .recherche { right: 12px; }
  .entete .lecture { right: 60px; }
  .lecture-panneau { position: fixed; top: 64px; left: 8px; right: 8px; width: auto; max-height: calc(100vh - 80px); }
  .heros-accueil .banniere img { display: none; }
  .heros-accueil .banniere-tissu { padding-bottom: 20px; }
}

/* Les remparts, au-dessus du pied de page. */
.pied { position: relative; margin-top: 22px; border-top: 0; }
.pied::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 21px; background: repeating-linear-gradient(90deg, var(--nuit) 0 30px, transparent 30px 52px); }
main:has(> .unyearhero:last-child) + .pied { margin-top: 0; border-top: 2px solid var(--filet); }
main:has(> .unyearhero:last-child) + .pied::before { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .heros:not(.heros-ambiance)::before { animation: aurore 16s ease-in-out infinite alternate; }
  .heros:not(.heros-ambiance)::after { animation: scintiller 3.6s ease-in-out infinite alternate; }
  .heros:not(.heros-ambiance) .titre-geant, .salle-fiche .heros .titre-grand { animation: monter .6s .08s cubic-bezier(.2, .7, .2, 1) both, dorure 9s linear infinite; }
  .annonce-salle-action { animation: appel-or 2.4s ease-in-out infinite; }
  ::view-transition-old(root) { animation: vue-sortie .2s ease both; }
  ::view-transition-new(root) { animation: vue-entree .32s cubic-bezier(.2, .7, .2, 1) both; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
@keyframes aurore { from { transform: translateX(-5%) scale(1); } to { transform: translateX(6%) scale(1.14); } }
@keyframes scintiller { from { opacity: .25; } to { opacity: 1; } }
@keyframes dorure { to { background-position: -220% 0; } }
@keyframes appel-or { 50% { box-shadow: 0 3px 0 #B8862A, 0 0 22px rgba(245, 200, 76, .8); } }
@keyframes vue-sortie { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vue-entree { from { opacity: 0; transform: translateY(14px); } }

/* La barre de lecture : elle suit la page, sans script. */
@supports (animation-timeline: scroll()) {
  body:has(.contenu, .salle-fiche)::before { content: ""; position: fixed; z-index: 50; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--filet), var(--or), #FFF3C9); transform-origin: 0 50%; animation: lecture linear both; animation-timeline: scroll(root); }
}
@keyframes lecture { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media print {
  .a-reveler { opacity: 1; transform: none; }
  .eclat, .poussiere, .creneaux, .pied::before, body::before { display: none !important; }
  .heros::before, .heros::after { display: none !important; }
  .entete, .pied, .ariane, .voisines, .compagnon { display: none; }
  .heros { color: #000; background: none; }
  .heros-ambiance .scene { display: none; }
  .heros-ambiance .heros-pile { padding-bottom: 12px; }
  .heros-ambiance :is(h1, .surtitre, .devise) { color: #000; text-shadow: none; }
  .avec-ambiance { background: none; }
  .contenu-seul { max-width: none; padding: 0; border: 0; background: none; }
}
