/* THE SYSTEM — Direction artistique « Donjon & Verre Saphir » */
:root {
  --fond: #02040a;
  --abysse: #050a18;
  --image: #05070d;
  --saphir: #3aa0ff;
  --saphir-clair: #9ad4ff;
  --cyan: #3de0ff;
  --violet: #a46bff;
  --cramoisi: #ff3355;
  --gris: #8b95aa;
  --vert: #3dffb0;
  --texte: #e8f0ff;
  --texte-2: #93a4c3;
  --verre: rgba(16, 32, 66, 0.42);
  --verre-fort: rgba(18, 36, 74, 0.72);
  --bord: rgba(130, 195, 255, 0.24);
  --accent: var(--saphir);
  --accent-rgb: 58, 160, 255;
  --rayon: 16px;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --haut-sur: env(safe-area-inset-top, 0px);
  --bas-sur: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
body[data-ambiance="penalite"] { --accent: var(--cramoisi); --accent-rgb: 255, 51, 85; }
body[data-ambiance="raid"] { --accent: var(--violet); --accent-rgb: 164, 107, 255; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--saphir-clair); outline-offset: 2px; }
p { margin: 0; }
h1, h2 { margin: 0; font-weight: 700; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.note { color: var(--texte-2); font-size: 0.85rem; }
.centre { text-align: center; }
.noscript { padding: 2rem; text-align: center; }

/* ---------- Halo d'ambiance ---------- */
.halo {
  position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(45% 35% at 50% 8%, rgba(var(--accent-rgb), 0.28), transparent 70%),
    radial-gradient(40% 30% at 15% 85%, rgba(var(--accent-rgb), 0.12), transparent 70%),
    radial-gradient(60% 40% at 90% 60%, rgba(30, 60, 140, 0.18), transparent 70%),
    linear-gradient(180deg, var(--abysse), var(--fond) 60%);
  transition: background 0.6s ease;
}
body.flash-penalite .halo { animation: flash-rouge 1.2s ease-out; }
body.flash-eveil .halo { animation: flash-eveil 0.65s ease-out; }
@keyframes flash-rouge { 0%, 30% { background-color: rgba(255, 51, 85, 0.55); } 100% { background-color: transparent; } }
@keyframes flash-eveil { 0% { background-color: rgba(154, 212, 255, 0.6); } 100% { background-color: transparent; } }

/* ---------- Typo HUD ---------- */
.hud {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.55);
}
.hud-alerte { font-size: 0.95rem; }
.titre { font-size: 1.5rem; letter-spacing: 0.01em; }
.chiffre { font-family: var(--mono); font-size: 2.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.rang { color: var(--accent); text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.6); }
.classe { font-family: var(--mono); font-weight: 700; letter-spacing: 0.12em; color: var(--saphir-clair); }

/* ---------- Panneaux verre ---------- */
.panneau {
  background: var(--verre);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 1px rgba(var(--accent-rgb), 0.04), 0 8px 30px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  min-width: 0;
}
.panneau.verrouille { flex-direction: row; align-items: center; gap: 12px; opacity: 0.6; border-style: dashed; }
.panneau.verrouille .ico { width: 22px; height: 22px; flex: none; }

/* ---------- Icônes ---------- */
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico-rune { width: 48px; height: 48px; color: rgba(var(--accent-rgb), 0.7); stroke-width: 1.2; }
.ico-equipement { width: 30px; height: 30px; }

/* ---------- Boutons ---------- */
.btn {
  border: 1px solid var(--bord);
  background: var(--verre-fort);
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  min-height: 48px;
  max-width: 100%;
  text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-primaire {
  border-color: rgba(var(--accent-rgb), 0.85);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.28), rgba(var(--accent-rgb), 0.12));
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.35), inset 0 0 12px rgba(var(--accent-rgb), 0.15);
  color: #fff;
}
.btn-primaire:active { transform: scale(0.98); }
.btn-secondaire { color: var(--saphir-clair); }
.btn-fantome { background: transparent; color: var(--texte-2); }
.btn-fantome.danger { color: var(--cramoisi); border-color: var(--cramoisi); }
.btn-lien { background: none; border: none; color: var(--saphir-clair); text-decoration: underline; min-height: 44px; }
.btn-large { width: 100%; }
.btn-rond {
  width: 48px; height: 48px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--bord);
  background: var(--verre-fort);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.btn-rond.petit { width: 40px; height: 40px; }
