/* Atelier Douze — composants ds-* du site (docs/design/design-system.md §10-12).
   Les valeurs viennent toutes de tokens.css (copie générée de design/tokens/build/tokens.css). */

/* ---------- Polices : fichiers officiels (OFL) servis par le site, aucun service tiers ----------
   Copiés dans assets/fonts/ par `site/dev.py sync` (non versionnés, voir assets/fonts/LISEZMOI.txt). */
@font-face { font-family: "Lexend"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Lexend-Regular.ttf") format("truetype"); }
@font-face { font-family: "Lexend"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/Lexend-Bold.ttf") format("truetype"); }
@font-face { font-family: "Rowdies"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Rowdies-Regular.ttf") format("truetype"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: local("JetBrains Mono"), local("JetBrainsMono-Regular"), url("../fonts/JetBrainsMono-Regular.ttf") format("truetype"); }

:root {
    color-scheme: dark;
    --gutter: var(--ds-space-5);
    --page: 1120px;
    --ring: 0 0 0 var(--ds-border-strong) var(--ds-color-semantic-focus);
}
@media (min-width: 720px) { :root { --gutter: var(--ds-space-7); } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--ds-color-semantic-bg);
    color: var(--ds-color-semantic-text);
    font-family: var(--ds-font-family-text);
    font-size: var(--ds-font-size-lg);
    line-height: var(--ds-font-line-height-normal);
    overflow-x: hidden;
}
/* Motif « plan technique » : gabarit de cellule 86 × 43 en traits blueprint (§7). */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(26.565deg, transparent 0 37.46px, var(--ds-color-semantic-blueprint) 37.46px 38.46px),
        repeating-linear-gradient(-26.565deg, transparent 0 37.46px, var(--ds-color-semantic-blueprint) 37.46px 38.46px);
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 70% 0%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 60% at 70% 0%, #000 0%, transparent 75%);
}
main { flex: 1; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--ds-color-semantic-primary); text-underline-offset: 0.18em; }
a:hover { color: var(--ds-color-semantic-primary-hover); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--ds-radius-md); }
h1, h2, h3 {
    font-family: var(--ds-font-family-display);
    font-weight: 400;
    line-height: var(--ds-font-line-height-tight);
    letter-spacing: -0.01em;
    margin: 0 0 var(--ds-space-4);
    color: var(--ds-color-semantic-title);
}
h1 { font-size: clamp(var(--ds-font-size-3xl), 7vw, var(--ds-font-size-5xl)); }
h2 { font-size: clamp(var(--ds-font-size-2xl), 4vw, var(--ds-font-size-3xl)); }
h3 { font-size: var(--ds-font-size-xl); color: var(--ds-color-semantic-text); }
p { margin: 0 0 var(--ds-space-5); }
code { font-family: var(--ds-font-family-mono); font-size: 0.9em; }
code { background: var(--ds-color-semantic-surface-2); padding: 0 var(--ds-space-2); border-radius: var(--ds-radius-xs); overflow-wrap: anywhere; }
.muted { color: var(--ds-color-semantic-text-muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 100; }
.skip-link:focus { top: var(--ds-space-3); }

.wrap { width: 100%; max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--ds-space-8) 0; }
@media (min-width: 720px) { .section { padding: var(--ds-space-9) 0; } }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--ds-space-3) var(--ds-space-5); margin-bottom: var(--ds-space-6); }
.section__head h2 { margin: 0; }
.eyebrow { display: flex; align-items: center; gap: var(--ds-space-3); margin-bottom: var(--ds-space-4); }

/* ---------- Signature « règle » graduée (§6) ---------- */
.ds-ruler {
    height: 4px;
    border-top: 1px solid var(--ds-color-semantic-border-subtle);
    background-image: repeating-linear-gradient(90deg, var(--ds-color-semantic-border-subtle) 0 1px, transparent 1px 8px);
    background-size: 100% 3px;
    background-repeat: no-repeat;
}

