/* HUD, indice, faux ecrans systeme, inactivite, effets ponctuels, maitre du jeu. */

/* ---------- HUD ---------- */
.hud-bougie { position: absolute; left: 18px; top: calc(var(--hud-top) + var(--safe-t)); display: flex; align-items: flex-end; gap: 10px; pointer-events: none; animation: fadeIn 1.5s; }
.hud-cierge { position: relative; width: 30px; height: 70px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.hud-cire { position: relative; width: 18px; height: var(--cire, 44px); min-height: 3px; background: linear-gradient(90deg, #b9a98a, #e8dcc0 45%, #9f8f70); border-radius: 3px 3px 1px 1px; transition: height 1s linear; }
.hud-coulure { position: absolute; left: -2px; top: 4px; width: 5px; height: var(--coulure, 0); border-radius: 3px; background: var(--parchemin); transition: height 1s; }
.hud-temps { font-size: 14px; color: rgba(232, 220, 192, .6); letter-spacing: .1em; padding-bottom: 2px; font-variant-numeric: tabular-nums; }
.hud-temps.tard { color: var(--rouge); animation: glow 1s infinite; }
.hud-who { position: absolute; right: 16px; top: calc(var(--hud-top) + var(--safe-t)); display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 30px; border: 1px solid var(--who-bord); background: rgba(10, 10, 14, .7); animation: fadeIn 1.5s; }
.hud-who-icone { width: 30px; height: 30px; }
.hud-who-label { font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: var(--who-couleur); }
.hud-oeil { position: absolute; right: 16px; bottom: calc(16px + var(--safe-b)); width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(232, 220, 192, .18); background: rgba(10, 10, 14, .6); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; z-index: 2; }

/* ---------- Indice ---------- */
.indice { position: absolute; inset: 0; background: rgba(4, 4, 6, .9); display: flex; flex-direction: column; justify-content: flex-end; padding: 36px 24px calc(28px + var(--safe-b)); gap: 18px; animation: fadeIn .4s; z-index: 3; }
.indice-oeil { position: absolute; left: 50%; top: 26%; transform: translate(-50%, -50%); width: 200px; height: 110px; }
.indice-voix { font-family: var(--police-main); font-size: 32px; line-height: 1.2; color: var(--acc); text-wrap: pretty; }
.indice-texte { padding: 16px 18px; border: 1px solid rgba(217, 201, 163, .2); background: rgba(217, 201, 163, .06); font-size: 17px; line-height: 1.5; color: var(--papier); animation: riseIn .8s both; margin: 0; }
.indice-btn { min-height: 58px; border: 1px solid rgba(232, 220, 192, .3); background: transparent; color: var(--papier); font: 700 15px var(--police-texte); letter-spacing: .1em; cursor: pointer; border-radius: 3px; }
.indice-choix { display: flex; gap: 12px; }
.indice-choix .indice-btn { flex: 1; letter-spacing: 0; }
.indice-choix .oui { border-color: rgba(143, 240, 184, .5); background: rgba(143, 240, 184, .08); color: var(--acc); }

/* ---------- Faux SMS ---------- */
.sms { position: absolute; left: 10px; right: 10px; top: calc(10px + var(--safe-t)); padding: 14px 16px; border-radius: 18px; background: rgba(28, 28, 32, .97); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); display: flex; gap: 12px; align-items: flex-start; animation: slideDown .55s cubic-bezier(.2, .9, .3, 1.2); cursor: pointer; z-index: 5; border: 0; text-align: left; font: inherit; color: inherit; }
.sms-icone { width: 40px; height: 40px; flex: none; border-radius: 10px; background: #3b8f5a; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.sms-corps { flex: 1; font-family: var(--police-systeme); color: #fff; }
.sms-entete { display: flex; justify-content: space-between; font-size: 13px; opacity: .7; }
.sms-de { font-weight: 700; font-size: 15px; }
.sms-texte { font-size: 15px; line-height: 1.3; }

/* ---------- Faux appel ---------- */
.appel { position: absolute; inset: 0; background: linear-gradient(#1c1c1f, #0a0a0c); display: flex; flex-direction: column; align-items: center; padding: calc(80px + var(--safe-t)) 30px calc(60px + var(--safe-b)); font-family: var(--police-systeme); color: #fff; z-index: 6; animation: fadeIn .3s; }
.appel-nom { font-size: 32px; font-weight: 300; }
.appel-statut { font-size: 16px; opacity: .6; margin-top: 6px; }
.appel-ligne { font-family: var(--police-main); font-size: 28px; line-height: 1.2; color: rgba(255, 255, 255, .85); text-align: center; margin-bottom: 30px; text-wrap: pretty; }
.appel-note { font-size: 12px; opacity: .5; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 30px; }
.appel-btn { width: 78px; height: 78px; border-radius: 50%; border: 0; background: var(--rouge); color: #fff; font-size: 30px; cursor: pointer; }
.appel-btn.refuser { transform: rotate(135deg); }
.appel-btn.accepter { background: #30c057; animation: heartbeat 1.4s infinite; }
.appel-choix { display: flex; gap: 70px; }
.appel-choix > div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; }

/* ---------- Fausse batterie ---------- */
.batterie { position: absolute; inset: 0; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; font-family: var(--police-systeme); color: #fff; z-index: 6; animation: fadeIn .2s; }
.batterie-corps { width: 90px; height: 44px; border: 3px solid #fff; border-radius: 8px; position: relative; }
.batterie-niveau { position: absolute; left: 4px; top: 4px; bottom: 4px; width: var(--niveau, 70%); background: var(--niveau-c, #30c057); transition: width .7s cubic-bezier(.7, 0, .3, 1), background .7s; }
.batterie-borne { position: absolute; right: -10px; top: 14px; width: 6px; height: 16px; background: #fff; border-radius: 2px; }
.batterie-label { font-size: 22px; }
.batterie-murmure { font-family: var(--police-main); font-size: 26px; color: var(--acc); min-height: 32px; }

/* ---------- Inactivite ---------- */
.inactif { position: absolute; inset: 0; background: rgba(0, 0, 0, .82); animation: fadeIn 3s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; z-index: 4; pointer-events: none; }
.inactif-oeil { width: 220px; height: 120px; }
.inactif-mot { font-family: var(--police-main); font-size: 40px; color: rgba(143, 240, 184, .85); animation: wordFlash 5s infinite; }

/* ---------- Effets ponctuels ---------- */
.flash { position: absolute; inset: 0; background: var(--acc); mix-blend-mode: screen; animation: flashFlicker .7s forwards; pointer-events: none; z-index: 7; }
.repere-son { position: absolute; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%); padding: 6px 12px; border-radius: 20px; background: rgba(10, 10, 14, .75); border: 1px solid rgba(232, 220, 192, .15); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: rgba(232, 220, 192, .55); white-space: nowrap; z-index: 8; pointer-events: none; animation: fadeIn .2s; }
.hapt { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 70px rgba(143, 240, 184, .55); animation: edgePulse .5s forwards; z-index: 7; }
.onde { position: absolute; width: 130px; height: 130px; border-radius: 50%; border: 1.5px solid rgba(143, 240, 184, .6); box-shadow: 0 0 20px rgba(143, 240, 184, .3), inset 0 0 24px rgba(143, 240, 184, .15); pointer-events: none; z-index: 2; animation: ripple .75s ease-out forwards; }
.calque-fx { position: absolute; inset: 0; z-index: 10; pointer-events: none; overflow: hidden; }

/* ---------- Maitre du jeu ---------- */
.maitre { position: absolute; inset: 0; background: rgba(6, 6, 8, .97); z-index: 20; overflow-y: auto; padding: calc(20px + var(--safe-t)) 18px 40px; font-family: var(--police-texte); color: var(--papier); }
.maitre-entete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.maitre-titre { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: rgba(232, 220, 192, .5); margin: 0; font-weight: 400; }
.maitre-fermer { min-width: 52px; min-height: 44px; border: 1px solid rgba(232, 220, 192, .3); background: transparent; color: var(--papier); cursor: pointer; }
.maitre-etat { font-size: 13px; color: rgba(232, 220, 192, .55); margin: 0 0 14px; }
.maitre-etapes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.maitre-etapes button { min-height: 52px; padding: 6px 10px; text-align: left; border: 1px solid rgba(232, 220, 192, .15); background: transparent; color: var(--papier); font-size: 13px; line-height: 1.2; cursor: pointer; border-radius: 2px; }
.maitre-etapes button[aria-current="step"] { border-color: var(--acc); background: rgba(143, 240, 184, .08); }
.maitre-etapes small { color: rgba(232, 220, 192, .45); font-size: 11px; }
.maitre-section { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: rgba(232, 220, 192, .45); margin: 6px 0; font-weight: 400; }
.maitre-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.maitre-boutons button { min-height: 44px; padding: 0 12px; border: 1px solid rgba(143, 240, 184, .3); background: transparent; color: var(--acc); font-size: 13px; cursor: pointer; }
.maitre-boutons.actions button { border-color: rgba(224, 164, 88, .35); color: var(--bougie); }
.maitre-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.maitre-options button { min-height: 48px; padding: 0 12px; text-align: left; border: 1px solid rgba(232, 220, 192, .2); background: transparent; color: var(--papier); font-size: 14px; cursor: pointer; }
.maitre-duree { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.maitre-duree span { flex: 1; min-height: 48px; display: flex; align-items: center; padding: 0 12px; border: 1px solid rgba(232, 220, 192, .2); }
.maitre-duree button { min-width: 52px; text-align: center; font-size: 18px; }
.maitre-codes { font-size: 14px; line-height: 1.7; color: rgba(232, 220, 192, .8); margin: 0 0 22px; }
.maitre-note { margin-bottom: 16px; padding: 12px 14px; border: 1px solid rgba(232, 220, 192, .12); background: rgba(232, 220, 192, .03); }
.maitre-note h3 { font-family: var(--police-main); font-size: 24px; color: var(--acc); margin: 0 0 6px; font-weight: 500; }
.maitre-note p { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.45; margin: 0 0 4px; }
.maitre-note p span:first-child { min-width: 44px; color: var(--bougie); font-variant-numeric: tabular-nums; }
.maitre-note p span:last-child { color: rgba(232, 220, 192, .85); }
.maitre-codes > div { margin-bottom: 10px; }
.maitre-codes strong { display: block; font-weight: 700; color: var(--papier); font-size: 13px; }
.maitre-reponse { margin: 0; padding: 2px 6px; font-size: 13px; line-height: 1.5; color: rgba(232, 220, 192, .75); }
.maitre-reponse.courant { background: rgba(143, 240, 184, .1); border-left: 2px solid var(--acc); color: var(--acc); }

/* ---------- Appel de la mere : ligne ouverte ---------- */
.appel.en-ligne { background: #000; padding-top: calc(clamp(28px, 8svh, 70px) + var(--safe-t)); padding-bottom: calc(clamp(20px, 6svh, 60px) + var(--safe-b)); }
.appel.en-ligne .appel-statut { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.onde-voix { display: flex; align-items: center; justify-content: center; gap: 5px; height: clamp(40px, 8svh, 70px); margin: clamp(8px, 3svh, 26px) 0 clamp(4px, 1svh, 10px); }
.onde-voix span { width: 5px; height: 10px; border-radius: 3px; background: var(--acc); opacity: .35; box-shadow: 0 0 10px rgba(143, 240, 184, .5); transition: opacity .3s; }
.onde-voix.parle span { opacity: 1; animation: ondeParle calc(.5s + var(--i) * .07s) ease-in-out infinite alternate; }
@keyframes ondeParle { from { transform: scaleY(.6); } to { transform: scaleY(5); } }
/* Toujours au moins les deux dernieres lignes visibles, meme avec trois choix sur un petit ecran. */
.sous-titres { flex: 1; min-height: 88px; width: 100%; overflow: hidden; mask-image: linear-gradient(transparent, #000 32px); -webkit-mask-image: linear-gradient(transparent, #000 32px); display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; text-align: center; }
.sous-titres p { margin: 0; animation: riseIn .6s both; }
.st-voix { font-family: var(--police-main); font-size: 25px; line-height: 1.2; color: rgba(255, 255, 255, .88); }
.st-enfant { font-family: var(--police-main); font-size: 21px; font-style: italic; color: rgba(143, 240, 184, .7); }
.st-dida { font-size: 12px; font-style: italic; letter-spacing: .06em; color: rgba(255, 255, 255, .35); }
.st-joueur { font-family: var(--police-main); font-size: 21px; color: rgba(224, 164, 88, .85); }
.appel-reponses { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 14px 0 18px; }
.appel-reponse { min-height: 52px; padding: 6px 14px; border: 1px solid rgba(143, 240, 184, .35); border-radius: 26px; background: rgba(143, 240, 184, .05); color: var(--acc); font: 500 24px var(--police-main); cursor: pointer; animation: riseIn .7s both; }
.appel-btn.raccrocher { flex: none; transform: rotate(135deg); }
.appel.terminee .onde-voix span { opacity: .1; animation: none; }
