/*
 * secretshare : l'outil sur scène, sur fond sombre.
 * Références choisies par Stéphane le 24/10/2026 (modèles Lovable JSON Formatter, Customer
 * Health, Supply Chain) : le produit au centre, une seule couleur vive, des titres gras, la
 * densité d'un tableau de bord. Une seule police, Public Sans (licence OFL), servie par nous.
 * Le vert menthe marque l'action principale et ce qui est chiffré ; le rouge, les seules
 * actions qui détruisent. Le monospace sert aux valeurs : le lien, le secret, les paramètres.
 */

@font-face {
    font-family: "Public Sans";
    src: url("../fonts/public-sans-latin-wght-normal-29KbApT.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: dark;

    --text: "Public Sans", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --code: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    --bg: #0a0b0d;
    --surface: #111317;
    --surface-2: #181b20;
    --well: #0c0e11;
    --line: #22262d;
    --line-strong: #343a45;
    --ink: #eef1f4;
    --muted: #9ba4af;
    --placeholder: #7b848f;

    --accent: #3ddc97;
    --accent-hover: #66e7af;
    --accent-ink: #04140d;
    --accent-soft: rgba(61, 220, 151, .12);
    --accent-line: rgba(61, 220, 151, .45);

    --danger: #ff7b6f;
    --danger-text: #ffb4ac;
    --danger-soft: rgba(255, 123, 111, .12);
    --warn: #f2c14e;
    --warn-soft: rgba(242, 193, 78, .1);
    --focus: #8fd3ff;

    --radius: 10px;
    --radius-lg: 16px;
    --measure: 66ch;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* Les classes qui fixent un display ne doivent jamais réafficher un élément caché par le JS. */
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 17px/1.6 var(--text);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .2em; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

h1, h2, h3 { margin: 0 0 .5em; font-weight: 750; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.12; letter-spacing: -0.02em; }
h3 { font-size: 1.1rem; line-height: 1.3; font-weight: 650; }
p { margin: 0 0 1em; }
strong { font-weight: 650; }
code {
    font-family: var(--code); font-size: .88em;
    padding: .1em .35em; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2);
}

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; }
.skip:focus { left: 8px; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ─── En-tête et pied ─────────────────────────────────────────────────────── */

.masthead { position: relative; z-index: 2; border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.1rem; letter-spacing: -0.01em; text-decoration: none; }
.brand img { display: block; }
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 24px; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }

.colophon { border-top: 1px solid var(--line); margin-top: 120px; padding: 36px 0 56px; color: var(--muted); font-size: .9rem; }
.colophon .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
.colophon p { margin: 0; max-width: 46ch; }
.colophon nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.colophon a { color: var(--muted); text-decoration: none; }
.colophon a:hover { color: var(--ink); }

/* ─── Accueil : la scène ──────────────────────────────────────────────────── */

.hero { position: relative; padding: 56px 0 0; text-align: center; }
.hero__icon { display: flex; justify-content: center; margin: 0 0 22px; }
.hero h1 { max-width: 18ch; margin: 0 auto .4em; }
.hero .lede { max-width: 58ch; margin: 0 auto; color: var(--muted); font-size: 1.15rem; }

/* Le halo vert se tient derrière l'outil, et seulement là. */
.stage { position: relative; padding-top: 44px; }
.stage::before {
    content: "";
    position: absolute; z-index: 0; left: 50%; top: -40px;
    width: min(1200px, 140vw); height: 640px; transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(61, 220, 151, .22), rgba(61, 220, 151, 0) 75%);
    pointer-events: none;
}

.app {
    position: relative; z-index: 1;
    max-width: 1000px; margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8);
    text-align: left;
}
.app__bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.app__title { margin: 0; font-weight: 650; font-size: 1rem; }
.app__status { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-family: var(--code); font-size: .8rem; }
.app__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.app__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.app__main { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-right: 1px solid var(--line); }
.app__main textarea.input { flex: 1; min-height: 232px; }
.app__side { padding: 20px; }
.app__side .options { display: block; }
.app__side .segmented { display: flex; }
.app__side .segmented label { flex: 1; text-align: center; padding-left: 6px; padding-right: 6px; }
.app__foot { margin: 0; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.app__pane { padding: 24px; }
.app__pane > :last-child { margin-bottom: 0; }

/* ─── Sections de l'accueil ───────────────────────────────────────────────── */

.section { padding: 128px 0 0; }
.section__head { max-width: 720px; margin: 0 0 40px; }
.section__head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.section__head h2 { margin-bottom: .45em; }

/* Le lien décortiqué : ce qui part au serveur, ce qui n'y va jamais. */
.anatomy { margin: 0 0 48px; padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); }
.anatomy__link { margin: 0 0 22px; font-family: var(--code); font-size: clamp(.8rem, 1.6vw, 1.15rem); line-height: 1.5; overflow-wrap: anywhere; }
.anatomy__base { color: var(--muted); }
.anatomy__id { color: var(--ink); border-bottom: 2px solid var(--line-strong); }
.anatomy__key { color: var(--accent); border-bottom: 2px solid var(--accent); }
.anatomy__notes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.anatomy__note { margin: 0; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: .95rem; }
.anatomy__note strong { display: block; color: var(--ink); }
.anatomy__note--key { background: var(--accent-soft); }
.anatomy__note--key strong { color: var(--accent); }

