/* La Ville qui oublie, version du site NeoGenesis.
   Fusion de src/ui.css et src/immersion.css du jeu, ENTIÈREMENT placée sous .vqo (le conteneur #app) :
   rien ici ne touche :root, html, body ni un élément du site. Gravure sur bois, brume de novembre,
   ceinture fléchée ; la zone du jeu garde sa palette chaude et ardoise dans les quatre thèmes du site :
   - thème clair du site            -> « Brume de jour » (palette claire du jeu) ;
   - thèmes sombre, cyber et forêt  -> « Nuit sur le lac » (palette sombre du jeu) ;
   - le réglage « Thème du jeu » peut forcer l'une ou l'autre (data-vqo-theme="clair" ou "sombre").
   Les couleurs qui portent du texte ont été recalculées pour le contraste AA (voir docs/jeu_ville_integration.md).
   Les animations portent le préfixe vqo- (le site a déjà ses propres @keyframes). */

/* ---------- Palette sombre : Nuit sur le lac (défaut, comme le site) ---------- */
.vqo {
  --fond: #141c23;
  --papier: #11171b; --papier-2: #172027; --neige: #1b252c; --encre: #e3e6e1; --encre-2: #a2acad; --trait: #3a4852;
  --ardoise: #86a5b8; --ocre: #d7a24a; --ocre-doux: #3a2f1c; --rouge: #e06a5a; --follet: #8cc6e6; --ombre: rgba(0, 0, 0, 0.45);
  --sur-ocre: #1a1408; --sur-rouge: #11171b;
  --ciel-1: #0d1418; --ciel-2: #1c2a33; --mont: #26343c; --mont-2: #1a252b; --sol: #c9d1d2; --bati: #0b0f12; --fenetre: #e8b04f;
  --f-titre: Georgia, 'Times New Roman', serif;
  --f-recit: 'Iowan Old Style', Georgia, serif;
  --f-ui: system-ui, 'Segoe UI', sans-serif;
  --taille: 1.0625rem;
  color-scheme: dark;
}
/* ---------- Palette claire : Brume de jour ---------- */
:root[data-theme="light"] .vqo[data-vqo-theme="site"], .vqo[data-vqo-theme="clair"] {
  --fond: #e9e3d6;
  --papier: #e6eae8; --papier-2: #d9dfdd; --neige: #f4f6f4; --encre: #1f262b; --encre-2: #4c585f; --trait: #a9b5b5;
  --ardoise: #3e5a6b; --ocre: #865914; --ocre-doux: #e9d7b3; --rouge: #a2362b; --follet: #245a7c; --ombre: rgba(31, 38, 43, 0.14);
  --sur-ocre: #ffffff; --sur-rouge: #ffffff;
  --ciel-1: #c9d3d6; --ciel-2: #e3e8e7; --mont: #8e9ea4; --mont-2: #6c7f87; --sol: #f1f3f1; --bati: #2f3a40; --fenetre: #e6b75a;
  color-scheme: light;
}
/* ---------- Contraste élevé ---------- */
.vqo.contraste { --fond: #000; --encre: #fff; --encre-2: #eee; --papier: #000; --neige: #000; --trait: #aaa; --ocre: #ffc560; --rouge: #ff7a6a; --sur-rouge: #000; }
:root[data-theme="light"] .vqo.contraste[data-vqo-theme="site"], .vqo.contraste[data-vqo-theme="clair"] { --fond: #fff; --encre: #000; --encre-2: #1d1d1d; --papier: #fff; --papier-2: #fff; --neige: #fff; --follet: #245a7c; --trait: #555; --ocre: #6e4500; --rouge: #8a1d12; --sur-rouge: #fff; }
/* ---------- Police très lisible (celle de l'appareil, sans empattements) ---------- */
.vqo.lisible { --f-recit: Verdana, 'Segoe UI', system-ui, sans-serif; --f-ui: Verdana, 'Segoe UI', system-ui, sans-serif; }

/* ---------- Le conteneur ---------- */
.vqo {
  background: var(--fond); color: var(--encre);
  font-family: var(--f-ui); font-size: var(--taille); line-height: 1.5; text-align: left;
  -webkit-font-smoothing: antialiased;
  border: 1px solid var(--line, rgba(255, 255, 255, .09)); border-radius: 14px; min-height: 60vh;
}
.vqo button, .vqo input, .vqo select, .vqo textarea { font: inherit; color: inherit; }
.vqo button { cursor: pointer; }
/* Le focus du jeu est ocre (le site impose le sien en !important : celui-ci est plus précis). */
.vqo :focus-visible { outline: 3px solid var(--ocre) !important; outline-offset: 3px !important; border-radius: 2px; }
.vqo .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vqo p, .vqo h2, .vqo h3 { margin: 0; }
.vqo .note-site { color: var(--encre-2); font-size: 0.9rem; }

/* ---------- La bande fléchée (ceinture fléchée) ---------- */
.vqo .fleche {
  height: 10px;
  background:
    linear-gradient(135deg, var(--rouge) 25%, transparent 25%) 0 0 / 20px 10px,
    linear-gradient(225deg, var(--rouge) 25%, transparent 25%) 0 0 / 20px 10px,
    linear-gradient(315deg, var(--ocre) 25%, transparent 25%) 10px 0 / 20px 10px,
    linear-gradient(45deg, var(--ocre) 25%, transparent 25%) 10px 0 / 20px 10px,
    var(--ardoise);
}

/* ---------- Coquille ---------- */
.vqo .app { min-height: 60vh; display: grid; grid-template-rows: auto 1fr; }
/* La barre du jeu colle SOUS la barre collante du site (--vqo-haut, posé par js/ville-qui-oublie.js). */
.vqo .barre {
  position: sticky; top: var(--vqo-haut, 0px); z-index: 30; background: var(--papier);
  border-bottom: 1px solid var(--trait); border-radius: 13px 13px 0 0;
}
.vqo .barre-in {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px;
  max-width: 1240px; margin: 0 auto;
}
.vqo .marque { font-family: var(--f-titre); font-size: 1.35rem; line-height: 1; letter-spacing: 0.01em; white-space: nowrap; }
.vqo .marque i { font-style: italic; color: var(--ardoise); }
.vqo .calendrier { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.vqo .cal-jour { display: grid; gap: 2px; text-align: center; font-size: 0.72rem; color: var(--encre-2); }
.vqo .cal-jour b { font-weight: 600; font-size: 0.78rem; color: var(--encre-2); }
.vqo .cal-jour.ajd b { color: var(--encre); }
.vqo .cal-moments { display: flex; gap: 2px; }
.vqo .cal-m { width: 9px; height: 9px; border: 1px solid var(--encre-2); border-radius: 50%; }
.vqo .cal-m.passe { background: var(--encre-2); }
.vqo .cal-m.maint { background: var(--ocre); border-color: var(--ocre); box-shadow: 0 0 0 2px var(--ocre-doux); }
.vqo .cal-m.nuit { border-radius: 2px; }
.vqo .outils { display: flex; gap: 6px; flex-wrap: wrap; }
.vqo .bouton-outil {
  border: 1px solid var(--trait); background: var(--neige); border-radius: 6px; padding: 6px 10px; font-size: 0.9rem;
  display: inline-flex; gap: 6px; align-items: center; min-height: 36px;
}
.vqo .bouton-outil:hover { border-color: var(--encre-2); }
.vqo .bouton-outil .pastille { background: var(--rouge); color: var(--sur-rouge); border-radius: 9px; font-size: 0.75rem; font-weight: 700; padding: 0 6px; }

.vqo .corps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 1240px; width: 100%; margin: 0 auto; }
/* Carnet en colonne quand la ZONE DU JEU fait au moins 1000 px (classe posée par ui.js), sinon en tiroir. */
.vqo.vqo-large .corps.avec-carnet { grid-template-columns: minmax(0, 1fr) 360px; }
.vqo .scene { padding: 20px 16px 64px; min-width: 0; }
/* Carnet en tiroir ouvert : la scène gagne en bas la hauteur du tiroir, pour que chaque contrôle puisse défiler
   AU-DESSUS (avec scroll-padding-bottom, posé par la page ville-qui-oublie.html). Sans cela, au clavier, 10 contrôles
   sur 15 recevaient le focus cachés sous le tiroir (WCAG 2.4.11, mesuré à 390 x 800). */
.vqo:not(.vqo-large) .corps.avec-carnet .scene { padding-bottom: calc(min(78vh, 640px) + 16px); }
.vqo .scene:focus { outline: none; }
.vqo .scene:focus-visible { outline: 3px solid var(--ocre) !important; outline-offset: -3px !important; }
.vqo .scene-in { max-width: 850px; margin: 0 auto; display: grid; gap: 18px; }

/* ---------- Gravure et peintures ---------- */
.vqo .gravure { position: relative; border: 1px solid var(--encre); padding: 4px; background: var(--neige); border-radius: 10px;
  box-shadow: 5px 5px 0 -1px var(--fond), 5px 5px 0 0 var(--encre); }
.vqo .gravure svg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 7; border-radius: 6px; }
.vqo .legende { font-family: var(--f-titre); font-style: italic; color: var(--encre-2); font-size: 0.95rem; margin-top: -10px; }
.vqo .couverture { margin: 0; overflow: hidden; border-radius: 12px; box-shadow: 0 18px 42px rgba(21, 34, 44, .2); position: relative; background: var(--neige); }
.vqo .couverture img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.vqo .couverture::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(194, 217, 226, .11), transparent); animation: vqo-brume 18s ease-in-out infinite alternate; }
@keyframes vqo-brume { from { opacity: .2; transform: translateX(-5%); } to { opacity: .8; transform: translateX(5%); } }
/* Provenance d'une peinture (décision de Bernard, 12/11 ; ui.js, pastilleIA) : une pastille en HAUT à droite de
   l'image, au-dessus de la brume (l'astuce du jeu et le carnet en tiroir sont fixés en bas de l'écran). Le rail
   (.mention-rail) couvre la figure ; la pastille y COLLE sous les barres collantes tant que la peinture est à l'écran.
   overflow: clip ne crée pas de conteneur de défilement (overflow: hidden, si : la pastille ne collerait plus). */