/* ---------- En-tête ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--ds-color-semantic-band-strong);
    border-bottom: 1px solid var(--ds-color-semantic-border-subtle);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.site-header__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-3) var(--ds-space-5); padding-top: var(--ds-space-3); padding-bottom: var(--ds-space-3); }
.brand { display: flex; align-items: center; gap: var(--ds-space-4); color: var(--ds-color-semantic-text); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--ds-color-semantic-text); }
.brand__logo { width: 150px; height: auto; flex: none; --brand-accent: var(--ds-color-semantic-title); }
.brand__sig { font-size: var(--ds-font-size-xs); color: var(--ds-color-semantic-text-muted); line-height: var(--ds-font-line-height-snug); max-width: 22ch; display: none; }
@media (min-width: 900px) { .brand__sig { display: block; } }
.site-nav { order: 3; width: 100%; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--ds-space-1); }
.site-nav a {
    display: flex; align-items: center; min-height: var(--ds-size-control-lg);
    padding: 0 var(--ds-space-4);
    color: var(--ds-color-semantic-text-muted);
    text-decoration: none; font-size: var(--ds-font-size-md); font-weight: 700;
    border-bottom: 2px solid transparent;
    transition: color var(--ds-motion-duration-fast) var(--ds-motion-easing-out), border-color var(--ds-motion-duration-fast) var(--ds-motion-easing-out);
}
.site-nav a:hover { color: var(--ds-color-semantic-text); }
.site-nav a[aria-current="page"] { color: var(--ds-color-semantic-text); border-bottom-color: var(--ds-color-semantic-primary); }
.site-header__tools { margin-left: auto; display: flex; gap: var(--ds-space-3); }
@media (max-width: 719px) {
    .site-nav ul { justify-content: space-between; }
    .site-nav a { padding: 0 var(--ds-space-3); }
}
@media (min-width: 720px) {
    .site-nav a { min-height: 72px; }
    .site-nav { order: 0; width: auto; margin-left: auto; }
    .site-header__tools { margin-left: 0; }
}

/* ---------- Bouton (§10) ---------- */
.ds-button {
    --b-bg: var(--ds-color-semantic-surface-3);
    --b-bg-hover: var(--ds-color-semantic-border);
    --b-fg: var(--ds-color-semantic-text);
    --b-bd: var(--ds-color-semantic-border);
    display: inline-flex; align-items: center; justify-content: center; gap: var(--ds-space-3);
    min-height: var(--ds-size-control-lg); min-width: 96px;
    padding: 6px var(--ds-space-5);
    font: 700 var(--ds-font-size-md) / 1 var(--ds-font-family-text);
    color: var(--b-fg); background: var(--b-bg);
    border: 1px solid var(--b-bd); border-radius: var(--ds-radius-md);
    text-decoration: none; cursor: pointer;
    transition: background-color var(--ds-motion-duration-fast) var(--ds-motion-easing-out), scale var(--ds-motion-duration-fast) var(--ds-motion-easing-out);
}
.ds-button:hover { background: var(--b-bg-hover); color: var(--b-fg); scale: 1.02; }
.ds-button:active { scale: 0.97; transition-duration: var(--ds-motion-duration-instant); }
.ds-button:disabled, .ds-button[aria-disabled="true"] { opacity: var(--ds-opacity-disabled); pointer-events: none; }
.ds-button--primary { --b-bg: var(--ds-color-semantic-primary); --b-bg-hover: var(--ds-color-semantic-primary-hover); --b-fg: var(--ds-color-semantic-primary-text); --b-bd: var(--ds-color-semantic-primary-pressed); }
.ds-button--primary:active { background: var(--ds-color-semantic-primary-pressed); }
.ds-button--ghost { --b-bg: transparent; --b-bg-hover: var(--ds-color-semantic-focus-soft); --b-bd: transparent; }
.ds-button--lg { min-height: 52px; padding: 0 var(--ds-space-6); font-size: var(--ds-font-size-lg); }
.ds-icon-button { min-width: var(--ds-size-control-lg); width: var(--ds-size-control-lg); padding: 0; }
.ds-icon-button svg { width: var(--ds-size-icon); height: var(--ds-size-icon); fill: currentColor; }
.button-row { display: flex; flex-wrap: wrap; gap: var(--ds-space-3); }