.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; }
.steps li { counter-increment: step; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--muted); }
.steps li::before {
    content: counter(step);
    display: grid; place-items: center; width: 30px; height: 30px; margin: 0 0 14px;
    border: 1px solid var(--accent-line); border-radius: 50%;
    color: var(--accent); font: 650 .9rem/1 var(--code);
}
.steps strong { display: block; margin: 0 0 4px; color: var(--ink); }
.after { max-width: var(--measure); margin: 28px 0 0; color: var(--muted); }

/* Paramètres de chiffrement, lus comme un tableau de bord. */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0 0 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); overflow: hidden; background: var(--line-strong); }
.tile { margin: 0; padding: 22px; background: var(--surface); }
.tile dt { margin: 0 0 10px; color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.tile dd { margin: 0; }
.tile__value { display: block; margin: 0 0 8px; color: var(--accent); font: 650 clamp(1.3rem, 2.2vw, 1.65rem)/1.15 var(--code); letter-spacing: -0.02em; }
.tile__note { display: block; color: var(--muted); font-size: .92rem; line-height: 1.5; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin: 0 0 24px; }
.facts div { padding: 18px 0; border-top: 1px solid var(--line); }
.facts dt { margin: 0 0 4px; font-weight: 650; }
.facts dd { margin: 0; color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.split .section__head { margin-bottom: 28px; }

.flow { list-style: none; margin: 0; padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); }
.flow li { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 0 0 26px; color: var(--muted); }
.flow li:last-child { padding-bottom: 0; }
.flow li + li::before { content: ""; position: absolute; left: 31px; top: -26px; height: 26px; border-left: 1px dashed var(--line-strong); }
.flow__who {
    align-self: start; padding: 4px 0; border: 1px solid var(--line-strong); border-radius: 999px;
    color: var(--ink); font: 600 .78rem/1.4 var(--code); text-align: center;
}
.flow__who--them { border-color: var(--accent-line); color: var(--accent); }
.flow strong { display: block; color: var(--ink); }

.cta { text-align: center; }
.cta h2 { margin-bottom: .3em; }
.cta p { color: var(--muted); }

/* ─── Pages intérieures, panneaux, formulaires ────────────────────────────── */

.page { padding: 64px 0 0; }
.page h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: var(--measure); }
.aside { color: var(--muted); font-size: .95rem; }

.panel {
    margin: 28px 0 12px;
    padding: 28px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7);
}
.panel > :last-child { margin-bottom: 0; }
.panel h1 { font-size: clamp(1.7rem, 3.4vw, 2.1rem); }

.field { margin: 0 0 20px; border: 0; padding: 0; min-width: 0; }
.label { display: block; margin: 0 0 8px; padding: 0; color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }

.input {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--well);
    color: var(--ink);
    font: inherit;
}
textarea.input { resize: vertical; min-height: 7.5em; font-family: var(--code); font-size: .95rem; line-height: 1.55; }
.input:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--placeholder); }

.options { display: flex; flex-wrap: wrap; gap: 0 32px; }

.segmented { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--well); }
.segmented label { position: relative; padding: 7px 13px; border-radius: 7px; color: var(--muted); cursor: pointer; font-size: .95rem; white-space: nowrap; }
.segmented label:hover { color: var(--ink); }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented label:has(input:checked) { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }

.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--well); }
.stepper button { width: 42px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 1.1rem; cursor: pointer; border-radius: var(--radius); }
.stepper button:hover { background: var(--surface-2); }
.stepper output { min-width: 6.5em; padding: 9px 4px; text-align: center; font-family: var(--code); font-size: .92rem; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .95rem; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

.dropzone {
    display: block;
    position: relative;
    padding: 14px 16px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    cursor: pointer;
    font-size: .93rem;
}
.dropzone strong { color: var(--ink); }
.dropzone:hover { border-color: var(--muted); }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.files { list-style: none; margin: 10px 0 0; padding: 0; font-size: .93rem; }
.files li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.files li:first-child { border-top: 1px solid var(--line); }
.files span { color: var(--muted); }
.files button { border: 0; background: none; color: var(--danger); font: inherit; cursor: pointer; text-decoration: underline; }

.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; min-width: 0; font-family: var(--code); font-size: .9rem; }

/* ─── Boutons ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 12px 20px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-ink);
    font: 650 1rem/1.3 var(--text);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn[disabled],
.btn[aria-disabled="true"] { opacity: .6; cursor: progress; }
.btn--secondary { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); }
.btn--secondary:hover { background: var(--surface-2); border-color: var(--muted); color: var(--ink); }
.btn--danger { background: transparent; border-color: rgba(255, 123, 111, .55); color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn--block { display: block; width: 100%; }
.btn--small { padding: 7px 12px; font-size: .9rem; }
.linkbox .btn { flex: none; }

.spinner {
    display: inline-block; width: .9em; height: .9em; margin-right: .4em; vertical-align: -.1em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Appui maintenu : la jauge montre la seconde d'appui. */
.btn--hold { position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.btn__fill { position: absolute; inset: 0; background: rgba(4, 20, 13, .28); transform: scaleX(0); transform-origin: left center; }
.btn--danger .btn__fill { background: rgba(255, 123, 111, .24); }
.btn__label { position: relative; }
.btn--hold.is-holding .btn__fill { transform: scaleX(1); transition: transform .9s linear; }
.hint.is-nudged { color: var(--danger); font-weight: 650; }

/* ─── Messages, états, valeurs ────────────────────────────────────────────── */

.note { margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: .94rem; }
.note strong { color: var(--ink); }
.note--warn { border-color: rgba(242, 193, 78, .25); border-left-color: var(--warn); background: var(--warn-soft); color: var(--ink); }
.note--error { border-color: rgba(255, 123, 111, .3); border-left-color: var(--danger); background: var(--danger-soft); color: var(--danger-text); }
blockquote.note { margin-left: 0; margin-right: 0; white-space: pre-wrap; color: var(--ink); }

.status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font: 600 .8rem/1.5 var(--code); }
.status--done { border-color: rgba(255, 123, 111, .5); color: var(--danger); }
.status--done::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.secret {
    margin: 0 0 14px;
    padding: 18px;
    border: 1px solid var(--accent-line);
    border-radius: var(--radius);
    background: var(--well);
    color: var(--ink);
    font-family: var(--code);
    font-size: 1.02rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.secret:empty { display: none; }

/* Le secret apparaît une fois déchiffré ; sans mouvement si le visiteur l'a demandé. */
@media (prefers-reduced-motion: no-preference) {
    .secret-box .secret { transition: opacity .4s ease, transform .4s ease; }
    .secret-box:not(.is-open) .secret { opacity: 0; transform: translateY(6px); }
}

.meta-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--well); font-size: .95rem; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-family: var(--code); font-size: .9rem; }

.copy-row { margin: 0 0 18px; }

/* ─── Tableaux ────────────────────────────────────────────────────────────── */

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
thead th { border-bottom: 1px solid var(--line-strong); color: var(--muted); font-weight: 600; font-size: .85rem; }
tbody th { font-weight: 600; }
tbody tr:last-child th,
tbody tr:last-child td { border-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); }
/* Grille régulière : la première colonne fixée, les cinq services à parts égales, valeurs centrées. */
.compare { min-width: 860px; table-layout: fixed; }
.compare th, .compare td { padding: 14px 16px; vertical-align: middle; text-align: center; }
.compare thead th:first-child { width: 28%; }
.compare th:first-child { padding-left: 20px; text-align: left; }
.compare .us { background: var(--accent-soft); }
.compare thead .us { color: var(--accent); }
.compare .yes { color: var(--accent); font-weight: 650; }
.compare .no { color: var(--danger); font-weight: 650; }
.compare-note { color: var(--muted); font-size: .9rem; max-width: var(--measure); }

/* ─── Questions ───────────────────────────────────────────────────────────── */

.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.qa div { padding: 22px 0; border-top: 1px solid var(--line); }
.qa h3 { margin: 0 0 8px; }
.qa p { margin: 0; color: var(--muted); }

/* ─── Pages de texte : sécurité, données, mentions ────────────────────────── */