@supports (overflow: clip) { .vqo .couverture { overflow: clip; } }
.vqo .mention-rail { position: absolute; inset: 0; z-index: 1; margin: 0; padding: 6px; pointer-events: none; display: flex; justify-content: flex-end; align-items: flex-start; }
.vqo .mention-image {
  position: sticky; top: calc(var(--vqo-haut, 0px) + var(--vqo-barre, 0px) + 6px); margin: 0; padding: 2px 8px; border-radius: 4px;
  background: var(--encre); color: var(--papier); font-family: var(--f-ui); font-size: 0.78rem; font-style: normal; font-weight: 600; line-height: 1.4;
  pointer-events: auto;   /* le rail laisse passer les clics ; la pastille, elle, est un texte qu'on peut sélectionner */
}
.vqo .mention-portrait { margin: 6px 0 0; text-align: center; color: var(--encre-2); font-size: 0.85rem; }
.vqo .mention-portraits { margin: 0; font-size: 0.85rem; }

/* ---------- Titres et récit ---------- */
.vqo .titre-scene { font-family: var(--f-titre); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.025em; }
.vqo .sous-titre { color: var(--encre-2); font-size: 0.95rem; margin: -10px 0 0; }
.vqo .sur-titre { font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; color: var(--ocre); margin-bottom: -10px; }
.vqo .recit { font-family: var(--f-recit); font-size: 1.14em; line-height: 1.62; max-width: 68ch; }
.vqo .recit p { margin: 0 0 0.75em; }
.vqo .recit p:first-child::first-letter { font-family: var(--f-titre); float: left; font-size: 3.1em; line-height: 0.85; padding: 4px 8px 0 0; color: var(--ardoise); }
.vqo .recit .detail { color: var(--encre-2); }
.vqo .recit.sans-lettrine p:first-child::first-letter { all: unset; }
.vqo .ecouter { justify-self: start; }

