/* NeoGenesis : « Chroniques de Brumeval » (brumeval.html), la zone du jeu (B900).
   Suit les jetons du site (--panel, --line, --text, --muted, --cyan, --bg-2) pour les 4 thèmes. Couleurs propres au
   jeu : la brume (bleu-vert), l'or (ancrages dorés, critiques), l'ambre (dégâts : jamais de rouge pour un état), le
   vert d'eau (soins). Cibles de 44 px, focus visible, rien ne déborde à 375 px. Les effets s'éteignent avec
   prefers-reduced-motion ou le réglage « Effets » (.bv-calme). */
.bv-jeu{--bv-brume:#7fc8d6;--bv-or:#d9ae4f;--bv-ambre:#e09a3c;--bv-soin:#4fcfa0;--bv-ombre:rgba(4,8,16,.55);position:relative;isolation:isolate;min-width:0}
:root[data-theme="light"] .bv-jeu{--bv-brume:#1f6f80;--bv-or:#8a6416;--bv-ambre:#9a5a08;--bv-soin:#13745a;--bv-ombre:rgba(20,30,40,.18)}
.bv-jeu *{box-sizing:border-box}
.bv-charge{color:var(--muted);padding:1rem 0}
.bv-brume{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;border-radius:18px;opacity:.55}
.bv-app{display:flex;flex-direction:column;gap:1rem;min-width:0}
.bv-panneau{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:1rem 1.1rem;min-width:0}
.bv-panneau h2,.bv-panneau h3{margin:0 0 .6rem;line-height:1.3}
.bv-panneau h2{font-size:1.15rem;font-weight:800}
.bv-panneau h3{font-size:1rem;font-weight:700}
.bv-panneau p{margin:0 0 .55rem;line-height:1.6;font-size:.94rem}
.bv-petit{font-size:.84rem;color:var(--muted);line-height:1.5}
.bv-rangee{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.bv-btn,.bv-btn2,.bv-btn3{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-height:44px;min-width:44px;padding:.55rem 1rem;border-radius:12px;font:inherit;font-weight:700;cursor:pointer;text-decoration:none;line-height:1.25;text-align:center}
.bv-btn{background:var(--bv-brume);color:#04121a;border:1px solid transparent}
:root[data-theme="light"] .bv-btn{color:#fff}
.bv-btn2{background:transparent;color:var(--text);border:1px solid var(--line)}
.bv-btn3{background:var(--bg-2);color:var(--text);border:1px solid var(--line);min-height:44px;padding:.4rem .7rem;font-weight:600;font-size:.9rem}
.bv-btn:hover,.bv-btn2:hover,.bv-btn3:hover{filter:brightness(1.08)}
.bv-btn[disabled],.bv-btn2[disabled],.bv-btn3[disabled]{opacity:.5;cursor:not-allowed}
.bv-jeu button:focus-visible,.bv-jeu a:focus-visible,.bv-jeu input:focus-visible,.bv-jeu select:focus-visible,.bv-jeu textarea:focus-visible,.bv-jeu [tabindex]:focus-visible{outline:3px solid var(--bv-or);outline-offset:2px}
.bv-champ{display:flex;flex-direction:column;gap:.3rem;min-width:0;font-size:.9rem}
.bv-champ > span{font-weight:700}
.bv-champ input,.bv-champ select,.bv-champ textarea,.bv-zone{width:100%;max-width:100%;min-height:44px;padding:.55rem .7rem;border-radius:10px;border:1px solid var(--line);background:var(--bg-2);color:var(--text);font:inherit;font-size:.95rem}
.bv-zone{min-height:7rem;resize:vertical;font-family:ui-monospace,Consolas,monospace;font-size:.82rem;line-height:1.45}
.bv-champ textarea{min-height:4.5rem;resize:vertical}
.bv-grille2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:.7rem}
.bv-heros-form{border:1px dashed var(--line);border-radius:14px;padding:.8rem;display:flex;flex-direction:column;gap:.6rem}
.bv-heros-form legend{font-weight:800;padding:0 .3rem}
.bv-erreurs{border-left:4px solid var(--bv-ambre);background:color-mix(in srgb,var(--bv-ambre) 10%,transparent);padding:.6rem .8rem;border-radius:8px;margin:.5rem 0;font-size:.9rem}
.bv-erreurs ul{margin:.3rem 0 0;padding-left:1.1rem}
.bv-ok{border-left:4px solid var(--bv-soin);background:color-mix(in srgb,var(--bv-soin) 10%,transparent);padding:.6rem .8rem;border-radius:8px;margin:.5rem 0;font-size:.9rem}
/* ---------- la table ---------- */
.bv-table{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:1rem;align-items:start}
@media(max-width:980px){.bv-table{grid-template-columns:minmax(0,1fr)}}
.bv-bandeau{display:flex;flex-wrap:wrap;gap:.4rem .9rem;align-items:center;font-size:.9rem}
.bv-bandeau strong{font-weight:800}
.bv-puce{display:inline-flex;align-items:center;gap:.3rem;padding:.25rem .6rem;border-radius:999px;border:1px solid var(--line);background:var(--bg-2);font-size:.84rem;max-width:100%;overflow-wrap:anywhere}
.bv-puce.actif{border-color:var(--bv-or);box-shadow:0 0 0 2px color-mix(in srgb,var(--bv-or) 35%,transparent)}
.bv-puce.tombe{opacity:.5;text-decoration:line-through}
.bv-recit{display:flex;flex-direction:column;gap:.6rem;max-height:62vh;overflow-y:auto;padding-right:.3rem;overscroll-behavior:contain}
.bv-entree{border-radius:12px;padding:.65rem .8rem;line-height:1.6;font-size:.95rem;overflow-wrap:anywhere;border:1px solid var(--line);background:var(--bg-2)}
.bv-entree p{margin:0 0 .5rem}.bv-entree p:last-child{margin:0}
.bv-entree.mj{background:color-mix(in srgb,var(--bv-brume) 8%,var(--panel));border-color:color-mix(in srgb,var(--bv-brume) 35%,var(--line))}
.bv-entree.joueur{border-style:dashed}
.bv-entree.des,.bv-entree.moteur{font-size:.86rem;color:var(--muted)}
.bv-entree.des strong{color:var(--text)}
.bv-entree .bv-qui{display:block;font-size:.78rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:.2rem}
.bv-image img{max-width:100%;border-radius:10px;display:block;margin:.4rem 0}
.bv-mention{font-size:.78rem;color:var(--muted);font-style:italic}
.bv-action{display:flex;flex-direction:column;gap:.6rem}
.bv-etapes{display:flex;flex-direction:column;gap:.7rem}
.bv-etape{border:1px solid var(--line);border-radius:12px;padding:.7rem}
.bv-etape h3{font-size:.95rem;margin:0 0 .4rem}
/* B901 : le Maître du jeu en direct, le copier-coller replié dessous, l'accès géré par l'administrateur */
.bv-direct{display:flex;flex-direction:column;gap:.45rem;border:1px solid color-mix(in srgb,var(--bv-brume) 45%,var(--line));border-radius:12px;padding:.75rem;background:color-mix(in srgb,var(--bv-brume) 6%,var(--panel));margin-bottom:.7rem;min-width:0}
.bv-direct p{margin:0}
.bv-avis{border-left:4px solid var(--bv-or);background:color-mix(in srgb,var(--bv-or) 10%,transparent);padding:.6rem .8rem;border-radius:8px;font-size:.9rem}
.bv-repli{border:1px solid var(--line);border-radius:12px;padding:0 .7rem;min-width:0}
.bv-repli > summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600}
.bv-repli > summary:focus-visible{outline:3px solid var(--bv-or);outline-offset:2px}
.bv-repli[open]{padding-bottom:.7rem}
.bv-acces input[type="text"]{min-height:44px;flex:1 1 12rem;min-width:0;padding:.4rem .6rem;border-radius:10px;border:1px solid var(--line);background:var(--bg-2);color:var(--text);font:inherit}
.bv-acces .bv-liste li{align-items:center}
/* B902 : « Hors des cartes » */
.bv-carnet{min-width:0;margin-top:.8rem}
.bv-carnet h4{margin:.6rem 0 .3rem;font-size:.95rem}
.bv-carnet .bv-btn3{max-width:100%;white-space:normal;overflow-wrap:anywhere;justify-content:flex-start;text-align:left}
.bv-carnet-liste li{display:flex;flex-direction:column;align-items:flex-start;gap:.15rem}
.bv-onglets{display:flex;flex-wrap:wrap;gap:.35rem;margin:0 0 .7rem}
.bv-onglets [role="tab"]{min-height:44px;padding:.4rem .75rem;border-radius:10px;border:1px solid var(--line);background:transparent;color:var(--text);font:inherit;font-weight:700;cursor:pointer}
.bv-onglets [role="tab"][aria-selected="true"]{background:var(--bg-2);border-color:var(--bv-brume)}
/* ---------- la fiche ---------- */
.bv-fiche{display:flex;flex-direction:column;gap:.7rem}
.bv-fiche-tete{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.4rem;align-items:baseline}
.bv-fiche-tete h3{margin:0;font-size:1.05rem}
.bv-pv{height:12px;border-radius:999px;background:var(--bg-2);border:1px solid var(--line);overflow:hidden}
.bv-pv > span{display:block;height:100%;background:linear-gradient(90deg,var(--bv-soin),var(--bv-brume));transition:width .5s ease}
.bv-pv.bas > span{background:linear-gradient(90deg,var(--bv-ambre),var(--bv-or))}
.bv-caracs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.3rem;text-align:center}
@media(max-width:420px){.bv-caracs{grid-template-columns:repeat(3,minmax(0,1fr))}}
.bv-carac{border:1px solid var(--line);border-radius:10px;padding:.3rem .1rem;background:var(--bg-2)}
.bv-carac b{display:block;font-size:.72rem;letter-spacing:.05em;color:var(--muted)}
.bv-carac span{display:block;font-size:1.05rem;font-weight:800}
.bv-carac i{display:block;font-style:normal;font-size:.8rem;color:var(--muted)}
.bv-liste{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem;font-size:.88rem}
.bv-liste li{display:flex;justify-content:space-between;gap:.5rem;border-bottom:1px dotted var(--line);padding:.15rem 0;overflow-wrap:anywhere}
.bv-pips{display:inline-flex;gap:.2rem;vertical-align:middle}
.bv-pips i{width:12px;height:12px;border-radius:50%;border:2px solid var(--bv-brume);display:inline-block}
.bv-pips i.plein{background:var(--bv-brume)}
.bv-ancrage{display:flex;justify-content:space-between;align-items:center;gap:.5rem;border:1px solid var(--line);border-radius:10px;padding:.45rem .6rem;font-size:.88rem}
.bv-ancrage.dore{border-color:var(--bv-or);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bv-or) 40%,transparent)}
.bv-ancrage.gris{opacity:.55;filter:grayscale(1)}
/* ---------- les cartes ---------- */
.bv-cartes{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,170px),1fr));gap:.6rem}
.bv-tuile{position:relative;display:flex;flex-direction:column;gap:.35rem;border:1px solid var(--line);border-radius:14px;padding:.6rem .65rem;background:linear-gradient(160deg,var(--bg-2),color-mix(in srgb,var(--bv-brume) 6%,var(--panel)));min-height:9rem;overflow-wrap:anywhere;transform-style:preserve-3d}
.bv-tuile h4{margin:0;font-size:.92rem;line-height:1.25}
.bv-tuile p{margin:0;font-size:.8rem;line-height:1.45;color:var(--text)}
.bv-tuile .bv-badges{display:flex;flex-wrap:wrap;gap:.25rem}
.bv-badge{font-size:.7rem;font-weight:800;letter-spacing:.03em;padding:.12rem .45rem;border-radius:999px;border:1px solid var(--line);background:var(--panel)}
.bv-badge.vif{border-color:var(--bv-or);color:var(--bv-or)}
.bv-badge.declenche{border-color:var(--bv-brume);color:var(--bv-brume)}
.bv-tuile.gris{filter:grayscale(1);opacity:.55}
.bv-tuile .bv-rangee{margin-top:auto}
.bv-tuile[data-famille="ancrage"]{border-color:var(--bv-or)}
/* ---------- le dialogue de réaction ---------- */
.bv-voile{position:fixed;inset:0;background:var(--bv-ombre);display:flex;align-items:center;justify-content:center;padding:1rem;z-index:2000}
.bv-dialogue{background:var(--panel);border:1px solid var(--bv-or);border-radius:16px;padding:1.1rem;max-width:460px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.4)}
.bv-dialogue h2{font-size:1.1rem;margin:0 0 .5rem}
/* ---------- les dés ---------- */
.bv-plateau{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;min-height:0}
.bv-de{position:relative;width:58px;height:58px;display:inline-flex;align-items:center;justify-content:center;font-weight:900;font-size:1.25rem;color:var(--text);
  background:radial-gradient(circle at 35% 30%,color-mix(in srgb,var(--bv-brume) 35%,var(--panel)),var(--bg-2));
  clip-path:polygon(50% 0,93% 25%,93% 75%,50% 100%,7% 75%,7% 25%);}
