/* HUIS CLOS — mises en page des écrans */

/* Barre d'action collée en bas */
.cta-bar { flex: none; padding: var(--s3) var(--gutter) calc(var(--s4) + var(--safe-bottom)); background: linear-gradient(to top, var(--ink) 70%, rgba(9,13,18,0)); display: flex; flex-direction: column; gap: var(--s2); }
.cta-bar .btn-ghost { align-self: center; }

/* ---------- Accueil : voir css/home.css ---------- */
/* Chevron des lignes de liste (carnet, mes parties). */
.nb-item > svg, .s-games .game-row > svg { width: 20px; height: 20px; flex: none; color: var(--text-3); }

/* ---------- Préparation du groupe ---------- */

/* ---------- Accès caméra / mode plateau ---------- */

/* ---------- Vue caméra (placement et exploration) ---------- */
.cam-view { position: absolute; inset: 0; background: #0B1017; overflow: hidden; }
/* Coquille iOS : la vue ARKit est derrière la page ; tout devient transparent le temps de l'exploration. */
:root.ar-active, :root.ar-active body, :root.ar-active .stage, :root.ar-active .screen.is-native-ar, .is-native-ar .cam-view { background: transparent !important; box-shadow: none !important; }
.is-native-ar .cam-fallback, .is-native-ar video { display: none; }
.cam-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-view .cam-fallback { position: absolute; inset: 0; background:
  radial-gradient(60% 40% at 70% 20%, rgba(230,183,124,0.10), transparent 70%),
  linear-gradient(to bottom, #0E151E, #090D12 60%, #0B1017); }
.cam-view .cam-fallback::after { content: ""; position: absolute; left: 0; right: 0; top: 62%; height: 1px; background: rgba(243,238,229,0.08); }
.cam-view .cam-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(9,13,18,0.75), rgba(9,13,18,0) 22%, rgba(9,13,18,0) 70%, rgba(9,13,18,0.85)); }
.duo-chip { min-height: 32px; padding: 4px 12px 4px 10px; font-size: 12px; cursor: pointer; }
.duo-chip:active { transform: scale(0.98); }
.code-display { text-align: center; padding: var(--s4); border-radius: var(--r-card); background: var(--surface-2); border: 1px solid rgba(141,207,216,0.35); }
.code-display .t-kicker { display: block; color: var(--blue); margin-bottom: 6px; }
.code-value { display: block; font-family: var(--font-serif); font-size: calc(var(--fs-display) * 1.1); font-weight: 600; letter-spacing: 0.16em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.qr-tile { display: grid; place-items: center; width: 208px; height: 208px; margin: 0 auto; padding: 10px; border-radius: 18px; background: var(--paper); color: var(--paper-ink-2); box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.qr-tile svg { width: 188px; height: 188px; display: block; border-radius: 6px; }
.join-url { text-align: center; color: var(--text-2); font-size: var(--fs-meta); word-break: break-all; font-variant-numeric: tabular-nums; }
.scan-view { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--r-card); overflow: hidden; background: #05080B; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 14%; border: 2px solid rgba(141,207,216,0.9); border-radius: 12px; pointer-events: none; }
.scan-frame::after { content: ""; position: absolute; right: -10px; top: -10px; width: 26px; height: 2px; background: var(--amber); transform: rotate(-45deg); transform-origin: right center; }
.peer-row { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: var(--s1) 0; border-bottom: 1px solid var(--line); }
.peer-row:last-child { border-bottom: 0; }
.peer-row svg { width: 20px; height: 20px; color: var(--blue); flex: none; }

/* Exploration */
.objective { display: flex; align-items: center; gap: var(--s3); max-width: 100%; padding: 10px 14px; border-radius: var(--r-card); background: rgba(9,13,18,0.86); border: 1px solid var(--line-2); color: var(--text); font-weight: 600; font-size: calc(var(--fs-body) * 0.94); line-height: 1.3; }
.objective svg { width: 18px; height: 18px; color: var(--amber); flex: none; }
.explore-bar { display: flex; align-items: flex-end; justify-content: center; gap: var(--s2); }
.explore-bar .btn-label-icon { position: relative; flex: 1 1 0; max-width: 120px; }
.tray-objs { display: flex; gap: var(--s3); overflow-x: auto; padding: 6px 2px 8px; scrollbar-width: none; }
.tray-objs::-webkit-scrollbar { display: none; }
.tray-obj { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; min-width: 80px; color: var(--text); font-size: 12px; font-weight: 600; text-align: center; }
.tray-obj span { max-width: 84px; line-height: 1.2; }
.tray-obj:active .obj { transform: scale(0.96); }
.tray-obj .obj[data-state="locked"] + span, .tray-obj .obj[data-state="used"] + span { color: var(--text-2); }

/* Objets posés dans la pièce (mode caméra) */
.room-objs { position: absolute; transform: translate(-50%, 0); display: flex; gap: 10px; }
.room-obj { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }

/* Mode plateau */

/* ---------- Inspection ---------- */
.inspect { position: absolute; inset: 0; display: flex; flex-direction: column; z-index: 0; }
/* Voile presque opaque. */
.inspect > .scrim { background: rgba(9,13,18,0.97); }
/* Pendant l’examen, le haut et le bas de la traque (pastilles, objectif, sac) s’effacent : ils ne transparaissent plus
   sous le document ni sous la pastille « Examiné ». Ils reviennent en fondu quand le voile se retire. */
.s-hunt .hunt-top, .s-hunt .hunt-bottom { transition: opacity var(--t-view) var(--ease-out), visibility 0s; }
.stage:has(> .overlays > .inspect > .scrim:not(.is-leaving)) .s-hunt :is(.hunt-top, .hunt-bottom) { opacity: 0; visibility: hidden; transition: opacity var(--t-view) var(--ease-out), visibility 0s linear var(--t-view); }
.inspect > .inspect-top, .inspect > .inspect-scroll, .inspect > .inspect-actions { position: relative; z-index: 1; }
.inspect .inspect-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: calc(var(--safe-top) + var(--s3)) var(--s4) var(--s2); flex: none; }
.inspect .inspect-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--s2) var(--gutter) var(--s5); }
.inspect .inspect-stage { display: grid; place-items: center; }
.inspect .doc-full { width: 100%; max-width: 420px; transform-origin: center; }
.inspect .doc-full.is-zoomed { transform: scale(1.18); transform-origin: top center; margin-bottom: 18%; }
.inspect .inspect-hint { text-align: center; color: var(--text-2); font-size: var(--fs-meta); margin-top: var(--s3); }
.inspect .inspect-actions { flex: none; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--gutter) calc(var(--s4) + var(--safe-bottom)); background: linear-gradient(to top, var(--ink) 80%, rgba(9,13,18,0)); }
.inspect .inspect-actions .row { display: flex; gap: var(--s2); }
.inspect .inspect-actions .row .btn { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 8px; gap: 6px; font-size: calc(var(--fs-ctrl) * 0.94); }
.inspect .inspect-actions .row .btn span { overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.inspect-flip { position: absolute; z-index: 6; transform-origin: top left; pointer-events: none; border-radius: var(--r-doc); }
.stage.wide .inspect .inspect-scroll { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s5); align-items: start; padding-top: var(--s4); }
.stage.wide .inspect .doc-transcript { margin-top: 0; }