/* ---------- Étiquette d'expérience, pastilles (§10) ---------- */
.ds-tag {
    display: inline-block; padding: 1px 6px;
    font: 700 var(--ds-font-size-xs) / 1.4 var(--ds-font-family-text);
    letter-spacing: 0.08em; text-transform: uppercase;
    background: var(--ds-color-semantic-surface-3); color: var(--ds-color-semantic-text);
    border-radius: var(--ds-radius-xs);
}
.ds-badge {
    display: inline-flex; align-items: center; gap: var(--ds-space-2);
    padding: 1px 7px; border-radius: var(--ds-radius-pill);
    font: 700 var(--ds-font-size-2xs) / 1.5 var(--ds-font-family-text);
    background: var(--ds-color-semantic-surface-3); color: var(--ds-color-semantic-text);
}
.ds-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ds-badge--success { color: var(--ds-color-semantic-success); background: color-mix(in srgb, var(--ds-color-semantic-success) 14%, transparent); }
.ds-badge--muted { color: var(--ds-color-semantic-text-muted); }

/* ---------- Panneau (§10) ---------- */
.ds-panel {
    padding: var(--ds-space-5) var(--ds-space-6);
    background: var(--ds-color-semantic-surface);
    border: 1px solid var(--ds-color-semantic-border);
    border-radius: var(--ds-radius-xl);
}
.ds-panel--accent { border-color: var(--ds-color-semantic-title); }
.ds-panel p:last-child { margin-bottom: 0; }
.grid { display: grid; gap: var(--ds-space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

figure { margin: 0; }
figcaption { margin-top: var(--ds-space-3); font-size: var(--ds-font-size-sm); color: var(--ds-color-semantic-text-muted); }

/* ---------- Barre de progression (§10) ---------- */
.ds-progress { position: relative; height: 12px; background: var(--ds-color-game-bar-bg); border: 1px solid var(--ds-color-semantic-border-subtle); border-radius: var(--ds-radius-lg); overflow: hidden; }
.ds-progress__fill { height: 100%; width: 0%; background: var(--ds-color-semantic-primary); border-radius: inherit; transition: width var(--ds-motion-duration-base) var(--ds-motion-easing-out); }

/* ---------- Lecteur WebGL ---------- */
.player { display: flex; flex-direction: column; gap: var(--ds-space-4); }
.player__frame {
    position: relative; aspect-ratio: 16 / 9; width: 100%;
    background: var(--ds-color-semantic-bg-deep);
    border: 1px solid var(--ds-color-semantic-border);
    border-radius: var(--ds-radius-xl);
    box-shadow: var(--ds-elevation-lg);
    overflow: hidden;
}
.player__frame canvas { width: 100%; height: 100%; background: #000; }
.player__frame:fullscreen { border-radius: 0; border: 0; display: grid; place-items: center; background: #000; container-type: size; }
.player__frame:fullscreen canvas { width: min(100cqw, 100cqh * 16 / 9); height: min(100cqh, 100cqw * 9 / 16); } /* 16:9 only */
.player__overlay {
    position: absolute; inset: 0; z-index: 2;
    display: grid; place-items: center; padding: var(--ds-space-5);
    background-color: var(--ds-color-semantic-bg-deep);
    background-image:
        repeating-linear-gradient(26.565deg, transparent 0 18.23px, var(--ds-color-semantic-blueprint) 18.23px 19.23px),
        repeating-linear-gradient(-26.565deg, transparent 0 18.23px, var(--ds-color-semantic-blueprint) 18.23px 19.23px);
    text-align: center;
}
.player__overlay[hidden] { display: none; }
.player__card {
    width: min(100%, 440px);
    display: flex; flex-direction: column; align-items: center; gap: var(--ds-space-4);
    padding: var(--ds-space-6);
    background: var(--ds-color-semantic-band-strong);
    border: 1px solid var(--ds-color-semantic-border-strong);
    border-radius: var(--ds-radius-lg);
}
.player__card .ds-ruler { align-self: stretch; }
.player__card h2 { margin: 0; font-size: var(--ds-font-size-2xl); }
.player__card p { margin: 0; font-size: var(--ds-font-size-md); color: var(--ds-color-semantic-text-muted); }
.player__card .ds-progress { align-self: stretch; }
.player__mark { width: 56px; height: 56px; --brand-accent: var(--ds-color-semantic-title); color: var(--ds-color-semantic-text); }
.player__state { font-family: var(--ds-font-family-mono); font-size: var(--ds-font-size-xs); color: var(--ds-color-semantic-text-muted); min-height: 1.5em; }
.player__error { color: var(--ds-color-semantic-danger-text) !important; }
/* Lot LA1 (maquettes v6-la1 a1, a2, a7) : pseudo d'invité pendant le téléchargement, étapes du chargement, ligne du pseudo. */
.player__pseudo { align-self: stretch; display: flex; flex-direction: column; gap: var(--ds-space-3); }
.player__pseudo[hidden], .player__steps[hidden], .player__who[hidden] { display: none; }
.player__pseudo-row { display: flex; gap: var(--ds-space-2); }
.player__pseudo-input {
    flex: 1; min-width: 0; height: 56px; padding: 0 var(--ds-space-4);
    font: inherit; font-size: var(--ds-font-size-xl); font-weight: 700; color: var(--ds-color-semantic-text);
    background: var(--ds-color-semantic-bg-deep); border: 2px solid var(--ds-color-semantic-border-strong); border-radius: var(--ds-radius-md);
}
.player__pseudo-input:focus { outline: none; border-color: var(--ds-color-semantic-focus); box-shadow: 0 0 0 4px var(--ds-color-semantic-focus-soft); }
.player__pseudo-row .ds-icon-button { width: 56px; height: 56px; flex: none; }
.player__hint { text-align: left; font-size: var(--ds-font-size-sm) !important; }
.player__optional { text-align: center; margin-top: var(--ds-space-2, 8px); }
.player__go { width: 100%; justify-content: center; }
.player__go kbd { margin-left: var(--ds-space-2); display: inline-flex; align-items: center; height: 20px; padding: 0 6px; background: rgba(18, 12, 24, 0.25); color: inherit; border: 1px solid rgba(18, 12, 24, 0.3); }
.player__steps { align-self: stretch; display: flex; gap: var(--ds-space-2); }
.player__steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--ds-color-game-bar-bg, var(--ds-color-semantic-border)); }
.player__steps span.is-done { background: var(--ds-color-semantic-success); }
.player__steps span.is-on { background: var(--ds-color-semantic-primary); }
.player__who { font-size: var(--ds-font-size-sm) !important; }
.player__who b { color: var(--ds-color-semantic-text); }
.player__link { padding: 0; border: 0; background: none; font: inherit; color: var(--ds-color-semantic-text); text-decoration: underline; cursor: pointer; }
.player__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-3); }
.player__meta { font-size: var(--ds-font-size-sm); color: var(--ds-color-semantic-text-muted); }
@media (max-width: 559px) {
    .player__frame { aspect-ratio: 16 / 9; }
    .player__card { padding: var(--ds-space-5) var(--ds-space-4); }
}
kbd {
    display: inline-block; min-width: 2em; padding: 1px 6px; text-align: center;
    font: 700 var(--ds-font-size-xs) / 1.5 var(--ds-font-family-text);
    background: var(--ds-color-semantic-surface-2); color: var(--ds-color-semantic-text);
    border: 1px solid var(--ds-color-semantic-border); border-bottom-width: 2px; border-radius: var(--ds-radius-md);
}

