/* La villa : une scene 3D plein ecran et une interface par-dessus. Aucune dependance. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/polices/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/polices/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bleu: #2D9CF6; --bleu-fonce: #0978D3; --encre: #0D2240; --nuit: #071427; --ciel: #8FCBFF;
  --verre: rgba(7, 20, 39, 0.72); --verre-fort: rgba(7, 20, 39, 0.9); --trait: rgba(143, 203, 255, 0.28);
  --texte: #EAF3FC; --texte-2: #B7CBE2; --ok: #34D399; --alerte: #FBBF24; --erreur: #F87171;
  --affichage: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif; --mono: "JetBrains Mono", Consolas, monospace;
  --marge: max(14px, env(safe-area-inset-left));
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #CFE3F2; color: var(--texte); font: 500 15px/1.4 var(--affichage); -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ciel); outline-offset: 2px; }
#scene { position: fixed; inset: 0; touch-action: none; }
#scene canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
[hidden] { display: none !important; }

/* ---------- la porte (chargement, connexion) ---------- */
.porte { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: radial-gradient(120% 90% at 50% 40%, #13325F 0%, #0B1D38 50%, #050E1C 100%); transition: opacity 0.6s ease; }
.porte.partie { opacity: 0; pointer-events: none; }
.porte-carte { width: min(460px, 100%); text-align: center; }
.porte-logo { font: 800 44px var(--mono); margin: 0 0 8px; color: #fff; }
.porte-logo span { color: var(--bleu); }
.porte-logo small { font: 600 16px var(--mono); color: var(--ciel); letter-spacing: 0.2em; text-transform: uppercase; vertical-align: middle; }
.porte h1 { font-size: clamp(26px, 6vw, 36px); margin: 6px 0 8px; letter-spacing: -0.02em; }
.porte p { color: var(--texte-2); margin: 0 0 18px; }
.jauge { height: 6px; border-radius: 99px; background: rgba(143, 203, 255, 0.18); overflow: hidden; }
.jauge span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--bleu), var(--ciel)); transition: width 0.3s ease; }
.porte-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* ---------- boutons ---------- */
.b { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--trait); background: var(--verre); color: var(--texte); display: inline-flex; align-items: center; gap: 8px; justify-content: center; text-decoration: none; font-weight: 700; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.b:hover { background: rgba(45, 156, 246, 0.25); }
.b-plein { background: var(--bleu-fonce); border-color: transparent; color: #fff; }
.b-plein:hover { background: var(--bleu); }
.b-rond { width: 44px; padding: 0; }
.b-danger { border-color: rgba(248, 113, 113, 0.5); }
.b:disabled { opacity: 0.5; cursor: default; }

/* ---------- interface de jeu ---------- */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.hud > * { pointer-events: auto; }
.hud-haut { position: absolute; top: max(12px, env(safe-area-inset-top)); left: var(--marge); right: var(--marge); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; pointer-events: none; }
.hud-haut > * { pointer-events: auto; }
.marque { display: flex; flex-direction: column; gap: 4px; }
.marque a { font: 800 18px var(--mono); white-space: nowrap; color: #fff; text-decoration: none; background: var(--verre); padding: 8px 14px; border-radius: 12px; border: 1px solid var(--trait); }
.marque a span { color: var(--bleu); }
.piece { font-weight: 700; font-size: 14px; background: var(--verre); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--trait); align-self: flex-start; }
.piece i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; background: var(--c, var(--bleu)); }
.outils { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.etat-ligne { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--verre); border: 1px solid var(--trait); }
.etat-ligne.ko { color: var(--alerte); }

.carte { position: absolute; top: 118px; right: var(--marge); width: 210px; border-radius: 14px; overflow: hidden; border: 1px solid var(--trait); background: var(--verre-fort); }
.carte canvas { display: block; width: 100%; height: auto; }

.bas-gauche { position: absolute; left: var(--marge); bottom: max(14px, env(safe-area-inset-bottom)); width: min(400px, calc(100vw - 28px)); display: flex; flex-direction: column; gap: 8px; }
.fil { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow: hidden; pointer-events: none; }
.fil li { background: var(--verre); border-radius: 12px; padding: 6px 10px; font-size: 14px; width: fit-content; max-width: 100%; overflow-wrap: anywhere; animation: apparait 0.25s ease; }
.fil li b { color: var(--c, var(--ciel)); margin-right: 6px; }
.fil li.systeme { color: var(--texte-2); font-style: italic; }
@keyframes apparait { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.parler { display: flex; gap: 8px; }
.parler input { flex: 1; min-width: 0; min-height: 44px; border-radius: 999px; border: 1px solid var(--trait); background: var(--verre-fort); padding: 0 16px; font-size: 16px; }
.gestes { display: flex; gap: 6px; }
.gestes .b { font-size: 20px; }

.action { position: absolute; left: 50%; bottom: max(96px, calc(env(safe-area-inset-bottom) + 96px)); transform: translateX(-50%); font-size: 16px; padding: 0 22px; min-height: 50px; box-shadow: 0 10px 30px rgba(7, 20, 39, 0.35); }
.action kbd { font: 700 13px var(--mono); border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 6px; padding: 1px 6px; }

/* le joystick : toute la zone bas-gauche le declenche ; la base se pose sous le pouce, puis revient, pale */
.joystick { position: absolute; left: 0; bottom: 0; width: min(50vw, 340px); height: 46vh; height: min(46svh, 400px); display: none; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.joy-base { position: absolute; left: calc(var(--marge) + 62px); top: calc(100% - 80px - env(safe-area-inset-bottom, 0px)); width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; background: rgba(7, 20, 39, 0.35); border: 1px solid var(--trait); display: grid; place-items: center; opacity: 0.5; transition: opacity 0.15s ease; pointer-events: none; }
.joy-base.actif { opacity: 1; background: rgba(7, 20, 39, 0.45); }
.joy-base span { width: 52px; height: 52px; border-radius: 50%; background: rgba(234, 243, 252, 0.9); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
/* interface de jeu : pas de selection de texte ni de loupe quand on garde le doigt appuye ; pas de zoom au double toucher */
.hud { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.hud input, .hud textarea, .panneau .enonce, .chat-ouvert .fil li { -webkit-user-select: text; user-select: text; }
.hud button, .hud .b { touch-action: manipulation; }

.toast { position: absolute; top: 76px; left: 50%; transform: translateX(-50%); background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 14px; padding: 10px 18px; font-weight: 700; text-align: center; max-width: calc(100vw - 28px); animation: apparait 0.3s ease; }
.toast { pointer-events: none; z-index: 25; } /* un message ne doit jamais arreter un geste */
.toast small { display: block; font-weight: 500; color: var(--texte-2); }

/* ---------- panneaux (defis, tables, avatar, aide) ---------- */
.panneau { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 24px)); max-height: min(86vh, 760px); display: flex; flex-direction: column; background: rgba(7, 20, 39, 0.94); border: 1px solid var(--trait); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); z-index: 20; }
.panneau-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 10px; border-bottom: 1px solid var(--trait); }
.panneau-tete h2 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.panneau-corps { padding: 14px 18px 18px; overflow: auto; }
.panneau-corps p { margin: 0 0 12px; color: var(--texte-2); }
.panneau-corps h3 { margin: 14px 0 8px; font-size: 16px; }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.defi { border: 1px solid var(--trait); border-radius: 14px; padding: 12px 14px; background: rgba(143, 203, 255, 0.05); cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.defi:hover { border-color: var(--c, var(--bleu)); }
.defi b { font-size: 16px; }
.defi small { color: var(--texte-2); }
.defi .pts { font: 700 14px var(--mono); color: var(--c, var(--bleu)); }
.defi.resolu { border-color: rgba(52, 211, 153, 0.55); }
.defi.resolu .pts::after { content: " ✓"; color: var(--ok); }
.enonce { white-space: pre-wrap; font-family: var(--mono); font-size: 14px; background: rgba(143, 203, 255, 0.07); border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px; color: var(--texte); overflow-wrap: anywhere; }
.reponse { display: flex; gap: 8px; margin-top: 12px; }
.reponse input { flex: 1; min-width: 0; min-height: 44px; border-radius: 12px; border: 1px solid var(--trait); background: rgba(255, 255, 255, 0.06); padding: 0 14px; font-size: 16px; }
.retour { margin-top: 10px; font-weight: 700; min-height: 1.4em; }
.retour.ok { color: var(--ok); }
.retour.ko { color: var(--erreur); }
.classement { list-style: none; margin: 0; padding: 0; counter-reset: rang; }
.classement li { counter-increment: rang; display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(143, 203, 255, 0.12); }
.classement li::before { content: counter(rang) "."; font: 700 13px var(--mono); color: var(--ciel); width: 26px; }
.classement li span:first-of-type { flex: 1; }
.rangee { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.editeur { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.editeur fieldset { border: 0; padding: 0; margin: 0; }
.editeur legend { font-weight: 700; margin-bottom: 6px; }
.pastilles { display: flex; gap: 8px; flex-wrap: wrap; }
.pastilles button { width: 40px; height: 40px; border-radius: 50%; border: 2px solid transparent; background: var(--p); }
.pastilles button[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--bleu); }
.choix-mots { display: flex; gap: 6px; flex-wrap: wrap; }
.choix-mots button { min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--trait); background: transparent; font-weight: 600; }
.choix-mots button[aria-pressed="true"] { background: var(--bleu-fonce); border-color: transparent; }

/* HUD de partie (echecs, dames) et du Rubik's cube */
.partie { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(560px, calc(100vw - 24px)); }
.partie-joueurs { display: flex; gap: 8px; width: 100%; }
.partie-joueurs div { flex: 1; background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 14px; padding: 8px 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; }
.partie-joueurs div.trait { border-color: var(--bleu); box-shadow: 0 0 0 2px rgba(45, 156, 246, 0.35); }
.partie-joueurs i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5); flex: none; }
.partie-joueurs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partie-info { background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 12px; padding: 6px 14px; font-weight: 700; text-align: center; }
.partie-bas { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: calc(100vw - 24px); }
/* Pendant une partie : le plateau d'abord. La discussion reste, en petit ; les gestes s'effacent. */
.en-partie .partie { top: max(66px, calc(env(safe-area-inset-top) + 58px)); }
/* Rubik : le chrono et la consigne sont par-dessus le cube ; ils laissent passer les gestes. */
.mode-rubik .partie { pointer-events: none; }
.partie-bas { pointer-events: none; }
.partie-bas > * { pointer-events: auto; }
.en-partie .gestes, .en-partie .fil, .en-partie .carte, .en-partie .joystick, .en-partie .action, .en-partie .proche { display: none !important; }
.en-partie .bas-gauche { width: min(300px, calc(100vw - 28px)); }
.en-partie .partie-bas { left: auto; right: var(--marge); transform: none; width: auto; justify-content: flex-end; }
@media (max-width: 720px) { .en-partie .bas-gauche { display: none; } .en-partie .partie-bas { left: 50%; right: auto; transform: translateX(-50%); } }
.chrono { font: 800 40px var(--mono); letter-spacing: 0.02em; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); }

/* Telephone : un seul rang en haut (le reste dans ☰), le joystick sous le pouce gauche ; sauter, gestes (😊) et
   discussion (💬) sous le pouce droit. Repliee, la discussion ne montre que ses deux derniers messages, un instant. */