.btn-rond.petit .ico { width: 18px; height: 18px; }
.btn-rond.grand { width: 72px; height: 72px; border-color: rgba(var(--accent-rgb), 0.8); box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.35); }
.btn-rond.grand .ico { width: 30px; height: 30px; }
.btn-serie {
  min-width: 56px; height: 40px; border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.7);
  background: rgba(var(--accent-rgb), 0.14);
  font-family: var(--mono); font-weight: 700;
}
.rangee { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rangee > .champ { flex: 1 1 140px; }
.rangee-preset { flex-wrap: nowrap; }
.rangee-preset > .champ { flex: 1 1 auto; font-family: var(--police); letter-spacing: normal; }
.rangee-preset > .btn { flex: none; padding-inline: 14px; }

/* ---------- Puces & interrupteurs ---------- */
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce {
  border: 1px solid var(--bord); background: transparent; color: var(--texte-2);
  border-radius: 999px; padding: 8px 14px; min-height: 40px; font-size: 0.9rem;
}
.puce[aria-pressed="true"] { color: #fff; border-color: rgba(var(--accent-rgb), 0.9); background: rgba(var(--accent-rgb), 0.18); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3); }
.puce-exclusion[aria-pressed="true"] { border-color: var(--cramoisi); background: rgba(255, 51, 85, 0.14); box-shadow: none; text-decoration: line-through; }
.interrupteur {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  width: 100%; background: none; border: none; padding: 6px 0; text-align: left;
}
.interrupteur .note { grid-column: 1; }
.interrupteur-piste {
  grid-column: 2; grid-row: 1 / span 2;
  width: 46px; height: 26px; border-radius: 13px; border: 1px solid var(--bord); background: rgba(255, 255, 255, 0.06); position: relative;
}
.interrupteur-piste::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--texte-2); transition: transform 0.2s; }
.interrupteur[aria-checked="true"] .interrupteur-piste { background: rgba(var(--accent-rgb), 0.35); border-color: var(--accent); }
.interrupteur[aria-checked="true"] .interrupteur-piste::after { transform: translateX(20px); background: #fff; }
.etat-fixe { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 6px 0; }
.etat-fixe .note { grid-column: 1; }
.badge-actif {
  grid-column: 2; grid-row: 1 / span 2; font-family: var(--mono); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.12em;
  color: var(--cramoisi); border: 1px solid rgba(255, 51, 85, 0.65); background: rgba(255, 51, 85, 0.1); border-radius: 6px; padding: 5px 9px;
  text-shadow: 0 0 10px rgba(255, 51, 85, 0.5); user-select: none;
}
.entete-page { display: flex; flex-direction: column; gap: 4px; }
.hud-titre { font-family: var(--mono); letter-spacing: 0.24em; color: var(--accent); text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.55); }
.sous-titre { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.2em; color: var(--texte-2); }

/* ---------- Champs ---------- */
.champ {
  width: 100%; min-width: 0; min-height: 48px;
  border: 1px solid var(--bord); border-radius: 12px;
  background: rgba(0, 0, 0, 0.35); padding: 10px 14px;
  font-family: var(--mono); letter-spacing: 0.08em;
}
.champ:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2); }
.curseur { width: 100%; accent-color: var(--saphir); }
.erreur, .message { color: var(--cramoisi); font-size: 0.85rem; min-height: 1.2em; }
.message { color: var(--saphir-clair); }