/* ---------- Carnet ---------- */
.nb-group { margin-top: var(--s4); }
.nb-group h3 { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-meta); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); margin-bottom: var(--s1); }
.nb-group h3 svg { width: 16px; height: 16px; color: var(--blue); }
.nb-item { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s2) 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; color: var(--text); }
.nb-item:last-child { border-bottom: 0; }
.nb-item .obj { flex: none; }
.nb-item .nb-text { flex: 1 1 auto; min-width: 0; }
.nb-item .nb-title { display: block; font-weight: 600; font-size: var(--fs-ctrl); }
.nb-item .nb-sub { display: block; color: var(--text-2); font-size: var(--fs-meta); margin-top: 2px; }
.nb-item .chip { flex: none; }
.nb-item[aria-pressed="true"] { background: rgba(230,183,124,0.08); border-radius: 12px; padding-left: 6px; padding-right: 6px; }
.nb-tools { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: var(--s2); }
.nb-compare { display: grid; gap: var(--s3); }
.nb-compare .doc-full { padding: var(--s4); }
.nb-compare .doc-title { font-size: var(--fs-h3); }
.nb-compare .doc-body { font-size: calc(var(--fs-body) * 0.94); }
.nb-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-bottom: var(--s3); }
.stage.wide .nb-compare { grid-template-columns: 1fr 1fr; }
.stage.wide .nb-toggle { display: none; }
.stage.wide .nb-compare .doc-full { display: block !important; }
.nb-assoc-note { margin-top: var(--s3); }

/* ---------- Résolution ---------- */
.solve-target { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.solve-target .obj { flex: none; }
.solve-target .st-title { font-weight: 600; }
.solve-target .st-sub { color: var(--text-2); font-size: var(--fs-meta); margin-top: 2px; }
.solve-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s3); padding: var(--s4) 0; }
.solve-success .t-h2 { max-width: 12em; }
.solve-success .unlocked { display: flex; gap: var(--s4); justify-content: center; margin-top: var(--s2); }
.solve-success .unlocked .tray-obj { min-width: 72px; }

/* ---------- Pause / suivi perdu ---------- */
.pause-list { display: grid; gap: var(--s2); }

/* ---------- Conclusion ---------- */
.s-conclusion .concl-hero { padding: calc(var(--safe-top) + var(--s6)) var(--gutter) var(--s4); text-align: center; position: relative; }
.s-conclusion .concl-hero .frame-reveal { position: relative; transform: none; margin: 0 auto var(--s4); width: 96px; height: 96px; }
.s-conclusion .concl-hero .frame-reveal svg { width: 96px; height: 96px; }
.s-conclusion .transmission { margin: var(--s4) var(--gutter) 0; }
.s-conclusion .transmission .doc-body p { font-family: var(--font-serif); font-size: calc(var(--fs-body) * 1.08); line-height: 1.55; }
.s-conclusion .recap { margin: var(--s6) var(--gutter) 0; }
.s-conclusion .recap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-top: var(--s3); }
.s-conclusion .recap-grid .fact { padding: var(--s3); border-radius: var(--r-btn); background: var(--surface); border: 1px solid var(--line); text-align: center; }
.s-conclusion .recap-grid .fact b { display: block; font-family: var(--font-serif); font-size: var(--fs-h2); font-weight: 500; white-space: nowrap; }
.s-conclusion .recap-grid .fact span { font-size: var(--fs-meta); color: var(--text-2); }
.s-conclusion .recap-objs { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
.s-conclusion .share-card { margin-top: var(--s4); border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); }
.s-conclusion .share-card canvas { width: 100%; height: auto; }
.s-conclusion .concl-next { margin: var(--s6) var(--gutter) var(--s6); }
.s-conclusion .epilogue { margin: var(--s6) var(--gutter) 0; }

/* ---------- Mes parties ---------- */
.s-games .game-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; color: var(--text); min-height: 72px; }
.s-games .game-row:last-child { border-bottom: 0; }
.s-games .game-row .obj { flex: none; }
.s-games .game-row .g-title { font-weight: 600; font-size: var(--fs-ctrl); }
.s-games .game-row .g-sub { color: var(--text-2); font-size: var(--fs-meta); margin-top: 2px; }
.s-games .section { margin-top: var(--s5); }
.s-games .section h2 { font-size: var(--fs-meta); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); margin-bottom: var(--s2); }
.s-games .access-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); min-height: 60px; }
.s-games .access-row:last-child { border-bottom: 0; }
.s-games .access-row .li-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--amber); flex: none; }
.s-games .access-row .li-icon svg { width: 20px; height: 20px; }

/* ---------- Réglages ---------- */
.s-settings .section { margin-top: var(--s5); }
.s-settings .section h2 { font-size: var(--fs-meta); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); margin-bottom: var(--s1); }
.s-settings .about { color: var(--text-2); font-size: var(--fs-meta); line-height: 1.6; }

