/* Hélia — feuille de style.
   Direction : sable chaud, blanc mat, orange lumineux, Inter. Lisible d'abord :
   fond non blanc, texte d'écriture large et aéré, contrastes AA, rien de justifié. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  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;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lexend";
  src: url("/fonts/lexend-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --fond: #f3f0eb;
  --fond-haut: #f8f6f2;
  --carte: #ebe6e0;
  --carte-2: #e4ded6;
  --surface: #ffffff;
  --surface-2: #faf8f5;
  --encre: #1d1d1f;
  --encre-2: #5f5b57;
  --encre-3: #8a857f;
  --trait: #e2dcd4;
  --trait-2: #d6cfc6;
  --orange: #f26522;
  --orange-vif: #ff7a2e;
  --orange-texte: #c2410c;
  --orange-bouton: #cc4a10;
  --orange-bouton-survol: #b93d0b;
  --orange-pale: #ffe7d8;
  --orange-voile: rgba(242, 101, 34, 0.14);
  --vert: #138a5e;
  --ombre-carte: 0 1px 2px rgba(60, 40, 25, 0.05), 0 14px 34px -18px rgba(60, 40, 25, 0.22);
  --ombre-appareil: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 44px 80px -36px rgba(90, 55, 30, 0.42), 0 14px 26px -14px rgba(90, 55, 30, 0.2);
  --rayon: 16px;
  --taille: 20px;
  --interligne: 1.6;
  --lettrage: 0.005em;
  --mots: 0.04em;
  --police-texte: "Inter", system-ui, sans-serif;
  --police-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

:root[data-fond="blanc"] { --fond: #ffffff; --fond-haut: #ffffff; --carte: #f2f0ed; --carte-2: #e9e6e2; --surface-2: #fbfaf9; }
:root[data-fond="bleu"] { --fond: #eef3f8; --fond-haut: #f5f8fb; --carte: #e2eaf2; --carte-2: #d6e1ec; --trait: #d5dfe9; --trait-2: #c6d3e0; }
:root[data-fond="sombre"] {
  --fond: #151311;
  --fond-haut: #1b1815;
  --carte: #221e1a;
  --carte-2: #2a2520;
  --surface: #1f1b18;
  --surface-2: #26211d;
  --encre: #f3efea;
  --encre-2: #c3bcb3;
  --encre-3: #968e85;
  --trait: #332d27;
  --trait-2: #40382f;
  --orange-texte: #ff9a5c;
  --orange-pale: rgba(255, 122, 46, 0.2);
  --ombre-carte: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 34px -18px rgba(0, 0, 0, 0.6);
  --ombre-appareil: 0 44px 80px -36px rgba(0, 0, 0, 0.7), 0 14px 26px -14px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
:root[data-police="lexend"] { --police-texte: "Lexend", system-ui, sans-serif; }
:root[data-police="atkinson"] { --police-texte: "Atkinson Hyperlegible", system-ui, sans-serif; }
:root[data-police="systeme"] { --police-texte: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
:root[data-espace="oui"] { --interligne: 1.9; --lettrage: 0.05em; --mots: 0.16em; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--fond-haut) 0, var(--fond) 560px);
  color: var(--encre);
  font-family: var(--police-ui);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.clavier-ouvert { padding-bottom: var(--hauteur-clavier, 300px); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.evitement:focus { left: 8px; }
.point { color: var(--orange); }

/* ---------- Typographie ---------- */
.surtitre {
  margin: 0 0 14px;
  color: var(--orange-texte);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.titre-heros {
  margin: 0;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.02;
  font-weight: 460;
  letter-spacing: -0.045em;
}
.titre-section {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.08;
  font-weight: 460;
  letter-spacing: -0.04em;
}
.titre-vue {
  margin: 0 0 26px;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.05;
  font-weight: 460;
  letter-spacing: -0.04em;
  max-width: 16ch;
}
.chapo { margin: 22px 0 0; font-size: 18px; line-height: 1.55; color: var(--encre-2); max-width: 30em; }
.chapo-petit { margin: 16px 0 0; font-size: 16px; color: var(--encre-2); max-width: 26em; }
.aide { color: var(--encre-2); font-size: 15px; margin: 6px 0; }
.lien-fleche { display: inline-flex; gap: 8px; align-items: center; margin-top: 20px; color: var(--encre); font-weight: 500; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--trait-2); }
.lien-fleche span { color: var(--orange); }