.tel-seul, .tel-boutons { display: none !important; }
@media (hover: none), (max-width: 720px) {
  :root { --sous-haut: max(64px, calc(env(safe-area-inset-top) + 58px)); }
  .joystick { display: block; }
  .pc-seul { display: none !important; }
  .tel-seul { display: inline-flex !important; }
  .hud-haut { align-items: center; }
  .marque { flex: 1 1 auto; flex-direction: row; align-items: center; min-width: 0; gap: 6px; }
  .marque a { padding: 7px 10px; }
  .marque a .mot { display: none; }
  .piece { align-self: center; min-width: 0; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* la barre du haut ne sort JAMAIS de l'ecran (le menu ☰ en sortait sur 360-412 px) : boutons un peu plus compacts, un seul rang ;
     le logo et le nom du lieu ne sont montres que s'il reste de la place (des 430 px ; le nom du lieu passe sur un 2e rang cache
     s'il ne tient pas). Sous 360 px, la barre elle-meme passe sur deux rangs plutot que de deborder. */
  .outils { flex: none; flex-wrap: nowrap; gap: 6px; margin-left: auto; }
  .outils .b { min-height: 40px; }
  .outils .b-rond { width: 40px; }
  .outils .b:not(.b-rond) { padding: 0 10px; }
  .marque { flex: 1 1 0; flex-wrap: wrap; align-content: flex-start; max-height: 40px; overflow: hidden; }
  .marque a, .piece { flex: none; }
  .etat-ligne { font-size: 12px; padding: 5px 9px; white-space: nowrap; }
  .hud-haut:has(.etat-ligne:not([hidden])) .piece { display: none; }   /* « Reconnexion… » prend sa place */
  .carte { width: 150px; top: var(--sous-haut); }
  .aide-clavier { display: none; }
  .tel-boutons { display: flex !important; flex-direction: column; gap: 10px; position: absolute; right: calc(var(--marge) + 9px); bottom: max(92px, calc(env(safe-area-inset-bottom) + 84px)); }
  .tel-boutons .b { position: relative; font-size: 21px; }
  .tel-boutons .pastille { position: absolute; top: -5px; right: -5px; }
  .action { bottom: max(152px, calc(env(safe-area-inset-bottom) + 144px)); max-width: calc(100vw - 150px); }
  /* rangee : rien a l'ecran (le compteur est sur 💬) ; ouverte : un tiroir en bas, qu'un toucher sur la scene referme */
  .chat-ferme .bas-gauche { display: none; }
  .bas-gauche { left: 0; right: 0; bottom: 0; width: auto; z-index: 23; padding: 10px 12px max(12px, env(safe-area-inset-bottom)); background: var(--verre-fort); border-top: 1px solid var(--trait); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35); }
  .bas-gauche .gestes { display: none; }
  .bas-gauche .fil { max-height: 34vh; }
  .bas-gauche .fil li { background: var(--verre); }
  .chat-ouvert .joystick, .chat-ouvert .tel-boutons, .chat-ouvert .saut, .chat-ouvert .action, .chat-ouvert .proche { display: none !important; }
  /* un match (boutons de frappe a droite) ou une partie de table : ni gestes ni discussion par-dessus */
  .hud:has(.foot-actions, .cmd-sport) .tel-boutons, .hud:has(.foot-actions, .cmd-sport) .saut, .hud:has(.foot-actions, .cmd-sport) .bas-gauche, .en-partie .tel-boutons { display: none !important; }
  /* un panneau ouvert (avatar, defis, jeux…) : les commandes du bas s'effacent, rien ne passe devant */
  .avec-panneau .joystick, .avec-panneau .tel-boutons, .avec-panneau .saut, .avec-panneau .bas-gauche, .avec-panneau .action, .avec-panneau .proche { display: none !important; }
}
/* le joueur proche : une carte qu'on range ; repliee, une simple pastille « Nom · Interagir » */
.proche-tete { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.proche-tete b { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proche-invite { margin-left: auto; flex: none; font-size: 13px; font-weight: 700; color: var(--ciel); }
.proche.replie { width: auto; max-width: calc(100vw - 24px); padding: 5px 14px; border-radius: 999px; }
.proche.replie .proche-actions { display: none; }
/* editeur d'avatar sur telephone : « Voir » replie le tiroir, l'avatar se voit en entier */
.panneau.cote.replie .panneau-corps { display: none; }
.voir-avatar { min-height: 38px; padding: 0 12px; font-size: 14px; margin-left: auto; }
.panneau-tete .voir-avatar + .b-rond { margin-left: 0; }
@media (max-width: 429px) { .marque { display: none; } }          /* le logo ne tient pas a cote de la barre : il est absent plutot que coupe (« Mon espace » est dans le menu ☰) */
@media (max-width: 359px) { .outils { flex: 0 1 auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end; } }
@media (max-width: 480px) {
  .marque a { font-size: 15px; padding: 6px 10px; }
  .piece { font-size: 12px; }
  .outils .b:not(.b-rond) { padding: 0 12px; }
  .parler input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =====================================================================
   Villa v2 : discussion a deux onglets, fiche du joueur proche, bannieres, voiles (pause, pleine,
   banni), menus de gestes, jeux de table, ring, basket, mimes, arcade, TP reseau, VIP, admin.
   ===================================================================== */
.b-or { background: linear-gradient(180deg, #F6D365, #D4A017); color: #2A1B00; border-color: transparent; }
.b-or:hover { background: linear-gradient(180deg, #FFE08A, #E0B028); }
.b.rouge, .carte-jeu.rouge { color: #E53E3E; }

/* discussion */
.onglets { display: flex; gap: 6px; }
.onglet { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--trait); background: var(--verre); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.onglet.actif { background: var(--bleu-fonce); border-color: transparent; }
.pastille { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #E53E3E; color: #fff; font: 700 12px var(--mono); }
.fil { pointer-events: auto; overflow-y: auto; scrollbar-width: thin; }
.fil li.admin b { color: #FFD24A; }
.prive { display: flex; flex-direction: column; gap: 6px; }
.prive-choix { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.prive-choix .b { min-height: 34px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
.fil-prive li { background: var(--verre-fort); }
.fil-prive li.moi { align-self: flex-end; background: rgba(9, 120, 211, 0.85); }
.fil-prive li .signaler { margin-left: 8px; padding: 0 4px; border: 0; background: none; font-size: 0.85em; opacity: 0.55; cursor: pointer; }
.fil-prive li .signaler:hover, .fil-prive li .signaler:focus-visible { opacity: 1; }
/* discussion fermee (comme WhatsApp : on voit combien de messages attendent, on ouvre quand on veut) */
.pastille.douce { background: var(--bleu-fonce); }
.fermer-chat { margin-left: auto; width: 36px; min-height: 36px; }
.ouvrir-chat { display: none; align-self: flex-start; }
.chat-ferme .ouvrir-chat { display: inline-flex; }
.chat-ferme .bas-gauche .onglets, .chat-ferme .bas-gauche .fil, .chat-ferme .bas-gauche .prive, .chat-ferme .bas-gauche .parler { display: none; }
/* un message prive recu : une notification qui reste (Repondre / Plus tard) */
.notif { position: absolute; top: max(70px, calc(env(safe-area-inset-top) + 64px)); right: var(--marge); width: min(380px, calc(100vw - 24px)); z-index: 26; display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--verre-fort); border: 1px solid var(--bleu); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45); animation: apparait 0.25s ease; }
.notif-texte { display: grid; gap: 3px; }
.notif-texte b { font-size: 15px; }
.notif-texte > span { color: var(--texte-2); font-size: 14px; overflow-wrap: anywhere; }
.notif-actions { display: flex; gap: 8px; justify-content: flex-end; }
.notif-actions .b { min-height: 40px; }
@media (hover: none), (max-width: 720px) { .notif { top: var(--sous-haut); left: 12px; right: 12px; width: auto; } }

/* le joueur proche et les demandes */
.proche { position: absolute; left: 50%; bottom: max(160px, calc(env(safe-area-inset-bottom) + 160px)); transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.proche > b { font-size: 15px; }
.proche-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.proche-actions .b { min-height: 38px; padding: 0 12px; font-size: 14px; }
.demande { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); z-index: 30; width: min(420px, calc(100vw - 24px)); background: var(--verre-fort); border: 1px solid var(--ciel); border-radius: 18px; padding: 14px 16px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); animation: apparait 0.25s ease; }
.demande p { margin: 0 0 10px; font-weight: 700; }
.demande > div { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* bannieres (annonces, arrivee de l'admin, buts) */
.banniere { position: absolute; top: max(70px, calc(env(safe-area-inset-top) + 64px)); left: 50%; transform: translateX(-50%); width: min(680px, calc(100vw - 24px)); padding: 14px 20px; border-radius: 18px; background: linear-gradient(135deg, rgba(9, 120, 211, 0.95), rgba(13, 34, 64, 0.95)); border: 1px solid var(--ciel); text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); animation: tombe 0.5s cubic-bezier(0.2, 1.3, 0.4, 1); pointer-events: none; z-index: 25; }
.banniere b { display: block; font-size: clamp(17px, 3.4vw, 24px); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.banniere span { display: block; color: var(--texte-2); margin-top: 4px; font-size: 14px; }
.banniere.doree { background: linear-gradient(135deg, rgba(212, 160, 23, 0.97), rgba(90, 60, 0, 0.95)); border-color: #FFE08A; color: #FFF8E1; }
.banniere.doree span { color: #FFE9B0; }
@keyframes tombe { from { opacity: 0; transform: translate(-50%, -30px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* voile : pause, villa pleine, banni */
.voile { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(5, 14, 28, 0.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-align: center; }
.voile h1 { font-size: clamp(24px, 6vw, 32px); margin: 8px 0; }
.voile p { color: var(--texte-2); margin: 0 0 16px; }
.porte-marque { font: 800 40px var(--mono); color: #fff; }
.porte-marque span { color: var(--bleu); }
.porte-marque small { font: 600 15px var(--mono); color: var(--ciel); letter-spacing: 0.2em; margin-left: 8px; vertical-align: middle; }

/* menus (grimaces, danses, poses) */
.menu-gestes { position: absolute; left: var(--marge); bottom: max(250px, calc(env(safe-area-inset-bottom) + 250px)); width: min(360px, calc(100vw - 28px)); background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 16px; padding: 10px; z-index: 22; }
.menu-gestes b { display: block; margin-bottom: 8px; }
.menu-gestes .grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.menu-gestes .grille .b { font-size: 15px; padding: 0 10px; }
.grille-lieux { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.grille-lieux .b { border-radius: 14px; justify-content: flex-start; text-align: left; min-height: 48px; }
.saut { position: absolute; left: calc(var(--marge) + 136px); bottom: max(30px, calc(env(safe-area-inset-bottom) + 30px)); display: none; font-size: 22px; }

/* panneau large (jeux) */
.panneau.large { width: min(920px, calc(100vw - 16px)); max-height: min(92vh, 900px); }

/* ---------- jeux de table ---------- */
.salon .places { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.salon .places li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--trait); border-radius: 12px; padding: 6px 10px; min-height: 48px; }
.salon .places li i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; }
.salon .places li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.salon .places .vide { color: var(--texte-2); font-style: italic; }
.salon .places .b { min-height: 36px; padding: 0 12px; }
.statut { font-weight: 700; color: var(--texte) !important; }
.statut.a-vous { color: var(--ok) !important; }
.salon-erreur { color: var(--erreur) !important; min-height: 1em; margin: 0 0 6px !important; }
.regles { line-height: 1.5; }
.jeu { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; justify-content: center; }
/* Puissance 4 */
.p4 { display: flex; gap: 6px; padding: 10px; background: #1E4FB0; border-radius: 16px; }
.p4-col { display: flex; flex-direction: column; gap: 6px; padding: 4px; border: 0; border-radius: 10px; background: transparent; }
.p4-col:not(:disabled):hover { background: rgba(255, 255, 255, 0.15); }
.p4-col i { width: clamp(30px, 8.5vw, 52px); height: clamp(30px, 8.5vw, 52px); border-radius: 50%; background: #0B1D38; box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.5); }
.p4-col i.rouge { background: radial-gradient(circle at 35% 35%, #FF7A7A, #D11F1F); }
.p4-col i.jaune { background: radial-gradient(circle at 35% 35%, #FFF08A, #E0B000); }
.p4-col i.gagne { box-shadow: 0 0 0 3px #fff, 0 0 18px #fff; }
.p4-col i.dernier { outline: 2px dashed rgba(255, 255, 255, 0.7); outline-offset: 2px; }
/* Ludo */
.ludo { width: min(520px, 100%); height: auto; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.ludo .pion.jouable { cursor: pointer; animation: brille 0.8s ease-in-out infinite alternate; }
@keyframes brille { from { opacity: 1; } to { opacity: 0.45; } }
.de { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 160px; }
.de b { font-size: 64px; line-height: 1; }
.de small { color: var(--texte-2); text-align: center; }
/* cartes */
.autres { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; justify-content: center; }
.autres span { border: 1px solid var(--trait); border-radius: 99px; padding: 4px 12px; }
.autres span.tour { border-color: var(--ok); }
.table-cartes { display: flex; gap: 24px; justify-content: center; width: 100%; }
.pile { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pile small { color: var(--texte-2); }
.main { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; width: 100%; }
.carte-jeu { width: 58px; height: 84px; border-radius: 9px; background: #FFFFFF; color: #1A202C; border: 1px solid #CBD5E0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); padding: 0; }
.carte-jeu b { font-size: 20px; }
.carte-jeu span { font-size: 24px; }
.carte-jeu.jouable { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--ok), 0 8px 16px rgba(0, 0, 0, 0.3); }
.carte-jeu:disabled { opacity: 1; }
.main .carte-jeu:disabled { filter: grayscale(0.35) brightness(0.85); }
.carte-jeu.dos { background: repeating-linear-gradient(45deg, #1E4FB0, #1E4FB0 6px, #2D9CF6 6px, #2D9CF6 12px); border-color: #fff; }
.aide-cartes { margin: 4px 0 0 !important; text-align: center; font-weight: 700; color: var(--ok) !important; }
/* Quartiers d'Abidjan */
.quartiers { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(52px, auto)); gap: 3px; width: min(760px, 100%); }
.case-q { position: relative; border-radius: 6px; background: #F7F2E6; color: #1A202C; padding: 14px 3px 3px; font-size: 10px; line-height: 1.15; overflow: hidden; border-top: 10px solid var(--g); box-shadow: inset 0 0 0 3px var(--p); }
.case-q.speciale { background: #E6EEF7; border-top-color: #9FB3C8; }
.case-q b { display: block; font-size: 10px; overflow-wrap: anywhere; }
.case-q small { display: block; color: #4A5568; }
.case-q .pions { position: absolute; right: 2px; bottom: 2px; display: flex; gap: 2px; }
.pion-q { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #fff; }
.centre-q { grid-row: 2 / 8; grid-column: 2 / 8; background: rgba(13, 34, 64, 0.65); border-radius: 12px; padding: 10px 14px; overflow: auto; }
.centre-q h3 { margin: 0 0 6px !important; }
.fortunes p { margin: 0 0 4px !important; }
.fortunes .sorti { opacity: 0.45; text-decoration: line-through; }
.des, .carte-chance { color: var(--texte) !important; font-weight: 700; }
.journal { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; color: var(--texte-2); display: grid; gap: 2px; }

/* ring et basket */
.hud-ring { position: absolute; top: max(150px, calc(env(safe-area-inset-top) + 144px)); left: 50%; transform: translateX(-50%); width: min(620px, calc(100vw - 24px)); background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 16px; padding: 10px 14px; text-align: center; }
.hud-ring p { margin: 6px 0; color: var(--texte-2); }
.pvs { display: flex; align-items: center; gap: 10px; }
.pv { flex: 1; min-width: 0; text-align: left; }
.pv.bleu { text-align: right; }
.pv b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin: 4px 0; }
.barre i { display: block; height: 100%; transition: width 0.25s ease; }
.pv.rouge .barre i { background: linear-gradient(90deg, #E53E3E, #FC8181); }
.pv.bleu .barre i { background: linear-gradient(90deg, #3182CE, #90CDF4); margin-left: auto; }
.vs { font: 800 20px var(--mono); color: #FFD24A; }
.hud-basket { position: absolute; left: 50%; bottom: max(24px, calc(env(safe-area-inset-bottom) + 24px)); transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 16px; padding: 10px 14px; display: grid; gap: 8px; text-align: center; z-index: 21; }
.hud-basket .chrono { font-size: 28px; }
.hud-basket .score { font-weight: 800; font-size: 18px; }
.hud-basket small { color: var(--texte-2); }

/* mimes */
.mime .manche { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; border: 1px solid var(--trait); border-radius: 12px; padding: 10px 12px; }
.mime .secret { font-size: 22px; font-weight: 800; color: #FFD24A !important; text-align: center; }

/* arcade */
.arcade-boite { display: grid; justify-items: center; gap: 10px; }
.arcade-choix { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.arcade-choix .b { min-height: 40px; padding: 0 12px; }
.arcade-choix .b.actif { background: var(--bleu); color: #fff; border-color: transparent; }
/* la grille ne prend que la hauteur qui reste : le choix du jeu, l'aide et les boutons restent visibles sans defiler */
.arcade { width: min(480px, 100%, max(240px, calc(86vh - 270px))); height: auto; border-radius: 12px; border: 2px solid var(--trait); image-rendering: pixelated; touch-action: none; background: #081527; }

/* TP reseau */
.tp .objectifs { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 3px; font-size: 14px; }
.tp .objectifs li.fait { color: var(--ok); }
.console { margin: 8px 0 0; height: min(30vh, 280px); overflow: auto; background: #04101F; color: #9AE6B4; border: 1px solid var(--trait); border-radius: 12px 12px 0 0; padding: 10px 12px; font: 500 13px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.ligne-console { display: flex; align-items: center; gap: 6px; background: #04101F; border: 1px solid var(--trait); border-top: 0; border-radius: 0 0 12px 12px; padding: 6px 12px; }
.ligne-console .invite { font: 700 13px var(--mono); color: #68D391; white-space: nowrap; }
.console-saisie { flex: 1; min-width: 0; background: transparent; border: 0; color: #E6FFFA; font: 500 16px var(--mono); min-height: 36px; outline: none; }

/* VIP */
.enigme { border: 1px solid var(--trait); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.enigme.faite { border-color: rgba(52, 211, 153, 0.5); }
.enigme.fermee { opacity: 0.55; }
.enigme.ouverte { border-color: #D4AF37; background: rgba(212, 175, 55, 0.06); }
.enigme p { color: var(--texte) !important; }
.enigme input { flex: 1; min-width: 160px; min-height: 44px; border-radius: 12px; border: 1px solid var(--trait); background: rgba(255, 255, 255, 0.06); padding: 0 14px; font-size: 16px; }
.enigme .indice { color: #F6E05E !important; }
.vip-ok { font-size: 18px; font-weight: 800; color: #FFD24A !important; }

/* admin */
.admin input[type="text"], .admin input[type="search"], .admin select { flex: 1; min-width: 180px; min-height: 44px; border-radius: 12px; border: 1px solid var(--trait); background: rgba(255, 255, 255, 0.06); padding: 0 14px; font-size: 16px; }
.admin-personnes { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; max-height: 40vh; overflow: auto; }
.admin-personnes li { border: 1px solid var(--trait); border-radius: 12px; padding: 8px 10px; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.admin-actions .b { min-height: 36px; padding: 0 10px; font-size: 13px; }
.admin h4 { margin: 10px 0 4px; }

/* espace Auriol */
.auriol-titre { color: #FFD24A !important; font-size: 17px; }
.auriol .liens { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.auriol .liens a { color: var(--ciel); font-weight: 700; }
.auriol textarea { width: 100%; border-radius: 12px; border: 1px solid var(--trait); background: rgba(255, 255, 255, 0.06); padding: 10px 12px; font: 500 16px/1.4 var(--affichage); color: var(--texte); resize: vertical; }

@media (hover: none), (max-width: 720px) {
  /* sauter : sous le pouce droit ; les menus de gestes s'ouvrent a cote des boutons, celui de ☰ sous la barre */
  .saut { display: grid; left: auto; right: var(--marge); bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px)); width: 62px; min-height: 62px; font-size: 26px; }
  .menu-gestes { left: auto; right: calc(var(--marge) + 64px); bottom: max(92px, calc(env(safe-area-inset-bottom) + 84px)); width: min(300px, calc(100vw - 96px)); }
  .menu-gestes.menu-haut { top: var(--sous-haut); bottom: auto; right: var(--marge); }
  /* telephone : le bas de l'ecran est pris par les pouces -> la carte du voisin passe en haut, sous la barre */
  .proche { top: var(--sous-haut); bottom: auto; }
  .hud-ring { top: var(--sous-haut); }
  .quartiers { grid-template-rows: repeat(8, minmax(44px, auto)); }
  .case-q, .case-q b { font-size: 8px; }
}
.reglage { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.reglage input { width: 20px; height: 20px; accent-color: var(--bleu); }
.reglage-choix { min-height: 40px; padding: 0 10px; font: inherit; font-size: 16px; color: var(--texte); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--trait); border-radius: 10px; }
.reglage-choix option { color: #0B1B31; }
.reglage small { color: var(--texte-2); }

/* seance a un appareil de sport (a droite ; sur telephone : sous les boutons du haut) */
.hud-seance { position: absolute; right: var(--marge); bottom: max(24px, calc(env(safe-area-inset-bottom) + 24px)); width: min(320px, calc(100vw - 24px)); background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 16px; padding: 12px 14px; display: grid; gap: 6px; z-index: 21; text-align: center; }
.hud-seance h4 { margin: 0; font-size: 15px; }
.hud-seance .stat { font: 800 26px var(--mono); }
.hud-seance .sous { color: var(--texte-2); font-size: 13px; min-height: 18px; }
.hud-seance .barre i { background: linear-gradient(90deg, #34D399, #FBBF24, #F87171); }
.hud-seance .rangee { display: flex; gap: 8px; }
.hud-seance .rangee .b-plein { flex: 1; min-height: 48px; font-size: 17px; }
.hud-seance small { color: var(--texte-2); }
.souffle { width: 90px; height: 90px; margin: 4px auto; border-radius: 50%; background: radial-gradient(circle, rgba(143, 203, 255, 0.55), rgba(45, 156, 246, 0.15)); border: 2px solid rgba(143, 203, 255, 0.6); transition: transform 0.1s linear; }
.hud-basket .rangee { display: flex; gap: 8px; }
.hud-basket .rangee .b-plein { flex: 1; }
@media (hover: none), (max-width: 720px) {
  .hud-seance { right: auto; left: 50%; transform: translateX(-50%); bottom: auto; top: var(--sous-haut); }
}
/* session de skate : en haut au centre (sur telephone : sous les boutons du haut) */
.hud-skate { position: absolute; left: 50%; top: max(140px, calc(env(safe-area-inset-top) + 134px)); transform: translateX(-50%); min-width: min(360px, calc(100vw - 24px)); max-width: calc(100vw - 24px); background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 16px; padding: 8px 14px; display: grid; gap: 2px; text-align: center; z-index: 19; pointer-events: none; }
.hud-skate .rangee, .hud-skate button { pointer-events: auto; }
.hud-skate .skate-titre { font-size: 12px; color: var(--texte-2); letter-spacing: 0.04em; }
.hud-skate .skate-score { font: 800 26px var(--mono); }
.hud-skate .skate-combo { font-size: 13px; color: #FBBF24; min-height: 17px; }
.hud-skate .skate-figure { font-weight: 800; font-size: 18px; min-height: 22px; }
.hud-skate .skate-figure.gain { color: #34D399; }
.hud-skate .skate-figure.chute { color: #F87171; }
.hud-skate small { color: var(--texte-2); }
.hud-skate .rangee { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.hud-skate .rangee .b { min-height: 46px; padding: 0 16px; }
@media (hover: none), (max-width: 720px) {
  .hud-skate { top: var(--sous-haut); }
}
/* moderation : bouton de retrait d'un message, messages prives */
.fil li .effacer { margin-left: 8px; border: 0; background: transparent; cursor: pointer; font-size: 13px; opacity: 0.55; padding: 0 2px; min-height: 0; }
.fil li .effacer:hover, .fil li .effacer:focus-visible { opacity: 1; }
.admin .note, .panneau .note { font-size: 13px; color: var(--texte-2); }
.conv-privee { border: 1px solid var(--trait); border-radius: 12px; padding: 8px 12px; margin: 0 0 8px; }
.conv-privee summary { cursor: pointer; }
.conv-privee ul { margin-top: 8px; }
/* concours de basket : postes, jauge avec zone verte et curseur */
.basket-tete { display: flex; justify-content: space-between; align-items: baseline; }
.basket-postes { display: flex; justify-content: center; gap: 10px; }
.basket-postes .poste { display: inline-flex; gap: 3px; padding: 3px 5px; border-radius: 8px; }
.basket-postes .poste.actif { background: rgba(251, 191, 36, 0.18); }
.basket-postes i { width: 10px; height: 10px; border-radius: 50%; background: #E0782E; display: inline-block; }
.basket-postes i.argent { background: conic-gradient(#C8102E 0 33%, #fff 0 66%, #1D4E9E 0); }
.basket-postes i.tire { opacity: 0.22; }
/* sur ordinateur, le panneau du concours a droite : le tireur et la cloche du tir restent visibles */
@media (min-width: 1000px) and (hover: hover) { .hud-basket { left: auto; right: 24px; transform: none; } }
.jauge-tir { position: relative; height: 16px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.jauge-tir .vert { position: absolute; top: 0; bottom: 0; background: rgba(52, 211, 153, 0.75); }
.jauge-tir .curseur { position: absolute; top: -2px; bottom: -2px; width: 4px; margin-left: -2px; background: #fff; border-radius: 2px; box-shadow: 0 0 8px #fff; }

/* ---- mini-foot : bandeau compact (score + chrono), menu replie, jauge de frappe, boutons ronds sous le pouce droit */
.hud-foot { position: absolute; top: var(--haut-foot, max(64px, calc(env(safe-area-inset-top) + 58px))); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 24px); background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 99px; padding: 4px 5px 4px 14px; z-index: 20; }
.hud-foot .score-foot { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.horloge-b { flex: none; min-width: 30px; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); font: 800 14px var(--mono); text-align: center; }
.horloge-b.alerte { background: #DC2626; color: #fff; animation: pouls 0.5s ease-in-out infinite alternate; }
@keyframes pouls { to { transform: scale(1.12); } }
.foot-menu-btn { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--trait); background: rgba(255, 255, 255, 0.1); font-size: 17px; line-height: 1; padding: 0; }
.menu-foot { position: absolute; top: calc(var(--haut-foot, max(64px, calc(env(safe-area-inset-top) + 58px))) + 46px); left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); max-height: min(56vh, 420px); overflow: auto; background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 16px; padding: 10px; z-index: 24; display: none; }
.menu-foot.ouvert { display: block; }
.hud:has(.menu-foot.ouvert) .piece { display: none; }
/* sur le terrain, on ne propose pas « Calin / Gifle » a chaque adversaire croise */
.hud:has(.hud-foot.en-jeu) .proche { display: none !important; }
.roles-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.roles-foot .b { min-height: 36px; padding: 0 10px; font-size: 13px; }
.roles-foot .b.equipe { border-color: var(--e); }
.roles-foot .b.equipe.actif { background: var(--e); color: #fff; }
.roles-foot .b[aria-pressed="true"]:not(.equipe) { border-color: var(--ok); }
.roles-foot .gardiens-foot { flex-basis: 100%; color: var(--texte-2); }
.format-foot { display: flex; gap: 4px; flex-basis: 100%; justify-content: center; }
.format-foot .b { min-height: 32px; padding: 0 10px; }
.format-foot .b.actif { background: var(--bleu); color: #fff; }
.jauge-foot { position: absolute; left: 50%; top: 66%; transform: translateX(-50%); width: min(260px, 56vw); display: none; z-index: 21; pointer-events: none; text-align: center; background: rgba(7, 20, 39, 0.7); border-radius: 12px; padding: 5px 8px 3px; }
.hud-foot.charge ~ .jauge-foot { display: block; }
.jauge-foot .plein { display: block; height: 10px; border-radius: 99px; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, #34D399, #F6AD55 60%, #E53E3E); }
.jauge-foot .effet { display: block; position: relative; height: 5px; margin: 5px 0 2px; border-radius: 99px; background: rgba(255, 255, 255, 0.2); }
.jauge-foot .effet i { position: absolute; top: -3px; width: 10px; height: 11px; margin-left: -5px; border-radius: 3px; background: #fff; left: calc(50% + var(--e, 0) * 50%); }
.jauge-foot small { color: var(--texte-2); font-size: 11px; }
.aide-touches { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: var(--verre); border: 1px solid var(--trait); border-radius: 99px; padding: 4px 14px; max-width: calc(100vw - 24px); text-align: center; z-index: 19; pointer-events: none; white-space: pre-wrap; }
.aide-touches small { color: var(--texte-2); font-size: 12px; }
/* sur ordinateur : a droite, sous les boutons du haut (les bannieres de but restent lisibles au centre) */
@media (hover: none) and (orientation: portrait) { .hud-foot, .menu-foot { --haut-foot: calc(var(--sous-haut) + 54px); } }
@media (min-width: 1000px) and (hover: hover) { .hud-foot { --haut-foot: 72px; left: auto; right: 16px; transform: none; } .menu-foot { left: auto; right: 16px; transform: none; } }
/* les boutons ronds (foot, basket, boxe…) : le gros au coin, les autres en arc autour */
.cmd-sport { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: max(14px, calc(env(safe-area-inset-bottom) + 10px)); width: 200px; height: 190px; z-index: 22; pointer-events: none; }
.cmd-rond { position: absolute; pointer-events: auto; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.55); background: rgba(13, 34, 64, 0.8); color: #fff; display: grid; place-items: center; align-content: center; gap: 0; padding: 0; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); overflow: hidden; }
.cmd-rond::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--charge, 0) * 100%); background: rgba(246, 173, 85, 0.45); pointer-events: none; }
.cmd-rond .cmd-icone { font-size: 24px; line-height: 1; position: relative; z-index: 1; }
.cmd-rond small { font-size: 10px; line-height: 1.1; font-weight: 700; position: relative; z-index: 1; }
.cmd-rond.presse { transform: scale(0.92); background: var(--bleu-fonce); }
.cmd-rond:disabled { opacity: 0.4; }
.cmd-rond.gros { width: 80px; height: 80px; right: 0; bottom: 0; background: var(--bleu-fonce); }
.cmd-rond.gros .cmd-icone { font-size: 30px; }
.cmd-rond.moyen { width: 58px; height: 58px; }
.cmd-rond.petit { width: 46px; height: 46px; }
.cmd-rond.petit small { display: none; }
.cmd-basket .cmd-y { right: 4px; bottom: 92px; }
.cmd-b { right: 92px; bottom: 6px; }
.cmd-x { right: 70px; bottom: 84px; }
.cmd-y { right: 4px; bottom: 92px; }
.cmd-f { right: 154px; bottom: 66px; }
.cmd-p { right: 138px; bottom: 124px; }
.cmd-s1 { right: 154px; bottom: 6px; }
.cmd-s2 { right: 6px; bottom: 160px; }
.foot-actions { position: absolute; right: 10px; top: 46%; display: grid; gap: 12px; z-index: 21; }
.foot-actions .b { width: 78px; height: 78px; border-radius: 50%; padding: 0; font-size: 14px; line-height: 1.15; white-space: normal; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); touch-action: none; user-select: none; -webkit-user-select: none; }

/* ---- editeur d'avatar : onglets */
.onglets-avatar { display: flex; flex-wrap: wrap; gap: 6px; }
.onglets-avatar button { flex: none; min-height: 40px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--trait); background: transparent; color: var(--texte); font: inherit; font-weight: 700; cursor: pointer; }
.onglets-avatar button[aria-selected="true"] { background: var(--accent, #2D9CF6); border-color: transparent; color: #fff; }
.onglet-avatar { display: grid; gap: 10px; }

/* un panneau sur le cote (en bas sur telephone) : ce qu'il modifie reste visible (l'editeur d'avatar) */
.panneau.cote { top: 76px; bottom: 16px; left: auto; right: 16px; transform: none; width: min(460px, calc(100vw - 24px)); max-height: none; }
@media (max-width: 719px), (hover: none) and (max-height: 900px) {
  .panneau.cote { top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-height: 56vh; border-radius: 20px 20px 0 0; }
}

/* ---- l'espace jeux (🎮) : les appels a jouer, a accepter ou a lancer */
.jeux-bouton { position: relative; }
.jeux-bouton .pastille { margin-left: 2px; }
.espace-jeux h3 { margin: 16px 0 8px; }
.espace-jeux h3:first-child { margin-top: 0; }
.appel { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--trait); border-radius: 14px; padding: 10px 12px; background: rgba(143, 203, 255, 0.05); }
.appel.pour-moi { border-color: var(--bleu); background: rgba(45, 156, 246, 0.12); }
.appel-emoji { font-size: 24px; }
.appel-texte { min-width: 0; display: grid; gap: 2px; }
.appel-texte b { overflow-wrap: anywhere; }
.appel-texte small { color: var(--texte-2); }
.appel-boutons { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.appel-boutons .b { min-height: 38px; padding: 0 12px; }
.appel-form { display: grid; gap: 8px; }
.appel-form > b { margin-top: 4px; }
@media (max-width: 520px) {
  .appel { grid-template-columns: auto 1fr; }
  .appel-boutons { grid-column: 1 / -1; }
  .appel-boutons .b { flex: 1; }
}
/* ---- le tutoriel rapide (premier passage, puis Aide ou ☰) */
.tuto { display: grid; gap: 6px; text-align: center; }
.tuto-emoji { font-size: 54px; line-height: 1.1; }
.tuto h3 { margin: 4px 0; font-size: 20px; }
.tuto p { margin: 0 auto; max-width: 460px; color: var(--texte); }
.tuto-points { display: flex; gap: 6px; justify-content: center; margin: 10px 0 4px; }
.tuto-points i { width: 8px; height: 8px; border-radius: 99px; background: rgba(143, 203, 255, 0.3); transition: width 0.2s ease; }
.tuto-points i.actif { width: 22px; background: var(--bleu); }
.tuto .rangee { justify-content: center; }
/* telephone : 🎮 rond, sans le mot */
@media (hover: none), (max-width: 720px) {
  .mot-jeux { display: none; }
  .jeux-bouton { width: 44px; padding: 0; }
  .jeux-bouton .pastille { position: absolute; top: -5px; right: -5px; margin: 0; }
}

/* ---- telephone COUCHE (paysage, peu de hauteur) : les tableaux de jeu en bandeau compact en haut, au centre
   (entre le logo et les boutons) ; la pastille d'action en bas au centre, entre le joystick et les boutons ;
   les boutons de frappe centres verticalement, a droite. Le milieu de l'ecran reste au jeu. */
@media (hover: none) and (orientation: landscape) and (max-height: 520px) {
  .hud:has(.hud-seance, .hud-foot, .hud-basket, .hud-skate, .hud-ring) .piece { display: none; }
  .hud-seance, .hud-foot:not(.hud-volant), .hud-basket, .hud-skate, .hud-ring {
    top: max(6px, env(safe-area-inset-top)) !important; bottom: auto !important; left: 50% !important; right: auto !important;
    transform: translateX(-50%) !important; width: min(460px, calc(100vw - 400px)) !important; min-width: 0 !important;
    max-height: calc(100vh - 110px); overflow: auto; padding: 5px 10px !important; gap: 4px !important; border-radius: 14px;
  }
  .hud-seance h4, .hud-skate .skate-titre { font-size: 12px; }
  .hud-seance .stat, .hud-skate .skate-score { font-size: 18px; }
  .hud-seance .sous, .hud-seance small, .hud-basket small, .hud-skate small, .hud-ring p { display: none; }
  .hud-seance .rangee .b-plein, .hud-basket .rangee .b-plein { min-height: 38px; font-size: 15px; }
  .hud-seance .rangee .b, .hud-basket .rangee .b, .hud-skate .rangee .b { min-height: 38px; }
  .hud-basket .chrono { font-size: 18px; }
  .hud-basket .score { font-size: 15px; }
  .hud-foot .score-foot { font-size: 13px; }
  .roles-foot .b { min-height: 32px; font-size: 12px; padding: 0 8px; }
  .cmd-sport { transform: scale(0.82); transform-origin: bottom right; }
  .menu-foot { top: 52px !important; max-height: calc(100vh - 70px); }
  .jauge-foot { top: auto; bottom: 14px; left: 36%; }
  .souffle { width: 54px; height: 54px; margin: 0 auto; }
  .action { bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px)); max-width: calc(100vw - 320px); min-height: 44px; font-size: 15px; }
  .foot-actions { top: 50%; bottom: auto; transform: translateY(-38%); gap: 8px; right: max(10px, env(safe-area-inset-right)); }
  .foot-actions .b { width: 62px; height: 62px; font-size: 12px; }
  /* concours de basket et defi de tirs : on vise le panier / le but, en haut au centre -> le tableau passe a gauche
     (le joystick ne sert pas pendant un tir au poste) */
  .hud-basket { left: max(10px, env(safe-area-inset-left)) !important; transform: none !important; width: min(250px, 30vw) !important; top: 58px !important; }
  .hud-basket .rangee { flex-direction: column; }
  .hud-basket .rangee .b { width: 100%; }
  .hud-basket .basket-postes { flex-wrap: wrap; gap: 4px; }
  .hud:has(.hud-basket) .joystick { display: none !important; }
  /* borne d'arcade : la grille a gauche sur toute la hauteur ; le choix du jeu, l'aide et les boutons a droite
     (panneau plus large : le choix du jeu et les boutons tiennent chacun sur une ligne) */
  .panneau:has(.arcade-boite) { width: min(820px, calc(100vw - 24px)); }
  .arcade-boite { grid-template-columns: auto minmax(0, 1fr); align-items: start; justify-items: stretch; }
  .arcade-boite > .arcade { grid-column: 1; grid-row: 1 / span 3; width: min(480px, calc(86vh - 100px)); }
  .arcade-boite > :not(.arcade) { grid-column: 2; }
  .arcade-choix { justify-content: flex-start; }
  /* les messages ne cachent plus le tableau : sous lui (toast), ou au-dessus de la pastille d'action (banniere) */
  .toast { top: 150px; padding: 6px 14px; font-size: 14px; }
  .banniere { top: auto; bottom: max(64px, calc(env(safe-area-inset-bottom) + 60px)); width: min(560px, calc(100vw - 320px)); padding: 8px 14px; }
  .banniere b { font-size: 17px; }
  .banniere span { font-size: 12px; margin-top: 2px; }
}
/* telephone debout : pendant une seance ou un match (tableau en haut), les messages passent au-dessus de la pastille d'action */
@media (hover: none) and (orientation: portrait), (max-width: 720px) and (orientation: portrait) {
  .hud:has(.hud-seance, .hud-foot, .hud-skate, .hud-ring) .toast { top: auto; bottom: max(214px, calc(env(safe-area-inset-bottom) + 206px)); }
}
/* ---- circuit : stand (choix du vehicule), feux de depart, tableau de course */
.stand-course { display: grid; gap: 10px; }
.stand-course h4 { margin: 8px 0 0; }
.choix-vehicule .b.actif { background: var(--bleu); color: #fff; border-color: transparent; }
.feux-course { font: 800 26px var(--mono); letter-spacing: 0.06em; text-align: center; }
.hud-course .score-foot { font-size: 16px; }
.hud-course .sous-course { color: var(--texte-2); font: 700 14px var(--mono); }
/* echecs et dames : le choix du temps par coup, la pendule qui presse */
.delai-coup { min-height: 44px; padding: 0 12px; background: var(--verre-fort); color: var(--texte); border: 1px solid var(--trait); border-radius: 99px; font: inherit; font-weight: 700; }
.partie-info.presse { color: #F87171; }
/* ring : l'endurance sous les points de vie, cinq coups en boutons */
.hud-ring .barre.endurance { height: 5px; margin-top: 3px; }
.hud-ring .barre.endurance i { background: linear-gradient(90deg, #FBBF24, #34D399); }
.hud-ring .coup-boxe { min-height: 44px; padding: 0 12px; }

/* Espace ferme : son onglet de discussion ; la porte de l'espace Baddies (demande d'acces). */
.onglet-espace { border-color: #FF8FC8; }
.onglet-espace.actif { background: #FF5FB4; color: #fff; }
.fil-espace li.systeme { color: #FFB3DA; }
.formulaire-baddies { display: grid; gap: 10px; margin: 10px 0; }
.formulaire-baddies label { display: grid; gap: 4px; font-weight: 600; }
.formulaire-baddies input { min-height: 40px; }
.apercu-photo { max-width: 160px; max-height: 160px; border-radius: 12px; object-fit: cover; }
.baddies .petit { font-size: 0.85em; opacity: 0.8; }

/* ================================================================ la ville (Treichville) et la vie (22/10/2026) */
.vie-puce { gap: 6px; padding: 0 12px; font-variant-numeric: tabular-nums; }
.vie-puce .vie-argent { color: #FFD24A; }
.vie-puce .vie-niveau { font-size: 12px; color: var(--texte-2); }
.tel-bouton { position: relative; }
.tel-bouton .pastille { position: absolute; top: -4px; right: -4px; }
.heure-ville { font-weight: 700; font-size: 13px; background: var(--verre); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--trait); align-self: flex-start; font-variant-numeric: tabular-nums; }
.vie-objectif { position: absolute; top: max(112px, calc(env(safe-area-inset-top) + 106px)); left: var(--marge); max-width: min(420px, calc(100vw - 28px)); text-align: left; font: 600 13px/1.35 var(--affichage); color: var(--texte); background: rgba(13, 34, 64, 0.82); border: 1px solid rgba(255, 210, 74, 0.45); border-radius: 12px; padding: 6px 10px; }
.vie-objectif small { color: #FFD24A; font-weight: 700; }
.vie-gains { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); display: grid; gap: 6px; pointer-events: none; z-index: 26; }
.vie-gain { background: rgba(6, 78, 59, 0.92); border: 1px solid rgba(52, 211, 153, 0.6); color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 800; text-align: center; animation: gain-monte 2.6s ease forwards; white-space: nowrap; }
.vie-gain.perte { background: rgba(127, 29, 29, 0.92); border-color: rgba(248, 113, 113, 0.6); }
.vie-gain b { color: #FFD24A; }
.vie-gain small { display: block; font-weight: 600; font-size: 11px; color: #D1FAE5; }
@keyframes gain-monte { 0% { opacity: 0; transform: translateY(14px) scale(0.9); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px); } }
.jauge-vie { height: 9px; border-radius: 99px; background: rgba(143, 203, 255, 0.16); overflow: hidden; }
.jauge-vie span { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #A7F3D0); border-radius: 99px; transition: width 0.4s ease; }
.jauge-vie.bas span, .besoin.bas .jauge-vie span { background: linear-gradient(90deg, var(--erreur), #FCA5A5); }
.jauge-vie.temps span { background: linear-gradient(90deg, var(--alerte), #FDE68A); transition: width 0.45s linear; }
.vie-resume { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.vie-resume > div { display: grid; gap: 4px; background: rgba(143, 203, 255, 0.07); border: 1px solid var(--trait); border-radius: 14px; padding: 10px 12px; }
.vie-resume b { font-size: 18px; }
.vie-resume small { color: var(--texte-2); font-size: 12px; }
.besoins { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 14px; }
.besoin { display: grid; gap: 4px; font-size: 14px; }
.missions, .objectifs { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.objectifs { padding-left: 22px; list-style: decimal; }
.missions li { display: flex; justify-content: space-between; gap: 10px; background: rgba(143, 203, 255, 0.06); border-radius: 10px; padding: 7px 10px; }
.missions li small, .objectifs small { color: #FFD24A; white-space: nowrap; }
.missions li.fini, .objectifs li.fini { opacity: 0.6; }
.objectifs li.courant { font-weight: 800; color: #fff; }
.ma-vie h3, .comptoir h3 { margin: 16px 0 8px; font-size: 16px; }
.comptoir .articles { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.comptoir .articles li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; background: rgba(143, 203, 255, 0.06); border: 1px solid var(--trait); border-radius: 14px; padding: 8px 12px; }
.comptoir .articles li > span { font-weight: 700; }
.comptoir .articles li > small { color: var(--texte-2); grid-column: 1; }
.comptoir .articles li > b { color: #FFD24A; grid-column: 2; grid-row: 1; }
.comptoir .articles li > .b, .comptoir .articles li > .rangee { grid-column: 1 / -1; justify-self: start; margin: 0; }
.comptoir .articles li.verrou { opacity: 0.55; }
/* le grand catalogue des vehicules : onglets par rayon, badges de rarete, fiche technique */
.comptoir .onglets-vitrine { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.comptoir .onglets-vitrine .b { font-size: 0.82rem; padding: 6px 10px; }
.comptoir .articles li.rarete-rare { border-color: rgba(96, 165, 250, 0.55); }
.comptoir .articles li.rarete-tres-rare { border-color: rgba(34, 211, 238, 0.7); background: rgba(34, 211, 238, 0.07); }
.comptoir .articles li.rarete-unique { border-color: rgba(251, 191, 36, 0.8); background: rgba(251, 191, 36, 0.08); }
.comptoir .articles li.rarete-inestimable { border-color: #E0B43A; background: linear-gradient(135deg, rgba(224, 180, 58, 0.16), rgba(168, 85, 247, 0.1)); box-shadow: 0 0 0 1px rgba(224, 180, 58, 0.35) inset; }
.comptoir .fiche-vehicule { grid-column: 1 / -1; font-size: 0.85rem; }
.comptoir .fiche-vehicule summary { cursor: pointer; color: var(--texte-2); }
.comptoir .fiche-vehicule dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0; }
.comptoir .fiche-vehicule dt { color: var(--texte-2); }
.comptoir .fiche-vehicule dd { margin: 0; }
.comptoir .fiche-vehicule p { margin: 4px 0 0; line-height: 1.4; }
/* l'atelier de personnalisation */
.comptoir.atelier .apercu-voiture { display: block; width: 100%; height: 210px; border-radius: 14px; background: radial-gradient(circle at 50% 35%, #3B4452, #12161D); margin: 8px 0; }
.comptoir .nuancier { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.comptoir .nuancier .pastille { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); padding: 0; cursor: pointer; }
.comptoir .nuancier .pastille.carre { border-radius: 8px; }
.comptoir .nuancier .pastille.choisie { border-color: #FFD24A; box-shadow: 0 0 0 2px #FFD24A; }
.comptoir.atelier label { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.comptoir.atelier input[type="text"] { text-transform: uppercase; max-width: 9em; }
.comptoir .age { margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(251, 191, 36, 0.6); }
.note.alerte { color: var(--alerte) !important; }
.fondu-noir { position: fixed; inset: 0; background: #000; opacity: 0; transition: opacity 0.5s ease; z-index: 60; pointer-events: none; display: grid; place-items: center; }
.fondu-noir.noir { opacity: 1; pointer-events: auto; }
.fondu-noir.lent { transition-duration: 1.4s; }
.fondu-noir p { color: #888; font: 700 18px var(--mono); }
.b-rouge { background: #B91C1C; border-color: transparent; color: #fff; }

/* le volant (vehicules en ville) et les epreuves */
.hud-volant .score-foot { font-size: 15px; }
.boutons-epreuve { position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 14px; z-index: 22; pointer-events: none; }
.boutons-epreuve .gros-bouton { pointer-events: auto; width: 104px; height: 104px; border-radius: 50%; font-size: 17px; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); }
.jauges-epreuve { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; font-size: 13px; text-align: left; }
.hud:has(.boutons-epreuve) .bas-gauche, .hud:has(.boutons-epreuve) .joystick, .hud:has(.boutons-epreuve) .saut { display: none !important; }

/* les questions (bibliotheque, concours) et la caisse */
.question { font-size: 19px; font-weight: 800; margin: 10px 0 12px; line-height: 1.35; }
.choix-quiz { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.choix-quiz .b { border-radius: 14px; min-height: 52px; white-space: normal; text-align: left; justify-content: flex-start; padding: 8px 14px; line-height: 1.25; }
.classement-concours, .classement-clans { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 5px; }
.classement-concours li, .classement-clans li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; }
.classement-concours li.moi, .classement-clans li.moi { color: #FFD24A; font-weight: 800; }
.classement-clans li { border-left: 4px solid var(--c); padding-left: 8px; }
.classement-clans li small { flex-basis: 100%; color: var(--texte-2); font-size: 12px; }
.article-caisse { font-size: 64px; text-align: center; margin: 8px 0; }

/* le constructeur de maison */
.outil-maison { position: absolute; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(720px, calc(100vw - 20px)); background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 18px; padding: 8px 10px; display: grid; gap: 6px; z-index: 21; }
.outil-maison .rangee { margin: 0; justify-content: center; }
.outil-maison .rangee .b { min-height: 38px; padding: 0 12px; font-size: 14px; }
.palette { display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.bloc-choix { flex: 0 0 auto; width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 10px; background: var(--c); border: 2px solid rgba(255, 255, 255, 0.25); font-size: 18px; }
.bloc-choix.actif { border-color: #FFD24A; box-shadow: 0 0 0 3px rgba(255, 210, 74, 0.45); }
.outil-maison .note { text-align: center; color: var(--texte-2); font-size: 12px; }
.hud:has(.outil-maison) .bas-gauche, .hud:has(.outil-maison) .tel-boutons, .hud:has(.outil-maison) .action { display: none !important; }
.fonction-maison label { display: grid; gap: 4px; margin: 8px 0; font-weight: 700; }
.fonction-maison input, .fonction-maison select, .comptoir input, .comptoir select { min-height: 42px; border-radius: 10px; border: 1px solid var(--trait); background: rgba(7, 20, 39, 0.8); padding: 0 10px; font-size: 16px; }
.fonction-maison input[type="text"] { font-family: var(--mono); }

/* le telephone */
.contenu-tel h3 { margin: 4px 0 8px; font-size: 16px; }
.ami { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: rgba(255, 255, 255, 0.07); border-radius: 12px; padding: 8px 10px; margin: 6px 0; }
.ami > div:first-child { display: grid; gap: 2px; }
.ami small { color: var(--texte-2); font-size: 12px; }
.ami .rangee { margin: 0; flex-wrap: nowrap; }
.ami .b { min-height: 36px; padding: 0 10px; }
.barre-appel { position: absolute; top: max(66px, calc(env(safe-area-inset-top) + 60px)); left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; background: rgba(6, 78, 59, 0.95); border: 1px solid rgba(52, 211, 153, 0.6); border-radius: 18px; padding: 8px 12px; z-index: 30; max-width: calc(100vw - 20px); }
.barre-appel .b { min-height: 36px; padding: 0 12px; font-size: 14px; }
.barre-appel.enregistre { background: rgba(127, 29, 29, 0.95); border-color: rgba(248, 113, 113, 0.6); }
.chrono-appel { font: 700 14px var(--mono); }

/* l'editeur d'avatar : « Enregistrer » toujours visible (des membres ne le trouvaient pas en bas du panneau) */
.editeur .rangee.final { position: sticky; bottom: -18px; margin: 12px -18px -18px; padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); background: rgba(7, 20, 39, 0.97); border-top: 1px solid var(--trait); z-index: 2; }
.editeur .rangee.final .b-plein { flex: 1; min-height: 50px; font-size: 16px; }
.panneau-tete .terminer { min-height: 38px; padding: 0 14px; }

@media (hover: none), (max-width: 720px) {
  .vie-puce .vie-niveau { display: none; }
  .vie-puce { padding: 0 10px; min-width: 0; }
  .vie-objectif { top: calc(var(--sous-haut) + 6px); font-size: 12px; max-width: calc(100vw - 180px); }
  .hud.chat-ouvert .vie-objectif { display: none; }
  .vie-gains { top: calc(var(--sous-haut) + 40px); }
  .boutons-epreuve .gros-bouton { width: 92px; height: 92px; }
  .outil-maison { bottom: max(8px, env(safe-area-inset-bottom)); }
}

/* ---- la ville : radar, fleche vers la destination, grande carte facon GTA, blagues ---- */
.radar-wrap { position: absolute; top: 74px; right: var(--marge); width: 112px; height: 112px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; z-index: 3; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)); }
.radar-wrap[hidden] { display: none; }
.radar-ville { width: 100%; height: 100%; display: block; border-radius: 50%; }
.guide-repere { position: fixed; left: 0; top: 0; z-index: 4; pointer-events: none; display: flex; flex-direction: column; align-items: center; margin: -26px 0 0 -26px; width: 52px; text-align: center; }
.guide-repere[hidden] { display: none; }
.guide-repere .fleche { width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-bottom: 30px solid #E11D48; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
.guide-repere .nom { font-size: 11px; line-height: 1.1; color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px #000; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.guide-repere .dist { font-size: 12px; font-weight: 800; color: #FDE68A; text-shadow: 0 1px 3px #000; }
.carte-boite { display: flex; flex-direction: column; gap: 10px; }
.carte-gta { width: 100%; height: min(56vh, 540px); border-radius: 14px; background: #1B2A38; touch-action: none; cursor: grab; display: block; }
.carte-fiche { min-height: 70px; }
.carte-fiche-tete { display: flex; align-items: baseline; gap: 6px; font-size: 16px; }
.carte-puces { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.puce-lieu { flex: 0 0 auto; font-size: 13px; padding: 6px 10px; white-space: nowrap; }
.blagues .blague { font-size: 18px; line-height: 1.4; padding: 14px; border-radius: 14px; background: rgba(250, 204, 21, 0.14); }
@media (max-width: 720px) {
  .radar-wrap { width: 92px; height: 92px; top: var(--sous-haut, 64px); }
}

/* ---- la maison facon Minecraft : barre de materiaux (avec leur nombre) et boutique ---- */
.hotbar { justify-content: center; }
.bloc-choix { position: relative; width: 50px; height: 50px; min-height: 50px; }
.bloc-choix .bloc-nombre { position: absolute; right: 3px; bottom: 1px; font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.bloc-choix .bloc-num { position: absolute; left: 4px; top: 2px; font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 2px #000; }
.boutique-maison .article-maison { display: grid; grid-template-columns: 38px 1fr auto; gap: 2px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--trait); list-style: none; }
.boutique-maison .article-maison small { grid-column: 2; color: var(--texte-2); }
.boutique-maison .article-maison .b { grid-column: 3; grid-row: 1 / span 2; }
.boutique-maison .pastille-bloc { grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-style: normal; border: 2px solid rgba(255, 255, 255, 0.25); }
.boutique-maison .articles { padding: 0; margin: 0; }
.boutique-maison input[type=number] { width: 80px; }
@media (max-width: 720px) { .carte-bouton { display: none; } }

/* L'action en ville : etoiles de recherche, PV, munitions, braquage, prison, K.-O. */
.hud-action { position: absolute; top: 196px; right: var(--marge, 12px); display: grid; gap: 4px; justify-items: end; z-index: 21; background: var(--verre-fort); border: 1px solid var(--trait); border-radius: 14px; padding: 8px 12px; max-width: min(300px, 70vw); }
.hud-action .act-etoiles { font-size: 17px; color: #fbbf24; }
.hud-action .act-pv { display: block; width: 130px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.hud-action .act-pv span { display: block; height: 100%; background: #22c55e; transition: width .2s; }
.hud-action small { color: var(--texte-2); text-align: right; }
.hud-action .act-alerte { color: #fca5a5; }
.act-boutons { position: absolute; left: max(10px, env(safe-area-inset-left)); top: 34%; display: grid; gap: 10px; z-index: 21; }
.act-boutons .b { width: 58px; height: 58px; border-radius: 50%; padding: 0; font-size: 22px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); touch-action: none; user-select: none; -webkit-user-select: none; }
.act-boutons .b.tir { background: #b91c1c; border-color: #ef4444; }
.barre-braquage { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); width: min(380px, calc(100vw - 32px)); background: rgba(20,10,10,.82); border: 1px solid #ef4444; border-radius: 14px; padding: 10px 14px; display: grid; gap: 6px; text-align: center; z-index: 30; }
.barre-braquage i { display: block; height: 10px; border-radius: 6px; background: rgba(255,255,255,.15); overflow: hidden; }
.barre-braquage i span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ef4444, #f59e0b); }
.overlay-prison { position: absolute; top: max(150px, calc(env(safe-area-inset-top) + 144px)); left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); display: grid; gap: 4px; text-align: center; background: rgba(40, 12, 12, .82); border: 1px solid #7f1d1d; border-radius: 16px; padding: 10px 14px; z-index: 25; pointer-events: none; color: #e5e7eb; box-shadow: 0 0 0 100vmax rgba(10, 12, 16, .18); }
.overlay-prison .b { pointer-events: auto; margin-top: 8px; }
.overlay-prison h2 { margin: 0; font-size: 16px; }
.overlay-prison b { font-size: 26px; font-variant-numeric: tabular-nums; }
.overlay-prison small { color: #fca5a5; }
.overlay-ko { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; background: radial-gradient(circle, rgba(0,0,0,.2), rgba(120,0,0,.55)); z-index: 26; pointer-events: none; color: #fff; }
.overlay-ko b { font-size: 40px; }
.flash-rouge { position: absolute; inset: 0; background: rgba(220,38,38,.38); z-index: 27; pointer-events: none; animation: flashRouge .35s ease-out forwards; }
@keyframes flashRouge { to { opacity: 0; } }

.flash-blanc { position: absolute; inset: 0; background: rgba(255,255,255,.85); z-index: 27; pointer-events: none; animation: flashRouge .9s ease-out forwards; }
.combo-boxe { margin: 2px 0; font-weight: 800; color: #fbbf24; font-size: 18px; text-shadow: 0 0 10px rgba(251,191,36,.6); }
canvas.secoue { animation: secoue .3s linear; }
@keyframes secoue { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-7px, 3px); } 40% { transform: translate(6px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -2px); } }
@media (max-width: 700px) {
  .barre-braquage { bottom: 32%; width: min(320px, calc(100vw - 120px)); }
  .hud-action { top: calc(var(--sous-haut, 64px) + 100px); padding: 6px 10px; }
  .hud-action .act-etoiles { font-size: 15px; }
}

/* au volant : sur telephone, une petite pastille en haut a gauche (la route reste visible) ; sur ordinateur, le bouton de saut */
.hud-volant .bouton-saut { flex-basis: 100%; min-height: 54px; font-size: 18px; }
/* telephone au volant (classe « compact », mise par le jeu quand on joue au doigt) : la vitesse et quatre petits boutons ronds
   sur le bord gauche, au milieu de l'ecran ; rien au-dessus de la barre du haut, la route reste libre */
.hud-foot.hud-volant.compact { position: fixed; top: 50%; bottom: auto; left: 8px; right: auto; transform: translateY(-58%); width: auto; max-width: 96px; padding: 0; gap: 6px; text-align: center; background: none; border: 0; box-shadow: none; display: grid; justify-items: start; z-index: 12; }
.hud-volant.compact .score-foot { font-size: 12px; line-height: 1.15; white-space: pre-line; background: rgba(8, 14, 28, 0.66); padding: 4px 8px; border-radius: 10px; }
.hud-volant.compact .rangee { display: grid; grid-template-columns: 1fr; justify-content: start; gap: 6px; margin: 0; }
.hud-volant.compact .rangee .b { min-height: 40px; min-width: 40px; width: 40px; padding: 0; font-size: 18px; border-radius: 50%; background: rgba(8, 14, 28, 0.66); }
}

/* le catalogue : supermarche et bar (photo, nom, prix de chaque article) */
.catalogue .rayons { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.puce-rayon { flex: 0 0 auto; border: 1px solid var(--trait); background: rgba(255, 255, 255, 0.06); color: var(--texte); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.puce-rayon.actif { background: var(--accent, #1a8cf0); border-color: transparent; color: #fff; font-weight: 700; }
.grille-produits { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.fiche-produit { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 8px 8px 10px; border: 1px solid var(--trait); border-radius: 14px; background: rgba(255, 255, 255, 0.05); }
.fiche-produit.verrou { opacity: 0.5; }
.fiche-produit .photo-produit { width: 100%; max-width: 120px; height: auto; aspect-ratio: 120 / 150; border-radius: 10px; background: #eef2f8; }
.fiche-produit .nom-produit { font-size: 14px; line-height: 1.2; }
.fiche-produit small { color: var(--texte-2); font-size: 11px; line-height: 1.25; }
.fiche-produit .prix-produit { color: #FFD24A; font-weight: 800; font-variant-numeric: tabular-nums; }
.fiche-produit .rangee { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.fiche-produit .rangee .b { min-height: 38px; padding: 0 12px; font-size: 14px; }
@media (max-width: 520px) { .grille-produits { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

.onglet-lieu { max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onglet-lieu span { overflow: hidden; text-overflow: ellipsis; }

.voile-maison { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(5, 10, 30, 0.72); color: #fff; font: 700 clamp(1.4rem, 5vw, 2.4rem) "Bricolage Grotesque", system-ui, sans-serif; text-align: center; animation: voile-maison 3.2s ease both; pointer-events: none; }
@keyframes voile-maison { 0% { opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.plat { font-size: 1.6rem; text-align: center; margin: 0.4rem 0; }

/* animalerie et mes animaux */
.carte-animal { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 0.9rem; padding: 0.7rem; margin: 0.6rem 0; border-radius: 14px; background: color-mix(in srgb, currentColor 6%, transparent); }
.carte-animal .soins-animal, .carte-animal .rangee { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.portrait-animal { border-radius: 12px; width: 96px; height: auto; }
.infos-animal { display: grid; gap: 0.25rem; align-content: start; }
.besoins-animal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.25rem; }
.besoin-animal { display: grid; gap: 0.1rem; justify-items: center; font-size: 0.9rem; }
.besoin-animal i { display: block; width: 100%; height: 6px; border-radius: 3px; background: rgba(120, 120, 120, 0.35); overflow: hidden; }
.besoin-animal b { display: block; height: 100%; }
.soins-animal .b small { font-size: 0.72rem; }
.mini-animal { width: 36px; border-radius: 8px; }
.emoji-produit { font-size: 3.2rem; text-align: center; padding: 1rem 0; }
.adoption { display: grid; gap: 0.6rem; justify-items: center; text-align: center; }
.puce-couleur { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.puce-couleur.choisie { border-color: #fff; box-shadow: 0 0 0 2px #0B2545; }
.couleurs-animal { justify-content: center; }

/* emplois, competences, IA, tutoriels */
.tuto-tel { margin: 0 0 0.8rem; padding: 0.55rem 0.8rem; border-radius: 12px; background: rgba(250, 204, 21, 0.14); border: 1px solid rgba(250, 204, 21, 0.45); font-size: 0.92rem; }
.tuto-tel summary { cursor: pointer; font-weight: 700; }
.tuto-tel ol { margin: 0.5rem 0 0 1.1rem; padding: 0; display: grid; gap: 0.3rem; }
.carte-emploi { display: grid; gap: 0.45rem; padding: 0.8rem; margin: 0.6rem 0; border-radius: 14px; background: color-mix(in srgb, currentColor 6%, transparent); }
.grille-competences { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.5rem; }
.competence { display: grid; gap: 0.2rem; padding: 0.6rem; border-radius: 12px; border: 2px solid color-mix(in srgb, var(--c) 40%, transparent); opacity: 0.8; }
.competence.acquise { opacity: 1; background: color-mix(in srgb, var(--c) 18%, transparent); border-color: var(--c); }
.competence .pouvoir { opacity: 0.8; font-size: 0.78rem; }
.offres li.verrou { opacity: 0.6; }
.offres { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.offres li { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.8rem; align-items: center; padding: 0.6rem 0.8rem; border-radius: 12px; background: color-mix(in srgb, currentColor 6%, transparent); }
.offres li small { grid-column: 1; opacity: 0.8; }
.offres li b { grid-column: 2; grid-row: 1; color: #FACC15; }
.offres li .rangee { grid-column: 2; grid-row: 2; display: flex; gap: 0.4rem; justify-content: flex-end; }
.conditions { margin: 0.2rem 0; padding-left: 1.2rem; display: grid; gap: 0.2rem; font-size: 0.92rem; }

/* le telephone achete : coloris et encoche */
.livraisons { display: grid; gap: 0.4rem; }
.livraison { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.6rem; padding: 0.55rem 0.7rem; border-radius: 12px; background: color-mix(in srgb, currentColor 6%, transparent); }
.livraison small { grid-column: 2; opacity: 0.8; }
.livraison.verrou { opacity: 0.55; }

/* telephone couche : les boutons du volant en rangee sous l'objectif (le joystick garde le bas de l'ecran) */
@media (hover: none) and (orientation: landscape) and (max-height: 520px), (orientation: landscape) and (max-height: 520px) {
  .hud-foot.hud-volant.compact { top: 112px; transform: none; max-width: none; }
  .hud-volant.compact .rangee { grid-template-columns: none; grid-auto-flow: column; }
}

/* bourse, entreprises, classements */
.courbe { display: block; max-width: 100%; height: auto; }
.cours-detail .courbe { width: 100%; }
.prix-ligne { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; }
.gros-prix { font-size: 1.6rem; font-weight: 800; }
.hausse { color: #22C55E; font-weight: 700; }
.baisse { color: #EF4444; font-weight: 700; }
.marche-cours li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 0.5rem; align-items: center; cursor: pointer; }
.podium { list-style: none; margin: 0.4rem 0; padding: 0; display: grid; gap: 0.35rem; }
.podium li { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: 0.1rem 0.6rem; align-items: center; padding: 0.5rem 0.7rem; border-radius: 12px; background: color-mix(in srgb, currentColor 6%, transparent); }
.podium li.moi { outline: 2px solid #FACC15; }
.podium .rang { font-size: 1.2rem; text-align: center; }
.podium small { grid-column: 2; opacity: 0.75; }
.podium li > b:last-child { grid-column: 3; grid-row: 1 / span 2; color: #FACC15; }
.offres li .rangee { grid-column: 1 / -1; grid-row: auto; flex-wrap: wrap; justify-content: flex-end; }
.offres li .rangee input { flex: 1 1 150px; min-width: 0; }

/* mode foot : les boutons d'action en deux colonnes sous le pouce droit */
.foot-actions.foot-actions-mode { top: max(72px, calc(env(safe-area-inset-top) + 66px)); bottom: auto; transform: none; grid-template-columns: repeat(2, 58px); gap: 6px; right: max(8px, env(safe-area-inset-right)); }
.foot-actions.foot-actions-mode .b { width: 58px; height: 58px; min-width: 0; min-height: 0; font-size: 11px; line-height: 1.1; border-radius: 50%; padding: 0; }
@media (orientation: portrait) { .foot-actions.foot-actions-mode { top: 44%; } }

/* le compteur rond du mode voiture */
.cadran-voiture { position: absolute; right: 92px; bottom: 26px; z-index: 11; pointer-events: none; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.cadran-voiture.compact { right: auto; left: 8px; bottom: auto; top: calc(var(--sous-haut, 64px) + 72px); }
@media (orientation: landscape) and (max-height: 520px) { .cadran-voiture.compact { top: 160px; } }

.hud-volant.compact .score-foot { display: none; }

/* ---- Ways, courrier, idees, fete, casino (espace Late) ---- */
.ways input, .idees input, .idees textarea, .idees select, .casino input { width: 100%; margin: 6px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--trait); background: rgba(7, 20, 39, 0.6); }
.idees textarea { resize: vertical; min-height: 110px; }
.carte-ways { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, #0B5FA5, #13A89E); color: #fff; }
.carte-ways > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.carte-ways small { flex-basis: 100%; opacity: 0.85; }
.carte-ways b { font: 700 16px var(--mono); letter-spacing: 0.04em; }
.contacts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.cible-ok { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: rgba(52, 211, 153, 0.12); border: 1px solid var(--ok); }
.courrier li.non-lu { border-color: #FFD24A; background: rgba(255, 210, 74, 0.1); }
.courrier li .gain { color: #FFD24A; }
.pastille.douce, .app .pastille { position: absolute; top: -2px; right: -2px; }
.fete .gros, .casino .gros { font-size: 18px; font-weight: 800; color: #FFD24A; }
.succes { color: var(--ok); font-weight: 700; }
.ami.volee { border: 1px solid var(--erreur); background: rgba(248, 113, 113, 0.1); }
.table-casino { display: grid; gap: 10px; justify-items: center; padding: 14px; margin: 8px 0; border-radius: 18px; background: radial-gradient(circle at 50% 30%, #0F5B3A, #06301F); border: 2px solid #C9A24A; }
.rouleaux, .des { display: flex; gap: 10px; }
.rouleau, .de { display: grid; place-items: center; width: 78px; height: 92px; border-radius: 14px; background: #fff; color: #111; font-size: 48px; box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.18); }
.de { width: 74px; height: 74px; font-size: 56px; }
.rouleau.tourne, .de.tourne, .pile.tourne { animation: casino-secoue 0.18s linear infinite; }
@keyframes casino-secoue { 0% { transform: translateY(-4px); } 50% { transform: translateY(4px); } 100% { transform: translateY(-4px); } }
.num-roulette { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; border: 4px solid #C9A24A; color: #fff; font: 800 34px var(--affichage); }
.histo-roulette { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.histo-roulette i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font: 700 12px var(--mono); font-style: normal; }
.piece .pile { display: grid; place-items: center; min-width: 120px; height: 90px; font-size: 34px; font-weight: 800; }
.gros-bouton { width: 100%; padding: 14px; font-size: 18px; }

/* la course de velo : volant a gauche, pedales et frein a droite (les memes commandes qu'en conduite) */
.boutons-epreuve.velo { justify-content: space-between; padding: 0 max(12px, env(safe-area-inset-left)); }
.boutons-epreuve .groupe { display: flex; gap: 10px; align-items: flex-end; }
.boutons-epreuve .gros-bouton.petit { width: 78px; height: 78px; font-size: 14px; line-height: 1.1; }
@media (max-width: 760px) { .boutons-epreuve .gros-bouton.petit { width: 70px; height: 70px; font-size: 13px; } }

/* ---- version commerciale : banniere de pub du telephone, applis Immobilier / Groupes / Pub ---- */
.banniere-pub { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 10px; padding: 8px 12px; border-radius: 12px; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.banniere-pub small { opacity: 0.8; font-size: 0.75em; }
.immo input, .groupes input, .pub input { width: 100%; margin: 4px 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--trait); background: rgba(7, 20, 39, 0.6); color: inherit; }
.groupes .fil { max-height: 40vh; overflow-y: auto; }

/* ---------- la poursuite : etoiles de recherche, radio de la police, ecrans BUSTED / ECHAPPE ---------- */
.pq-haut { position: absolute; top: calc(var(--sous-haut, 64px) + 6px); left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; z-index: 24; pointer-events: none; width: min(420px, calc(100vw - 150px)); }
.pq-etoiles { display: flex; gap: 4px; font-size: 26px; line-height: 1; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.pq-etoiles span { color: rgba(255, 255, 255, .28); }
.pq-etoiles span.plein { color: #fbbf24; }
.pq-etoiles.vu span.plein { animation: pqClignote .5s steps(2, jump-none) infinite; }
.pq-etoiles.vu span.plein:nth-child(even) { animation-delay: .25s; }
@keyframes pqClignote { 0% { color: #60a5fa; text-shadow: 0 0 12px #2563eb; } 100% { color: #ef4444; text-shadow: 0 0 12px #dc2626; } }
.pq-cache { color: #e5e7eb; background: rgba(8, 14, 28, .72); padding: 3px 10px; border-radius: 999px; font-size: 12px; text-align: center; }
.pq-cache:empty { display: none; }
.pq-cache.alerte { color: #fecaca; background: rgba(127, 29, 29, .8); }
.pq-radio { display: grid; gap: 3px; width: 100%; }
.pq-radio div { background: rgba(8, 14, 28, .78); border-left: 3px solid #3b82f6; color: #dbeafe; font: 600 12px/1.25 ui-monospace, Menlo, Consolas, monospace; padding: 4px 8px; border-radius: 6px; animation: pqRadio .25s ease-out; }
@keyframes pqRadio { from { opacity: 0; transform: translateY(-6px); } }
.act-veh span { transition: width .2s, background .2s; }
.pq-fin { position: absolute; inset: 0; z-index: 40; display: grid; place-content: center; gap: 10px; text-align: center; color: #fff; padding: 16px; cursor: pointer; animation: pqFin .5s ease-out; overflow-y: auto; }
.pq-fin.busted { background: radial-gradient(circle at 50% 40%, rgba(30, 58, 138, .55), rgba(127, 29, 29, .82)); }
.pq-fin.echappe { background: radial-gradient(circle at 50% 40%, rgba(180, 130, 20, .35), rgba(8, 14, 28, .85)); }
.pq-fin h1 { margin: 0; font-size: clamp(44px, 14vw, 96px); letter-spacing: .08em; font-weight: 900; text-shadow: 0 4px 26px rgba(0, 0, 0, .7); }
.pq-fin.busted h1 { color: #fecaca; text-shadow: 0 0 30px #ef4444, 0 0 60px #2563eb; }
.pq-fin.echappe h1 { color: #fde68a; text-shadow: 0 0 30px #f59e0b; }
.pq-fin dl { display: grid; grid-template-columns: auto auto; gap: 4px 18px; justify-content: center; margin: 0 auto; text-align: left; background: rgba(0, 0, 0, .35); border-radius: 14px; padding: 12px 18px; }
.pq-fin dt { color: #cbd5e1; } .pq-fin dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.pq-fermer { color: #94a3b8; }
@keyframes pqFin { from { opacity: 0; transform: scale(1.06); } }
/* telephone : les boutons de tir / menottes / sirene sont a droite, au-dessus des gaz et du frein ; en paysage ils restent sur le bord */
@media (max-width: 700px) { .pq-haut { width: calc(100vw - 130px); } .pq-etoiles { font-size: 22px; } .pq-radio div { font-size: 11px; } }
@media (max-height: 460px) and (orientation: landscape) {
  .pq-haut { top: 50px; width: min(360px, 44vw); } .pq-etoiles { font-size: 20px; } .pq-radio { display: none; }
  .pq-fin { place-content: start center; padding-top: 8px; } .pq-fin h1 { font-size: 38px; } .pq-fin dl { padding: 6px 12px; font-size: 12px; }
  .act-boutons { top: 14%; gap: 6px; } .act-boutons .b { width: 50px; height: 50px; }
}
@media (max-width: 700px) and (orientation: portrait) { .act-boutons { left: auto; right: 12px; top: 30%; } }
@media (max-height: 460px) and (orientation: landscape) { .hud-action { top: auto; bottom: 6px; right: 110px; max-width: 210px; padding: 5px 9px; } }

/* Tactile : toutes les cibles font au moins 44 px (onglets, fermer, petits boutons de panneaux) ; la manette surligne son choix */
@media (hover: none), (pointer: coarse) {
  .onglet, .fermer-chat, .prive-choix .b, .proche-actions .b, .notif-actions .b, .voir-avatar, .choix-mots button, .arcade-choix .b, .salon .places .b, .admin-actions .b { min-height: 44px; }
  .fermer-chat { min-width: 44px; }
  .proche-tete { min-height: 44px; }
}
/* Petit telephone (375 px) : cinq boutons en haut ne laissent plus de place au logo et a l'heure, qui apparaissaient en morceaux sous la pastille d'argent */
@media (max-width: 420px) { .marque { overflow: hidden; } }

/* ---- l'ecran de traversee (voyages : avion, bateau, route) ---- */
.voyage-ecran { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; overflow: hidden; background: linear-gradient(#0b1d3a, #12335f 55%, #0b1d3a); color: #fff; outline: none; }
.voyage-ecran.route { background: linear-gradient(#1b2a49, #3b4a6b 55%, #1b2a49); }
.voyage-ecran.bateau { background: linear-gradient(#0b2a4a, #0e4a7a 55%, #07294a); }
.voyage-ciel { position: absolute; inset: 0 0 38% 0; background: radial-gradient(circle at 78% 30%, rgba(255, 244, 200, .55), transparent 18%), linear-gradient(rgba(125, 211, 252, .18), transparent); }
.voyage-sol { position: absolute; left: -50%; right: -50%; bottom: 0; height: 38%; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .10) 0 40px, transparent 40px 120px), linear-gradient(rgba(14, 116, 144, .55), rgba(8, 47, 73, .9)); animation: voyage-defile 2.4s linear infinite; }
.voyage-ecran.route .voyage-sol { background: repeating-linear-gradient(90deg, #f8fafc 0 60px, transparent 60px 160px) 0 50% / 100% 8px no-repeat, linear-gradient(#374151, #1f2937); }
.voyage-vehicule { position: absolute; left: 50%; bottom: 30%; font-size: 64px; transform: translateX(-50%); animation: voyage-tangue 2.6s ease-in-out infinite; }
.voyage-ecran.avion .voyage-vehicule { bottom: 52%; animation-duration: 3.4s; }
.voyage-carte { position: relative; z-index: 1; width: min(92vw, 460px); padding: 18px 20px; border-radius: 18px; background: rgba(8, 20, 40, .72); border: 1px solid rgba(143, 203, 255, .35); backdrop-filter: blur(6px); text-align: center; }
.voyage-carte h2 { margin: 0 0 6px; font-size: 20px; }
.voyage-carte p { margin: 4px 0; }
.voyage-barre { height: 10px; margin: 14px 0 8px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.voyage-barre i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #38bdf8, #fde68a); transition: width .25s linear; }
.voyage-carte small { display: block; margin-top: 8px; opacity: .75; }
@keyframes voyage-defile { to { transform: translateX(-120px); } }
@keyframes voyage-tangue { 50% { transform: translateX(-50%) translateY(-6px) rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .voyage-sol, .voyage-vehicule { animation: none; } }

.apercu-vehicule { min-height: 190px; margin-bottom: 8px; }
.comptoir .articles li.choisi { border-color: var(--accent, #7DD3FC); }

/* Braquages en phases, equipe, armes (facon GTA V) */
.barre-braquage .etapes-braquage { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; font-size: 11px; }
.barre-braquage .etapes-braquage span { padding: 2px 8px; border-radius: 10px; background: rgba(255,255,255,.1); color: var(--texte-2); }
.barre-braquage .etapes-braquage span.fait { background: rgba(34,197,94,.25); color: #bbf7d0; }
.barre-braquage .etapes-braquage span.en-cours { background: rgba(239,68,68,.35); color: #fff; font-weight: 700; }
.barre-braquage.alarme { animation: alarme-braquage .5s steps(2) infinite; }
@keyframes alarme-braquage { 50% { border-color: #3b82f6; box-shadow: 0 0 22px rgba(59,130,246,.7); } }
.barre-braquage small { color: var(--texte-2); }
.invitation-braquage { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); width: min(340px, calc(100vw - 32px)); display: grid; gap: 8px; text-align: center; padding: 12px 14px; border-radius: 14px; border: 1px solid #f59e0b; background: rgba(20,14,6,.9); z-index: 31; }
.invitation-braquage small { color: var(--texte-2); }
/* ================================================================ le telephone (31/10/2026) : docs/TELEPHONE.md
   Ecran d'accueil a pages, dock, barre d'etat, volet de notifications, applis dans l'ecran. Tout ce qui bouge utilise
   transform/opacity (fluide au doigt) ; « reduire les animations » coupe les transitions. */
.panneau.panneau-tel { background: transparent; border: 0; box-shadow: none; padding: 0; overflow: visible; }
.panneau.panneau-tel .panneau-tete { display: none; }
.panneau.panneau-tel .panneau-corps { padding: 0; overflow: visible; }
.telephone { display: grid; place-items: center; }
.coque-tel { --larg: 330px; position: relative; width: min(var(--larg), 100%); height: min(700px, calc(100vh - 110px), calc(100dvh - 110px)); display: flex; flex-direction: column; gap: 8px; border-radius: 42px; padding: 11px 11px 8px; background: linear-gradient(160deg, color-mix(in srgb, var(--coque, #1E293B) 80%, #fff 10%), color-mix(in srgb, var(--coque, #1E293B) 70%, #000)); border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(0, 0, 0, 0.35); }
.coque-tel.fin { border-radius: 30px; padding: 16px 12px 10px; }
.ecran-tel { --lum: 1; position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 32px; background: #050E1C; color: #fff; isolation: isolate; filter: brightness(var(--lum)); touch-action: manipulation; }
.coque-tel.fin .ecran-tel { border-radius: 20px; }
.tel-fond { position: absolute; inset: 0; z-index: -1; }
.tel-barre { position: absolute; top: 0; left: 0; right: 0; z-index: 6; height: 34px; padding: 6px 18px 0; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(rgba(0, 0, 0, 0.35), transparent); border: 0; color: #fff; font: 700 12px var(--mono); cursor: pointer; }
.tel-etat { display: flex; align-items: center; gap: 7px; }
.tel-reseau { opacity: 0.9; }
.tel-bat { position: relative; display: inline-flex; align-items: center; width: 30px; height: 14px; border-radius: 4px; border: 1.5px solid rgba(255, 255, 255, 0.85); overflow: hidden; }
.tel-bat i { position: absolute; inset: 0 auto 0 0; background: #34D399; }
.tel-bat.bas i { background: #F87171; }
.tel-bat.charge i { background: #FBBF24; }
.tel-bat b { position: relative; z-index: 1; margin: 0 auto; font-size: 9px; text-shadow: 0 0 3px #000; }
.coque-tel.ile .ecran-tel::before { content: ""; position: absolute; top: 8px; left: 50%; width: 78px; height: 22px; margin-left: -39px; border-radius: 14px; background: #000; z-index: 7; pointer-events: none; }
.coque-tel.goutte .ecran-tel::before { content: ""; position: absolute; top: 9px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #000; z-index: 7; pointer-events: none; }
.tel-accueil { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 38px 8px 30px; transition: opacity 0.2s, transform 0.2s; }
.tel-accueil.cache { opacity: 0; transform: scale(0.94); pointer-events: none; }
.tel-pages { flex: 1; min-height: 0; overflow: hidden; touch-action: pan-y; }
.tel-rail { display: flex; height: 100%; will-change: transform; }
.tel-page { flex: 0 0 100%; min-width: 0; height: 100%; padding: 0 4px; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.tel-widget { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 10px 12px; border-radius: 22px; background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.16); }
.tel-widget > div { display: grid; gap: 2px; }
.tel-widget .wd-heure { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.tel-widget small { opacity: 0.85; text-transform: capitalize; }
.tel-widget .wd-argent { text-align: right; }
.tel-widget .wd-argent b { color: #FFD24A; font-size: 14px; }
.apps { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 12px 2px; align-content: start; }
.app { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; background: none; border: 0; padding: 2px; color: #fff; min-width: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.app .icone { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(150deg, color-mix(in srgb, var(--c, #334155) 88%, #fff 12%), var(--c, #334155)); border: 1px solid rgba(255, 255, 255, 0.22); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3); transition: transform 0.12s; }
.app:active .icone { transform: scale(0.9); }
.app:hover .icone { filter: brightness(1.12); }
.app:focus-visible { outline: 2px solid #FFD24A; outline-offset: 1px; border-radius: 14px; }
.app small { max-width: 100%; font-size: 11px; font-weight: 700; line-height: 1.15; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .pastille { position: absolute; top: -3px; right: 2px; }
.tel-points { display: flex; justify-content: center; gap: 6px; padding: 8px 0 6px; }
.tel-points i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); transition: width 0.2s, background 0.2s; }
.tel-points i.actif { width: 16px; border-radius: 4px; background: #fff; }
.tel-dock { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 100%; gap: 2px; padding: 8px 6px; border-radius: 26px; background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(8px); }
.tel-couche { position: absolute; inset: 0; pointer-events: none; }
.tel-vue { position: absolute; inset: 0; display: flex; flex-direction: column; padding-top: 34px; background: linear-gradient(180deg, #0B1B33, #08121F); pointer-events: auto; will-change: transform; }
.tel-vue.entre { animation: tel-entre 0.22s cubic-bezier(.2, .8, .2, 1); }
.tel-vue.sort { animation: tel-sort 0.17s ease forwards; pointer-events: none; }
.tel-vue:not(:last-child) { visibility: hidden; }
@keyframes tel-entre { from { transform: scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tel-sort { to { transform: scale(0.92); opacity: 0; } }
.tel-tete { display: flex; align-items: center; gap: 6px; padding: 4px 10px 6px; }
.tel-tete h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tel-retour { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.tel-retour:hover { background: rgba(255, 255, 255, 0.2); }
.tel-corps { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px 12px 36px; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.tel-corps .contenu-tel h3 { margin: 12px 0 8px; font-size: 15px; }
.tel-heberge { padding: 0; max-height: none; overflow: visible; }
.tel-heberge .grille-produits { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.tel-bord { position: absolute; z-index: 8; }
.tel-bord-g { left: 0; top: 70px; bottom: 40px; width: 16px; touch-action: none; }
.tel-pilule { position: absolute; z-index: 8; left: 50%; bottom: 3px; width: 120px; height: 24px; margin-left: -60px; background: none; border: 0; padding: 0; touch-action: none; cursor: pointer; }
.tel-pilule::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 6px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.7); }
.geste-y { touch-action: none; }
.tel-nav { display: flex; gap: 6px; justify-content: center; }
.tel-nav .b { min-height: 34px; padding: 0 10px; font-size: 12px; background: rgba(0, 0, 0, 0.35); }
.tel-volet { position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; gap: 10px; padding: 40px 12px 6px; background: rgba(6, 14, 28, 0.94); backdrop-filter: blur(12px); transform: translateY(-102%); overflow-y: auto; }
.volet-tuiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tuile { display: grid; justify-items: center; gap: 2px; padding: 9px 2px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 20px; cursor: pointer; }
.tuile small { font-size: 10px; font-weight: 700; }
.tuile.actif { background: #2D9CF6; border-color: #fff; }
.volet-lum { display: flex; align-items: center; gap: 10px; }
.volet-lum input, .reglage-lum input { flex: 1; accent-color: #FFD24A; }
.volet-tete { display: flex; justify-content: space-between; align-items: center; }
.volet-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.notif-tel { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer; }
.notif-tel.lu { background: rgba(255, 255, 255, 0.05); }
.notif-corps { flex: 1; min-width: 0; display: grid; gap: 1px; }
.notif-corps b, .notif-corps small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-quand { opacity: 0.6; font-size: 10px; }
.icone-mini { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--c, #334155); flex: none; }
.volet-poignee { margin-top: auto; align-self: stretch; height: 30px; background: none; border: 0; cursor: pointer; touch-action: none; }
.volet-poignee i { display: block; width: 44px; height: 5px; margin: 0 auto; border-radius: 3px; background: rgba(255, 255, 255, 0.5); }
.tel-verrou { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 80px 18px 28px; text-align: center; background: rgba(5, 12, 24, 0.55); backdrop-filter: blur(10px); }
.tel-verrou[hidden] { display: none; }
.verrou-heure { font-size: 62px; line-height: 1; font-variant-numeric: tabular-nums; }
.verrou-date { text-transform: capitalize; opacity: 0.85; }
.verrou-notifs { width: 100%; display: grid; gap: 6px; margin-top: 16px; text-align: left; }
.verrou-ouvrir { margin-top: auto; }
.tel-noir { position: absolute; inset: 0; z-index: 12; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; background: #000; }
.tel-noir[hidden] { display: none; }
.noir-batterie { font-size: 56px; }
.cam-corps { display: flex; flex-direction: column; gap: 10px; align-items: center; padding-bottom: 8px; }
.cam-cadre { position: relative; width: 100%; max-width: 300px; aspect-ratio: 3 / 4; max-height: calc(100% - 130px); border-radius: 18px; overflow: hidden; background: #000; }
.cam-viseur { width: 100%; height: 100%; display: block; touch-action: none; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.pan { animation: cam-flash 0.28s ease-out; }
@keyframes cam-flash { 0% { opacity: 0.95; } 100% { opacity: 0; } }
.cam-info { position: absolute; top: 6px; left: 8px; font: 700 10px var(--mono); text-shadow: 0 1px 3px #000; }
.cam-zooms { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.cam-zoom { min-width: 36px; height: 30px; border-radius: 15px; border: 0; background: rgba(0, 0, 0, 0.55); color: #fff; font-weight: 800; cursor: pointer; }
.cam-zoom.actif { background: #FFD24A; color: #000; }
.cam-nuit { border: 0; border-radius: 12px; padding: 6px 12px; background: rgba(255, 255, 255, 0.12); color: #fff; font-weight: 700; cursor: pointer; }
.cam-commandes { display: flex; align-items: center; justify-content: space-around; width: 100%; max-width: 300px; }
.cam-declencheur { width: 68px; height: 68px; border-radius: 50%; border: 4px solid #fff; background: none; padding: 4px; cursor: pointer; }
.cam-declencheur span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform 0.1s; }
.cam-declencheur:active span { transform: scale(0.85); }
.cam-vignette { width: 48px; height: 48px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.5); background: #1E293B center / cover; cursor: pointer; }
.cam-bascule { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.14); font-size: 22px; cursor: pointer; }
.cam-stock { opacity: 0.75; }
.gal-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.gal-photo { aspect-ratio: 3 / 4; border: 0; border-radius: 8px; background: #1E293B center / cover; cursor: pointer; }
.gal-photo:focus-visible { outline: 2px solid #FFD24A; }
.gal-vue { display: grid; gap: 8px; }
.gal-grande { width: 100%; height: auto; max-height: 60vh; object-fit: contain; border-radius: 12px; background: #000; }
.gal-actions { flex-wrap: wrap; justify-content: center; }
.msg-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.msg-ligne { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.06); color: #fff; text-align: left; cursor: pointer; }
.msg-ligne:disabled { opacity: 0.5; cursor: default; }
.msg-ligne.non-lu { background: rgba(45, 156, 246, 0.2); }
.msg-rond { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
.msg-texte { flex: 1; min-width: 0; display: grid; }
.msg-texte small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.75; }
.msg-cote { display: grid; justify-items: end; gap: 3px; font-size: 10px; opacity: 0.9; }
.msg-nouveau { width: 100%; margin-bottom: 8px; }
.msg-conv { display: flex; flex-direction: column; height: 100%; min-height: 300px; }
.msg-fil { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 0 8px; }
.bulle { align-self: flex-start; max-width: 82%; padding: 7px 11px; border-radius: 16px 16px 16px 4px; background: rgba(255, 255, 255, 0.14); overflow-wrap: anywhere; display: grid; gap: 3px; }
.bulle.moi { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: #2563EB; }
.bulle small { font-size: 9px; opacity: 0.65; justify-self: end; }
.bulle-photo { max-width: 100%; border-radius: 10px; display: block; }
.msg-saisie { display: flex; gap: 6px; align-items: center; }
.msg-saisie .champ { flex: 1; min-width: 0; }
.msg-etat { min-height: 1em; }
.gps-corps { display: flex; flex-direction: column; gap: 8px; height: 100%; padding-bottom: 0 !important; }
.gps-haut { position: relative; z-index: 2; }
.gps-recherche { width: 100%; }
.gps-liste { position: absolute; left: 0; right: 0; top: 100%; z-index: 3; list-style: none; margin: 4px 0 0; padding: 4px; border-radius: 12px; background: #0B1B33; border: 1px solid var(--trait); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5); }
.gps-resultat { width: 100%; text-align: left; padding: 9px 8px; border: 0; background: none; color: #fff; border-radius: 8px; cursor: pointer; }
.gps-resultat:hover, .gps-resultat:focus-visible { background: rgba(255, 255, 255, 0.12); }
.gps-carte-boite { position: relative; flex: 1; min-height: 200px; border-radius: 16px; overflow: hidden; }
.gps-carte { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.gps-zoom { position: absolute; right: 6px; top: 6px; display: grid; gap: 6px; }
.gps-zoom .b-rond { width: 38px; height: 38px; min-height: 0; }
.gps-fiche { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; margin-bottom: 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.1); }
.gps-fleche { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: #2D9CF6; transition: transform 0.2s; flex: none; }
.gps-texte { flex: 1; min-width: 0; display: grid; gap: 2px; }
.gps-consigne { font-weight: 800; color: #FFD24A; }
.bq-carte { display: grid; gap: 4px; padding: 16px; border-radius: 20px; background: linear-gradient(135deg, #0F766E, #134E4A 60%, #042F2E); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.bq-solde { font-size: 28px; color: #FFD24A; }
.bq-iban { font-family: var(--mono); opacity: 0.8; }
.bq-dette { color: #FCA5A5; font-weight: 800; }
.bq-actions { margin: 10px 0; }
.reg-modele { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.reg-pastille { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5); flex: none; }
.reg-specs { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; font-size: 12px; }
.reg-specs li { display: grid; gap: 1px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.07); }
.reg-specs b { color: #CBD5E1; font-weight: 600; }
.fonds-grille { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.fond-choix { aspect-ratio: 9 / 14; border-radius: 10px; border: 2px solid transparent; cursor: pointer; }
.fond-choix.actif { border-color: #FFD24A; }
.reglage-ligne { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; margin-bottom: 4px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.07); color: #fff; text-align: left; cursor: pointer; }
.reglage-texte { display: grid; gap: 1px; }
.reglage-texte small { opacity: 0.7; font-size: 11px; }
.interrupteur { flex: none; width: 42px; height: 24px; border-radius: 12px; background: #475569; position: relative; transition: background 0.15s; }
.interrupteur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.interrupteur.actif { background: #34D399; }
.interrupteur.actif::after { transform: translateX(18px); }
.reglage-lum { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.reg-batterie { display: grid; gap: 4px; margin-bottom: 8px; }
.appel-carte { display: grid; gap: 6px; padding: 12px; border-radius: 16px; background: rgba(22, 163, 74, 0.25); border: 1px solid #16A34A; margin-bottom: 8px; }
/* sur un vrai telephone : le telephone du jeu occupe tout l'ecran (comme une appli) */
@media (max-width: 719px), (hover: none) {
  .panneau.cote.panneau-tel { top: 0; bottom: 0; left: 0; right: 0; width: 100%; max-height: none; border-radius: 0; display: grid; place-items: center; background: rgba(2, 6, 14, 0.82); backdrop-filter: blur(6px); }
  .panneau.panneau-tel .panneau-corps { width: 100%; height: 100%; display: grid; place-items: center; }
  .telephone { width: 100%; height: 100%; }
  .coque-tel { width: min(430px, 100%); height: 100%; max-height: 100dvh; border-radius: 0; padding: max(8px, env(safe-area-inset-top)) 6px max(6px, env(safe-area-inset-bottom)); }
  .coque-tel .ecran-tel { border-radius: 26px; }
  .tel-nav .b { min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .tel-vue.entre, .tel-vue.sort, .cam-flash.pan { animation: none; }
  .tel-accueil, .tel-points i, .interrupteur, .interrupteur::after, .gps-fleche { transition: none; }
}

/* ---- la vitrine des telephones d'Electro Plus : apercu 3D, fiche, comparaison */
.vitrine { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 14px; padding: 12px; margin: 10px 0; border-radius: 18px; background: radial-gradient(120% 90% at 20% 0%, rgba(45, 156, 246, 0.22), rgba(7, 20, 39, 0.6)); border: 1px solid var(--trait); }
.vitrine-scene { display: grid; justify-items: center; gap: 6px; }
.vitrine-3d { width: 100%; max-width: 300px; aspect-ratio: 300 / 270; border-radius: 14px; background: radial-gradient(60% 50% at 50% 92%, rgba(255, 255, 255, 0.16), transparent), linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.25)); }
.apercu-3d { width: 100%; height: 100%; display: block; cursor: grab; border-radius: 14px; }
.apercu-3d:focus-visible { outline: 2px solid #FFD24A; }
.vitrine-commandes { justify-content: center; }
.vitrine-commandes .b { min-height: 34px; padding: 0 12px; }
.vitrine-fiche { display: grid; gap: 6px; align-content: start; }
.vitrine-fiche h3 { margin: 0; }
.vitrine-achat { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.badge-gamme { justify-self: start; padding: 2px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); font-weight: 800; }
.gamme-luxe { background: rgba(212, 175, 55, 0.3); }
.gamme-haut { background: rgba(124, 58, 237, 0.3); }
.spec-barre { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 2px 8px; font-size: 12px; }
.spec-barre b { grid-column: 1 / -1; font-weight: 600; opacity: 0.85; }
.spec-jauge { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.spec-jauge i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #34D399, #FFD24A); }
.carte-tel { cursor: pointer; text-align: center; color: inherit; font: inherit; }
.carte-tel.choisie { outline: 2px solid #FFD24A; }
.carte-tel .possede { color: #34D399; font-weight: 800; }
.table-tel { overflow-x: auto; }
.comparaison { width: 100%; border-collapse: collapse; font-size: 13px; }
.comparaison th, .comparaison td { padding: 8px 6px; border-bottom: 1px solid var(--trait); text-align: center; vertical-align: top; }
.comparaison th[scope="row"] { text-align: left; font-weight: 700; opacity: 0.85; white-space: nowrap; }
.comparaison thead th { vertical-align: bottom; }
.comparaison thead th small { display: block; opacity: 0.7; }
.comparaison td.meilleur { background: rgba(52, 211, 153, 0.18); color: #A7F3D0; font-weight: 800; }
@media (max-width: 560px) { .vitrine { grid-template-columns: 1fr; } }

/* ---- le telephone s'adapte a l'appareil : portrait, mini (ecran exterieur d'un clapet), large (paysage, tablette, deplie),
   double (deux ecrans), clapet (ecran plie). Sur un vrai appareil, on n'ajoute pas de fausse encoche : il a la sienne. */
@media (max-width: 719px), (hover: none) {
  .coque-tel.ile .ecran-tel::before, .coque-tel.goutte .ecran-tel::before { display: none; }
  .coque-tel { padding-left: max(6px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); }
  .tel-barre { padding-top: 8px; }
  .tel-pilule { bottom: max(3px, env(safe-area-inset-bottom)); }
}
.coque-tel.mode-mini .tel-widget { display: none; }
.coque-tel.mode-mini .app small { font-size: 10px; }
.coque-tel.mode-mini .app .icone { width: 44px; height: 44px; font-size: 22px; }
.coque-tel.mode-mini .tel-nav .b { padding: 0 6px; font-size: 11px; }
.coque-tel.mode-large, .coque-tel.mode-double { width: 100%; max-width: none; }
.coque-tel.mode-large .tel-accueil, .coque-tel.mode-double .tel-accueil { right: auto; width: var(--volet-g, min(380px, 42%)); }
.coque-tel.mode-large .tel-accueil.cache, .coque-tel.mode-double .tel-accueil.cache { opacity: 1; transform: none; pointer-events: auto; }
.coque-tel.mode-large .tel-couche, .coque-tel.mode-double .tel-couche { left: var(--volet-g, min(380px, 42%)); border-left: 1px solid rgba(255, 255, 255, 0.14); }
.coque-tel.mode-large .tel-couche:empty::before, .coque-tel.mode-double .tel-couche:empty::before { content: "Choisissez une appli à gauche"; position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: rgba(255, 255, 255, 0.6); font-weight: 700; }
.coque-tel.mode-large .tel-vue, .coque-tel.mode-double .tel-vue { background: linear-gradient(180deg, rgba(11, 27, 51, 0.92), rgba(8, 18, 31, 0.96)); }
.coque-tel.mode-large .tel-bord-g, .coque-tel.mode-double .tel-bord-g { left: var(--volet-g, min(380px, 42%)); }
.coque-tel.mode-large .tel-retour, .coque-tel.mode-double .tel-retour { display: none; }
.coque-tel.mode-large .tel-nav, .coque-tel.mode-double .tel-nav { justify-content: flex-end; }
@media (horizontal-viewport-segments: 2) {
  .coque-tel.mode-double { --volet-g: env(viewport-segment-width 0 0, 50%); gap: 0; }
  .coque-tel.mode-double .tel-couche { left: env(viewport-segment-left 1 0, 50%); margin-left: 0; }
  .coque-tel.mode-double .tel-bord-g { left: env(viewport-segment-left 1 0, 50%); }
}
@media (vertical-viewport-segments: 2) {
  .coque-tel.mode-clapet { height: env(viewport-segment-height 0 0, 50vh); max-height: none; padding-bottom: 0; }
  .coque-tel.mode-clapet .tel-nav { position: fixed; left: 0; right: 0; top: env(viewport-segment-top 1 0, 50vh); height: env(viewport-segment-height 1 0, 50vh); display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; background: rgba(2, 6, 14, 0.9); }
  .coque-tel.mode-clapet .tel-nav .b { min-height: 64px; font-size: 16px; }
}
@media (hover: none) and (max-height: 500px) {
  .coque-tel { padding-top: max(4px, env(safe-area-inset-top)); padding-bottom: 4px; }
  .coque-tel .tel-nav { position: absolute; right: 4px; bottom: 4px; z-index: 9; flex-direction: column; }
}
@media (hover: none) and (max-height: 500px) { .coque-tel .tel-couche .tel-corps { padding-right: 112px; } }

/* =====================================================================================================
 Styles autrefois injectes par le code (guide, plongee, manette) : la CSP de /villa/ (style-src 'self') bloque toute balise
 <style> ajoutee par un script. Ils vivent ici, dans la feuille de la page. */

/* Le guide fantome (villa-client/guide.js) */
.guide-bouton{position:relative}
.guide-bouton.cache{opacity:.55}
.guide-bulle{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 86px);transform:translateX(-50%);width:min(380px,calc(100vw - 24px));max-height:34vh;display:flex;flex-direction:column;gap:8px;padding:12px 14px;border-radius:18px;background:var(--verre-fort,rgba(7,20,39,.9));border:1px solid var(--trait,rgba(143,203,255,.28));color:var(--texte,#EAF3FC);box-shadow:0 10px 40px rgba(60,160,255,.25);z-index:30;font:14px/1.4 var(--affichage,system-ui,sans-serif)}
.guide-bulle[hidden]{display:none}
.guide-tete{display:flex;align-items:center;gap:8px;font-weight:700}
.guide-tete span{flex:1}
.guide-texte{flex:1 1 auto;overflow:auto;min-height:2.6em;white-space:pre-wrap;font-size:13.5px;line-height:1.45}
.guide-tete,.guide-puces,.guide-rang{flex-shrink:0}
.guide-puces{display:flex;flex-wrap:wrap;gap:6px}
.guide-puces button,.guide-tete button{font:inherit}
.guide-rang{display:flex;gap:6px}
.guide-rang input{flex:1;min-width:0;padding:8px 10px;border-radius:12px;border:1px solid var(--trait,rgba(143,203,255,.28));background:rgba(255,255,255,.07);color:inherit;font:inherit}
.guide-point{display:inline-block;width:8px;height:8px;border-radius:50%;background:#7CD4FF;box-shadow:0 0 8px #7CD4FF;animation:guide-pulse 1.4s infinite}
@keyframes guide-pulse{50%{opacity:.25}}
@media (max-width:720px){.guide-bulle{bottom:calc(env(safe-area-inset-bottom,0px) + 150px);max-height:38vh}}
/* telephone en paysage (ecran peu haut) : la bulle monte entre le joystick et les boutons, le texte defile */
@media (max-height:500px){.guide-bulle{bottom:calc(env(safe-area-inset-bottom,0px) + 10px);max-height:calc(100vh - 120px);width:min(440px,calc(100vw - 300px));gap:6px;padding:10px 12px}.guide-rang input{padding:6px 10px}}

/* La plongee : jauge d'air, boutons tactiles, boutique (villa-client/plongee.js) */
.plg{position:fixed;left:50%;top:max(10px,env(safe-area-inset-top));transform:translateX(-50%);z-index:30;display:none;flex-direction:column;gap:4px;align-items:center;pointer-events:none;font:600 13px system-ui,sans-serif;color:#fff;text-shadow:0 1px 2px #0008}
.plg.on{display:flex}
.plg-barre{width:min(240px,60vw);height:12px;border-radius:8px;background:#0b2b3d99;border:1px solid #ffffff55;overflow:hidden}
.plg-barre b{display:block;height:100%;width:100%;background:linear-gradient(90deg,#38bdf8,#7dd3fc);transition:width .25s linear}
.plg-barre.bas b{background:#ef4444}.plg-barre.bas{animation:plgclig .6s infinite}
@keyframes plgclig{50%{opacity:.45}}
.plg-aide{font-weight:500;font-size:12px;opacity:.9}
.plg-btns{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:150px;z-index:30;display:none;flex-direction:column;gap:10px}
.plg-btns.on{display:flex}
.plg-btns button{width:58px;height:58px;border-radius:50%;border:2px solid #ffffffaa;background:#0b5d86cc;color:#fff;font-size:24px;touch-action:none;-webkit-user-select:none;user-select:none}
.plg-btns button:active{background:#38bdf8}
.plg-teinte{position:fixed;inset:0;z-index:5;pointer-events:none;background:radial-gradient(ellipse at center,#0a5c8522 30%,#03233a88 100%);display:none}
.plg-teinte.on{display:block}
.plg-liste{display:grid;gap:8px}.plg-ligne{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 10px;border:1px solid #8883;border-radius:10px}

/* La manette : l'element qui a le focus (villa-client/manette.js) */
.focus-manette{outline:3px solid #FFD24A!important;outline-offset:2px!important;box-shadow:0 0 0 6px rgba(255,210,74,.35)!important}

/* Les limites de la carte (villa-client/frontiere.js) : un message doux et une brume qui s'epaissit, jamais un mur sec. */
.frontiere-msg { position: absolute; top: max(96px, calc(env(safe-area-inset-top) + 90px)); left: 50%; transform: translateX(-50%); z-index: 24; width: max-content; max-width: min(520px, calc(100vw - 28px)); padding: 10px 18px; border-radius: 16px; background: var(--verre-fort); border: 1px solid var(--trait); text-align: center; pointer-events: none; opacity: 0; transition: opacity 0.45s ease; }
.frontiere-msg b { display: block; font-size: 15px; }
.frontiere-msg span { display: block; margin-top: 3px; font-size: 13px; font-weight: 600; opacity: 0.88; }
.frontiere-voile { position: fixed; inset: 0; z-index: 44; pointer-events: none; opacity: 0; background: #D8E8F4; }
@media (prefers-reduced-motion: reduce) { .frontiere-msg { transition: none; } }
/* telephone : le haut est pris (barre, objectif, radar) : le message passe au tiers de l'ecran, la ou rien ne le gene */
@media (max-width: 720px) { .frontiere-msg { top: 30vh; } }