/* ---------- Boutique ---------- */
.s-shop .shop-intro { padding: var(--s2) var(--gutter) 0; }
.s-shop .offers { display: grid; gap: var(--s3); padding: var(--s4) var(--gutter) var(--s6); }
.s-shop .shop-foot { padding: 0 var(--gutter) var(--s6); color: var(--text-3); font-size: var(--fs-meta); line-height: 1.6; }
.s-shop .shop-foot p + p { margin-top: var(--s2); }
.purchase-sheet .p-line { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: calc(var(--fs-body) * 0.94); }
.purchase-sheet .p-line:last-child { border-bottom: 0; }
.purchase-sheet .p-line span:first-child { color: var(--text-2); }
.purchase-sheet .p-total { font-family: var(--font-serif); font-size: var(--fs-h2); font-weight: 600; }

/* ---------- Tablette : le carnet et l'inspection utilisent l'espace ---------- */
.stage.wide .s-inv .inv-content, .stage.wide .screen-scroll > .pad, .stage.wide .cta-bar { max-width: 640px; margin-left: auto; margin-right: auto; width: 100%; }
.stage.wide .modal-card { max-width: 520px; }

/* ---------- Achats intégrés : page d'une enquête, boutique, conclusion ---------- */

/* Boutique : sections, enquêtes de la saison, cible d'un achat « par enquête ». */
.shop-section { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s4); }
.shop-h { font-size: var(--fs-meta); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.shop-invs { display: flex; flex-direction: column; padding: 2px var(--s3); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.shop-inv { display: flex; align-items: center; gap: var(--s3); min-height: 76px; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.shop-inv:last-child { border-bottom: 0; }
.shop-inv-open { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--s3); text-align: left; color: var(--text); }
.shop-inv-cover { width: 46px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; flex: none; border: 1px solid var(--line-2); background: var(--surface-2); }
.shop-inv-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shop-inv-text { min-width: 0; }
.shop-inv-text b { display: block; font-family: var(--font-serif); font-size: calc(var(--fs-ctrl) * 1.06); font-weight: 500; line-height: 1.2; }
.shop-inv-text small { display: block; margin-top: 2px; color: var(--text-2); font-size: var(--fs-meta); }
.shop-inv > .chip, .shop-inv > .btn { flex: none; }
.shop-inv > .chip { max-width: 46%; white-space: normal; line-height: 1.25; }
.list-item .li-cover { width: 40px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; flex: none; border: 1px solid var(--line-2); background: var(--surface-2); }
.list-item .li-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.list-item[disabled] { opacity: 0.55; }

/* Conclusion : le Dossier étendu présenté comme la suite, puis la prochaine enquête. */
.ext-offer { gap: var(--s3); }
.ext-offer .ext-title { font-size: var(--fs-h2); }
.ext-docs { display: flex; flex-direction: column; gap: 8px; margin: var(--s1) 0; }
.ext-docs li { display: flex; align-items: center; gap: var(--s3); padding: 10px 14px; border-radius: var(--r-doc); background: var(--paper); color: var(--paper-ink); font-family: var(--font-serif); font-weight: 600; line-height: 1.25; box-shadow: 0 1px 0 rgba(0,0,0,.2), 0 8px 18px rgba(0,0,0,.3); }
.ext-docs li:nth-child(2) { background: var(--paper-2); transform: rotate(-0.6deg); }
.ext-docs li:nth-child(3) { transform: rotate(0.5deg); }
.ext-doc-ic { display: grid; place-items: center; width: 22px; height: 22px; color: var(--paper-ink-2); flex: none; }
.ext-doc-ic svg { width: 20px; height: 20px; }
.s-conclusion .concl-offer { margin: var(--s6) var(--gutter) 0; display: flex; flex-direction: column; gap: var(--s3); }
.s-conclusion .concl-offer:empty { display: none; }
.next-inv { display: flex; gap: var(--s4); width: 100%; padding: var(--s3); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line-2); text-align: left; color: var(--text); transition: background-color var(--t-press); }
.next-inv:active { background: var(--surface-2); }
.next-inv-cover { width: 34%; max-width: 132px; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; flex: none; box-shadow: var(--shadow-soft); background: var(--surface-2); }
.next-inv-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.next-inv-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.next-inv-k { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.next-inv-t { font-family: var(--font-serif); font-size: var(--fs-h3); font-weight: 500; line-height: 1.15; }
.next-inv-hook { color: var(--text-2); font-size: var(--fs-meta); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.next-inv-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px var(--s2); }
.next-inv-foot .price { font-size: var(--fs-h3); }
.next-inv-go { display: inline-flex; align-items: center; gap: 2px; color: var(--amber); font-weight: 600; font-size: var(--fs-meta); }
.next-inv-go svg { width: 16px; height: 16px; }
.bought-note { gap: var(--s2); }

/* ---------- Comportement d'application ----------
   Un appui long ne sélectionne pas le texte de l'interface (pas de poignées ni de barre « Copier » de la WebView) ;
   les champs de saisie restent sélectionnables. */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, [contenteditable]:not([contenteditable="false"]) { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* ---------- Codes d'application (accueil, page d'une enquête, briefing) ----------
   Pilules, boutons ronds vitrés, barre flottante, puces d'infos, cartes d'offre, dessins des étapes.
   Retour au toucher : :active et .is-pressed (posée par pressFeedback, js/screens/common.js : WKWebView n'affiche pas :active seul). */
.pill { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 48px; padding: 0 20px; border-radius: 999px;
  font-family: var(--font-sans); font-size: var(--fs-ctrl); font-weight: 700; line-height: 1.15; letter-spacing: 0.005em; white-space: nowrap; color: var(--text); text-align: center;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-press), box-shadow var(--t-press), filter var(--t-press), opacity var(--t-press); }
.pill svg { width: 19px; height: 19px; flex: none; }
.pill svg.i-fill, .round-btn svg.i-fill, .btn svg.i-fill { width: 15px; height: 15px; fill: currentColor; stroke-width: 1.2; }
.pill-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pill:active:not([disabled]), .pill.is-pressed { transform: scale(0.96); }
.pill[disabled] { opacity: 0.45; cursor: not-allowed; }
.pill:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 999px; }
.pill-lg { min-height: 56px; padding: 0 26px; font-size: calc(var(--fs-ctrl) * 1.06); }
.pill-block { width: 100%; }
.pill-primary { background: var(--acc, var(--amber)); color: var(--amber-ink);
  box-shadow: 0 14px 30px -14px rgba(230, 183, 124, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--acc, var(--amber)) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.38); }