/* ---------- Présents ---------- */
.vqo .presents { display: flex; gap: 10px; flex-wrap: wrap; }
.vqo .present { display: inline-flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--encre-2); }
.vqo .present svg { width: 34px; height: 34px; border-radius: 50%; background: var(--papier-2); border: 1px solid var(--trait); }
/* Portraits peints (vqo-images.js) : en vignette, le visage recadré dans le rond ; en grand, la peinture entière. */
.vqo .portrait-cadre { display: block; flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--papier-2); border: 1px solid var(--trait); }
.vqo .portrait-cadre img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.5); transform-origin: 50% 18%; }

/* ---------- Choix ---------- */
.vqo .choix-liste { display: grid; gap: 0; border-top: 1px solid var(--encre); }
.vqo .choix {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 14px;
  text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--trait);
  padding: 1.15rem 1.3rem; min-height: 56px; border-radius: 9px; width: 100%;
  transition: background .18s, transform .18s;
}
.vqo .choix:hover { background: var(--neige); transform: translateX(3px); }
.vqo .choix:hover .choix-label { text-decoration: underline; text-decoration-color: var(--ocre); text-underline-offset: 4px; }
.vqo .choix[hidden] { display: none !important; }
.vqo .choix-label { font-family: var(--f-recit); font-size: 1.08rem; line-height: 1.35; }
.vqo .choix-num { color: var(--encre-2); }
.vqo .choix-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.84rem; color: var(--encre-2); }
.vqo .choix-hint { grid-column: 1 / -1; font-size: 0.88rem; color: var(--encre-2); font-style: italic; }
.vqo .risque { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.84rem; white-space: nowrap; }
.vqo .risque .tally { display: inline-flex; gap: 2px; }
.vqo .risque .tally i { width: 6px; height: 12px; background: var(--trait); transform: skewX(-18deg); }
.vqo .risque.probable { color: var(--ardoise); } .vqo .risque.probable .tally i:nth-child(-n+3) { background: var(--ardoise); }
.vqo .risque.risque-m { color: var(--ocre); } .vqo .risque.risque-m .tally i:nth-child(-n+2) { background: var(--ocre); }
.vqo .risque.desespere { color: var(--rouge); } .vqo .risque.desespere .tally i:nth-child(-n+1) { background: var(--rouge); }
.vqo:not(.tactique) .choix-meta .tally { display: none; }
.vqo .gratuit { color: var(--follet); font-weight: 600; }
.vqo .libre-zone { display: grid; gap: 8px; margin-top: 6px; }
.vqo .libre-zone label { font-family: var(--f-titre); font-style: italic; font-size: 1.05rem; }
.vqo .libre-ligne { display: flex; gap: 8px; flex-wrap: wrap; }
.vqo .libre-ligne input { flex: 1 1 14rem; min-width: 0; padding: 10px 12px; border: 1px solid var(--trait); background: var(--neige); border-radius: 4px; }
.vqo .pied-scene { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.vqo .intentions, .vqo .conversation-actions, .vqo .rencontres { display: flex; gap: .6rem; flex-wrap: wrap; }
.vqo .intentions { margin: .2rem 0; }
.vqo .intentions .btn[aria-pressed="true"] { border-color: var(--ocre); box-shadow: inset 0 -3px 0 var(--ocre); }
.vqo .rencontres { margin: .8rem 0; padding: 1.3rem; border: 1px solid var(--trait); border-radius: 10px; }
.vqo .rencontres h3, .vqo .rencontres p { width: 100%; margin: .2rem 0; }
.vqo .rencontres h3 { font-family: var(--f-titre); font-weight: 400; font-size: 1.3rem; }

/* Les boutons du jeu : le .btn du site (pastille, nowrap, 0,96rem) est neutralisé ici. */
.vqo .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: normal; text-align: center;
  font-size: inherit; line-height: 1.3; box-shadow: none; transform: none;
  border: 1px solid var(--encre); background: var(--encre); color: var(--papier); padding: 10px 18px; border-radius: 4px; font-weight: 600;
  transition: background .15s, border-color .15s;
}
.vqo .btn:hover { background: var(--ardoise); border-color: var(--ardoise); color: var(--papier); }
.vqo .btn.doux { background: transparent; color: var(--encre); }
.vqo .btn.doux:hover { background: var(--neige); color: var(--encre); border-color: var(--encre); }
.vqo .btn.ocre { background: var(--ocre); border-color: var(--ocre); color: var(--sur-ocre); }
.vqo .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.vqo .lien { background: none; border: 0; color: var(--ardoise); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; text-align: left; }