/* ---------- Texte long (mentions, carnet) ---------- */
.prose > * { max-width: var(--ds-size-measure); } /* lines capped, block stays left-aligned with the page grid (.wrap keeps its width) */
.prose h2 { margin-top: var(--ds-space-8); }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 var(--ds-space-5); }
.prose li { margin-bottom: var(--ds-space-2); }
.page-head { padding: var(--ds-space-8) 0 var(--ds-space-6); }
.page-head h1 { font-size: clamp(var(--ds-font-size-3xl), 6vw, 3.5rem); }
.page-head p { max-width: var(--ds-size-measure); color: var(--ds-color-semantic-text-muted); font-size: var(--ds-font-size-xl); margin: 0; }
@media (min-width: 720px) { .page-head p { font-size: var(--ds-font-size-2xl); line-height: 1.45; } }

/* Carnet d'atelier */
.log { list-style: none; margin: 0; padding: 0; max-width: var(--ds-size-measure); }
.log__entry { position: relative; padding: 0 0 var(--ds-space-7) var(--ds-space-6); border-left: 1px solid var(--ds-color-semantic-border); }
.log__entry:last-child { padding-bottom: 0; }
.log__entry::before {
    content: ""; position: absolute; left: -6px; top: 8px; width: 11px; height: 11px;
    background: var(--ds-color-semantic-bg); border: 2px solid var(--ds-color-semantic-title); border-radius: 50%;
}
.log__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--ds-space-2) var(--ds-space-4); margin-bottom: var(--ds-space-3); }
.log__version { font-family: var(--ds-font-family-mono); font-size: var(--ds-font-size-xl); color: var(--ds-color-semantic-title); }
.log__date { font-family: var(--ds-font-family-mono); font-size: var(--ds-font-size-sm); color: var(--ds-color-semantic-text-muted); }
.log__entry h2 { font-size: var(--ds-font-size-2xl); color: var(--ds-color-semantic-text); margin-bottom: var(--ds-space-3); }
.log__entry ul { margin: 0; padding-left: 1.2em; color: var(--ds-color-semantic-text-muted); }
.log__entry li { margin-bottom: var(--ds-space-2); }
.log__intro { margin: 0 0 var(--ds-space-3); color: var(--ds-color-semantic-text); }
.log__group {
    margin: var(--ds-space-5) 0 var(--ds-space-2);
    font: 700 var(--ds-font-size-xs) / 1.4 var(--ds-font-family-text);
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--ds-color-semantic-success);
}
.log__group--soon { color: var(--ds-color-semantic-info); }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: var(--ds-space-8); background: var(--ds-color-semantic-bg-deep); border-top: 1px solid var(--ds-color-semantic-border-subtle); font-size: var(--ds-font-size-sm); color: var(--ds-color-semantic-text-muted); }
.site-footer__grid { display: grid; gap: var(--ds-space-6); padding-top: var(--ds-space-7); padding-bottom: var(--ds-space-7); }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 2fr 1fr; } }
.site-footer p { margin: 0 0 var(--ds-space-3); max-width: 70ch; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--ds-space-2) var(--ds-space-5); }
.site-footer__mark { width: 40px; height: 40px; margin-bottom: var(--ds-space-4); --brand-accent: var(--ds-color-semantic-title); color: var(--ds-color-semantic-text); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}

