/* Jeux en ligne · La Clé des champs — styles (charte graphique 2026, studio ZAA.CC) */
html, body { margin: 0; }
img { max-width: 100%; }

/* Charte graphique La Clé des champs 2026 (ZAA.CC) : bandeaux marine, titres Poppins en majuscules, textes en Libre Baskerville, serrure + cercles translucides. */
:root {
  --noir: #152741;
  --bleu: #3C5E8D;
  --bleupale: #2B7AB5;      /* bleupâle-foncé (contraste) */
  --bleupale-vif: #3D90CB;
  --viridien: #417A70;      /* viridien-foncé */
  --mauve: #78678D;
  --orange: #B05A28;        /* orange-foncé */
  --orange-vif: #D58253;
  --vert: #567805;          /* vert-foncé */
  --ocre: #8A6B07;

  --bg: #FFFFFF;
  --bg-soft: #F3F5F9;
  --surface: #FFFFFF;
  --ink: #152741;
  --muted: #4F5D73;
  --line: #DCE2EC;
  --band: #152741;
  --band-ink: #FFFFFF;
  --band-muted: #C3CEDF;
  --tint-resp: #E6F0F8;
  --tint-pens: #EFEBF3;
  --tint-obs: #E4F0EC;
  --tint-ok: #E8F0E0;
  --tint-no: #F8EBE2;

  --font-title: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-text: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1C30; --bg-soft: #132238; --surface: #18294A; --ink: #EEF2F8; --muted: #AEBBD0; --line: #2A3D5E;
    --band: #0B1626; --band-ink: #FFFFFF; --band-muted: #AEBBD0;
    --bleu: #8FB0DD; --bleupale: #7DB8E3; --viridien: #7FC0B4; --mauve: #B6A7CB; --orange: #EBA27A; --vert: #A6C46A;
    --tint-resp: #17314A; --tint-pens: #2A2741; --tint-obs: #183330; --tint-ok: #1E3324; --tint-no: #3A2A21;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1C30; --bg-soft: #132238; --surface: #18294A; --ink: #EEF2F8; --muted: #AEBBD0; --line: #2A3D5E;
  --band: #0B1626; --band-ink: #FFFFFF; --band-muted: #AEBBD0;
  --bleu: #8FB0DD; --bleupale: #7DB8E3; --viridien: #7FC0B4; --mauve: #B6A7CB; --orange: #EBA27A; --vert: #A6C46A;
  --tint-resp: #17314A; --tint-pens: #2A2741; --tint-obs: #183330; --tint-ok: #1E3324; --tint-no: #3A2A21;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: 16px; line-height: 1.7; }
.gut { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1080px; margin: 0 auto; }
h1, h2, h3, .title { font-family: var(--font-title); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.12; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.45rem, 3.4vw, 1.9rem); }
h3 { font-size: 1.05rem; letter-spacing: .03em; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange-vif); outline-offset: 2px; border-radius: 4px; }
.ui { font-family: var(--font-title); }

/* Barre du haut */
.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 30px; height: auto; }
.logo span { font-family: var(--font-text); color: var(--bleu); font-size: 1.15rem; line-height: 1.05; }
.toplinks { display: flex; gap: 18px; align-items: center; font-family: var(--font-title); font-size: .84rem; font-weight: 500; }
.toplinks a { text-decoration: none; color: var(--muted); }
.toplinks a:hover { color: var(--ink); }
.crumb { color: var(--muted); }