/* ---------- Carte du village ---------- */
.vqo .carte-wrap { border: 1px solid var(--encre); background: var(--neige); padding: 4px; border-radius: 6px; }
.vqo .carte-wrap svg { display: block; width: 100%; height: auto; }
.vqo .carte-lieu { cursor: pointer; }
.vqo .carte-lieu:focus { outline: none; }
.vqo .carte-lieu:focus-visible { outline: 3px solid var(--ocre) !important; outline-offset: 2px !important; }
.vqo .carte-lieu:focus .halo, .vqo .carte-lieu:hover .halo { stroke: var(--ocre); stroke-width: 3; }
.vqo .carte-lieu text { font-family: var(--f-titre); font-size: 15px; fill: var(--encre); }
.vqo .lieux-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0; border-top: 1px solid var(--encre); }
.vqo .lieu-btn { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--trait); padding: 12px 6px; display: grid; gap: 2px; min-height: 48px; }
.vqo .lieu-btn:hover { background: var(--neige); }
.vqo .lieu-btn b { font-family: var(--f-recit); font-size: 1.05rem; font-weight: 500; }
.vqo .lieu-btn span { font-size: 0.85rem; color: var(--encre-2); }
.vqo .compagnons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.92rem; }
.vqo .compagnons button { border: 1px solid var(--trait); background: var(--neige); border-radius: 20px; padding: 4px 12px; min-height: 36px; }
.vqo .compagnons button[aria-pressed="true"] { border-color: var(--ardoise); background: var(--ardoise); color: var(--papier); }