/* ---------- Boutons ---------- */
.bouton-orange, .bouton-principal {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 22px; border: none; border-radius: 9px;
  background: var(--orange-bouton); color: #fff; font-weight: 600; font-size: 16px; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 10px 24px -10px rgba(204, 74, 16, 0.65);
  transition: background 0.15s, transform 0.15s;
}
.bouton-orange:hover, .bouton-principal:hover { background: var(--orange-bouton-survol); }
.bouton-orange:active, .bouton-principal:active { transform: translateY(1px); }
.bouton-orange:disabled { opacity: 0.65; cursor: progress; }
.bouton-clair, .bouton-secondaire {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 18px; border: 1px solid var(--trait); border-radius: 9px;
  background: var(--surface); color: var(--encre); font-weight: 500; font-size: 16px; text-decoration: none;
  box-shadow: 0 1px 2px rgba(60, 40, 25, 0.06);
}
.bouton-clair:hover, .bouton-secondaire:hover { border-color: var(--trait-2); }
.bouton-danger { min-height: 46px; padding: 0 16px; border-radius: 9px; border: 1px solid #f1c9c3; background: #fff5f3; color: #a3261a; font-weight: 500; }
:root[data-fond="sombre"] .bouton-danger { background: #2a1714; border-color: #5a2a22; color: #ff9d8e; }
.rond-lecture { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--encre); display: grid; place-items: center; }
.bouton-pilule { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--trait); text-decoration: none; font-weight: 500; font-size: 15px; box-shadow: 0 6px 18px -10px rgba(60, 40, 25, 0.35); }
.pastille-orange { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-voile); flex: none; }
.bouton-rond { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--trait); background: var(--surface-2); color: var(--encre); display: grid; place-items: center; flex: none; transition: border-color 0.15s; }
.bouton-rond:hover { border-color: var(--trait-2); }
.bouton-rond[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #fff; }
.bouton-ecoute { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 9px; border: 1px solid var(--trait-2); background: var(--surface); color: var(--encre); font-weight: 500; }
.bouton-ecoute[aria-pressed="true"] { border-color: var(--orange); color: var(--orange-texte); background: var(--orange-pale); }
.bouton-discret { min-height: 48px; padding: 0 10px; border: none; background: transparent; color: var(--encre-2); text-decoration: underline; text-underline-offset: 4px; }
.ligne-boutons { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- En-tête ---------- */
.barre {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 14px clamp(16px, 4vw, 48px); padding-top: max(14px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--fond-haut) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--trait) 70%, transparent);
}
.marque { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--encre); justify-self: start; }
.marque img { border-radius: 9px; box-shadow: 0 6px 14px -6px rgba(242, 101, 34, 0.6); }
.marque-nom { font-weight: 640; font-size: 25px; letter-spacing: -0.05em; line-height: 1; }
.onglets { display: flex; gap: 6px; justify-self: center; }
.onglets a { padding: 9px 14px; border-radius: 9px; text-decoration: none; color: var(--encre-2); font-weight: 500; font-size: 15px; }
.onglets a:hover { color: var(--encre); }
.onglets a[aria-current="page"] { color: var(--encre); background: var(--surface); box-shadow: 0 1px 2px rgba(60, 40, 25, 0.08); }
.bouton-pilule { justify-self: end; }
@media (max-width: 720px) {
  .barre { grid-template-columns: auto 1fr auto; padding: 10px 14px; }
  .onglets { justify-self: end; gap: 2px; }
  .onglets a { padding: 8px 9px; font-size: 14px; }
  .bouton-pilule { display: none; }
  .marque-nom { font-size: 22px; }
}

main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 40px; }

/* ---------- Héros ---------- */
.heros {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 64px);
  align-items: start; padding: clamp(28px, 5vw, 64px) 0 40px;
}
.heros-texte { padding-top: clamp(8px, 3vw, 44px); }
.heros-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.chiffres { display: flex; flex-wrap: nowrap; gap: 0; margin: 44px 0 0; padding: 0; }
.chiffres > div { padding: 0 26px; border-left: 1px solid var(--trait-2); }
.chiffres > div:first-child { padding-left: 0; border-left: none; }
.chiffres dt { font-size: 26px; font-weight: 520; letter-spacing: -0.03em; }
.chiffres dd { margin: 2px 0 0; color: var(--encre-2); font-size: 13.5px; max-width: 11em; }
.mots-verticaux {
  position: absolute; left: calc(100% + 22px); top: 150px; margin: 0; z-index: 4;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; line-height: 2; color: var(--encre-2);
}
.mots-verticaux::after { content: ""; display: block; width: 1px; height: 46px; margin-top: 10px; background: var(--encre-3); }

