/* Objectif CAFOP 2027
   Deux matières : l'ardoise (compte à rebours, barres de titre, offres), posée sur son rebord en bois,
   et la page de cahier à marge rouge pour le travail. L'écriture cursive est celle de l'instituteur :
   la craie au tableau et le stylo rouge de la correction. Une seule police embarquée (la craie, 42 Ko,
   mise en cache hors ligne) ; tout le reste en polices du téléphone. */

@font-face {
  font-family: "Dancing Script"; src: url("fonts/dancing-script.woff2") format("woff2");
  font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ardoise: #1d3a2e; --ardoise-2: #285041; --craie: #eef2ec; --craie-2: #b8c9bf; --jaune: #f4c542; --bois: #7a4e2a;
  --papier: #fdfdfb; --ligne: #d9e3ef; --ligne-2: #b9c9dc; --marge: #e06a6a;
  --bic: #1f4fb5; --bic-2: #163c8c; --encre: #1b2330; --encre-2: #4b5667;
  --juste: #23744a; --juste-bg: #e7f3ec; --faux: #c23b3b; --faux-bg: #fbecec;
  --m: 3rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --craie-font: "Dancing Script", "Segoe Script", "Snell Roundhand", var(--serif);
  --serif: Georgia, "Noto Serif", "Times New Roman", serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font: 1rem/1.5 var(--sans); color: var(--encre);
  background: #e6eae3;
  -webkit-tap-highlight-color: transparent;
}
#app { display: flex; flex-direction: column; max-width: 36rem; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--papier); view-transition-name: page; }
/* Sur ordinateur : le cahier est posé sur le grand tableau de la classe. */
@media (min-width: 40rem) {
  body { background: radial-gradient(70% 55% at 50% 0%, rgba(255, 255, 255, .06), transparent 70%), radial-gradient(120% 90% at 50% 100%, rgba(0, 0, 0, .28), transparent 60%), #20382c; }
  #app { margin: 1.5rem auto; min-height: calc(100dvh - 3rem); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 1.25rem 3rem rgba(0, 0, 0, .35); }
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
a { color: var(--bic); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
:focus-visible { outline: 3px solid var(--bic); outline-offset: 2px; }
.slate :focus-visible, .topbar :focus-visible, .upsell :focus-visible, .offre :focus-visible { outline-color: var(--jaune); }

/* ---------- L'ardoise de l'accueil ---------- */
.slate {
  position: relative;
  margin: max(.7rem, env(safe-area-inset-top)) .7rem .4rem;
  padding: 1rem 1.15rem 1.35rem;
  color: var(--craie); text-align: center;
  border: .55rem solid; border-color: #8c5b33 #6e4626 #5c3a1f #6e4626; border-radius: .7rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), inset 0 0 2.5rem rgba(0, 0, 0, .25), 0 .35rem .9rem rgba(27, 35, 48, .22);
  background:
    radial-gradient(120% 80% at 15% 0%, rgba(255, 255, 255, .07), transparent 55%),
    radial-gradient(90% 70% at 90% 100%, rgba(255, 255, 255, .05), transparent 60%),
    var(--ardoise);
}
.slate::after { /* le bâton de craie posé sur le rebord */
  content: ""; position: absolute; right: 2rem; bottom: -.62rem;
  width: 2.4rem; height: .4rem; border-radius: .2rem;
  background: var(--craie); opacity: .92;
}
.slate .date { font-family: var(--craie-font); font-size: 1.2rem; color: var(--craie-2); }
.slate .count {
  margin: .3rem 0 .2rem;
  font-family: var(--craie-font); font-weight: 700; line-height: 1; letter-spacing: .01em;
  font-size: clamp(3.75rem, 19vw, 5.75rem);
  text-shadow: 0 0 .04em rgba(238, 242, 236, .55);
}
.slate .sub { font-size: 1rem; color: var(--craie-2); }
.slate .streak { margin-top: .9rem; font-size: .95rem; color: var(--jaune); }

/* ---------- Barre de titre ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: .35rem;
  min-height: 3.25rem; padding: max(.35rem, env(safe-area-inset-top)) .8rem .35rem .4rem;
  color: var(--craie); background: var(--ardoise);
  border-bottom: .3rem solid var(--bois);
}
.topbar h1 { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back {
  display: grid; place-items: center; flex: none;
  width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: .5rem;
  color: var(--craie); background: none; text-decoration: none;
}
.back:active { background: var(--ardoise-2); }
.count-q, .timer { flex: none; font-variant-numeric: tabular-nums; }
.count-q { font-size: .95rem; color: var(--craie-2); }
.timer { min-width: 3.5rem; text-align: right; font-size: 1.1rem; font-weight: 700; }
.timer.urgent { color: var(--jaune); }
.progress { height: .25rem; background: var(--ligne); }
.progress > i { display: block; height: 100%; background: var(--bic); transform-origin: left; transition: transform .25s ease-out; }

/* ---------- La page de cahier ---------- */
.page { position: relative; flex: 1 0 auto; padding: 1.25rem 1rem 2.5rem calc(var(--m) + .75rem); }
.page::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--m); width: 2px; background: var(--marge); opacity: .6; }

.essai {
  display: block; margin-bottom: 1rem; padding: .7rem .85rem;
  border: 1px solid #efd98a; border-radius: .5rem; background: #fff6d6;
  color: var(--encre); text-decoration: none; font-size: .93rem;
}
.essai .u { color: var(--bic); font-weight: 650; text-decoration: underline; text-underline-offset: .15em; white-space: nowrap; }

/* Sommaire : intitulé, points de conduite, numéro, sur les lignes du cahier */
.sommaire { margin: 0 0 1.25rem; }
.sommaire > h2 {
  margin: .2rem 0 .15rem; font-family: var(--craie-font); font-size: 1.85rem; font-weight: 700; line-height: 1.2; color: var(--encre);
  text-decoration: underline double var(--marge); text-decoration-thickness: 1px; text-underline-offset: .22em;
}
.row {
  display: flex; align-items: baseline; gap: .5rem; width: 100%;
  min-height: 3.1rem; padding: .85rem 0 .6rem;
  border: 0; border-bottom: 1px solid var(--ligne); background: none;
  color: var(--encre); text-align: left; text-decoration: none;
}
.row:active { background: #f3f6fb; }
.lbl { font-weight: 600; line-height: 1.35; }
.lbl small { display: block; margin-top: .15rem; font-size: .82rem; font-weight: 400; color: var(--encre-2); }
.dots { flex: 1 1 1.25rem; min-width: 1.25rem; position: relative; top: -.3em; border-bottom: 2px dotted var(--ligne-2); }
.num { flex: none; color: var(--bic); font-family: var(--craie-font); font-size: 1.4rem; font-weight: 700; line-height: 1; white-space: nowrap; }
.num svg { vertical-align: -.15em; margin-right: .25rem; }
.row.locked, .row.locked .num { color: var(--encre-2); }
@media (hover: hover) {
  .row:hover .lbl { color: var(--bic); }
  .row.locked:hover .lbl { color: var(--encre); }
}

/* ---------- Boutons ---------- */
.actions { display: grid; gap: .6rem; margin: 1.25rem 0; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; min-height: 3.1rem; padding: .75rem 1.1rem;
  border: 0; border-radius: .6rem;
  background: var(--bic); color: #fff;
  font-size: 1rem; font-weight: 650; line-height: 1.25; text-align: center; text-decoration: none;
}
.btn:active { background: var(--bic-2); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--bic); box-shadow: inset 0 0 0 1.5px var(--bic); }
.btn.ghost:active { background: #e4eaf8; }
.btn.chalk { background: var(--jaune); color: var(--ardoise); }
.btn.chalk:active { background: #e6b52d; }
.btn.danger { color: var(--faux); box-shadow: inset 0 0 0 1.5px var(--faux); }
.btn.danger:active { background: var(--faux-bg); }
@media (hover: hover) {
  .btn:hover { background: var(--bic-2); }
  .btn.ghost:hover { background: #eef2fb; }
  .btn.chalk:hover { background: #f7d264; }
  .btn.danger:hover { background: var(--faux-bg); }
}
.link { padding: 0; border: 0; background: none; color: var(--bic); text-decoration: underline; text-underline-offset: .15em; }

/* ---------- Question ---------- */
.question { position: relative; }
.qnum {
  position: absolute; top: -.1rem; left: calc(-1 * var(--m) - .75rem); width: var(--m);
  text-align: center; font-family: var(--craie-font); font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--faux);
}
.qmeta { font-size: .82rem; color: var(--encre-2); }
.qtext { margin: .3rem 0 1rem; font-size: 1.13rem; font-weight: 650; line-height: 1.4; }
.choices { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.choice {
  display: flex; align-items: center; gap: .75rem; width: 100%;
  min-height: 3.25rem; padding: .65rem .8rem;
  border: 1.5px solid var(--ligne-2); border-radius: .6rem;
  background: #fff; color: var(--encre); text-align: left; line-height: 1.35;
}
.letter {
  display: grid; place-items: center; flex: none;
  width: 2rem; height: 2rem; border: 1.5px solid var(--bic); border-radius: 50%;
  color: var(--bic); font-size: .95rem; font-weight: 700;
}
.txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.choice[aria-disabled="true"] { cursor: default; }
@media (hover: hover) { .choice:not([aria-disabled]):hover { border-color: var(--bic); } }
.choice.sel { border-color: var(--bic); background: #f1f5fd; }
.choice.sel .letter { background: var(--bic); color: #fff; }
.choice.ok { border-color: var(--juste); background: var(--juste-bg); }
.choice.ok .letter { border-color: var(--juste); background: var(--juste); color: #fff; }
.choice.ok svg { color: var(--juste); }
.choice.ko { border-color: var(--faux); background: var(--faux-bg); }
.choice.ko .letter { border-color: var(--faux); background: var(--faux); color: #fff; }
.choice.ko svg { color: var(--faux); }
.choice.dim { opacity: .55; }

.correction { margin: 1rem 0; padding: .7rem .95rem .85rem; border: 1.5px solid; border-radius: .55rem; }
.correction.is-ok { border-color: #b9dbc6; background: var(--juste-bg); }
.correction.is-ko { border-color: #ecc4c4; background: var(--faux-bg); }
.verdict {
  margin-bottom: .3rem; font-family: var(--craie-font); font-size: 1.55rem; font-weight: 700; line-height: 1.15;
  transform: rotate(-1.5deg); transform-origin: left; animation: encre .45s cubic-bezier(.5, 0, .3, 1) both;
}
@keyframes encre { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.correction.is-ok .verdict { color: var(--juste); }
.correction.is-ko .verdict { color: var(--faux); }
.nav { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1.1rem 0 .75rem; }

/* ---------- La copie notée au stylo rouge ---------- */
.copie { padding: .5rem 0 .25rem; text-align: center; }
.note {
  position: relative; display: inline-flex; justify-content: center; align-items: baseline;
  min-width: 11rem; height: 7rem; padding: 1.6rem 2.4rem 0;
  color: var(--faux); font-family: var(--craie-font); font-weight: 700; line-height: 1;
}
.note .val { font-size: 3.6rem; }
.note .sur { margin-left: .15rem; font-size: 1.7rem; }
.cercle { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cercle path {
  fill: none; stroke: var(--faux); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: trace .9s .15s cubic-bezier(.6, .05, .3, 1) forwards;
}
@keyframes trace { to { stroke-dashoffset: 0; } }
.appr { margin: .1rem 0 .35rem; font-family: var(--craie-font); font-size: 1.7rem; font-weight: 700; color: var(--faux); transform: rotate(-2deg); }

.bareme { width: 100%; margin: 1.25rem 0 .5rem; border-collapse: collapse; font-size: .95rem; }
.bareme th, .bareme td { padding: .55rem .25rem; border-bottom: 1px solid var(--ligne); text-align: left; }
.bareme th:not(:first-child), .bareme td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.bareme thead th { font-size: .82rem; font-weight: 600; color: var(--encre-2); }
.bareme tfoot th, .bareme tfoot td { border-top: 2px solid var(--encre); border-bottom: 0; font-weight: 700; }

.h2 { margin: 1.75rem 0 .4rem; font-size: 1.08rem; font-weight: 700; }
.lead { margin-bottom: 1rem; }
.small { margin: .6rem 0; font-size: .86rem; line-height: 1.45; color: var(--encre-2); }
.vide { padding: .75rem 0; color: var(--encre-2); }
.err { margin-top: .35rem; font-size: .92rem; font-weight: 600; color: var(--faux); }
.bravo { margin: 1.5rem 0; text-align: center; font-family: var(--craie-font); font-size: 1.5rem; font-weight: 700; color: var(--faux); }

.revue { margin: 0; padding: 0; list-style: none; }
.revue > li { padding: .9rem 0; border-bottom: 1px solid var(--ligne); }
.rq { margin-bottom: .35rem; font-weight: 600; }
.ra { margin: .15rem 0; font-size: .93rem; }
.ra.ko { color: var(--faux); }
.ra.ok { color: var(--juste); font-weight: 600; }
.rx { margin-top: .4rem; font-size: .9rem; color: var(--encre-2); }
.revue.compact > li { padding: .6rem 0; font-size: .93rem; }
.tag {
  display: inline-block; margin-right: .35rem; padding: .05rem .4rem; border-radius: .3rem;
  background: #eaf0fb; color: var(--bic); font-size: .74rem; font-weight: 650; vertical-align: .08em;
}

/* ---------- Petites ardoises : offre et version complète ---------- */
.upsell, .offre {
  margin: 1.5rem 0; padding: 1.1rem 1.15rem 1.25rem;
  color: var(--craie);
  background: radial-gradient(110% 90% at 10% 0%, rgba(255, 255, 255, .07), transparent 55%), var(--ardoise);
  border-bottom: .45rem solid var(--bois); border-radius: .55rem .55rem .3rem .3rem;
}
.upsell h2, .offre h2 { margin-bottom: .5rem; font-family: var(--craie-font); font-size: 1.75rem; font-weight: 700; line-height: 1.15; }
.upsell ul, .offre ul { margin: 0 0 .9rem; padding-left: 1.15rem; }
.upsell li, .offre li { margin: .3rem 0; }
.upsell li::marker, .offre li::marker { color: var(--jaune); }
.upsell p, .offre p { margin: .5rem 0 .9rem; font-size: .92rem; color: var(--craie-2); }
.offre .prix { margin: .75rem 0 1rem; font-family: var(--craie-font); font-size: 2.3rem; font-weight: 700; line-height: 1.1; color: var(--jaune); }
.offre .prix small { display: block; margin-top: .3rem; font-family: var(--sans); font-size: .86rem; font-weight: 400; color: var(--craie-2); }
.upsell a:not(.btn), .offre a:not(.btn) { color: var(--jaune); }

.etapes { margin: .25rem 0 1.25rem; padding-left: 1.4rem; }
.etapes li { margin: .45rem 0; padding-left: .2rem; }
.etapes li::marker { color: var(--bic); font-weight: 700; }
.cle { display: grid; gap: .5rem; margin: 1rem 0 1.5rem; }
.cle label { font-weight: 650; }
.cle input {
  width: 100%; min-height: 3.1rem; padding: .7rem .85rem;
  border: 1.5px solid var(--ligne-2); border-radius: .55rem; background: #fff;
  font-size: 1.1rem; letter-spacing: .04em;
}
.cle input:focus { border-color: var(--bic); }
.cle .btn { margin-top: .25rem; }

/* ---------- Sujets types et fiches ---------- */
.prose h2 { margin-bottom: .4rem; font-size: 1.3rem; line-height: 1.25; }
.prose h3 { margin: 1.5rem 0 .45rem; font-size: 1.08rem; }
.prose h4 { margin: 1.1rem 0 .3rem; font-size: 1rem; color: var(--encre-2); }
.prose p { margin: .55rem 0; line-height: 1.6; }
.prose ul, .prose ol { margin: .5rem 0; padding-left: 1.3rem; }
.prose li { margin: .3rem 0; line-height: 1.55; }
.prose table { display: block; max-width: 100%; margin: .8rem 0; overflow-x: auto; border-collapse: collapse; font-size: .9rem; }
.prose th, .prose td { padding: .4rem .55rem; border: 1px solid var(--ligne-2); text-align: left; vertical-align: top; }
.prose th { background: #f0f4f9; font-weight: 650; }
.prose .small { margin: .3rem 0; }
.chrono { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .9rem 0 1.1rem; }
.chrono .btn { width: auto; min-height: 2.75rem; }
/* Chrono lancé : reste visible sous la barre de titre pendant la lecture du texte. */
.chrono.on { position: sticky; top: 3.6rem; z-index: 4; margin-inline: -.5rem; padding: .45rem .5rem; background: var(--papier); border-bottom: 1px solid var(--ligne); }
#chrono { font-size: 1.2rem; font-weight: 700; color: var(--bic); font-variant-numeric: tabular-nums; }
.texte {
  margin: 1rem 0 1.25rem; padding: .9rem 1rem;
  border: 1px solid var(--ligne); border-radius: .5rem; background: #fff;
  font-family: var(--serif); font-size: 1.04rem;
}
.texte p { margin: .35rem 0; line-height: 1.75; text-indent: 1.25em; }
.part { margin-top: 1.5rem; }
.part h3 { margin: 0 0 .5rem; padding-bottom: .35rem; border-bottom: 2px solid var(--ligne-2); font-size: 1rem; }
.part .intro { margin: 0 0 .6rem; }
.part .intro p { margin: .35rem 0; }
.items { margin: 0; padding-left: 1.4rem; }
.items > li { margin: .85rem 0; }
.items .q > p { margin: .15rem 0; }
.items .link { margin-top: .3rem; font-size: .92rem; }
.corrige {
  margin-top: .5rem; padding: .65rem .85rem;
  border: 1px solid #b9dbc6; border-radius: .5rem;
  background: var(--juste-bg); font-size: .95rem;
}
.corrige p { margin: .3rem 0; }

/* ---------- Progrès ---------- */
.bulletin { margin: .25rem 0 1rem; padding: 0; list-style: none; }
.bulletin li { display: flex; align-items: baseline; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--ligne); font-size: .95rem; }
.bulletin b { flex: none; color: var(--bic); font-variant-numeric: tabular-nums; }
.bulletin.big li { padding: .75rem 0; font-size: 1.02rem; }
.bulletin.big b { font-size: 1.15rem; }
.bar { height: .5rem; margin: .35rem 0 .75rem; overflow: hidden; border-radius: .25rem; background: var(--ligne); }
.bar > i { display: block; height: 100%; background: var(--juste); }

.foot { display: grid; gap: .3rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--ligne); font-size: .84rem; color: var(--encre-2); }

#toast {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 20;
  width: max-content; max-width: min(32rem, calc(100vw - 2rem));
  padding: .75rem 1rem; border-bottom: .2rem solid var(--bois); border-radius: .5rem;
  background: var(--ardoise); color: var(--craie); font-size: .93rem;
  opacity: 0; transform: translate(-50%, .75rem); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Notation mathématique ---------- */
/* Groupe collé à une fraction ou à un vecteur : jamais coupé ; une longue fraction peut toujours passer sur deux lignes. */
.nw { white-space: nowrap; }
.nw .frac { white-space: normal; }
.frac { display: inline-flex; flex-direction: column; margin: 0 .1em; vertical-align: middle; text-align: center; font-size: .92em; line-height: 1.2; }
.frac > span { padding: 0 .2em; }
.frac > span:first-child { border-bottom: 1px solid currentColor; }
.vec { position: relative; display: inline-block; padding-top: .28em; line-height: 1.1; }
.vec::before { content: ""; position: absolute; top: .1em; left: .05em; right: .2em; border-top: .075em solid currentColor; }
.vec::after { content: ""; position: absolute; top: 0; right: 0; border-left: .28em solid currentColor; border-top: .14em solid transparent; border-bottom: .14em solid transparent; }

@media (max-width: 22.5rem) {
  :root { --m: 2.25rem; }
  .page { padding-right: .75rem; }
  .qnum { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .cercle path { stroke-dashoffset: 0; }
}

/* ---------- Calculs posés et encadrés (fiches, corrigés, explications) ---------- */
/* Une étape par ligne ; le premier signe de chaque ligne a sa propre colonne, donc les signes sont alignés. */
.calc {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: .4rem;
  row-gap: .45rem;
  margin: .65rem 0 .8rem;
  padding: .1rem 0 .1rem 1rem;
  overflow-x: auto;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.45;
}
.calc .cl { text-align: right; }
.calc .cw { grid-column: 1 / -1; }
.calc .frac { font-size: .95em; }
.correction .calc, .rx .calc { padding-left: .6rem; }
.correction > p:not(.verdict), .rx > p { margin: .4rem 0; }
.correction > :last-child, .rx > :last-child { margin-bottom: 0; }
.rx > :first-child { margin-top: 0; }
:is(.corrige, .correction, .rx) :is(ul, ol) { margin: .35rem 0; padding-left: 1.3rem; }
:is(.corrige, .correction, .rx) li { margin: .2rem 0; }

/* Encadrés : un rôle chacun, reconnu à sa couleur et à son titre. */
.box { margin: .9rem 0; padding: .6rem .8rem .65rem; border: 1px solid; border-radius: .45rem; }
.box > .box-t { margin: 0; font-size: .84rem; font-weight: 700; }
.box > .box-t + * { margin-top: .2rem; }
.box > :last-child { margin-bottom: 0; }
.box .calc { padding-left: .5rem; }
.box ul, .box ol { padding-left: 1.2rem; }
.box.retenir { border: 1.5px solid var(--bic); background: #f5f8ff; }
.box.retenir > .box-t { color: var(--bic); }
.box.piege { border-color: #ecc4c4; background: var(--faux-bg); }
.box.piege > .box-t { color: var(--faux); }
.box.exemple { border-color: var(--ligne); background: #f6f9fc; }
.box.exemple > .box-t { color: var(--encre-2); }
.box.astuce { border-color: #ead48a; background: #fdf7e1; }
.box.astuce > .box-t { color: var(--bois); }
@media (max-width: 22.5rem) { .calc { padding-left: .5rem; } }

/* ---------- La page qui se tourne entre deux écrans ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(page) { animation-duration: .28s; }
::view-transition-old(page) { animation: page-out .16s ease-in both; }
::view-transition-new(page) { animation: page-in .28s cubic-bezier(.2, .8, .2, 1) both; }
#app.turn { animation: page-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes page-out { to { opacity: 0; transform: translateX(-.75rem); } }
@keyframes page-in { from { opacity: 0; transform: translateX(1.25rem); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .verdict { clip-path: none; }
}
