:root {
  --fond: #0d1b22;
  --panneau: #15303a;
  --panneau2: #1d3f4b;
  --texte: #eef6f5;
  --doux: #9db8b8;
  --menthe: #4fd1b5;
  --rouge: #ff5d6c;
  --jaune: #ffc53d;
  --orange: #ff9a3c;
  --vert: #7bd66b;
  --bleu: #5cb3ff;
  --papier: #f7f2e6;
  --encre: #22262e;
  --scope: #071013;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
/* Couleur de fond unie (pas seulement un dégradé) : Safari sur iPhone s'en sert pour le haut et le bas de l'écran, sinon il met du blanc. */
html { background-color: #0d1b22; }
body {
  color: var(--texte); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; overflow: hidden;
  background: radial-gradient(circle at 20% -10%, #1f4a57 0, #0d1b22 55%, #081115 100%) #0d1b22;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
button { font: inherit; color: inherit; cursor: pointer; }
.cache { display: none !important; }
.doux { color: var(--doux); }
.petit { font-size: 0.8rem; }
.gros { font-size: 1.4rem; font-weight: 800; margin: 0 0 6px; }

/* ---------- Écrans ---------- */
.ecran { display: none; height: 100dvh; position: relative; }
.ecran.actif { display: flex; }
.ecran.colonne {
  flex-direction: column; align-items: center; gap: 11px; text-align: center; overflow-y: auto;
  padding: max(26px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
.ecran.centre { justify-content: center; }
.ecran.jeu { flex-direction: column; max-width: 760px; margin: 0 auto; }
.defile { flex: 1; overflow-y: auto; padding: 12px 16px max(24px, env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }

.logo { position: relative; width: 120px; height: 96px; margin-top: 12px; flex: none; }
.logo-croix {
  width: 84px; height: 84px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; font-size: 3.4rem; color: #fff;
  background: linear-gradient(160deg, #ff7a85, #d63848); box-shadow: 0 6px 0 #8e1f2a, 0 0 30px #ff5d6c55;
}
.logo-croix { position: relative; z-index: 1; }
.logo-ecg { position: absolute; left: -70px; right: -70px; top: 24px; }
.logo-ecg svg { display: block; width: 100%; height: 48px; }
.logo-ecg path { fill: none; stroke: var(--menthe); stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 400; animation: battement 2.4s linear infinite; filter: drop-shadow(0 0 4px var(--menthe)); }
@keyframes battement { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
.titre { font-size: clamp(1.9rem, 9vw, 2.7rem); margin: 4px 0 0; letter-spacing: 1px; }
.sous-titre { color: var(--doux); margin: 0 0 6px; }
.beta { font-size: 0.7rem; font-weight: 900; background: var(--menthe); color: #08251e; padding: 2px 7px; border-radius: 99px; vertical-align: 2px; }
.record { color: var(--jaune); font-weight: 700; min-height: 1.2em; }
.retour { color: var(--menthe); margin-top: 6px; }

.gros-bouton {
  width: 100%; max-width: 380px; min-height: 54px; border: 0; border-radius: 14px; background: var(--panneau);
  font-size: 1.05rem; font-weight: 700; box-shadow: 0 4px 0 #0008; display: flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; color: var(--texte); flex: none; padding: 8px 14px;
}
.gros-bouton.principal { background: linear-gradient(180deg, #6ee6c9, #2fb597); color: #04261e; box-shadow: 0 4px 0 #1a7a64; }
.gros-bouton.danger { background: linear-gradient(180deg, #ff8a94, #e5484d); color: #2e0408; box-shadow: 0 4px 0 #8e1f2a; }
.gros-bouton:disabled { opacity: 0.45; }
.gros-bouton:not(:disabled):active { transform: translateY(2px); box-shadow: 0 2px 0 #0008; }
.petit-bouton { width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: #ffffff14; font-size: 1.05rem; font-weight: 900; display: grid; place-items: center; }
.petit-bouton.vide { background: none; }
.coin { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; }
.rangee { display: flex; gap: 10px; width: 100%; }
.rangee .gros-bouton { flex: 1; }

/* ---------- Barre du haut ---------- */
.barre {
  display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px 8px; flex: none;
  background: linear-gradient(#0a161bcc, #0a161bcc); border-bottom: 1px solid #ffffff12;
}
.barre-centre { flex: 1; text-align: center; min-width: 0; }
.barre-centre .petit { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chrono, .horloge { font-family: ui-monospace, Menlo, monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; color: var(--menthe); }
.chrono.presse { color: var(--rouge); animation: clignote 1s steps(2) infinite; }
@keyframes clignote { 50% { opacity: 0.4; } }

/* ---------- Le chef ---------- */
.chef-bloc { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.chef { width: 150px; height: 165px; flex: none; margin-top: 8px; }
.chef-bulle { background: var(--papier); color: var(--encre); border-radius: 16px; padding: 14px 16px; text-align: left; position: relative; line-height: 1.45; }
.chef-bulle::before { content: ''; position: absolute; top: -10px; left: 50%; margin-left: -10px; border: 10px solid transparent; border-top: 0; border-bottom-color: var(--papier); }
.chef-nom { font-weight: 800; color: #1a7a64; margin-bottom: 6px; }
.chef-bulle ol { padding-left: 20px; margin: 8px 0; }
.chef-bulle li { margin: 4px 0; }

/* ---------- Salle d'attente ---------- */
.titre-section { margin: 4px 0 2px; font-size: 1.3rem; }
.consigne { margin: 0 0 12px; }
.liste-attente { display: flex; flex-direction: column; gap: 10px; }
.carte-patient {
  display: flex; gap: 10px; align-items: stretch; background: var(--panneau); border-radius: 16px; padding: 10px; text-align: left;
  border: 2px solid transparent; animation: entree 0.4s ease-out;
}
.carte-patient.nouveau { border-color: var(--jaune); }
@keyframes entree { from { transform: translateY(14px); opacity: 0; } }
.carte-patient .mini { width: 74px; height: 82px; flex: none; background: #0d1b22; border-radius: 12px; overflow: hidden; }
.carte-patient .infos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.carte-patient .nom { font-weight: 800; }
.carte-patient .motif { font-weight: 600; }
.carte-patient .aspect { font-style: italic; color: var(--doux); font-size: 0.88rem; }
.carte-patient .gros-bouton { min-height: 44px; font-size: 0.95rem; margin-top: 4px; max-width: none; }
.constantes { display: flex; flex-wrap: wrap; gap: 4px 10px; font-family: ui-monospace, Menlo, monospace; font-size: 0.82rem; }
.constantes .alerte { color: var(--rouge); font-weight: 800; }
.tri-badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 0.72rem; font-weight: 900; color: #111; }
.arrivee { background: #ffc53d22; border: 2px solid var(--jaune); color: var(--jaune); border-radius: 14px; padding: 10px; margin-bottom: 10px; font-weight: 700; animation: entree 0.4s ease-out; }

/* ---------- Le box ---------- */
.box {
  flex: none; display: flex; gap: 10px; padding: 10px 12px; align-items: stretch; height: 172px;
  background: linear-gradient(180deg, #cfe3e0 0, #b9d4d0 70%, #8fb2ad 100%); color: var(--encre); position: relative;
}
.box::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: repeating-linear-gradient(90deg, #7fa39e 0 18px, #9ec1bc 18px 36px); }
.patient { width: 128px; height: 140px; flex: none; align-self: flex-end; transition: transform 0.2s; }
.patient.parle { animation: hoche 0.5s ease-in-out; }
@keyframes hoche { 30% { transform: translateY(-4px) rotate(-1.5deg); } 60% { transform: translateY(1px) rotate(1deg); } }
.patient svg, .chef svg, .mini svg { width: 100%; height: 100%; display: block; }
.trait { fill: none; stroke: #1d1b26; stroke-width: 3; stroke-linecap: round; }
.trait.fin { stroke-width: 2; }
.h-essouffle .visage { animation: souffle 0.9s ease-in-out infinite; transform-origin: 100px 120px; }
@keyframes souffle { 50% { transform: scaleY(1.04); } }
.box-droite { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; z-index: 1; }
.bulle {
  flex: 1; background: #fff; border-radius: 14px; padding: 9px 11px; font-size: 0.95rem; line-height: 1.35; position: relative;
  box-shadow: 0 2px 0 #0002; min-height: 0; overflow-y: auto; user-select: text; -webkit-user-select: text;
}
.bulle::before { content: ''; position: absolute; left: -9px; bottom: 18px; border: 9px solid transparent; border-left: 0; border-right-color: #fff; }
.bulle.narration { background: #fff8dc; font-style: italic; }
.bulle.narration::before { border-right-color: #fff8dc; }
.bulle .qui { display: block; font-size: 0.72rem; font-weight: 800; color: #1a7a64; font-style: normal; margin-bottom: 2px; }
.scope {
  background: var(--scope); border-radius: 10px; padding: 6px 8px; display: grid; grid-template-columns: repeat(5, auto); gap: 2px 8px;
  font-family: ui-monospace, Menlo, monospace; color: #7dffb0; box-shadow: inset 0 0 12px #000;
}
.scope div { display: flex; flex-direction: column; line-height: 1.1; }
.scope small { font-size: 0.6rem; color: #5aa98a; }
.scope b { font-size: 0.95rem; }
.scope .alerte b { color: #ff6b78; animation: clignote 1.2s steps(2) infinite; }
.scope .coeur { display: inline-block; animation: pouls var(--rythme, 0.8s) ease-out infinite; }
@keyframes pouls { 0% { transform: scale(1.3); } 30% { transform: scale(1); } }

.onglets { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; background: #0a161b; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglets button {
  flex: none; border: 0; border-radius: 99px; padding: 9px 13px; background: var(--panneau); font-weight: 700; font-size: 0.9rem; white-space: nowrap; position: relative;
}
.onglets button.actif { background: var(--menthe); color: #04261e; }
.pastille { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--rouge); color: #fff; font-size: 0.7rem; display: grid; place-items: center; padding: 0 4px; }

.bureau {
  flex: 1; overflow-y: auto; padding: 12px 12px max(20px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #1b333b, #142a31); -webkit-overflow-scrolling: touch;
}
.groupe { margin-bottom: 14px; }
.groupe h3 { margin: 0 0 6px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--doux); }
.action {
  display: block; width: 100%; text-align: left; border: 0; border-radius: 12px; background: var(--panneau2); padding: 11px 12px; margin-bottom: 6px;
  font-size: 0.95rem; box-shadow: 0 2px 0 #0006; line-height: 1.3;
}
.action:active { transform: translateY(1px); }
.action.fait { background: #10262d; box-shadow: none; color: var(--doux); }
.action.fait::before { content: '✓ '; color: var(--menthe); font-weight: 900; }
.action .rep { display: block; margin-top: 5px; color: var(--texte); font-size: 0.88rem; border-left: 3px solid var(--menthe); padding-left: 8px; }
.action .etat { float: right; font-weight: 800; color: var(--jaune); margin-left: 8px; }
.action .etat.pret { color: var(--menthe); }
.action.choix-diag { font-weight: 600; }
.action.choisi { background: #1a7a64; color: #fff; }
.zone-recherche { padding: 8px 12px 0; background: #1b333b; }
.zone-recherche input {
  width: 100%; box-sizing: border-box; font-size: 16px; padding: 10px 12px; border-radius: 12px; border: 2px solid #ffffff26;
  background: #0f242b; color: var(--texte); -webkit-appearance: none; appearance: none;
}
.zone-recherche input:focus { outline: none; border-color: var(--menthe); }
.zone-recherche input { padding-left: 42px; background: url(images/icones/loupe.png) 10px center / 24px no-repeat #0f242b; }
.ligne-classe .rang .medaille { width: 1.7em; height: 1.7em; vertical-align: middle; }
.mot-note { font-weight: 900; font-size: 1.15rem; letter-spacing: 0.5px; margin-top: -4px; }
.explication-onglet { color: var(--doux); font-size: 0.9rem; margin: 0 0 12px; line-height: 1.4; }
.dossier-ligne { background: #10262d; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; font-size: 0.9rem; line-height: 1.35; user-select: text; -webkit-user-select: text; }
.dossier-ligne b { color: var(--menthe); }

/* ---------- Fenêtres ---------- */
.voile {
  position: fixed; inset: 0; z-index: 20; background: #02080bcc; display: flex; align-items: flex-start; justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)); animation: fondu 0.15s ease-out;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
/* Centrée quand elle tient dans l'écran ; plus haute que l'écran (boutique), elle commence en haut et défile (avant : haut coupé). */
.voile > * { margin-top: auto; margin-bottom: auto; flex-shrink: 0; }
@keyframes fondu { from { opacity: 0; } }
.voile.pause { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: #02080bf2; }
.feuille {
  background: var(--papier); color: var(--encre); border-radius: 6px; width: 100%; max-width: 680px; max-height: 100%; overflow-y: auto;
  padding: 16px; box-shadow: 0 10px 40px #000a; position: relative; user-select: text; -webkit-user-select: text;
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, #d9d2c0 27px 28px);
}
.feuille h2 { margin: 0 0 2px; font-size: 1.15rem; }
.feuille .entete { padding-right: 44px; display: flex; justify-content: space-between; gap: 10px; border-bottom: 2px solid var(--encre); padding-bottom: 8px; margin-bottom: 10px; font-size: 0.82rem; }
.feuille .fermer { position: sticky; top: 0; float: right; width: 44px; height: 44px; margin: 0 0 6px 10px; box-shadow: 0 0 0 6px var(--papier, #f3ead7); border-radius: 10px; border: 0; background: var(--encre); color: #fff; font-weight: 900; z-index: 2; }
.feuille table { width: 100%; border-collapse: collapse; font-family: ui-monospace, Menlo, monospace; font-size: 0.88rem; background: #fffdf7; }
.feuille td, .feuille th { border-bottom: 1px dashed #b9b09a; padding: 7px 5px; text-align: left; }
.feuille th { font-family: inherit; font-size: 0.75rem; text-transform: uppercase; color: #6b6556; }
.feuille .cr { font-family: ui-monospace, Menlo, monospace; font-size: 0.92rem; line-height: 1.5; background: #fffdf7; padding: 10px; border: 1px solid #d9d2c0; }
.ecg-zone { overflow-x: auto; background: #fff; border: 1px solid #e3b8b8; border-radius: 4px; -webkit-overflow-scrolling: touch; }
.ecg { display: block; min-width: 760px; width: 100%; height: auto; background: #fff7f7; }
.ecg .pt { stroke: #f6caca; stroke-width: 0.08; }
.ecg .gd { stroke: #e99a9a; stroke-width: 0.2; }
.ecg .onde { fill: none; stroke: #111; stroke-width: 0.32; stroke-linejoin: round; }
.ecg .sep { stroke: #111; stroke-width: 0.3; }
.ecg .der { font-size: 3.2px; font-weight: 700; fill: #111; font-family: -apple-system, sans-serif; }
.ecg .der.petit { font-size: 2.4px; font-weight: 400; }
.astuce { font-size: 0.8rem; color: #6b6556; margin: 6px 0 0; }
.interpretation { margin-top: 14px; background: #fff; border: 2px solid #1a7a64; border-radius: 10px; padding: 10px; }
.interpretation h3 { margin: 0 0 8px; font-size: 1rem; }
.interpretation .action { background: #e8f3f0; color: var(--encre); box-shadow: 0 2px 0 #b5cfc8; }
.interpretation .action.choisi { background: #1a7a64; color: #fff; }

.fenetre-dialogue { background: var(--panneau); border-radius: 18px; width: 100%; max-width: 520px; padding: 14px; max-height: 100%; overflow-y: auto; }
.fenetre-dialogue .tete { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.fenetre-dialogue .mini { width: 82px; height: 90px; flex: none; background: #cfe3e0; border-radius: 12px; overflow: hidden; }
.fenetre-dialogue .bulle { max-height: none; color: var(--encre); }
.fenetre-dialogue .titre-choix { margin: 6px 0 8px; font-weight: 800; color: var(--menthe); }
.fenetre-petite { background: var(--panneau); border-radius: 18px; padding: 18px; width: 100%; max-width: 380px; text-align: center; display: flex; flex-direction: column; gap: 12px; line-height: 1.4; }
.fenetre-petite p { margin: 0; }
.aide { line-height: 1.5; }
.aide h3 { margin: 14px 0 4px; }
.toast {
  position: fixed; z-index: 30; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 24px);
  background: #0a161b; border: 2px solid var(--menthe); color: var(--texte); padding: 10px 14px; border-radius: 14px; font-weight: 700; box-shadow: 0 6px 20px #000a;
  animation: entree 0.25s ease-out;
}

/* ---------- Correction et bilan ---------- */
.entete-correction { text-align: center; padding: 8px 0 4px; }
.entete-correction .diag { font-size: 1.25rem; font-weight: 800; margin: 4px 0; }
.note-ronde {
  width: 120px; height: 120px; margin: 10px auto; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 2.3rem;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #ffffff14 0); position: relative;
}
.note-ronde::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--fond); }
.note-ronde span { position: relative; }
.note-ronde small { font-size: 0.9rem; color: var(--doux); }
.issue { border-radius: 14px; padding: 12px; margin: 10px 0; line-height: 1.4; }
.issue.bonne { background: #4fd1b522; border: 2px solid var(--menthe); }
.issue.mauvaise { background: #ff5d6c22; border: 2px solid var(--rouge); }
.section-grille { background: var(--panneau); border-radius: 14px; padding: 10px 12px; margin: 10px 0; }
.section-grille h3 { margin: 0 0 6px; display: flex; justify-content: space-between; font-size: 1rem; }
.ligne-grille { display: flex; gap: 8px; padding: 6px 0; border-top: 1px solid #ffffff10; font-size: 0.92rem; line-height: 1.35; }
.ligne-grille:first-of-type { border-top: 0; }
.ligne-grille .ico { flex: none; width: 20px; }
.ligne-grille .txt { flex: 1; }
.ligne-grille .pts { flex: none; font-family: ui-monospace, Menlo, monospace; color: var(--doux); }
.ligne-grille.rate .txt { color: #ffc2c7; }
.ligne-grille .expl { display: block; color: var(--doux); font-size: 0.82rem; margin-top: 2px; }
.penalite { color: #ffc2c7; }
.cours { background: var(--papier); color: var(--encre); border-radius: 14px; padding: 12px 14px; margin: 12px 0; line-height: 1.45; }
.cours h3 { margin: 0 0 6px; }
.cours ul { margin: 0; padding-left: 18px; }
.cours li { margin: 5px 0; }
.boutons-fin { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 16px 0 8px; }
.ligne-bilan { display: flex; align-items: center; gap: 10px; background: var(--panneau); border-radius: 14px; padding: 10px; margin: 8px 0; text-align: left; }
.ligne-bilan .mini { width: 52px; height: 58px; flex: none; background: #0d1b22; border-radius: 10px; overflow: hidden; }
.ligne-bilan .txt { flex: 1; min-width: 0; font-size: 0.9rem; line-height: 1.35; }
.ligne-bilan .n { font-weight: 900; font-size: 1.15rem; flex: none; }
.ligne-bilan.cliquable { width: 100%; border: 0; color: inherit; font: inherit; }

/* ---------- Le Dr Walid qui surgit (en bas de l'écran, il se balance) ---------- */
.walid-pop {
  position: fixed; z-index: 40; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); width: min(560px, calc(100% - 16px));
  transform: translateX(-50%); display: flex; align-items: flex-end; gap: 4px; cursor: pointer; pointer-events: auto;
}
.walid-pop.entre { animation: walid-entre 0.45s cubic-bezier(.2, 1.6, .4, 1); }
.walid-pop.sort { animation: walid-sort 0.22s ease-in forwards; }
@keyframes walid-entre { from { transform: translate(-50%, 130%) rotate(-6deg); } }
@keyframes walid-sort { to { transform: translate(-50%, 130%); opacity: 0; } }
.walid-tete { width: 112px; height: 126px; margin-left: -6px; flex: none; animation: walid-balance 2.6s ease-in-out infinite; transform-origin: 50% 100%; filter: drop-shadow(0 6px 10px #000a); }
.walid-tete svg { width: 100%; height: 100%; display: block; }
.walid-pop.h-fache .walid-tete { animation: walid-tremble 0.18s linear infinite; }
.walid-pop.h-content .walid-tete { animation: walid-saute 0.7s ease-in-out infinite; }
@keyframes walid-balance { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes walid-tremble { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(2px); } }
@keyframes walid-saute { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.walid-bulle {
  flex: 1; min-width: 0; background: var(--papier); color: var(--encre); border-radius: 16px 16px 16px 4px; padding: 9px 12px 7px;
  box-shadow: 0 8px 26px #000b, 0 0 0 3px #1a7a64; margin-bottom: 18px; max-height: 50dvh; overflow-y: auto;
}
.walid-pop.h-fache .walid-bulle, .walid-pop.h-choque .walid-bulle { box-shadow: 0 8px 26px #000b, 0 0 0 3px var(--rouge); }
.walid-nom { font-weight: 900; color: #1a7a64; font-size: 0.8rem; }
.walid-pop.h-fache .walid-nom, .walid-pop.h-choque .walid-nom { color: #c22d3a; }
.walid-texte { white-space: pre-line; line-height: 1.38; font-size: 0.95rem; min-height: 1.3em; }
.walid-suite { text-align: right; font-size: 0.7rem; color: #6b6556; margin-top: 3px; }

/* ---------- Écran du jour ---------- */
.jour-contenu { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; }
.jour-semaine { color: var(--doux); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 0.8rem; }
.jour-nom { font-size: clamp(3rem, 18vw, 5rem); font-weight: 900; letter-spacing: 4px; line-height: 1; animation: entree 0.5s ease-out; text-shadow: 0 4px 0 #0008; }
.jour-heure { font-family: ui-monospace, Menlo, monospace; font-size: 1.6rem; color: var(--menthe); font-weight: 800; }
.jour-service { margin-top: 6px; padding: 8px 16px; border-radius: 99px; font-weight: 800; background: color-mix(in srgb, var(--sv) 25%, transparent); border: 2px solid var(--sv); }
.jour-attente { margin-top: 10px; font-size: 1.1rem; line-height: 1.5; }

/* ---------- Planning ---------- */
.semaine { margin: 16px 0 8px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--doux); }
.jour-carte {
  display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-left: 6px solid var(--sv); border-radius: 14px; background: var(--panneau);
  padding: 10px 12px; margin-bottom: 8px; text-align: left; box-shadow: 0 3px 0 #0006;
}
.jour-carte:disabled { opacity: 0.55; box-shadow: none; }
.jour-num { font-family: ui-monospace, Menlo, monospace; font-weight: 900; color: var(--sv); width: 34px; }
.jour-txt { flex: 1; line-height: 1.3; }
.jour-etat { font-size: 1.05rem; }

/* ---------- Débrief et tableau ---------- */
.comptes-etats { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.compte-etat { padding: 5px 10px; border-radius: 99px; background: #ffffff10; font-weight: 700; font-size: 0.85rem; }
.compte-etat.e-gueri { background: #4fd1b522; color: var(--menthe); }
.compte-etat.e-souffrant { background: #ffc53d22; color: var(--jaune); }
.compte-etat.e-complication { background: #f76b1522; color: #ff9b5c; }
.compte-etat.e-mort { background: #ff5d6c22; color: #ff8a94; }
.ligne-bilan.e-mort { border: 2px solid #ff5d6c88; }
.ligne-bilan.e-complication { border: 2px solid #f76b1566; }
.etat-patient { font-weight: 800; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .deux-colonnes { grid-template-columns: 1fr; } }
.deux-colonnes .section-grille { margin: 0; }
.deux-colonnes ul { margin: 0; padding-left: 18px; line-height: 1.6; }
.forces { border: 2px solid #4fd1b566; }
.lacunes { border: 2px solid #ff5d6c66; }
.barre-note { display: flex; align-items: center; gap: 8px; margin: 7px 0; font-size: 0.9rem; }
.bn-nom { width: 42%; flex: none; }
.bn-fond { flex: 1; height: 10px; border-radius: 5px; background: #ffffff14; overflow: hidden; }
.bn-plein { display: block; height: 100%; border-radius: 5px; transition: width 0.6s; }
.barre-note b { width: 34px; text-align: right; font-family: ui-monospace, Menlo, monospace; }

/* ---------- Icônes dessinées (style feutre, planches de Walid) ---------- */
.ico-img { display: inline-block; width: 1.45em; height: 1.45em; vertical-align: -0.38em; object-fit: contain; flex: none; }
.ico-img.moyenne { width: 2em; height: 2em; vertical-align: -0.6em; }
.gros-bouton .ico-img { width: 1.7em; height: 1.7em; }
.petit-bouton .ico-img { width: 28px; height: 28px; vertical-align: 0; }
.petit-bouton .ico-img.avatar-bouton { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.onglets .ico-img { width: 1.55em; height: 1.55em; vertical-align: -0.42em; }
.jour-service .ico-img, .jour-heure .ico-img { width: 1.6em; height: 1.6em; }
.ligne-grille .ico .ico-img { width: 1.25em; height: 1.25em; vertical-align: -0.25em; }
.action .etat .ico-img { width: 1.3em; height: 1.3em; }

/* Petit « −8 s » qui s'envole à côté du chrono à chaque action */
.barre-centre { position: relative; }
.perte { position: absolute; left: 50%; top: 4px; margin-left: 48px; font-family: ui-monospace, Menlo, monospace; font-weight: 900; color: var(--rouge); opacity: 0; pointer-events: none; }
.perte.vole { animation: perte 1.1s ease-out; }
@keyframes perte { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-16px); } }
.groupe h3 .cout { float: right; text-transform: none; letter-spacing: 0; font-weight: 700; }
.groupe h3 .cout .ico-img { width: 1.2em; height: 1.2em; vertical-align: -0.3em; }

/* ---------- Vraies images (radios, scanners, échographies) ---------- */
.radio { margin: 0; }
.radio-cadre { background: #000; border-radius: 6px; overflow: auto; -webkit-overflow-scrolling: touch; cursor: zoom-in; }
.radio-cadre img { display: block; width: 100%; max-height: 62vh; object-fit: contain; }
.radio.grand .radio-cadre { max-height: 75vh; cursor: zoom-out; }
.radio.grand .radio-cadre img { width: 200%; max-width: none; max-height: none; }
.radio figcaption { font-size: 0.7rem; color: #6b6556; margin-top: 4px; }
.radio figcaption a, .credits a { color: #1a7a64; }
.credits { font-size: 0.8rem; padding-left: 18px; }

/* ---------- Décors peints (planches de Walid, style feutre) ---------- */
#ecran-menu::before, #ecran-stage::before {
  background: linear-gradient(to bottom, #0b1a2200 0%, #0b1a2222 50%, #0b1a2266 100%), url(images/decor/fond-menu.jpg) center bottom / cover no-repeat;
}
/* Boutons du menu un peu transparents : on voit l'hôpital derrière */
#ecran-stage .sous-titre, .titre-stage { color: #dbe9e7; text-shadow: 0 2px 6px #000; }
.titre-stage { margin: 0; font-size: 1.8rem; display: flex; align-items: center; gap: 8px; }
#choix-chrono .gros-bouton.principal .defi-sous { color: #04261ecc; }
#ecran-menu .gros-bouton:not(.principal) { background: #15303ab8; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
#ecran-menu .retour { background: #0b1a22aa; padding: 4px 12px; border-radius: 99px; }
.logo-jeu { width: min(88%, 380px); height: auto; margin-top: 6px; flex: none; filter: drop-shadow(0 6px 14px #000a); animation: entree 0.6s ease-out; }
.cache-visuel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#ecran-menu .sous-titre { color: #dbe9e7; text-shadow: 0 2px 6px #000; }
.box { background: url(images/decor/box.jpg) center 72% / cover no-repeat #cfe3e0; }
.box::after { display: none; }
.bandeau-attente {
  height: 128px; border-radius: 16px; margin-bottom: 10px; box-shadow: 0 4px 0 #0006;
  background: url(images/decor/salle-attente.jpg) center 62% / cover no-repeat #cfe3e0;
}
body.caravane .bandeau-attente { background-image: url(images/decor/caravane-salle-attente.jpg); }
body.caravane .box { background-image: url(images/decor/caravane-box.jpg); }
body.dispensaire .bandeau-attente { background-image: url(images/decor/dispensaire-salle-attente.jpg); }
body.dispensaire .box { background-image: url(images/decor/dispensaire-box.jpg); }
.medaillon { width: min(52vw, 200px); height: auto; flex: none; filter: drop-shadow(0 8px 16px #000a); animation: entree 0.5s ease-out; }
.petit-medaillon { display: block; width: 120px; margin: 4px auto 0; }

/* Portraits peints des patients (même place pour les 4 expressions) */
.portrait-peint { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
/* Petits cadres des patients (salle d'attente, entraînement, carnet, débrief) : même vert clair que la salle d'examen */
.carte-patient .mini, .ligne-bilan .mini { background: #cfe3e0; }

/* Dr Walid peint : on garde le haut de l'image (la case de la planche a de la marge en bas) */
.walid-tete .walid-peint { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.walid-pop.h-pouce .walid-tete { animation: walid-saute 0.7s ease-in-out infinite; }
.walid-pop.h-front .walid-bulle { box-shadow: 0 8px 26px #000b, 0 0 0 3px var(--rouge); }
.walid-pop.h-front .walid-nom { color: #c22d3a; }
.walid-pop.h-montre .walid-bulle { box-shadow: 0 8px 26px #000b, 0 0 0 3px var(--jaune); }

/* Premier toucher (lance la musique du menu) */
.voile-son { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: max(16px, env(safe-area-inset-top)) 8px max(40px, env(safe-area-inset-bottom)); background: #0b1a22b3; cursor: pointer; }
.voile-walid { display: flex; align-items: flex-start; gap: 4px; width: min(560px, 100%); animation: walid-entre-haut 0.5s cubic-bezier(.2, 1.6, .4, 1); }
.voile-walid .walid-bulle { margin: 26px 0 0; border-radius: 16px 16px 16px 4px; }
@keyframes walid-entre-haut { from { transform: translateY(-130%); } }
.voile-son.cache { display: none; }
.voile-son .voile-bouton { font-size: 1.15rem; font-weight: 800; color: #04261e; background: linear-gradient(180deg, #6ee6c9, #2fb597); padding: 14px 22px; border-radius: 99px; box-shadow: 0 4px 0 #1a7a64; animation: voile-pulse 1.4s ease-in-out infinite; }
@keyframes voile-pulse { 50% { transform: scale(1.06); } }

/* À propos · Crédits */
.onglets-apropos { display: flex; gap: 6px; margin: 4px 0 6px; }
.onglets-apropos button { flex: 1; min-height: 40px; border-radius: 10px; border: 2px solid #1d3f4b; background: transparent; color: inherit; font-weight: 800; cursor: pointer; }
.onglets-apropos button.actif { background: #2fb597; border-color: #2fb597; color: #04261e; }
.lien-contact { display: flex; align-items: center; justify-content: center; text-decoration: none; margin: 8px 0 2px; }
#ecran-menu .copyright { margin: 2px 0 0; font-size: 0.72rem; color: #dbe9e7cc; text-shadow: 0 1px 4px #000; text-align: center; line-height: 1.5; }
#ecran-menu .copyright a { color: #4fd1b5; font-weight: 700; }

/* ---------- Interface peinte (planche de Walid, découpée par outils/interface.py) ----------
   Cadres étirés en 9 morceaux (border-image) : les coins restent intacts, les bords et le centre s'étirent.
   Chiffres après l'url = où couper dans l'image (en pixels de l'image) ; après « / » = taille des bords à l'écran. */
.gros-bouton, #ecran-menu .gros-bouton:not(.principal) {
  background: none; box-shadow: none; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
  border-style: solid; border-width: 0; border-image: url(images/ui/bouton.png) 70 fill / 24px stretch;
  min-height: 58px; padding: 8px 18px 11px; color: #f1f6f5; text-shadow: 0 1px 2px #0009;
}
.gros-bouton.principal { background: none; box-shadow: none; border-image-source: url(images/ui/bouton-principal.png); color: #04261e; text-shadow: none; }
.gros-bouton.danger { border-image: none; background: linear-gradient(180deg, #ff8a94, #e5484d); border-radius: 14px; box-shadow: 0 4px 0 #8e1f2a; color: #2e0408; text-shadow: none; }
.gros-bouton:not(:disabled):not(.danger):active { border-image-source: url(images/ui/bouton-choisi.png); transform: translateY(2px); box-shadow: none; color: #eafff9; }
.carte-patient .gros-bouton { min-height: 48px; border-image-width: 18px; }

/* Choix (questions, examens, traitements, réponses) : même bouton, bords plus fins */
.action {
  background: none; box-shadow: none; border-radius: 0; border-style: solid; border-width: 0;
  border-image: url(images/ui/bouton.png) 70 fill / 16px stretch; padding: 11px 14px 13px; color: #f1f6f5;
}
.action.fait { background: none; filter: saturate(0.45) brightness(0.8); color: #dfe9e8; }
.action.choisi { background: none; border-image-source: url(images/ui/bouton-choisi.png); color: #fff; }
.action:active { border-image-source: url(images/ui/bouton-choisi.png); }

/* Onglets du patient (forme d'intercalaire : la marche du dessin reste dans le morceau de gauche) */
.onglets button {
  background: none; border-radius: 0; border-style: solid; border-width: 0; color: #f1f6f5;
  border-image: url(images/ui/onglet.png) 70 60 30 290 fill / 17px 14px 8px 70px stretch; padding: 14px 14px 9px 16px; min-width: 96px;
}
.onglets button.actif { background: none; border-image-source: url(images/ui/onglet-actif.png); color: #04261e; }

/* Feuilles (résultats, correction, aide, à propos) : papier crème au coin corné */
.feuille {
  background: none; border-radius: 0; box-shadow: none; filter: drop-shadow(0 10px 24px #000a);
  border-style: solid; border-width: 26px 26px 16px 18px; border-image: url(images/ui/feuille.png) 80 80 40 40 fill / 40px 40px 20px 20px stretch;
  padding: 0 4px 4px;
}

/* Bulles (patient, Dr Walid) : la pointe est dans le morceau du bas à gauche */
.bulle, .walid-bulle {
  background: none; box-shadow: none; border-radius: 0; border-style: solid;
  border-width: 12px 14px 28px 18px; border-image: url(images/ui/bulle.png) 50 50 90 70 fill / 16px 16px 30px 22px stretch; padding: 0 2px;
}
.bulle::before { display: none; }
.bulle.narration { background: none; filter: sepia(0.25); }
.walid-pop.h-fache .walid-bulle, .walid-pop.h-choque .walid-bulle, .walid-pop.h-front .walid-bulle, .walid-pop.h-montre .walid-bulle { box-shadow: none; }
.walid-pop.h-fache .walid-bulle, .walid-pop.h-choque .walid-bulle, .walid-pop.h-front .walid-bulle { filter: drop-shadow(0 0 3px var(--rouge)); }
.walid-pop.h-montre .walid-bulle { filter: drop-shadow(0 0 3px var(--jaune)); }
.walid-bulle { filter: drop-shadow(0 8px 16px #000b); }

/* Moniteur des constantes : cadre gris avec ses boutons à droite */
.scope {
  background: none; border-radius: 0; box-shadow: none; border-style: solid; border-width: 0;
  border-image: url(images/ui/moniteur.png) 40 70 40 40 fill / 12px 22px 12px 12px stretch; padding: 9px 28px 9px 13px; gap: 2px 6px;
}
.scope b { font-size: 0.88rem; }

/* Barre du temps qui reste, sous le chrono */
.barre-temps {
  height: 12px; margin: 3px auto 1px; width: min(220px, 70%); position: relative; border-style: solid; border-width: 0;
  border-image: url(images/ui/barre.png) 25 25 fill / 6px 6px stretch;
}
.barre-temps i { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc(100% - 6px); border-radius: 4px; background: var(--menthe); transition: width 0.5s linear; }
.chrono.presse + .perte + .barre-temps i, .barre-temps.presse i { background: var(--rouge); }
.interpretation .action { background: none; box-shadow: none; color: #f1f6f5; }
.interpretation .action.choisi { background: none; color: #fff; }

/* Signaler une erreur, sauvegarde */
.lien-signaler { background: none; border: 0; color: var(--doux); text-decoration: underline; font-size: 0.9rem; margin-top: 6px; cursor: pointer; display: flex; align-items: center; gap: 6px; justify-content: center; width: 100%; }
.zone-texte { width: 100%; border: 2px solid #c9bfa5; border-radius: 10px; padding: 10px; font: inherit; font-size: 1rem; background: #fffdf7; color: var(--encre); margin: 8px 0; user-select: text; -webkit-user-select: text; }
.code-sauvegarde { font-family: ui-monospace, Menlo, monospace; font-size: 2rem; font-weight: 900; letter-spacing: 0.15em; text-align: center; background: #fffdf7; border: 2px dashed #1a7a64; border-radius: 12px; padding: 10px; margin: 6px 0; user-select: text; -webkit-user-select: text; }
.code-saisie { text-transform: uppercase; letter-spacing: 0.2em; text-align: center; font-family: ui-monospace, Menlo, monospace; font-size: 1.3rem; }

/* 2e planche d'interface : parties de la correction, cartes de patients, anneau de la note */
.section-grille {
  background: none; border-radius: 0; border-style: solid; border-width: 0; padding: 18px 22px;
  border-image: url(images/ui/panneau.png) 60 fill / 16px stretch;
}
.ligne-bilan { background: none; border-radius: 0; border-style: solid; border-width: 0; border-image: url(images/ui/panneau.png) 60 fill / 14px stretch; padding: 12px; }
.carte-patient {
  background: none; border-radius: 0; border-style: solid; border-width: 0; color: var(--encre);
  border-image: url(images/ui/carte.png) 120 40 40 90 fill / 30px 12px 12px 24px stretch; padding: 22px 12px 12px 14px;
}
.carte-patient .aspect { color: #6b6556; }
.carte-patient .mini { border: 2px solid #2b3a40; }
.carte-patient.nouveau { filter: drop-shadow(0 0 4px var(--jaune)); }
/* L'anneau peint sert de « piste » ; l'arc coloré de la note est dessiné dans son trou */
.note-ronde { width: 132px; height: 132px; background: url(images/ui/anneau.png) center / 100% 100% no-repeat; }
.note-ronde::before { inset: 17%; background: conic-gradient(var(--c) calc(var(--p) * 1%), #ffffff14 0); }
.note-ronde::after { content: ''; position: absolute; inset: calc(17% + 7px); border-radius: 50%; background: var(--fond); }
.note-ronde span { z-index: 1; }
.carte-patient .doux, .carte-patient .petit { color: #7a7362; }
/* Voile d'accueil : Dr Walid aligné sur la pointe de sa bulle (en bas à gauche), sans toucher le bord de l'écran */
.voile-walid { align-items: flex-end; padding-right: 6px; }
.voile-walid .walid-bulle { margin: 0 0 14px; }
/* Écran du patient : un peu plus de place pour la bulle (bords peints épais), moniteur sur une seule ligne par valeur */
.box { height: 196px; }
.scope { gap: 2px 5px; padding-right: 27px; }
.scope small { white-space: nowrap; }
.scope b { font-size: 0.84rem; white-space: nowrap; }
/* Fenêtres (dialogue avec le patient, pause, confirmation) dans le panneau peint */
.fenetre-dialogue, .fenetre-petite {
  background: none; border-radius: 0; box-shadow: none; border-style: solid; border-width: 0;
  border-image: url(images/ui/panneau.png) 60 fill / 16px stretch; padding: 22px 20px; filter: drop-shadow(0 10px 24px #000a);
}
/* Lignes cliquables (débrief, carnet, tableau) : garder le panneau peint ; décès et complications signalés par une lueur */
.ligne-bilan.cliquable, .ligne-bilan.e-mort, .ligne-bilan.e-complication {
  border-style: solid; border-width: 0; border-image: url(images/ui/panneau.png) 60 fill / 14px stretch;
}
.ligne-bilan.e-mort { filter: drop-shadow(0 0 4px #ff5d6c); }
.ligne-bilan.e-complication { filter: drop-shadow(0 0 4px #f76b15); }
.feuille .doux, .feuille .astuce { color: #6b6556; }
/* Titres des panneaux : icône + titre à gauche ; le score (2e morceau) reste à droite dans la correction */
.section-grille h3 { justify-content: flex-start; gap: 6px; align-items: center; }
.section-grille h3 > span:last-child:not(:first-child) { margin-left: auto; }

/* ---------- Modes classés : compte, problèmes classés, cas du jour (client/classe.js) ---------- */
.defis { max-width: 380px; }
.gros-bouton.defi { flex-direction: column; gap: 2px; min-height: 64px; font-size: 0.95rem; line-height: 1.15; }
.defi-ico { font-size: 1.4rem; }
.champ {
  width: 100%; box-sizing: border-box; font-size: 16px; padding: 12px; border-radius: 12px; border: 2px solid #ffffff26;
  background: #0f242b; color: var(--texte); -webkit-appearance: none; appearance: none;
}
.champ:focus { outline: none; border-color: var(--menthe); }
select.champ { margin-bottom: 12px; }
.erreur-compte { color: var(--rouge); font-weight: 700; min-height: 1em; margin: 0; }
.compte .gros { margin: 0; }
.centre { text-align: center; }
.carte-classe { background: var(--panneau); border-radius: 16px; padding: 14px; margin-bottom: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; line-height: 1.4; }
.carte-classe p { margin: 0; }
.carte-classe .gros-bouton { max-width: none; }
.titre-groupe { margin: 18px 0 8px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--doux); }
.mode-classe {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; border: 0; border-radius: 14px;
  background: var(--panneau2); color: var(--texte); padding: 12px; box-shadow: 0 3px 0 #0007; font-size: 0.95rem; min-height: 64px;
}
.mode-classe:active { transform: translateY(2px); box-shadow: none; }
.mode-classe:disabled { opacity: 0.4; }
.mode-classe .nom { font-weight: 800; display: flex; flex-direction: column; }
.mode-classe small { font-weight: 500; color: var(--doux); font-size: 0.75rem; }
.mode-classe .note-mode { text-align: right; display: flex; flex-direction: column; }
.mode-classe .note-mode b { color: var(--jaune); font-size: 1.15rem; }
.mode-classe.gros-mode { background: linear-gradient(180deg, #2c6b78, #1d4b56); min-height: 84px; font-size: 1.15rem; }
.mode-classe.gros-mode .note-mode b { font-size: 1.6rem; }
.grille-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grille-modes .mode-classe { flex-direction: column; align-items: flex-start; font-size: 0.88rem; }
.grille-modes .mode-classe .note-mode { text-align: left; }
.ligne-classe { display: flex; align-items: center; gap: 10px; background: var(--panneau); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; }
.ligne-classe.moi { outline: 2px solid var(--menthe); }
.ligne-classe .rang { width: 2em; text-align: center; font-weight: 900; color: var(--doux); }
.ligne-classe .qui { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.ligne-classe .val { text-align: right; }
.ligne-classe .stetho { flex: none; }
.ligne-classe .qui small { display: block; font-size: 0.75rem; font-weight: 600; }

/* ---------- Rangs du Classé (stéthoscopes, comme League of Legends) ---------- */
.stetho { display: block; filter: drop-shadow(0 4px 6px #0008); }
img.stetho { object-fit: contain; }
.carte-rang {
  --lueur: #9aa7b2; text-align: center; margin: 10px 0 12px; padding: 16px 14px 14px; border-radius: 18px;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--lueur) 35%, transparent), transparent 70%), var(--panneau);
  border: 2px solid color-mix(in srgb, var(--lueur) 60%, transparent);
}
.carte-rang .stetho { margin: 0 auto 6px; animation: flotte 3s ease-in-out infinite; }
@keyframes flotte { 50% { transform: translateY(-6px); } }
.rang-bois { --lueur: #b87a3e; } .rang-bronze { --lueur: #d98b4a; } .rang-argent { --lueur: #c9d3dc; }
.rang-or { --lueur: #ffc53d; } .rang-platine { --lueur: #4fd1b5; } .rang-diamant { --lueur: #6fb8ff; } .rang-non-classe { --lueur: #6f8187; }
.rang-nom { font: italic 800 1.6rem Georgia, 'Times New Roman', serif; color: var(--lueur); text-shadow: 0 2px 0 #0006; }
.rang-note { margin: 2px 0 10px; }
.rang-barre { height: 12px; border-radius: 99px; background: #0006; overflow: hidden; }
.rang-barre i { display: block; height: 100%; background: linear-gradient(90deg, var(--lueur), #fff); border-radius: 99px; transition: width 0.6s; }
.rang-sous { font-size: 0.86rem; margin: 6px 0 0; color: var(--doux); }
.rang-chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rang-chiffre { background: var(--panneau); border-radius: 12px; padding: 10px; text-align: center; }
.rang-chiffre b { display: block; font-size: 1.25rem; }
.rang-chiffre small { color: var(--doux); text-transform: uppercase; letter-spacing: 1px; font-size: 0.7rem; }
.rang-dernieres { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.rang-dernieres span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 0.85rem; color: #fff; }
.rang-dernieres .v { background: #1f8a4c; } .rang-dernieres .d { background: #a8323f; }
.rang-lancer { max-width: none; margin: 16px 0 6px; min-height: 60px; font-size: 1.15rem; }
.annonce-rang { position: fixed; inset: 0; z-index: 950; background: #000c; display: grid; place-items: center; padding: 16px; animation: entree 0.3s ease-out; }
.annonce-carte { --lueur: #9aa7b2; text-align: center; width: 100%; max-width: 340px; }
.annonce-rang.rang-bois .annonce-carte { --lueur: #b87a3e; } .annonce-rang.rang-bronze .annonce-carte { --lueur: #d98b4a; }
.annonce-rang.rang-argent .annonce-carte { --lueur: #c9d3dc; } .annonce-rang.rang-or .annonce-carte { --lueur: #ffc53d; }
.annonce-rang.rang-platine .annonce-carte { --lueur: #4fd1b5; } .annonce-rang.rang-diamant .annonce-carte { --lueur: #6fb8ff; }
.annonce-titre { font-weight: 900; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 3px; color: var(--texte); }
.annonce-rang.baisse .annonce-titre { color: var(--rouge); }
.annonce-carte .stetho { margin: 14px auto; animation: arrivee-rang 0.7s cubic-bezier(.2, 1.6, .4, 1); filter: drop-shadow(0 0 22px var(--lueur)); }
@keyframes arrivee-rang { from { transform: scale(0.2) rotate(-30deg); opacity: 0; } }
.annonce-nom { font: italic 800 1.8rem Georgia, 'Times New Roman', serif; color: var(--lueur); margin-bottom: 18px; }
.annonce-carte .gros-bouton { max-width: none; }
.serie { color: var(--orange); font-weight: 700; }
.barre-question { height: 8px; background: #ffffff14; flex: none; }
#question-temps { height: 100%; width: 100%; background: var(--menthe); transition: background 0.3s; }
#question-temps.urgent { background: var(--rouge); }
.enonce { font-size: 1.12rem; font-weight: 700; line-height: 1.45; margin: 6px 0 4px; user-select: text; -webkit-user-select: text; }
.niveau-q { font-size: 0.8rem; margin-bottom: 12px; }
.choix-q { display: flex; gap: 10px; align-items: center; min-height: 52px; }
.choix-q .lettre { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #ffffff1f; display: grid; place-items: center; font-weight: 900; }
.choix-q.juste { border-image-source: none; background: #1f8a4c; border-radius: 12px; color: #fff; filter: none; }
.choix-q.faux { border-image-source: none; background: #a8323f; border-radius: 12px; color: #fff; filter: none; }
.choix-q:disabled:not(.juste):not(.faux) { opacity: 0.55; }
.verdict { display: flex; justify-content: space-between; align-items: center; font-size: 1.2rem; margin: 14px 0 8px; }
.verdict.ok b { color: var(--vert); }
.verdict.ko b { color: var(--rouge); }
.delta { font-weight: 900; font-size: 1.4rem; }
.delta.monte { color: var(--vert); }
.delta.baisse { color: var(--rouge); }
.explication-q { background: var(--panneau); border-radius: 12px; padding: 10px 12px; line-height: 1.45; margin-bottom: 10px; user-select: text; -webkit-user-select: text; }
.note-apres { margin-bottom: 12px; }
#correction-q .gros-bouton { max-width: none; margin-bottom: 8px; }

/* ---------- Tutoriel guidé du Dr Walid (client/classe.js : proposer, visite) ---------- */
.visite { position: fixed; inset: 0; z-index: 900; }
.visite-trou {
  position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px #000000a8; outline: 3px solid var(--jaune);
  transition: left 0.25s, top 0.25s, width 0.25s, height 0.25s; pointer-events: none;
}
.visite-volet {
  position: fixed; left: 10px; right: 10px; bottom: max(14px, env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 8px;
  max-width: 560px; margin: 0 auto;
}
.visite.en-haut .visite-volet { bottom: auto; top: max(14px, env(safe-area-inset-top)); align-items: flex-start; }
.visite-walid { flex: none; width: 84px; }
.visite-walid img { width: 100%; display: block; }
.visite-bulle { flex: 1; background: var(--papier); color: var(--encre); border-radius: 16px; padding: 12px; box-shadow: 0 8px 30px #000a; }
.visite-bulle .walid-nom { font-weight: 900; color: #1a7a64; font-size: 0.85rem; }
.visite-texte { margin: 4px 0 10px; line-height: 1.45; font-size: 0.98rem; }
.visite-boutons { display: flex; gap: 8px; }
.visite-boutons .gros-bouton { min-height: 44px; font-size: 0.95rem; flex: 1; }
.case { display: flex; gap: 8px; align-items: center; text-align: left; font-size: 0.92rem; color: var(--texte); }
.case input { width: 22px; height: 22px; flex: none; }
.etat-mail { font-size: 0.85rem; margin: 4px 0 8px; }
#compte-mail { display: flex; flex-direction: column; gap: 6px; width: 100%; }

/* ---------- Quaestio : accueil (Détente / Classé), sujets ---------- */
.defi-sous { display: block; font-size: 0.72rem; font-weight: 600; color: var(--doux); }
.q-entete { text-align: center; margin: 6px 0 10px; }
.q-sceau {
  width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center;
  font: italic 900 2.2rem Georgia, 'Times New Roman', serif; color: #3b2508;
  background: radial-gradient(circle at 35% 30%, #ffe7a3, #e0a93a 60%, #a8721d); box-shadow: 0 4px 0 #6d4710, 0 0 0 4px #ffffff10;
}
.q-titre { margin: 0; font: italic 800 2.1rem Georgia, 'Times New Roman', serif; letter-spacing: 1px; color: #ffe2a0; }
.q-devise { margin: 2px 0 0; font: italic 0.95rem Georgia, serif; color: var(--doux); }
.q-intro { color: var(--texte); line-height: 1.45; margin: 12px 0 14px; text-align: center; }
.q-mode {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 18px; padding: 16px 14px;
  margin-bottom: 12px; color: var(--texte); box-shadow: 0 4px 0 #0008;
}
.q-mode:active, .q-sujet:active { transform: translateY(2px); box-shadow: none; }
.q-detente { background: linear-gradient(135deg, #1f6b5a, #17463f); }
.fac-eclair { background: linear-gradient(135deg, #6a3f8f, #3f2560); } /* Révision éclair du QCM (n'avait pas de fond : texte blanc sur blanc) */
.q-classe { background: linear-gradient(135deg, #7a5317, #4a2f0c); }
.q-ico { flex: none; width: 52px; height: 52px; object-fit: contain; }
.q-txt { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.q-txt b { font-size: 1.25rem; }
.q-txt small { font-size: 0.86rem; line-height: 1.35; color: #e4efec; }
.q-ma-note { font-style: normal; font-weight: 800; color: #ffd36a; font-size: 0.9rem; }
.q-fleche { font-size: 1.8rem; color: #ffffff80; flex: none; }
.q-lien { display: block; margin: 4px auto 0; background: none; border: 0; color: var(--menthe); font-weight: 700; font-size: 0.95rem; padding: 8px; }
.q-retour { margin: 0 0 6px; padding-left: 0; }
.q-bandeau { background: #1f6b5a55; border: 1px solid #4fd1b555; border-radius: 12px; padding: 9px 12px; font-size: 0.92rem; }
.q-bandeau-classe { background: #7a531755; border-color: #ffc53d55; }
.q-liste { display: flex; flex-direction: column; gap: 6px; }
.q-sujet {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-radius: 14px; padding: 10px 12px;
  background: var(--panneau); color: var(--texte); box-shadow: 0 3px 0 #0007; min-height: 56px;
}
.q-sujet:disabled { opacity: 0.4; }
.q-general { background: linear-gradient(135deg, #2c6b78, #1d4b56); min-height: 68px; margin-bottom: 4px; }
.q-pastille { flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.q-pastille img { width: 44px; height: 44px; object-fit: contain; }
.q-nom { flex: 1; font-weight: 800; display: flex; flex-direction: column; min-width: 0; }
.q-nom small { font-weight: 500; color: var(--doux); font-size: 0.76rem; }
.q-note { text-align: right; display: flex; flex-direction: column; flex: none; }
.q-note b { color: var(--jaune); font-size: 1.1rem; }
.q-note small { color: var(--doux); font-size: 0.7rem; }
.q-sujet .q-fleche { font-size: 1.4rem; }

/* Archives sans chrono : pas d'horloge, pas de durées sur les actions, pas de « −8 s » */
.sans-chrono #barre-temps, .sans-chrono #perte, .sans-chrono .cout, .sans-chrono .action .etat:not(.pret) { display: none; }

/* Nouvelles icônes peintes (planches icones-modes et icones-sujets) et fonds peints de Quaestio et des Archives */
.gros-bouton.defi .defi-img { width: 2em; height: 2em; }
#ecran-problemes::before, #ecran-question::before { background: linear-gradient(#0b1a2288, #0b1a22cc), url(images/decor/fond-quaestio.jpg) center / cover no-repeat; }
#ecran-entrainement::before { background: linear-gradient(#0b1a2266, #0b1a22aa), url(images/decor/fond-archives.jpg) center / cover no-repeat; }

/* Pas de couleur unie sous les décors ni dans la barre de titre, et pas de « theme-color » : Safari reprend sinon cette couleur
   pour ses barres (en haut et en bas) ; sans elle, il laisse voir la suite du décor (demande de Walid, 24/10). */
/* Défilement de page, comme les autres sites (demande de Walid, 24/10) : c'est la page qui défile, pas un cadre fixe.
   Safari peut alors réduire ses barres, et les décors (calque fixe ::before) continuent derrière elles.
   Seul l'écran du patient (#ecran-station) reste un cadre fixe à la taille de l'écran, avec ses onglets. */
html, body { height: auto; min-height: 100%; }
body { overflow: visible; overflow-x: hidden; }
.ecran { height: auto; min-height: 100vh; min-height: 100lvh; }
.ecran.colonne { overflow: visible; }
.ecran.jeu > .defile { flex: none; overflow: visible; }
.ecran.jeu > .barre { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#ecran-station { height: 100dvh; min-height: 0; }
#ecran-menu::before, #ecran-stage::before, #ecran-problemes::before, #ecran-question::before, #ecran-entrainement::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0; height: 100lvh; z-index: -1; pointer-events: none;
}
/* Chaque écran à décor forme sa propre pile de calques : son décor (::before, z-index -1) passe devant le fond de la page. */
#ecran-menu, #ecran-stage, #ecran-problemes, #ecran-question, #ecran-entrainement { z-index: 0; }

/* Présentation sous le menu (nouveaux venus et référencement Google) */
#ecran-menu .presentation {
  width: 100%; max-width: 520px; margin: 18px 0 8px; padding: 14px 16px; border-radius: 16px; text-align: left;
  background: #0b1a22d9; border: 1px solid #ffffff1f; color: #dbe9e7; font-size: 0.86rem; line-height: 1.5;
}
#ecran-menu .presentation h2 { margin: 0 0 6px; font-size: 1.05rem; color: #ffc53d; }
#ecran-menu .presentation h3 { margin: 12px 0 4px; font-size: 0.92rem; color: #4fd1b5; }
#ecran-menu .presentation p { margin: 6px 0; }
#ecran-menu .presentation ul { margin: 4px 0; padding-left: 18px; }
#ecran-menu .presentation li { margin: 4px 0; }
#ecran-menu .presentation a { color: #4fd1b5; }
/* Quaestio : question avec une image (radio, photo, ECG), au-dessus de l'énoncé */
.q-image { margin-bottom: 8px; }
.q-image .radio-cadre img { max-height: 42vh; }
/* Sujet sans icône peinte (en attendant la planche) : son émoji */
.q-emoji { font-size: 1.6rem; line-height: 1; }

/* ---------- Mode QCM de la fac, façon Duolingo (client/fac.js) ---------- */
#ecran-fac::before, #ecran-fac-lecon::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0; height: 100lvh; z-index: -1; pointer-events: none;
  background: linear-gradient(#0b1a2288, #0b1a22cc), url(images/decor/fond-quaestio.jpg) center / cover no-repeat;
}
#ecran-fac, #ecran-fac-lecon { z-index: 0; }
.fac-titre { margin: 0; font: italic 800 2rem Georgia, 'Times New Roman', serif; color: #ffe2a0; }
.fac-titre.petit { font-size: 1.45rem; margin: 4px 0 6px; }
.fac-ico { width: 44px; height: 44px; object-fit: contain; }
.fac-libre { background: linear-gradient(135deg, #2c6b78, #1d4b56); }
.fac-libre:disabled { opacity: 0.45; }
.fac-erreurs { background: linear-gradient(135deg, #6b2a33, #43181e); margin-bottom: 8px; }
.fac-numero {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: italic 900 1.3rem Georgia, serif;
  color: #3b2508; background: radial-gradient(circle at 35% 30%, #ffe7a3, #e0a93a 60%, #a8721d); box-shadow: 0 3px 0 #6d4710;
}
.fac-pc { flex: none; font-weight: 900; color: var(--jaune); }

/* Le suivi : flamme, objectif du jour, XP */
.fac-suivi {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0 12px; border-radius: 14px;
  background: #0b1a22d9; border: 1px solid #ffffff1f;
}
.fac-flamme { display: flex; align-items: center; gap: 2px; filter: grayscale(1) opacity(0.6); }
.fac-flamme.allumee { filter: none; }
.fac-flamme img { width: 30px; height: 30px; object-fit: contain; }
.fac-flamme b { font-size: 1.25rem; color: var(--orange); }
.fac-objectif { flex: 1; min-width: 0; }
.fac-objectif small { display: block; font-size: 0.75rem; color: var(--doux); margin-bottom: 4px; }
.fac-objectif.grand { width: 100%; margin: 14px 0; text-align: left; }
.fac-barre { height: 12px; border-radius: 99px; background: #ffffff1a; overflow: hidden; }
.fac-barre i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(180deg, #8ff0a0, #3fbf5c); transition: width 0.4s ease; }
.fac-barre.mini { height: 6px; margin-top: 5px; max-width: 160px; }
.fac-xp { text-align: center; line-height: 1; }
.fac-xp b { display: block; font-size: 1.15rem; color: var(--jaune); }
.fac-xp small { font-size: 0.68rem; color: var(--doux); }

/* Le chemin des leçons : des ronds qui serpentent, groupés par unité (thème) */
.fac-tete-matiere { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fac-tete-matiere .fac-ico { width: 56px; height: 56px; }
.fac-unite { margin: 14px 0 6px; }
.fac-unite-titre {
  display: flex; flex-direction: column; padding: 10px 14px; border-radius: 14px; color: #04261e;
  background: linear-gradient(135deg, #6ee6c9, #2fb597); box-shadow: 0 4px 0 #1a7a64;
}
.fac-unite-titre small { font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 0.7rem; opacity: 0.75; }
.fac-unite-titre b { font-size: 1.1rem; }
.fac-chemin { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0 4px; }
.fac-pas { position: relative; display: flex; flex-direction: column; align-items: center; }
.fac-pas.pos-0 { transform: translateX(-70px); }
.fac-pas.pos-2 { transform: translateX(70px); }
.fac-noeud {
  width: 72px; height: 72px; border-radius: 50%; border: 0; display: grid; place-items: center;
  font: 900 1.5rem Georgia, serif; color: #3b2508;
  background: radial-gradient(circle at 35% 30%, #ffe7a3, #e0a93a 60%, #a8721d); box-shadow: 0 6px 0 #6d4710;
}
.fac-noeud img { width: 38px; height: 38px; object-fit: contain; }
.fac-noeud:active { transform: translateY(4px); box-shadow: 0 2px 0 #6d4710; }
.fac-noeud.faite { background: radial-gradient(circle at 35% 30%, #b8ffd2, #3fbf5c 60%, #1f7a3a); box-shadow: 0 6px 0 #145226; }
.fac-noeud.fermee { background: #2a3d44; box-shadow: 0 6px 0 #16252b; }
.fac-noeud.fermee img { opacity: 0.6; }
.fac-noeud.actuelle { animation: fac-pulse 1.6s ease-in-out infinite; }
@keyframes fac-pulse { 0%, 100% { box-shadow: 0 6px 0 #6d4710, 0 0 0 0 #ffc53d88; } 50% { box-shadow: 0 6px 0 #6d4710, 0 0 0 12px #ffc53d00; } }
.fac-bulle-go {
  position: absolute; top: -34px; white-space: nowrap; background: var(--papier); color: #1a7a64; font-weight: 900; font-size: 0.85rem;
  padding: 5px 10px; border-radius: 10px; animation: fac-saut 1.2s ease-in-out infinite;
}
.fac-bulle-go::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: var(--papier); }
@keyframes fac-saut { 50% { transform: translateY(-4px); } }
.fac-pas:has(.fac-bulle-go) { margin-top: 30px; }
.fac-etoiles { margin-top: 4px; font-size: 0.85rem; letter-spacing: 1px; }
.fac-etoiles i { font-style: normal; color: #ffffff30; }
.fac-etoiles i.oui { color: var(--jaune); }

/* Une leçon */
.fac-barre-lecon { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fac-barre-lecon b { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fac-source { font-size: 0.78rem; margin-top: 4px; }
.fac-consigne { font-size: 0.82rem; margin: 2px 0 12px; }
.fac-figure { background: #ffffff12; border-radius: 10px; padding: 8px 10px; font-size: 0.88rem; margin: 6px 0; }
.fac-choix > span:last-child { flex: 1; }
.fac-choix.choisi .lettre { background: var(--jaune); color: #3b2508; }
.choix-q.oubliee { outline: 3px dashed #8ff0a0; outline-offset: -3px; }
.fac-pied { position: sticky; bottom: 0; margin: 14px -16px 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: #0b1a22ee; }
.fac-pied .gros-bouton { max-width: none; }
.fac-pied.ok { background: #14432aee; }
.fac-pied.ok, .fac-pied.ko { position: static; margin-bottom: -16px; }
.fac-pied.ko { background: #4a1a20ee; }
.fac-verdict { font-size: 1.25rem; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.fac-pied.ok .fac-verdict b { color: #8ff0a0; }
.fac-pied.ko .fac-verdict b { color: #ff9aa3; }
.fac-gain { margin-left: auto; font-weight: 900; color: var(--jaune); }
.fac-explication { margin: 8px 0 12px; line-height: 1.45; font-size: 0.95rem; user-select: text; -webkit-user-select: text; }

/* Le bilan */
.fac-bilan { text-align: center; padding: 20px 0; }
.fac-bilan-titre { font: italic 900 2rem Georgia, serif; color: #ffe2a0; }
.fac-grosses-etoiles { font-size: 3rem; margin: 8px 0; }
.fac-grosses-etoiles i { font-style: normal; color: #ffffff22; display: inline-block; }
.fac-grosses-etoiles i.oui { color: var(--jaune); animation: fac-etoile 0.5s cubic-bezier(.2, 1.6, .4, 1) both; text-shadow: 0 0 18px #ffc53d88; }
@keyframes fac-etoile { from { transform: scale(0) rotate(-90deg); } }
.fac-bilan-score { font-size: 1.4rem; margin: 4px 0 10px; }
.fac-bilan-score b { font-size: 2.6rem; color: var(--texte); }
.fac-debloque { color: #8ff0a0; font-weight: 800; }
.fac-bilan-cases { display: flex; gap: 10px; margin: 12px 0; }
.fac-case { flex: 1; border-radius: 14px; padding: 12px 8px; background: #0b1a22d9; border: 2px solid #ffffff1f; display: flex; flex-direction: column; gap: 4px; }
.fac-case small { font-size: 0.75rem; color: var(--doux); font-weight: 700; }
.fac-case b { font-size: 1.6rem; display: flex; align-items: center; justify-content: center; gap: 4px; }
.fac-case.xp { border-color: #ffc53d88; } .fac-case.xp b { color: var(--jaune); }
.fac-case.flamme { border-color: #ff9a3c88; } .fac-case.flamme b { color: var(--orange); }
.fac-case.flamme img { width: 30px; height: 30px; object-fit: contain; }
.fac-case.nouvelle { animation: fac-pulse 1.6s ease-in-out 2; }
.fac-bilan .gros-bouton { max-width: none; margin-top: 8px; }
/* Chiffres peints du mode QCM (planche chiffres-qcm : chaque chiffre est une pièce dorée) */
.fac-numero.peint { background: none; box-shadow: none; position: relative; }
.fac-numero.peint .fac-piece { width: 46px; height: 46px; filter: drop-shadow(0 3px 0 #0007); }
.fac-numero.peint .fac-piece.petite { position: absolute; width: 26px; height: 26px; right: -7px; bottom: -5px; }
.fac-noeud.pieces { background: none; box-shadow: none; padding: 0; }
/* La pièce remplit exactement le rond : le halo de « Commencer » est centré sur elle (pas d'ombre décalée vers le bas) */
.fac-noeud.pieces.actuelle { animation: fac-pulse-piece 1.6s ease-in-out infinite; }
@keyframes fac-pulse-piece { 0%, 100% { box-shadow: 0 0 0 0 #ffc53d88; } 50% { box-shadow: 0 0 0 12px #ffc53d00; } }
.fac-noeud.pieces:active { transform: translateY(3px); box-shadow: none; }
.fac-pieces { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.fac-pieces .fac-piece { width: 72px; height: 72px; object-fit: contain; display: block; filter: drop-shadow(0 3px 2px #0008); }
.fac-pieces.n2 .fac-piece { width: 46px; height: 46px; margin: 0 -5px; }

/* Polissage iPhone (04/11/2026) */
/* Liens trop petits pour un doigt (Annuler, ‹ Retour, Signaler) : 44 px de haut au moins */
.lien-signaler, .q-lien { min-height: 44px; }
/* Pendant que le Dr Walid parle, on peut faire défiler le contenu au-dessus de sa bulle */
body:has(.walid-pop:not(.cache)) .defile { padding-bottom: 40dvh; }
/* Petit iPhone (SE) : Dr Walid plus petit, bulle moins haute ; moniteur plus serré (la T° et l'EVA tiennent) */
@media (max-height: 700px), (max-width: 340px) {
  .walid-tete { width: 78px; height: 88px; }
  .walid-bulle { max-height: 32dvh; }
  .walid-texte { font-size: 0.88rem; }
}
@media (max-width: 340px) {
  .scope { grid-template-columns: repeat(3, auto); gap: 1px 6px; padding-left: 10px; padding-right: 26px; }
  .scope b { font-size: 0.78rem; }
}

/* Abonnement Supporter (classe.js) : badge ❤, carte du compte, fenêtre de l'offre */
.badge-supporter { color: #ff5c7a; font-style: normal; text-shadow: 0 0 8px #ff5c7a88; }
.carte-supporter { margin: 6px 0 10px; }
.carte-supporter.oui { background: #ff5c7a1f; border-radius: 12px; padding: 8px 10px; }
/* le bouton vert peint, teinté en rose (le cœur garde sa couleur) */
.gros-bouton.supporter { filter: hue-rotate(185deg) saturate(1.2); }
.gros-bouton.supporter .badge-supporter { filter: hue-rotate(-185deg); }
.prix-supporter { display: flex; gap: 6px; margin: 6px 0 4px; }
.prix-supporter .offre { flex: 1; background: #ffffff12; border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.prix-supporter .offre b { font-size: 1.35rem; color: var(--jaune); }
.prix-supporter .offre span { font-size: 0.75rem; color: var(--doux); text-align: center; }
.prix-supporter .offre.meilleure { outline: 2px solid var(--jaune); }
button.offre { border: 0; color: inherit; font: inherit; cursor: pointer; }
button.offre:disabled { cursor: default; opacity: 0.75; }
button.offre:not(:disabled):active { transform: scale(0.97); }
.carte-supporter.oui p { margin: 0; }
.petit-texte { font-size: 0.78rem; margin: 2px 0 6px; }
.titre-dh { font-weight: 700; font-size: 0.9rem; margin: 12px 0 0; }
.etapes-dh { text-align: left; padding-left: 1.3em; margin: 8px 0; font-size: 0.92rem; }
.etapes-dh li { margin: 5px 0; }
.case-renonce { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 0.85rem; margin: 10px 0; cursor: pointer; }
.case-renonce input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--jaune); }
.code-dh { font-size: 2rem; font-weight: 800; letter-spacing: 0.08em; color: var(--jaune); margin: 6px 0; user-select: all; -webkit-user-select: all; }
.gros-bouton.bouton-whatsapp { display: block; text-decoration: none; text-align: center; }
.avantages-supporter { text-align: left; padding-left: 0; list-style: none; margin: 8px 0; }
.avantages-supporter li { margin: 7px 0; padding-left: 2.1em; text-indent: -2.1em; } /* pas de flex : il découpait le texte en colonnes */
.avantages-supporter li .ico-img { vertical-align: middle; margin-right: 0.5em; }
.avantages-supporter .ico-img { width: 1.5em; height: 1.5em; }
/* Les pièces : la pièce d'or peinte (images/chiffres/medaillon.png) */
.ico-piece { width: 1.25em; height: 1.25em; vertical-align: -0.25em; }
.bourse { font-size: 1.05rem; margin: 4px 0 8px; }
.bourse b { color: var(--jaune); }
.fac-case.pieces b { color: var(--jaune); }

/* Avatar et cadre du joueur (classe.js : avatar(), vestiaire()) : le portrait rond, le cadre peint par-dessus */
.avatar-joueur { position: relative; display: inline-block; width: var(--t); height: var(--t); flex: none; vertical-align: middle; }
.avatar-joueur .av { position: absolute; inset: 14%; width: 72%; height: 72%; border-radius: 50%; object-fit: cover; background: #d8efe9; }
.avatar-joueur .av.vide { display: grid; place-items: center; }
.avatar-joueur .av.vide .ico-img { width: 70%; height: 70%; }
.avatar-joueur.sans-cadre .av { inset: 4%; width: 92%; height: 92%; }
.avatar-joueur .cadre { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.profil-avatar { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; background: none; border: 0; color: inherit; font: inherit; padding: 4px; cursor: pointer; }
.profil-avatar .gros { margin: 0; }
.lien-avatar { color: var(--menthe); text-decoration: underline; font-size: 0.85rem; min-height: 24px; }
.titre-vestiaire { margin: 10px 0 6px; font-size: 0.95rem; text-align: left; }
.grille-objets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.objet { display: flex; flex-direction: column; align-items: center; gap: 1px; background: #ffffff10; border: 2px solid transparent; border-radius: 12px; padding: 5px 2px; color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.objet.actif { border-color: var(--menthe); background: #2fb59722; }
.objet .nom-objet { font-size: 0.66rem; line-height: 1.1; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
.objet .rarete { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; }
.objet small { font-size: 0.7rem; }
.objet .prix { color: var(--jaune); font-weight: 800; white-space: nowrap; }
.objet .porte { color: var(--menthe); font-weight: 800; }
.objet.a-acheter .avatar-joueur { filter: saturate(0.75); }
.r-commun .rarete { color: #c9d3d8; } .r-rare .rarete { color: #6cb8ff; } .r-epique .rarete { color: #c78bff; } .r-legendaire .rarete { color: var(--jaune); } .r-offert .rarete { color: var(--doux); }
.ligne-classe .avatar-joueur { margin-right: -4px; }
/* La question « Tu es sûr ? » passe toujours devant les autres fenêtres (ex. acheter un cadre depuis le vestiaire) */
#confirm { z-index: 30; }

/* Bouton « Ajouter à l'écran d'accueil » du menu et ses explications (app.js, section « Installer ») */
#ecran-menu .gros-bouton.installer { border: 2px dashed #6ee6c9aa; }
.ico-appli { border-radius: 22%; }
.etapes-installer { list-style: none; padding: 0; margin: 10px 0; }
.etape-installer { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; line-height: 1.4; }
.etape-installer > b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--menthe); color: #04261e; display: grid; place-items: center; }
.ico-partage { width: 1.35em; height: 1.35em; vertical-align: -0.3em; color: #2a7fff; background: #fff; border-radius: 6px; padding: 1px; }
.fleche-partage { position: fixed; left: 50%; bottom: max(6px, env(safe-area-inset-bottom)); transform: translateX(-50%); font-size: 2.2rem; color: #fff; text-shadow: 0 0 10px #000; animation: fleche-saute 0.9s ease-in-out infinite; pointer-events: none; z-index: 25; }
@keyframes fleche-saute { 50% { transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { .fleche-partage { animation: none; } }

/* Cas des joueurs et éditeur de cas (client/editeur.js) */
.rangee-code { display: flex; gap: 8px; align-items: center; }
.champ.code { text-transform: uppercase; letter-spacing: 6px; font-weight: 900; font-size: 1.3rem; text-align: center; width: 9em; flex: none; }
.rangee-code .gros-bouton { flex: 1; margin: 0; }
.ligne-cas-joueur { display: flex; gap: 10px; align-items: flex-start; background: var(--panneau); border-radius: 14px; padding: 10px; margin: 8px 0; text-align: left; }
.ligne-cas-joueur .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ligne-cas-joueur small { color: var(--doux); }
.portrait-cas { width: 56px; height: 56px; object-fit: cover; object-position: top; border-radius: 12px; background: #d8efe9; flex: none; }
.code-cas { color: var(--jaune); letter-spacing: 2px; }
.actions-cas { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.petit-lien { background: none; border: 0; color: var(--menthe); font: inherit; font-size: 0.88rem; font-weight: 700; text-decoration: underline; padding: 8px 0; min-height: 40px; cursor: pointer; }
.petit-lien.rouge { color: #ff9aa3; }
.petit-lien.coeur { text-decoration: none; color: var(--doux); }
.petit-lien.coeur.oui { color: #ff5c7a; }
.etape-cas { background: var(--panneau); border-radius: 14px; padding: 4px 12px 10px; margin: 10px 0; text-align: left; }
.etape-cas > summary { font-weight: 800; font-size: 1.05rem; padding: 10px 0; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.etape-cas > summary::-webkit-details-marker { display: none; }
.etape-cas > summary b { width: 28px; height: 28px; border-radius: 50%; background: var(--menthe); color: #04261e; display: grid; place-items: center; flex: none; }
.etape-cas label { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-size: 0.9rem; font-weight: 700; }
.etape-cas .champ, .etape-cas .zone-texte { width: 100%; box-sizing: border-box; font-weight: 400; }
.etape-cas select.champ { min-height: 44px; }
.rangee-cas { display: flex; gap: 6px; align-items: flex-end; }
.petit-champ { flex: 1; margin: 0 !important; }
.role { flex: 1; min-height: 44px; border-radius: 10px; border: 2px solid #ffffff22; background: #ffffff0d; color: inherit; font: inherit; font-weight: 700; cursor: pointer; padding: 6px; }
.role.actif { border-color: var(--menthe); background: #2fb59733; }
.role.r-dangereux.actif { border-color: #ff9aa3; background: #ff5c7a33; }
.role.r-utile.actif { border-color: var(--jaune); background: #ffc53d22; }
.roles { display: flex; gap: 4px; }
.roles .role { font-size: 0.78rem; }
.grille-portraits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0; }
.choix-portrait { background: none; border: 3px solid transparent; border-radius: 14px; padding: 0; cursor: pointer; }
.choix-portrait.actif { border-color: var(--menthe); }
.choix-portrait .portrait-cas { width: 100%; height: auto; aspect-ratio: 1; }
.grille-constantes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 8px; }
.grille-constantes label { margin: 4px 0; font-size: 0.8rem; }
.choisi-cas { background: #ffffff0d; border-radius: 12px; padding: 8px; margin: 6px 0; }
.choisi-cas .tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.9rem; }
.choisi-cas .zone-texte { margin-top: 4px; }
.sous-ajout { margin: 12px 0 2px; font-weight: 800; font-size: 0.85rem; color: var(--doux); }
.groupe-cas { border-top: 1px solid #ffffff14; }
.groupe-cas > summary { padding: 10px 2px; cursor: pointer; font-weight: 700; font-size: 0.92rem; }
.ajout-cas { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; font-size: 0.9rem; padding: 9px 4px; min-height: 40px; border-bottom: 1px solid #ffffff0a; cursor: pointer; }
.ajout-cas.pris { color: var(--menthe); font-weight: 700; }

/* Vestiaire en 2 onglets « Mes affaires » / « Boutique » (05/11/2026) */
.onglets-vestiaire button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.onglets-vestiaire .ico-piece { width: 1.2em; height: 1.2em; }
.tout-achete { margin: 18px 0; font-weight: 800; color: var(--jaune); }
.r-commun.a-acheter { border-color: #c9d3d855; } .r-rare.a-acheter { border-color: #6cb8ff66; }
.r-epique.a-acheter { border-color: #c78bff77; } .r-legendaire.a-acheter { border-color: #f5c84299; background: #f5c84214; }

/* Décors peints des autres écrans (planches de Walid du 05/11/2026) : couloir de l'hôpital, bureau du chef, salle de garde.
   Voile plus sombre sur les écrans pleins de texte, pour que tout reste lisible. */
#ecran-cas::before, #ecran-cas-jour::before, #ecran-joueurs::before, #ecran-correction::before, #ecran-bilan::before,
#ecran-tableau::before, #ecran-planning::before, #ecran-carnet::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0; height: 100lvh; z-index: -1; pointer-events: none;
}
#ecran-cas, #ecran-cas-jour, #ecran-joueurs, #ecran-correction, #ecran-bilan, #ecran-tableau, #ecran-planning, #ecran-carnet { z-index: 0; }
#ecran-cas::before { background: linear-gradient(#0b1a2255, #0b1a22aa), url(images/decor/fond-couloir.jpg) center / cover no-repeat; }
#ecran-cas-jour::before, #ecran-joueurs::before { background: linear-gradient(#0b1a2288, #0b1a22cc), url(images/decor/fond-couloir.jpg) center / cover no-repeat; }
#ecran-correction::before, #ecran-bilan::before, #ecran-tableau::before { background: linear-gradient(#0b1a22aa, #0b1a22dd), url(images/decor/fond-bureau-chef.jpg) center / cover no-repeat; }
#ecran-planning::before, #ecran-carnet::before { background: linear-gradient(#0b1a2277, #0b1a22bb), url(images/decor/fond-salle-garde.jpg) center / cover no-repeat; }
#ecran-cas p, #ecran-cas h2, #ecran-cas-jour .defile > p, #ecran-joueurs .defile > p, #ecran-correction .defile > p,
#ecran-bilan .defile > p, #ecran-tableau .defile > p, #ecran-planning .defile > p, #ecran-carnet .defile > p { text-shadow: 0 1px 4px #000c; }

/* Décor de l'éditeur de cas (planche de Walid du 05/11/2026) */
#ecran-editeur::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 100lvh; z-index: -1; pointer-events: none;
  background: linear-gradient(#0b1a2288, #0b1a22cc), url(images/decor/fond-ecriture.jpg) center / cover no-repeat; }
#ecran-editeur { z-index: 0; }
#ecran-editeur .defile > p { text-shadow: 0 1px 4px #000c; }

/* Icônes peintes à la place des derniers émojis (planche icones-3) : étoiles des leçons éteintes en gris */
.fac-etoiles i .ico-img { width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.fac-grosses-etoiles i .ico-img { width: 1em; height: 1em; }
.fac-etoiles i:not(.oui) .ico-img, .fac-grosses-etoiles i:not(.oui) .ico-img { filter: grayscale(1) brightness(0.45); opacity: 0.6; }
.badge-supporter .ico-img { width: 1em; height: 1em; vertical-align: -0.12em; }
#ecran-editeur > .defile > .astuce, #ecran-editeur .defile > p.astuce { color: #c9d6d4; }

/* Tampons peints (planche tampons, 05/11/2026) : la note ronde + le tampon qui s'écrase à côté */
.note-et-tampon { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 2px; }
.note-et-tampon .note-ronde { margin: 0; }
.tampon-note { position: relative; width: 104px; display: flex; flex-direction: column; align-items: center; transform: rotate(-12deg);
  animation: tamponner 0.32s cubic-bezier(.3, 1.4, .5, 1) 0.12s both; }
.tampon-note img { width: 86px; height: 86px; filter: drop-shadow(0 3px 4px #0008); }
.tampon-note span { margin-top: -4px; padding: 1px 7px; border: 2.5px solid currentColor; border-radius: 4px; background: #f6efdcf2;
  font: 900 0.9rem/1.25 'Courier New', ui-monospace, monospace; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.t-rate { color: #c8282d; } .t-insuffisant { color: #e2700f; } .t-bien { color: #23862f; } .t-excellent { color: #1f55b8; }
@keyframes tamponner {
  0% { transform: rotate(-12deg) scale(2.3); opacity: 0; }
  70% { transform: rotate(-12deg) scale(0.9); opacity: 1; }
  100% { transform: rotate(-12deg) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .tampon-note { animation: none; } }

/* Feuilles de résultats habillées : trombone en haut, tampon du labo (ou tube de sang) à côté du titre, signature en bas */
.pied-labo { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 8px; }
.pied-labo .trombone { width: 40px; height: 40px; transform: rotate(-35deg); opacity: 0.95; }
.feuille .fermer { margin-top: 10px; margin-right: 10px; }
.entete-labo { display: flex; align-items: center; gap: 8px; }
.entete-labo .logo-labo { width: 44px; height: 44px; flex: none; transform: rotate(-6deg); opacity: 0.9; }
.signature-labo { display: flex; flex-direction: column; align-items: flex-end; margin: 0 4px 0 auto; width: max-content; transform: rotate(-3deg); }
.signature-labo img { width: 96px; height: 60px; object-fit: contain; margin-bottom: -8px; }
.signature-labo small { font-size: 0.7rem; color: #6b6556; font-style: italic; }

/* Barre du haut quand le jeu est ouvert comme une appli (ajouté à l'écran d'accueil), bug signalé par Walid le 05/11/2026 :
   sur iPhone, le flou (backdrop-filter) d'une barre collée en haut sous la barre d'état transparente rendait les boutons flous,
   et les boutons collés à l'heure/batterie étaient difficiles à toucher (iPhone garde cette zone pour lui).
   Donc, en appli : plus de flou (fond presque opaque à la place) et un peu plus d'espace sous la barre d'état.
   Seulement en appli : le site dans Safari ne change pas (demande de Walid). */
@media (display-mode: standalone) {
  .ecran.jeu > .barre { backdrop-filter: none; -webkit-backdrop-filter: none; background: #0a161bf2; }
  .barre { padding-top: calc(env(safe-area-inset-top) + 10px); }
  .barre .petit-bouton { width: 44px; height: 44px; }
}
html.appli .ecran.jeu > .barre { backdrop-filter: none; -webkit-backdrop-filter: none; background: #0a161bf2; }
html.appli .barre { padding-top: calc(env(safe-area-inset-top) + 10px); }
html.appli .barre .petit-bouton { width: 44px; height: 44px; }

/* ---------- La flamme commune (classe.js, 06/11/2026) : en haut du menu, fenêtre des gels ---------- */
.flamme-menu {
  position: absolute; top: max(14px, env(safe-area-inset-top)); left: 14px; display: flex; align-items: center; gap: 3px;
  min-height: 44px; padding: 4px 10px; border-radius: 22px; background: #0a161bcc; border: 2px solid #ffffff22; color: var(--texte);
  filter: grayscale(1) opacity(0.75);
}
.flamme-menu.allumee { filter: none; border-color: var(--orange); }
.flamme-menu img { width: 28px; height: 28px; object-fit: contain; }
.flamme-menu b { font-size: 1.2rem; color: var(--orange); }
.flamme-menu .gels { display: flex; align-items: center; gap: 1px; margin-left: 4px; color: #8fd8ff; font-weight: 700; font-size: 0.9rem; }
.flocon { width: 1.05em; height: 1.05em; vertical-align: -0.15em; }
button.fac-flamme { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.fenetre-flamme { margin-top: 12vh; }
.grosse-flamme { display: flex; align-items: center; justify-content: center; gap: 6px; filter: grayscale(1) opacity(0.6); }
.grosse-flamme.allumee { filter: none; animation: pulse-flamme 1.6s ease-in-out infinite; }
.grosse-flamme img { width: 72px; height: 72px; object-fit: contain; }
.grosse-flamme b { font-size: 2.6rem; color: var(--orange); }
@keyframes pulse-flamme { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .grosse-flamme.allumee { animation: none; } }
.gels-ligne { display: flex; justify-content: center; gap: 10px; }
.gel { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; border: 2px dashed #8fd8ff55; color: #8fd8ff55; font-size: 1.4rem; }
.gel.plein { border-style: solid; border-color: #8fd8ff; color: #8fd8ff; background: #8fd8ff1a; }
.gel-info { color: #8fd8ff; }
.bloc-notifs:empty { display: none; }
.bloc-notifs { border-top: 1px solid #ffffff1f; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.rangee-boutons { display: flex; gap: 8px; }
.rangee-boutons > * { flex: 1; }

/* ---------- Profil (profil.js, maquette de Walid du 15/11/2026) : remplace « Mon bureau » ---------- */
#ecran-profil { z-index: 0; padding: 0 0 28px; gap: 0; align-items: stretch; }
#ecran-profil::before { content: ''; position: fixed; inset: 0; height: 100lvh; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 60% at 50% 0, #1d3f6e 0, #0f2340 45%, #0b1a22 100%); }
/* Fond acheté (cosmétique « fond », profil.js poserFond) : la peinture derrière toute la page, assombrie pour garder le texte lisible. */
#ecran-profil.avec-fond::before { background: linear-gradient(180deg, #0b1a2299 0, #0b1a2266 35%, #0b1a22aa 70%, #0b1a22e6 100%),
  var(--fond-profil) center top / cover no-repeat, #0b1a22; }
.apercu-fond { width: 54px; height: 80px; object-fit: cover; border-radius: 10px; border: 2px solid #0b1430; display: block; margin: 0 auto; }
.apercu-fond.base { background: radial-gradient(120% 60% at 50% 0, #1d3f6e 0, #0f2340 45%, #0b1a22 100%); }
.apercu-grand .apercu-fond { width: 46px; height: 69px; } /* agrandi 2,3 fois par .apercu-grand > span */
.apercu-grand .apercu-titre { max-width: 68px; min-height: 0; padding: 3px 4px; font-size: .55rem; border-width: 2px; }
.carte-boutique .apercu .apercu-fond { width: 44px; height: 66px; }
.carte-boutique .apercu .apercu-titre { max-width: 66px; min-height: 0; padding: 3px 4px; font-size: .6rem; border-width: 2px; }
html.appli #ecran-profil { padding-bottom: calc(max(8px, env(safe-area-inset-bottom)) + 96px); }
.profil-haut { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 8px; width: 100%; max-width: 520px; margin: 0 auto; }
.profil-haut h2 { grid-column: 2; margin: 0; text-align: center; font-size: 2rem; font-weight: 900; color: #fbf3df; text-shadow: 0 3px 0 #0009; letter-spacing: .01em; }
.profil-menu { grid-column: 1; }
html.appli .profil-menu { visibility: hidden; }
.profil-reglages { grid-column: 3; width: 52px; height: 52px; border-radius: 16px; border: 2px solid #ffffff2e; background: #1d3f6ecc;
  color: #8fc7ff; font-size: 1.9rem; line-height: 1; display: grid; place-items: center; box-shadow: 0 4px 0 #0008; }
.profil-reglages:active { transform: translateY(2px); box-shadow: 0 2px 0 #0008; }
.profil { display: flex; flex-direction: column; align-items: stretch; gap: 14px; text-align: left; width: 100%; max-width: 520px; margin: 0 auto; padding: 0 16px; }
.profil-banniere { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 5 / 2; border: 3px solid #0b1430; box-shadow: 0 6px 0 #0007;
  background: #1d3f6e; }
.profil-banniere img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }
.profil-portrait { display: flex; justify-content: center; margin-top: -96px; position: relative; z-index: 1; }
.profil-portrait .avatar-joueur { filter: drop-shadow(0 6px 6px #000a); }
.profil-portrait .avatar-joueur .av { background: #f1e6c8; }
.profil-pseudo { margin: -4px 0 0; text-align: center; font-size: 2rem; font-weight: 900; color: #fbf3df; text-shadow: 0 3px 0 #0009; overflow-wrap: anywhere; }
.profil-action { align-self: center; width: auto; min-width: 230px; margin: 0; }
.profil-carte { background: #1d3f6ee6; border: 2px solid #0b1430; border-radius: 22px; padding: 14px; box-shadow: 0 5px 0 #0007; }
.profil-carte h3, .profil-stats h3, .profil-amis h3 { margin: 0; font-size: 1.45rem; font-weight: 900; color: #fbf3df; text-shadow: 0 2px 0 #0008; }
.profil-carte h4 { margin: 12px 0 2px; font-size: .95rem; color: var(--doux); }
.profil-stage { display: flex; flex-direction: column; gap: 10px; }
.profil-stage-chiffres { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.profil-stage-chiffres span { display: flex; align-items: center; gap: 7px; font-size: 1rem; min-width: 0; line-height: 1.15; }
.profil-stage-chiffres span + span { border-left: 2px solid #ffffff33; padding-left: 10px; }
.profil-stage-chiffres .ico-img { width: 34px; height: 34px; flex: none; }
.profil-jauge { height: 18px; border-radius: 99px; background: #0b1430; border: 2px solid #0b1430; overflow: hidden; }
.profil-jauge i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(180deg, #8ef0d6, #2fb597); box-shadow: inset 0 -3px 0 #1a7a64; }
.profil-stage .gros-bouton { margin: 2px 0 0; max-width: none; min-height: 64px; font-size: 1.2rem; font-weight: 800; }
.profil-titre-ligne { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.profil-titre-ligne .lien { color: var(--menthe); font-weight: 700; font-size: 1rem; text-decoration: underline; background: none; border: 0; padding: 6px 0; min-height: 44px; }
.profil-tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.profil-tuile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 12px 6px; text-align: center;
  background: #1d3f6ee6; border: 2px solid #0b1430; border-radius: 18px; box-shadow: 0 5px 0 #0007; min-width: 0; }
.profil-tuile .ico-img { width: 46px; height: 46px; }
.profil-tuile b { font-size: 1.45rem; font-weight: 900; color: #fbf3df; line-height: 1.1; white-space: nowrap; }
.profil-tuile small { font-size: .78rem; color: #dbe9f7; }
@media (max-width: 360px) { .profil-tuile b { font-size: 1.15rem; } .profil-tuile .ico-img { width: 38px; height: 38px; } }
.profil-retour { align-self: center; width: auto; padding: 0 18px; margin: 4px 0 0; }
.ajout-ami { display: flex; gap: 8px; margin: 4px 0 8px; }
.ajout-ami input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.25); color: inherit; font-size: 16px; }
.ajout-ami .gros-bouton { width: auto; margin: 0; padding: 0 16px; }
.ami { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.ami-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ami .mini { min-height: 40px; min-width: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: inherit; font: inherit; }
.ami .mini.oui { background: rgba(80,200,140,.22); border-color: rgba(80,200,140,.6); }

/* Le chef accueille le joueur au-dessus du menu, avec ses réponses tactiles. */
body.accueil-walid::after { content: ''; position: fixed; inset: 0; background: #000b; z-index: 39; }
.walid-reponses:empty { display: none; }
.walid-reponses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.walid-reponses .gros-bouton { min-width: 0; min-height: 48px; margin: 0; padding: 8px; font-size: 0.95rem; }
.walid-reponses .gros-bouton:only-child { grid-column: 1 / -1; }
/* Même place que d'habitude : le Dr Walid en bas à gauche, la bulle à côté (sa pointe vers lui). */
body.accueil-walid .walid-tete { width: 84px; height: 96px; }
body.accueil-walid .walid-bulle { max-height: 72dvh; }
.walid-pop:focus, .walid-pop:focus-visible { outline: none; } /* pas de cadre quand le Dr Walid prend la main */
.walid-reponses .gros-bouton:focus:not(:focus-visible) { outline: none; }

/* « Continuer avec Google » (classe.js, 08/11/2026) : bouton blanc avec le G de Google, comme Google le demande. */
.gros-bouton.bouton-google { background: #fff; color: #1f1f1f; gap: 10px; border: 0; border-image: none; border-radius: 14px; text-shadow: none; }
.gros-bouton.bouton-google:disabled { opacity: 0.6; }
.logo-google { width: 22px; height: 22px; flex: none; vertical-align: middle; }
.separateur-ou { display: flex; align-items: center; gap: 10px; color: var(--doux); font-size: 0.85rem; }
.separateur-ou::before, .separateur-ou::after { content: ''; flex: 1; height: 1px; background: #ffffff26; }
.avertir-google { background: #ffc53d22; border: 1px solid #ffc53d66; border-radius: 12px; padding: 8px 10px; font-size: 0.88rem; text-align: left; }

/* ---------- Histoire de la Caravane (12/11/2026) : scènes en bulles, internes, villageois, narrateur ---------- */
body.scene-walid::after { content: ''; position: fixed; inset: 0; background: #0009; z-index: 39; cursor: pointer; }
.walid-tete .walid-peint.autre { object-fit: contain; object-position: center bottom; }
.walid-pop.narrateur .walid-tete { animation: none; width: 78px; height: 88px; }
.walid-pop.narrateur .walid-texte { font-style: italic; }
.walid-pop.narrateur .walid-nom { color: #8a6a10; }
.walid-passer { float: left; margin-top: 4px; min-height: 40px; padding: 8px 14px; border: 2px solid #c9bfa6; border-radius: 99px; background: #f3ead6; color: #4a4336; font: inherit; font-size: 0.82rem; font-weight: 800; cursor: pointer; }
.jour-chapitre { margin-top: 4px; font-weight: 800; color: #d4a017; font-size: 1.05rem; }
.amitie { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 0.9rem; }
.amitie img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.amitie progress { flex: 1; height: 10px; accent-color: #d4a017; }
.action .conseil { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px 1px 2px; border-radius: 99px; background: #d4a017; color: #1b1405; font-size: 0.72rem; font-weight: 800; vertical-align: middle; }
.action .conseil img { width: 22px; height: 22px; object-fit: contain; border-radius: 50%; background: #fff8; }

/* ---------- Appli iPhone (13/11/2026) : accueil avec les boutons en bas et barre d'onglets ----------
   html.appli est posé par app.js partout depuis le 19/11/2026 (le site ressemble à l'appli). */
.barre-appli { display: none; }
#ecran-campagnes::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 100lvh; z-index: -1; pointer-events: none;
  background: linear-gradient(#0b1a22b0, #0b1a22d8), url(images/decor/fond-menu.jpg) center bottom / cover no-repeat; }
#ecran-campagnes { z-index: 0; padding-top: calc(env(safe-area-inset-top) + 28px); }
.campagnes { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 12px; }
.campagne-carte { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 2px solid #ffffff26; border-radius: 20px;
  background: #15303ae6; color: var(--texte); text-align: left; box-shadow: 0 5px 0 #0008; }
.campagne-carte:not(:disabled):active { transform: translateY(3px); box-shadow: 0 2px 0 #0008; }
.campagne-carte:disabled { opacity: 0.6; }
.campagne-image { width: 84px; height: 84px; flex: none; object-fit: contain; }
.campagne-txt { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; font-size: 0.85rem; line-height: 1.3; }
.campagne-txt b { font-size: 1.1rem; }
.campagne-jauge { height: 8px; border-radius: 99px; background: #0008; overflow: hidden; margin-top: 2px; }
.campagne-jauge i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6ee6c9, #2fb597); }
.campagne-etat { font-size: 0.8rem; font-weight: 700; color: var(--menthe); }
.campagne-etat .ico-img { width: 1.1em; height: 1.1em; vertical-align: -2px; }

html.appli body.avec-onglets .barre-appli {
  display: flex; position: fixed; z-index: 8; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto;
  padding: 5px; gap: 2px; border-radius: 26px; background: #0d1f3af2; border: 2px solid #ffffff2e; box-shadow: 0 6px 18px #000a;
}
.barre-appli button { position: relative; flex: 1; min-width: 0; min-height: 60px; border: 0; border-radius: 20px; background: none; color: #eef4ff; padding: 5px 2px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 0.72rem; font-weight: 800; }
.barre-appli img { width: 34px; height: 34px; object-fit: contain; }
.barre-appli span { white-space: nowrap; }
.barre-appli button.actif { background: linear-gradient(180deg, #6ee6c9, #2fb597); color: #04261e; box-shadow: inset 0 -3px 0 #1a7a64; }
.barre-appli button:not(.actif):active { background: #ffffff1c; }
/* Place pour la barre sous le contenu */
html.appli #ecran-menu, html.appli #ecran-campagnes { padding-bottom: calc(max(8px, env(safe-area-inset-bottom)) + 88px); }

/* Accueil de l'appli : logo en haut, l'hôpital au milieu, les boutons en bas */
html.appli #ecran-menu {
  display: none; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(min-content, 1fr); align-content: stretch; gap: 10px;
  padding-left: max(16px, calc(50% - 240px)); padding-right: max(16px, calc(50% - 240px)); padding-top: calc(env(safe-area-inset-top) + 18px);
}
html.appli #ecran-menu.actif { display: grid; }
html.appli #ecran-menu > * { grid-column: 1 / -1; }
html.appli #ecran-menu .logo-jeu { align-self: start; justify-self: center; width: min(86%, 360px); margin-top: 0; }
html.appli #ecran-menu .sous-titre, html.appli #ecran-menu .presentation, html.appli #btn-boutique, html.appli #btn-profil { display: none; }
html.appli #ecran-menu .gros-bouton { max-width: none; }
html.appli #ecran-menu #btn-reprise { min-height: 76px; font-size: 1.25rem; font-weight: 800; }
html.appli #ecran-menu #btn-cas { min-height: 66px; font-size: 1.15rem; border-image-source: url(images/ui/bouton.png); color: #f1f6f5; text-shadow: 0 1px 2px #0009; }
html.appli #ecran-menu #btn-problemes, html.appli #ecran-menu #btn-fac { grid-column: auto; min-height: 66px; font-size: 1.1rem; padding-left: 8px; padding-right: 8px; }
html.appli #ecran-menu #btn-aide, html.appli #ecran-menu #btn-apropos {
  grid-column: auto; min-height: 36px; padding: 4px 8px; font-size: 0.78rem; border-image: none; border-radius: 99px; background: #0b1a22b8; color: #dbe9e7;
}
html.appli #ecran-menu #btn-aide .ico-img, html.appli #ecran-menu #btn-apropos .ico-img { width: 1.3em; height: 1.3em; }
html.appli #ecran-menu .copyright { font-size: 0.66rem; }
/* Le décor s'arrête au-dessus des boutons : l'hôpital se voit entre le logo et le gros bouton vert, puis fond dans le sombre. */
html.appli #ecran-menu::before { height: calc(100lvh - 413px - env(safe-area-inset-bottom)); background: linear-gradient(to bottom, #0b1a2200 80%, #0b1a22 100%), url(images/decor/fond-menu.jpg) center bottom / cover no-repeat; }
html.appli #ecran-menu { background: #0b1a22; }
/* Les petits messages passent au-dessus de la barre d'onglets */
html.appli body.avec-onglets .toast { bottom: calc(max(8px, env(safe-area-inset-bottom)) + 86px); }

/* Boutique de l'appli (13/11/2026, classe.js « Boutique de l'appli ») : pièces fixes en haut, offres du jour, rayons qui glissent */
#ecran-boutique { z-index: 0; padding: 0 0 calc(max(8px, env(safe-area-inset-bottom)) + 96px); gap: 0; align-items: stretch; }
#ecran-boutique::before { content: ''; position: fixed; inset: 0; height: 100lvh; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 60% at 50% 0, #1d3f6e 0, #0f2340 45%, #0b1a22 100%); }
.boutique-haut { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; background: linear-gradient(#0c1d36 70%, #0c1d3600); }
.boutique-haut h2 { margin: 0; font-size: 1.6rem; text-shadow: 0 2px 0 #0008; }
.boutique-pieces { display: flex; align-items: center; gap: 6px; padding: 5px 14px 5px 6px; border-radius: 99px; background: #07111fd9; border: 2px solid #f5c84288;
  font-size: 1.1rem; font-weight: 800; color: var(--jaune); box-shadow: inset 0 -2px 0 #0008; }
.boutique-pieces .ico-piece { width: 28px; height: 28px; }
.boutique { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 520px; margin: 0 auto; }
.boutique > section, .boutique > p { padding: 0 16px; margin: 0; }
.boutique > p { text-align: center; }
.titre-rayon { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.titre-rayon h3 { margin: 0; font-size: 1.15rem; }
.titre-rayon .doux { font-size: 0.78rem; }
.rayon-offres { padding: 12px 12px 14px !important; margin: 0 12px !important; border-radius: 22px; border: 2px solid #f5c84277;
  background: linear-gradient(160deg, #5a3a0ecc, #2a1a44cc); box-shadow: 0 5px 0 #0007; }
.rayon-offres h3 { color: var(--jaune); font-size: 1.25rem; }
.offres-reste { font-size: 0.8rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: #0009; color: #ffe9a8; white-space: nowrap; }
.grille-offres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rayon { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 10px; scroll-snap-type: x proximity; scroll-padding: 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rayon::-webkit-scrollbar { display: none; }
.rayon .carte-boutique { flex: none; width: 116px; scroll-snap-align: start; }
.carte-boutique { --c1: #3b4a55; --c2: #232f38; --bord: #c9d3d866; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 0; padding: 10px 4px 8px; border-radius: 18px; border: 2px solid var(--bord); background: linear-gradient(180deg, var(--c1), var(--c2));
  color: var(--texte); font: inherit; box-shadow: 0 5px 0 #0008; }
.carte-boutique:active { transform: translateY(3px); box-shadow: 0 2px 0 #0008; }
.carte-boutique.r-rare { --c1: #2b5f9e; --c2: #173258; --bord: #6cb8ffaa; }
.carte-boutique.r-epique { --c1: #7440b3; --c2: #3a1f63; --bord: #c78bffbb; }
.carte-boutique.r-legendaire { --c1: #c78a1c; --c2: #6b3d0c; --bord: #ffd866; }
.carte-boutique .apercu { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: #0005; }
.carte-boutique .nom-objet { font-size: 0.78rem; font-weight: 800; line-height: 1.15; text-align: center; min-height: 2.3em; display: flex; align-items: center; overflow-wrap: anywhere; }
.carte-boutique .rarete { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; opacity: 0.9; color: #fff !important; }
.carte-boutique .prix { display: flex; align-items: center; justify-content: center; gap: 4px; width: calc(100% - 8px); margin-top: 4px; padding: 3px 4px; border-radius: 99px;
  background: #0007; color: var(--jaune); font-size: 0.9rem; font-weight: 800; white-space: nowrap; }
.carte-boutique .prix .ico-piece { width: 18px; height: 18px; }
.carte-boutique .prix s { color: #ffffff99; font-size: 0.72rem; font-weight: 600; }
.carte-boutique .prix.achete { color: var(--menthe); }
.carte-boutique.achetee { opacity: 0.6; }
.carte-boutique .ruban { position: absolute; top: -7px; right: -5px; z-index: 1; padding: 2px 8px; border-radius: 99px; background: #e5484d; color: #fff;
  font-size: 0.74rem; font-weight: 800; box-shadow: 0 2px 0 #7d1d20; transform: rotate(6deg); }
/* Fiche d'un objet (fenêtre) et fête à l'achat */
#fiche-objet { z-index: 30; }
/* Le panneau peint des fenêtres est gardé (border-image) ; la rareté se voit à la lueur autour. */
.fiche-objet { position: relative; align-items: center; }
.fiche-objet.r-rare { filter: drop-shadow(0 0 10px #6cb8ffaa); } .fiche-objet.r-epique { filter: drop-shadow(0 0 10px #c78bffbb); } .fiche-objet.r-legendaire { filter: drop-shadow(0 0 12px #ffd866cc); }
.fiche-objet .rarete { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; }
.fiche-objet .gros-bouton { max-width: none; width: 100%; }
.fiche-objet .gros-bouton .ico-piece { width: 1.3em; height: 1.3em; vertical-align: -0.25em; }
.fiche-objet .gros-bouton:disabled { filter: grayscale(0.8); opacity: 0.75; }
.fiche-objet .lien { background: none; border: 0; color: var(--doux); font: inherit; text-decoration: underline; padding: 6px; }
.fiche-offre { color: var(--jaune); font-weight: 700; }
.fiche-offre s { color: var(--doux); font-weight: 400; }
.apercu-grand { position: relative; display: flex; align-items: center; justify-content: center; width: 176px; height: 176px; border-radius: 50%;
  background: radial-gradient(circle, #ffffff26, #ffffff08 70%); }
.apercu-grand > span { display: flex; transform: scale(2.3); }
.apercu-grand.eclat::before { content: ''; position: absolute; inset: -40px; z-index: -1; border-radius: 50%;
  background: repeating-conic-gradient(#ffd86655 0 12deg, #ffd86600 12deg 30deg); animation: eclat-tourne 9s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 35%, #0000 70%); mask: radial-gradient(circle, #000 35%, #0000 70%); }
.fiche-objet.fete { isolation: isolate; }
.fiche-objet.fete .apercu-grand > span { animation: objet-arrive 0.7s cubic-bezier(.2, 1.7, .4, 1) both; }
.fete-titre { font-size: 1.7rem; font-weight: 800; color: var(--jaune); text-shadow: 0 2px 0 #0008; animation: titre-arrive 0.5s cubic-bezier(.2, 1.7, .4, 1) both; }
@keyframes titre-arrive { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes eclat-tourne { to { transform: rotate(360deg); } }
@keyframes objet-arrive { from { transform: scale(0.2); opacity: 0; } to { transform: scale(2.3); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .apercu-grand.eclat::before, .fiche-objet.fete .apercu-grand > span, .fete-titre { animation: none; } }

/* ---------- Bouton « Campagnes » de l'accueil : jaune → orange (Walid, 13/11/2026) ---------- */
#ecran-menu #btn-campagnes, #ecran-menu #btn-campagnes:not(:disabled):active {
  border-image: none; border-radius: 16px; background: linear-gradient(180deg, #ffe066, #ffb020 55%, #ff7a18);
  box-shadow: 0 4px 0 #a34a06, inset 0 2px 0 #fff6; color: #3a1c00; text-shadow: none; font-weight: 800; position: relative;
  /* les boutons peints ont une marge transparente dans leur image : même taille visible qu'eux */
  width: calc(100% - 6px); margin: 3px 3px 5px; min-height: 50px; padding: 6px 18px;
}
#ecran-menu #btn-campagnes:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 #a34a06, inset 0 2px 0 #fff6; }
#btn-campagnes .nouveau { position: absolute; top: -8px; right: 10px; padding: 2px 9px; border-radius: 99px; background: #e5484d; color: #fff;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; box-shadow: 0 2px 0 #8e1f2a; transform: rotate(4deg); }
html.appli #ecran-menu #btn-campagnes { min-height: 58px; font-size: 1.15rem; }
html.appli .btn-campagnes-retour { display: none; }
/* Appli emballée (client/appli-pont.js) : Google seulement avec l'extension de l'appli et l'ID « iOS » (classe google-natif),
   Apple seulement dans l'appli (classe connexion-native) ; sans aucun des deux (anciennes versions), pas de « ou ». */
html.appli-emballee:not(.google-natif) #compte-google { display: none; }
html.appli-emballee:not(.connexion-native) .separateur-ou { display: none; }
#compte-apple { display: none; }
html.connexion-native #compte-apple { display: flex; }
.gros-bouton.bouton-apple { background: #000; color: #fff; gap: 10px; border: 0; border-image: none; border-radius: 14px; text-shadow: none; }
.gros-bouton.bouton-apple:disabled { opacity: 0.6; }
.logo-apple { width: 18px; height: 22px; flex: none; margin-top: -3px; }
#compte-google + #compte-apple { margin-top: 8px; }
/* Suppression de compte (fenêtre du compte, classe.js) */
.lien-discret { background: none; border: 0; color: var(--doux); font: inherit; font-size: 0.82rem; text-decoration: underline; padding: 6px; align-self: center; }
.gros-bouton.bouton-danger { border-image: none; background: #b3261e; color: #fff; border-radius: 14px; box-shadow: 0 4px 0 #6d120d; }
.gros-bouton.bouton-danger:disabled { opacity: 0.6; }
/* Appli emballée : les Cas des joueurs (cas écrits par les joueurs) sont cachés pour la 1re version de l'App Store,
   Apple exigeant un signalement et un blocage de l'auteur pour ce genre de contenu (règle 1.2). Ils restent sur le site. */
html.appli-emballee #btn-joueurs { display: none; }

/* ---------- Pass Caravane (pass.js, maquette de Walid du 15/11/2026) : 5 étapes sur un chemin, une par jour de Caravane fini ---------- */
.pass-entree { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px 10px 10px; border: 2px solid #f4c24d88; border-radius: 20px;
  background: linear-gradient(90deg, #3a2a12f0, #15303af0); color: var(--texte); text-align: left; box-shadow: 0 5px 0 #0008; }
.pass-entree:active { transform: translateY(3px); box-shadow: 0 2px 0 #0008; }
.pass-entree img { width: 84px; height: 56px; flex: none; object-fit: cover; border-radius: 12px; border: 2px solid #0b1430; }
.pass-entree > span:not(.pass-fleche):not(.pastille) { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 0.85rem; }
.pass-entree b { font-size: 1.1rem; color: #ffd66b; }
.pass-entree .pastille { top: -6px; right: -4px; }
.barre-appli .pastille { top: 2px; right: calc(50% - 26px); }
.pass-fleche { font-size: 2rem; font-weight: 900; color: #ffd66b; line-height: 1; }
#ecran-pass { z-index: 0; padding: 0 0 28px; gap: 0; align-items: stretch; }
#ecran-pass::before { content: ''; position: fixed; inset: 0; height: 100lvh; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 60% at 50% 0, #1d3f6e 0, #0f2340 45%, #0b1a22 100%); }
html.appli #ecran-pass { padding-bottom: calc(max(8px, env(safe-area-inset-bottom)) + 96px); }
#ecran-pass .profil-haut { grid-template-columns: 52px 1fr; }
#ecran-pass .profil-haut h2 { grid-column: 2; text-align: left; font-size: 1.9rem; }
.pass-retour { grid-column: 1; width: 52px; height: 52px; border-radius: 16px; border: 2px solid #0b1430; background: #6ee6c9; color: #0b1430;
  font-size: 1.8rem; font-weight: 900; line-height: 1; display: grid; place-items: center; box-shadow: 0 4px 0 #0008; }
.pass-retour:active { transform: translateY(2px); box-shadow: 0 2px 0 #0008; }
.pass { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 520px; margin: 0 auto; padding: 0 16px; text-align: left; }
.pass-haut { border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 9; border: 3px solid #0b1430; box-shadow: 0 6px 0 #0007; background: #1d3f6e; }
.pass-haut img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pass-progres { padding: 12px 16px 16px; border-radius: 22px; border: 2px solid #ffffff26; background: #1b3566e6; box-shadow: 0 5px 0 #0008; text-align: center; }
.pass-progres b { display: block; font-size: 1.6rem; font-weight: 900; color: #fbf3df; text-shadow: 0 2px 0 #0009; margin-bottom: 10px; }
.pass-barre { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 6px; }
.pass-barre i { height: 16px; border-radius: 99px; background: #2c4a86; box-shadow: inset 0 2px 3px #0006; }
.pass-barre i.plein { background: linear-gradient(#8ff3d9, #3cc9a6); }
.pass-chemin { list-style: none; margin: 0; padding: 12px 10px 12px 0; display: flex; flex-direction: column; gap: 12px; position: relative;
  border-radius: 22px; border: 2px solid #ffffff1f; background: #142b52d9; box-shadow: 0 5px 0 #0008; }
/* le chemin de terre qui relie les étapes, derrière les losanges */
.pass-chemin::before { content: ''; position: absolute; left: 30px; top: 30px; bottom: 30px; width: 14px; border-radius: 99px;
  background: repeating-linear-gradient(#e7b453 0 10px, #d79b35 10px 20px); box-shadow: 0 0 0 3px #7a5420aa; }
.pass-etape { position: relative; display: grid; grid-template-columns: 54px 84px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  margin-left: 10px; padding: 10px 12px 10px 0; min-height: 84px; }
.pass-etape::after { content: ''; position: absolute; inset: 0 0 0 44px; z-index: -1; border-radius: 18px; border: 2px solid #ffffff22;
  background: #24467fe6; box-shadow: 0 4px 0 #0008; }
.pass-etape.ferme::after { background: #1b3460e6; }
.pass-num { width: 44px; height: 44px; margin-left: 4px; transform: rotate(45deg); border-radius: 10px; background: #fbf3df; border: 3px solid #0b1430;
  display: grid; place-items: center; box-shadow: 0 3px 0 #0008; font-size: 1.35rem; font-weight: 900; color: #0b1430; line-height: 1; }
.pass-num > span { transform: rotate(-45deg); }
.pass-image { display: grid; place-items: center; height: 72px; }
.pass-image img { max-width: 100%; max-height: 72px; }
.pass-avatar { border-radius: 14px; background: #f1e6c8; }
.pass-deux { display: flex; gap: 4px; justify-content: center; }
.pass-image .pass-deux img { max-width: 48%; }
.pass-fete-image .pass-deux img { max-height: 120px; }
.pass-banniere { width: 84px; height: 56px; object-fit: cover; border-radius: 10px; border: 3px solid #f4c24d; }
.pass-banniere.pass-fond { width: 48px; height: 72px; } /* fond du profil (en hauteur) */
.pass-fete-image .pass-banniere.pass-fond { width: 100px; height: 150px; }
.pass-pieces { display: flex; align-items: center; gap: 4px; font-size: 1.1rem; font-weight: 900; color: #ffd66b; }
.pass-pieces .ico-piece { width: 60px; height: 60px; }
.pass-titre { display: block; padding: 6px 6px; border-radius: 12px; border: 3px solid #e2a93b; background: #fbf3df; color: #1f4f9a;
  font-size: .62rem; font-weight: 900; text-align: center; line-height: 1.1; box-shadow: 0 2px 0 #0006; }
.pass-nom { font-size: 1.05rem; font-weight: 900; color: #fbf3df; line-height: 1.2; hyphens: auto; }
/* Téléphone : le bouton passe sous le nom (avec 7 étapes, les noms sont plus longs : « Avatars enquêteurs », « Fond Dispensaire de nuit »). */
@media (max-width: 440px) {
  .pass-etape { grid-template-columns: 54px 76px minmax(0, 1fr); row-gap: 6px; }
  .pass-num, .pass-image { grid-row: span 2; }
  .pass-nom { align-self: end; }
  .pass-etape > .pass-prendre, .pass-etape > .pass-recu, .pass-etape > .pass-verrou { grid-column: 3; justify-self: start; align-self: start; }
}
.pass-nom small { display: block; font-size: .75rem; font-weight: 600; color: #b9c7e0; margin-top: 2px; }
.pass-prendre { padding: 10px 12px; border-radius: 99px; border: 2px solid #0b1430; background: linear-gradient(#8ff3d9, #3cc9a6); color: #0b1430;
  font-weight: 900; font-size: .95rem; box-shadow: 0 4px 0 #0008; }
.pass-prendre:active { transform: translateY(2px); box-shadow: 0 2px 0 #0008; }
.pass-recu { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 99px; background: #5f9c6d; color: #0b1430;
  font-weight: 900; font-size: .85rem; }
.pass-recu .ico-img { width: 1.1em; height: 1.1em; }
.pass-verrou .ico-img { width: 30px; height: 30px; opacity: .85; }
button.pass-supporter { background: none; border: 0; padding: 0; box-shadow: none; cursor: pointer; }
.pass-etape.ferme .pass-image { opacity: .55; filter: saturate(.6); }
.pass-note { text-align: center; margin: 0; }
.pass-jouer { align-self: center; }
.pass-fete-image { display: flex; justify-content: center; margin-bottom: 8px; }
.pass-fete-image img { max-height: 140px; }
.pass-fete-image .pass-banniere { width: 220px; height: 120px; }
.pass-fete-image .pass-titre { font-size: 1.1rem; padding: 10px 16px; }
/* Titre sous le pseudo, sur le profil (Pass Caravane, étape 4) */
.profil-titre { align-self: center; margin: -6px auto 0; padding: 4px 14px; border-radius: 12px; border: 3px solid #e2a93b; background: #fbf3df;
  color: #1f4f9a; font-weight: 900; font-size: .95rem; box-shadow: 0 3px 0 #0007; }
/* Aperçus de « Mon avatar » pour les bannières et les titres du profil */
.apercu-banniere { width: 100%; max-width: 72px; height: 54px; object-fit: cover; border-radius: 10px; border: 2px solid #0b1430; }
.apercu-titre { display: grid; place-items: center; min-height: 64px; padding: 4px 8px; border-radius: 10px; border: 3px solid #e2a93b; background: #fbf3df;
  color: #1f4f9a; font-weight: 900; font-size: .75rem; line-height: 1.15; text-align: center; }
.apercu-titre.vide { border-color: #8a8a8a; color: #555; font-size: 1.4rem; }

/* Nom en or du Supporter (classements, profil, amis) : seulement quand l'abonnement est allumé (porte.or / l.or). */
.nom-or { background: linear-gradient(110deg, #d99a1f 40%, #fff8d6 50%, #d99a1f 60%); background-size: 250% 100%; background-position: 50% 0; -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; text-shadow: none; }
@media (prefers-reduced-motion: no-preference) { .nom-or { animation: nom-or-brille 2.8s linear infinite; } }
@keyframes nom-or-brille { from { background-position: 120% 0; } to { background-position: -120% 0; } }
/* Pseudo rouge du 1er du classement de Quaestio Classé (même reflet que l'or du Supporter, choix de Walid du 23/11/2026). */
.nom-rouge { background: linear-gradient(110deg, #e0283c 40%, #ffd6da 50%, #e0283c 60%); background-size: 250% 100%; background-position: 50% 0; -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; text-shadow: none; }
@media (prefers-reduced-motion: no-preference) { .nom-rouge { animation: nom-or-brille 2.8s linear infinite; } }

/* Carnet « Mes fautes » (Supporters) */
.carnet-fautes { margin: 4px 0 12px; }
.fautes-matiere { margin: 14px 0 6px; font-size: .95rem; }

/* Hibou, l'assistant de révision des Supporters (hibou.js) */
.bouton-hibou { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0; }
.bouton-hibou img { width: 28px; height: 28px; }
.hibou-fenetre { display: flex; flex-direction: column; gap: 8px; max-height: 88vh; max-height: 88dvh; }
.hibou-haut { display: flex; align-items: center; gap: 10px; }
.hibou-haut img { width: 52px; height: 52px; }
.hibou-haut small { display: block; }
.hibou-haut .fermer { margin-left: auto; }
.hibou-avertissement { text-align: left; font-size: .8rem; opacity: .8; margin: 0; }
.hibou-fil { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.hibou-bulle { text-align: left; padding: 8px 12px; border-radius: 14px; max-width: 88%; white-space: pre-wrap; line-height: 1.4; }
.hibou-bulle.lui { align-self: flex-start; background: rgba(255, 255, 255, .08); }
.hibou-bulle.moi { align-self: flex-end; background: var(--accent, #2f9e72); color: #fff; }
.hibou-bulle.attente { opacity: .6; font-style: italic; }
.hibou-saisie { display: flex; gap: 8px; align-items: flex-end; }
.hibou-saisie textarea { flex: 1; font: inherit; font-size: 16px; border-radius: 12px; padding: 8px; resize: none; }
.hibou-saisie .gros-bouton { width: auto; margin: 0; }
.hibou-reste { margin: 0; text-align: center; }

/* ---------- Les Fièvres de Tizi Sefra (tizi.js) : bleu nuit, crème et ambre, comme l'affiche ---------- */
#ecran-tizi { z-index: 0; padding-top: calc(env(safe-area-inset-top) + 18px); }
body.tizi #ecran-tizi::before { content: ''; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(#0c163066, #0c1630d9 35%, #0c1630eb), url(images/tizi/fond-dispensaire.jpg) center / cover no-repeat; }
#tizi { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 12px; text-align: left; color: #f6ecd6; }
#tizi .doux { color: #c9b994; }
.tz-haut { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tz-titre-haut { font-weight: 800; font-size: 0.9rem; color: #f0b54a; text-align: center; flex: 1; }
.tz-petit { border: 1.5px solid #f0b54a66; background: #0c1630cc; border-radius: 99px; padding: 7px 11px; font-size: 0.82rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tz-petit .ico-img { width: 18px; height: 18px; }
.tz-nb { background: #f0b54a; color: #1b1407; border-radius: 99px; padding: 0 6px; font-size: 0.75rem; }
.gros-bouton.tz-principal { border-image: none; border: 2px solid #ffe0a0; border-radius: 14px; background: linear-gradient(#f5be55, #d98b1c);
  color: #24170a; text-shadow: none; box-shadow: 0 4px 0 #7a4a0e; }
.tz-accueil { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.tz-affiche { width: 100%; max-width: 380px; align-self: center; border-radius: 14px; box-shadow: 0 10px 30px #000c; border: 2px solid #f0b54a55; }
.tz-accroche { text-align: center; font-style: italic; margin: 0; color: #f6ecd6; }
.tz-boutons { display: flex; flex-direction: column; gap: 8px; }
/* Les 7 jours (27/11/2026) : un chemin pointillé relie les pastilles ; carte pleine largeur, visages des patients du jour. */
.tz-jours { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; position: relative; }
.tz-jours::before { content: ''; position: absolute; left: 35px; top: 30px; bottom: 30px; border-left: 3px dotted #f0b54a66; }
.tz-jours li { position: relative; }
.tz-jour { width: 100%; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 16px; background: linear-gradient(180deg, #13224a, #0c1630); border: 1.5px solid #ffffff1f; color: #f6ecd6;
  text-align: left; font: inherit; box-shadow: 0 4px 12px #0006; }
.tz-jour:not([disabled]) { cursor: pointer; }
.tz-jour:not([disabled]):active { transform: scale(0.98); }
.tz-jnum { width: 48px; height: 48px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.35rem; line-height: 1; background: #2a3558; color: #c9cfe0; border: 2px solid #0b1430; position: relative; z-index: 1; }
.tz-jnum small { font-size: 0.55rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 800; opacity: 0.8; margin-bottom: 2px; }
.tz-j-milieu { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tz-j-milieu b { font-size: 1rem; line-height: 1.2; }
.tz-j-milieu em { font-size: 0.78rem; color: #e8dcc0; line-height: 1.3; }
.tz-j-visages { display: flex; }
.tz-j-visages img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: top; background: #f6ecd6;
  border: 2px solid #0c1630; margin-left: -7px; }
.tz-j-visages img:first-child { margin-left: 0; }
.tz-j-droite { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.tz-j-etat { font-size: 0.72rem; color: #c9b994; white-space: nowrap; }
.tz-j-note { font-weight: 900; font-size: 1.3rem; color: #6ee6c9; line-height: 1; }
.tz-j-note small { font-size: 0.7rem; color: #c9b994; margin-left: 1px; }
.tz-j-jouer { background: #f0b54a; color: #13213f; font-weight: 900; padding: 7px 12px; border-radius: 999px; font-size: 0.85rem; white-space: nowrap;
  box-shadow: 0 3px 0 #a8741c; }
.tz-j-cadenas { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 0.8rem; color: #ff8fa3; white-space: nowrap; }
.tz-j-cadenas .ico-img { width: 16px; height: 16px; }
.tz-j-cadenas.petit .ico-img { width: 20px; height: 20px; opacity: 0.8; }
/* fini : pastille menthe ; aujourd'hui : dorée qui respire ; plus tard : grisée */
.tz-jour.fini { border-color: #6ee6c955; }
.tz-jour.fini .tz-jnum { background: #6ee6c9; color: #0b1a22; }
.tz-jour.ici { border: 2px solid #f0b54a; background: linear-gradient(180deg, #2a2a4e, #151a3a); box-shadow: 0 0 0 4px #f0b54a22, 0 6px 16px #0008; }
.tz-jour.ici .tz-jnum { background: #f0b54a; color: #13213f; animation: tz-respire 2.4s ease-in-out infinite; }
.tz-jour.ferme { opacity: 1; }
.tz-jour.ferme .tz-j-milieu b { color: #aab2c8; }
.tz-jour.ferme .tz-j-visages img { filter: grayscale(0.8) brightness(0.7); }
@keyframes tz-respire { 0%, 100% { box-shadow: 0 0 0 0 #f0b54a88; } 50% { box-shadow: 0 0 0 7px #f0b54a00; } }
@media (prefers-reduced-motion: reduce) { .tz-jour.ici .tz-jnum { animation: none; } }
.tz-chapitre { text-align: center; padding: 30px 6px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.tz-jour-grand { display: block; text-align: center; color: #f0b54a; font-weight: 900; letter-spacing: 4px; text-transform: uppercase; font-size: 0.85rem; }
.tz-titre-peint { margin: 0; text-align: center; font-size: 2rem; line-height: 1.05; font-weight: 900; text-transform: uppercase; color: #f6e7c1;
  letter-spacing: 1px; text-shadow: 2px 3px 0 #0a1124, 0 0 18px #f0b54a40; transform: rotate(-1.5deg); }
.tz-fiche { display: flex; gap: 12px; align-items: flex-end; padding: 10px 12px 0; border-radius: 18px; background: #f6ecd6; color: #22262e;
  border: 2px solid #f0b54a; box-shadow: 0 5px 0 #0008; overflow: hidden; }
.tz-fiche > div { padding-bottom: 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tz-fiche .doux { color: #6b5e45; }
.tz-fiche small { color: #6b5e45; }
.tz-portrait { width: 92px; height: 120px; object-fit: contain; object-position: center bottom; flex: none; }
.tz-nom { font-size: 1.25rem; }
.tz-motif { margin: 4px 0 0; font-weight: 600; }
.tz-sous { margin: 6px 0 0; font-size: 1rem; display: flex; align-items: center; gap: 6px; color: #f0b54a; }
.tz-sous .ico-img { width: 22px; height: 22px; }
.tz-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tz-q, .tz-option { width: 100%; text-align: left; padding: 11px 12px; border-radius: 14px; border: 1.5px solid #f0b54a59; background: #13213fe6;
  display: flex; align-items: center; gap: 8px; line-height: 1.3; min-height: 44px; }
.tz-q .ico-img, .tz-option .ico-img { width: 20px; height: 20px; flex: none; }
.tz-q.fait { opacity: 0.75; border-color: #ffffff1f; }
.tz-q:not(:disabled):active, .tz-option:not(:disabled):active { transform: translateY(2px); }
.tz-rep { display: block; margin: 4px 0 2px 14px; padding: 7px 10px; border-left: 3px solid #f0b54a; background: #f6ecd61a; border-radius: 0 10px 10px 0;
  font-size: 0.9rem; line-height: 1.35; }
.tz-resultat { border-left-color: #6ee6c9; font-family: ui-monospace, Menlo, monospace; font-size: 0.82rem; }
.tz-decision, .tz-deduction, .tz-bilan, .tz-photo { display: flex; flex-direction: column; gap: 9px; }
.tz-decision h3, .tz-deduction h3, .tz-bilan h3 { margin: 4px 0; text-align: center; color: #f6e7c1; }
.tz-option.ecarte { opacity: 0.45; text-decoration: line-through; }
.tz-option.choisi { background: #f0b54a; color: #24170a; border-color: #ffe0a0; font-weight: 700; }
.tz-note { text-align: center; margin: 0; font-size: 1.1rem; }
.tz-note b { font-size: 2.4rem; color: #f0b54a; }
.tz-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.tz-points li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: #13213fcc; }
.tz-alerte { margin: 0; padding: 9px 12px; border-radius: 12px; background: #ff5d6c26; border: 1.5px solid #ff5d6c88; display: flex; gap: 8px; align-items: flex-start; }
.tz-alerte .ico-img, .tz-retenir .ico-img { width: 20px; height: 20px; flex: none; }
.tz-oublis { margin: 0; font-size: 0.88rem; color: #c9b994; }
.tz-correction { margin: 0; padding: 12px; border-radius: 14px; background: #f6ecd6; color: #22262e; line-height: 1.45; }
.tz-retenir { margin: 0; padding: 10px 12px; border-radius: 14px; background: #f0b54a26; border: 1.5px solid #f0b54a88; display: flex; gap: 8px; line-height: 1.4; }
.tz-fin { text-align: center; font-style: italic; font-size: 1.05rem; margin: 6px 0; }
/* Photo de la fête : dessinée en CSS en attendant un vrai dessin */
.tz-telephone { align-self: center; width: min(300px, 86vw); padding: 12px 10px 14px; border-radius: 26px; background: #1a1a1f; border: 3px solid #3a3a44;
  box-shadow: 0 10px 24px #000b; display: flex; flex-direction: column; gap: 8px; }
.tz-cliche { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #2a2a33; }
.tz-date { margin: 0; text-align: center; color: #f0b54a; font-weight: 800; font-size: 0.9rem; }
/* Carnet d'indices (fenêtre) */
.tz-voile { position: fixed; inset: 0; z-index: 60; background: #050a18cc; display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom)); }
.tz-carnet { width: 100%; max-width: 520px; max-height: 82vh; overflow-y: auto; border-radius: 22px; padding: 16px; background: #f6ecd6; color: #22262e;
  border: 3px solid #f0b54a; display: flex; flex-direction: column; gap: 10px; text-align: left; user-select: text; -webkit-user-select: text; }
.tz-carnet h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.tz-carnet h3 .ico-img { width: 26px; height: 26px; }
.tz-carnet ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tz-carnet .doux { color: #6b5e45; }
.tz-carte { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: #fffaf0; border: 1.5px dashed #c79a4a; }
.tz-carte small { color: #6b5e45; }
.tz-cert { font-style: normal; font-weight: 700; }
.tz-cert.certain { color: #2f7d4f; }
.tz-cert.rapporte { color: #9a5b12; }
.tz-cert.approximatif, .tz-cert.a-verifier { color: #8a3b9a; }
.walid-tete .walid-peint.tz-narrateur { object-fit: cover; object-position: center 30%; border-radius: 10px; }
.tz-carte-campagne { border-color: #f0b54a88; background: linear-gradient(135deg, #13213ff2, #2a1d0ef2); }
.tz-carte-campagne .campagne-image { object-fit: cover; object-position: center 25%; border-radius: 12px; }
.tz-carte-campagne .campagne-etat { color: #f0b54a; }
/* Mode expert (proposer une hypothèse) */
.gros-bouton.tz-hypo { border-image: none; border: 2px dashed #f0b54a; border-radius: 14px; background: #13213fe6; color: #f6ecd6; }
.tz-hypo .ico-img { width: 22px; height: 22px; }
/* Frise (jour 2) : une ligne verticale, du plus ancien à aujourd'hui */
.tz-frise { list-style: none; margin: 6px 0 0; padding: 0 0 0 22px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.tz-frise::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: #f0b54a88; }
.tz-frise li { position: relative; padding: 8px 12px; border-radius: 12px; background: #13213fe6; border: 1.5px solid #f0b54a59;
  display: flex; flex-direction: column; gap: 2px; }
.tz-frise li::before { content: ''; position: absolute; left: -20px; top: 12px; width: 13px; height: 13px; border-radius: 50%; background: #f0b54a;
  border: 2px solid #0c1630; }
.tz-frise li.environ { border-style: dashed; border-color: #c48ad4; }
.tz-frise li.environ::before { background: transparent; border: 2px dashed #c48ad4; }
.tz-frise li.aujourdhui { background: #f6ecd6; color: #22262e; }
.tz-frise li.aujourdhui::before { background: #6ee6c9; }
.tz-frise small { color: #c9b994; }
.tz-frise .tz-cert.certain { color: #6ee6c9; }
.tz-frise .tz-cert.approximatif { color: #e3a8f0; }
.tz-frise-quand { font-size: 0.78rem; font-weight: 800; color: #f0b54a; text-transform: uppercase; letter-spacing: 1px; }
.tz-frise li.aujourdhui .tz-frise-quand { color: #2f7d4f; }
/* Comparaison (jour 3) : trois dossiers côte à côte, ou empilés sur petit écran */
.tz-criteres { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tz-criteres .tz-option { justify-content: center; text-align: center; }
.tz-dossiers { display: flex; flex-direction: column; gap: 10px; }
.tz-dossier { padding: 10px; border-radius: 16px; background: #f6ecd6; color: #22262e; border: 2px solid #f0b54a; display: flex; flex-direction: column; gap: 6px; }
.tz-dossier-tete { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.tz-dossier-tete img { width: 46px; height: 46px; object-fit: cover; object-position: center top; border-radius: 50%; background: #e8d9b6; }
.tz-dossier ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 0.88rem; }
.tz-dossier li { display: flex; gap: 8px; }
.tz-dossier li span { flex: none; width: 88px; font-weight: 700; color: #6b5e45; }
.tz-groupes { display: flex; gap: 6px; }
.tz-groupes .tz-option { font-size: 0.82rem; padding: 8px; justify-content: center; text-align: center; color: #f6ecd6; }
.tz-groupes .tz-option.choisi { color: #24170a; }
/* Carte (jour 4) : la peinture du village, avec les lieux et les patients posés en pourcentage */
.tz-carte-village { position: relative; border-radius: 16px; overflow: hidden; border: 2px solid #f0b54a88; box-shadow: 0 8px 22px #000a; }
.tz-carte-village > .tz-carte-fond { display: block; width: 100%; height: auto; }
.tz-lieu { position: absolute; transform: translate(-50%, -50%); padding: 2px 7px; border-radius: 99px; background: #0c1630d9; color: #f6ecd6;
  font-size: 0.68rem; font-weight: 800; white-space: nowrap; border: 1px solid #f0b54a88; pointer-events: none; }
.tz-pion { position: absolute; width: 42px; height: 42px; transform: translate(-50%, -125%); border-radius: 50%; object-fit: cover; object-position: center top;
  background: #f6ecd6; border: 3px solid #f0b54a; box-shadow: 0 4px 8px #000a; }
.tz-carte-patient { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 14px; background: #13213fe6; border: 1.5px solid #f0b54a59; }
.tz-carte-patient > img { width: 46px; height: 46px; flex: none; object-fit: cover; object-position: center top; border-radius: 50%; background: #f6ecd6; }
.tz-carte-patient > div { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.tz-carte-patient .tz-rep { margin-left: 0; }
.tz-carte-boutons { display: flex; flex-wrap: wrap; gap: 6px; }
.tz-petit:disabled { opacity: 0.5; }
/* Réunion (jour 6) : les éléments déjà classés */
.tz-tableau { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tz-tableau li { display: flex; flex-direction: column; gap: 3px; padding: 8px 12px; border-radius: 12px; background: #f6ecd6; color: #22262e; border-left: 5px solid #f0b54a; }
.tz-tableau li span { font-size: 0.85rem; font-weight: 800; color: #9a5b12; }
/* Restitution (jour 7) : cinq phrases */
.tz-phrase { border: 1.5px solid #f0b54a40; border-radius: 16px; padding: 10px; margin: 0; display: flex; flex-direction: column; gap: 6px; background: #0c1630b3; }
.tz-phrase legend { font-weight: 800; padding: 0 6px; color: #f0b54a; }
.tz-phrase.faite { border-color: #6ee6c9aa; }
.tz-phrase-texte { margin: 0; padding: 8px 10px; border-radius: 10px; background: #f6ecd6; color: #22262e; font-weight: 600; }
/* Épilogue : le dessin de Meryem, posé comme une feuille */
.tz-dessin { width: 100%; max-width: 380px; align-self: center; border-radius: 6px; transform: rotate(-2deg); box-shadow: 0 12px 28px #000c;
  border: 6px solid #fffaf0; }
.tz-titre-gagne { margin: 0; text-align: center; padding: 10px 12px; border-radius: 14px; background: #f0b54a26; border: 1.5px solid #f0b54a;
  display: flex; align-items: center; justify-content: center; gap: 8px; }
.tz-titre-gagne .ico-img { width: 30px; height: 30px; }

/* ---------- Scène plein écran (Tizi Sefra, style « A · classique » choisi par Walid le 22/11/2026) ---------- */
#scene-plein { position: fixed; inset: 0; z-index: 39; background: #0d1b22 center / cover no-repeat; cursor: pointer; }
#scene-plein::after { content: ''; position: absolute; inset: 0; background: linear-gradient(#0000 45%, #000a); pointer-events: none; }
#scene-plein .sp-perso { position: absolute; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 96px); transform: translateX(-50%);
  height: min(58dvh, 480px); max-width: 96vw; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 8px 14px #000a); z-index: 1; }
#scene-plein .sp-perso.arrive { animation: sp-arrive 0.3s ease-out; }
@keyframes sp-arrive { from { opacity: 0; transform: translate(-50%, 12px); } }
body.scene-plein::after { display: none; }
body.scene-plein .walid-pop { width: min(560px, calc(100% - 24px)); bottom: max(20px, env(safe-area-inset-bottom)); }
body.scene-plein .walid-tete { display: none; }
/* En plein écran, la bulle reste en place d'une réplique à l'autre (pas de rebond ni de sortie) */
body.scene-plein .walid-pop.sort, body.scene-plein .walid-pop.entre { animation: none; }
body.scene-plein .walid-pop.cache { display: block; visibility: visible; }
body.scene-plein .walid-bulle { position: relative; margin: 0; padding: 26px 18px 12px; min-height: 132px; max-height: none; border-radius: 18px;
  border: 4px solid #2b2118; border-image: none; background: #fff8e8; color: #2b2118; box-shadow: 0 6px 0 #2b2118; filter: none !important; overflow: visible; }
body.scene-plein .walid-nom { position: absolute; top: -20px; left: 14px; background: #ffc53d; color: #2b2118 !important; border: 4px solid #2b2118;
  border-radius: 12px; padding: 2px 13px; font-size: 1rem; }
body.scene-plein .walid-nom:empty { display: none; }
body.scene-plein .walid-texte { font-size: 1.12rem; line-height: 1.42; }
body.scene-plein .walid-suite { font-size: 0; color: #c0392b; }
body.scene-plein .walid-suite::after { content: '▼'; font-size: 1.1rem; display: inline-block; animation: sp-suite 0.9s ease-in-out infinite; }
@keyframes sp-suite { 50% { transform: translateY(4px); } }
body.scene-plein .walid-pop.narrateur .walid-texte { font-style: italic; }
@media (prefers-reduced-motion: reduce) { #scene-plein .sp-perso.arrive, body.scene-plein .walid-suite::after { animation: none; } }
body.scene-plein .toast { z-index: 60; } /* les messages du carnet restent visibles pendant une scène plein écran */

/* ---------- Tizi : le tableau d'enquête (carnet en plein écran + déduction sur le liège) ---------- */
.tb-liege { position: relative; border-radius: 14px; padding: 14px 12px 18px; background: #b9692a url(images/tizi/liege.jpg) center / cover;
  border: 6px solid #d9a35e; box-shadow: inset 0 0 0 1px #0004, inset 0 6px 18px #0006, 0 10px 26px #000a; }
.tb-fiche { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px 10px 10px 12px; border: 0; border-radius: 4px;
  font: inherit; color: #2b2a26; background: #f6ead0 url(images/tizi/fiche.jpg) center / cover; box-shadow: 0 3px 7px #0007, 0 1px 0 #fff8 inset;
  transform: rotate(var(--penche, 0deg)); transition: transform 0.18s ease, box-shadow 0.18s ease; border-top: 5px solid var(--bande, #888); }
.tb-fiche.vert { --bande: #2f7d4f; }
.tb-fiche.ambre { --bande: #c77a12; }
.tb-fiche.violet { --bande: #7d3f9a; }
.tb-fiche b { font-size: 0.86rem; line-height: 1.2; font-weight: 800; }
.tb-fiche .tb-texte { font-size: 0.76rem; line-height: 1.3; color: #46423a; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tb-fiche:active { transform: rotate(var(--penche, 0deg)) scale(0.97); }
.tb-punaise { position: absolute; top: -11px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; z-index: 3;
  background: radial-gradient(circle at 35% 30%, #fff9 0 2px, transparent 3px), var(--tete, #d23a3a); box-shadow: 1px 3px 3px #0008, inset -2px -2px 3px #0005; }
.tb-punaise.rouge { --tete: #d23a3a; --img: url(images/tizi/punaise-rouge.png); }
.tb-punaise.bleu { --tete: #2f6fc0; --img: url(images/tizi/punaise-bleu.png); }
.tb-punaise.jaune { --tete: #e6b021; --img: url(images/tizi/punaise-jaune.png); }
/* La vraie punaise peinte (la tête tombe sur le centre du rond, là où s'accroche le fil) */
.tb-punaise::before { content: ''; position: absolute; left: -7.5px; top: -2.5px; width: 26px; height: 32px; background: var(--img) center / contain no-repeat;
  filter: drop-shadow(1px 2px 1px #0007); pointer-events: none; }
.tb-punaise { background: transparent; box-shadow: none; }

/* Le carnet : une scène à part, en plein écran */
.tz-voile.tb-voile { align-items: stretch; background: #1b120ae6; padding: 0; }
.tb-carnet { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; color: #f6ecd6;
  padding: calc(env(safe-area-inset-top) + 12px) 12px calc(env(safe-area-inset-bottom) + 12px); overflow-y: auto; }
.tb-carnet-haut { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tb-carnet-haut h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.tb-carnet-haut h3 .ico-img { width: 28px; height: 28px; }
.tb-carnet-haut small { white-space: nowrap; font-weight: 400; color: #e8cf9f; font-size: 0.8rem; }
.tb-liege-carnet { flex: 1 0 auto; display: flex; flex-direction: column; gap: 12px; }
.tb-ruban { align-self: flex-start; padding: 3px 14px; background: #f2e2b0e6; color: #4a3a1c; font-weight: 800; font-size: 0.8rem;
  transform: rotate(-2deg); box-shadow: 0 2px 4px #0006; clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%); }
.tb-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 12px; }
.tb-grille .tb-fiche { min-height: 104px; }
.tb-fiche .tb-dos { display: none; flex-direction: column; gap: 3px; font-size: 0.74rem; color: #5b5240; border-top: 1px dashed #b49a6a; padding-top: 5px; margin-top: 2px; }
.tb-fiche.ouverte { grid-column: 1 / -1; transform: rotate(0deg) scale(1.02); z-index: 2; box-shadow: 0 10px 24px #000b; }
.tb-fiche.ouverte .tb-texte { -webkit-line-clamp: unset; }
.tb-fiche.ouverte .tb-dos { display: flex; }
.tb-neuf { position: absolute; top: -9px; right: -6px; font-style: normal; font-size: 0.66rem; font-weight: 800; color: #fff; background: #d23a3a;
  padding: 2px 7px; border-radius: 99px; transform: rotate(8deg); box-shadow: 0 2px 4px #0006; }
.tb-tombe { animation: tb-tombe 0.55s cubic-bezier(.2, 1.4, .5, 1) both; animation-delay: var(--delai, 0ms); }
@keyframes tb-tombe { from { opacity: 0; transform: translateY(-46px) rotate(calc(var(--penche, 0deg) - 14deg)) scale(1.15); } }
.tb-vide { margin: 20px 8px; text-align: center; color: #fff4dc; background: #0006; border-radius: 12px; padding: 12px; }
.tb-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin: 0; font-size: 0.74rem; color: #e8dcc0; }
.tb-legende span::before { content: ''; display: inline-block; width: 14px; height: 5px; margin-right: 5px; vertical-align: middle; border-radius: 2px; background: var(--bande); }
.tb-legende .vert { --bande: #2f7d4f; } .tb-legende .ambre { --bande: #c77a12; } .tb-legende .violet { --bande: #a265c0; }

/* La déduction sur le tableau */
.tb-scene { display: flex; flex-direction: column; gap: 10px; }
.tb-consigne { margin: 4px 0 0; text-align: center; color: #f6e7c1; }
.tb-liege-deduction { display: flex; flex-direction: column; gap: 30px; padding-top: 24px; }
.tb-fils { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.tb-case > .tb-fiche, .tb-case > .tb-note, .tb-case > .tb-creux { position: relative; z-index: 2; }
.tb-fils path { fill: none; stroke: #e8372c; stroke-width: 3.6; stroke-linecap: round; filter: drop-shadow(1px 2px 1px #0007); animation: tb-tendre 0.5s ease both; stroke-dasharray: 600; }
.tb-fils path.mou { stroke: #8c8378; stroke-dasharray: 5 5; animation: none; }
@keyframes tb-tendre { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
.tb-case { position: relative; border-radius: 8px; transition: background 0.15s, box-shadow 0.15s; }
.tb-case-h, .tb-case-r { width: min(88%, 330px); margin: 0 auto; }
.tb-args { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tb-case-arg .tb-fiche { width: 100%; min-height: 108px; touch-action: none; }
.tb-creux { width: 100%; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 10px;
  border: 2px dashed #ffe9c2cc; border-radius: 8px; background: #0000002e; color: #fff4dc; font: inherit; text-align: center; }
.tb-case-arg .tb-creux { min-height: 108px; }
.tb-creux b { font-size: 0.86rem; }
.tb-creux small { font-size: 0.72rem; opacity: 0.85; }
.tb-note { position: relative; display: block; width: 100%; padding: 14px 12px 12px; border: 0; border-radius: 3px; font: inherit; font-size: 0.86rem; line-height: 1.3;
  text-align: left; color: #3b2e0c; background: #f9e27a; box-shadow: 0 3px 7px #0007; font-weight: 700; }
.tb-note small { display: block; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #8a6a12; margin-bottom: 2px; }
.tb-case-h .tb-note { transform: rotate(-1.5deg); }
.tb-case-r .tb-note { transform: rotate(1.2deg); background: #bfe3f2; color: #13364a; }
.tb-case-r .tb-note small { color: #2d6380; }
.tb-case.tb-accueille .tb-creux, .tb-case.tb-accueille > .tb-fiche, .tb-case.tb-accueille > .tb-note { box-shadow: 0 0 0 3px #ffe08a, 0 3px 7px #0007; }
.tb-case.tb-survol { background: #ffe08a55; box-shadow: 0 0 0 4px #ffe08a; }
.tb-case.revoir .tb-creux, .tb-case.revoir > .tb-fiche, .tb-case.revoir > .tb-note { outline: 3px solid #ff5d6c; outline-offset: 2px; }
.tb-tampon { position: absolute; right: -4px; bottom: -14px; z-index: 4; padding: 2px 10px; border: 2.5px solid #d3172b; border-radius: 6px; color: #d3172b;
  background: #fff3; font-weight: 900; font-size: 0.78rem; text-transform: uppercase; transform: rotate(-8deg); pointer-events: none; }
.tb-args > .tb-tampon { right: 50%; margin-right: -46px; bottom: -16px; }
.tb-valide { position: absolute; left: 50%; top: 42%; z-index: 5; padding: 6px 22px; border: 5px solid #1f8a4c; border-radius: 10px; color: #1f8a4c;
  background: #ffffffd9; font-size: 1.8rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-12deg) scale(2.4); }
.tb-reussi .tb-valide { animation: tb-tampon 0.45s cubic-bezier(.3, 1.6, .5, 1) 0.1s forwards; }
@keyframes tb-tampon { to { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }
.tb-secoue .tb-case.revoir { animation: tb-secoue 0.5s ease; }
@keyframes tb-secoue { 20%, 60% { transform: translateX(-7px) rotate(-1deg); } 40%, 80% { transform: translateX(7px) rotate(1deg); } }

/* Le tiroir sous le tableau */
.tb-tiroir { border-radius: 14px; padding: 8px 8px 6px; background: #3a2414; border: 2px solid #6b4426; box-shadow: inset 0 4px 10px #0008; }
.tb-onglets { display: flex; gap: 6px; margin-bottom: 8px; }
.tb-onglet { flex: 1; min-height: 40px; padding: 6px 4px; border: 1.5px solid #8a5a32; border-radius: 10px; background: #4d3019; color: #f1dcb6;
  font: inherit; font-size: 0.78rem; font-weight: 800; }
.tb-onglet b { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: #f0b54a; color: #24170a; }
.tb-onglet.actif { background: #f0b54a; color: #24170a; border-color: #ffe0a0; }
.tb-onglet.actif b { background: #24170a; color: #f0b54a; }
.tb-rangee { display: flex; gap: 12px; overflow-x: auto; padding: 10px 4px 12px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.tb-rangee > .tb-fiche, .tb-rangee > .tb-note { flex: 0 0 auto; width: 150px; min-height: 100px; scroll-snap-align: start; touch-action: pan-x; }
.tb-rangee > .tb-note { width: 200px; display: flex; align-items: center; }
.tb-rangee > .tb-note.choisi { outline: 3px solid #f0b54a; outline-offset: 2px; }
.tb-rangee .tb-vide { margin: 4px; flex: 1; font-size: 0.82rem; }
.tb-aide { margin: 0 4px 2px; font-size: 0.74rem; color: #e3c99c; text-align: center; }
.tb-prenable { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tb-prenable.tb-parti { opacity: 0.3; }
.tb-fantome { position: fixed; left: 0; top: 0; z-index: 200; margin: 0; pointer-events: none; box-shadow: 0 16px 30px #000b !important; transition: none; }
body.tb-en-main { -webkit-user-select: none; user-select: none; }
@media (prefers-reduced-motion: reduce) {
  .tb-tombe, .tb-fils path, .tb-secoue .tb-case.revoir { animation: none; }
  .tb-reussi .tb-valide { animation: none; opacity: 1; transform: translate(-50%, -50%) rotate(-12deg); }
}

/* ---------- Défis Beats (campagne Dr Beats, client/beats.js) : moniteur néon façon festival ---------- */
.beats-voile {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: radial-gradient(circle at 50% 0%, rgba(176, 60, 255, 0.35), transparent 60%), rgba(4, 6, 14, 0.94);
}
.beats-boite {
  width: 100%; max-width: 560px; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
  background: #0b0b1a; border: 1px solid rgba(176, 60, 255, 0.5); border-radius: 18px; padding: 16px;
  box-shadow: 0 0 32px rgba(176, 60, 255, 0.35), inset 0 0 24px rgba(61, 255, 176, 0.06);
}
.beats-haut { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: #cfc6ff; }
.beats-quitter { margin-left: 8px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(207, 198, 255, 0.35); background: transparent; color: #cfc6ff; }
.beats-titre { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #ff5fd2; text-shadow: 0 0 10px rgba(255, 95, 210, 0.7); }
.beats-intro { font-size: 1.05rem; margin: 4px 0 0; }
.beats-doux { color: #8f8bb3; font-size: 0.8rem; margin: 0; }
.beats-ecran { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid rgba(61, 255, 176, 0.35); }
.beats-canvas { display: block; width: 100%; height: 170px; }
.beats-fc { position: absolute; top: 6px; right: 10px; color: #3dffb0; font-size: 0.85rem; text-shadow: 0 0 8px #3dffb0; }
.beats-fc b { font-size: 1.2rem; }
.beats-chrono { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.beats-chrono i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #3dffb0, #ff5fd2); transition: width 0.1s linear; }
.beats-chrono i.presse { background: #ff5d6c; }
.beats-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.beats-choix button {
  min-height: 56px; padding: 8px; border-radius: 12px; border: 1px solid rgba(176, 60, 255, 0.45);
  background: #15122b; font-size: 0.92rem; font-weight: 600; line-height: 1.2;
}
.beats-choix button:active { transform: scale(0.97); }
.beats-choix button.bon { background: #0f3b2c; border-color: #3dffb0; box-shadow: 0 0 12px rgba(61, 255, 176, 0.5); }
.beats-choix button.faux { background: #3b1220; border-color: #ff5d6c; }
.beats-choix button:disabled:not(.bon):not(.faux) { opacity: 0.45; }
.beats-verdict { background: #15122b; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.beats-verdict span { color: #cfc6ff; font-size: 0.92rem; }
.beats-go {
  align-self: stretch; min-height: 50px; border: 0; border-radius: 14px; font-weight: 800; font-size: 1.05rem; color: #0b0b1a;
  background: linear-gradient(90deg, #3dffb0, #ff5fd2); box-shadow: 0 0 18px rgba(255, 95, 210, 0.45);
}
.beats-fin { text-align: center; }
.beats-score { font-size: 3rem; font-weight: 900; margin: 8px 0 0; color: #3dffb0; text-shadow: 0 0 16px #3dffb0; }
.beats-score small { font-size: 1.2rem; color: #8f8bb3; }
@media (prefers-reduced-motion: reduce) { .beats-choix button:active { transform: none; } }

/* ---------- Campagne Dr Beats (beats-campagne.js) : accueil des jours, carnet du soir ---------- */
body.beats { background: radial-gradient(circle at 50% -10%, #3a1460 0, #120a24 55%, #07050f 100%) #07050f; }
#beats { width: 100%; max-width: 620px; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.bt-haut { display: flex; align-items: center; gap: 12px; }
.bt-retour { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(176, 60, 255, 0.5); background: #15122b; font-size: 1.2rem; flex: none; }
.bt-sur-titre { color: #3dffb0; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.bt-titre { margin: 2px 0 0; font-size: 1.6rem; color: #ff5fd2; text-shadow: 0 0 14px rgba(255, 95, 210, 0.6); }
.bt-accroche { margin: 0; color: #cfc6ff; }
.bt-prepa { margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(255, 197, 61, 0.12); color: #ffc53d; font-size: 0.85rem; }
.bt-jours { display: flex; flex-direction: column; gap: 10px; }
.bt-jour {
  display: flex; align-items: center; gap: 12px; padding: 12px; min-height: 72px; text-align: left; border-radius: 16px;
  border: 1px solid rgba(176, 60, 255, 0.35); background: #120f24;
}
.bt-jour.ici { border-color: #3dffb0; box-shadow: 0 0 18px rgba(61, 255, 176, 0.35); }
.bt-jour.fini { border-color: rgba(61, 255, 176, 0.5); }
.bt-jour.ferme { opacity: 0.5; }
.bt-jnum { flex: none; padding: 6px 8px; border-radius: 10px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; background: #2a1f4d; color: #cfc6ff; }
.bt-jour.ici .bt-jnum { background: #3dffb0; color: #0b0b1a; }
.bt-jour.fini .bt-jnum { background: #1d6b4f; color: #eafff6; }
.bt-j-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bt-j-txt span { color: #8f8bb3; font-size: 0.85rem; }
.bt-j-droite { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.bt-j-note { font-weight: 800; color: #3dffb0; font-size: 1.2rem; }
.bt-j-note small { color: #8f8bb3; font-size: 0.75rem; }
.bt-j-petit { color: #8f8bb3; font-size: 0.78rem; }
.bt-j-jouer { color: #3dffb0; font-weight: 800; }
.bt-essai { min-height: 50px; border-radius: 14px; border: 1px dashed rgba(255, 95, 210, 0.6); background: transparent; color: #ff5fd2; font-weight: 700; }
.bt-tete { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; font-size: 2rem; background: radial-gradient(circle, var(--c) 0, #120f24 75%); }
.bt-carnet { display: grid; grid-template-columns: 1fr; gap: 10px; }
.bt-carnet > div { background: #f7f2e6; color: #22262e; border-radius: 12px; padding: 12px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); }
.bt-carnet h3 { margin: 0 0 6px; font-size: 1rem; }
.bt-carnet h3 small { font-weight: 400; color: #6a6a6a; }
.bt-carnet ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.bt-carnet li.rumeur { font-style: italic; }
.bt-carnet li.vide { list-style: none; color: #888; }
@media (min-width: 560px) { .bt-carnet { grid-template-columns: 1fr 1fr; } }