.heros-outil { position: relative; }
.decor { position: absolute; inset: -40px -60px auto auto; width: 92%; height: 520px; z-index: 0; pointer-events: none; }
.bloc { position: absolute; border-radius: 30px; background: linear-gradient(160deg, var(--surface) 0%, var(--carte) 100%); box-shadow: 0 30px 60px -36px rgba(90, 55, 30, 0.45), 0 1px 0 rgba(255, 255, 255, 0.85) inset; }
.bloc-grand { right: 0; top: 0; width: 78%; height: 300px; }
.bloc-points { right: 6%; top: 230px; width: 46%; height: 210px; background: radial-gradient(circle, var(--trait-2) 1.1px, transparent 1.4px) 0 0 / 9px 9px, linear-gradient(160deg, var(--surface-2), var(--carte)); }
.bloc-petit { right: 58%; top: 360px; width: 30%; height: 120px; border-radius: 24px; }
:root[data-fond="sombre"] .bloc { opacity: 0.55; }

.cube {
  position: absolute; display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(255, 196, 150, 0.98) 0%, rgba(255, 128, 52, 0.96) 46%, rgba(226, 84, 18, 0.97) 100%);
  border-radius: 22%;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.75), inset 0 -10px 18px rgba(150, 45, 0, 0.35), 0 22px 44px -14px rgba(242, 101, 34, 0.65);
}
.cube::before { content: ""; position: absolute; inset: 6% 8% auto 8%; height: 38%; border-radius: 40% 40% 50% 50% / 60% 60% 40% 40%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0)); }
.cube svg { width: 62%; height: 62%; position: relative; filter: drop-shadow(0 2px 3px rgba(150, 45, 0, 0.35)); }
.cube-heros { width: 84px; height: 84px; left: -50px; top: -38px; z-index: 3; transform: rotate(-10deg); animation: flotte 6s ease-in-out infinite; }
.appareil-tete .etat { padding-left: 34px; }
@keyframes flotte { 0%, 100% { transform: rotate(-10deg) translateY(0); } 50% { transform: rotate(-7deg) translateY(-8px); } }

.appareil {
  position: relative; z-index: 2;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid color-mix(in srgb, var(--trait) 80%, #fff);
  border-radius: 28px; padding: 18px 18px 16px;
  box-shadow: var(--ombre-appareil);
}
.appareil:focus-within { border-color: color-mix(in srgb, var(--orange) 45%, var(--trait)); }
.appareil-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.etat { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; color: var(--encre-2); padding-left: 4px; }
.mode { display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--carte); }
.mode button { border: none; background: transparent; padding: 7px 13px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--encre-2); }
.mode button[aria-checked="true"] { background: var(--surface); color: var(--encre); box-shadow: 0 1px 3px rgba(60, 40, 25, 0.14); }
.socle {
  position: relative; z-index: 1; display: block; height: 46px; margin: -20px auto 0; width: 86%;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 170, 110, 0.95), rgba(242, 101, 34, 0.7) 60%, rgba(242, 101, 34, 0.25));
  transform: perspective(500px) rotateX(58deg);
  box-shadow: 0 18px 50px 6px rgba(255, 122, 46, 0.42);
}

.texte-lecture {
  font-family: var(--police-texte);
  font-size: var(--taille);
  line-height: var(--interligne);
  letter-spacing: var(--lettrage);
  word-spacing: var(--mots);
}
#editeur {
  width: 100%; min-height: 160px; resize: vertical; display: block;
  border: 1px solid var(--trait); border-radius: 16px; outline: none;
  background: var(--surface); padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(60, 40, 25, 0.04) inset;
}
#editeur:focus { border-color: color-mix(in srgb, var(--orange) 55%, var(--trait)); box-shadow: 0 0 0 4px var(--orange-voile); }
#editeur::placeholder { color: var(--encre-3); }
.editeur-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.bouton-relire { margin-left: auto; min-height: 50px; padding: 0 24px; font-size: 17px; }
.bouton-relire.charge .b-relire-icone { display: inline-block; animation: tourne 0.9s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* ---------- Exemples ---------- */
.exemples { position: relative; z-index: 2; margin: 22px 0 16px; }
.exemples-titre { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--encre-2); margin-bottom: 10px; }
.exemples-liste { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.exemple {
  flex: none; max-width: 270px; text-align: left; border: 1px solid var(--trait); background: var(--surface);
  border-radius: 14px; padding: 10px 14px; font-size: 14px; line-height: 1.4; color: var(--encre-2);
  box-shadow: 0 1px 2px rgba(60, 40, 25, 0.05);
  transition: border-color 0.15s, transform 0.15s;
}
.exemple:hover { border-color: color-mix(in srgb, var(--orange) 45%, var(--trait)); transform: translateY(-1px); }
.exemple em { display: block; font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--orange-texte); margin-bottom: 3px; }