.pill-glass { background: rgba(243, 238, 229, 0.11); color: var(--text); box-shadow: inset 0 0 0 1px rgba(243, 238, 229, 0.17); }
.pill-glass:active:not([disabled]), .pill-glass.is-pressed { background: rgba(243, 238, 229, 0.19); }
/* Pilule discrète des rangées et des cartes : pastille de 34 px dans une cible de 44 px. Une seule forme par action,
   quelle que soit l'enquête : « Jouer » ambrée (.is-play, par défaut), prix en verre neutre (.is-price), autre action
   neutre (.is-neutral), « Bientôt » éteinte (.is-soon). L'ambre plein (.pill-primary) reste à « Jouer » et « Continuer ». */
.pill-soft { min-height: 44px; padding: 0 15px; font-size: calc(14px * var(--scale)); color: var(--amber-2); font-variant-numeric: tabular-nums; }
.pill-soft::before { content: ""; position: absolute; z-index: -1; inset: 5px 0; border-radius: inherit;
  background: rgba(230, 183, 124, 0.15); box-shadow: inset 0 0 0 1px rgba(230, 183, 124, 0.34); transition: background-color var(--t-press); }
.pill-soft.is-price, .pill-soft.is-neutral { color: var(--text); }
.pill-soft.is-price::before, .pill-soft.is-neutral::before { background: rgba(243, 238, 229, 0.1); box-shadow: inset 0 0 0 1px rgba(243, 238, 229, 0.17); }
.pill-soft.is-pressed::before, .pill-soft:active:not([disabled])::before { background: rgba(243, 238, 229, 0.18); }
.pill-soft.is-soon { color: var(--text-2); }
.pill-soft.is-soon::before { background: rgba(243, 238, 229, 0.06); box-shadow: inset 0 0 0 1px var(--line-2); }
@media (hover: hover) {
  .pill-primary:hover:not([disabled]) { filter: brightness(1.06); }
  .pill-glass:hover:not([disabled]) { background: rgba(243, 238, 229, 0.17); }
}
.pill.is-loading { pointer-events: none; }
.pill.is-loading > * { visibility: hidden; }
.pill.is-loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 2px solid currentColor; border-left-color: transparent; border-right-color: transparent; animation: spin 0.8s linear infinite; }

/* Bouton rond vitré : pastille de 38 px dans une cible de 44 px. */
.round-btn { position: relative; isolation: isolate; flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--text); -webkit-tap-highlight-color: transparent; }
.round-btn::before { content: ""; position: absolute; inset: 3px; z-index: -1; border-radius: 50%; background: rgba(9, 13, 18, 0.58); box-shadow: inset 0 0 0 1px rgba(243, 238, 229, 0.17);
  transition: background-color var(--t-press), transform var(--t-press) var(--ease-out); }
.round-btn svg { width: 21px; height: 21px; }
.round-btn:active::before, .round-btn.is-pressed::before { background: rgba(9, 13, 18, 0.88); transform: scale(0.92); }
.round-btn:focus-visible { outline: none; }
.round-btn:focus-visible::before { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Barre flottante au-dessus d'une couverture : transparente, puis pleine (avec le titre) quand la couverture est passée.
   Elle ne capte les touchers que par ses boutons. */
.app-float { position: absolute; z-index: 6; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: calc(6px + var(--safe-top)) 8px 6px;
  pointer-events: none; transition: background-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.app-float > * { pointer-events: auto; }
.app-float-t { flex: 1 1 auto; min-width: 0; text-align: center; font-family: var(--font-serif); font-size: calc(18px * var(--scale)); font-weight: 500; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(4px); transition: opacity 200ms, transform 200ms var(--ease-out); pointer-events: none; }
.app-float-sp { width: 44px; flex: none; pointer-events: none; }
.app-float.is-solid { background: var(--ink); box-shadow: 0 1px 0 var(--line), 0 10px 24px -14px rgba(0, 0, 0, 0.9); }
.app-float.is-solid .app-float-t { opacity: 1; transform: none; }
.app-float.is-solid .round-btn::before { background: transparent; box-shadow: none; }

/* Titre de section d'application. */
.app-h { font-family: var(--font-sans); font-size: calc(19px * var(--scale)); font-weight: 700; line-height: 1.2; letter-spacing: -0.012em; color: var(--text); margin-bottom: 12px; }

/* Puces d'infos : durée, joueurs, difficulté. */
.info-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.info-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 13px 0 11px; border-radius: 999px; background: rgba(243, 238, 229, 0.09);
  box-shadow: inset 0 0 0 1px rgba(243, 238, 229, 0.13); color: var(--text); font-size: calc(14px * var(--scale)); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.info-chip svg { width: 16px; height: 16px; flex: none; color: var(--text-2); }
.chip-gauge { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; flex: none; }
.chip-gauge i { width: 3.5px; border-radius: 1px; background: rgba(243, 238, 229, 0.26); }
.chip-gauge i:nth-child(1) { height: 6px; }
.chip-gauge i:nth-child(2) { height: 9.5px; }
.chip-gauge i:nth-child(3) { height: 13px; }
.chip-gauge.lv-1 i:nth-child(1), .chip-gauge.lv-2 i:nth-child(-n + 2), .chip-gauge.lv-3 i { background: var(--acc, var(--amber)); }

/* « Lire la suite » : un texte replié qui se déplie. */
.more-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 2px; color: var(--acc, var(--amber)); font-size: calc(15px * var(--scale)); font-weight: 700; -webkit-tap-highlight-color: transparent; }
.more-btn svg { width: 16px; height: 16px; transform: rotate(90deg); transition: transform var(--t-press) var(--ease-out); }
.more-btn[aria-expanded="true"] svg, .more-btn.is-open svg { transform: rotate(-90deg); }
.more-btn:active, .more-btn.is-pressed { opacity: 0.7; }

/* Cartes d'offre (accueil) : une ligne de boutique d'applications. À gauche le visuel (couvertures en éventail, anneau du
   Cercle) ; à droite une pastille (« Coffret », « Cercle »), un titre court en sans empattement, une ligne de détail et la
   pilule. Toute la carte ouvre la boutique ; seule une pilule-bouton (le prix) lance un achat, au-dessus du lien étiré. */
.deal { position: relative; isolation: isolate; display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 14px 12px 12px;
  border-radius: 20px; color: var(--text); -webkit-tap-highlight-color: transparent; transition: transform var(--t-press) var(--ease-out); }
.deal.is-pressed { transform: scale(0.98); }
.deal-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.deal-tag { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 2px 9px 2px 7px; border-radius: 999px;
  background: rgba(230, 183, 124, 0.13); color: var(--amber-2); font-size: calc(12px * var(--scale)); font-weight: 700; line-height: 1.2; white-space: nowrap; }
.deal-tag svg { width: 13px; height: 13px; flex: none; stroke-width: 2.2; }
.deal-link { display: block; width: 100%; margin-top: 6px; text-align: left; color: inherit; }
.deal-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.deal-link:focus-visible { outline: none; }
.deal-link:focus-visible::after { outline: 2px solid var(--blue); outline-offset: -2px; }
.deal-t { display: block; font-family: var(--font-sans); font-size: calc(16px * var(--scale)); font-weight: 600; line-height: 1.25; letter-spacing: -0.005em; color: var(--text); }
.deal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 2px; }
.deal-sub { min-width: 0; color: var(--text-2); font-size: calc(13px * var(--scale)); line-height: 1.3; }
.deal-buy { z-index: 2; flex: none; margin-right: -2px; }
.deal-more { flex: none; margin-right: -2px; pointer-events: none; }
.deal-box { background: radial-gradient(90% 120% at 0% 50%, rgba(230, 183, 124, 0.16), rgba(230, 183, 124, 0) 62%), var(--surface);
  box-shadow: inset 0 0 0 1px rgba(230, 183, 124, 0.26), 0 20px 40px -28px rgba(0, 0, 0, 0.9); }
