/* Hadya · Jàng sa Diine — fidèle au jeu imprimé, téléphone et ordinateur, thèmes nuit et jour */
:root {
  --fond: #F5EADA; --fond-2: #EEDFC6; --surface: #FFF9EF; --surface-2: #F8E9D1; --ligne: rgba(90, 50, 20, .14);
  --texte: #2A150B; --texte-2: #7A5843; --or: #C88B12; --or-vif: #F2B531; --or-texte: #2A150B;
  --terre: #B9502A; --ok: #3FA34D; --ok-fonce: #2B7F38; --ko: #DE3A2C; --ko-fonce: #A5281D; --main: #F0A12B;
  --ombre: 0 10px 30px rgba(80, 40, 10, .16);
  --carte: #FFFFFF; --carte-texte: #1B1B1D; --carte-2: #6B6B70;
  --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23a0642c' stroke-opacity='.13' stroke-width='1'%3E%3Cpath d='M40 6l9.9 24.1L74 40l-24.1 9.9L40 74l-9.9-24.1L6 40l24.1-9.9z'/%3E%3Crect x='25' y='25' width='30' height='30' transform='rotate(45 40 40)'/%3E%3C/g%3E%3C/svg%3E");
  --r: 18px;
  --f-titre: "Baloo 2", "Readex Pro", system-ui, sans-serif;
  --f-texte: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-carte: "Audiowide", "Baloo 2", sans-serif;
  --f-ar: "Amiri", "Scheherazade New", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="jour"]) {
    --fond: #1A0D07; --fond-2: #26130B; --surface: #2F180D; --surface-2: #3E2012; --ligne: rgba(255, 210, 160, .13);
    --texte: #FFF2E0; --texte-2: #D2B497; --or: #F2B531; --or-vif: #FFC94D;
    --ombre: 0 12px 34px rgba(0, 0, 0, .45);
    --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffc27a' stroke-opacity='.05' stroke-width='1'%3E%3Cpath d='M40 6l9.9 24.1L74 40l-24.1 9.9L40 74l-9.9-24.1L6 40l24.1-9.9z'/%3E%3Crect x='25' y='25' width='30' height='30' transform='rotate(45 40 40)'/%3E%3C/g%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme="nuit"] {
  --fond: #1A0D07; --fond-2: #26130B; --surface: #2F180D; --surface-2: #3E2012; --ligne: rgba(255, 210, 160, .13);
  --texte: #FFF2E0; --texte-2: #D2B497; --or: #F2B531; --or-vif: #FFC94D;
  --ombre: 0 12px 34px rgba(0, 0, 0, .45);
  --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffc27a' stroke-opacity='.05' stroke-width='1'%3E%3Cpath d='M40 6l9.9 24.1L74 40l-24.1 9.9L40 74l-9.9-24.1L6 40l24.1-9.9z'/%3E%3Crect x='25' y='25' width='30' height='30' transform='rotate(45 40 40)'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body { margin: 0; min-height: 100%; background: var(--fond) var(--motif); color: var(--texte); font: 16px/1.5 var(--f-texte); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--f-titre); line-height: 1.15; margin: 0; }
#app { min-height: 100dvh; }
.ecran { max-width: 560px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); min-height: 100dvh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
.fa-solid { line-height: 1; }
.ok { color: var(--ok); } .ko { color: var(--ko); }
.saw { font-family: var(--f-ar); font-size: 1.15em; line-height: 1; font-weight: 400; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 600; background: var(--surface-2); color: var(--texte); transition: transform .12s, filter .15s, background .2s; text-align: center; min-height: 48px; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn small { font-weight: 500; font-size: .8rem; opacity: .85; }
.btn-or { background: var(--or-vif); color: var(--or-texte); box-shadow: 0 4px 0 #A8700A, 0 10px 22px rgba(200, 130, 20, .28); }
.btn-or:active:not(:disabled) { box-shadow: 0 1px 0 #A8700A; transform: translateY(3px); }
.btn-clair { background: var(--surface); border: 1.5px solid var(--ligne); }
.btn-ok { background: var(--ok); color: #fff; box-shadow: 0 4px 0 var(--ok-fonce); }
.btn-ko { background: var(--ko); color: #fff; box-shadow: 0 4px 0 var(--ko-fonce); }
.btn-lien { background: none; color: var(--texte-2); text-decoration: underline; min-height: 40px; }
.btn-lien.danger { color: var(--ko); }
.btn-large { width: 100%; font-size: 1.06rem; padding: 14px 18px; font-family: var(--f-titre); font-weight: 700; }
.btn-grand { width: 100%; justify-content: flex-start; text-align: left; padding: 13px 16px; font-size: 1.04rem; border-radius: var(--r); font-family: var(--f-titre); font-weight: 700; }
.btn-grand > span:last-child { display: flex; flex-direction: column; }
.btn-grand small { font-family: var(--f-texte); font-weight: 400; }
.btn-ico { font-size: 1.25rem; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(255, 255, 255, .3); border-radius: 12px; flex: none; }
.btn-clair .btn-ico { background: var(--surface-2); color: var(--or); }
.btn-pointille { width: 100%; background: none; border: 2px dashed var(--ligne); color: var(--texte-2); }
.btn-icone { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); display: grid; place-items: center; font-size: 1.1rem; flex: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.btn-icone.petit { width: 34px; height: 34px; font-size: .9rem; }
.lien { background: none; border: 0; color: var(--texte-2); padding: 8px 10px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.rangee { display: flex; gap: 10px; flex-wrap: wrap; }
.rangee > .btn { flex: 1 1 140px; }
.aide { color: var(--texte-2); font-size: .9rem; margin: 6px 0; }
.centre { text-align: center; }
.points::after { content: "…"; display: inline-block; width: 1.2em; animation: points 1.2s steps(4) infinite; overflow: hidden; vertical-align: bottom; }
@keyframes points { from { width: 0; } to { width: 1.2em; } }

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 12px; justify-content: center; }
.sigle { width: 60px; height: auto; }
.logo-mot { display: flex; flex-direction: column; line-height: 1; }
.logo-hadya { font-family: var(--f-titre); font-weight: 800; font-size: 3.3rem; letter-spacing: -1px; color: var(--or-vif); text-shadow: 0 3px 0 #8a5a08, 0 6px 14px rgba(0, 0, 0, .3); }
.logo-ar { font-family: var(--f-ar); font-size: 1.5rem; color: var(--texte-2); margin-top: 2px; text-align: right; }

/* ---------- accueil ---------- */
.accueil { position: relative; overflow: hidden; justify-content: space-between; gap: 16px; }
.accueil-decor { position: absolute; left: 50%; bottom: -40vh; width: 120vh; height: 120vh; transform: translateX(-50%); pointer-events: none; opacity: .13; z-index: 0; }
:root[data-theme="jour"] .accueil-decor { opacity: .08; }
@media (prefers-color-scheme: light) { :root:not([data-theme="nuit"]) .accueil-decor { opacity: .08; } }
.accueil-decor .plateau-svg { width: 100%; height: 100%; animation: tourne 160s linear infinite; }
@keyframes tourne { to { transform: rotate(-360deg); } }
.accueil > :not(.accueil-decor):not(.onglets-bas) { position: relative; z-index: 1; }
.accueil-haut { text-align: center; padding-top: 3vh; }
.slogan { font-family: var(--f-titre); font-weight: 700; font-size: 1.6rem; margin: 8px 0 0; }
.sous-slogan { margin: 0; color: var(--texte-2); }
.eventail { display: flex; justify-content: center; margin: 18px 0 4px; height: 120px; }
.eventail .dos { width: 78px; height: auto; margin: 0 -12px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .35)); transition: transform .3s; }
.eventail .dos:nth-child(1) { transform: rotate(-14deg) translateY(10px); }
.eventail .dos:nth-child(2) { transform: translateY(-4px); z-index: 1; }
.eventail .dos:nth-child(3) { transform: rotate(14deg) translateY(10px); }
.accueil-actions { display: flex; flex-direction: column; gap: 11px; }
.accueil-bas { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.credit { text-align: center; font-size: .78rem; color: var(--texte-2); margin: 0; opacity: .8; }

/* ---------- dos de carte ---------- */
.dos-marque { font: 700 6.5px "Baloo 2", sans-serif; fill: #2a2a2a; }
.dos-niveau { font: 700 15px "Oswald", "Baloo 2", sans-serif; letter-spacing: .2px; }
.dos-titre { font: 700 6.4px "Readex Pro", sans-serif; fill: #1d2b3a; }
.dos-sens { font: italic 600 6.5px "Readex Pro", serif; }

/* ---------- formulaires et blocs ---------- */
.barre { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; margin-bottom: 14px; position: sticky; top: 0; z-index: 5; padding: 6px 0; background: var(--fond); }
.barre h1 { text-align: center; font-size: 1.3rem; }
.bloc { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r); padding: 16px; margin-bottom: 14px; box-shadow: var(--ombre); }
.bloc h2 { font-size: 1.08rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.bloc h2 .fa-solid { color: var(--or); font-size: .95rem; }
.optionnel { font: 500 .75rem var(--f-texte); color: var(--texte-2); background: var(--surface-2); padding: 1px 8px; border-radius: 10px; }
.bas-fixe { position: sticky; bottom: 0; padding: 12px 0 max(6px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--fond) 70%, transparent); margin-top: auto; z-index: 4; }
.champ { width: 100%; border: 1.5px solid var(--ligne); background: var(--fond); border-radius: 12px; padding: 12px 14px; min-height: 48px; outline: none; }
.champ:focus { border-color: var(--or); box-shadow: 0 0 0 3px rgba(242, 181, 49, .25); }
.champ.code { text-align: center; font-family: var(--f-titre); font-weight: 800; font-size: 2rem; letter-spacing: .4em; text-transform: uppercase; margin-bottom: 12px; }
.joueur-ligne { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pion-choix { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff; flex: none;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .85) 0 12%, transparent 30%), radial-gradient(circle, var(--c) 0 38%, color-mix(in srgb, var(--c) 75%, #fff) 40% 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .25), inset 0 0 0 2px color-mix(in srgb, var(--c) 70%, #000); }
.pion-choix.petit { width: 38px; height: 38px; }
.pion-choix.actif { outline: 3px solid var(--or-vif); outline-offset: 2px; }
.pion-choix:disabled { opacity: .25; }
.juge-ico { display: grid; place-items: center; background: var(--surface-2); color: var(--or); font-size: 1.2rem; box-shadow: none; border-color: var(--ligne); }
.pion-ico { display: inline-block; width: 18px; height: 18px; border-radius: 50%; flex: none; vertical-align: -3px; border: 2px solid #fff;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .9) 0 12%, transparent 32%), radial-gradient(circle, var(--c) 0 40%, color-mix(in srgb, var(--c) 72%, #fff) 44% 100%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.pion-ico.moyen { width: 28px; height: 28px; }
.pion-ico.grand { width: 46px; height: 46px; border-width: 3px; }
.juge-mini { width: 22px; height: 22px; display: grid; place-items: center; color: var(--or); }
/* Pièce Hayda (pièces imprimées en 3D, cuivrées, sigle en relief) */
.hayda { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hayda::before { content: ""; width: 15px; height: 15px; border-radius: 50%; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 6.5h1.6v8H6zM12.4 6.5H14v8h-1.6zM8.3 5h3.4v3.6H8.3zM8.3 11h3.4v3.5H8.3z' fill='%237a4a1e' opacity='.75'/%3E%3C/svg%3E") center/80% no-repeat, radial-gradient(circle at 35% 30%, #f6c79a, #c98352 55%, #8f5427);
  box-shadow: inset 0 0 0 1.5px rgba(122, 74, 30, .55), 0 1px 2px rgba(0, 0, 0, .3); }

.segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.segments.mini { grid-auto-columns: auto; }
.segment { border: 1.5px solid var(--ligne); background: var(--fond); border-radius: 12px; padding: 10px 8px; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.2; }
.segment small { color: var(--texte-2); font-size: .72rem; text-align: center; }
.segment.actif { border-color: var(--or); background: rgba(242, 181, 49, .16); box-shadow: inset 0 0 0 1px var(--or); }
.ligne-reglage { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.choix-regle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.regle-carte { border: 2px solid var(--ligne); background: var(--fond); border-radius: 16px; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.regle-carte b { font-family: var(--f-titre); font-size: 1.04rem; }
.regle-carte small { color: var(--texte-2); font-size: .8rem; }
.regle-ico { font-size: 1.5rem; color: var(--or); margin-bottom: 4px; }
.regle-carte.actif { border-color: var(--or); background: rgba(242, 181, 49, .14); }
.options-plus { margin-top: 12px; display: flex; flex-direction: column; }
.interrupteur { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--ligne); }
.interrupteur:last-child { border-bottom: 0; }
.interrupteur input { position: absolute; opacity: 0; pointer-events: none; }
.interrupteur-txt { flex: 1; display: flex; flex-direction: column; }
.interrupteur-txt b .fa-solid { color: var(--or); margin-right: 4px; }
.interrupteur-txt small { color: var(--texte-2); font-size: .82rem; line-height: 1.35; }
.glissiere { width: 48px; height: 28px; border-radius: 20px; background: var(--ligne); position: relative; flex: none; transition: background .2s; }
.glissiere::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: transform .2s; }
.interrupteur input:checked + .interrupteur-txt + .glissiere { background: var(--ok); }
.interrupteur input:checked + .interrupteur-txt + .glissiere::after { transform: translateX(20px); }
.interrupteur input:focus-visible + .interrupteur-txt + .glissiere { outline: 2px solid var(--or); outline-offset: 2px; }

/* =====================================================================
   ÉCRAN DE JEU — téléphone : tout en colonne ; ordinateur : plateau à gauche, panneau à droite
   ===================================================================== */
body[data-ecran="jeu"] { overflow: hidden; }
.jeu { max-width: none; height: 100dvh; min-height: 0; padding: max(8px, env(safe-area-inset-top)) 10px 0; gap: 6px;
  display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto auto;
  grid-template-areas: "haut" "joueurs" "centre" "infos" "dock"; }
.jeu-haut { grid-area: haut; display: flex; align-items: center; gap: 8px; }
.jeu-titre { flex: 1; display: flex; align-items: center; gap: 6px; font: 800 1.15rem var(--f-titre); color: var(--or); }
.mini-sigle .sigle { width: 26px; display: block; }
.vues { display: flex; background: var(--surface); border-radius: 22px; padding: 3px; gap: 2px; box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.vue-btn { width: 40px; height: 36px; border: 0; border-radius: 18px; background: none; color: var(--texte-2); font-size: 1rem; }
.vue-btn.actif { background: var(--or-vif); color: var(--or-texte); }
.joueurs { grid-area: joueurs; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.joueurs::-webkit-scrollbar { display: none; }
.puce-joueur { flex: 1 0 auto; min-width: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  background: var(--surface); border: 2px solid transparent; border-radius: 14px; padding: 5px 10px; transition: border-color .2s, transform .2s; }
.puce-joueur .pion-ico { grid-row: span 2; width: 24px; height: 24px; }
.puce-joueur.actif { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 28%, transparent); }
.puce-joueur.elimine { opacity: .4; filter: grayscale(1); }
.pj-nom { font-weight: 700; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.pj-nom small { font-weight: 400; color: var(--texte-2); }
.pj-infos { display: flex; gap: 8px; align-items: center; font-size: .8rem; }
.pj-niveau { background: var(--n); color: #fff; border-radius: 6px; min-width: 20px; padding: 0 5px; text-align: center; font-weight: 700; font-size: .72rem; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.jeu-centre { grid-area: centre; min-height: 0; display: flex; align-items: center; justify-content: center; container-type: size; position: relative; }
.plateau-boite { width: min(100cqw, 100cqh, 860px); aspect-ratio: 1; }
.plateau-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.jeu[data-vue="zoom"] .plateau-svg { overflow: hidden; border-radius: 24px; }
.jeu[data-vue="scores"] .plateau-boite { display: none; }
.scores { display: none; width: 100%; max-width: 560px; max-height: 100%; overflow-y: auto; }
.jeu[data-vue="scores"] .scores { display: block; }
.kaaba-txt { font: 700 13px var(--f-titre); fill: #3a2a1c; letter-spacing: 2px; }
.pion { transition: transform .35s cubic-bezier(.3, .7, .4, 1); }
.pion.elimine { opacity: .25; }
.pion.en-mouvement { filter: drop-shadow(0 10px 6px rgba(0, 0, 0, .35)); }
.halo { fill: none; stroke-width: 5; animation: halo 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 0%, 100% { opacity: .9; transform: scale(1); } 50% { opacity: .3; transform: scale(1.25); } }
.infos-plateau { grid-area: infos; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .84rem; color: var(--texte-2); padding: 0 4px; }
.banque, .juge-puce { white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.banque b, .juge-puce b { color: var(--texte); }
.juge-puce .fa-solid, .banque .fa-solid { color: var(--or); }

/* classement en direct */
.classement-live { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.classement-live li { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px 14px; border: 1px solid var(--ligne); box-shadow: var(--ombre); }
.classement-live li.elimine { opacity: .45; }
.rang { font: 800 1.4rem var(--f-titre); color: var(--or); width: 22px; text-align: center; }
.cl-centre { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cl-ligne { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; }
.cl-ligne span { color: var(--texte-2); }
.cl-ligne.petit { font-size: .8rem; }
.barre-niveaux { display: flex; gap: 2px; height: 10px; border-radius: 6px; overflow: hidden; }
.seg { background: color-mix(in srgb, var(--n) 25%, var(--fond)); position: relative; }
.seg i { position: absolute; inset: 0 auto 0 0; background: var(--n); }

/* dock */
.dock { grid-area: dock; background: var(--surface); border-radius: 22px 22px 0 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0, 0, 0, .16); border: 1px solid var(--ligne); border-bottom: 0; }
.dock-tour { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.dock-qui { display: flex; flex-direction: column; gap: 3px; font-size: 1.04rem; min-width: 0; }
.dock-qui .qui-ligne { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.dock-qui small { color: var(--texte-2); font-size: .82rem; }
.choix-libre { color: var(--or) !important; font-weight: 600; }
.dock-attente { text-align: center; color: var(--texte-2); padding: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.paquet { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.paquet .dos { width: 82px; height: auto; filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .18)) drop-shadow(6px 6px 0 rgba(0, 0, 0, .1)) drop-shadow(0 10px 14px rgba(0, 0, 0, .3)); animation: respire 2.6s ease-in-out infinite; }
.paquet-txt { font: 700 .9rem var(--f-titre); color: var(--or); display: flex; gap: 5px; align-items: center; }
.paquet:active .dos { transform: scale(.95) rotate(-3deg); }
@keyframes respire { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4px) rotate(1deg); } }
.themes-grille { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dock .themes-grille { width: 56%; }
.theme-btn { border: 1.5px solid var(--ligne); background: var(--fond); border-radius: 14px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-weight: 600; font-size: .8rem; }
.theme-btn .fa-solid { font-size: 1.3rem; color: var(--or); }
.theme-btn.actif { border-color: var(--or); background: rgba(242, 181, 49, .16); }
.dock-evenement { text-align: center; }
.dock-evenement p { margin: 6px 0 12px; }
.ev-titre { font-family: var(--f-titre); font-weight: 800; font-size: 1.2rem; display: flex; gap: 8px; align-items: center; justify-content: center; }
.ev-titre .fa-solid { color: var(--or); }
.dock-ordre { max-height: 58dvh; overflow-y: auto; }
.dock-ordre h2 { font-size: 1.2rem; text-align: center; display: flex; gap: 8px; justify-content: center; align-items: center; }
.dock-ordre h2 .fa-solid { color: var(--or); }
.ordre-ligne { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ligne); flex-wrap: wrap; }
.ordre-ligne.col .chiffres { width: 100%; }
.on-nom { font-weight: 700; flex: 1; }
.chiffres { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.chiffre { aspect-ratio: 1; max-height: 46px; border-radius: 10px; border: 1.5px solid var(--ligne); background: var(--fond); font: 800 1.1rem var(--f-titre); }
.chiffre.actif { background: var(--or-vif); color: var(--or-texte); border-color: var(--or); }
.chiffre:disabled:not(.actif) { opacity: .3; }
.compteur { display: flex; align-items: center; gap: 8px; }
.compteur b { min-width: 26px; text-align: center; font-size: 1.2rem; }
.secret { text-align: center; margin: 8px 0; }
.secret b { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; margin-left: 6px; font: 800 1.5rem var(--f-titre); color: #5b3413;
  background: radial-gradient(circle at 35% 30%, #f6c79a, #c98352 55%, #8f5427); box-shadow: inset 0 0 0 3px rgba(122, 74, 30, .5); animation: retourne .6s ease-out; }
@keyframes retourne { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
.ordre-liste { padding-left: 24px; margin: 10px 0 14px; display: flex; flex-direction: column; gap: 8px; font-weight: 700; }
.ordre-liste small { font-weight: 400; color: var(--texte-2); margin-left: 6px; }

/* =====================================================================
   LA CARTE — copie de la carte imprimée
   ===================================================================== */
.feuille { position: fixed; inset: 0; z-index: 30; background: rgba(15, 6, 2, .6); backdrop-filter: blur(3px); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; padding: max(10px, env(safe-area-inset-top)) 10px 0; }
.feuille.entree .feuille-boite { animation: tire .42s cubic-bezier(.2, .9, .3, 1.12); }
.feuille.sortie { opacity: 0; transition: opacity .2s; }
@keyframes tire { from { transform: translateY(80px) rotate(-4deg) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
/* La carte défile, les boutons restent fixes en bas */
.feuille-boite { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 10px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); margin-top: auto; max-height: 100%; min-height: 0; }
.feuille-boite > .qui, .feuille-actions { flex: none; }
.feuille .carte-zone { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
.feuille .carte { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: linear-gradient(to left, var(--n) 40px, var(--carte) 40px) local; }
.feuille .carte .carte-bande { bottom: auto; height: 60px; background: none; }
.feuille-boite.compacte { max-height: 52dvh; overflow: hidden; background: var(--fond); border-radius: 22px 22px 0 0; padding: 12px 12px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0, 0, 0, .35); }
.feuille:has(.compacte) { background: transparent; backdrop-filter: none; pointer-events: none; }
.feuille:has(.compacte) .feuille-boite { pointer-events: auto; }
.feuille-boite.seule { margin: 0 auto; }
.qui { align-self: center; background: var(--surface); color: var(--texte); border-radius: 30px; padding: 8px 16px; display: flex; align-items: center; gap: 8px; font-size: .94rem; box-shadow: var(--ombre); border: 2px solid var(--c, var(--ligne)); flex-wrap: wrap; justify-content: center; }
.qui small { color: var(--texte-2); }
.qui .fa-gavel, .qui .fa-rotate, .qui .fa-bolt { color: var(--or); }
.qui.duel { border-color: var(--ko); }
.vs { font-family: var(--f-titre); font-weight: 800; color: var(--ko); }
.feuille-actions { display: flex; flex-direction: column; gap: 10px; }
.feuille .aide { text-align: center; color: #f1dcc6; }
.compacte .aide, .entrainement .aide { color: var(--texte-2); }

.carte { position: relative; background: var(--carte); color: var(--carte-texte); border-radius: 18px; padding: 16px 58px 16px 18px; box-shadow: 0 2px 0 #e6e6e6, 0 20px 44px rgba(0, 0, 0, .38); overflow: hidden; }
.carte-bande { position: absolute; top: 0; right: 0; bottom: 0; width: 40px; background: var(--n); }
.carte-num { display: block; text-align: center; margin-top: 16px; color: #fff; font: 600 .95rem var(--f-carte); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.carte-tete { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.carte-sigle { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.carte-sigle .sigle { width: 40px; }
.carte-sigle small { font: 700 .62rem "Baloo 2", sans-serif; color: #444; }
.carte-titre { font: 400 1.6rem var(--f-carte); color: #1b1b1d; letter-spacing: .5px; flex: 1; margin: 0; }
.carte-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .74rem; color: var(--carte-2); margin-bottom: 8px; }
.carte-meta .fa-solid { color: #9a9aa0; }
.carte-meta .tag { color: var(--terre); font-weight: 700; }
.carte-meta .tag .fa-solid { color: var(--terre); }
.carte-q { font-size: 1.12rem; font-weight: 700; line-height: 1.4; margin: 2px 0 12px; }
.ar { font-family: var(--f-ar); font-size: 1.45rem; line-height: 1.9; text-align: center; margin: 8px 0; color: #1b1b1d; }
.ar.grand { font-size: 2.6rem; margin: 2px 0 10px; }

/* sablier orange posé à côté de la carte */
.carte-zone { position: relative; }
.sablier-objet { position: absolute; z-index: 2; right: 1px; top: 40px; width: 38px; display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.sablier-objet svg { width: 38px; height: 68px; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .35)); animation: retourne-sablier .7s cubic-bezier(.3, .8, .3, 1.2); }
.sablier-objet span { font: 800 .82rem var(--f-titre); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.sablier-objet.urgent svg { animation: tremble .5s infinite; }
.sablier-objet.urgent span { color: #ffd2cc; }
.filet { stroke-dasharray: 2 2; animation: sable .35s linear infinite; }
@keyframes sable { to { stroke-dashoffset: -4; } }
@keyframes retourne-sablier { from { transform: rotate(180deg); } to { transform: rotate(0); } }
.sablier { display: flex; align-items: center; gap: 4px; flex: none; }
.sablier svg { width: 30px; height: 48px; }
.sablier span { font: 800 1.15rem var(--f-titre); color: #1b1b1d; min-width: 24px; }
.sablier.urgent span { color: var(--ko); }
.sablier.urgent svg { animation: tremble .5s infinite; }
@keyframes tremble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }

/* choix : rond vide, puis coche verte ou croix rouge comme sur la carte imprimée */
.choix-liste { display: flex; flex-direction: column; gap: 7px; }
.choix { display: flex; align-items: center; gap: 10px; text-align: left; border: 1.5px solid #ececef; background: #fff; color: #1b1b1d; border-radius: 12px; padding: 10px 12px; min-height: 50px; font-weight: 600; transition: transform .1s, background .2s, border-color .2s; }
.choix:not(:disabled):hover { border-color: var(--n); }
.choix:active:not(:disabled) { transform: scale(.98); }
.marque { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c8c8cc; flex: none; display: grid; place-items: center; font: 900 .8rem "Font Awesome 6 Free"; color: #fff; }
.choix-txt { flex: 1; }
.choix:disabled { cursor: default; }
.choix.retire { opacity: .25; text-decoration: line-through; }
.choix.bonne { background: #eef8ef; border-color: var(--ok); }
.choix.bonne .marque { background: var(--ok); border-color: var(--ok); }
.choix.bonne .marque::after { content: "\f00c"; }
.choix.mauvaise { background: #fdeceb; border-color: var(--ko); }
.choix.mauvaise .marque, .choix.fausse .marque { border: 0; color: var(--ko); font-size: 1.05rem; }
.choix.mauvaise .marque::after, .choix.fausse .marque::after { content: "\f00d"; }
.choix.fausse { opacity: .7; }
.choix.indice { border-color: var(--ok); border-style: dashed; }
.choix-caches { background: #f6f6f8; border: 1.5px dashed #d9d9de; border-radius: 12px; padding: 14px; text-align: center; color: #5d5d63; font-size: .93rem; }
.choix-caches .fa-solid { color: var(--terre); margin-right: 4px; }

.carte-reponse { margin-top: 10px; padding-top: 4px; position: relative; animation: apparait .35s ease-out; }
@keyframes apparait { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.carte-reponse .carte-titre { display: block; text-align: center; font-size: 1.4rem; margin-bottom: 8px; }
.carte-reponse.floue .rep-contenu { filter: blur(9px); user-select: none; pointer-events: none; }
.voir-reponse { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); border: 0; background: #1b1b1d; color: #fff; border-radius: 24px; padding: 10px 18px; font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.rep-intro { margin: 0 0 6px; font-weight: 600; }
.rep-bonne { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 4px 0; }
.rep-bonne .fa-solid { font-size: 1.15rem; }
.rep-liste, .rep-mains { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.item { width: 100%; display: flex; align-items: flex-start; gap: 8px; text-align: left; border: 0; background: transparent; color: #1b1b1d; border-radius: 10px; padding: 5px 6px; font-size: .96rem; font-weight: 500; }
.item:not(:disabled) { background: #f6f6f8; cursor: pointer; }
.item:disabled { cursor: default; }
.item .num { font-weight: 700; min-width: 14px; font-size: .85rem; margin-top: 2px; }
.coche-ico { width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: .65rem; flex: none; margin-top: 1px; }
.item:not(:disabled) .coche-ico { background: #fff; color: transparent; border: 2px solid #c8c8cc; }
.item.coche:not(:disabled) { background: #eef8ef; }
.item.coche:not(:disabled) .coche-ico { background: var(--ok); color: #fff; border-color: var(--ok); }
.main-ico { color: var(--main); font-size: 1rem; margin-top: 3px; }
.item.main.coche:not(:disabled) { background: #fff4e3; }
.explication { font-style: italic; font-size: .9rem; color: #2d2d30; margin: 8px 0 0; font-weight: 700; }

/* pastilles de gain, en forme de repère comme sur la carte */
.carte-gains { display: flex; justify-content: space-around; gap: 10px; margin-top: 16px; padding-bottom: 10px; }
.pin { display: flex; align-items: center; position: relative; }
.pin-rond { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.3rem; border: 3px solid #fff; box-shadow: 0 0 0 3px var(--pc), 0 3px 6px rgba(0, 0, 0, .25); background: var(--pc); position: relative; z-index: 1; }
.pin-rond::after { content: ""; position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); border: 8px solid transparent; border-top: 10px solid var(--pc); border-bottom: 0; }
.pin-txt { background: var(--pc); color: #fff; margin-left: -10px; padding: 5px 12px 5px 16px; border-radius: 0 8px 8px 0; font: 700 .72rem/1.15 var(--f-titre); }
.pin-txt b { font-size: 1.05rem; margin-right: 2px; }
.pin.ok { --pc: var(--ok); } .pin.ko { --pc: var(--ko); }

.jokers { display: flex; gap: 8px; justify-content: center; }
.joker { border: 0; background: var(--surface); color: var(--texte); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .74rem; font-weight: 600; min-width: 76px; box-shadow: var(--ombre); }
.joker .fa-solid { font-size: 1.1rem; color: var(--or); }
.joker:disabled { opacity: .35; }
.bandeau { border-radius: 14px; padding: 12px 14px; font-weight: 700; text-align: center; color: #fff; animation: apparait .3s; }
.bandeau.ok { background: var(--ok); } .bandeau.ko { background: var(--ko); }
.rebond { background: var(--surface); border-radius: 16px; padding: 14px; text-align: center; color: var(--texte); }
.rebond p { margin: 4px 0 10px; }
.verdict .btn { font-size: 1.05rem; }

/* carte réduite pendant le résultat (on voit le pion avancer) */
.carte.reduite { padding: 10px 50px 10px 14px; }
.carte.reduite .carte-tete { margin-bottom: 2px; }
.carte.reduite .carte-sigle .sigle { width: 26px; }
.carte.reduite .carte-sigle small { display: none; }
.carte.reduite .carte-titre { font-size: 1.05rem; }
.carte.reduite .carte-meta { display: none; }
.carte.reduite .carte-q { font-size: .94rem; margin: 2px 0 4px; }
.carte.reduite .carte-reponse { margin-top: 2px; }
.carte.reduite .carte-reponse .carte-titre { display: none; }
.carte.reduite .ar { font-size: 1.2rem; line-height: 1.7; margin: 4px 0; }
.carte.reduite .carte-bande { width: 34px; }

/* ---------- menu / voile ---------- */
.voile { position: fixed; inset: 0; z-index: 50; background: rgba(15, 6, 2, .6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: apparait .2s; }
.menu-boite { width: 100%; max-width: 420px; max-height: 88dvh; overflow-y: auto; background: var(--surface); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--ombre); }
.menu-boite h2 { text-align: center; font-size: 1.25rem; margin-bottom: 4px; display: flex; gap: 8px; justify-content: center; align-items: center; }
.menu-boite h2 .fa-solid, .menu-boite .btn-clair .fa-solid { color: var(--or); }
.menu-info { text-align: center; color: var(--texte-2); font-size: .8rem; margin: 4px 0 0; }
/* journal : une vraie page qui défile */
.menu-boite.journal { height: min(86dvh, 720px); overflow: hidden; padding-bottom: 16px; }
.journal-tete { text-align: center; flex: none; }
.journal-tete small { color: var(--texte-2); }
.journal-liste { list-style: none; padding: 0 4px 0 0; margin: 0; font-size: .92rem; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.journal-liste li { display: flex; gap: 10px; align-items: flex-start; background: var(--fond); border-radius: 12px; padding: 10px 12px; flex: none; }
.journal-liste li .fa-solid { margin-top: 3px; flex: none; }
.journal-liste li.ok .fa-solid { color: var(--ok); } .journal-liste li.ko .fa-solid { color: var(--ko); }
.journal-liste li.or .fa-solid { color: var(--or); } .journal-liste li.neutre .fa-solid { color: var(--texte-2); }
.menu-boite.journal .btn { flex: none; }
.formulaire label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--texte-2); flex: 1; }
.formulaire input, .formulaire select, .formulaire textarea { border: 1.5px solid var(--ligne); background: var(--fond); border-radius: 10px; padding: 9px 10px; color: var(--texte); }

/* ---------- fin ---------- */
.fin { text-align: center; justify-content: center; gap: 14px; position: relative; }
#confettis { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; }
.fin-raison { color: var(--texte-2); margin: 0; }
.fin-raison .fa-solid { color: var(--or); }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-top: 14px; }
.marche { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 30%; animation: tire .6s backwards; }
.marche.m1 { order: 2; animation-delay: .5s; } .marche.m2 { order: 1; animation-delay: .25s; } .marche.m3 { order: 3; }
.podium-pion { position: relative; }
.couronne { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); font-size: 1.3rem; color: var(--or-vif); animation: respire 2s infinite; }
.socle { width: 100%; background: var(--surface-2); border-radius: 12px 12px 0 0; display: grid; place-items: center; font: 800 1.8rem var(--f-titre); color: var(--or); box-shadow: var(--ombre); }
.m1 .socle { height: 110px; background: var(--or-vif); color: var(--or-texte); }
.m2 .socle { height: 80px; } .m3 .socle { height: 58px; }
.fin-titre { font-size: 2.1rem; color: var(--or); }
.fin-titre small { display: block; font-size: 1rem; color: var(--texte-2); font-family: var(--f-texte); font-weight: 500; }
.classement { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.classement li { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px; padding: 10px 14px; border: 1px solid var(--ligne); }
.cl-nom { flex: 1; font-weight: 700; display: flex; flex-direction: column; }
.cl-nom small, .cl-stats { font-weight: 400; color: var(--texte-2); font-size: .8rem; }
.cl-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.fin-actions { margin-top: 6px; }

/* ---------- entraînement ---------- */
.entrainement { gap: 12px; }
.score-entr { display: flex; justify-content: center; gap: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.score-entr .fa-fire, .score-entr .fa-layer-group { color: var(--or); }
.serie.chaud { color: var(--terre); animation: respire 1.2s infinite; }
.niveaux-grille { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.niveau-btn { border: 2px solid var(--ligne); background: var(--fond); border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; }
.niveau-btn b { font: 800 1.4rem var(--f-titre); color: var(--n, var(--or)); }
.niveau-btn small { font-size: .7rem; color: var(--texte-2); }
.niveau-btn.actif { border-color: var(--or); background: rgba(242, 181, 49, .16); }

/* ---------- textes ---------- */
.texte .chapeau { font-size: 1.02rem; color: var(--texte-2); margin: 0 0 14px; }
.regle { background: var(--surface); border-radius: var(--r); padding: 18px; border: 1px solid var(--ligne); }
.regle h2 { font-size: 1.15rem; margin: 18px 0 8px; color: var(--or); display: flex; gap: 8px; align-items: center; }
.regle ul { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.onglets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 12px; position: sticky; top: 56px; z-index: 4; }
.onglet { border: 0; border-radius: 12px; padding: 10px 0; background: var(--n); color: #fff; font: 800 1.1rem var(--f-titre); opacity: .45; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.onglet.actif { opacity: 1; box-shadow: 0 0 0 3px var(--fond), 0 0 0 5px var(--n); }
.cartes-liste { display: flex; flex-direction: column; gap: 10px; }
.mini-carte { background: var(--carte); color: var(--carte-texte); border-radius: 16px; padding: 12px 14px; border-right: 12px solid var(--n); box-shadow: var(--ombre); }
.mc-haut { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--carte-2); }
.mc-num { font: 600 .95rem var(--f-carte); color: #1b1b1d; }
.mc-theme { flex: 1; }
.badge { background: #efe4d2; border-radius: 6px; padding: 1px 6px; }
.mc-q { font-weight: 700; margin: 6px 0; }
.mc-r { font-size: .88rem; color: #3a3a3e; margin: 0 0 6px; }
.mc-alerte { font-size: .8rem; background: #fff3d6; color: #6b4a00; border-radius: 8px; padding: 6px 8px; margin: 0 0 6px; }
.mc-gains { display: flex; gap: 10px; font-size: .78rem; font-weight: 700; align-items: center; }
.vide { text-align: center; color: var(--texte-2); padding: 20px; }
.outils-cartes { margin: 16px 0; }
.outils-cartes label.btn { cursor: pointer; }
.a-propos { text-align: center; }
.a-propos .logo-hadya { font-size: 2.3rem; }
.grand-ico { font-size: 2.6rem; color: var(--or); }
.separateur { display: flex; align-items: center; gap: 10px; color: var(--texte-2); margin: 2px 0 14px; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--ligne); }
.code-geant { display: flex; justify-content: center; gap: 6px; margin: 6px 0 14px; }
.code-geant span { width: 50px; height: 62px; display: grid; place-items: center; background: var(--fond); border: 2px solid var(--or); border-radius: 12px; font: 800 2rem var(--f-titre); color: var(--or); }
.salle-joueurs { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.salle-joueurs li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.salle-joueurs li > span:not(.pion-ico):not(.juge-mini) { flex: 1; }
.salle-joueurs small { color: var(--texte-2); font-weight: 400; }
.presence { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 163, 77, .2); }
.presence.hors { background: var(--texte-2); box-shadow: none; }
.couleurs-salle { display: flex; gap: 10px; justify-content: center; }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--surface); color: var(--texte); border-radius: 14px; padding: 12px 16px; box-shadow: var(--ombre); font-weight: 600; text-align: center; animation: apparait .25s; border-left: 5px solid var(--or); }
.toast.ok { border-color: var(--ok); } .toast.ko { border-color: var(--ko); }
.toast.sortie { opacity: 0; transform: translateY(-8px); transition: .4s; }

/* =====================================================================
   ORDINATEUR ET TABLETTE EN PAYSAGE
   ===================================================================== */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .sablier-objet { right: -118px; top: 30px; width: 92px; }
  .sablier-objet svg { width: 92px; height: 166px; }
  .sablier-objet span { font-size: 1.3rem; }
  .jeu { padding: 16px 20px; gap: 14px; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto auto 1fr auto;
    grid-template-areas: "haut haut" "centre joueurs" "centre dock" "centre infos"; }
  .jeu-titre { font-size: 1.4rem; }
  .joueurs { flex-direction: column; overflow: visible; }
  .puce-joueur { padding: 10px 14px; }
  .pj-nom { max-width: none; font-size: 1rem; }
  .dock { border-radius: 22px; border-bottom: 1px solid var(--ligne); align-self: start; padding: 18px; }
  .dock-tour { flex-direction: column; text-align: center; gap: 16px; }
  .dock-qui { align-items: center; }
  .dock .themes-grille { width: 100%; }
  .paquet .dos { width: 120px; }
  .infos-plateau { flex-direction: column; align-items: flex-start; }
  .scores { max-width: 720px; }
  .feuille { align-items: center; }
  .feuille-boite { max-width: 540px; margin: auto; }
  .feuille-boite.compacte { border-radius: 22px; margin: auto 0 auto auto; max-height: 90dvh; width: 380px; }
  .feuille:has(.compacte) { justify-content: flex-end; padding: 16px 20px; }
  .ecran.config, .ecran.texte, .ecran.entrainement { max-width: 680px; }
  .accueil { max-width: 980px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto auto; align-items: center; column-gap: 48px; }
  .accueil-haut { grid-row: 1; padding: 0; }
  .accueil-actions { grid-row: 1; }
  .accueil-bas, .credit { grid-column: 1 / -1; }
  .eventail { height: 170px; }
  .eventail .dos { width: 110px; }
}
@media (max-height: 640px) { .paquet .dos { width: 66px; } .carte-q { font-size: 1.02rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- bascule de thème ---------- */
.accueil-coin { position: absolute !important; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 3 !important; }
.theme-bascule { color: var(--or); }
.jeu-haut .theme-bascule { width: 40px; height: 40px; }

/* ---------- listes à cocher (réponses sur l'écran) ---------- */
.consigne { margin: 0 0 8px; font-size: .88rem; color: #4a4a50; }
.consigne .fa-solid { color: var(--terre); margin-right: 4px; }
.marque.carre { border-radius: 6px; }
.choix.multi.coche { border-color: #1b1b1d; background: #f4f4f6; }
.choix.multi.coche .marque { background: #1b1b1d; border-color: #1b1b1d; }
.choix.multi.coche .marque::after { content: "\f00c"; }
.choix.multi.bonne .marque { background: var(--ok); border-color: var(--ok); }
.choix.multi.mauvaise .marque { background: var(--ko); border: 0; color: #fff; font-size: .8rem; }
.choix.manquee { border: 1.5px dashed var(--ok); background: #f3faf4; }
.choix.manquee .marque { border-color: var(--ok); }
.choix.manquee .marque::after { content: "\f00c"; color: var(--ok); }

.dock.masque { visibility: hidden; }

/* plateau manipulable : on le fait tourner au doigt */
.plateau-svg.manipulable { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.plateau-svg.manipulable:active { cursor: grabbing; }
.vue-btn.rotation.actif { background: none; color: var(--or); box-shadow: inset 0 0 0 2px var(--or); }
.jeu-haut { flex-wrap: nowrap; }

.jeu .plateau-svg.manipulable { overflow: hidden; border-radius: 24px; }

/* bouton qui se remplit avant l'enchaînement automatique */
.btn.auto { position: relative; overflow: hidden; }
.btn.auto::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: rgba(42, 21, 11, .45); transform-origin: left; animation: jauge var(--d, 5000ms) linear forwards; }
@keyframes jauge { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.carte.reduite { background: linear-gradient(to left, var(--n) 34px, var(--carte) 34px) local !important; }

/* installation */
.btn-installer { background: transparent; border: 2px dashed var(--or); color: var(--texte); }
.btn-installer .btn-ico { background: var(--or-vif); color: var(--or-texte); }
/* annuler la dernière réponse */
.annuler-dernier { display: block; margin: 6px auto 0; font-size: .85rem; }
/* salle : QR et partage */
.qr { width: 172px; height: 172px; margin: 4px auto 6px; background: #fff; border-radius: 14px; padding: 8px; box-shadow: var(--ombre); }
.qr svg { width: 100%; height: 100%; display: block; }
.partage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.partage .btn { padding: 10px 6px; font-size: .88rem; min-height: 46px; }
.btn-whatsapp { background: #25D366; color: #fff; text-decoration: none; box-shadow: 0 4px 0 #128C7E; }
.bloc.en-avant { border: 2px solid var(--or); }
.petit-lien { padding: 0; font-size: .85rem; text-decoration: underline; color: var(--or); }

/* pause */
.voile-pause { z-index: 60; }
.pause-boite { text-align: center; align-items: center; }
.pause-ico { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; background: var(--or-vif); color: var(--or-texte); box-shadow: 0 6px 0 #A8700A; margin-bottom: 6px; }
.btn-passer { align-self: center; font-weight: 700; text-decoration: none; background: var(--surface); color: var(--texte); border-radius: 24px; padding: 8px 18px; min-height: 40px; box-shadow: var(--ombre); }
.btn-passer .fa-solid { color: var(--or); }
.jeu-haut .bouton-pause { width: 40px; height: 40px; }
.pause-flottante { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; z-index: 31; }

/* en-tête compact sur téléphone : rien ne doit dépasser la largeur de l'écran */
.jeu-titre { min-width: 0; overflow: hidden; }
body[data-ecran="jeu"] { overflow-x: hidden; }
.jeu { max-width: 100vw; overflow-x: hidden; }
@media (max-width: 520px) {
  .jeu-haut { gap: 5px; }
  .jeu-titre span:last-child { display: none; }
  .jeu-haut .btn-icone { width: 36px; height: 36px; font-size: .95rem; }
  .vues { padding: 2px; }
  .vue-btn { width: 34px; height: 32px; font-size: .9rem; }
}

/* entraînement : progression et score */
.compteur-q { background: var(--or-vif); color: var(--or-texte); border-radius: 12px; padding: 0 10px; }
.progression-entr { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: -4px 0 4px; }
.progression-entr i { display: block; height: 100%; background: var(--or-vif); transition: width .4s; }
.score-geant { display: flex; align-items: baseline; justify-content: center; gap: 6px; font-family: var(--f-titre); }
.score-geant b { font-size: 4.2rem; color: var(--or); line-height: 1; }
.score-geant span { font-size: 1.6rem; color: var(--texte-2); }
/* classement */
.mini-ligne { margin-top: 10px; }
.palmares { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.palmares li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--ligne); border-radius: 14px; padding: 10px 14px; }
.palmares li.moi { border: 2px solid var(--or); }
.palmares li.vide { justify-content: center; color: var(--texte-2); }
.pl-nom { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-score { display: flex; flex-direction: column; align-items: flex-end; font-size: .9rem; }
.pl-score b { font: 800 1.3rem var(--f-titre); color: var(--or); }
.pl-score small { color: var(--texte-2); font-size: .75rem; }
.rang-num { width: 26px; text-align: center; font: 800 1.1rem var(--f-titre); color: var(--texte-2); }
.medaille { width: 26px; text-align: center; font-size: 1.3rem; }
.medaille.m1 { color: #E8B923; } .medaille.m2 { color: #A8B0B8; } .medaille.m3 { color: #C47A3A; }

/* ---------- boutons d'action fixés en bas (mobile) ---------- */
.bas-fixe { position: fixed !important; left: 50%; transform: translateX(-50%); bottom: 0; width: min(100%, 560px); margin: 0 !important;
  padding: 14px 16px calc(12px + env(safe-area-inset-bottom)) !important; background: linear-gradient(to top, var(--fond) 78%, transparent) !important; z-index: 20; }
.bas-fixe.rangee { display: flex; gap: 10px; }
.bas-fixe.rangee > .btn { flex: 1 1 0; min-width: 0; }
.ecran:has(.bas-fixe) { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.entrainement .bas-fixe .bandeau { margin-bottom: 0; }
.entrainement:has(.bas-fixe .bandeau) { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
/* ---------- attestation ---------- */
.attestation-boite { margin: 10px auto 14px; width: 100%; max-width: 440px; animation: attest-entree .7s cubic-bezier(.2, .9, .3, 1.15) backwards .2s; }
.attestation-boite canvas { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
@keyframes attest-entree { from { transform: translateY(40px) rotate(-3deg) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.score-geant.anime b { display: inline-block; animation: rebond-score .8s cubic-bezier(.3, 1.6, .5, 1) backwards; }
@keyframes rebond-score { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.titre-attest { text-align: center; font-size: 1.2rem; margin-top: 18px; display: flex; gap: 8px; justify-content: center; align-items: center; }
.titre-attest .fa-solid { color: var(--or); }
.choix-attest { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0 4px; }
.puce-attest { border: 1.5px solid var(--ligne); background: var(--surface); border-radius: 20px; padding: 6px 12px; display: flex; gap: 6px; align-items: center; font-weight: 600; }
.puce-attest.actif { border-color: var(--or); background: rgba(242, 181, 49, .16); }
.fin { justify-content: flex-start; }

/* Paquet virtuel (onglet Cartes) */
.paquet-niveaux { margin: 10px 0; }
.paquet-themes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 18px; }
.paquet-themes .puce { border: 1px solid var(--bord, rgba(200,150,42,.4)); background: transparent; color: inherit; border-radius: 999px; padding: 7px 13px; font: 600 .85rem var(--f-texte, inherit); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.paquet-themes .puce.actif { background: var(--or); border-color: var(--or); color: #1b0f07; }
.paquet-grand { margin: 8px auto 0; }
.paquet-grand .dos { width: 150px; }
.paquet-barre { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; font-weight: 600; opacity: .9; }
.paquet-ecran .carte-zone { margin-bottom: 8px; }

/* ---------- barre d'onglets (capsule flottante, « Jouer » au centre) ---------- */
.onglets-bas { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
  bottom: max(10px, env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 520px);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 6px 6px 7px; border-radius: 26px;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--or) 30%, transparent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28), 0 2px 0 rgba(255, 255, 255, .05) inset; }
.onglet-bas { position: relative; background: none; border: 0; color: var(--texte-2); display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 0 2px; font: 600 .68rem var(--f-texte); letter-spacing: .01em; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.onglet-ico { width: 46px; height: 32px; border-radius: 16px; display: grid; place-items: center; font-size: 1.12rem; transition: background .25s, color .25s, transform .25s; }
.onglet-bas.actif { color: var(--or); }
.onglet-bas.actif .onglet-ico { background: color-mix(in srgb, var(--or-vif) 22%, transparent); transform: translateY(-1px); }
.onglet-bas.actif .onglet-txt { font-weight: 800; }
.onglet-bas:active .onglet-ico, .onglet-bas:active .onglet-rond { transform: scale(.9); }
.onglet-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; color: #fff; background: var(--c); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.onglet-bas.actif .onglet-avatar { box-shadow: 0 0 0 2px var(--or-vif); }
/* Bouton central « Jouer » */
.onglet-bas.centre { color: var(--texte); }
.onglet-rond { width: 58px; height: 58px; margin-top: -30px; border-radius: 50%; display: grid; place-items: center; font-size: 1.45rem;
  color: var(--or-texte); background: var(--or-vif); border: 4px solid var(--surface);
  box-shadow: 0 4px 0 #A8700A, 0 10px 20px rgba(200, 130, 20, .35); transition: transform .2s; }
.onglet-bas.centre.actif .onglet-rond { animation: halo-or 2.4s ease-in-out infinite; }
@keyframes halo-or { 0%, 100% { box-shadow: 0 4px 0 #A8700A, 0 10px 20px rgba(200, 130, 20, .35), 0 0 0 0 rgba(242, 181, 49, .45); } 50% { box-shadow: 0 4px 0 #A8700A, 0 10px 20px rgba(200, 130, 20, .35), 0 0 0 8px rgba(242, 181, 49, 0); } }
.onglet-bas.centre.actif { color: var(--or); }
.ecran.avec-onglets { padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important; }
.accueil.avec-onglets .credit { margin-bottom: 8px; }
@media (min-width: 900px) { .onglets-bas { width: 480px; } }

/* ---------- avatar et profil ---------- */
.avatar { --c: #C8962A; width: 44px; height: 44px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; color: #fff; font-size: 1.1rem;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 70%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .2); border: 2px solid #fff; }
.avatar.petit { width: 36px; height: 36px; font-size: .9rem; }
.avatar.grand { width: 96px; height: 96px; font-size: 2.4rem; border-width: 4px; }
.accueil-coin { left: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.puce-profil { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--ligne); border-radius: 999px; padding: 4px 14px 4px 4px; color: var(--texte); box-shadow: var(--ombre); text-align: left; max-width: 70%; }
.puce-profil span:last-child { display: flex; flex-direction: column; font-weight: 700; font-size: .9rem; line-height: 1.15; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.puce-profil small { font-weight: 500; color: var(--texte-2); font-size: .74rem; }
.profil-tete { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 4px 0 14px; }
.profil-tete h2 { margin: 10px 0 2px; font-size: 1.5rem; }
.profil-titre { margin: 0; color: var(--or); font-weight: 700; }
.profil-titre small { color: var(--texte-2); font-weight: 500; }
.profil-jauge { width: min(100%, 300px); height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin: 10px 0 4px; }
.profil-jauge i { display: block; height: 100%; background: var(--or-vif); border-radius: 6px; transition: width .6s; }
.stats-profil { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stats-profil div { background: var(--surface); border: 1px solid var(--ligne); border-radius: 14px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; }
.stats-profil b { font: 800 1.35rem var(--f-titre); color: var(--or); line-height: 1.1; }
.stats-profil small { color: var(--texte-2); font-size: .74rem; }
.etiquette { display: block; font-weight: 600; font-size: .88rem; margin: 14px 0 6px; }
.etiquette:first-of-type { margin-top: 0; }
.couleurs-profil { display: flex; gap: 14px; }
.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.avatar-choix { aspect-ratio: 1; border-radius: 14px; border: 1.5px solid var(--ligne); background: var(--fond); color: var(--texte-2); font-size: 1.25rem; display: grid; place-items: center; }
.avatar-choix.actif { background: var(--c); color: #fff; border-color: var(--c); box-shadow: 0 0 0 3px rgba(242, 181, 49, .45); }
.liste-points { list-style: none; padding: 0; margin: 0; }
.liste-points li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ligne); }
.liste-points li:last-child { border-bottom: 0; }
.liste-points span { flex: 1; }
.liste-points b { color: var(--or); font-family: var(--f-titre); }
.liste-points .fa-solid { width: 20px; text-align: center; color: var(--or); }
.palmares .pl-nom { display: flex; flex-direction: column; }
.palmares .pl-nom small { color: var(--texte-2); font-size: .76rem; }
.invitation { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; color: var(--texte); border: 2px dashed var(--or); margin-top: 14px; }
.invitation span { flex: 1; display: flex; flex-direction: column; }
.invitation small { color: var(--texte-2); }
.invitation > .fa-solid:first-child { font-size: 1.4rem; color: var(--or); }

/* ---------- réglages ---------- */
.ligne-reglage.colonne { flex-direction: column; align-items: stretch; }
.ligne-reglage.colonne > span { font-weight: 600; display: flex; justify-content: space-between; }
input[type="range"] { width: 100%; accent-color: var(--or-vif); height: 32px; }
.bloc .btn-large + .btn-large, .bloc > .btn-large { margin-top: 12px; }
.accueil-haut { margin-top: 52px; }
.pl-score b + small, .palmares .pl-score { white-space: nowrap; }

/* Bouton d'action au-dessus de la barre d'onglets */
.ecran.avec-onglets .bas-fixe { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 74px); padding: 10px 12px 6px; background: none; width: min(100%, 544px); }
.ecran.avec-onglets:has(.bas-fixe) { padding-bottom: calc(180px + env(safe-area-inset-bottom)) !important; }
.ecran.avec-onglets .bas-fixe .btn-large { box-shadow: 0 4px 0 #A8700A, 0 10px 24px rgba(0, 0, 0, .3); }
.ecran.avec-onglets::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(100px + env(safe-area-inset-bottom)); pointer-events: none; z-index: 3;
  background: linear-gradient(to top, var(--fond) 55%, transparent); }
.ecran.avec-onglets:has(.bas-fixe)::after { height: calc(170px + env(safe-area-inset-bottom)); }
.paquet-mode { margin: 4px 0 12px; } .paquet-mode .segment b { display: flex; gap: 6px; align-items: center; }
.a-propos .affiche { width: 100%; height: auto; border-radius: 14px; display: block; margin: -4px 0 14px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