/* ---------- Résultat ---------- */
.resultat { position: relative; z-index: 2; }
.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre-carte); padding: 18px; margin: 0 0 14px; }
.carte-calme { background: var(--carte); box-shadow: none; border-color: transparent; }
.resultat-carte { border-color: color-mix(in srgb, var(--orange) 35%, var(--trait)); box-shadow: 0 1px 2px rgba(60, 40, 25, 0.05), 0 20px 44px -24px rgba(242, 101, 34, 0.45); }
.resultat-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.resultat-titre { font-weight: 600; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange-texte); }
.compteur { font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--carte); color: var(--encre); }
.corrige { margin: 8px 0 16px; word-break: break-word; }
.corrige .mot.lu, .sugg-phrase .mot.lu { background: color-mix(in srgb, var(--orange) 32%, transparent); border-radius: 6px; }
mark.chg { color: inherit; background: var(--orange-pale); border-bottom: 2.5px solid var(--orange); border-radius: 6px 6px 2px 2px; padding: 0 3px; cursor: pointer; }
mark.chg.t-majuscule, mark.chg.t-ponctuation { background: color-mix(in srgb, var(--carte) 90%, transparent); border-bottom-color: var(--encre-3); }
mark.chg:focus-visible { outline-offset: 1px; }
.resultat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.note-reformule { font-size: 14px; color: var(--encre-2); background: var(--carte); padding: 10px 12px; border-radius: 12px; margin: 4px 0 12px; }

.doute { border-color: color-mix(in srgb, var(--orange) 50%, var(--trait)); background: linear-gradient(180deg, color-mix(in srgb, var(--orange) 7%, var(--surface)), var(--surface)); }
.doute-titre { font-weight: 600; margin: 0 0 6px; display: flex; gap: 10px; align-items: center; font-size: 17px; }
.doute-option { display: flex; align-items: stretch; gap: 8px; margin-top: 10px; }
.doute-option .choisir { flex: 1; text-align: left; border: 1px solid var(--trait-2); background: var(--surface); border-radius: 12px; padding: 11px 14px; }
.doute-option .choisir[aria-pressed="true"] { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-voile); }
.mini-ecoute { border: 1px solid var(--trait); background: var(--surface-2); border-radius: 12px; min-width: 46px; min-height: 46px; display: grid; place-items: center; color: var(--encre); }

.section-titre { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--encre-2); margin: 2px 0 12px; }
.liste-chg { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chg-item { border: 1px solid var(--trait); border-radius: 12px; background: var(--surface-2); }
.chg-item summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; flex-wrap: wrap; }
.chg-item summary::-webkit-details-marker { display: none; }
.chg-pastille { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; box-shadow: 0 0 0 4px var(--orange-voile); }
.chg-avant { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--encre-3); }
.chg-fleche { color: var(--orange); }
.chg-apres { font-weight: 600; }
.chg-regle { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--encre-2); background: var(--carte); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chg-corps { padding: 0 14px 12px 32px; display: flex; gap: 10px; align-items: flex-start; }
.chg-corps p { margin: 0; flex: 1; color: var(--encre-2); }