.deal-fan { position: relative; width: 76px; height: 80px; pointer-events: none; }
.deal-fan-c { position: absolute; top: 14px; left: 1px; width: 42px; height: 56px; border-radius: 6px; overflow: hidden; background: var(--surface-2); transform-origin: 50% 100%;
  box-shadow: 0 10px 18px -8px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(243, 238, 229, 0.16); }
.deal-fan-c img { display: block; width: 100%; height: 100%; object-fit: cover; }
.deal-fan-c:nth-child(1) { transform: rotate(-11deg); }
.deal-fan-c:nth-child(2) { left: 17px; top: 8px; z-index: 1; }
.deal-fan-c:nth-child(3) { left: 33px; transform: rotate(11deg); }
.deal-cercle { background: radial-gradient(90% 120% at 0% 50%, rgba(141, 207, 216, 0.11), rgba(141, 207, 216, 0) 62%), var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 40px -28px rgba(0, 0, 0, 0.9); }
.deal-cercle.is-active { box-shadow: inset 0 0 0 1px rgba(155, 201, 174, 0.4), 0 20px 40px -28px rgba(0, 0, 0, 0.9); }
.deal-cercle.is-active .deal-tag { background: rgba(155, 201, 174, 0.14); color: var(--success); }
.deal-ic { justify-self: center; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; color: var(--amber);
  background: radial-gradient(circle, rgba(230, 183, 124, 0.2), rgba(230, 183, 124, 0.03) 70%); box-shadow: inset 0 0 0 1px rgba(230, 183, 124, 0.5), 0 0 0 7px rgba(230, 183, 124, 0.06); }
.deal-ic svg { width: 26px; height: 26px; }
/* Texte très grand : le visuel se retire, le texte prend toute la largeur. */
:root[data-text="xl"] .deal { grid-template-columns: minmax(0, 1fr); }
:root[data-text="xl"] .deal-fan, :root[data-text="xl"] .deal-ic { display: none; }
:root[data-text="xl"] .deal-foot { flex-wrap: wrap; }

/* ---------- Dessins des trois étapes (accueil, feuille « Comment jouer », briefing) ----------
   Au repos, chaque dessin montre l'étape accomplie : c'est la composition des mouvements réduits.
   Sous un parent .art-live : boucle de 9 s, une étape toutes les 3 s (tourner, suivre les bips, résoudre), avec le
   liseré de l'étape en cours. Transformations et opacité seulement. */
.art-frame { position: relative; display: block; width: 100%; aspect-ratio: 5 / 4; border-radius: 16px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(141, 207, 216, 0.09), rgba(141, 207, 216, 0) 65%), var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.art-frame > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.art-frame::after { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 0 1.5px var(--amber), 0 0 20px -6px rgba(230, 183, 124, 0.6);
  box-shadow: inset 0 0 0 1.5px var(--amber), 0 0 20px -6px color-mix(in srgb, var(--amber) 60%, transparent); }
/* Numéro de l'étape, dans le coin du dessin (au-dessus du liseré, jamais traversé par lui). */
.art-num { position: absolute; z-index: 2; top: 6px; left: 6px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%;
  background: var(--amber); color: var(--amber-ink); font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }

.step-art .a-floor { fill: rgba(243, 238, 229, 0.035); }
.step-art .a-wall { fill: none; stroke: rgba(243, 238, 229, 0.32); stroke-width: 1.6; }
.step-art .a-furn { fill: rgba(243, 238, 229, 0.06); stroke: rgba(243, 238, 229, 0.17); stroke-width: 1; }
.step-art .a-sweep { transform-origin: 60px 51px; transform: rotate(240deg); }
.step-art .a-turn { fill: none; stroke: rgba(243, 238, 229, 0.62); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.step-art .a-arm { fill: none; stroke: var(--text-2); stroke-width: 1.6; stroke-linecap: round; }
.step-art .a-phone { fill: var(--blue); stroke: #0A0E14; stroke-width: 1; }
.step-art .a-head { fill: var(--text-2); stroke: #0A0E14; stroke-width: 1.4; }
.step-art .a-halo { fill: rgba(230, 183, 124, 0.18); stroke: rgba(230, 183, 124, 0.85); stroke-width: 1.2; }
.step-art .a-core { fill: var(--amber-2); }
.step-art .a-pop { fill: none; stroke: var(--amber); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.step-art .a-wave { fill: none; stroke: rgba(230, 183, 124, 0.32); stroke-width: 1.2; }
.step-art .a-wave-2 { stroke: rgba(230, 183, 124, 0.15); }
.step-art .a-ping { fill: none; stroke: rgba(241, 203, 147, 0.95); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.step-art .a-glint { transform-box: fill-box; transform-origin: center; }
.step-art .a-track { fill: none; stroke: rgba(243, 238, 229, 0.45); stroke-width: 1.3; stroke-dasharray: 2 4; }
.step-art .a-lock { fill: none; stroke: var(--amber); stroke-width: 3; transform-box: fill-box; transform-origin: center; }
.step-art .a-dot { fill: var(--amber-2); }
.step-art .a-bar { fill: var(--amber); }
.step-art .a-bar-5 { opacity: 0.22; }
.step-art .a-paper { fill: var(--paper); }
.step-art .a-paper-2 { fill: var(--paper-3); }
.step-art .a-ink { fill: none; stroke: var(--paper-ink-2); stroke-width: 1.4; stroke-linecap: round; opacity: 0.55; }
.step-art .a-lens { fill: rgba(141, 207, 216, 0.18); stroke: var(--blue); stroke-width: 2.2; stroke-linecap: round; }
.step-art .a-shackle { fill: none; stroke: #9DA9B7; stroke-width: 4; stroke-linecap: round; transform: translateY(-7px); }
.step-art .a-lockbody { fill: var(--surface-3); stroke: rgba(243, 238, 229, 0.25); stroke-width: 1.2; }
.step-art .a-lockring { fill: none; stroke: var(--amber); stroke-width: 1.6; }
.step-art .a-win { fill: rgba(9, 13, 18, 0.78); stroke: rgba(243, 238, 229, 0.22); stroke-width: 1; }
.step-art .a-num { fill: var(--amber-2); font-family: var(--font-sans); font-size: 10px; font-weight: 700; text-anchor: middle; }

@keyframes art-tile { 0% { opacity: 0; } 3%, 30% { opacity: 1; } 34%, 100% { opacity: 0; } }
.art-live .step-1 .art-frame::after { animation: art-tile 9s linear infinite; }
.art-live .step-2 .art-frame::after { animation: art-tile 9s linear 3s infinite; }
.art-live .step-3 .art-frame::after { animation: art-tile 9s linear 6s infinite; }
/* 1. Le joueur fait un tour : le faisceau passe sur chaque cachette, qui s'allume. */
@keyframes art-sweep { 0%, 2% { transform: rotate(0deg); } 26%, 90% { transform: rotate(240deg); animation-timing-function: var(--ease-in-out); } 100% { transform: rotate(360deg); } }
@keyframes art-spot-1 { 0%, 7% { opacity: 0.2; } 8.5%, 90% { opacity: 1; } 97%, 100% { opacity: 0.2; } }
@keyframes art-spot-2 { 0%, 16% { opacity: 0.2; } 17.5%, 90% { opacity: 1; } 97%, 100% { opacity: 0.2; } }
@keyframes art-spot-3 { 0%, 25% { opacity: 0.2; } 26.5%, 90% { opacity: 1; } 97%, 100% { opacity: 0.2; } }
@keyframes art-pop-1 { 0%, 7.9% { opacity: 0; transform: scale(0.6); } 8.5% { opacity: 1; transform: scale(0.8); } 15%, 100% { opacity: 0; transform: scale(2.6); } }
@keyframes art-pop-2 { 0%, 16.9% { opacity: 0; transform: scale(0.6); } 17.5% { opacity: 1; transform: scale(0.8); } 24%, 100% { opacity: 0; transform: scale(2.6); } }
@keyframes art-pop-3 { 0%, 25.9% { opacity: 0; transform: scale(0.6); } 26.5% { opacity: 1; transform: scale(0.8); } 33%, 100% { opacity: 0; transform: scale(2.6); } }
.art-live .step-art .a-sweep { animation: art-sweep 9s linear infinite; }
.art-live .step-art .a-spot-1 { animation: art-spot-1 9s linear infinite; }
.art-live .step-art .a-spot-2 { animation: art-spot-2 9s linear infinite; }
.art-live .step-art .a-spot-3 { animation: art-spot-3 9s linear infinite; }
.art-live .step-art .a-spot-1 .a-pop { animation: art-pop-1 9s var(--ease-out) infinite; }
.art-live .step-art .a-spot-2 .a-pop { animation: art-pop-2 9s var(--ease-out) infinite; }
.art-live .step-art .a-spot-3 .a-pop { animation: art-pop-3 9s var(--ease-out) infinite; }
/* 2. Les bips s'accélèrent, les barres montent, l'anneau se ferme sur la lumière. */
@keyframes art-ping-1 {
  0%, 35.9% { opacity: 0; transform: scale(0.5); } 36% { opacity: 0.95; transform: scale(0.5); } 43% { opacity: 0; transform: scale(2.1); }
  48.9% { opacity: 0; transform: scale(0.5); } 49% { opacity: 0.95; transform: scale(0.5); } 55% { opacity: 0; transform: scale(2.1); }
  56.9% { opacity: 0; transform: scale(0.5); } 57% { opacity: 0.95; transform: scale(0.5); } 62%, 100% { opacity: 0; transform: scale(2.1); } }
@keyframes art-ping-2 {
  0%, 42.9% { opacity: 0; transform: scale(0.5); } 43% { opacity: 0.95; transform: scale(0.5); } 50% { opacity: 0; transform: scale(2.1); }
  53.4% { opacity: 0; transform: scale(0.5); } 53.5% { opacity: 0.95; transform: scale(0.5); } 59.5%, 100% { opacity: 0; transform: scale(2.1); } }
@keyframes art-glint { 0%, 33% { opacity: 0.3; transform: scale(0.7); } 58% { opacity: 1; transform: scale(1); } 63% { opacity: 1; transform: scale(1.28); } 68%, 93% { opacity: 1; transform: scale(1); } 100% { opacity: 0.3; transform: scale(0.7); } }
@keyframes art-lock { 0%, 58% { opacity: 0; transform: scale(0.82); } 63%, 93% { opacity: 1; transform: scale(1); } 99%, 100% { opacity: 0; transform: scale(0.82); } }
@keyframes art-bar-1 { 0%, 36% { opacity: 0.2; } 37%, 93% { opacity: 1; } 99%, 100% { opacity: 0.2; } }
@keyframes art-bar-2 { 0%, 43% { opacity: 0.2; } 44%, 93% { opacity: 1; } 99%, 100% { opacity: 0.2; } }
@keyframes art-bar-3 { 0%, 49% { opacity: 0.2; } 50%, 93% { opacity: 1; } 99%, 100% { opacity: 0.2; } }
@keyframes art-bar-4 { 0%, 53.5% { opacity: 0.2; } 54.5%, 93% { opacity: 1; } 99%, 100% { opacity: 0.2; } }
@keyframes art-bar-5 { 0%, 57% { opacity: 0.2; } 58%, 93% { opacity: 1; } 99%, 100% { opacity: 0.2; } }
.art-live .step-art .a-wave { opacity: 0; }
.art-live .step-art .a-ping-1 { animation: art-ping-1 9s var(--ease-out) infinite; }
.art-live .step-art .a-ping-2 { animation: art-ping-2 9s var(--ease-out) infinite; }
.art-live .step-art .a-glint { animation: art-glint 9s ease-in-out infinite; }
.art-live .step-art .a-lock { animation: art-lock 9s var(--ease-out) infinite; }
.art-live .step-art .a-bar-1 { animation: art-bar-1 9s linear infinite; }
.art-live .step-art .a-bar-2 { animation: art-bar-2 9s linear infinite; }
.art-live .step-art .a-bar-3 { animation: art-bar-3 9s linear infinite; }
.art-live .step-art .a-bar-4 { animation: art-bar-4 9s linear infinite; }
.art-live .step-art .a-bar-5 { animation: art-bar-5 9s linear infinite; }
/* 3. La loupe parcourt le document, les trois chiffres s'inscrivent, le cadenas s'ouvre. */
@keyframes art-loupe { 0%, 66% { transform: translate(-8px, -12px); } 72% { transform: translate(5px, -5px); } 78% { transform: translate(-5px, 3px); } 84%, 94% { transform: translate(0, 0); } 100% { transform: translate(-8px, -12px); } }
@keyframes art-num-1 { 0%, 70% { opacity: 0; } 71.5%, 95% { opacity: 1; } 99%, 100% { opacity: 0; } }
@keyframes art-num-2 { 0%, 75.5% { opacity: 0; } 77%, 95% { opacity: 1; } 99%, 100% { opacity: 0; } }
@keyframes art-num-3 { 0%, 81% { opacity: 0; } 82.5%, 95% { opacity: 1; } 99%, 100% { opacity: 0; } }
@keyframes art-shackle { 0%, 86% { transform: none; } 89%, 95% { transform: translateY(-7px); } 99%, 100% { transform: none; } }
@keyframes art-lockring { 0%, 86% { opacity: 0; } 88%, 95% { opacity: 1; } 99%, 100% { opacity: 0; } }
.art-live .step-art .a-loupe { animation: art-loupe 9s var(--ease-in-out) infinite; }
.art-live .step-art .a-num-1 { animation: art-num-1 9s linear infinite; }
.art-live .step-art .a-num-2 { animation: art-num-2 9s linear infinite; }
.art-live .step-art .a-num-3 { animation: art-num-3 9s linear infinite; }
.art-live .step-art .a-shackle { animation: art-shackle 9s cubic-bezier(0.2, 1.4, 0.4, 1) infinite; }
.art-live .step-art .a-lockring { animation: art-lockring 9s linear infinite; }

/* Mouvements réduits (.art-calm) : les dessins racontent la même étape en fondus, sans rien déplacer ni agrandir.
   Liseré de l'étape en cours, cachettes qui s'allument, barres du signal, anneau et lumière qui apparaissent, chiffres
   du code qui s'inscrivent, cadenas qui s'éclaire. Le faisceau, la loupe et l'anse restent à leur place. */
@keyframes art-lock-calm { 0%, 58% { opacity: 0; } 63%, 93% { opacity: 1; } 99%, 100% { opacity: 0; } }
@keyframes art-glint-calm { 0%, 33% { opacity: 0.3; } 58%, 93% { opacity: 1; } 100% { opacity: 0.3; } }
.art-calm .step-1 .art-frame::after { animation: art-tile 9s linear infinite; }
.art-calm .step-2 .art-frame::after { animation: art-tile 9s linear 3s infinite; }
.art-calm .step-3 .art-frame::after { animation: art-tile 9s linear 6s infinite; }
.art-calm .step-art .a-spot-1 { animation: art-spot-1 9s linear infinite; }
.art-calm .step-art .a-spot-2 { animation: art-spot-2 9s linear infinite; }
.art-calm .step-art .a-spot-3 { animation: art-spot-3 9s linear infinite; }
.art-calm .step-art .a-glint { animation: art-glint-calm 9s ease-in-out infinite; }
.art-calm .step-art .a-lock { animation: art-lock-calm 9s ease-in-out infinite; }
.art-calm .step-art .a-bar-1 { animation: art-bar-1 9s linear infinite; }
.art-calm .step-art .a-bar-2 { animation: art-bar-2 9s linear infinite; }
.art-calm .step-art .a-bar-3 { animation: art-bar-3 9s linear infinite; }
.art-calm .step-art .a-bar-4 { animation: art-bar-4 9s linear infinite; }
.art-calm .step-art .a-bar-5 { animation: art-bar-5 9s linear infinite; }
.art-calm .step-art .a-num-1 { animation: art-num-1 9s linear infinite; }
.art-calm .step-art .a-num-2 { animation: art-num-2 9s linear infinite; }
.art-calm .step-art .a-num-3 { animation: art-num-3 9s linear infinite; }
.art-calm .step-art .a-lockring { animation: art-lockring 9s linear infinite; }

/* Barre d'action collée en bas (page d'une enquête, briefing) : pilules, filet discret, zone de sécurité. */
.app-cta { position: relative; z-index: 3; gap: 10px; padding: 12px var(--gutter) calc(14px + var(--safe-bottom)); background: var(--ink); box-shadow: 0 -1px 0 var(--line); }
/* Le texte fond au-dessus de la barre : une bande dégradée posée sur elle (pas de masque sur la zone qui défile). */
.app-cta::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% + 1px); height: 20px; pointer-events: none; background: linear-gradient(to top, var(--ink), rgba(9, 13, 18, 0)); }

/* ---------- Page d'une enquête ---------- */
/* La couverture passe sous la barre d'état : la barre flottante porte la zone de sécurité. */
.s-inv, .s-brief { padding-top: 0; }
.s-inv .inv-hero { position: relative; flex: none; width: 100%; aspect-ratio: 3 / 4; min-height: 360px; max-height: 68vh; overflow: hidden; background: #06090D; }
.s-inv .inv-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 16%; }
.s-inv .inv-hero::before { content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 24%; pointer-events: none; background: linear-gradient(to bottom, rgba(6, 9, 13, 0.6), rgba(6, 9, 13, 0)); }
.s-inv .inv-hero::after { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none;
  background: linear-gradient(to top, var(--ink) 0%, rgba(9, 13, 18, 0.93) 16%, rgba(9, 13, 18, 0.6) 34%, rgba(9, 13, 18, 0) 56%); }
.s-inv .inv-hero-body { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 0 var(--gutter) 16px; }
.inv-access { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 11px; border-radius: 999px; background: rgba(9, 13, 18, 0.74);
  box-shadow: inset 0 0 0 1px rgba(243, 238, 229, 0.2); color: var(--text); font-size: calc(12.5px * var(--scale)); font-weight: 700; line-height: 1.2; letter-spacing: 0.01em; }
.inv-access svg { width: 14px; height: 14px; flex: none; stroke-width: 2.2; }
.inv-access.is-free { background: var(--amber); color: var(--amber-ink); box-shadow: none; }
.inv-access.is-owned svg, .inv-access.is-bundle svg { color: var(--success); }
.inv-access.is-cercle svg { color: var(--amber); }
.inv-access.is-pass svg { color: var(--blue); }
.inv-access.is-soon { color: var(--text-2); }
.inv-place { margin-top: 14px; font-size: calc(11.5px * var(--scale)); font-weight: 700; line-height: 1.3; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.inv-title { margin-top: 4px; font-family: var(--font-serif); font-size: calc(36px * var(--scale)); font-weight: 500; line-height: 1.04; letter-spacing: -0.02em; color: var(--text); text-wrap: balance; text-shadow: 0 2px 22px rgba(0, 0, 0, 0.6); }
.inv-chips { margin-top: 14px; }
.s-inv .inv-content { position: relative; padding: 4px var(--gutter) 28px; }
.inv-duo-note { margin-top: 14px; }
.inv-sec { margin-top: 26px; }
.inv-sec:first-child { margin-top: 18px; }
.inv-hook { color: var(--text); font-size: calc(var(--fs-body) * 0.98); line-height: 1.5; }
.inv-more p { margin-top: 12px; color: var(--text-2); font-size: calc(var(--fs-body) * 0.95); line-height: 1.55; }
.inv-list { padding: 2px 14px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.inv-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: calc(15px * var(--scale)); line-height: 1.35; }
.inv-list li:last-child { border-bottom: 0; }
.inv-list-ic { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--amber);
  background: rgba(230, 183, 124, 0.12); background: color-mix(in srgb, var(--amber) 13%, transparent); }
.inv-list-ic svg { width: 17px; height: 17px; }
.inv-offers { display: flex; flex-direction: column; gap: 12px; }
.inv-offers .app-h { margin-bottom: 0; }
/* « Coffret et Cercle › » : une ligne de liste qui ouvre la boutique. */
.inv-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 12px 10px 14px; border-radius: 18px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-align: left; -webkit-tap-highlight-color: transparent; transition: transform var(--t-press) var(--ease-out), background-color var(--t-press); }
.inv-link.is-pressed, .inv-link:active { transform: scale(0.98); background: var(--surface-2); }
.inv-link-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--amber); background: rgba(230, 183, 124, 0.13); }
.inv-link-ic svg { width: 18px; height: 18px; }
.inv-link-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.inv-link-t b { font-size: calc(16px * var(--scale)); font-weight: 600; line-height: 1.25; }
.inv-link-t small { margin-top: 2px; color: var(--text-2); font-size: calc(13px * var(--scale)); line-height: 1.3; }
.inv-link > svg { width: 18px; height: 18px; flex: none; color: var(--text-3); stroke-width: 2.2; }
.inv-fine { text-align: center; }
.inv-sim { text-align: center; }

/* Filet de sécurité des dessins : si la préférence du téléphone change pendant qu'un écran les anime, plus rien ne bouge. */
:root[data-motion="reduced"] .art-live .step-art *, :root[data-motion="reduced"] .art-live .art-frame::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .art-live .step-art *, :root:not([data-motion="full"]) .art-live .art-frame::after { animation: none !important; }
}

/* Tablette : le texte posé sur la couverture et la barre d'action gardent la largeur de lecture. */
.stage.wide .s-inv .inv-hero-body, .stage.wide .s-brief .brief-hero-body, .stage.wide .brief-body { max-width: 640px; margin-left: auto; margin-right: auto; }
.stage.wide .s-inv .inv-hero { max-height: 60vh; }
