/* FormuleFacile — direction « Mot à mot », validée par le CEO le 12/10/2026 (maquettes/b.html). Clair par défaut, sombre au bouton. */
@font-face { font-family: "Sora"; src: url("/static/fonts/sora-600-latin.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/static/fonts/sora-700-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/static/fonts/sora-800-latin.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Source Sans"; src: url("/static/fonts/source-sans-3-400-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans"; src: url("/static/fonts/source-sans-3-500-latin.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Source Sans"; src: url("/static/fonts/source-sans-3-600-latin.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Sans"; src: url("/static/fonts/source-sans-3-700-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono-latin-2.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --fond: #e9ebff; --fond-2: #f6f2ff; --encre: #1e1b4b; --doux: #45427a; --discret: #625f94;
  --argile: #ffffff; --argile-2: #f1f1ff; --creux: #e3e5fb; --trait: #cdd0f6;
  --indigo: #4f46e5; --indigo-fonce: #372fb0;
  --lumiere: rgba(255, 255, 255, .95); --ombre: rgba(67, 56, 202, .26); --ombre-dedans: rgba(67, 56, 202, .09); --reflet: rgba(255, 255, 255, .7);
  --a: #4338ca; --a-fond: #dfe1ff; --a-cote: #b4b8f8;
  --b: #c02a20; --b-fond: #ffe0db; --b-cote: #f3aca2;
  --c: #8f5200; --c-fond: #ffe8b8; --c-cote: #eac169;
  --d: #06665a; --d-fond: #cbf3e8; --d-cote: #8bdac6;
  --e: #9a18a6; --e-fond: #f7dcfa; --e-cote: #e0a3e8;
  --ok-fond: #d6f6e1; --ok-cote: #9fdfb6;
  --halo-1: #ffc7b8; --halo-2: #aeeedb; --halo-3: #cfc4ff; --grain: .28;
  --titre: "Sora", "Arial Black", sans-serif; --texte: "Source Sans", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --rebond: cubic-bezier(.34, 1.56, .64, 1);
}
:root[data-theme="dark"] {
  --fond: #0f0e25; --fond-2: #17153a; --encre: #ecebff; --doux: #bdbaf0; --discret: #9794cf;
  --argile: #211e50; --argile-2: #1a1843; --creux: #131130; --trait: #38347f;
  --indigo: #a29cff; --indigo-fonce: #5b53e6;
  --lumiere: rgba(139, 132, 255, .12); --ombre: rgba(0, 0, 0, .6); --ombre-dedans: rgba(0, 0, 0, .28); --reflet: rgba(255, 255, 255, .12);
  --a: #b3aeff; --a-fond: #2d2a78; --a-cote: #1b1952;
  --b: #ff9a90; --b-fond: #4c2026; --b-cote: #2f1216;
  --c: #ffcb6b; --c-fond: #473511; --c-cote: #2b2008;
  --d: #6fe6cf; --d-fond: #11413a; --d-cote: #082924;
  --e: #f1aaf8; --e-fond: #451b4b; --e-cote: #2a0e2f;
  --ok-fond: #123a22; --ok-cote: #0a2414;
  --halo-1: #5a2638; --halo-2: #124a41; --halo-3: #322d8a; --grain: .18;
}
* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
html[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; font: 400 17px/1.55 var(--texte); color: var(--encre); background: linear-gradient(160deg, var(--fond), var(--fond-2)); min-height: 100vh; position: relative; overflow-x: hidden; }
/* la matière : trois halos qui dérivent lentement, sous un grain de papier */
.decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.decor i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(80px); opacity: .75; animation: derive 26s ease-in-out infinite alternate; }
.decor i:nth-child(1) { background: var(--halo-1); left: -12vmax; top: -14vmax; }
.decor i:nth-child(2) { background: var(--halo-2); right: -14vmax; top: 18vmax; animation-duration: 32s; animation-delay: -8s; }
.decor i:nth-child(3) { background: var(--halo-3); left: 24vmax; bottom: -22vmax; animation-duration: 38s; animation-delay: -15s; }
@keyframes derive { to { transform: translate(6vmax, 4vmax) scale(1.12); } }
.decor::after { content: ""; position: absolute; inset: 0; opacity: var(--grain); mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E"); }
main, header, footer { position: relative; z-index: 1; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
code, .touche, .ponct { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 10px; }
.cadre { width: min(1180px, 100% - 32px); margin-inline: auto; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* l'argile : volume doux, lumière en haut à gauche */
.argile { background: linear-gradient(145deg, var(--argile), var(--argile-2)); border-radius: 28px;
  box-shadow: 16px 22px 44px -18px var(--ombre), -10px -10px 24px var(--lumiere), inset -4px -6px 12px var(--ombre-dedans), inset 4px 4px 9px var(--lumiere); }
.creux { background: var(--creux); border-radius: 16px; box-shadow: inset 4px 5px 10px var(--ombre-dedans), inset -3px -3px 7px var(--lumiere); }


/* ── en-tête ── */
.tete-ligne { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.marque { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 800 1.3rem/1 var(--titre); letter-spacing: -.03em; }
.marque-signe { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, #6b63ff, #4338ca); color: #fff; font: 800 22px/1 var(--mono);
  box-shadow: 0 6px 0 #2f279a, 0 14px 20px -8px var(--ombre), inset 0 2px 0 rgba(255, 255, 255, .45); transform: rotate(-6deg); }
.marque b { color: var(--indigo); }
.nav { display: flex; gap: 6px; margin-left: 10px; }
.nav a { text-decoration: none; min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 14px; font-weight: 600; color: var(--doux); transition: background .2s, color .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--encre); background: color-mix(in srgb, var(--argile) 70%, transparent); }
.bouton-doux { min-height: 46px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 16px; font-weight: 700; text-decoration: none; cursor: pointer; color: var(--encre);
  background: linear-gradient(145deg, var(--argile), var(--argile-2)); box-shadow: 0 5px 0 var(--trait), 0 12px 18px -10px var(--ombre), inset 0 2px 0 var(--lumiere); transition: transform .2s var(--rebond), box-shadow .2s; }
.bouton-doux:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--trait), 0 8px 14px -10px var(--ombre), inset 0 2px 0 var(--lumiere); }
.bouton-doux:active { transform: translateY(5px); box-shadow: 0 0 0 var(--trait), inset 0 2px 0 var(--lumiere); }
.bouton-doux svg { width: 19px; height: 19px; flex: none; }
.bouton-doux[aria-pressed="true"] { color: var(--c); }
.theme { margin-left: auto; }

/* ── ouverture ── */
.ouverture { padding: 34px 0 10px; text-align: center; }
.surtitre { display: inline-block; margin: 0 0 18px; padding: 7px 14px; border-radius: 999px; background: var(--creux); box-shadow: inset 2px 3px 6px var(--ombre-dedans), inset -2px -2px 5px var(--lumiere); font: 600 .8rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--doux); }
h1 { margin: 0 auto; max-width: 15em; font: 800 clamp(2.3rem, 5.6vw, 4.6rem)/1.05 var(--titre); letter-spacing: -.045em; text-wrap: balance; }
.h1-touche { display: inline-block; padding: .02em .22em .08em; margin: 0 .04em; border-radius: .26em; color: #fff; background: linear-gradient(145deg, #6b63ff, #4338ca);
  box-shadow: 0 .11em 0 #2f279a, 0 .3em .5em -.16em var(--ombre), inset 0 .05em 0 rgba(255, 255, 255, .45); transform: rotate(-3deg) translateY(-.03em); }
.chapo { margin: 22px auto 0; max-width: 36em; font-size: 1.16rem; color: var(--doux); }

.demande { margin: 34px auto 0; max-width: 900px; padding: 16px; text-align: left; }
.onglets { display: inline-flex; padding: 5px; gap: 4px; }
.onglets button, .segment button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 12px; background: transparent; color: var(--doux); font-weight: 600; cursor: pointer; transition: color .2s, background .2s, box-shadow .2s; }
.onglets button[aria-selected="true"], .segment button[aria-pressed="true"] { color: var(--encre); background: linear-gradient(145deg, var(--argile), var(--argile-2)); box-shadow: 0 3px 0 var(--trait), 0 8px 12px -8px var(--ombre), inset 0 2px 0 var(--lumiere); }
.demande textarea { display: block; width: 100%; margin-top: 12px; min-height: 84px; resize: none; border: 0; padding: 16px 18px; font-size: 1.28rem; line-height: 1.4; color: var(--encre); }
.demande textarea::placeholder { color: var(--discret); }
.demande-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.segment { display: inline-flex; padding: 5px; gap: 4px; }
.essai { margin: 0 0 0 auto; display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 500; color: var(--doux); }
.essai-billes { display: inline-flex; gap: 6px; }
.essai-billes i { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(145deg, #7bdc9f, #23a559); box-shadow: 0 3px 0 #17803f, inset 0 2px 0 rgba(255, 255, 255, .6); transition: transform .3s var(--rebond), opacity .3s; }
.essai-billes i.vide { background: var(--creux); box-shadow: inset 2px 2px 4px var(--ombre-dedans); transform: scale(.82); }
.generer { min-height: 56px; padding: 0 26px; display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 18px; cursor: pointer; font: 700 1.08rem/1 var(--titre); color: #fff;
  background: linear-gradient(145deg, #6b63ff, #4338ca); box-shadow: 0 7px 0 #2f279a, 0 18px 26px -10px var(--ombre), inset 0 2px 0 rgba(255, 255, 255, .45); transition: transform .2s var(--rebond), box-shadow .2s; }
.generer:hover { transform: translateY(3px); box-shadow: 0 4px 0 #2f279a, 0 12px 20px -10px var(--ombre), inset 0 2px 0 rgba(255, 255, 255, .45); }
.generer:active { transform: translateY(7px); box-shadow: 0 0 0 #2f279a, inset 0 2px 0 rgba(255, 255, 255, .45); }
.generer svg { width: 20px; height: 20px; }
.exemples { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 22px auto 0; max-width: 980px; }
.exemples button { min-height: 44px; padding: 6px 16px; border: 0; border-radius: 999px; cursor: pointer; color: var(--doux); font-size: .96rem; background: color-mix(in srgb, var(--argile) 72%, transparent); box-shadow: 0 3px 0 var(--trait), inset 0 2px 0 var(--lumiere); transition: transform .2s var(--rebond), box-shadow .2s, color .2s; }
.exemples button b { color: var(--encre); }
.exemples button:hover { transform: translateY(-2px); }
.exemples button[aria-pressed="true"] { color: var(--encre); background: var(--a-fond); box-shadow: 0 3px 0 var(--a-cote), inset 0 2px 0 var(--lumiere); }

/* ── la scène : la phrase, les fils, la formule ── */
.scene-zone { padding: 34px 0 10px; perspective: 1600px; }
.scene { position: relative; padding: 30px 30px 34px; text-align: center; transition: transform .25s ease-out; transform-origin: 50% 40%; will-change: transform; }
.scene-etiquette { margin: 0 0 14px; font: 600 .78rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--discret); }
.phrase { margin: 0 auto; max-width: 34em; font: 700 clamp(1.3rem, 2.7vw, 2.15rem)/1.6 var(--titre); letter-spacing: -.03em; }
.mot { display: inline-block; white-space: nowrap; padding: 0 .26em; margin: .08em .03em; border-radius: .42em; cursor: default; transition: background .35s, color .35s, box-shadow .35s, transform .3s var(--rebond); }
.mot.lu { background: var(--g-fond); color: var(--g); box-shadow: inset 0 -.14em 0 var(--g-cote); }
.mot.forte { transform: translateY(-3px) scale(1.04); }
.fils { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fil-fond { fill: none; stroke: var(--argile); stroke-width: 10; stroke-linecap: round; opacity: 0; transition: opacity .3s; }
.fil { fill: none; stroke: var(--g); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .7s cubic-bezier(.6, 0, .2, 1), stroke-width .2s; }
.fil.forte { stroke-width: 7; }
.fil-fond.visible { opacity: 1; }
.perle { fill: var(--g); stroke: var(--argile); stroke-width: 3; opacity: 0; transition: opacity .3s; }
.perle.visible { opacity: 1; }
.espace-fils { height: clamp(90px, 13vw, 150px); }
.touches { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 18px 6px; }
.piece { display: grid; justify-items: center; gap: 12px; opacity: 0; transform: translateY(14px) scale(.9); transition: opacity .3s, transform .45s var(--rebond); }
.piece.visible { opacity: 1; transform: none; }
.touche { display: inline-flex; align-items: center; min-height: 60px; padding: 0 18px; border-radius: 16px; font: 800 clamp(1.05rem, 2vw, 1.5rem)/1 var(--mono); white-space: nowrap; color: var(--g); background: var(--g-fond); cursor: default;
  box-shadow: 0 8px 0 var(--g-cote), 0 18px 24px -12px var(--ombre), inset 0 2px 0 var(--reflet); transition: transform .2s var(--rebond), box-shadow .2s; }
.touche:hover, .touche.forte { transform: translateY(5px); box-shadow: 0 3px 0 var(--g-cote), 0 10px 16px -12px var(--ombre), inset 0 2px 0 var(--reflet); }
.touche.ajoutee { outline: 2px dashed var(--g); outline-offset: 4px; }
.ponct { align-self: flex-start; min-height: 60px; display: inline-flex; align-items: center; padding: 0 2px; font: 700 clamp(1.05rem, 2vw, 1.5rem)/1 var(--mono); color: var(--discret); opacity: 0; transition: opacity .3s; }
.ponct.visible { opacity: 1; }
.legende { max-width: 150px; margin: 0; font-size: .9rem; line-height: 1.3; color: var(--doux); text-wrap: balance; }
.legende b { color: var(--g); font-weight: 700; }
[data-g="a"] { --g: var(--a); --g-fond: var(--a-fond); --g-cote: var(--a-cote); }
[data-g="b"] { --g: var(--b); --g-fond: var(--b-fond); --g-cote: var(--b-cote); }
[data-g="c"] { --g: var(--c); --g-fond: var(--c-fond); --g-cote: var(--c-cote); }
[data-g="d"] { --g: var(--d); --g-fond: var(--d-fond); --g-cote: var(--d-cote); }
[data-g="e"] { --g: var(--e); --g-fond: var(--e-fond); --g-cote: var(--e-cote); }

.a-coller { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 30px auto 0; max-width: 860px; padding: 10px 10px 10px 20px; text-align: left; }
.a-coller code { flex: 1 1 260px; min-width: 0; font: 600 1.02rem/1.4 var(--mono); color: var(--encre); overflow-wrap: anywhere; }
.copier { min-height: 50px; padding: 0 20px; display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 14px; cursor: pointer; font: 700 1rem/1 var(--titre); color: #fff;
  background: linear-gradient(145deg, #6b63ff, #4338ca); box-shadow: 0 5px 0 #2f279a, 0 12px 18px -10px var(--ombre), inset 0 2px 0 rgba(255, 255, 255, .45); transition: transform .2s var(--rebond), box-shadow .2s; }
.copier:hover { transform: translateY(2px); box-shadow: 0 3px 0 #2f279a, inset 0 2px 0 rgba(255, 255, 255, .45); }
.copier svg { width: 19px; height: 19px; }

/* ── les trois preuves ── */
.preuves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 26px 0 40px; }
.preuve { padding: 22px 24px 24px; }
.preuve h2 { margin: 0 0 12px; font: 600 .78rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--discret); }
.resultat-nombre { margin: 0; font: 800 clamp(2.4rem, 4.4vw, 3.4rem)/1 var(--titre); letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--a); }
.resultat-nombre small { font-size: .5em; letter-spacing: 0; }
.preuve p { margin: 10px 0 0; color: var(--doux); }
.controles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.controles li { display: flex; align-items: center; gap: 12px; font-size: .98rem; color: var(--doux); opacity: .35; transition: opacity .3s; }
.controles li::before { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--creux); box-shadow: inset 2px 3px 5px var(--ombre-dedans); transition: transform .4s var(--rebond), background .3s, box-shadow .3s; }
.controles li.ok { opacity: 1; color: var(--encre); }
.controles li.ok::before { transform: scale(1.06); background: var(--ok-fond) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2318a04f' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 17px no-repeat; box-shadow: 0 4px 0 var(--ok-cote), inset 0 2px 0 var(--lumiere); }
.bon-a-savoir code { display: block; margin-top: 12px; padding: 12px 14px; font: 600 .86rem/1.45 var(--mono); color: var(--encre); overflow-wrap: anywhere; }

/* ── bas de page ── */
.suite { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 22px; padding-bottom: 56px; }
.suite .argile { padding: 22px 24px; }
.suite h2 { margin: 0 0 10px; font: 700 1.25rem/1.2 var(--titre); letter-spacing: -.03em; }
.historique { list-style: none; margin: 0; padding: 0; }
.historique li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-top: 2px dotted var(--trait); }
.historique li:first-child { border-top: 0; }
.historique p { margin: 0; font-weight: 600; }
.historique small { color: var(--discret); font-weight: 400; }
.historique code { grid-column: 1; font: 600 .86rem/1.4 var(--mono); color: var(--indigo); overflow-wrap: anywhere; }
.etoile { grid-row: span 2; align-self: center; width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 14px; background: var(--creux); box-shadow: inset 2px 3px 5px var(--ombre-dedans); color: var(--discret); cursor: pointer; transition: color .2s, transform .3s var(--rebond); }
.etoile[aria-pressed="true"] { color: #e69a00; transform: scale(1.08); }
.etoile svg { width: 21px; height: 21px; }
.pro .bientot { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--c-fond); color: var(--c); box-shadow: 0 3px 0 var(--c-cote); font: 700 .72rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.pro .prix { margin: 12px 0 0; font: 800 2.6rem/1 var(--titre); letter-spacing: -.04em; color: var(--indigo); }
.pro .prix small { font: 500 .95rem/1 var(--texte); color: var(--doux); letter-spacing: 0; }
.pro ul { margin: 12px 0 16px; padding-left: 20px; color: var(--doux); }
.pro form { display: flex; flex-wrap: wrap; gap: 10px; }
.pro input { flex: 1 1 180px; min-height: 50px; padding: 0 14px; border: 0; }
.pro input::placeholder { color: var(--discret); }

.pied { padding: 8px 0 30px; text-align: center; color: var(--discret); font-size: .9rem; }
.pied p { margin: 0 0 4px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 24px) scale(.96); padding: 14px 20px; border-radius: 18px; background: #1e1b4b; color: #fff; font-weight: 600; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--rebond); z-index: 40; max-width: calc(100% - 32px); }
.toast.visible { opacity: 1; transform: translate(-50%, 0) scale(1); }

@media (max-width: 980px) {
  .nav { display: none; }
  .preuves, .suite { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .tete-ligne { gap: 10px; }
  .theme span { display: none; }
  .scene { padding: 22px 12px 24px; }
  .essai { margin-left: 0; width: 100%; }
  .generer { width: 100%; justify-content: center; }
  .touche, .ponct { min-height: 50px; }
  .touche { padding: 0 12px; border-radius: 13px; }
  .legende { max-width: 112px; font-size: .82rem; }
  .copier { width: 100%; justify-content: center; }
}
/* une formule s'affiche caractère par caractère : jamais de ligature (>= ne doit pas devenir ≥) */
code, code *, .touche, .ponct, .formule-grande, .formule-grande *, .barre-formule, .barre-formule *, .historique code { font-variant-ligatures: none !important; font-feature-settings: "liga" 0, "calt" 0 !important; }
.fige *, .fige *::before, .fige *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── états de l'outil ── */
.scene.attente .touches, .scene.attente .phrase { opacity: .45; }
.scene.attente .a-coller { opacity: .45; }
.alerte { margin: 0 auto 18px; max-width: 760px; padding: 14px 18px; border-radius: 16px; background: var(--c-fond); color: var(--c); box-shadow: 0 4px 0 var(--c-cote); font-weight: 600; text-align: left; }
.alerte[hidden] { display: none; }
.alerte a { color: inherit; }
.alerte.grave { background: var(--b-fond); color: var(--b); box-shadow: 0 4px 0 var(--b-cote); }
.controles li.echec { opacity: 1; color: var(--b); }
.controles li.echec::before { background: var(--b-fond) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c02a20' stroke-width='3.6' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 15px no-repeat; box-shadow: 0 4px 0 var(--b-cote); }
.generer[disabled] { opacity: .65; cursor: progress; transform: none; }
.message { margin: 18px auto 0; max-width: 900px; padding: 12px 18px; border-radius: 16px; background: var(--ok-fond); color: var(--encre); box-shadow: 0 4px 0 var(--ok-cote); font-weight: 600; text-align: center; }
.suite .vide { color: var(--doux); margin: 0 0 14px; }
.lien-bouton { display: inline-flex; }
.pro h2 { margin: 12px 0 0; }

/* ── pages de texte, connexion, compte ── */
.page { padding: 34px 0 56px; }
.page-carte { max-width: 760px; margin-inline: auto; padding: 30px 32px 34px; }
.page-carte.large { max-width: 980px; }
.page h1 { max-width: none; margin: 0 0 14px; font-size: clamp(1.9rem, 4vw, 2.8rem); text-align: left; }
.page h2 { margin: 28px 0 8px; font: 700 1.25rem/1.25 var(--titre); letter-spacing: -.02em; }
.page p, .page li { color: var(--doux); }
.page .maj { font: 500 .82rem/1.3 var(--mono); color: var(--discret); }
.formulaire { display: grid; gap: 12px; margin-top: 16px; max-width: 460px; }
.formulaire label { font-weight: 600; color: var(--encre); }
.formulaire input { min-height: 52px; padding: 0 16px; border: 0; font-size: 1.05rem; color: var(--encre); }
.note { font-size: .92rem; color: var(--discret); }
.liste-formules { list-style: none; margin: 16px 0 0; padding: 0; }
.liste-formules li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 14px 0; border-top: 2px dotted var(--trait); }
.liste-formules li:first-child { border-top: 0; }
.liste-formules p { margin: 0; font-weight: 600; color: var(--encre); }
.liste-formules small { font-weight: 400; color: var(--discret); }
.liste-formules code { grid-column: 1; font: 600 .9rem/1.45 var(--mono); color: var(--indigo); overflow-wrap: anywhere; }
.liste-formules .gestes { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 8px; }
.liste-formules form { margin: 0; }
.petit { min-height: 44px; padding: 0 14px; font-size: .92rem; }
.danger { color: var(--b); }
.compteur { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; font-weight: 600; color: var(--doux); }
.zone-danger { margin-top: 34px; padding-top: 8px; border-top: 2px dotted var(--trait); }
.pied nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
.pied nav a { min-height: 44px; display: inline-flex; align-items: center; }
.en-ligne { display: inline; margin: 0; }
.tete form { margin: 0; }

/* ── bandeau de consentement (mesure d'audience) ── */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; margin: 0 auto; max-width: 720px; display: grid; grid-template-columns: 1fr auto; gap: 12px 22px; align-items: center; padding: 18px 20px; border-radius: 22px; background: #1e1b4b; color: #ecebff; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6); }
.consent[hidden] { display: none; }
.consent h2 { margin: 0 0 4px; font: 700 1.05rem/1.2 var(--titre); }
.consent p { margin: 0; font-size: .92rem; color: #c9c6f5; }
.consent-actions { display: flex; gap: 10px; }
.consent-btn { min-height: 46px; padding: 0 18px; border-radius: 14px; border: 2px solid rgba(236, 235, 255, .45); background: transparent; color: #ecebff; font-weight: 700; cursor: pointer; }
.consent-btn--oui { background: #ecebff; color: #1e1b4b; border-color: #ecebff; }
@media (max-width: 640px) {
  .consent { grid-template-columns: 1fr; }
  .consent-actions { justify-content: flex-end; }
  .page-carte { padding: 22px 18px 26px; }
  .liste-formules li { grid-template-columns: minmax(0, 1fr); }
  .liste-formules .gestes { grid-row: auto; grid-column: 1; }
}
@media (max-width: 620px) {
  .tete-ligne { gap: 8px; min-height: 66px; }
  .marque { font-size: 1.05rem; gap: 8px; }
  .marque-signe { width: 36px; height: 36px; border-radius: 12px; font-size: 19px; }
  .tete .bouton-doux { padding: 0 12px; font-size: .95rem; }
}

/* ── pages de formules ── */
.fil-ariane { margin: 0 0 10px; font: 600 .82rem/1.3 var(--mono); color: var(--discret); }
.fil-ariane a { color: inherit; }
.formule-fiche { margin: 0; max-width: none; }
.formule-fiche code { font-size: 1.12rem; }
.page .note code { font: 600 .92rem/1.4 var(--mono); color: var(--encre); overflow-wrap: anywhere; }
.tableau-cadre { overflow-x: auto; border-radius: 16px; box-shadow: inset 0 0 0 2px var(--trait); }
table.exemple { border-collapse: collapse; width: 100%; font-size: .95rem; font-variant-numeric: tabular-nums; }
table.exemple th, table.exemple td { padding: 8px 12px; border: 1px solid var(--trait); white-space: nowrap; text-align: left; color: var(--encre); }
table.exemple thead th, table.exemple tbody th { background: var(--creux); font: 600 .76rem/1 var(--mono); color: var(--discret); text-align: center; }
table.exemple td.titre { font-weight: 700; }
table.exemple td.nombre { text-align: right; }
table.exemple td.resultat { background: var(--a-fond); color: var(--a); font-weight: 700; box-shadow: inset 0 0 0 2px var(--a); }
.morceaux { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.morceaux li { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 4px 16px; align-items: baseline; padding: 12px 16px; border-radius: 14px; background: var(--creux); }
.morceaux code { font: 700 .95rem/1.4 var(--mono); color: var(--a); overflow-wrap: anywhere; }
.morceaux span { color: var(--doux); }
.bon { padding: 14px 18px; border-radius: 16px; background: var(--c-fond); color: var(--c); box-shadow: 0 4px 0 var(--c-cote); }
.page .bon { color: var(--c); }
.adapter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 30px; padding: 18px 20px; }
.adapter p { margin: 0; flex: 1 1 260px; }
.adapter .generer { text-decoration: none; }
.voisines, .liste-pages { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.liste-pages { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.liste-pages a { display: grid; gap: 6px; height: 100%; padding: 14px 16px; border-radius: 16px; text-decoration: none; background: var(--creux); transition: transform .2s var(--rebond), box-shadow .2s; }
.liste-pages a:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--trait); }
.liste-pages strong { color: var(--encre); font-weight: 600; line-height: 1.35; }
.liste-pages code { font: 700 .8rem/1.3 var(--mono); color: var(--a); }
.voisines a { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 640px) { .morceaux li { grid-template-columns: minmax(0, 1fr); } }