/* ---------- Atouts (cartes) ---------- */
.atouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 30px 0 70px; }
.atout {
  position: relative; overflow: hidden; min-height: 250px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--carte) 60%, var(--surface)) 0%, var(--carte) 100%);
  border-radius: 18px; padding: 24px;
}
.atout h3 { margin: 0; font-size: 21px; font-weight: 520; letter-spacing: -0.025em; max-width: 9em; position: relative; z-index: 1; }
.atout p { margin: 10px 0 0; color: var(--encre-2); font-size: 14.5px; max-width: 12.5em; position: relative; z-index: 1; }
.atout-num { position: absolute; right: 22px; top: 22px; color: var(--orange-texte); font-size: 13px; font-weight: 600; }
.rond-fleche { position: absolute; left: 24px; bottom: 24px; z-index: 1; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--encre); display: grid; place-items: center; text-decoration: none; font-size: 17px; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.rond-fleche:hover { background: var(--encre); color: var(--fond); }
.art { position: absolute; right: 0; bottom: 0; width: 56%; height: 70%; pointer-events: none; }
.art-lames i { position: absolute; bottom: -12px; width: 26px; border-radius: 6px 6px 0 0; transform: skewY(-14deg); transform-origin: bottom; }
.art-lames i:nth-child(1) { right: 150px; height: 120px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.45)); box-shadow: 0 10px 20px -10px rgba(90, 55, 30, 0.35); }
.art-lames i:nth-child(2) { right: 116px; height: 150px; background: linear-gradient(180deg, rgba(255, 168, 105, 0.95), rgba(242, 101, 34, 0.9)); box-shadow: 0 0 30px rgba(255, 122, 46, 0.45); }
.art-lames i:nth-child(3) { right: 82px; height: 175px; background: linear-gradient(180deg, rgba(255, 196, 150, 0.85), rgba(255, 122, 46, 0.75)); }
.art-lames i:nth-child(4) { right: 48px; height: 196px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(240, 232, 224, 0.6)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8); }
.art-lames i:nth-child(5) { right: 14px; height: 214px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0 3px, rgba(255, 255, 255, 0.35) 3px 6px); }
.art-onde { display: flex; align-items: flex-end; justify-content: flex-end; gap: 8px; padding: 0 26px 34px 0; }
.art-onde i { display: block; width: 12px; border-radius: 8px; background: linear-gradient(180deg, rgba(255, 190, 140, 0.95), rgba(242, 101, 34, 0.9)); box-shadow: 0 6px 16px -4px rgba(242, 101, 34, 0.55); }
.art-onde i:nth-child(1) { height: 22px; } .art-onde i:nth-child(2) { height: 44px; } .art-onde i:nth-child(3) { height: 70px; }
.art-onde i:nth-child(4) { height: 98px; } .art-onde i:nth-child(5) { height: 62px; } .art-onde i:nth-child(6) { height: 38px; } .art-onde i:nth-child(7) { height: 20px; }
.art-onde i:nth-child(odd) { background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 228, 220, 0.9)); box-shadow: 0 6px 14px -6px rgba(90, 55, 30, 0.35); }
.art-sphere i { position: absolute; right: 18px; bottom: 26px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff 0%, rgba(255, 238, 226, 0.95) 22%, rgba(255, 176, 110, 0.9) 58%, rgba(242, 101, 34, 0.95) 100%);
  box-shadow: 0 0 60px 6px rgba(255, 122, 46, 0.4), inset -12px -16px 30px rgba(190, 70, 10, 0.25); }
.art-sphere::after { content: ""; position: absolute; right: -10px; bottom: -40px; width: 240px; height: 70px; border-radius: 22px; background: linear-gradient(180deg, var(--surface), var(--carte-2)); box-shadow: 0 -2px 0 rgba(255, 255, 255, 0.8) inset; }
.art-sphere i { z-index: 1; }

/* ---------- Méthode ---------- */
.methode { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); gap: 40px; align-items: start; margin: 0 0 70px; }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.etapes li { padding: 4px 22px 4px 24px; border-left: 1px solid var(--trait-2); display: flex; flex-direction: column; gap: 6px; }
.etape-num { font-size: 42px; font-weight: 300; letter-spacing: -0.03em; color: var(--orange); line-height: 1; }
.etape-trait { width: 1px; height: 26px; background: var(--orange); margin: 10px 0 18px; position: relative; }
.etape-trait::after { content: ""; position: absolute; left: -3px; bottom: -2px; width: 7px; height: 7px; border-right: 1px solid var(--orange); border-bottom: 1px solid var(--orange); transform: rotate(45deg); }
.etapes b { font-weight: 600; font-size: 16px; }
.etapes li > span:last-child { color: var(--encre-2); font-size: 14.5px; }