/* ---------- Stepper ---------- */
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.stepper-label { color: var(--texte-2); font-size: 0.9rem; min-width: 0; }
.stepper-ctrl { display: flex; align-items: center; gap: 10px; flex: none; }
.stepper-val { min-width: 4.5ch; text-align: center; font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper.grand { flex-direction: column; gap: 14px; }
.stepper.grand .stepper-ctrl { flex-wrap: wrap; justify-content: center; gap: 10px; }
.stepper.grand .stepper-saisie {
  order: -1; flex: 0 0 100%; width: 100%; min-width: 0;
  background: transparent; border: none; border-bottom: 1px solid rgba(var(--accent-rgb), 0.35); border-radius: 0;
  text-align: center; font-family: var(--mono); font-weight: 800; font-size: 4.5rem; line-height: 1.1; padding: 0 0 4px;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(var(--accent-rgb), 0.5); caret-color: var(--accent);
}
.stepper.grand .stepper-saisie:focus { outline: none; border-bottom-color: var(--accent); }
.stepper.grand .btn-rond { width: 60px; height: 60px; }
.btn-rapide { font-family: var(--mono); font-weight: 800; font-size: 0.95rem; }

/* ---------- En-tête, écrans, navigation ---------- */
.entete {
  position: fixed; top: 0; left: 0; right: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--haut-sur) + 10px) 16px 10px;
  background: rgba(5, 7, 13, 0.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(130, 195, 255, 0.16);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .entete { background: #05070d; } }
.logo { font-family: var(--mono); font-weight: 800; letter-spacing: 0.3em; font-size: 0.8rem; color: var(--saphir-clair); }
.btn-systeme {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  background: transparent; border: 1px solid var(--bord); border-radius: 999px; padding: 6px 12px;
  color: var(--texte-2); font-size: 0.8rem; letter-spacing: 0.08em;
}
.btn-systeme .ico { width: 18px; height: 18px; }
.ecrans { position: fixed; inset: 0; overflow: hidden; touch-action: pan-y; }
.piste {
  --index: 0; --glisse: 0px;
  display: flex; height: 100%; width: 100%;
  transform: translate3d(calc(var(--index) * -100% + var(--glisse)), 0, 0);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.piste.glisse { transition: none; }
.page {
  flex: 0 0 100%; width: 100%; height: 100%; min-width: 0;
  overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(var(--haut-sur) + 76px) 16px calc(var(--bas-sur) + 110px);
  display: flex; flex-direction: column; gap: 14px;
}
.page > * { width: 100%; max-width: 560px; margin-inline: auto; }
.nav {
  position: fixed; z-index: 6; left: 50%; bottom: calc(var(--bas-sur) + 14px); transform: translateX(-50%);
  display: flex; gap: 6px; padding: 6px;
  border-radius: 999px; border: 1px solid var(--bord);
  background: rgba(8, 16, 34, 0.7);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.nav button {
  width: 56px; height: 48px; border-radius: 999px; border: none; background: transparent; color: var(--texte-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.nav button[aria-current="page"] { color: #fff; background: rgba(var(--accent-rgb), 0.2); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.6), 0 0 16px rgba(var(--accent-rgb), 0.3); }

/* ---------- Plein écran & immersif ---------- */
.plein-ecran { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; z-index: 10; }
body[data-mode="principal"] .plein-ecran { display: none; }
.immersif {
  min-height: 100%;
  width: 100%; max-width: 520px; margin: 0 auto;
  padding: calc(var(--haut-sur) + 28px) 18px calc(var(--bas-sur) + 28px);
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.immersif.defilant { justify-content: flex-start; }

/* Éveil */
.eveil { align-items: stretch; }
.fenetre-systeme {
  border: 1px solid rgba(var(--accent-rgb), 0.7); border-radius: 6px; padding: 24px 18px;
  background: rgba(6, 14, 32, 0.75);
  box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.3), inset 0 0 30px rgba(var(--accent-rgb), 0.12);
  display: flex; flex-direction: column; gap: 16px; text-align: center;
  animation: apparition 0.6s ease-out;
}
.eveil-texte { font-size: 1.15rem; }
.avertissement { color: var(--cramoisi); font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.04em; }
.eveil-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.eveil-actions .btn { flex: 1 1 130px; }
@keyframes apparition { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* Portraits */
.choix-portrait { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.carte-portrait {
  border: 1px solid var(--bord); border-radius: 14px; background: rgba(0, 0, 0, 0.3); padding: 8px;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; min-width: 0;
}
.carte-portrait[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.35); }
.portrait { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--image); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-secours, .pose-secours {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em; color: var(--texte-2);
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(var(--accent-rgb), 0.16), transparent 70%),
    repeating-linear-gradient(135deg, rgba(130, 195, 255, 0.05) 0 1px, transparent 1px 12px),
    var(--image);
  border: 1px dashed rgba(var(--accent-rgb), 0.35); border-radius: inherit;
}
.absente img { visibility: hidden; }
.absente .portrait-secours, .absente .pose-secours { display: flex; }

/* Équipement */
.grille-equipement { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.case-equipement {
  border: 1px solid var(--bord); border-radius: 14px; background: rgba(0, 0, 0, 0.28);
  padding: 14px 8px; min-height: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--texte-2); font-size: 0.85rem; text-align: center;
}
.case-equipement[aria-pressed="true"] { color: #fff; border-color: rgba(var(--accent-rgb), 0.85); background: rgba(var(--accent-rgb), 0.14); box-shadow: inset 0 0 18px rgba(var(--accent-rgb), 0.2); }
.case-equipement:disabled { cursor: default; }
.case-equipement .note { font-size: 0.7rem; }

/* Contrat */
.contrat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.jour {
  border-radius: 10px; border: 1px solid var(--bord); padding: 8px 0; min-height: 64px; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: rgba(0, 0, 0, 0.3);
}
.jour-nom { font-size: 0.75rem; color: var(--texte-2); }
.jour-type { font-family: var(--mono); font-size: 0.55rem; font-weight: 700; letter-spacing: 0.04em; }
.jour-maison { border-color: rgba(61, 224, 255, 0.75); background: rgba(61, 224, 255, 0.1); color: var(--cyan); }
.jour-club { border-color: rgba(164, 107, 255, 0.8); background: rgba(164, 107, 255, 0.13); color: var(--violet); }
.jour-repos { border-color: rgba(139, 149, 170, 0.5); color: var(--gris); }
.legende { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.78rem; color: var(--texte-2); }
.legende li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.l-maison::before { background: var(--cyan); }
.l-club::before { background: var(--violet); }
.l-repos::before { background: var(--gris); }

/* Calibration */
.liste-epreuves { margin: 0; padding-left: 1.3rem; display: grid; gap: 4px; }
.lecteur { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.lecteur-scene { position: relative; width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 1; }
.pose { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; background: var(--image); border: 1px solid var(--bord); }
.pose img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pose-2 { animation: alternance 2.4s infinite; }
@keyframes alternance { 0%, 46% { opacity: 0; } 50%, 96% { opacity: 1; } 100% { opacity: 0; } }
.pose-etiquette {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em;
  background: rgba(2, 4, 10, 0.75); border: 1px solid var(--bord); color: var(--saphir-clair);
}
.consignes { display: grid; gap: 6px; }
.consignes p { padding-left: 14px; position: relative; font-size: 0.92rem; }
.consignes p::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); }
.resultat { align-items: center; text-align: center; }
.rang-geant { font-family: var(--mono); font-size: clamp(5rem, 34vw, 9rem); font-weight: 900; line-height: 1; color: var(--accent); text-shadow: 0 0 40px rgba(var(--accent-rgb), 0.7); animation: apparition 0.8s ease-out; }
.detail-epreuves { list-style: none; padding: 0; margin: 0; width: 100%; display: grid; gap: 6px; }
.detail-epreuves li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border: 1px solid var(--bord); border-radius: 10px; font-size: 0.85rem; }
.badge { align-self: center; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em; padding: 4px 10px; border-radius: 6px; border: 1px solid; }
.badge-alerte { color: #ffb020; border-color: rgba(255, 176, 32, 0.6); }
.badge-ok { color: var(--vert); border-color: rgba(61, 255, 176, 0.6); }

/* Séance */
.seance { align-items: center; text-align: center; justify-content: flex-start; gap: 14px; }
.seance-lecteur { width: 100%; }
.seance-lecteur .lecteur-scene { max-width: 150px; }
.seance-lecteur .consignes { display: none; }
.seance-lecteur ~ .seance-cadran { width: min(62vw, 240px); }
.seance-cadran { position: relative; width: min(74vw, 300px); aspect-ratio: 1; display: grid; place-items: center; flex: none; }
.anneau {
  --p: 0;
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--teinte, var(--accent)) calc(var(--p) * 360deg), rgba(255, 255, 255, 0.06) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.55));
}
.anneau[data-type="effort"] { --teinte: var(--cyan); }
.anneau[data-type="repos"], .anneau[data-type="reposBloc"] { --teinte: var(--vert); }
.anneau[data-type="prep"] { --teinte: var(--saphir); }
.seance-centre { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.seance-temps { font-family: var(--mono); font-size: clamp(3.4rem, 17vw, 5.2rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.5); }
.seance-sous { color: var(--texte-2); font-size: 0.78rem; letter-spacing: 0.08em; }
.seance-compteur { font-size: 1.3rem; font-weight: 700; min-height: 1.4em; }
.seance-commandes { display: flex; align-items: center; gap: 22px; }
.seance-fin, .seance-confirmer {
  width: 100%; border: 1px solid rgba(var(--accent-rgb), 0.6); border-radius: var(--rayon); padding: 16px;
  background: var(--verre-fort); display: flex; flex-direction: column; gap: 12px; align-items: center;
}

/* Quêtes */
.objectifs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.objectif {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px 10px; align-items: center;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--bord); background: rgba(0, 0, 0, 0.25);
}
.objectif-nom { min-width: 0; overflow-wrap: anywhere; }
.compteur-quete { font-size: 1.2rem; font-weight: 800; color: var(--cyan); }
.objectif-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.objectif.complet { border-color: rgba(61, 255, 176, 0.6); }
.objectif.complet .compteur-quete { color: var(--vert); }

/* Chrono */
.formats .puce { flex: 1 1 auto; }
.params { display: grid; gap: 10px; }
.presets { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.presets li { display: flex; gap: 8px; align-items: center; }
.preset { flex: 1; min-width: 0; display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; min-height: 44px; border-radius: 10px; border: 1px solid var(--bord); background: rgba(0, 0, 0, 0.25); text-align: left; }
.preset span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Statut */
.statut { flex-direction: row; align-items: stretch; gap: 14px; }
.portrait-statut { width: 42%; max-width: 180px; flex: none; }
.statut-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.nom-code { font-family: var(--mono); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.1em; overflow-wrap: anywhere; }
.niveau-rang { display: flex; gap: 18px; margin-top: auto; }
.echelle { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)) minmax(0, 1.9fr); gap: 3px; }
.echelle li {
  text-align: center; font-family: var(--mono); font-weight: 800; font-size: 0.62rem; padding: 8px 0; border-radius: 6px;
  border: 1px solid var(--bord); color: var(--texte-2); min-width: 0; overflow: hidden;
}
.echelle li.acquis { color: var(--saphir-clair); }
.echelle li.actuel { color: #fff; border-color: var(--accent); background: rgba(var(--accent-rgb), 0.25); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.45); }
.echelle li.scelle { opacity: 0.35; border-style: dashed; }
.stats { margin: 0; display: grid; gap: 10px; }
.stat { display: grid; grid-template-columns: 3.2rem 2.6rem 1fr; align-items: center; gap: 8px; }
.stat dt { font-family: var(--mono); font-weight: 700; letter-spacing: 0.1em; color: var(--texte-2); }
.stat dd { margin: 0; font-weight: 800; }
.barre { --p: 0; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) calc(var(--p) * 100%), rgba(255, 255, 255, 0.07) 0); }
.ressources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.ressources .chiffre { font-size: 1.6rem; }

/* Modale */
.modale {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(1, 2, 6, 0.7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  overflow-y: auto;
}
.modale-boite {
  width: 100%; max-width: 560px; max-height: 100%; overflow-y: auto;
  padding: 16px 16px calc(var(--bas-sur) + 20px);
  border-radius: 20px 20px 0 0; border: 1px solid var(--bord); border-bottom: none;
  background: rgba(5, 10, 24, 0.96);
  display: flex; flex-direction: column; gap: 12px;
  animation: montee 0.25s ease-out;
}
.modale-tete { display: flex; justify-content: space-between; align-items: center; }
@keyframes montee { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Mouvements réduits ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .lecteur-scene { aspect-ratio: 2 / 1; max-width: 480px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .pose { position: relative; inset: auto; aspect-ratio: 1; }
  .pose-2 { animation: none !important; opacity: 1; }
  .seance-lecteur .lecteur-scene { max-width: 320px; }
}