.bv-de.roule{animation:bvRoule .75s cubic-bezier(.2,.8,.3,1)}
.bv-de.crit{background:radial-gradient(circle at 35% 30%,#fff3c4,var(--bv-or));color:#2a1a00;animation:bvRoule .75s cubic-bezier(.2,.8,.3,1),bvLueur 1.4s ease-out .75s}
.bv-de.un{opacity:.6;filter:grayscale(.7)}
.bv-de small{position:absolute;bottom:4px;font-size:.6rem;font-weight:700;color:var(--muted)}
@keyframes bvRoule{0%{transform:rotate(-540deg) scale(.4)}70%{transform:rotate(20deg) scale(1.1)}100%{transform:rotate(0) scale(1)}}
@keyframes bvLueur{0%{filter:drop-shadow(0 0 0 var(--bv-or))}40%{filter:drop-shadow(0 0 14px var(--bv-or))}100%{filter:drop-shadow(0 0 0 var(--bv-or))}}
.bv-flottant{position:absolute;font-weight:900;font-size:1.1rem;pointer-events:none;animation:bvMonte 1.3s ease-out forwards;z-index:5}
.bv-flottant.degats{color:var(--bv-ambre)}.bv-flottant.soin{color:var(--bv-soin)}
@keyframes bvMonte{0%{transform:translateY(0);opacity:1}100%{transform:translateY(-46px);opacity:0}}
.bv-retourne{animation:bvRetourne .6s ease}
@keyframes bvRetourne{0%{transform:rotateY(90deg)}100%{transform:rotateY(0)}}
.bv-arrive{animation:bvArrive .7s ease}
@keyframes bvArrive{0%{transform:translateY(16px);opacity:0;box-shadow:0 0 0 0 var(--bv-or)}60%{box-shadow:0 0 18px 2px color-mix(in srgb,var(--bv-or) 60%,transparent)}100%{transform:none;opacity:1;box-shadow:none}}
.bv-moment{animation:bvMoment 1.8s ease}
@keyframes bvMoment{0%{box-shadow:inset 0 0 0 0 var(--bv-or)}35%{box-shadow:inset 0 0 40px 2px color-mix(in srgb,var(--bv-or) 45%,transparent)}100%{box-shadow:inset 0 0 0 0 transparent}}
.bv-calme .bv-de,.bv-calme .bv-flottant,.bv-calme .bv-retourne,.bv-calme .bv-arrive,.bv-calme .bv-moment{animation:none!important}
.bv-calme .bv-brume{display:none}
@media(prefers-reduced-motion:reduce){.bv-de,.bv-flottant,.bv-retourne,.bv-arrive,.bv-moment{animation:none!important}.bv-pv > span{transition:none}}
.bv-horloge{display:inline-flex;gap:3px;vertical-align:middle}
.bv-horloge i{width:14px;height:14px;border-radius:3px;border:2px solid var(--bv-brume);display:inline-block}
.bv-horloge i.plein{background:var(--bv-brume)}
/* ---------- les images (GéPéTo) ---------- */
.bv-figure{margin:0;display:flex;flex-direction:column;gap:.2rem;min-width:0}
.bv-figure img{display:block;width:100%;height:auto;border-radius:12px;border:1px solid var(--line);background:var(--bg-2)}
.bv-couverture img{aspect-ratio:16/9;object-fit:cover;max-height:380px}
.bv-vue-lieu img{aspect-ratio:16/9;object-fit:cover;max-height:260px}
.bv-portrait{max-width:180px}.bv-portrait img{aspect-ratio:1/1;object-fit:cover}
/* ---------- les cartes (SVG) ---------- */
.bv-carte-zone{display:flex;flex-direction:column;gap:.5rem;min-width:0}
.bv-carte-zone h4{margin:.2rem 0;font-size:.95rem}
.bv-plan{width:100%;height:auto;max-height:60vh;border-radius:12px;border:1px solid var(--line);display:block}
.bv-plan-fond{fill:#2e4a3a}
.bv-terrain-riviere .bv-plan-fond,.bv-terrain-collines .bv-plan-fond{fill:#3a5a3c}
.bv-terrain-foret .bv-plan-fond{fill:#22402e}.bv-terrain-montagne .bv-plan-fond{fill:#4a4f57}
.bv-terrain-toundra .bv-plan-fond{fill:#b9c8d2}.bv-terrain-steppe .bv-plan-fond{fill:#8a7c4a}
.bv-terrain-falaise .bv-plan-fond{fill:#585e66}.bv-terrain-lac .bv-plan-fond{fill:#1f4f6a}
.bv-terrain-cendres .bv-plan-fond{fill:#2b2523}.bv-terrain-sources .bv-plan-fond{fill:#5a5148}
.bv-terrain-souterrain .bv-plan-fond{fill:#26232b}.bv-terrain-brume .bv-plan-fond{fill:#6d7378}
.bv-terrain-maison .bv-plan-fond{fill:#3a2f26}.bv-terrain-donjon .bv-plan-fond{fill:#14161b}
.bv-plan-route{fill:#9c8a68;opacity:.75}.bv-plan-place{fill:#b8a47c;opacity:.8}.bv-plan-eau{fill:#2a6f95;opacity:.85}
.bv-plan-decor{fill:#dfe9e1;opacity:.45;font-size:9px}
.bv-plan-mur{fill:#d8c7a6;stroke:#3a2a18;stroke-width:1.5}.bv-plan-toit{fill:#8c3f2a}
.bv-plan-maison{cursor:pointer}.bv-plan-maison:hover .bv-plan-mur{fill:#f1e2c2}
.bv-plan-maison.notable .bv-plan-mur{stroke:var(--bv-or);stroke-width:2.5}
.bv-plan-num{fill:#1d140a;font-size:11px;font-weight:800}
.bv-plan-sol{fill:#cdbb98;stroke:#3a2a18;stroke-width:1.5}.bv-plan-cache{fill:#555c66;opacity:.65}
.bv-plan-etiq{fill:#1d140a;font-size:7.5px;font-weight:700}
.bv-plan-meuble{fill:#6b4a2a}.bv-plan-pnj{fill:#3a7bd5}.bv-plan-pnj.notable{fill:var(--bv-or)}
.bv-plan-porte{fill:var(--bv-or)}
.bv-plan-couloir{fill:#8f8778}.bv-plan-couloir.secret{fill:#c9a24a;opacity:.6}
.bv-type-boss .bv-plan-sol{stroke:#c9a24a;stroke-width:3}.bv-type-repos .bv-plan-sol{fill:#b9d3b0}
.bv-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