/* ---------- Appel ---------- */
.appel {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 0.8fr); gap: 30px; align-items: center;
  background: linear-gradient(110deg, var(--carte) 0%, color-mix(in srgb, var(--carte) 55%, var(--surface)) 100%);
  border-radius: 22px; padding: clamp(26px, 4vw, 44px);
}
.appel-texte p { color: var(--encre-2); margin: 14px 0 24px; max-width: 30em; }
.appel-qr { display: grid; justify-items: center; gap: 8px; font-size: 13px; color: var(--encre-2); }
.qr { display: grid; place-items: center; background: #fff; padding: 10px; border-radius: 14px; width: fit-content; box-shadow: var(--ombre-carte); }
.qr svg { width: 132px; height: 132px; display: block; }
.appel-art { position: relative; height: 200px; }
.tuile { position: absolute; width: 120px; height: 120px; border-radius: 22px; background: linear-gradient(160deg, var(--surface), var(--carte-2)); box-shadow: 0 20px 34px -20px rgba(90, 55, 30, 0.5), 0 1px 0 rgba(255, 255, 255, 0.85) inset; transform: perspective(600px) rotateX(48deg) rotateZ(-38deg); }
.t1 { left: 10%; top: 48px; } .t2 { left: 44%; top: 22px; } .t3 { left: 40%; top: 104px; }
.cube-appel { width: 104px; height: 104px; left: 34%; top: 30px; transform: rotate(-12deg); animation: flotte2 7s ease-in-out infinite; }
@keyframes flotte2 { 0%, 100% { transform: rotate(-12deg) translateY(0); } 50% { transform: rotate(-9deg) translateY(-9px); } }

/* ---------- Pied ---------- */
.pied { max-width: 1240px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 48px) calc(36px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; border-top: 1px solid var(--trait); }
.pied .marque-nom { font-size: 22px; }
.pied-devise { color: var(--encre-2); font-size: 14px; }
.pied-liens { display: flex; gap: 22px; margin-left: auto; }
.pied-liens a { text-decoration: none; color: var(--encre-2); font-size: 14px; }
.pied-liens a:hover { color: var(--encre); }
.pied-mention { width: 100%; color: var(--encre-3); font-size: 12.5px; }

/* ---------- Coach ---------- */
#vue-coach, #vue-reglages { padding: clamp(28px, 5vw, 56px) 0 20px; max-width: 900px; }
.coach-chiffres { display: flex; flex-wrap: wrap; margin: 0 0 28px; }
.chiffre { padding: 0 28px; border-left: 1px solid var(--trait-2); }
.chiffre:first-child { padding-left: 0; border-left: none; }
.chiffre b { display: block; font-size: 34px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.chiffre span { font-size: 13.5px; color: var(--encre-2); }
.regle-moment {
  position: relative; overflow: hidden; border: none; padding: 26px;
  background: linear-gradient(140deg, var(--surface) 0%, color-mix(in srgb, var(--orange) 9%, var(--surface)) 100%);
  box-shadow: 0 1px 2px rgba(60, 40, 25, 0.05), 0 24px 50px -30px rgba(242, 101, 34, 0.55);
}
.regle-moment::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255, 220, 190, 0.9), rgba(255, 122, 46, 0.45) 60%, transparent 70%); pointer-events: none; }
.etiquette { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--orange-texte); }
.regle-nom { font-size: 40px; font-weight: 480; letter-spacing: -0.035em; margin: 6px 0 10px; position: relative; z-index: 1; }
.exemple-perso { background: var(--surface-2); border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px; margin: 14px 0; position: relative; z-index: 1; }
.exemple-perso .avant { color: var(--encre-3); text-decoration: line-through; }
.regles-liste { display: grid; gap: 0; }
.regle-ligne { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 14px 4px; border: none; border-bottom: 1px solid var(--trait); background: transparent; text-align: left; }
.regle-ligne:last-child { border-bottom: none; }
.regle-ligne:hover b { color: var(--orange-texte); }
.etoiles { letter-spacing: 2px; color: var(--orange); }
.tendance-bas { color: var(--vert); font-weight: 600; }
.tendance-haut { color: var(--orange-texte); font-weight: 600; }
.courbe { width: 100%; height: 120px; display: block; }
.courbe-legende { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--encre-3); }
.vide { text-align: left; padding: 30px; }
.vide p { color: var(--encre-2); max-width: 34em; }