.prose { max-width: 760px; padding-top: 64px; }
.prose .meta { color: var(--accent); font-family: var(--code); font-size: .85rem; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.7rem); }
.prose h2 { margin-top: 1.9em; font-size: 1.55rem; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { max-width: var(--measure); color: #cfd5dc; }
.prose li { margin-bottom: .4em; }
.prose pre {
    padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--well);
    font-family: var(--code); font-size: .85rem; line-height: 1.55; overflow-x: auto; color: var(--ink);
}
.prose pre code { padding: 0; border: 0; background: none; }
.prose table { margin: 0 0 1em; }
.prose th { width: 9em; }

/* ─── La flamme : elle vacille, s'éteint, la mèche fume ──────────────────── */

.flame { display: block; overflow: visible; }
.flame__tile { fill: var(--accent); }
.flame__outer { fill: var(--accent-ink); }
.flame__inner { fill: var(--accent); }
.flame__wick { fill: var(--accent-ink); opacity: 0; }
.flame__smoke { fill: none; stroke: rgba(4, 20, 13, .6); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.flame--bare .flame__outer { fill: var(--accent); }
.flame--bare .flame__inner { fill: #dcfff0; }
.flame--bare .flame__wick { fill: var(--muted); }
.flame--bare .flame__smoke { stroke: var(--muted); }

.burnt { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.burnt .status { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
    .flame__fire { transform-box: fill-box; transform-origin: 50% 100%; animation: flame-out .7s ease-in 2.6s both; }
    .flame__outer,
    .flame__inner { transform-box: fill-box; transform-origin: 50% 100%; animation: flame-flicker .9s ease-in-out 3; }
    .flame__inner { animation-duration: .6s; animation-iteration-count: 5; animation-direction: reverse; }
    .flame__wick { animation: flame-show .3s ease 3.1s both; }
    .flame__smoke { animation: flame-smoke 2.2s ease-out 3.1s both; }
    /* Au survol, la flamme se rallume ; elle s'éteint de nouveau quand le pointeur s'en va. */
    .hero__icon:hover .flame * { animation: none; }
}

@keyframes flame-flicker {
    0%, 100% { transform: scale(1, 1) skewX(0); }
    25% { transform: scale(.97, 1.06) skewX(-2deg); }
    50% { transform: scale(1.02, .96) skewX(1.5deg); }
    75% { transform: scale(.98, 1.04) skewX(-1deg); }
}
@keyframes flame-out {
    0% { transform: scale(1, 1); opacity: 1; }
    55% { transform: scale(.6, .4); opacity: .9; }
    100% { transform: scale(.1, 0); opacity: 0; }
}
@keyframes flame-show { from { opacity: 0; } to { opacity: 1; } }
/* La fumée monte puis reste en filet léger : la flamme vient de s'éteindre. */
@keyframes flame-smoke {
    0% { stroke-dashoffset: 1; opacity: 0; transform: translateY(0); }
    25% { opacity: .95; }
    65% { stroke-dashoffset: 0; opacity: .8; }
    100% { stroke-dashoffset: 0; opacity: .45; transform: translateY(-4px); }
}

/* ─── Petits écrans ───────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .app__body { grid-template-columns: 1fr; }
    .app__main { border-right: 0; border-bottom: 1px solid var(--line); }
    .app__main textarea.input { min-height: 150px; }
    .tiles { grid-template-columns: 1fr 1fr; }
    .split { grid-template-columns: 1fr; gap: 32px; }
    .qa, .facts { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .wrap { padding: 0 16px; }
    .hero { padding-top: 44px; }
    .hero h1 { font-size: 2rem; }
    .hero .lede { font-size: 1.05rem; }
    .stage { padding-top: 28px; }
    .section { padding-top: 88px; }
    .page, .prose { padding-top: 40px; }
    .panel { padding: 20px 16px; }
    .app__bar, .app__main, .app__side, .app__foot { padding-left: 16px; padding-right: 16px; }
    .app__pane { padding: 20px 16px; }
    .anatomy { padding: 20px 16px; }
    .anatomy__notes { grid-template-columns: 1fr; }
    .nav { gap: 18px; }
    .nav__hide { display: none; }
    .options > .field { flex: 1 1 100%; }
    .segmented { display: flex; }
    .segmented label { flex: 1; text-align: center; padding-left: 6px; padding-right: 6px; }
    .colophon { margin-top: 88px; }
    .prose th { width: auto; }
}

@media (max-width: 460px) {
    .tiles { grid-template-columns: 1fr; }
}