/* ---------- Logo en ligne (couleurs pilotées par les jetons, §2) ---------- */
.lg { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lg-m { stroke: currentColor; stroke-width: 3.33333; }
.lg-a { stroke: var(--brand-accent, var(--ds-color-semantic-title)); stroke-width: 3.33333; }
.lg-h { stroke: currentColor; stroke-width: 3; }
.lg-r { stroke: currentColor; stroke-width: 2; }
.lg-t { stroke: currentColor; stroke-width: 1.5; }

/* ---------- Discord (passe SD1, maquette design/v10-site.html, design system §12) ---------- */
/* Couleur de marque de Discord (tierce) : seulement sur ses liens, jamais ailleurs. */
:root { --discord: #5865F2; --discord-hover: #4752C4; --discord-pressed: #3C45A5; --discord-ink: #8891F7; }
.ds-discord-mark { width: 20px; height: 20px; fill: currentColor; flex: none; }
/* Planche « États · bouton Discord » (RV-C5a) : le bleu de la marque au repos ; plus sombre au survol (#4752C4) et à l'appui
   (#3C45A5) avec un contour clair ; focus : anneau or de 2 px décollé de 2 px ; désactivé : 45 % (.ds-button). */
.ds-button--discord { --b-bg: var(--discord); --b-bg-hover: var(--discord-hover); --b-fg: #fff; --b-bd: var(--discord); }
.ds-button--discord:hover { border-color: var(--ds-color-semantic-text); }
.ds-button--discord:active { background: var(--discord-pressed); border-color: var(--ds-color-semantic-text); }
.ds-button--discord:focus-visible { box-shadow: none; outline: var(--ds-border-strong) solid var(--ds-color-semantic-focus); outline-offset: 2px; }
.site-header__discord { min-width: 0; padding: 6px var(--ds-space-4); }
.site-header__discord .ds-discord-mark { color: var(--discord-ink); }
.ds-panel h3 { margin: 0 0 var(--ds-space-3); font: 400 var(--ds-font-size-2xl) / 1.2 var(--ds-font-family-display); color: var(--ds-color-semantic-title); }
.ds-panel:not(.ds-panel--accent) p { color: var(--ds-color-semantic-text-muted); }
.ds-panel .button-row { margin-top: var(--ds-space-4); }
.ds-panel--discord { border-color: var(--discord); }

/* Téléphone : la carte du lecteur n'est plus coupée par le cadre 16:9, le cadre grandit avec elle. */
@media (max-width: 559px) {
    .player__frame { aspect-ratio: auto; min-height: calc((100vw - 2 * var(--gutter)) * 9 / 16); }
    .player__frame canvas { position: absolute; inset: 0; }
    .player__overlay { position: relative; min-height: inherit; }
}

/* ===== Lecteur mobile (MOB1) ===== */
/* Lot MOB1b (docs/design/web-mobile.md §7.2, maquette site/public/design/v11-web-mobile.html, bloc repris tel quel) : plein
   cadre des classes compact et large, carte compacte en paysage bas, invitation « Sur l'écran d'accueil », ligne de
   portrait, sonde ?sonde=1. Rien ici ne s'applique au bureau : player--immersif et a12-immersif ne sont posés par play.js
   qu'en plein cadre, et les deux groupes de la carte sont en display: contents hors de ce cas. */
html.a12-immersif, html.a12-immersif body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.player--immersif {
    position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; aspect-ratio: auto;
    border: 0; border-radius: 0; box-shadow: none; background: #000; display: grid; place-items: center;
    touch-action: none; overscroll-behavior: none; -webkit-user-select: none; user-select: none;
    -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
/* Canevas plein cadre (tactile.md §1.4) : il remplit la fenêtre, encoche comprise ; le jeu (TAC2) coupe ses bandes 16:9
   pour les classes compact et large et lit les encarts. */
.player--immersif canvas { width: 100%; height: 100%; }
.player--immersif .player__overlay {
    padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
             max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.player--immersif .player__card input, .player--immersif .player__card button { -webkit-user-select: auto; user-select: auto; }
@media (hover: none) { .player--immersif .player__go kbd { display: none; } } /* plein cadre seulement : mobile fermé = carte d'aujourd'hui */
/* Carte : deux groupes (play.js) — « ce qui se passe » (player__side) et « ce qu'on fait » (player__main) ; sur ordinateur
   ils n'existent pas pour la mise en page (display: contents) : la carte d'aujourd'hui ne change pas. */
.player__side, .player__main { display: contents; }
.player--immersif canvas { position: absolute; inset: 0; margin: auto; }
.player--immersif .player__overlay { position: absolute; inset: 0; min-height: 0; grid-template-columns: minmax(0, 1fr); }
/* Carte compacte : paysage de moins de 500 px CSS de haut (téléphone) — ce qui se passe à gauche, ce qu'on fait à droite. */
@media (orientation: landscape) and (max-height: 499px) {
    .player--immersif .player__card {
        width: min(100%, 760px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center; column-gap: 28px; padding: 18px 22px; text-align: left;
    }
    .player--immersif .player__side, .player--immersif .player__main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
    .player--immersif .player__side { align-items: flex-start; }
    .player--immersif .player__card .ds-ruler { display: none; }
    .player--immersif .player__mark { width: 36px; height: 36px; }
    .player--immersif .player__card h2 { font-size: 24px; line-height: 1.15; }
    .player--immersif .player__card p { font-size: 15px; line-height: 1.4; }
    .player--immersif .player__pseudo { gap: 8px; }
    .player--immersif .player__pseudo-input { height: 48px; font-size: var(--ds-font-size-lg); }
    .player--immersif .player__pseudo-row .ds-icon-button { width: 48px; height: 48px; }
    .player--immersif .player__go { min-height: 52px; font-size: 20px; }
    .player--immersif .player__optional { display: none; }
    .player--immersif .player__state, .player--immersif .player__who { text-align: left; }
}
.player__actions { align-self: stretch; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.player__actions .ds-button { min-height: 52px; justify-content: center; }
.player__actions .player__link { align-self: center; min-height: 44px; padding: 0 12px; }
/* Invitation « Sur l'écran d'accueil » (iPhone et iPad, hors application de l'écran d'accueil) */
.player__invite {
    display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; text-align: left;
    border-radius: var(--ds-radius-md); background: var(--ds-color-semantic-surface-2, rgba(255,255,255,.05));
    border: 1px solid var(--ds-color-semantic-border); font-size: 14px; line-height: 1.4; color: var(--ds-color-semantic-text);
}
.player__invite > svg { flex: none; width: 22px; height: 22px; color: var(--ds-color-semantic-info, #6cb6ff); margin-top: 1px; }
.player__invite p { margin: 0 !important; font-size: 14px !important; color: var(--ds-color-semantic-text) !important; }
.player__invite .player__link { margin-top: 6px; min-height: 32px; font-size: 14px; }
.player__invite .glyph { display: inline-block; width: 16px; height: 16px; vertical-align: -2px; margin: 0 2px; }
/* L'écran « Tourne ton téléphone » pendant le jeu est celui de TAC3 (tactile.md §1.5, maquette v11-tactile) : pas ici. */
.player__portrait-hint { display: none; font-size: 15px !important; color: var(--ds-color-semantic-text) !important; }
@media (orientation: portrait) { .player--immersif .player__portrait-hint { display: block; } }
/* Sonde (?sonde=1) : cadre de mesures, au-dessus de tout */
.a12-sonde {
    position: absolute; z-index: 5; left: max(6px, env(safe-area-inset-left)); top: max(6px, env(safe-area-inset-top));
    width: 290px; padding: 8px 10px; border-radius: 8px; background: rgba(6, 8, 18, .8); color: #e8ecff;
    font: 11px/1.45 var(--ds-font-family-mono, ui-monospace, monospace); -webkit-user-select: text; user-select: text;
}
.a12-sonde b { color: #fff; font-weight: 700; }
.a12-sonde .warn { color: #ffcf5c; }
.a12-sonde .row { display: flex; justify-content: space-between; gap: 10px; }
.a12-sonde .btns { display: flex; gap: 6px; margin-top: 6px; }
.a12-sonde button { min-height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: inherit; }
/* Ajouts de la page réelle (MOB1b) : l'accueil (cadre .game__frame de home.css, chargé après ce fichier), plein écran
   Android, éléments masqués, glyphe de l'invitation, sonde repliée et zone de copie de repli. */
html.a12-immersif .game__frame.player--immersif { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100dvh; flex: none; }
html.a12-immersif .game__frame.player--immersif canvas { width: 100%; height: 100%; }
.player--immersif:fullscreen canvas { width: 100%; height: 100%; }
.player__invite[hidden], .player__actions[hidden] { display: none; }
.player__invite .glyph svg { width: 16px; height: 16px; }
.a12-sonde[hidden] { display: none; }
.a12-sonde--pastille { width: auto; padding: 0; background: none; }
.a12-sonde textarea { display: block; width: 100%; height: 120px; margin-top: 6px; font: 10px/1.3 var(--ds-font-family-mono, ui-monospace, monospace); color: #e8ecff; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.25); border-radius: 6px; }
.a12-sonde .note { margin-top: 6px; color: #ffcf5c; }
/* ===== Fin du bloc MOB1 ===== */
/* ===== Lot TAC3 : écran « Tourne ton téléphone » (tactile.md §1.5, §6.10 ; maquette tac-14) : posé par play.js sur l'état
   « couvert » en portrait, par-dessus tout ; picto qui pivote (fixe en mouvement réduit), titre 24 px Rowdies, ligne 16 px. ===== */
.player__rotate { position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; background: var(--ds-color-semantic-bg-deep, #12131f); text-align: center; touch-action: none; }
.player__rotate[hidden] { display: none; }
.player__rotate-dev { position: relative; width: 96px; height: 96px; color: var(--ds-color-semantic-title, #f4f1ff); }
.player__rotate-dev svg { display: block; width: 96px; height: 96px; animation: a12-rotate 2.4s ease-in-out infinite; }
.player__rotate-arc { position: absolute; inset: -14px; border: 3px solid transparent; border-top-color: var(--ds-color-semantic-focus, #f0a640); border-radius: 50%; rotate: -30deg; }
.player__rotate-title { margin: 0; max-width: 22em; font: 400 24px/1.15 var(--ds-font-family-display, serif); color: var(--ds-color-semantic-title, #f4f1ff); }
.player__rotate-sub { margin: 0; font: 400 16px/1.35 var(--ds-font-family-text, sans-serif); color: var(--ds-color-semantic-text, #d8d6e8); }
.player__rotate-sub[hidden] { display: none; }
@keyframes a12-rotate { 0%, 20% { rotate: 0deg; } 50%, 80% { rotate: -90deg; } 100% { rotate: 0deg; } }
@media (prefers-reduced-motion: reduce) { .player__rotate-dev svg { animation: none; rotate: -90deg; } }
/* ===== Fin du bloc TAC3 ===== */

/* ===== Lot RV-IOS : aucun zoom de la page au focus d'un champ (iPhone, iPad) =====
   Safari d'iOS agrandit la page quand un champ de moins de 16 px CSS prend le focus ; en plein cadre (application de l'écran
   d'accueil comprise) le cadre prend les gestes et on ne peut plus revenir en arrière. Sur un écran tactile, tout champ écrit
   en 16 px au moins : ceux de la page, le champ que le clavier mobile de Unity pose dans <body> sans taille de police (la police
   par défaut d'un champ de Safari fait 13 px environ) et le jumeau des champs du compte (16 px déjà, AccountInput.jslib) ;
   « manipulation » : pas de zoom au double toucher sur un champ. Au bureau (souris), rien ne change. */
@media (hover: none), (pointer: coarse) {
    input, textarea, select { font-size: max(16px, 1em); touch-action: manipulation; }
    .a12-sonde textarea { font-size: 16px; }
}