/* ---------- Exercices ---------- */
.quiz-question { font-size: 22px; font-family: var(--police-texte); line-height: 1.55; margin: 14px 0 18px; }
.quiz-trou { display: inline-block; min-width: 3.2em; border-bottom: 3px solid var(--orange); text-align: center; color: var(--orange-texte); font-weight: 600; }
.quiz-options { display: grid; gap: 10px; }
.quiz-options button { min-height: 58px; border-radius: 12px; border: 1px solid var(--trait-2); background: var(--surface); font-size: 22px; font-family: var(--police-texte); }
.quiz-options button.bon { border-color: var(--vert); background: color-mix(in srgb, var(--vert) 10%, var(--surface)); }
.quiz-options button.faux { border-color: var(--orange); background: var(--orange-pale); }
.quiz-retour { min-height: 3em; margin: 14px 0; font-weight: 500; }
.quiz-points { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.quiz-points span { width: 22px; height: 4px; border-radius: 4px; background: var(--trait-2); }
.quiz-points span.fait { background: var(--orange); }
.bravo { font-size: 54px; text-align: center; margin: 4px 0; }

/* ---------- Réglages ---------- */
.reglages fieldset { border: 1px solid var(--trait); }
.reglages legend { font-weight: 600; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange-texte); padding: 0 6px; }
.champ { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.champ-titre { font-weight: 600; display: flex; justify-content: space-between; }
.champ select { min-height: 46px; border-radius: 10px; border: 1px solid var(--trait); background: var(--surface); padding: 0 10px; }
.champ input[type="range"] { width: 100%; accent-color: var(--orange-bouton); }
.interrupteur { flex-direction: row; align-items: center; gap: 12px; }
.interrupteur input { width: 22px; height: 22px; accent-color: var(--orange-bouton); flex: none; }
.choix-police, .choix-fond { display: flex; flex-wrap: wrap; gap: 8px; }
.choix-police label, .choix-fond label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--trait); border-radius: 10px; padding: 9px 13px; background: var(--surface); cursor: pointer; }
.choix-police label:has(input:checked), .choix-fond label:has(input:checked) { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-voile); }
.choix-police input, .choix-fond input { accent-color: var(--orange-bouton); }
.pastille-fond { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #c9c2b8; }
.f-doux { background: #f3f0eb; } .f-blanc { background: #fff; } .f-bleu { background: #eef3f8; } .f-sombre { background: #151311; }

/* ---------- Lettres miroirs ---------- */
.l-b { color: #2e6be6; } .l-d { color: #e2561a; } .l-p { color: #138a5e; } .l-q { color: #8a4fd8; }
:root[data-fond="sombre"] .l-b { color: #7aa7ff; } :root[data-fond="sombre"] .l-d { color: #ff9a5c; } :root[data-fond="sombre"] .l-p { color: #46d39b; } :root[data-fond="sombre"] .l-q { color: #c49bff; }
.l-b, .l-d, .l-p, .l-q { font-weight: 700; }

/* ---------- Clavier Hélia ---------- */
.clavier {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: color-mix(in srgb, var(--carte) 88%, var(--encre) 6%);
  border-top: 1px solid var(--trait-2);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
  box-shadow: 0 -16px 40px -24px rgba(60, 40, 25, 0.4);
}
.suggestion { min-height: 54px; display: flex; align-items: center; gap: 6px; padding: 4px 6px 8px; }
.sugg-repos { font-size: 14px; color: var(--encre-2); padding: 0 6px; flex: 1; }
.sugg-phrase { flex: 1; min-width: 0; text-align: left; border: 1.5px solid var(--orange); background: var(--surface); border-radius: 12px; padding: 7px 11px; font-family: var(--police-texte); font-size: 16px; line-height: 1.35; max-height: 66px; overflow: auto; box-shadow: 0 6px 16px -10px rgba(242, 101, 34, 0.6); }
.sugg-bouton { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--trait); background: var(--surface); display: grid; place-items: center; color: var(--encre); }
.touches { display: grid; gap: 6px; }
.rangee { display: flex; gap: 5px; justify-content: center; }
.touche {
  flex: 1 1 0; min-width: 0; height: 46px; border: none; border-radius: 9px;
  background: var(--surface); color: var(--encre);
  box-shadow: 0 1px 0 rgba(60, 40, 25, 0.22);
  font-family: var(--police-texte); font-size: 21px; display: grid; place-items: center; padding: 0;
}
.touche:active, .touche.appuyee { background: var(--orange-pale); transform: translateY(1px); }
.touche.accent { height: 38px; font-size: 18px; background: color-mix(in srgb, var(--orange) 8%, var(--surface)); }
.touche.fonction { background: var(--carte-2); font-size: 15px; font-family: var(--police-ui); }
.touche.espace { flex: 4 1 0; font-size: 14px; color: var(--encre-2); }
.touche.large { flex: 1.5 1 0; }
.touche.validation { background: var(--orange-bouton); color: #fff; }
.touche.maj-active { background: var(--encre); color: var(--fond); }

/* ---------- Dictée, feuille, message ---------- */
.ecoute, .feuille { position: fixed; inset: 0; z-index: 40; background: rgba(29, 24, 20, 0.42); backdrop-filter: blur(3px); display: grid; place-items: end center; padding: 16px; }
.ecoute[hidden], .feuille[hidden], .clavier[hidden], .toast[hidden] { display: none; }
.ecoute-boite, .feuille-boite { width: min(560px, 100%); background: var(--surface); border-radius: 24px; padding: 24px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.45); max-height: 88dvh; overflow: auto; position: relative; }
.ecoute-boite { text-align: center; }
.ecoute-titre { font-weight: 600; font-size: 20px; margin: 12px 0 4px; }
.ecoute-texte { min-height: 2.5em; color: var(--encre-2); }
.ecoute-onde { display: flex; gap: 6px; justify-content: center; height: 48px; align-items: center; }
.ecoute-onde span { width: 8px; height: 16px; border-radius: 6px; background: linear-gradient(180deg, var(--orange-vif), var(--orange)); animation: onde 1s ease-in-out infinite; }
.ecoute-onde span:nth-child(2) { animation-delay: 0.12s; } .ecoute-onde span:nth-child(3) { animation-delay: 0.24s; } .ecoute-onde span:nth-child(4) { animation-delay: 0.36s; } .ecoute-onde span:nth-child(5) { animation-delay: 0.48s; }
@keyframes onde { 0%, 100% { height: 12px; } 50% { height: 44px; } }
.feuille-fermer { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--trait); background: var(--surface-2); font-size: 16px; }
@media (min-width: 720px) { .ecoute, .feuille { place-items: center; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--encre); color: var(--fond); padding: 12px 18px; border-radius: 12px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5); max-width: calc(100% - 32px); font-weight: 500; }
body.clavier-ouvert .toast { bottom: calc(var(--hauteur-clavier, 300px) + 12px); }

/* ---------- Petits écrans ---------- */
@media (max-width: 1400px) { .mots-verticaux { display: none; } }
@media (max-width: 980px) {
  .heros { grid-template-columns: minmax(0, 1fr); padding-top: 22px; gap: 26px; }
  .heros-texte { padding-top: 0; }
  .mots-verticaux { display: none; }
  .decor { inset: -30px 0 auto auto; width: 100%; }
  .atouts { grid-template-columns: minmax(0, 1fr); }
  .methode { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .appel { grid-template-columns: minmax(0, 1fr); }
  .appel-qr { display: none !important; }
  .appel-art { height: 150px; }
}
@media (max-width: 720px) {
  .titre-heros { font-size: clamp(36px, 10.5vw, 46px); }
  .chapo { font-size: 16.5px; margin-top: 14px; }
  .heros-actions { margin-top: 20px; }
  .heros-actions .bouton-clair { display: none; }
  .chiffres { margin-top: 26px; }
  .chiffres > div { padding: 0 14px; }
  .chiffres dt { font-size: 22px; }
  .chiffres dd { font-size: 12.5px; }
  .cube-heros { width: 62px; height: 62px; left: auto; right: 6px; top: -26px; }
  .appareil { padding: 14px 12px 12px; border-radius: 24px; }
  .etat { display: none; }
  .appareil-tete .etat { padding-left: 4px; }
  .appareil-tete { justify-content: flex-start; }
  .etapes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 26px; }
  .atout { min-height: 230px; }
  .atout p { max-width: 58%; }
  .art { transform: scale(0.78); transform-origin: bottom right; }
  .atout-num { z-index: 2; background: color-mix(in srgb, var(--carte) 80%, transparent); padding: 2px 6px; border-radius: 6px; }
  .pied-liens { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 14px 20px; }
}
@media (max-width: 400px) {
  .chiffres > div:nth-child(3) { display: none; }
  .bouton-relire { padding: 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