/* ---------- Jet de dés ---------- */
.vqo .jet { display: grid; gap: 16px; justify-items: start; }
.vqo .des { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.vqo .de {
  width: 64px; height: 64px; border: 2px solid var(--encre); border-radius: 10px; background: var(--neige);
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 8px; gap: 2px; box-shadow: 4px 4px 0 var(--encre);
}
.vqo .de i { width: 10px; height: 10px; border-radius: 50%; background: var(--encre); place-self: center; visibility: hidden; }
.vqo .de.roule { animation: vqo-rouler 0.6s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes vqo-rouler { 0% { transform: rotate(-200deg) translateY(-30px); } 100% { transform: none; } }
.vqo .calcul { font-size: 0.95rem; display: grid; gap: 2px; font-variant-numeric: tabular-nums; max-width: 100%; }
.vqo .calcul div { display: flex; justify-content: space-between; gap: 24px; min-width: min(260px, 100%); border-bottom: 1px dotted var(--trait); }
.vqo .calcul .tot { font-weight: 700; border-bottom: 0; }
.vqo .issue { font-family: var(--f-titre); font-size: 1.8rem; line-height: 1.1; }
.vqo .issue.franche { color: var(--ardoise); } .vqo .issue.prix { color: var(--ocre); } .vqo .issue.complication { color: var(--rouge); }
.vqo .cotes { display: flex; height: 10px; width: min(360px, 100%); border: 1px solid var(--encre); }
.vqo .cotes span:nth-child(1) { background: var(--ardoise); } .vqo .cotes span:nth-child(2) { background: var(--ocre); } .vqo .cotes span:nth-child(3) { background: var(--rouge); }
.vqo .cotes-leg { font-size: 0.82rem; color: var(--encre-2); font-variant-numeric: tabular-nums; }

/* ---------- Résultat ---------- */
.vqo .evenements { display: flex; flex-wrap: wrap; gap: 6px; }
.vqo .ev { border: 1px solid var(--trait); background: var(--neige); border-radius: 3px; padding: 3px 9px; font-size: 0.86rem; }
.vqo .ev.bon { border-color: var(--ardoise); }
.vqo .ev.mal { border-color: var(--rouge); color: var(--rouge); }
.vqo .ev.indice { border-color: var(--follet); color: var(--follet); }
.vqo .nouvelles { border-left: 3px solid var(--rouge); padding: 6px 12px; display: grid; gap: 4px; background: var(--neige); }
.vqo .nouvelles p { margin: 0; }
.vqo .neo-etat { font-size: 0.84rem; color: var(--encre-2); display: flex; gap: 8px; align-items: center; margin-top: 2rem; }
.vqo .neo-etat .point { width: 8px; height: 8px; border-radius: 50%; background: var(--follet); animation: vqo-pulse 1.2s infinite; }
@keyframes vqo-pulse { 50% { opacity: 0.2; } }
.vqo .attente-recits { min-height: 250px; padding: 3rem 0; }

/* ---------- Matin ---------- */
.vqo .matin { display: grid; gap: 14px; }
.vqo .matin h3 { font-family: var(--f-titre); font-weight: 400; font-size: 1.3rem; margin: 0; }
.vqo .maisons-nuit { display: grid; gap: 6px; }
.vqo .maison-nuit { display: flex; gap: 10px; align-items: baseline; }
.vqo .maison-nuit .x { font-family: var(--f-titre); color: var(--rouge); }
.vqo .maison-nuit.sauvee .x { color: var(--ardoise); }
.vqo .lettre { background: var(--neige); border: 1px solid var(--trait); padding: 16px 18px; font-family: var(--f-recit); white-space: pre-line; box-shadow: 4px 4px 0 var(--ombre); transform: rotate(-0.4deg); }

/* ---------- Carnet ---------- */
.vqo .carnet { border-left: 1px solid var(--trait); background: var(--papier-2); min-width: 0; }
.vqo.vqo-large .carnet {
  position: sticky; top: calc(var(--vqo-haut, 0px) + var(--vqo-barre, 58px));
  height: calc(100vh - var(--vqo-haut, 0px) - var(--vqo-barre, 58px)); overflow: auto; align-self: start;
}
/* En tiroir : fixé en bas de l'écran, AU-DESSUS de la mascotte du site (z 180-185) et à côté du rail (z 410). */
.vqo:not(.vqo-large) .carnet {
  position: fixed; left: 0; right: 0; bottom: 0; height: min(78vh, 640px); overflow: auto; z-index: 400;
  border-left: 0; border-top: 2px solid var(--encre); border-radius: 12px 12px 0 0;
  box-shadow: 0 -10px 30px var(--ombre); padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 900px) {
  :root.ng-has-rail[data-layout="rail"] .vqo:not(.vqo-large) .carnet { left: 224px; }
  :root.ng-has-rail[data-layout="rail"] .vqo .astuce { left: calc(224px + 16px); }
}
.vqo .carnet[hidden] { display: none !important; }
.vqo .carnet-tete { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 0; }
.vqo .carnet-tete h2 { font-family: var(--f-titre); font-weight: 400; margin: 0; font-size: 1.4rem; }
.vqo .onglets { display: flex; flex-wrap: wrap; gap: 0; padding: 8px 12px 0; border-bottom: 1px solid var(--trait); }
.vqo .onglet { border: 0; background: none; padding: 8px 10px; border-bottom: 2px solid transparent; font-size: 0.92rem; white-space: nowrap; color: var(--encre-2); min-height: 40px; }
.vqo .onglet[aria-selected="true"] { border-color: var(--ocre); color: var(--encre); font-weight: 600; }
.vqo .carnet-corps { padding: 14px 16px 30px; display: grid; gap: 14px; font-size: 0.95rem; }
.vqo .carnet-corps h3 { font-family: var(--f-titre); font-weight: 400; font-size: 1.15rem; }
.vqo .fiche-heros { display: grid; gap: 8px; }
.vqo .caps { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-variant-numeric: tabular-nums; }
.vqo .caps .marques { color: var(--encre-2); font-size: 0.8rem; }
.vqo .jauge { display: flex; gap: 3px; }
.vqo .jauge i { width: 14px; height: 14px; border: 1px solid var(--ocre); border-radius: 50%; }
.vqo .jauge i.on { background: var(--ocre); }
.vqo .pnj { display: grid; grid-template-columns: 40px 1fr; gap: 4px 10px; padding-bottom: 12px; border-bottom: 1px solid var(--trait); }
.vqo .pnj svg { width: 40px; height: 40px; border-radius: 50%; background: var(--neige); border: 1px solid var(--trait); }
.vqo .pnj .portrait-cadre { width: 40px; height: 40px; background: var(--neige); }
.vqo .pnj b { font-weight: 600; }
.vqo .rel-echelle { display: flex; gap: 2px; margin: 2px 0; }
.vqo .rel-echelle i { flex: 1; height: 6px; background: var(--trait); }
.vqo .rel-echelle i.neg { background: var(--rouge); } .vqo .rel-echelle i.pos { background: var(--ardoise); }
.vqo .pourquoi { font-size: 0.85rem; color: var(--encre-2); margin: 4px 0 0; padding-left: 16px; }
.vqo .indice { padding-bottom: 10px; border-bottom: 1px solid var(--trait); }
.vqo .indice b { color: var(--follet); font-weight: 600; }
.vqo .question { display: flex; gap: 8px; align-items: baseline; }
.vqo .question.ok { color: var(--encre-2); text-decoration: line-through; text-decoration-color: var(--trait); }
.vqo .horloges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.vqo .horloge { display: grid; gap: 4px; justify-items: center; text-align: center; }
.vqo .horloge svg { width: 92px; height: 92px; }
.vqo .horloge b { font-family: var(--f-titre); font-weight: 400; font-size: 1.05rem; }
.vqo .horloge small { color: var(--encre-2); }
.vqo .horloge.voilee { opacity: 0.7; }
.vqo .sac { display: flex; flex-wrap: wrap; gap: 6px; }
.vqo .objet { border: 1px dashed var(--encre-2); border-radius: 3px; padding: 3px 8px; font-size: 0.86rem; background: var(--neige); }
.vqo .objet.cle { border-style: solid; border-color: var(--ocre); }
.vqo .vide { color: var(--encre-2); font-style: italic; }

/* ---------- Mini-jeux ---------- */
.vqo .mini { display: grid; gap: 14px; }
.vqo .mini h3 { font-family: var(--f-titre); font-weight: 400; margin: 0; font-size: 1.35rem; }
.vqo .temoins { display: grid; gap: 8px; }
.vqo .temoin { background: var(--neige); border-left: 3px solid var(--ardoise); padding: 8px 12px; font-family: var(--f-recit); }
.vqo .temoin b { font-family: var(--f-ui); font-size: 0.85rem; color: var(--encre-2); display: block; }
.vqo .temoin.preuve { border-left-color: var(--ocre); }
.vqo .grille-assign { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.vqo .grille-assign label { display: grid; gap: 4px; font-size: 0.9rem; }
.vqo .grille-assign select { padding: 8px; border: 1px solid var(--trait); background: var(--neige); border-radius: 4px; }
.vqo .chiffre { font-family: var(--f-titre); font-size: clamp(1.3rem, 4vw, 1.9rem); letter-spacing: 0.12em; word-spacing: 0.4em; overflow-wrap: anywhere; }
.vqo .chiffre.clair { color: var(--ardoise); }
.vqo .roue { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.vqo .roue input[type="range"] { min-height: 44px; flex: 1 1 12rem; }
.vqo .roue output { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 2ch; }
.vqo .rue-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.vqo .slot { border: 1px solid var(--trait); padding: 8px; background: var(--neige); display: grid; gap: 4px; font-size: 0.85rem; }
.vqo .slot select { width: 100%; padding: 6px; }
.vqo .contraintes { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-family: var(--f-recit); }
.vqo .pads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 460px; }
.vqo .pad { aspect-ratio: 1; border: 2px solid var(--encre); background: var(--neige); border-radius: 8px; font-size: 1.8rem; display: grid; place-items: center; gap: 0; }
.vqo .pad small { font-size: 0.7rem; color: var(--encre-2); }
.vqo .pad.allume { background: var(--ocre); color: var(--sur-ocre); border-color: var(--ocre); }
.vqo .pad.allume small { color: var(--sur-ocre); }
.vqo .pad:disabled { opacity: 0.6; }
.vqo .manches { display: flex; gap: 6px; }
.vqo .manches i { width: 16px; height: 16px; border: 1px solid var(--encre); transform: rotate(45deg); }
.vqo .manches i.ok { background: var(--ardoise); } .vqo .manches i.ko { background: var(--rouge); }
.vqo .indices-mini { display: grid; gap: 6px; }
.vqo .indice-mini { background: var(--ocre-doux); padding: 8px 12px; font-size: 0.92rem; }

/* ---------- Écran d'accueil et création ---------- */
.vqo .accueil { max-width: 1050px; margin: 0 auto; padding: 24px 16px 64px; display: grid; gap: 22px; }
.vqo .accueil-titre { font-family: var(--f-titre); font-weight: 400; font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 0.95; margin: 0; letter-spacing: -.04em; text-wrap: balance; }
.vqo .accueil-titre span { display: block; font-style: italic; font-size: 0.42em; color: var(--ardoise); margin-top: 10px; letter-spacing: 0; }
.vqo .accroche { font-family: var(--f-recit); font-size: 1.2rem; max-width: 650px; margin: 0; }
.vqo .actions-accueil { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.vqo .creation { display: grid; gap: 26px; }
.vqo .creation fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
.vqo .creation legend { font-family: var(--f-titre); font-size: 1.35rem; padding: 0; margin-bottom: 4px; }
.vqo .creation .aide { color: var(--encre-2); font-size: 0.92rem; margin: -4px 0 0; }
.vqo .champ { display: grid; gap: 4px; max-width: 460px; }
.vqo .champ input, .vqo .champ select, .vqo .champ textarea { padding: 10px 12px; border: 1px solid var(--trait); background: var(--neige); border-radius: 4px; }
.vqo .cartes-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.vqo .carte-choix { position: relative; display: block !important; min-height: 0 !important; }
.vqo .carte-choix input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.vqo .carte-choix span { display: grid; gap: 4px; border: 1px solid var(--trait); background: var(--neige); padding: 12px; height: 100%; border-radius: 4px; }
.vqo .carte-choix b { font-family: var(--f-recit); font-weight: 600; font-size: 1.05rem; }
.vqo .carte-choix small { color: var(--encre-2); }
.vqo .carte-choix input:checked + span { border-color: var(--ardoise); box-shadow: inset 0 0 0 1px var(--ardoise); background: var(--papier-2); }
.vqo .carte-choix input:focus-visible + span { outline: 3px solid var(--ocre); outline-offset: 2px; }
.vqo .rangee { display: flex; flex-wrap: wrap; gap: 16px; }
.vqo .pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.vqo .pastilles label { position: relative; }
.vqo .pastilles input { position: absolute; opacity: 0; }
.vqo .pastilles span { display: inline-block; border: 1px solid var(--trait); border-radius: 20px; padding: 5px 12px; background: var(--neige); font-size: 0.92rem; }
.vqo .pastilles input:checked + span { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.vqo .pastilles input:focus-visible + span { outline: 3px solid var(--ocre); outline-offset: 2px; }
.vqo .apercu-caps { display: flex; flex-wrap: wrap; gap: 6px 16px; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.vqo .erreur { color: var(--rouge); font-weight: 600; }
.vqo .panne { min-height: 40vh; align-content: center; }

/* ---------- Fenêtres ---------- */
/* Le voile passe AU-DESSUS du rail du site (z 410) et de sa barre collante (z 190). */
.vqo .voile { position: fixed; inset: 0; background: rgba(10, 14, 16, 0.55); z-index: 420; display: grid; place-items: center; padding: 16px; }
.vqo .fenetre { background: var(--papier); color: var(--encre); border: 1px solid var(--encre); box-shadow: 8px 8px 0 var(--encre); width: min(640px, 100%); max-height: 88vh; overflow: auto; padding: 20px; display: grid; gap: 14px; }
.vqo .fenetre h2 { font-family: var(--f-titre); font-weight: 400; margin: 0; font-size: 1.6rem; }
.vqo .fenetre h3 { font-family: var(--f-titre); font-weight: 400; font-size: 1.15rem; }
.vqo .fenetre textarea { width: 100%; min-height: 120px; font-family: ui-monospace, monospace; font-size: 0.8rem; padding: 8px; border: 1px solid var(--trait); background: var(--neige); }
.vqo .fenetre input[type="file"] { max-width: 100%; }
.vqo .reglages { display: grid; gap: 16px; }
.vqo .reglage { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.vqo .reglage select, .vqo .reglage input[type="range"] { max-width: 60vw; }
.vqo .reglage input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--ocre); }
.vqo .reglage small { grid-column: 1 / -1; color: var(--encre-2); }
/* Au doigt : l'étiquette de chaque case (un label FRÈRE, que le plancher B852 de style.css ne voit pas) et les
   curseurs Volume et Vitesse de la voix (exclus de B852) font 44 px de haut. */
@media (pointer: coarse) {
  .vqo .reglage label { display: flex; align-items: center; min-height: 44px; }
  .vqo .reglage input[type="checkbox"] { width: 28px; height: 28px; }
  .vqo .reglage input[type="range"] { min-height: 44px; }
}
.vqo .fusion-fenetre { max-width: 740px; max-height: 88vh; overflow: auto; padding: 2rem; }
.vqo .fusion-fenetre details { padding: 1.2rem 0; border-bottom: 1px solid var(--trait); }
.vqo .fusion-fenetre details p { margin: .5rem 0; }
.vqo .fusion-fenetre summary { cursor: pointer; font-size: 1.12rem; padding: .5rem; }
.vqo .fusion-fenetre label { display: block; margin: 1rem 0 .5rem; }
.vqo .fusion-fenetre input, .vqo .fusion-fenetre textarea { width: 100%; box-sizing: border-box; margin: .5rem 0; padding: 1rem; color: inherit; background: transparent; border: 1px solid var(--trait); border-radius: 6px; }
.vqo .fusion-fenetre textarea { min-height: 140px; font-family: var(--f-ui); font-size: 1rem; }
.vqo .fusion-fenetre .btn { margin: .3rem; }
.vqo .fragment { display: flex; justify-content: space-between; align-items: center; padding: .4rem; border-bottom: 1px solid var(--trait); gap: 1rem; }
.vqo .portrait-conversation { width: 110px; margin: 1rem auto; }
.vqo .portrait-conversation svg { width: 100%; height: auto; }
.vqo .portrait-conversation.peint { width: min(240px, 62vw); }
.vqo .portrait-conversation img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--trait); background: var(--neige); }
.vqo .astuce {
  position: fixed; z-index: 400; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: min(420px, calc(100vw - 32px)); background: var(--encre); color: var(--papier); padding: 12px 14px; border-radius: 4px; font-size: 0.92rem; display: grid; gap: 6px;
  box-shadow: 6px 6px 0 var(--ocre);
}
.vqo .astuce b { font-family: var(--f-titre); font-weight: 400; font-size: 1.05rem; }
.vqo .astuce button { justify-self: end; background: none; border: 1px solid var(--papier); color: var(--papier); border-radius: 3px; padding: 2px 10px; min-height: 36px; }

/* ---------- Fin et chronique ---------- */
.vqo .chronique { display: grid; gap: 18px; }
.vqo .chronique h2 { font-family: var(--f-titre); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.05; margin: 0; text-wrap: balance; }
.vqo .chronique h3 { font-family: var(--f-titre); font-weight: 400; font-size: 1.3rem; margin: 0 0 6px; }
.vqo .chronique section { display: grid; gap: 6px; }
.vqo .chronique ol, .vqo .chronique ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-family: var(--f-recit); }
.vqo .stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; font-variant-numeric: tabular-nums; }
.vqo .stats div { border-top: 1px solid var(--encre); padding-top: 4px; display: grid; }
.vqo .stats b { font-family: var(--f-titre); font-weight: 400; font-size: 1.6rem; }
.vqo .stats span { font-size: 0.84rem; color: var(--encre-2); }
.vqo .noms-retrouves { columns: 2 180px; font-family: var(--f-recit); font-size: 0.95rem; color: var(--encre-2); }

/* ---------- Contraste élevé : des bords nets ---------- */
.vqo.contraste .btn, .vqo.contraste .choix { border: 2px solid currentColor; }
.vqo.contraste .sur-titre { color: inherit; }

/* ---------- Mouvement réduit : le réglage du jeu, le mode calme du site, le choix de l'appareil ---------- */
.vqo.calme *, .vqo.calme *::before, .vqo.calme *::after,
:root[data-calm="1"] .vqo *, :root[data-calm="1"] .vqo *::before, :root[data-calm="1"] .vqo *::after { animation: none !important; transition: none !important; }
.vqo.calme .choix:hover, :root[data-calm="1"] .vqo .choix:hover { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .vqo *, .vqo *::before, .vqo *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .vqo .choix:hover { transform: none; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 700px) {
  .vqo .barre { position: static; }
  .vqo .barre-in { gap: 8px; }
  .vqo .calendrier { margin-left: 0; order: 3; width: 100%; justify-content: space-between; }
  .vqo .outils { margin-left: auto; }
  .vqo .bouton-outil { padding: 5px 8px; font-size: 0.85rem; }
  .vqo .fusion-fenetre { padding: 1rem; max-width: 100%; width: 100%; max-height: 92vh; }
  .vqo .couverture { border-radius: 6px; }
  .vqo .mention-image { top: calc(var(--vqo-haut, 0px) + 6px); }   /* la barre du jeu ne colle plus ici */
  .vqo .intentions .btn { padding: .7rem; }
  .vqo .btn, .vqo button { min-height: 44px; }
  .vqo .scene-in { padding-bottom: 2rem; }
  .vqo .choix { padding: 1rem .6rem; }
}
@media (max-width: 560px) {
  .vqo .rue-slots { grid-template-columns: 1fr; }
  .vqo .reglage { grid-template-columns: 1fr; }
  .vqo .reglage select, .vqo .reglage input[type="range"] { max-width: 100%; }
}
