/* Écrans hors bataille de la refonte 2D (13 oct. 2026). Règles du porteur : le jeu n'apparaît qu'en bataille (jamais
   derrière un menu) ; lisibilité d'abord — moins il y en a, mieux c'est, mais le peu qu'il y a doit être parfait ;
   sons discrets. Un même cadre pour tous les écrans : fond commun (#fond-menus), barre du haut (retour, titre,
   compteurs), contenu centré verticalement, un seul bouton vif par écran. */
:root { --vif: #ffc93c; --panneau: rgba(14, 9, 20, .62); --filet: 1px solid rgba(246, 234, 210, .14); --trait: 3px solid var(--encre); --rouge-boss: #ff7a62; }

/* ---------- Cadre commun ---------- */
.ecran { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 2vh, 18px);
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  box-sizing: border-box; animation: ouvre .25s ease-out; }
.ecran[hidden] { display: none; }
.ecran.voile { background: rgba(14, 9, 20, .62); }
@keyframes ouvre { from { opacity: 0; } to { opacity: 1; } }
.ecran h1 { margin: 0; font-size: clamp(26px, min(5vw, 10vh), 60px); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.ecran p { margin: 0; max-width: 34em; font-size: clamp(12px, min(1.7vw, 3.6vh), 17px); line-height: 1.4; }
.ligne { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.titre-rubrique { margin: 0 0 .5em; font-size: clamp(10px, min(1.3vw, 2.8vh), 13px); font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: rgba(246, 234, 210, .6); }

/* Fond commun des écrans hors bataille : la catapulte en contre-jour (nette au menu, floutée et calme ailleurs). */
#fond-menus { position: fixed; inset: 0; background: #170f20; display: none; }
#fond-menus.on { display: block; }
#fond-menus::before { content: ''; position: absolute; inset: -24px; background: url(img/menu/fond-menu.webp) right center / cover no-repeat; transition: filter .35s; }
#fond-menus::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16, 10, 24, .72) 0%, rgba(16, 10, 24, .35) 36%, transparent 54%); transition: background .35s; }
#fond-menus.calme::before { filter: blur(14px) brightness(.42) saturate(.85); }
#fond-menus.calme::after { background: rgba(16, 10, 24, .35); }
body.en-menu #jeu { visibility: hidden; }

/* Le seul bouton vif de l'écran. */
.vif { pointer-events: auto; font: 800 clamp(15px, min(2.4vw, 5vh), 26px) 'Lexend', sans-serif; text-transform: uppercase; letter-spacing: .06em;
  color: var(--encre); background: var(--vif); border: 4px solid var(--encre); border-radius: 5px; padding: .5em 1.7em;
  box-shadow: 5px 5px 0 var(--encre); cursor: pointer; transform: skewX(-6deg); transition: filter .15s; }
.vif:hover { filter: brightness(1.08); }
.vif:active { transform: skewX(-6deg) translate(3px, 3px); box-shadow: 2px 2px 0 var(--encre); }
/* Boutons secondaires : texte et filet, jamais remplis. */
.option { pointer-events: auto; font: 700 clamp(12px, min(1.5vw, 3.2vh), 15px) 'Lexend', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--creme);
  background: none; border: 1px solid rgba(246, 234, 210, .4); border-radius: 4px; padding: .6em 1.2em; cursor: pointer; transition: border-color .15s, background .15s; }
.option:hover { border-color: #fff; background: rgba(246, 234, 210, .06); }
.option { white-space: nowrap; }

/* Barre du haut : retour, titre de l'écran, compteurs à droite. */
.barre-haut { position: absolute; top: max(10px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right));
  display: flex; align-items: center; gap: 14px; z-index: 2; }
.barre-haut h2 { margin: 0; font-size: clamp(14px, min(2vw, 4.2vh), 22px); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.retour { flex: none; width: clamp(34px, min(4.4vw, 9vh), 46px); aspect-ratio: 1; padding: 0; background: none; border: 1px solid rgba(246, 234, 210, .4); border-radius: 5px; cursor: pointer; position: relative; }
.retour:hover { border-color: #fff; }
.retour::before { content: ''; position: absolute; left: 42%; top: 50%; width: 28%; height: 28%; border-left: 3px solid var(--creme); border-bottom: 3px solid var(--creme);
  transform: translate(-30%, -50%) rotate(45deg); }
.compteurs { margin-left: auto; display: flex; gap: 14px; }
.compteurs span { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: clamp(12px, min(1.6vw, 3.4vh), 17px); }
.compteurs span:empty { display: none; }
.compteurs svg { width: 1.2em; height: 1.2em; }

/* Deux colonnes : à gauche ce qu'on lit et choisit, à droite ce qui compte (le boss, les compétences…). */
.colonnes { position: absolute; left: max(6vw, env(safe-area-inset-left)); right: max(5vw, env(safe-area-inset-right)); top: calc(max(10px, env(safe-area-inset-top)) + clamp(40px, 11vh, 64px));
  bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1.15fr 1fr; gap: 5vw; align-items: center; }
.col { display: flex; flex-direction: column; gap: clamp(8px, 2.2vh, 18px); min-width: 0; }

/* ---------- Accueil (illustration peinte, refaite le 13 oct. : « trop restreint, pas assez travaillé ») ---------- */
#accueil { justify-content: space-between; padding-top: max(3vh, env(safe-area-inset-top)); padding-bottom: max(5vh, env(safe-area-inset-bottom)); overflow: hidden; background: #2a1838; }
#fond-accueil { position: absolute; inset: -3%; background: url(img/menu/accueil-paysage.webp) center 70% / cover no-repeat; animation: respire 24s ease-in-out infinite alternate; }
@media (orientation: portrait) { #fond-accueil { background-image: url(img/menu/accueil-portrait.webp); background-position: center bottom; } }
@keyframes respire { from { transform: scale(1) translateX(0); } to { transform: scale(1.06) translateX(-1.2%); } }
#accueil::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(20, 12, 28, .25), transparent 30%, transparent 70%, rgba(20, 12, 28, .45)); }
#neige-accueil { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
#logo-accueil { position: relative; z-index: 2; width: min(44vw, 58vh * 1.8, 720px); animation: logo-arrive .8s cubic-bezier(.3, 1.5, .5, 1) both, logo 5s ease-in-out .8s infinite; }
#logo { display: block; width: 100%; height: auto; filter: drop-shadow(0 7px 0 rgba(22, 17, 14, .6)) drop-shadow(0 0 30px rgba(255, 190, 120, .35)); }
/* Reflet de soleil qui passe sur les lettres de neige (masqué par la forme du logo). */
#logo-accueil .reflet { position: absolute; inset: 0; -webkit-mask: url(img/menu/logo.webp) center / 100% 100% no-repeat; mask: url(img/menu/logo.webp) center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 236, 200, .75) 50%, transparent 60%) -150% 0 / 250% 100% no-repeat; animation: reflet 5.5s ease-in-out 1.2s infinite; }
@keyframes reflet { 0%, 55% { background-position: 150% 0; } 85%, 100% { background-position: -150% 0; } }
@keyframes logo-arrive { from { opacity: 0; transform: translateY(-30px) scale(.85); } }
@keyframes logo { 50% { transform: translateY(-6px) rotate(-.6deg); } }
#bas-accueil { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: ouvre .6s ease-out .4s both; }
#jouer { font-size: clamp(22px, 3.6vw, 38px); padding: .5em 2.6em; animation: appel 2.4s ease-in-out 1.5s infinite; }
@keyframes appel { 0%, 80%, 100% { transform: skewX(-6deg); } 88% { transform: skewX(-6deg) scale(1.06); } }
#suite-accueil { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
#suite-accueil span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: clamp(12px, 1.6vw, 16px); background: rgba(22, 17, 14, .74); border: var(--trait);
  border-radius: 5px; padding: .3em .8em; }
#suite-accueil svg { width: 1.2em; height: 1.2em; }
@media (orientation: portrait) { #logo-accueil { width: 90vw; margin-top: 4vh; } }

/* ---------- Menu principal : la liste à gauche (icône blanche + titre), la catapulte seule à droite ---------- */
#liste-modes { position: absolute; left: max(6vw, env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); }
#cartes { display: flex; flex-direction: column; gap: .4vh; margin: 0; }
.mode { display: flex; align-items: center; gap: .8em; padding: .3em .2em; border: 0; background: none; cursor: pointer; text-align: left; color: rgba(246, 234, 210, .72);
  font: 800 clamp(15px, min(2.3vw, 5vh), 30px) 'Lexend', sans-serif; text-transform: uppercase; letter-spacing: .07em; transition: color .15s, transform .15s; }
.mode img { width: 1.35em; height: 1.35em; object-fit: contain; opacity: .7; transition: opacity .15s, filter .15s; }
.mode b { display: block; font-weight: inherit; }
.mode[hidden] { display: none; }
.mode small { display: block; height: 0; overflow: hidden; opacity: 0; font: 500 .42em 'Lexend', sans-serif; letter-spacing: .03em; text-transform: none; transition: opacity .15s; }
.mode:hover, .mode:focus-visible { color: #fff; transform: translateX(8px); outline: none; text-shadow: 0 0 18px rgba(255, 220, 160, .45); }
.mode:hover img, .mode:focus-visible img { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 220, 160, .6)); }
.mode:hover small, .mode:focus-visible small { height: auto; opacity: .85; }
.mode.principale { color: var(--vif); }
.mode.principale img { opacity: 1; }
.mode.bientot { color: rgba(246, 234, 210, .32); }
.mode.bientot img { opacity: .3; }
.mode.bientot:hover { color: rgba(246, 234, 210, .5); }

/* ---------- Campagne : la région, le chemin des 8 batailles, la bataille choisie ; à droite le boss de la région ---------- */
#regions { display: flex; align-items: center; gap: 12px; }
#region-nom { display: flex; flex-direction: column; min-width: 0; }
#region-nom b { font-size: clamp(18px, min(3vw, 6.2vh), 36px); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
#region-nom small { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: clamp(11px, min(1.4vw, 3vh), 15px); color: rgba(246, 234, 210, .75); }
#region-nom svg { width: 1.15em; height: 1.15em; }
.fleche { position: relative; flex: none; width: clamp(28px, min(3.4vw, 7vh), 38px); aspect-ratio: 1; padding: 0; background: none; border: 1px solid rgba(246, 234, 210, .4); border-radius: 50%; cursor: pointer; }
.fleche:hover { border-color: #fff; }
.fleche::before { content: ''; position: absolute; left: 46%; top: 50%; width: 26%; height: 26%; border-left: 3px solid var(--creme); border-bottom: 3px solid var(--creme); transform: translate(-30%, -50%) rotate(45deg); }
.fleche.suivante::before { left: 34%; transform: translate(-30%, -50%) rotate(-135deg); }
.fleche:disabled { opacity: .25; cursor: default; }
/* Le chemin : des étapes rondes reliées par un trait, la dernière est le boss. */
#batailles { position: relative; display: flex; align-items: center; justify-content: space-between; }
#batailles::before { content: ''; position: absolute; left: 4%; right: 6%; top: 50%; height: 2px; background: rgba(246, 234, 210, .22); }
.bataille { position: relative; flex: none; width: clamp(30px, min(4vw, 8.4vh), 50px); aspect-ratio: 1; padding: 0; border-radius: 50%; display: grid; place-items: center;
  font: 800 clamp(12px, min(1.6vw, 3.4vh), 18px) 'Lexend', sans-serif; color: var(--creme); background: #241830; border: 2px solid rgba(246, 234, 210, .35); cursor: pointer; transition: transform .15s, border-color .15s; }
.bataille .mini { position: absolute; top: 108%; left: 50%; transform: translateX(-50%); display: flex; gap: 1px; }
.bataille .mini svg { width: clamp(8px, min(1.1vw, 2.4vh), 13px); height: auto; }
.bataille.faite { background: #3a2a1c; border-color: rgba(255, 201, 60, .65); }
.bataille.choisie { border-color: var(--vif); border-width: 3px; transform: scale(1.18); box-shadow: 0 0 16px rgba(255, 201, 60, .45); }
.bataille.ferme { color: rgba(246, 234, 210, .3); border-style: dashed; cursor: default; }
.bataille.boss { width: clamp(46px, min(6vw, 12.5vh), 76px); border-radius: 8px; border-color: rgba(255, 122, 98, .7); background: #2c1216; }
.bataille.boss img { width: 92%; height: 80%; object-fit: contain; }
.bataille.boss.ferme img { filter: brightness(0) drop-shadow(0 0 4px rgba(255, 110, 80, .8)); }
.bataille.boss em { position: absolute; inset: 0; display: grid; place-items: center; font: 900 clamp(18px, min(2.6vw, 5.4vh), 30px) 'Lexend', sans-serif; font-style: normal; color: var(--rouge-boss);
  text-shadow: 2px 2px 0 var(--encre); animation: mystere 1.6s ease-in-out infinite; }
@keyframes mystere { 50% { transform: scale(1.15); } }
/* La bataille choisie. */
#detail-bataille { margin-top: clamp(14px, 3.4vh, 26px); display: flex; flex-direction: column; gap: clamp(6px, 1.6vh, 12px); }
#detail-bataille .quoi b { display: block; font-size: clamp(16px, min(2.4vw, 5vh), 28px); font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }
#detail-bataille .quoi b.nom-boss { color: var(--rouge-boss); }
#detail-bataille .quoi i { display: block; font-style: normal; font-size: clamp(11px, min(1.4vw, 3vh), 15px); color: rgba(246, 234, 210, .75); margin-top: 2px; }
#detail-bataille .criteres { display: grid; gap: 3px; font-size: clamp(10px, min(1.25vw, 2.7vh), 14px); }
#detail-bataille .criteres div { display: flex; align-items: center; gap: 7px; }
#detail-bataille .criteres svg { width: 1.3em; height: 1.3em; }
#detail-bataille .vif { align-self: flex-start; margin-top: 4px; }
/* Le boss de la région, à droite : la seule image de l'écran. */
#boss-region { position: relative; align-self: center; aspect-ratio: 3 / 2; width: 100%; max-height: 72vh; border-radius: 8px; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(255, 122, 98, .45); background: radial-gradient(circle at 50% 42%, #47201c, #1b0e14 72%); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
#boss-region > img.carte { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#boss-region > img.silhouette { position: absolute; left: 50%; top: 42%; width: 70%; transform: translate(-50%, -50%); filter: brightness(0) drop-shadow(0 0 10px rgba(255, 110, 80, .85)); }
#boss-region > em { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font: 900 clamp(34px, min(5vw, 10vh), 64px) 'Lexend'; font-style: normal; color: var(--rouge-boss);
  text-shadow: 3px 3px 0 var(--encre); animation: mystere2 1.6s ease-in-out infinite; }
@keyframes mystere2 { 50% { transform: translate(-50%, -50%) scale(1.15); } }
#boss-region::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(12, 7, 14, .9)); }
#boss-region .texte { position: absolute; left: 6%; right: 6%; bottom: 6%; z-index: 1; }
#boss-region small { display: block; font-weight: 800; font-size: clamp(9px, min(1.1vw, 2.4vh), 12px); letter-spacing: .3em; text-transform: uppercase; color: var(--rouge-boss); }
#boss-region b { display: block; font-weight: 900; font-size: clamp(16px, min(2.4vw, 5vh), 28px); text-transform: uppercase; }
#boss-region i { display: block; font-style: normal; font-size: clamp(10px, min(1.2vw, 2.6vh), 13px); color: rgba(246, 234, 210, .82); }
#boss-region .competences-boss { display: flex; gap: 6px; margin-top: 6px; }
#boss-region .competences-boss img { width: clamp(20px, min(2.6vw, 5.4vh), 32px); }

/* ---------- Préparation : à gauche le fort (aperçu dessiné), à droite les 4 compétences ---------- */
#choix-fort { display: flex; flex-wrap: wrap; gap: 6px; }
#choix-fort button { font: 700 clamp(11px, min(1.35vw, 2.9vh), 14px) 'Lexend', sans-serif; color: rgba(246, 234, 210, .8); background: none; border: 1px solid rgba(246, 234, 210, .3);
  border-radius: 4px; padding: .45em .9em; cursor: pointer; }
#choix-fort button:hover { border-color: #fff; color: #fff; }
#choix-fort button.choisi { border-color: var(--vif); color: var(--vif); }
#apercu-fort { width: 100%; max-width: 420px; max-height: 50vh; aspect-ratio: 3 / 2; object-fit: contain; }
#emportees { display: flex; gap: clamp(8px, 1.4vw, 16px); }
.place { position: relative; width: clamp(46px, min(6.6vw, 13.5vh), 80px); aspect-ratio: 1; padding: 0; border-radius: 50%; border: 2px dashed rgba(246, 234, 210, .35); background: none; cursor: pointer; }
.place img { width: 100%; height: 100%; display: block; }
.place.pleine { border: 0; }
.place.pleine::after { content: ''; position: absolute; right: -2px; top: -2px; width: 30%; height: 30%; border-radius: 50%; background: #1b1320; border: 1px solid rgba(246, 234, 210, .5);
  background-image: linear-gradient(currentColor, currentColor); background-size: 50% 2px; background-position: center; background-repeat: no-repeat; color: var(--creme); opacity: 0; transition: opacity .15s; }
.place.pleine:hover::after { opacity: 1; }
#choix-competences { display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(4px, .8vw, 10px); max-width: 520px; }
.competence { position: relative; padding: 0; aspect-ratio: 1; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: transform .15s; }
.competence img { width: 100%; height: 100%; display: block; opacity: .55; transition: opacity .15s; }
.competence:hover img { opacity: .9; }
.competence.choisi img { opacity: 1; }
.competence.choisi { box-shadow: 0 0 0 3px var(--vif); }
.competence.ferme { cursor: not-allowed; }
.competence.ferme img { filter: grayscale(1) brightness(.4); opacity: .6; }
.competence span { display: none; }
#aide-competence { display: flex; align-items: center; gap: 12px; min-height: clamp(42px, 10vh, 64px); }
#aide-competence img { width: clamp(36px, min(4.6vw, 9.6vh), 56px); flex: none; }
#aide-competence b { display: block; font-size: clamp(13px, min(1.7vw, 3.6vh), 18px); text-transform: uppercase; letter-spacing: .04em; }
#aide-competence span { font-size: clamp(11px, min(1.3vw, 2.8vh), 14px); color: rgba(246, 234, 210, .82); }
#aide-competence em { font-style: normal; color: var(--vif); }
/* 72 px au moins à droite : la place du bouton de chat commun (contrat/chat/), en bas à droite. */
#lancer { position: absolute; right: max(5vw, 72px, env(safe-area-inset-right)); bottom: max(5vh, env(safe-area-inset-bottom)); }
#preparation .colonnes { bottom: calc(max(5vh, env(safe-area-inset-bottom)) + clamp(48px, 11vh, 70px)); }

/* ---------- À plusieurs : le salon à gauche (comme le menu), la catapulte à droite ---------- */
/* Multijoueur (14 oct.) : pensé d'abord pour le téléphone en paysage (~360 px de haut) : tout tient sous la barre du
   haut, seule la liste d'amis défile ; lignes d'amis entières à toucher (44 px au moins). */
.col-salon { position: absolute; left: max(5vw, env(safe-area-inset-left)); width: min(46vw, 460px);
  top: calc(max(10px, env(safe-area-inset-top)) + clamp(40px, 11vh, 64px)); bottom: max(10px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: center; }
.col-salon > div, #avec-compte, #sans-compte { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(8px, 2.2vh, 16px); min-height: 0; max-height: 100%; }
.col-salon > div[hidden], #avec-compte[hidden], #sans-compte[hidden], #salon-par-code[hidden] { display: none; }
#avec-compte { width: 100%; }
#salon-partager { width: 100%; }
#salon-par-code { flex-direction: row; flex-wrap: wrap; }
.bouton-lien { text-decoration: none; display: inline-block; }
#plusieurs.sans-code #salon-saisie, #plusieurs.sans-code #salon-pave { display: none; }
.consigne-salon { font-size: clamp(13px, min(1.6vw, 3.4vh), 17px); line-height: 1.45; color: rgba(246, 234, 210, .85); }
.consigne-salon b { color: var(--vif); font-weight: 800; }
#salon-code { font: 900 clamp(44px, min(8vw, 17vh), 96px) 'Lexend', sans-serif; letter-spacing: .18em; line-height: 1; color: var(--creme);
  text-shadow: 4px 4px 0 var(--encre); }
.message-salon { margin: 0; min-height: 1.4em; font-size: clamp(12px, min(1.5vw, 3.2vh), 15px); color: rgba(246, 234, 210, .8); }
.message-salon.erreur { color: #ffb09e; }
#salon-joueurs { display: flex; gap: 10px; }
#salon-joueurs span { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: clamp(12px, min(1.5vw, 3.2vh), 15px); background: none !important;
  border: 1px solid rgba(246, 234, 210, .3); border-radius: 4px; padding: .35em .8em; }
#salon-joueurs span:first-child::before, #salon-joueurs span:nth-child(2)::before { content: ''; width: .7em; height: .7em; border-radius: 50%; background: var(--bleu); }
#salon-joueurs span:nth-child(2)::before { background: var(--rouge); }
#salon-lancer:disabled { filter: grayscale(.9) brightness(.6); cursor: default; }
#salon-saisie { display: flex; gap: 10px; }
#salon-saisie i { display: grid; place-items: center; width: clamp(40px, min(5.4vw, 11vh), 60px); aspect-ratio: 4 / 5; font: 900 normal clamp(24px, min(3.4vw, 7vh), 40px) 'Lexend', sans-serif;
  border-bottom: 3px solid rgba(246, 234, 210, .5); }
#salon-saisie i:empty { border-bottom-color: rgba(246, 234, 210, .2); }
#salon-pave { display: grid; grid-template-columns: repeat(6, auto); gap: 6px; }
#salon-pave button { width: clamp(36px, min(4.4vw, 9.4vh), 52px); aspect-ratio: 1; font: 800 clamp(15px, min(2vw, 4.2vh), 22px) 'Lexend', sans-serif; color: var(--creme);
  background: rgba(14, 9, 20, .5); border: 1px solid rgba(246, 234, 210, .3); border-radius: 5px; cursor: pointer; }
#salon-pave button:hover { border-color: #fff; }
#salon-pave button svg { width: 60%; height: 60%; }
#etat-autre { position: absolute; left: max(6vw, env(safe-area-inset-left)); bottom: max(5vh, env(safe-area-inset-bottom)); margin: 0; display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: clamp(12px, min(1.5vw, 3.2vh), 15px); color: rgba(246, 234, 210, .85); }
#etat-autre::before { content: ''; width: .7em; height: .7em; border-radius: 50%; background: var(--rouge); }
#etat-autre.pret { color: #9fe0a8; }
#etat-autre[hidden] { display: none; }
#lancer.attend { background: none; color: var(--creme); border-color: rgba(246, 234, 210, .5); box-shadow: none; }
/* Invité : il voit son camp à gauche (le canevas est retourné ; les textes du jeu le sont aussi, pour rester lisibles). */
body.miroir #jeu { transform: scaleX(-1); }
body.miroir .g .jauge i { background: linear-gradient(#ff7a62, var(--rouge)); }
body.miroir .d .jauge i { background: linear-gradient(#5aa2ff, var(--bleu)); margin-left: auto; }

/* ---------- Mon camp / Boutique : rayons et cartes à gauche, l'article en grand à droite ---------- */
:root { --commune: #b9b2a6; --rare: #5aa2ff; --epique: #b98cff; --legendaire: #ffc93c; }
#vitrine .colonnes { grid-template-columns: 1fr 1fr; align-items: stretch; }
#vitrine .col { justify-content: center; min-height: 0; }
#rayons { display: flex; gap: clamp(4px, .8vw, 10px); flex-wrap: wrap; }
.rayon { font: 800 clamp(11px, min(1.35vw, 2.9vh), 15px) 'Lexend', sans-serif; text-transform: uppercase; letter-spacing: .06em; color: rgba(246, 234, 210, .7);
  background: none; border: 1px solid rgba(246, 234, 210, .25); border-radius: 4px; padding: .5em .9em; cursor: pointer; }
.rayon:hover { border-color: #fff; color: #fff; }
.rayon.choisi { border-color: var(--vif); color: var(--vif); }
#articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(68px, 8.6vw, 112px), 1fr)); gap: clamp(6px, 1vw, 12px); align-content: start;
  max-height: 56vh; overflow-y: auto; padding: 4px 6px 4px 2px; scrollbar-width: thin; scrollbar-color: rgba(246, 234, 210, .25) transparent; }
.article { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 0 0 4px; background: rgba(14, 9, 20, .45); cursor: pointer; text-align: center;
  border: 1px solid rgba(246, 234, 210, .14); border-top: 3px solid var(--commune); border-radius: 5px; color: var(--creme); transition: border-color .15s, transform .15s; }
.article.rare { border-top-color: var(--rare); } .article.epique { border-top-color: var(--epique); } .article.legendaire { border-top-color: var(--legendaire); }
.article:hover { border-color: rgba(246, 234, 210, .5); transform: translateY(-2px); }
.article.vu { border-color: var(--vif); box-shadow: 0 0 14px rgba(255, 201, 60, .3); }
.article .apercu { display: grid; place-items: center; aspect-ratio: 10 / 7; }
.article .apercu img { width: 76%; height: 84%; object-fit: contain; }
.article .apercu canvas { width: 94%; height: auto; }
.article b { font-size: clamp(9px, min(1.05vw, 2.3vh), 12px); font-weight: 700; line-height: 1.15; padding: 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article small { display: inline-flex; justify-content: center; align-items: center; gap: 3px; min-height: 1.2em; font-weight: 800; font-size: clamp(9px, min(1.05vw, 2.3vh), 12px); color: rgba(246, 234, 210, .65); }
.article small svg { width: 1.1em; height: 1.1em; }
.article.porte small { color: #9fe0a8; }
.article.cher small { color: rgba(246, 234, 210, .4); }
#aide-vitrine { font-size: clamp(11px, min(1.3vw, 2.8vh), 14px); color: rgba(246, 234, 210, .7); }
.presentation { align-items: center; text-align: center; }
#scene-article { width: 100%; max-height: 46vh; aspect-ratio: 3 / 2; object-fit: contain; }
#fiche-article { display: flex; flex-direction: column; align-items: center; gap: 2px; }
#fiche-article small { font-weight: 800; font-size: clamp(10px, min(1.2vw, 2.6vh), 13px); letter-spacing: .25em; text-transform: uppercase; }
#fiche-article small.commune { color: var(--commune); } #fiche-article small.rare { color: var(--rare); } #fiche-article small.epique { color: var(--epique); } #fiche-article small.legendaire { color: var(--legendaire); }
#fiche-article b { font-size: clamp(18px, min(2.6vw, 5.4vh), 30px); font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }
#fiche-article span { font-size: clamp(11px, min(1.35vw, 2.9vh), 15px); color: rgba(246, 234, 210, .8); }
#action-article { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: clamp(44px, 10vh, 70px); }
#action-article .vif { display: inline-flex; align-items: center; gap: .4em; }
#action-article .vif svg { width: 1em; height: 1em; }
#action-article .vif.trop-cher { filter: grayscale(.8) brightness(.75); }
.etat-article { margin: 0; font-size: clamp(11px, min(1.35vw, 2.9vh), 15px); color: rgba(246, 234, 210, .8); }

/* ---------- Mes forts : mes 3 forts, les blocs ; à droite le chantier ---------- */
#liste-forts { display: flex; gap: clamp(6px, 1vw, 12px); }
.fort-perso { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: .55em .9em; background: none; cursor: pointer; text-align: left;
  border: 1px solid rgba(246, 234, 210, .3); border-radius: 4px; color: rgba(246, 234, 210, .8); font: 800 clamp(12px, min(1.5vw, 3.2vh), 16px) 'Lexend', sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.fort-perso small { font-weight: 600; font-size: .78em; text-transform: none; letter-spacing: .02em; color: rgba(246, 234, 210, .55); }
.fort-perso.pret small { color: #9fe0a8; }
.fort-perso:hover { border-color: #fff; color: #fff; }
.fort-perso.choisi { border-color: var(--vif); color: var(--vif); }
#palette { display: flex; gap: clamp(6px, 1vw, 12px); }
.bloc-palette { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; background: none; border: 0; cursor: pointer; color: var(--creme);
  font: 800 clamp(12px, min(1.5vw, 3.2vh), 16px) 'Lexend', sans-serif; }
.bloc-palette .vignette { display: grid; place-items: center; width: clamp(42px, min(6vw, 12vh), 74px); height: clamp(42px, min(6vw, 12vh), 74px); border-radius: 6px; border: 1px solid rgba(246, 234, 210, .2); }
.bloc-palette .vignette { position: relative; }
.bloc-palette img { position: absolute; left: 11%; top: 9%; width: 78%; height: 82%; object-fit: contain; }
.bloc-palette:hover .vignette { border-color: rgba(246, 234, 210, .6); }
.bloc-palette.choisi .vignette { border: 2px solid var(--vif); box-shadow: 0 0 14px rgba(255, 201, 60, .35); }
.bloc-palette.choisi b { color: var(--vif); }
.bloc-palette.epuise img { filter: grayscale(1) brightness(.5); }
.bloc-palette.epuise b { color: rgba(246, 234, 210, .35); }
#aide-bloc { min-height: clamp(40px, 9vh, 60px); }
#aide-bloc b { display: block; font-size: clamp(13px, min(1.7vw, 3.6vh), 18px); text-transform: uppercase; letter-spacing: .04em; }
#aide-bloc span { font-size: clamp(11px, min(1.3vw, 2.8vh), 14px); color: rgba(246, 234, 210, .82); }
#aide-bloc em { font-style: normal; color: var(--vif); }
.ligne.gauche { justify-content: flex-start; align-items: center; }
#modeles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#modeles span { font-size: clamp(11px, min(1.3vw, 2.8vh), 14px); color: rgba(246, 234, 210, .7); }
#modeles[hidden], #vider-fort[hidden] { display: none; }
#chantier { width: 100%; max-height: 62vh; aspect-ratio: 880 / 760; object-fit: contain; cursor: pointer; touch-action: none; }
#etat-fort { margin: 0; text-align: center; font-size: clamp(11px, min(1.35vw, 2.9vh), 14px); color: rgba(246, 234, 210, .75); max-width: none; }
#etat-fort.alerte { color: #ffb09e; }
#prendre-fort { position: absolute; right: max(5vw, env(safe-area-inset-right)); bottom: max(5vh, env(safe-area-inset-bottom)); }
#prendre-fort[hidden] { display: none; }
#forts .colonnes { grid-template-columns: 1fr 1.1fr; bottom: calc(max(5vh, env(safe-area-inset-bottom)) + clamp(48px, 11vh, 70px)); }

/* ---------- Réglages : la liste à gauche, comme le menu ---------- */
#reglages .col-reglages { position: absolute; left: max(6vw, env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); width: min(46vw, 420px); display: flex; flex-direction: column; gap: 18px; }
.reglage { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; font-weight: 800; font-size: clamp(14px, min(2vw, 4.2vh), 22px); text-transform: uppercase; letter-spacing: .06em; }
/* Interrupteur : glissière, pastille crème ; allumé = jaune, pastille à droite. */
.interrupteur { position: relative; flex: none; width: 58px; height: 32px; padding: 0; border: var(--trait); border-radius: 16px; background: rgba(246, 234, 210, .15); cursor: pointer; transition: background .2s; }
.interrupteur i { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--creme); border: 2px solid var(--encre); transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
.interrupteur[aria-checked="true"] { background: var(--vif); }
.interrupteur[aria-checked="true"] i { transform: translateX(26px); }

/* ---------- Fin de bataille : le résultat, les étoiles, ce qu'on a gagné, la suite ---------- */
#fin { gap: clamp(8px, 2vh, 16px); }
#titre-fin { text-align: center; }
#etoiles-fin { display: flex; gap: clamp(12px, 3vw, 36px); }
#etoiles-fin .etoile { display: flex; flex-direction: column; align-items: center; gap: 4px; width: clamp(80px, 13vw, 150px); text-align: center; font-size: clamp(10px, min(1.2vw, 2.6vh), 13px); color: rgba(246, 234, 210, .6); }
#etoiles-fin .etoile.gagnee { color: var(--creme); }
#etoiles-fin svg { width: clamp(34px, min(5vw, 10vh), 64px); height: auto; }
#etoiles-fin .etoile.gagnee svg { animation: etoile .45s cubic-bezier(.3, 1.6, .5, 1) both; }
#etoiles-fin .etoile:nth-child(2) svg { animation-delay: .25s; }
#etoiles-fin .etoile:nth-child(3) svg { animation-delay: .5s; }
@keyframes etoile { from { transform: scale(0) rotate(-40deg); } }
#gains-fin { font-weight: 800; text-align: center; }
#fin.fin-boss { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 5vw; row-gap: clamp(6px, 1.8vh, 14px);
  grid-template-areas: "titre titre" "raison comp" "etoiles comp" "gains comp" "suivant comp" "ligne comp"; align-content: center; justify-items: center;
  padding: max(10px, env(safe-area-inset-top)) max(5vw, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(5vw, env(safe-area-inset-left)); }
#fin.fin-boss #titre-fin { grid-area: titre; font-size: clamp(20px, min(4vw, 8.5vh), 48px); }
#fin.fin-boss #raison-fin { grid-area: raison; }
#fin.fin-boss #etoiles-fin { grid-area: etoiles; gap: clamp(8px, 2vw, 24px); }
#fin.fin-boss #etoiles-fin .etoile { width: clamp(70px, 10vw, 130px); }
#fin.fin-boss #gains-fin { grid-area: gains; }
#fin.fin-boss #suivant { grid-area: suivant; }
#fin.fin-boss > .ligne { grid-area: ligne; }
#fin.fin-boss #competences-fin { grid-area: comp; align-self: center; padding: clamp(10px, 2.5vh, 20px) clamp(12px, 2vw, 22px); border-radius: 7px; background: rgba(14, 9, 20, .55); border: 1px solid rgba(255, 201, 60, .25); }
#fin.fin-boss #competences-fin .prochain { flex-direction: column; text-align: center; }
#competences-fin { display: flex; flex-direction: column; align-items: center; gap: 6px; }
#competences-fin b { color: var(--vif); text-transform: uppercase; letter-spacing: .1em; font-size: clamp(12px, min(1.6vw, 3.4vh), 16px); }
#competences-fin div { display: flex; gap: 16px; }
#competences-fin span { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: clamp(10px, 1.2vw, 13px); font-weight: 700; }
#competences-fin img { width: clamp(36px, min(5vw, 10vh), 60px); animation: etoile .5s cubic-bezier(.3, 1.6, .5, 1) both; }
#competences-fin span:nth-child(2) img { animation-delay: .2s; } #competences-fin span:nth-child(3) img { animation-delay: .4s; }
#competences-fin .prochain { display: flex; flex-direction: row; align-items: center; gap: 10px; margin-top: 4px; }
#competences-fin .prochain img { width: clamp(60px, 9vw, 110px); filter: brightness(0) drop-shadow(0 0 6px rgba(255, 110, 80, .8)); animation: none; }
#competences-fin .prochain small { font-weight: 700; max-width: 18em; }

/* ---------- Bataille : pause, bulle, arrivée d'un boss ---------- */
#bouton-pause { position: absolute; left: 50%; top: calc(max(8px, env(safe-area-inset-top)) + clamp(48px, 7vw, 74px)); transform: translateX(-50%);
  width: clamp(30px, 3.8vw, 40px); aspect-ratio: 1; padding: 0; pointer-events: auto; background: rgba(22, 17, 14, .74); border: var(--trait); border-radius: 5px; cursor: pointer; }
#bouton-pause::before, #bouton-pause::after { content: ''; position: absolute; top: 28%; width: 16%; height: 44%; background: var(--creme); border-radius: 1px; }
#bouton-pause::before { left: 30%; }
#bouton-pause::after { right: 30%; }
#annonce-boss { position: fixed; left: 0; right: 0; top: 12%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 0 14px;
  background: linear-gradient(90deg, transparent, rgba(60, 14, 12, .9) 18%, rgba(60, 14, 12, .9) 82%, transparent); border-block: 3px solid var(--encre);
  opacity: 0; pointer-events: none; z-index: 4; cursor: pointer; }
#annonce-boss img { width: clamp(180px, 30vw, 380px); aspect-ratio: 3 / 2; object-fit: cover; border: 4px solid var(--encre); border-radius: 5px; box-shadow: 0 0 30px rgba(255, 110, 80, .6); margin-bottom: 4px; }
#annonce-boss small { font-weight: 800; font-size: clamp(11px, 1.4vw, 15px); letter-spacing: .4em; text-transform: uppercase; color: var(--rouge-boss); }
#annonce-boss b { font-size: clamp(24px, 4.6vw, 52px); font-weight: 900; text-transform: uppercase; letter-spacing: .03em; transform: rotate(-1.5deg);
  text-shadow: 4px 4px 0 var(--encre), -2px -2px 0 var(--encre), 2px -2px 0 var(--encre), -2px 2px 0 var(--encre); }
#annonce-boss span { font-size: clamp(12px, 1.6vw, 17px); text-shadow: 1px 1px 0 var(--encre); }
#annonce-boss .indice { font-weight: 800; color: #ffd23f; }
#annonce-boss em { margin-top: 6px; font-style: normal; font-weight: 700; font-size: clamp(11px, 1.3vw, 14px); letter-spacing: .08em; opacity: .8; animation: clignote 1.6s ease-in-out infinite; }
/* Le bandeau reste tant que la bataille n'a pas commencé (monde figé), puis part en glissant. */
#annonce-boss.on { opacity: 1; pointer-events: auto; animation: annonce .4s ease-out; }
#annonce-boss.on.part { opacity: 0; pointer-events: none; transform: translateX(15%); transition: opacity .4s, transform .4s; }
@keyframes annonce { 0% { opacity: 0; transform: translateX(-30%) skewX(-8deg); } 100% { opacity: 1; transform: none; } }
@keyframes clignote { 50% { opacity: .35; } }

/* ---------- Téléphone en paysage (écrans bas) ---------- */
@media (max-height: 430px) {
  .colonnes { gap: 4vw; }
  .col { gap: 8px; }
  #detail-bataille { margin-top: 18px; }
  #apercu-fort { max-height: 46vh; width: auto; max-width: 100%; }
  .place { width: 11vh; }
  #choix-competences { max-width: 330px; gap: 4px; }
  #aide-competence { min-height: 0; }
  #aide-competence span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #preparation .colonnes { right: calc(max(5vw, env(safe-area-inset-right))); bottom: calc(max(4vh, env(safe-area-inset-bottom)) + 52px); }
  #lancer { bottom: max(4vh, env(safe-area-inset-bottom)); font-size: 15px; }
  #forts .titre-rubrique, #aide-bloc span { display: none; }
  #aide-bloc { min-height: 0; }
  #forts .option { padding: .45em .8em; font-size: 11px; }
  #forts .colonnes { bottom: calc(max(4vh, env(safe-area-inset-bottom)) + 52px); }
  #prendre-fort { bottom: max(4vh, env(safe-area-inset-bottom)); font-size: 15px; }
  #chantier { max-height: 58vh; }
  .rayon { padding: .4em .6em; font-size: 10px; letter-spacing: .04em; }
  #rayons { flex-wrap: nowrap; }
  #articles { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 5px; max-height: 50vh; }
  .article .apercu { aspect-ratio: 10 / 6; }
  #scene-article { max-height: 40vh; }
  #action-article { min-height: 0; }
  #action-article .vif { font-size: 15px; }
  #vitrine .ligne.gauche { flex-wrap: nowrap; }
  #aide-vitrine { font-size: 10px; }
}

/* ---------- Toasts : infos, erreurs, réussites (en bas à gauche, s'effacent seuls) ---------- */
#toasts { position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; z-index: 6; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(78vw, 420px); padding: .6em 1em .6em .7em; border-radius: 6px; background: rgba(14, 9, 20, .92);
  border: var(--filet); box-shadow: 0 8px 22px rgba(0, 0, 0, .4); font-weight: 600; font-size: clamp(12px, min(1.5vw, 3.2vh), 15px); line-height: 1.3; animation: toast-entre .25s ease-out; transition: opacity .3s, transform .3s; }
.toast svg { flex: none; width: 1.5em; height: 1.5em; }
.toast.erreur { border-color: rgba(229, 83, 61, .45); }
.toast.part { opacity: 0; transform: translateX(-12px); }
@keyframes toast-entre { from { opacity: 0; transform: translateX(-16px); } }
#salon-pave .effacer svg path:nth-child(2) { display: none; } /* pas de croix dans la touche « effacer » */

/* ---------- Amis d'Usrati : inviter dans sa partie, invitation reçue ---------- */
#inviter-amis { width: 100%; min-height: 0; flex: 1; display: flex; flex-direction: column; }
#inviter-amis .titre-rubrique { flex: none; }
#liste-amis { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; }
#liste-amis .ami { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 8px 4px 4px; text-align: left; font: inherit;
  font-size: clamp(13px, min(1.6vw, 3.6vh), 16px); color: var(--creme); background: none; border: 0; border-radius: 5px; }
#liste-amis button.ami { cursor: pointer; pointer-events: auto; }
#liste-amis button.ami:hover, #liste-amis button.ami:active { background: rgba(246, 234, 210, .08); }
#liste-amis .ami-av { position: relative; flex: none; width: 34px; height: 34px; border-radius: 5px; background: rgba(246, 234, 210, .12) center / cover; image-rendering: pixelated; }
#liste-amis .ami-av::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: #7a7068; box-shadow: 0 0 0 2px #16110e; }
#liste-amis .ami.en-ligne .ami-av::after { background: #6fd38a; }
#liste-amis .ami.partie .ami-av::after { background: var(--vif); }
#liste-amis .ami-nom { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
#liste-amis .ami b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#liste-amis .ami small { font-size: .8em; color: rgba(246, 234, 210, .6); }
#liste-amis .ami-inviter { margin-left: auto; flex: none; padding: .45em 1em; font-weight: 800; font-size: .78em; letter-spacing: .08em; text-transform: uppercase;
  color: var(--vif); border: 1px solid var(--vif); border-radius: 4px; }
#liste-amis .ami.hors-ligne { opacity: .5; }
#liste-amis .vide { margin: 0; font-size: clamp(11px, min(1.35vw, 2.9vh), 14px); color: rgba(246, 234, 210, .65); line-height: 1.4; }
#carte-invitation { position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 4px); z-index: 7;
  display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; max-width: min(84vw, 380px); border-radius: 7px; background: rgba(14, 9, 20, .95);
  border: 1px solid rgba(255, 201, 60, .5); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: toast-entre .25s ease-out; }
#carte-invitation[hidden] { display: none; }
#carte-invitation p { margin: 0; font-size: clamp(13px, min(1.6vw, 3.4vh), 16px); }
#carte-invitation p b { color: var(--vif); }
#carte-invitation .vif { font-size: clamp(13px, min(1.8vw, 3.8vh), 18px); padding: .4em 1.2em; }

/* ---------- Téléchargement du jeu (accueil) et écran « Reprendre la partie » (téléphone en portrait / hors plein écran) ---------- */
#telechargement { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(320px, 70vw); }
#telechargement[hidden], #jouer[hidden] { display: none; }
#telechargement i { display: block; width: 100%; height: 4px; border-radius: 2px; background: rgba(246, 234, 210, .2); overflow: hidden; position: relative; }
#telechargement i::after { content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--progres, 0)); background: var(--vif); transition: transform .2s; }
#telechargement span { font-weight: 600; font-size: 13px; color: rgba(246, 234, 210, .8); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
#tourne { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: #170f20 url(img/menu/accueil-portrait.webp) center / cover no-repeat; }
#tourne[hidden] { display: none; }
#tourne::before { content: ''; position: absolute; inset: 0; background: rgba(14, 9, 20, .8); }
#tourne .centre { position: relative; display: grid; justify-items: center; gap: 20px; padding: 24px; text-align: center; }
#tourne img { width: min(70vw, 42vh, 380px); }
#tourne .raison { margin: 0; font-size: 16px; color: var(--creme); }

/* Mes forts : le bloc qu'on glisse suit le doigt, un peu au-dessus pour rester visible (14 oct.). */
.bloc-glisse { position: fixed; z-index: 30; width: clamp(48px, 7vw, 76px); height: auto; transform: translate(-50%, -85%) rotate(-4deg); pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .55)); }
.bloc-glisse.fanion { width: clamp(34px, 5vw, 54px); }
.bloc-glisse[hidden] { display: none; }

/* Réglages : version gardée sur l'appareil et « Retélécharger le jeu » (14 oct.). */
.version-jeu { align-items: center; gap: 14px; font-size: clamp(11px, min(1.4vw, 3vh), 14px); color: rgba(246, 234, 210, .6); }

/* Liens vers la plate-forme (installer, usrati.games) : hors du menu du jeu, petits et discrets, en bas à gauche (14 oct.). */
#liens-plateforme { position: absolute; left: max(5vw, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); display: flex; gap: 6px; }
.lien-plateforme { pointer-events: auto; display: inline-flex; align-items: center; gap: .55em; min-height: 32px; padding: .3em .7em; font: 600 clamp(11px, min(1.3vw, 3vh), 13px) 'Lexend', sans-serif;
  letter-spacing: .03em; color: rgba(246, 234, 210, .62); background: none; border: 1px solid rgba(246, 234, 210, .16); border-radius: 4px; cursor: pointer; }
.lien-plateforme:hover { color: var(--creme); border-color: rgba(246, 234, 210, .4); }
.lien-plateforme img { height: 1.1em; width: auto; opacity: .7; }
.lien-plateforme[hidden] { display: none; }

/* « Inviter quelqu'un » : WhatsApp et Telegram en grand, aux couleurs des applis ; le reste en petit (14 oct.). */
#panneau-partage { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(8px, 2.2vh, 16px); }
#panneau-partage[hidden] { display: none; }
.choix-partage { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.partage { pointer-events: auto; display: flex; align-items: center; justify-content: center; gap: .55em; min-height: 52px; padding: .5em .8em; border: 0; border-radius: 6px; cursor: pointer;
  font: 800 clamp(14px, min(2vw, 4.4vh), 19px) 'Lexend', sans-serif; color: #fff; box-shadow: 3px 4px 0 var(--encre); }
.partage svg { width: 1.5em; height: 1.5em; flex: none; }
.partage.whatsapp { background: #25d366; }
.partage.telegram { background: #229ed9; }
.partage:active { transform: translate(2px, 2px); box-shadow: 1px 2px 0 var(--encre); }

/* Tutoriel (14 oct. 2026) : une bulle en haut, sous le temps ; la main montre le geste ; ce qu'il faut toucher s'éclaire. */
#tuto { position: fixed; left: 50%; top: calc(max(8px, env(safe-area-inset-top)) + clamp(86px, 14vw, 120px)); transform: translateX(-50%); z-index: 6;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 14px; width: min(86vw, 560px); padding: 12px 14px 12px 18px;
  background: rgba(14, 9, 20, .9); border: 1px solid rgba(255, 201, 60, .55); border-radius: 7px; box-shadow: 0 10px 26px rgba(0, 0, 0, .45); pointer-events: auto; }
#tuto[hidden] { display: none; }
#tuto small { grid-column: 1 / -1; font-weight: 800; font-size: 11px; letter-spacing: .14em; color: var(--vif); }
#tuto p { margin: 0; font-weight: 600; font-size: clamp(13px, min(1.8vw, 3.8vh), 17px); line-height: 1.35; }
#tuto .option { padding: .4em .8em; font-size: 11px; }
#tuto .main { display: none; }
#tuto.avec-main .main { display: block; position: fixed; left: 62vw; top: 58vh; width: 34px; height: 34px; border-radius: 50%; pointer-events: none;
  background: rgba(246, 234, 210, .85); box-shadow: 0 0 0 6px rgba(246, 234, 210, .25); animation: tuto-geste 2.2s ease-in-out infinite; }
@keyframes tuto-geste { 0% { transform: translate(0, 0) scale(1); opacity: 0; } 12% { opacity: 1; } 60% { transform: translate(-16vw, 14vh) scale(.9); opacity: 1; } 75% { transform: translate(-16vw, 14vh) scale(1.3); opacity: 0; } 100% { opacity: 0; } }
#armes.montre .arme img { animation: tuto-lueur 1s ease-in-out infinite alternate; }
#jauge-force.montre { opacity: 1; }
#jauge-force.montre .tube { animation: tuto-lueur 1s ease-in-out infinite alternate; }
@keyframes tuto-lueur { to { filter: drop-shadow(0 0 10px #ffd23f) brightness(1.15); } }