/* Bandeau héros */
.hero { background: var(--band); color: var(--band-ink); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 24px; min-height: 300px; position: relative; }
.hero-txt { display: grid; gap: 14px; padding-block: 40px; position: relative; z-index: 1; }
.since { font-family: var(--font-text); font-size: .9rem; color: var(--band-muted); }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); color: #fff; }
.hero .sub { font-family: var(--font-title); text-transform: uppercase; font-size: clamp(.95rem, 2vw, 1.15rem); line-height: 1.45; color: #fff; font-weight: 400; max-width: 30ch; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pills span { font-family: var(--font-title); font-size: .78rem; font-weight: 500; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); color: #fff; }
.hero-img { align-self: stretch; display: flex; justify-content: flex-end; align-items: center; position: relative; }
.hero-img img { height: 300px; width: auto; max-width: 100%; object-fit: cover; object-position: left center; display: block; }
.hero-dot { position: absolute; border-radius: 50%; background: rgba(255,255,255,.18); pointer-events: none; }

/* Choix de section */
.chooser { background: var(--bg-soft); }
.chooser .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-block: 30px; }
.cat { position: relative; overflow: hidden; text-align: left; border: 0; border-radius: var(--r); padding: 22px 22px 20px; display: grid; gap: 6px; color: #fff; min-height: 150px; align-content: end; transition: transform .2s; }
.cat:hover { transform: translateY(-2px); }
.cat.resp { background: #2B7AB5; }
.cat.pens { background: #78678D; }
.cat::after { content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255,255,255,.14); }
.cat .k { font-family: var(--font-title); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.cat .title { font-size: 1.45rem; color: #fff; }
.cat .d { font-size: .92rem; opacity: .95; max-width: 34ch; }
.cat[aria-selected="true"] { box-shadow: 0 0 0 4px var(--bg-soft), 0 0 0 7px var(--noir); }
:root[data-theme="dark"] .cat[aria-selected="true"] { box-shadow: 0 0 0 4px var(--bg-soft), 0 0 0 7px #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cat[aria-selected="true"] { box-shadow: 0 0 0 4px var(--bg-soft), 0 0 0 7px #fff; } }
.cat .now { position: absolute; top: 14px; left: 22px; font-family: var(--font-title); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.95); color: var(--noir); padding: 2px 9px; border-radius: 999px; }
.cat[aria-selected="false"] .now { display: none; }

main .wrap { padding-block: 36px 50px; }
section.view { display: grid; gap: 34px; }
.sec-head { display: grid; gap: 10px; max-width: 68ch; }
.kicker { font-family: var(--font-title); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.resp-k { color: var(--bleupale); }
.pens-k { color: var(--mauve); }
.lede { color: var(--muted); font-size: 1.02rem; }

.block { display: grid; gap: 18px; padding-top: 26px; border-top: 1px solid var(--line); min-width: 0; }
.block-head { display: grid; gap: 6px; }
.hint { font-size: .88rem; color: var(--muted); }

/* Modes de respiration */
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mode { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 18px 16px; display: grid; gap: 10px; align-content: start; transition: border-color .15s; }
.mode:hover { border-color: var(--bleupale); }
.mode[aria-pressed="true"] { border-color: var(--bleupale); background: var(--tint-resp); box-shadow: inset 0 0 0 1px var(--bleupale); }
.mode .name { font-family: var(--font-title); font-weight: 600; font-size: .98rem; line-height: 1.25; }
.mode .desc { font-size: .86rem; color: var(--muted); line-height: 1.55; }
.rhythm { display: flex; gap: 3px; align-items: flex-end; height: 24px; }
.rhythm i { display: block; height: 100%; border-radius: 3px; }
.rhythm i.in { background: var(--bleupale); }
.rhythm i.out { background: var(--viridien); }
.rhythm i.hold { background: var(--line); height: 55%; }
.timing { font-family: var(--font-title); font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.settings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.lbl, .field > label { font-family: var(--font-title); font-weight: 600; font-size: .86rem; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { font-family: var(--font-title); border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 13px; font-size: .84rem; }
.seg button[aria-pressed="true"] { background: var(--noir); border-color: var(--noir); color: #fff; }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: #fff; border-color: #fff; color: #152741; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: #fff; border-color: #fff; color: #152741; } }
input[type=range] { width: 100%; accent-color: var(--bleupale); }
.scale-row { display: flex; justify-content: space-between; font-family: var(--font-title); font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.scale-row b { color: var(--ink); font-size: .9rem; }

.code { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.code div { display: grid; gap: 8px; padding: 14px; background: var(--bg-soft); border-radius: var(--r); font-size: .88rem; }
.code svg { width: 42px; height: 24px; }
.code b { font-family: var(--font-title); font-weight: 600; text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; }

.launch { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; background: var(--tint-resp); border-radius: var(--r); padding: 22px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { font-family: var(--font-title); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .88rem; border: 0; border-radius: 999px; padding: 13px 26px; background: var(--noir); color: #fff; text-decoration: none; display: inline-block; }
.btn:hover { filter: brightness(1.15); }
.btn.orange { background: #B05A28; }
.btn.line { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); padding: 11.5px 22px; }
.btn.mauve { background: #78678D; }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
:root[data-theme="dark"] .btn:not(.orange):not(.mauve):not(.line) { background: #fff; color: #152741; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.orange):not(.mauve):not(.line) { background: #fff; color: #152741; } }

/* Séance */
.session { position: fixed; inset: 0; z-index: 50; background: #152741; color: #fff; display: grid; grid-template-rows: auto 1fr auto; padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); overflow: hidden; }
.session .bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font-title); font-size: .85rem; color: #C3CEDF; font-variant-numeric: tabular-nums; text-transform: uppercase; letter-spacing: .06em; }
.session .stage { display: grid; place-items: center; gap: 20px; align-content: center; text-align: center; }
.orb-box { width: min(66vw, 330px); aspect-ratio: 1; max-width: 100%; display: grid; place-items: center; position: relative; }
.orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); }
.orb { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #BFE0F5 0%, #3D90CB 50%, #3C5E8D 100%); box-shadow: 0 0 90px rgba(61,144,203,.35); transform: scale(.55); transition-property: transform; transition-timing-function: ease-in-out; }
.s-dot { position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none; }
.phase { font-family: var(--font-title); font-weight: 700; text-transform: uppercase; font-size: clamp(1.9rem, 7vw, 2.8rem); min-height: 1.2em; letter-spacing: .02em; }
.count { font-family: var(--font-title); font-size: 1.05rem; color: #C3CEDF; font-variant-numeric: tabular-nums; min-height: 1.5em; }
.session .foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; position: relative; }
.session .btn { background: #fff; color: #152741; }
.session .btn.line { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.session.dim .stage, .session.dim .bar { opacity: .08; transition: opacity 1.2s; }
.result { display: grid; gap: 16px; max-width: 420px; width: 100%; text-align: center; font-size: .98rem; }
.result input[type=range] { accent-color: #3D90CB; }
.result .scale-row { color: #C3CEDF; }
.result .scale-row b { color: #fff; }

/* Pensées */
.statement { font-family: var(--font-text); font-style: italic; font-size: clamp(1.2rem, 3.2vw, 1.5rem); line-height: 1.45; padding: 26px; border-radius: var(--r); background: var(--tint-pens); min-height: 110px; display: grid; align-items: center; position: relative; overflow: hidden; }
.statement::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: rgba(120,103,141,.12); }
.choice { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choice.four { grid-template-columns: repeat(2, 1fr); }
.choice button { font-family: var(--font-title); font-weight: 600; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 13px 14px; font-size: .92rem; text-align: center; }
.choice button:hover:not(:disabled) { border-color: var(--mauve); }
.choice button.right { border-color: var(--vert); background: var(--tint-ok); }
.choice button.wrong { border-color: var(--orange); background: var(--tint-no); }
.choice button:disabled { cursor: default; }
.feedback { border-radius: var(--r); padding: 16px 18px; font-size: .95rem; display: grid; gap: 6px; }
.feedback.ok { background: var(--tint-ok); }
.feedback.no { background: var(--tint-no); }
.feedback strong { font-family: var(--font-title); }
.feedback .alt { font-style: italic; }
.progress { display: flex; gap: 5px; }
.progress i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.progress i.done { background: var(--mauve); }
.progress i.now { background: var(--noir); }
:root[data-theme="dark"] .progress i.now { background: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .progress i.now { background: #fff; } }
.game { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; padding-top: 28px; border-top: 1px solid var(--line); }
.game-intro { display: grid; gap: 10px; }
.num { font-family: var(--font-title); font-weight: 700; font-size: .8rem; color: var(--mauve); letter-spacing: .1em; text-transform: uppercase; }
.game-body { display: grid; gap: 14px; min-width: 0; }

.input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.input-row input[type=text] { flex: 1 1 220px; min-width: 0; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 11px 18px; font-family: var(--font-text); }
.steps { display: grid; gap: 4px; }
.step { border-left: 3px solid var(--line); padding: 8px 0 8px 16px; display: grid; gap: 2px; }
.step small { font-family: var(--font-title); color: var(--muted); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.step .t { font-style: italic; }
.step:nth-child(1) .t { font-size: 1.25rem; }
.step:nth-child(2) { border-color: var(--mauve); }
.step:nth-child(2) .t { font-size: 1.08rem; }
.step:nth-child(3) { border-color: var(--viridien); }
.step:nth-child(3) .t { font-size: .97rem; color: var(--muted); }
.step.in { animation: rise .6s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 16px 18px; background: var(--bg-soft); border-radius: var(--r); }
.pair .note { grid-column: 1 / -1; font-size: .9rem; color: var(--muted); }

/* Pied */
.bridge { background: #152741; color: #fff; overflow: hidden; }
.bridge .wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding-block: 34px; position: relative; }
.bridge h2 { color: #fff; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.bridge p { color: #C3CEDF; max-width: 52ch; margin-top: 8px; }
.bridge .btn { background: #fff; color: #152741; }
.bridge .ring { position: absolute; right: -60px; top: -80px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none; }
.care .wrap { padding-block: 28px 40px; display: grid; gap: 16px; }
.care p { max-width: 72ch; font-size: .95rem; color: var(--muted); }
.lines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lines div { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 2px; }
.lines b { font-family: var(--font-title); font-weight: 600; font-size: 1.08rem; user-select: all; font-variant-numeric: tabular-nums; }
.lines span { font-size: .84rem; color: var(--muted); }
.proto { font-family: var(--font-title); font-size: .76rem; color: var(--muted); }

@media (max-width: 900px) {
  .modes, .settings, .code { grid-template-columns: 1fr 1fr; }
  .game { grid-template-columns: 1fr; gap: 16px; }
  .chooser .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; }
  .hero-img { display: none; }
  .hero-txt { padding-block: 32px 36px; }
  .chooser .wrap { grid-template-columns: 1fr; gap: 14px; }
  .cat { min-height: 120px; }
  .launch { grid-template-columns: 1fr; }
  .lines { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }
  .toplinks .crumb { display: none; }
}
@media (max-width: 440px) {
  .modes, .settings, .code { grid-template-columns: 1fr; }
  .choice { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .step.in { animation: none; }
  .orb { transition-duration: 0s !important; }
  .cat { transition: none; }
}

/* --- Respiration pensée pour le téléphone --- */
.quick { display: grid; grid-template-columns: 1fr auto; gap: 16px 28px; align-items: center; background: var(--tint-resp); border-radius: var(--r); padding: 24px; position: relative; overflow: hidden; }
.quick::after { content: ""; position: absolute; right: -50px; top: -70px; width: 180px; height: 180px; border-radius: 50%; background: rgba(43,122,181,.10); pointer-events: none; }
.quick-txt { display: grid; gap: 6px; position: relative; z-index: 1; }
.summary { font-family: var(--font-title); font-weight: 500; font-size: .95rem; color: var(--muted); }
.btn.big { font-size: 1.05rem; padding: 18px 38px; position: relative; z-index: 1; }
.btn.small { padding: 9px 18px; font-size: .8rem; min-height: 44px; }
.sound-tip { grid-column: 1 / -1; display: grid; gap: 10px; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; position: relative; z-index: 1; }
.sound-tip b { font-family: var(--font-title); color: var(--ink); font-weight: 600; }
.seg button { min-height: 44px; padding: 8px 16px; }
input[type=range] { height: 32px; }
.more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.more + .more { border-top: 0; }
.more summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding-block: 10px; }
.more summary::-webkit-details-marker { display: none; }
.more summary > span { display: grid; gap: 2px; }
.more summary b { font-family: var(--font-title); font-weight: 700; text-transform: uppercase; font-size: .95rem; letter-spacing: .03em; }
.sum-val { font-family: var(--font-title); font-size: .84rem; color: var(--muted); }
.more summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); margin-right: 6px; transition: transform .2s; flex: none; }
.more[open] summary::after { transform: rotate(-135deg); }
.more[open] { padding-bottom: 22px; }
.more[open] > .settings, .more[open] > .code { margin-bottom: 16px; }
.linkbtn { background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; font-family: var(--font-title); font-size: .9rem; padding: 10px; min-height: 44px; }

/* Séance : étapes « avant / après » */
.ask { display: grid; gap: 16px; justify-items: center; max-width: 460px; width: 100%; }
.ask-q { font-family: var(--font-title); font-weight: 600; font-size: clamp(1.15rem, 4.5vw, 1.4rem); line-height: 1.35; }
.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; width: 100%; }
.scale button { min-height: 52px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.35); background: rgba(255,255,255,.06); color: #fff; font-family: var(--font-title); font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.scale button:hover, .scale button:focus-visible { background: #fff; color: #152741; }
.scale-ends { display: flex; justify-content: space-between; width: 100%; font-family: var(--font-title); font-size: .78rem; color: #C3CEDF; }
.session .linkbtn { color: #C3CEDF; }
.session .foot .btn { min-height: 48px; }
.result .soft { color: #C3CEDF; font-size: .92rem; }
#s-compare { font-family: var(--font-title); font-size: 1.15rem; line-height: 1.45; }
.paused .orb { transition-duration: .6s !important; }

@media (max-width: 640px) {
  .quick { grid-template-columns: 1fr; padding: 20px; }
  .btn.big { width: 100%; }
  .modes { grid-template-columns: 1fr; gap: 8px; }
  .mode { grid-template-columns: 1fr 96px; align-items: center; gap: 4px 14px; padding: 14px 16px; }
  .mode .name { grid-column: 1; }
  .mode .rhythm { grid-column: 2; grid-row: 1 / span 2; }
  .mode .timing { grid-column: 1; }
  .mode .desc { grid-column: 1 / -1; margin-top: 4px; }
  .mode[aria-pressed="false"] .desc { display: none; }
  .settings { grid-template-columns: 1fr; }
  .code { grid-template-columns: 1fr 1fr; }
  .scale { grid-template-columns: repeat(6, 1fr); }
  .session .foot { gap: 8px; }
  .session .foot .btn { padding: 12px 18px; flex: 1 1 0; }
}

/* --- Observer --- */
.cat.obs { background: #417A70; }
.obs-k { color: var(--viridien); }
.btn.green { background: #417A70; color: #fff; }
:root[data-theme="dark"] .btn.green { background: #48877D; }
.obs { display: grid; gap: 18px; max-width: 640px; }
.obs-senses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.obs-senses div { display: grid; gap: 6px; font-family: var(--font-title); font-size: .74rem; font-weight: 500; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .05em; }
.obs-senses i { height: 6px; border-radius: 3px; background: var(--line); }
.obs-senses .done i { background: var(--viridien); }
.obs-senses .now i { background: var(--noir); }
.obs-senses .now { color: var(--ink); }
:root[data-theme="dark"] .obs-senses .now i { background: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .obs-senses .now i { background: #fff; } }
.obs-card { display: grid; gap: 16px; justify-items: start; background: var(--tint-obs); border-radius: var(--r); padding: 26px; position: relative; overflow: hidden; }
.obs-card::after { content: ""; position: absolute; right: -50px; top: -60px; width: 170px; height: 170px; border-radius: 50%; background: rgba(65,122,112,.12); pointer-events: none; }
.obs-card > * { position: relative; z-index: 1; }
.obs-big { font-family: var(--font-title); font-weight: 700; font-size: clamp(2.4rem, 9vw, 3.4rem); line-height: 1; color: var(--viridien); }
.obs-head { display: flex; gap: 16px; align-items: center; }
.obs-num { font-family: var(--font-title); font-weight: 700; font-size: 3.6rem; line-height: 1; color: var(--viridien); font-variant-numeric: tabular-nums; min-width: 1.2ch; }
.obs-q { font-family: var(--font-title); font-weight: 600; font-size: clamp(1.15rem, 4vw, 1.35rem); line-height: 1.3; }
.obs-hint { font-style: italic; color: var(--muted); }
.obs-dots { display: flex; gap: 10px; flex-wrap: wrap; }
.obs-dots i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--viridien); transition: background .25s, transform .25s; }
.obs-dots i.on { background: var(--viridien); transform: scale(1.08); }
.obs-card .btn.big { width: 100%; max-width: 360px; }
.obs-card .actions { width: 100%; }
@media (max-width: 640px) {
  .obs-card { padding: 20px; }
  .obs-card .btn.big { max-width: none; }
  .obs-senses div { font-size: .64rem; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) { .obs-dots i { transition: none; } }

/* --- Bandeau version d'essai --- */
.essai { background: var(--tint-no); border-bottom: 1px solid var(--line); }
.essai .wrap { display: grid; grid-template-columns: auto 1fr; gap: 14px 22px; align-items: start; padding-block: 22px; }
.essai-tag { font-family: var(--font-title); font-weight: 700; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; background: #B05A28; color: #fff; padding: 5px 12px; border-radius: 999px; white-space: nowrap; margin-top: 2px; }
.essai-txt { display: grid; gap: 6px; min-width: 0; }
.essai h2 { font-size: 1.1rem; letter-spacing: .03em; }
.essai p { max-width: 75ch; font-size: .95rem; }
.essai p b { font-weight: 600; }
@media (max-width: 640px) { .essai .wrap { grid-template-columns: 1fr; } .essai-tag { justify-self: start; } }

/* --- Les 10 pièges --- */
.learn { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.traps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.trap { border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
.trap[open] { border-color: var(--mauve); background: var(--tint-pens); }
.trap summary { list-style: none; cursor: pointer; font-family: var(--font-title); font-weight: 600; font-size: .9rem; padding: 12px 40px 12px 14px; min-height: 48px; position: relative; }
.trap summary::-webkit-details-marker { display: none; }
.trap summary::after { content: "+"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; color: var(--mauve); }
.trap[open] summary::after { content: "–"; }
.trap p { padding: 0 14px 10px; font-size: .9rem; }
.trap .ex { font-style: italic; color: var(--muted); padding-bottom: 14px; }
.learn-note { background: var(--bg-soft); border-radius: var(--r); padding: 12px 14px; font-size: .92rem; }
.learn-note b, .learn > p b { font-weight: 600; }
@media (max-width: 640px) { .traps { grid-template-columns: 1fr; } .learn .btn { width: 100%; } }

/* --- La grille en jeu --- */
.cat.grille { background: #3C5E8D; }
.grille-k { color: var(--bleu); }
.btn.blue { background: #3C5E8D; color: #fff; }
.levels { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.levels li { display: flex; align-items: center; gap: 8px; font-family: var(--font-title); font-weight: 600; font-size: .86rem; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); }
.levels li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink); font-size: .8rem; }
.levels li.now { background: var(--noir); color: #fff; }
.levels li.now span { background: #fff; color: #152741; }
.levels li.done { color: var(--ink); }
.levels li.done span { background: var(--bleu); color: #fff; }
:root[data-theme="dark"] .levels li.now { background: #fff; color: #152741; }
:root[data-theme="dark"] .levels li.now span { background: #152741; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .levels li.now { background: #fff; color: #152741; } :root:not([data-theme="light"]) .levels li.now span { background: #152741; color: #fff; } }
.gr-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: start; }
.gr-play { display: grid; gap: 16px; min-width: 0; }
.situation { border-left: 4px solid var(--orange-vif); background: var(--bg-soft); border-radius: 0 var(--r) var(--r) 0; padding: 14px 18px; display: grid; gap: 4px; }
.situation .kicker { color: var(--orange); }
.situation p { font-style: italic; }
.gr-stage { display: grid; gap: 14px; justify-items: start; }
.gr-stage > .statement, .gr-stage > .choice, .gr-stage > .feedback { width: 100%; }
.gr-ask { font-family: var(--font-title); font-weight: 600; font-size: .95rem; }
.gr-stage .btn.big { width: 100%; max-width: 360px; }
.choice.long { grid-template-columns: 1fr; }
.choice.long button { text-align: left; font-weight: 500; line-height: 1.4; }
.gr-big { color: var(--bleu); font-size: clamp(1.8rem, 6vw, 2.4rem); }
.formula { font-family: var(--font-title); font-weight: 600; text-transform: uppercase; font-size: .86rem; letter-spacing: .03em; background: var(--tint-resp); padding: 12px 14px; border-radius: var(--r); line-height: 1.5; }

.sheet { border: 1.5px solid var(--noir); border-radius: var(--r); overflow: hidden; background: var(--surface); position: sticky; top: calc(12px + env(safe-area-inset-top, 0px)); }
:root[data-theme="dark"] .sheet { border-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sheet { border-color: var(--line); } }
.sheet-title { background: #152741; color: #fff; font-family: var(--font-title); font-weight: 700; text-transform: uppercase; font-size: .82rem; letter-spacing: .06em; padding: 10px 14px; }
.sheet-row { border-top: 1px solid var(--line); }
.sheet-row:first-child { border-top: 0; }
.sheet-row h4 { margin: 0; font-family: var(--font-title); font-weight: 600; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; padding: 8px 14px 2px; color: var(--muted); }
.sheet-row h4 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.sheet-row ul { list-style: none; margin: 0; padding: 2px 14px 10px; display: grid; gap: 4px; min-height: 26px; }
.sheet-row li { font-size: .88rem; line-height: 1.45; display: flex; gap: 10px; justify-content: space-between; align-items: baseline; }
.sheet-row li.new { animation: pop .6s ease; }
.sheet-row li.empty { color: var(--line); font-size: .8rem; }
.sheet-row .type { flex: none; font-family: var(--font-title); font-weight: 600; font-size: .72rem; background: var(--tint-pens); color: var(--mauve); padding: 1px 8px; border-radius: 999px; }
.sheet-row .ch { display: inline-block; font-family: var(--font-title); font-size: .8rem; background: var(--tint-ok); padding: 1px 9px; border-radius: 999px; margin: 0 4px 0 0; }
.sheet-row li.chips { justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
.sheet-row.croy li { font-style: italic; }
@keyframes pop { from { background: var(--tint-resp); } to { background: transparent; } }

@media (max-width: 900px) {
  .gr-layout { grid-template-columns: 1fr; }
  .sheet { position: static; }
}
@media (max-width: 640px) {
  .gr-stage .btn.big { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .sheet-row li.new { animation: none; } }
