/* Roko — tout ce qui n'est pas le jeu lui-même : écrans, boutons, classement, manette.
   Style « mat et doux » : terre brune, couleurs adoucies, aucun brillant. */
@font-face { font-family: "Nunito"; src: url("polices/nunito-latin.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
:root {
  --creme: #f6ecdf; --brun: #2a1e19; --brun-clair: #3a2b23; --texte-doux: #d8cbbb; --discret: #b7a593;
  --ocre: #dca95c; --ocre-fonce: #a87a3c; --sauge: #8fae72; --sauge-fonce: #66834f; --ardoise: #7092b6; --ardoise-fonce: #4f6a86;
  --rose: #e07f8a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--brun); color: var(--creme);
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
#jeu { position: fixed; left: 0; top: 0; top: env(safe-area-inset-top, 0px); width: 100%; height: 100%; height: calc(100% - env(safe-area-inset-top, 0px)); display: block; }

/* ── Écrans par-dessus le jeu ── */
.ecran { position: fixed; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; justify-content: safe center;
  gap: 10px; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); text-align: center;
  background: radial-gradient(ellipse at center, rgba(42, 30, 25, .6), rgba(24, 16, 13, .92)); overflow-y: auto; z-index: 10; }
.ecran.visible { display: flex; animation: apparait .25s ease-out; }
/* (dans un écran trop petit pour tout montrer, rien ne s'écrase ni ne se chevauche : l'écran défile) */
.ecran > * { flex-shrink: 0; }
@keyframes apparait { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

h1 { margin: 0; line-height: 0; }
.heros { height: clamp(84px, 13.5vh, 150px); width: auto; margin-bottom: -8px; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .35)); animation: flotte 2.4s ease-in-out infinite; }
@keyframes flotte { 50% { transform: translateY(-6px); } }
.logo { width: min(330px, 80vw); height: auto; margin-bottom: 2px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35)); }
h2 { margin: 0 0 6px; font-size: 14px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); }
#pause h2 { font-size: 34px; color: var(--creme); }
.slogan { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--texte-doux); }
.meilleur { margin: 0; min-height: 1.2em; color: var(--ocre); font-weight: 800; }

button { font: inherit; color: inherit; cursor: pointer; border: 0; }
.gros { padding: 15px 50px; border-radius: 999px; font-size: 22px; font-weight: 900; letter-spacing: .08em;
  background: var(--ocre); color: #3a2618; box-shadow: 0 6px 0 var(--ocre-fonce), 0 12px 22px rgba(0, 0, 0, .3); transition: transform .08s; }
.gros:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ocre-fonce), 0 6px 12px rgba(0, 0, 0, .3); }
#jouer { animation: battement 1.6s ease-in-out infinite; }
@keyframes battement { 50% { transform: scale(1.04); } }

.aide { list-style: none; margin: 4px 0 0; padding: 0; max-width: 360px; font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--discret); }
.danger { background: none; color: #d98b8b; font-size: 13px; font-weight: 800; text-decoration: underline; }
.petits-liens { margin: 0; font-size: 13px; }
.petits-liens a { color: var(--discret); font-weight: 700; }
.petits-liens a[hidden] { display: none; }
#lien-appli, #lien-installer { color: var(--ocre); }

/* ── L'accueil : la map du jour et les maps ── */
#titre { gap: 8px; }
.carte-jour { width: min(360px, 94vw); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px;
  border-radius: 18px; text-align: left; color: var(--creme); background: linear-gradient(135deg, color-mix(in srgb, var(--teinte, #dca95c) 38%, #2a1e19), #2a1e19);
  border: 2px solid var(--teinte, #dca95c); box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.carte-jour .etiquette { font-size: 12px; font-weight: 900; letter-spacing: .12em; color: var(--teinte, #dca95c); }
.carte-jour .nom { font-size: 22px; font-weight: 900; }
.carte-jour .detail { font-size: 13px; font-weight: 700; color: var(--texte-doux); }
.cartes { width: min(360px, 94vw); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.carte { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 60px; padding: 9px 12px; border-radius: 14px;
  text-align: left; color: var(--creme); background: rgba(255, 240, 220, .06); border: 1px solid rgba(255, 240, 220, .1); border-left: 5px solid var(--teinte); }
.carte .nom { font-size: 15px; font-weight: 900; color: var(--teinte); }
.carte .detail { font-size: 12px; font-weight: 700; line-height: 1.25; color: var(--texte-doux); }
.carte.choisie { background: rgba(255, 240, 220, .13); }
.carte.fermee { opacity: .55; }
.carte { position: relative; }
.carte .badge { position: absolute; top: -7px; right: 8px; padding: 2px 8px; border-radius: 999px; background: var(--teinte); color: #2a1e19;
  font-size: 10px; font-weight: 900; letter-spacing: .08em; animation: battement 1.2s ease-in-out infinite; }
.carte-jour .compte { color: var(--teinte, #dca95c); font-weight: 800; }
.carte-jour .compte:empty { display: none; }
.carte.secoue { animation: secoue .35s; }
@keyframes secoue { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.liens { display: flex; gap: 8px; }
.sans-pub { background: rgba(143, 174, 114, .25); color: #d6ecc4; }
.sans-pub[hidden] { display: none; }
.annonce { position: fixed; top: calc(60px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 20; margin: 0;
  padding: 10px 16px; border-radius: 14px; background: var(--sauge); color: #1e2a16; font-weight: 800; box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }

/* ── Classement ── */
.tableau { width: min(340px, 92vw); padding: 12px 14px; border-radius: 18px; background: rgba(255, 240, 220, .06); border: 1px solid rgba(255, 240, 220, .08); }
ol { margin: 0; padding: 0; list-style: none; counter-reset: rang; }
ol li { counter-increment: rang; display: flex; gap: 10px; padding: 4px 6px; border-radius: 8px; font-size: 15px; font-weight: 700; }
ol li::before { content: counter(rang); width: 1.6em; text-align: right; color: var(--discret); font-weight: 900; }
ol li .nom { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol li .m { font-weight: 900; font-variant-numeric: tabular-nums; }
ol li.moi { background: rgba(220, 169, 92, .2); color: #f2cf8a; }
ol li .tete { width: 26px; height: 26px; margin: -3px -4px -3px -2px; object-fit: contain; flex: none; }
ol li.vide { justify-content: center; color: var(--discret); }
ol li.vide::before { content: none; }
.tableau ol { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 240, 220, .25) transparent; }
#fin .tableau ol { max-height: clamp(84px, calc(100vh - 660px), 260px); max-height: clamp(84px, calc(100dvh - 660px), 260px); }
#classements .tableau ol { max-height: 58vh; max-height: 58dvh; }
.onglets { display: flex; gap: 6px; margin-bottom: 8px; }
.onglets button { flex: 1; padding: 6px; border-radius: 10px; background: rgba(255, 240, 220, .06); color: var(--discret); font-size: 13px; font-weight: 800; }
.onglets button.actif { background: var(--ardoise); color: var(--creme); }
.fin-map { margin: 0; font-size: 13px; font-weight: 900; letter-spacing: .12em; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; width: min(360px, 94vw); }
.puces button { padding: 7px 11px; border-radius: 999px; background: rgba(255, 240, 220, .08); color: var(--texte-doux); font-size: 13px; font-weight: 800; }
.puces button.actif { background: var(--teinte, var(--ocre)); color: #2a1e19; }
ol li.ecart { justify-content: center; color: var(--discret); }
ol li.ecart::before { content: none; }

/* ── Les amis ── */
.mon-code { margin: 0; font-size: 16px; font-weight: 700; color: var(--texte-doux); }
.mon-code b { font-size: 22px; letter-spacing: .14em; color: var(--ocre); }
.ligne { display: flex; gap: 8px; }
.ligne input { width: 150px; text-transform: uppercase; letter-spacing: .1em; }
.ligne button, .demandes button { padding: 10px 14px; border-radius: 12px; background: var(--ardoise); font-weight: 800; }
.demandes { display: flex; flex-direction: column; gap: 6px; width: min(340px, 92vw); }
.demandes .demande { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(220, 169, 92, .15); font-weight: 700; }
.demandes .demande span { flex: 1; text-align: left; }
.demandes .demande button.non { background: rgba(255, 240, 220, .12); }
.liste-amis { width: min(340px, 92vw); }
.liste-amis li { flex-wrap: wrap; }
.liste-amis li::before { content: none; }
.liste-amis .records { width: 100%; text-align: left; font-size: 12px; font-weight: 700; color: var(--discret); }
.liste-amis .retirer { background: none; color: var(--discret); font-size: 16px; padding: 0 4px; }
.profil { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; justify-content: center; width: min(340px, 92vw); }
.profil label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 800; color: var(--discret); text-align: left; }
.profil input { width: 150px; }
.profil select { padding: 9px 10px; border-radius: 12px; border: 2px solid var(--ardoise); background: var(--brun); color: var(--creme); font: inherit; font-weight: 700; max-width: 150px; }

/* ── Fin de partie ── */
.cause { margin: 0; font-size: 18px; font-weight: 900; letter-spacing: .12em; color: var(--rose); }
.profondeur { margin: 0; font-size: clamp(64px, 20vw, 110px); font-weight: 900; line-height: 1; }
.profondeur small { font-size: .4em; color: var(--discret); }
.record { margin: 0; min-height: 1.2em; font-weight: 900; color: var(--ocre); }
.record.nouveau { animation: clignote .5s steps(2) infinite; }
@keyframes clignote { 50% { opacity: .35; } }
form { display: flex; gap: 8px; }
form[hidden] { display: none; }
input { width: 180px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--ardoise); background: var(--brun); color: var(--creme);
  font: inherit; font-size: 17px; font-weight: 700; text-align: center; user-select: text; -webkit-user-select: text; }
#inscrire { padding: 10px 16px; border-radius: 12px; background: var(--ardoise); font-weight: 800; }
#inscrire:disabled { background: var(--sauge); }
.etat { margin: 0; min-height: 1.2em; font-size: 14px; font-weight: 600; color: var(--texte-doux); }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 4px; }
#partager { padding: 14px 20px; border-radius: 999px; background: var(--rose); color: #3a1d20; font-weight: 900;
  box-shadow: 0 5px 0 #a8545e, 0 10px 18px rgba(0, 0, 0, .25); }
#partager:active { transform: translateY(3px); box-shadow: 0 2px 0 #a8545e; }
#video-etat:empty, #partage-etat:empty { display: none; }

/* ── Le partage ── */
.partage-video { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.partage-video[hidden] { display: none; }
#apercu { height: clamp(170px, 33vh, 320px); aspect-ratio: 9 / 16; border-radius: 16px; background: #1d1512; box-shadow: 0 10px 22px rgba(0, 0, 0, .35); }
.boutons-video { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.gros.petit { padding: 12px 22px; font-size: 17px; }
.bouton { padding: 12px 18px; border-radius: 999px; background: rgba(255, 240, 220, .12); color: var(--creme); font-weight: 800; text-decoration: none; }
.astuce { margin: 0; max-width: 330px; font-size: 13px; font-weight: 600; color: var(--discret); }
.reseaux { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: min(340px, 92vw); }
.reseaux a { padding: 11px 6px; border-radius: 12px; color: var(--creme); font-size: 14px; font-weight: 800; text-decoration: none; text-align: center; cursor: pointer; }
.reseaux a[data-reseau="whatsapp"] { background: #4f8f62; }
.reseaux a[data-reseau="facebook"] { background: #4f6797; }
.reseaux a[data-reseau="messenger"] { background: #6b62c4; }
.reseaux a[data-reseau="x"] { background: #3a3330; }
.reseaux a[data-reseau="telegram"] { background: #4c8bb3; }
.reseaux a[data-reseau="reddit"] { background: #c56a3f; }
.reseaux a[data-reseau="linkedin"] { background: #3f6f9c; }
.reseaux a[data-reseau="email"] { background: var(--ocre-fonce); }
.reseaux a[data-reseau="sms"] { background: var(--sauge-fonce); }
body:not(.tactile) .reseaux .mobile { display: none; }
.retour { background: none; color: var(--discret); font-weight: 800; padding: 8px; }

/* ── Boutons toujours visibles ── */
#son, #bouton-pause { position: fixed; top: calc(10px + env(safe-area-inset-top)); width: 40px; height: 40px; border-radius: 14px;
  background: rgba(255, 240, 220, .1); font-size: 18px; z-index: 11; }
#son { left: 10px; }
#bouton-pause { left: 56px; display: none; font-size: 14px; font-weight: 900; }
body.en-jeu #bouton-pause { display: block; }

/* ── La manette (écrans tactiles) : trois grosses touches mates ── */
#manette { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: none; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--brun-clair), #221813); border-top: 1px solid rgba(255, 240, 220, .08);
  touch-action: none; -webkit-touch-callout: none; }
body.tactile #manette { display: flex; }
/* (hors des parties, les touches restent à leur place mais invisibles : la mise en page du puits ne bouge pas) */
body.tactile:not(.en-jeu) #manette { visibility: hidden; }
#manette .touche { flex: 1; height: clamp(110px, 17vh, 160px); border-radius: 26px; display: flex; align-items: center; justify-content: center;
  pointer-events: none; transition: transform .05s, box-shadow .05s; }
#manette .touche svg { width: 46%; max-width: 64px; height: auto; }
#manette .touche[data-dir="gauche"] { background: var(--sauge); box-shadow: 0 7px 0 var(--sauge-fonce), 0 10px 18px rgba(0, 0, 0, .25); }
#manette .touche[data-dir="bas"] { background: var(--ardoise); box-shadow: 0 7px 0 var(--ardoise-fonce), 0 10px 18px rgba(0, 0, 0, .25); }
#manette .touche[data-dir="droite"] { background: var(--ocre); box-shadow: 0 7px 0 var(--ocre-fonce), 0 10px 18px rgba(0, 0, 0, .25); }
#manette .touche.appuye { transform: translateY(5px); filter: brightness(.92); transition: none; }
#manette .touche[data-dir="gauche"].appuye { box-shadow: 0 2px 0 var(--sauge-fonce); }
#manette .touche[data-dir="bas"].appuye { box-shadow: 0 2px 0 var(--ardoise-fonce); }
#manette .touche[data-dir="droite"].appuye { box-shadow: 0 2px 0 var(--ocre-fonce); }

/* ── Les boulons : la bourse en haut à droite ── */
.bourse { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 10px; height: 40px; padding: 0 13px 0 8px; display: flex; align-items: center; gap: 6px;
  border-radius: 14px; background: rgba(255, 240, 220, .1); font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; z-index: 11; }
.bourse img { width: 26px; height: 26px; }
body.en-jeu .bourse { display: none; }
.bourse.gagne { animation: gagne .8s ease-out; }
@keyframes gagne { 25% { transform: scale(1.2); background: rgba(220, 169, 92, .5); } }

/* ── L'accueil : le menu, le cadeau du jour ── */
.menu { width: min(360px, 94vw); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.menu button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; border-radius: 14px;
  background: rgba(255, 240, 220, .08); color: var(--creme); font-size: 12px; font-weight: 800; }
.menu button:active { background: rgba(255, 240, 220, .16); }
.menu img { width: 36px; height: 36px; object-fit: contain; }
.pastille { position: absolute; top: 4px; right: 12px; width: 13px; height: 13px; border-radius: 50%; background: var(--rose); border: 2px solid var(--brun);
  animation: battement 1.2s ease-in-out infinite; }
.pastille[hidden] { display: none; }
.cadeau-titre { width: min(360px, 94vw); display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 16px; text-align: left; color: var(--creme);
  background: linear-gradient(135deg, rgba(224, 127, 138, .38), rgba(224, 127, 138, .12)); border: 2px solid var(--rose); box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.cadeau-titre[hidden] { display: none; }
.cadeau-titre img { width: 42px; height: 42px; animation: flotte 1.6s ease-in-out infinite; }
.cadeau-titre span { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.cadeau-titre b { font-size: 15px; font-weight: 900; }
.cadeau-titre i { font-style: normal; font-size: 13px; font-weight: 700; color: var(--texte-doux); }
.cadeau-titre em { font-style: normal; padding: 8px 14px; border-radius: 999px; background: var(--rose); color: #3a1d20; font-weight: 900; }
#titre.avec-cadeau .slogan { display: none; }
#titre.habitue .aide { display: none; }

/* ── La fin de partie : les boulons gagnés ── */
.gains { display: flex; align-items: center; gap: 10px; }
.gains[hidden] { display: none; }
.gains-n { display: flex; align-items: center; gap: 6px; padding: 5px 14px 5px 8px; border-radius: 999px; background: rgba(220, 169, 92, .2); color: #f2cf8a; font-size: 20px; font-weight: 900;
  animation: apparait .35s ease-out; }
.gains-n img { width: 28px; height: 28px; }
.doubler { display: flex; align-items: center; gap: 6px; padding: 7px 14px 7px 8px; border-radius: 999px; background: var(--rose); color: #3a1d20; font-weight: 900;
  box-shadow: 0 4px 0 #a8545e; animation: battement 1.4s ease-in-out infinite; }
.doubler img { width: 24px; height: 24px; }
.doubler[hidden] { display: none; }
.doubler:disabled { opacity: .6; animation: none; }
#fin-gains-detail:empty { display: none; }
#fin-gains-detail { color: #f2cf8a; max-width: 340px; }

/* ── Les costumes ── */
#collection, #defis { justify-content: flex-start; padding-top: calc(60px + env(safe-area-inset-top)); background: rgba(30, 21, 18, .96); }
.vitrine { display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(360px, 94vw); }
.vitrine-cadre { height: 178px; display: flex; align-items: flex-end; justify-content: center; }
#vitrine-image { height: calc(134px * var(--haut, 1)); width: auto; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .35)); animation: flotte 2.4s ease-in-out infinite; }
#vitrine-image.fete { animation: fete .8s ease-out; }
@keyframes fete { 0% { transform: scale(.6) rotate(-8deg); } 45% { transform: scale(1.2) rotate(4deg); } 100% { transform: none; } }
.vitrine-nom { margin: 0; font-size: 22px; font-weight: 900; }
.rarete { margin: 0; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.vitrine .etat { max-width: 330px; min-height: 2.7em; display: flex; align-items: center; }
.vitrine .gros { display: flex; align-items: center; justify-content: center; gap: 2px; letter-spacing: .03em; white-space: pre; }
.vitrine .gros img { width: 24px; height: 24px; }
.vitrine .gros[hidden] { display: none; }
.gros:disabled { opacity: .55; box-shadow: 0 3px 0 var(--ocre-fonce); transform: translateY(3px); cursor: default; }
.grille { width: min(360px, 94vw); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
.case { position: relative; aspect-ratio: 1; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 5px; border-radius: 14px;
  background: rgba(255, 240, 220, .06); border: 2px solid transparent; border-bottom: 4px solid var(--teinte); overflow: hidden; }
.case > img { height: calc(66% * var(--haut, 1)); max-height: 96%; width: auto; }
.case.fermee { background: rgba(255, 240, 220, .03); }
.case.fermee > img { opacity: .9; }
.case.choisie { border-color: var(--creme); border-bottom-color: var(--teinte); background: rgba(255, 240, 220, .15); }
.case.portee::after { content: "✓"; position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--sauge); color: #1e2a16;
  font-size: 12px; font-weight: 900; line-height: 18px; text-align: center; }
.case .etiquette { position: absolute; top: 3px; right: 3px; padding: 1px 6px; border-radius: 999px; background: rgba(24, 16, 13, .8); color: #f2cf8a; font-size: 11px; font-weight: 900; }
.case .etiquette.cadenas { padding: 0; background: none; }
.case .etiquette.cadenas img { width: 20px; height: 20px; display: block; }
.case .etiquette.neuf { background: var(--rose); color: #3a1d20; font-size: 9px; letter-spacing: .04em; }

/* ── Le cadeau du jour et les défis ── */
.cadeau { width: min(360px, 94vw); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; text-align: left;
  background: linear-gradient(135deg, rgba(224, 127, 138, .32), rgba(224, 127, 138, .1)); border: 2px solid var(--rose); }
.cadeau.ouvert { background: rgba(255, 240, 220, .06); border-color: rgba(255, 240, 220, .12); }
.cadeau > img { width: 56px; height: 56px; }
.cadeau:not(.ouvert) > img { animation: flotte 1.6s ease-in-out infinite; }
.cadeau.ouvert > img { filter: saturate(.5); opacity: .75; }
.cadeau-texte { flex: 1; display: flex; flex-direction: column; }
.cadeau-texte b { font-size: 16px; font-weight: 900; }
.cadeau-texte span { font-size: 14px; font-weight: 700; color: var(--texte-doux); }
.cadeau .gros[hidden] { display: none; }
.cadeau-jours { width: min(360px, 94vw); display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cadeau-jours span { padding: 5px 0; border-radius: 9px; background: rgba(255, 240, 220, .06); color: var(--discret); font-size: 12px; font-weight: 900; }
.cadeau-jours .pris { background: rgba(143, 174, 114, .3); color: #d6ecc4; }
.cadeau-jours .ici { background: var(--rose); color: #3a1d20; }
.liste-defis { list-style: none; margin: 6px 0 0; padding: 0; width: min(360px, 94vw); display: flex; flex-direction: column; gap: 8px; }
.liste-defis li { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; padding: 10px 14px; border-radius: 14px;
  background: rgba(255, 240, 220, .06); border: 1px solid rgba(255, 240, 220, .08); text-align: left; }
.liste-defis .texte { font-size: 15px; font-weight: 800; }
.liste-defis .prix { display: flex; align-items: center; gap: 4px; font-weight: 900; color: #f2cf8a; }
.liste-defis .prix img { width: 20px; height: 20px; }
.liste-defis .barre { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: rgba(255, 240, 220, .1); position: relative; overflow: hidden; }
.liste-defis .barre::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: calc(var(--part, 0) * 100%); border-radius: 999px; background: var(--ocre); }
.liste-defis small { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--discret); }
.liste-defis li.fait { border-color: rgba(143, 174, 114, .5); }
.liste-defis li.fait .barre::after { background: var(--sauge); }
.liste-defis li.fait .prix { color: #d6ecc4; }
.defis-bonus { margin: 0; font-size: 14px; font-weight: 800; color: #f2cf8a; }
.defis-bonus:empty { display: none; }

/* ── Les icônes peintes dans le texte, les jauges ── */
.ico { width: 1.3em; height: 1.3em; vertical-align: -0.3em; margin-right: .3em; }
.etat .ligne { display: block; }
#son img { width: 24px; height: 24px; display: block; margin: auto; }
.jauge { display: block; width: min(220px, 60vw); height: 8px; border-radius: 999px; background: rgba(255, 240, 220, .1); position: relative; overflow: hidden; }
.jauge::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: calc(var(--part, 0) * 100%); border-radius: 999px; background: var(--ocre); }
.jauge[hidden] { display: none; }
#vitrine-image { cursor: pointer; }

/* ── La fin de partie : le prochain costume à portée ── */
.prochain { width: min(340px, 92vw); display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 14px; text-align: left; color: var(--creme);
  background: rgba(255, 240, 220, .06); border: 1px solid rgba(255, 240, 220, .1); }
.prochain[hidden] { display: none; }
.prochain img { width: 44px; height: 44px; object-fit: contain; }
.prochain span { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.prochain b { font-size: 14px; font-weight: 900; }
.prochain small { font-size: 12px; font-weight: 700; color: var(--texte-doux); }
.prochain .jauge { width: 100%; }
.prochain.pret { border-color: var(--ocre); background: rgba(220, 169, 92, .16); }
.prochain.pret small { color: #f2cf8a; font-weight: 900; }

/* ── Le bouton des vibrations (téléphones seulement ; caché pendant la partie, où la pause prend sa place) ── */
#vibreur { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 56px; width: 40px; height: 40px; border-radius: 14px; background: rgba(255, 240, 220, .1); z-index: 11; }
#vibreur img { width: 26px; height: 26px; display: block; margin: auto; }
#vibreur[hidden], body.en-jeu #vibreur, body:not(.tactile) #vibreur { display: none; }
#vibreur.coupe img { opacity: .4; }
#vibreur.coupe::after { content: ""; position: absolute; left: 7px; right: 7px; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--rose); transform: rotate(-45deg); }

/* ── Une question (oui / non), dans le style du jeu (à la place de la fenêtre du navigateur) ── */
.question { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(24, 16, 13, .74); animation: apparait .18s ease-out; }
.question[hidden] { display: none; }
.question-carte { width: min(340px, 100%); padding: 24px 20px 20px; border-radius: 22px; background: var(--brun-clair); box-shadow: 0 16px 34px rgba(0, 0, 0, .4); text-align: center; }
.question-carte p { margin: 0 0 20px; font-size: 17px; font-weight: 800; line-height: 1.4; color: var(--creme); }
.question-boutons { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.question-boutons .gros.petit { letter-spacing: .02em; }
.question.grave .gros { background: var(--rose); color: #3a1c20; box-shadow: 0 6px 0 #a9565f, 0 12px 22px rgba(0, 0, 0, .3); }
.question.grave .gros:active { box-shadow: 0 2px 0 #a9565f, 0 6px 12px rgba(0, 0, 0, .3); }
/* (les petits liens du bas de l'accueil : un point entre deux liens visibles) */
.petits-liens a:not([hidden]) ~ a:not([hidden])::before { content: "·"; display: inline-block; margin: 0 9px 0 5px; color: var(--discret); }
.question button:focus-visible { outline: 3px solid var(--creme); outline-offset: 3px; }

/* ── L'accueil du 18/11/2026 : les maps et les modes en rangées qui défilent ── */
.rangee-titre { width: min(360px, 94vw); display: flex; align-items: center; gap: 8px; margin: 4px 0 -4px; font-size: 12px; font-weight: 900; letter-spacing: .12em; color: var(--discret); }
.rangee-titre span { flex: none; }
.rangee-titre i { flex: 1; font-style: normal; letter-spacing: 0; font-weight: 700; text-align: left; }
.rangee-titre .fleche { width: 30px; height: 26px; border-radius: 9px; background: rgba(255, 240, 220, .08); color: var(--texte-doux); font-size: 18px; font-weight: 900; line-height: 1; }
.rangee-titre .fleche:disabled { opacity: .3; }
.cartes.defile { display: flex; grid-template-columns: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; padding: 8px 2px 4px; margin-top: -4px; }
.cartes.defile::-webkit-scrollbar { display: none; }
.cartes.defile .carte { flex: 0 0 45%; scroll-snap-align: start; min-height: 64px; }
.carte.choisie { border-color: rgba(255, 240, 220, .3); border-left-color: var(--teinte); }

/* ── La barre du bas : Jouer, Boutique, Défis, Classements, Amis (sur les écrans de menu) ── */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; display: none; justify-content: center; gap: 2px;
  padding: 16px 6px calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(27, 19, 16, 0), rgba(27, 19, 16, .97) 30%); pointer-events: none; }
body.avec-nav .nav { display: flex; }
.nav button { position: relative; flex: 1; max-width: 84px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px 5px; border-radius: 14px;
  background: none; color: var(--discret); font-size: 11px; font-weight: 800; pointer-events: auto; }
.nav img { width: 34px; height: 34px; object-fit: contain; transition: transform .12s; }
.nav button.actif { color: var(--creme); background: rgba(255, 240, 220, .1); }
.nav button.actif img { transform: translateY(-2px) scale(1.08); }
.nav button:active { background: rgba(255, 240, 220, .16); }
.nav .pastille { top: 2px; right: 14px; }
body.avec-nav .ecran { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }

/* ── La boutique : les onglets, les offres (dans l'appli) ── */
.boutique-onglets { width: min(360px, 94vw); margin: 0; }
.boutique-onglets[hidden], .boutique-vue[hidden] { display: none; }
.boutique-onglets button { position: relative; padding: 9px 6px; font-size: 14px; }
.boutique-onglets button.actif { background: var(--ocre); color: #3a2618; }
.boutique-onglets .pastille { top: 5px; right: 10px; }
.boutique-vue { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.liste-offres { width: min(360px, 94vw); display: flex; flex-direction: column; gap: 8px; }
.offre { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 16px; text-align: left; color: var(--creme);
  background: rgba(255, 240, 220, .06); border: 1px solid rgba(255, 240, 220, .1); }
.offre[hidden] { display: none; }
.offre .vignette { width: 54px; height: 54px; object-fit: contain; flex: none; }
.offre .texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.offre b { font-size: 15px; font-weight: 900; }
.offre .detail { font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--texte-doux); }
.offre .limite { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: var(--rose); color: #3a1d20; font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.offre .prix, .carte-une .prix, .sac .prix, .prestige-carte .prix { flex: none; display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 999px; background: var(--ocre); color: #3a2618; font-size: 14px; font-weight: 900;
  box-shadow: 0 4px 0 var(--ocre-fonce); white-space: nowrap; }
.offre .prix:active, .carte-une .prix:active, .sac .prix:active, .prestige-carte .prix:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ocre-fonce); }
.offre .prix img { width: 18px; height: 18px; }
.offre .prix:disabled, .carte-une .prix:disabled, .sac .prix:disabled, .prestige-carte .prix:disabled { background: rgba(143, 174, 114, .28); color: #d6ecc4; box-shadow: none; transform: none; }
.offre.phare { border-color: var(--ocre); background: linear-gradient(135deg, rgba(220, 169, 92, .22), rgba(255, 240, 220, .05)); }
.offre.gratuite { width: min(360px, 94vw); border-color: rgba(143, 174, 114, .55); background: rgba(143, 174, 114, .12); }
.offre.gratuite .prix { background: var(--sauge); color: #1e2a16; box-shadow: 0 4px 0 var(--sauge-fonce); }
.offre.gratuite .prix:disabled { background: rgba(255, 240, 220, .1); color: var(--discret); box-shadow: none; }
/* (l'offre de bienvenue sur l'accueil : comme la carte du cadeau, en ocre) */
.offre-titre { border: 2px solid var(--ocre); background: linear-gradient(135deg, rgba(220, 169, 92, .3), rgba(42, 30, 25, .85)); }
.offre-titre img { animation: none; }
.offre-titre em { background: var(--ocre); color: #3a2618; }
/* (une petite image sur la carte d'une map ou d'un mode : le chrono de la Ruée, la dynamite de la Carrière…) */
.carte .image { position: absolute; right: 8px; bottom: 7px; width: 26px; height: 26px; object-fit: contain; opacity: .95; }
.carte.fermee .image { opacity: .5; }
.carte .detail { padding-right: 0; }
.carte.imagee .detail { padding-right: 30px; }
/* (la médaille des mécènes, à côté de leur nom) */
ol li .nom .ico { width: 1.15em; height: 1.15em; margin: 0 0 0 .3em; vertical-align: -0.22em; }

/* ── La manette de jeu ── */
/* (le bouton choisi à la manette : un cadre crème, net, qui suit l'arrondi du bouton) */
body.manette-ui :focus { outline: 3px solid var(--creme); outline-offset: 3px; }
body.manette-ui .carte:focus, body.manette-ui .case:focus, body.manette-ui .offre .prix:focus { transform: translateY(-2px); }
body.manette-ui #nav button:focus { background: rgba(255, 240, 220, .16); }
/* (sur un téléphone, à la manette : les touches de l'écran s'effacent, le puits prend la place) */
body.tactile.manette-active #manette { display: none; }
.aide-manette { display: none; margin: 0; max-width: 360px; font-size: 13px; font-weight: 700; line-height: 1.45; color: var(--texte-doux); }
body.manette-active .aide-manette { display: block; }
body.manette-active .aide { display: none; }
body.manette-active:not(.en-jeu) #vibreur:not([hidden]) { display: block; }
/* (ce qu'on choisit à la manette n'est jamais caché derrière la barre du bas) */
body.avec-nav .ecran { scroll-padding-bottom: calc(100px + env(safe-area-inset-bottom)); scroll-padding-top: 60px; }

/* ── La progression : le niveau, le profil et ses trophées, le passe de saison, les effets d'éclats ── */
.niveau-titre { display: flex; align-items: center; gap: 10px; width: min(300px, 86vw); padding: 7px 14px; border-radius: 999px; background: rgba(255, 240, 220, .08); color: var(--creme); }
.niveau-titre[hidden] { display: none; }
.niveau-titre .niv { font-size: 12px; font-weight: 900; letter-spacing: .08em; color: var(--ocre); white-space: nowrap; }
.niveau-titre .niv b { font-size: 16px; color: var(--creme); }
.niveau-titre .jauge { flex: 1; width: auto; }
.niv-trophees { display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 800; color: var(--texte-doux); }
.niv-trophees img { width: 20px; height: 20px; }
.carte-joueur { width: min(360px, 94vw); display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: rgba(255, 240, 220, .07); text-align: left; }
.carte-joueur img { height: 92px; width: auto; }
.carte-joueur div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.carte-joueur b { font-size: 20px; font-weight: 900; }
.carte-joueur span { font-size: 14px; font-weight: 900; color: var(--ocre); }
.carte-joueur .jauge { width: 100%; }
.carte-joueur small { font-size: 12px; font-weight: 700; color: var(--discret); }
.stats-grille { width: min(360px, 94vw); display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stats-grille div { display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; border-radius: 12px; background: rgba(255, 240, 220, .05); }
.stats-grille b { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stats-grille span { font-size: 10px; font-weight: 700; color: var(--discret); line-height: 1.2; }
.liste-trophees { list-style: none; margin: 0; padding: 0; width: min(360px, 94vw); display: flex; flex-direction: column; gap: 6px; }
.liste-trophees li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 240, 220, .05); text-align: left; }
.liste-trophees li > img { width: 34px; height: 34px; flex: none; filter: grayscale(1) opacity(.45); }
.liste-trophees li.fait { background: rgba(220, 169, 92, .14); }
.liste-trophees li.fait > img { filter: none; }
.liste-trophees .texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.liste-trophees .texte .jauge { width: 100%; height: 6px; }
.liste-trophees b { font-size: 14px; font-weight: 900; }
.liste-trophees span { font-size: 12px; font-weight: 700; color: var(--texte-doux); }
.liste-trophees small { font-size: 11px; font-weight: 700; color: var(--discret); }
.liste-trophees .prix { flex: none; display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 900; color: #f2cf8a; }
.liste-trophees .prix img { width: 18px; height: 18px; }
.liste-trophees li.fait .prix { color: var(--sauge); }
.carte-passe { width: min(360px, 94vw); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border-radius: 18px; text-align: left; color: var(--creme);
  background: linear-gradient(135deg, rgba(220, 169, 92, .28), rgba(42, 30, 25, .9)); border: 2px solid var(--ocre); }
.carte-passe[hidden] { display: none; }
.carte-passe .etiquette { font-size: 11px; font-weight: 900; letter-spacing: .1em; color: var(--ocre); }
.carte-passe b { font-size: 17px; font-weight: 900; }
.carte-passe .jauge { width: 100%; }
.carte-passe small { font-size: 12px; font-weight: 700; color: var(--texte-doux); }
.passe-tete { width: min(360px, 94vw); display: flex; flex-direction: column; gap: 5px; }
.passe-tete b { font-size: 18px; font-weight: 900; }
.passe-tete .jauge { width: 100%; height: 10px; }
.passe-tete small { font-size: 12px; font-weight: 700; color: var(--discret); }
.passe-colonnes, .liste-paliers .palier { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 6px; align-items: center; }
.passe-colonnes { width: min(360px, 94vw); font-size: 11px; font-weight: 900; letter-spacing: .1em; color: var(--discret); text-transform: uppercase; }
.passe-colonnes span:first-child { grid-column: 2; }
.liste-paliers { width: min(360px, 94vw); display: flex; flex-direction: column; gap: 5px; }
.liste-paliers .palier { width: 100%; padding: 5px 4px; border-radius: 12px; background: rgba(255, 240, 220, .04); color: var(--creme); text-align: left; }
.liste-paliers .palier > b { font-size: 15px; font-weight: 900; color: var(--discret); text-align: center; }
.liste-paliers .palier.atteint > b { color: var(--ocre); }
.liste-paliers .palier.suivant { background: rgba(220, 169, 92, .16); box-shadow: inset 0 0 0 2px rgba(220, 169, 92, .55); }
.recompense { display: flex; align-items: center; gap: 5px; min-height: 40px; padding: 4px 8px; border-radius: 10px; background: rgba(255, 240, 220, .06); font-size: 13px; font-weight: 800; overflow: hidden; }
.recompense img, .recompense canvas { width: 28px; height: 28px; object-fit: contain; flex: none; }
.recompense.or { background: rgba(220, 169, 92, .14); color: #f2cf8a; }
.recompense.ferme { opacity: .55; }
.recompense.vide { justify-content: center; color: var(--discret); background: none; }
.recompense.recu::after { content: "✓"; margin-left: auto; color: var(--sauge); font-weight: 900; }
.fin-xp { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 14px; font-weight: 900; color: #f2cf8a; }
.fin-xp[hidden] { display: none; }
.fin-xp .jauge { width: min(240px, 66vw); }
.fin-xp.monte span { animation: battement .8s ease-in-out 3; }
ol li .niv { flex: none; align-self: center; padding: 1px 6px; border-radius: 999px; background: rgba(255, 240, 220, .1); color: var(--texte-doux); font-size: 11px; font-weight: 900; }
.effet-apercu { width: 220px; height: 140px; }
.case.effet > canvas { width: 72%; height: auto; margin-bottom: 6px; }
.boutique-onglets button[hidden] { display: none; }
/* (les écrans longs de la progression commencent sous les boutons du haut) */
#passe, #joueur { padding-top: calc(64px + env(safe-area-inset-top)); }
#fin-gains-detail { white-space: pre-line; line-height: 1.45; }

/* ── À la une : la vitrine de la boutique ── */
.rubrique { width: min(360px, 94vw); margin: 10px 0 -2px; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 0; font-size: 12px; font-weight: 900; letter-spacing: .12em; color: var(--discret); text-align: left; }
.rubrique[hidden] { display: none; }
.rubrique i { font-style: normal; letter-spacing: 0; font-weight: 700; color: var(--texte-doux); }
.une { width: min(360px, 94vw); display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 10px 2px 6px; }
.une::-webkit-scrollbar { display: none; }
.une[hidden], .prestige[hidden], .promos[hidden] { display: none; }
.carte-une { position: relative; flex: 0 0 82%; scroll-snap-align: center; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; border-radius: 20px; text-align: left;
  background: linear-gradient(160deg, color-mix(in srgb, var(--teinte) 34%, #2a1e19), #241a16 70%); border: 2px solid color-mix(in srgb, var(--teinte) 70%, transparent); }
.carte-une .images { height: 170px; display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-radius: 14px; background: radial-gradient(ellipse at 50% 85%, rgba(255, 240, 220, .16), transparent 70%); }
.carte-une .images img { height: 160px; width: auto; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .35)); animation: flotte 2.6s ease-in-out infinite; }
.carte-une .images img + img { animation-delay: -1.3s; }
.carte-une .images.plusieurs img { height: 76px; align-self: center; }
.carte-une .texte { display: flex; flex-direction: column; gap: 3px; }
.carte-une .texte b { font-size: 19px; font-weight: 900; }
.carte-une .texte span { font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--texte-doux); }
.carte-une .texte small { font-size: 12px; font-weight: 800; color: var(--teinte); }
.carte-une .prix { align-self: stretch; justify-content: center; padding: 12px; font-size: 17px; }
.badge-une { position: absolute; top: -9px; left: 14px; padding: 3px 10px; border-radius: 999px; background: var(--teinte, var(--ocre)); color: #2a1e19; font-size: 10px; font-weight: 900; letter-spacing: .08em; z-index: 1; }
.promos { width: min(360px, 94vw); display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.promo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; border-radius: 14px; background: rgba(255, 240, 220, .06); color: var(--creme);
  border-bottom: 3px solid var(--teinte); }
.promo img { height: 64px; width: auto; }
.promo b { font-size: 11px; font-weight: 900; }
.promo .prix-promo { display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 900; color: #f2cf8a; }
.promo .prix-promo s { color: var(--discret); font-size: 11px; font-weight: 700; }
.promo .prix-promo img { height: 15px; }
.promo::after { content: "-30 %"; position: absolute; top: -6px; right: -2px; padding: 1px 6px; border-radius: 999px; background: var(--rose); color: #3a1d20; font-size: 10px; font-weight: 900; }
.promo.possede::after { content: none; }
.promo.possede .prix-promo { color: var(--sauge); }
.sacs { width: min(360px, 94vw); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sacs[hidden] { display: none; }
.sac { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 6px 8px; border-radius: 16px; background: rgba(255, 240, 220, .06); }
.sac .tas { height: 48px; display: flex; align-items: flex-end; justify-content: center; }
.sac .tas img { width: 30px; height: 30px; margin: 0 -7px; }
.sac .tas.n3 img:nth-child(2) { margin-bottom: 12px; }
.sac .tas.n6 { flex-wrap: wrap; width: 70px; }
.sac .tas.n6 img { width: 26px; height: 26px; margin: -5px -3px; }
.sac b { font-size: 17px; font-weight: 900; }
.sac small { font-size: 11px; font-weight: 800; color: var(--sauge); }
.sac .prix { margin-top: 4px; width: 100%; justify-content: center; }
.sac .badge-une { left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 9px; letter-spacing: .03em; padding: 3px 7px; }
.prestige { width: min(360px, 94vw); display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.prestige-carte { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border-radius: 18px; background: linear-gradient(170deg, rgba(214, 149, 124, .2), rgba(255, 240, 220, .04)); }
.prestige-carte img { height: 110px; width: auto; }
.prestige-carte b { font-size: 14px; font-weight: 900; }
.prestige-carte .prix { width: 100%; justify-content: center; }
.offre .contenu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; }
.offre .contenu img { width: 26px; height: 26px; object-fit: contain; }
.offre .contenu em { font-style: normal; font-size: 11px; font-weight: 900; color: #f2cf8a; }
.offre .valeur { font-size: 11px; font-weight: 800; color: var(--sauge); }
.boutique-vue .prix.bientot:disabled { background: rgba(255, 240, 220, .1); color: var(--texte-doux); box-shadow: none; }
.case .etiquette.en-promo { background: var(--rose); color: #3a1d20; }
body.manette-ui .carte-une .prix:focus, body.manette-ui .sac .prix:focus, body.manette-ui .prestige-carte .prix:focus, body.manette-ui .promo:focus { transform: translateY(-2px); }
/* ── Le déballage ── */
.deballage { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 14, 11, .82); animation: apparait .25s ease-out; }
.deballage[hidden] { display: none; }
.deballage-feu { position: absolute; left: 50%; top: 50%; width: min(720px, 100vw); height: min(720px, 100vw); transform: translate(-50%, -50%); pointer-events: none; }
.deballage-carte { position: relative; width: min(330px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 18px 18px; border-radius: 26px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--teinte, #dca95c) 36%, #2a1e19), #241a16 75%); border: 2px solid var(--teinte, #dca95c); animation: deballe .5s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes deballe { from { transform: scale(.6) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
.deballage-titre { margin: 0; font-size: 13px; font-weight: 900; letter-spacing: .14em; color: var(--teinte, #dca95c); }
.deballage-scene { height: 220px; display: flex; align-items: flex-end; justify-content: center; border-radius: 50%; background: radial-gradient(circle at 50% 70%, rgba(255, 240, 220, .18), transparent 65%); width: 100%; }
.deballage-scene img { height: 210px; width: auto; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .35)); animation: monte .7s ease-out, flotte 2.6s ease-in-out .7s infinite; }
@keyframes monte { from { transform: translateY(40px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.deballage-scene canvas { width: 200px; height: 200px; align-self: center; }
.deballage-scene canvas[hidden], .deballage-scene img[hidden] { display: none; }
.deballage-carte b { font-size: 24px; font-weight: 900; }
.deballage-carte span { font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.deballage-boutons { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
/* ── L'écran de fin : Roko dans son costume, à côté du score ── */
.fin-score { display: flex; align-items: center; justify-content: center; gap: 6px; }
.fin-roko { height: 92px; width: auto; animation: flotte 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.fin-roko.saute { animation: saute .55s ease-in-out 4; }
@keyframes saute { 50% { transform: translateY(-18px) rotate(-6deg); } }

/* ══════════ Le rendu « pro » (18/11/2026) ══════════
   Des fonds pleins et calmes (la partie ne se voit plus qu'adoucie, derrière l'accueil, la fin et la pause), un en-tête
   avec le titre de l'écran, une barre du bas pleine, des cartes pleines, l'écran de fin en blocs, les vignettes des maps. */
:root { --fond: #1d1512; --surface: #2c211c; --surface-2: #362922; --bord: rgba(255, 240, 220, .09); --ombre: 0 10px 24px rgba(0, 0, 0, .28);
  --entete: calc(58px + env(safe-area-inset-top)); }
.ecran { padding-top: calc(24px + env(safe-area-inset-top)); background: linear-gradient(180deg, #231a16, var(--fond) 50%, #181110); }
#titre { background: radial-gradient(ellipse 140% 80% at 50% 28%, rgba(29, 21, 18, .6), rgba(21, 15, 12, .9) 80%);
  -webkit-backdrop-filter: blur(3px) saturate(.75); backdrop-filter: blur(3px) saturate(.75); }
#fin { justify-content: flex-start; padding-top: calc(30px + env(safe-area-inset-top));
  background: radial-gradient(ellipse 130% 70% at 50% 22%, rgba(36, 26, 22, .88), rgba(21, 15, 12, .97) 78%);
  -webkit-backdrop-filter: blur(8px) saturate(.7); backdrop-filter: blur(8px) saturate(.7); }
#pause { background: rgba(21, 15, 12, .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#collection, #defis, #classements, #amis, #joueur, #passe, #partage { justify-content: flex-start; padding-top: calc(var(--entete) + 10px);
  background: linear-gradient(180deg, #231a16, var(--fond) 45%, #181110); }
/* ── L'en-tête ── */
.entete { position: fixed; top: 0; left: 0; right: 0; height: var(--entete); padding: env(safe-area-inset-top) 66px 0; z-index: 11;
  display: flex; align-items: center; justify-content: center; pointer-events: none; transition: background-color .2s, box-shadow .2s; }
.entete[hidden], body.en-jeu .entete { display: none; }
body.defile .entete { background: rgba(29, 21, 18, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--bord), 0 8px 18px rgba(0, 0, 0, .25); }
.entete b { font-size: 18px; font-weight: 900; letter-spacing: .01em; color: var(--creme); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entete-retour { position: absolute; left: 10px; top: calc(10px + env(safe-area-inset-top)); width: 40px; height: 40px; border-radius: 14px; background: rgba(255, 240, 220, .1);
  display: flex; align-items: center; justify-content: center; pointer-events: auto; }
.entete-retour[hidden] { display: none; }
.entete-retour svg { width: 22px; height: 22px; }
.entete-retour:active { background: rgba(255, 240, 220, .2); }
#son, #vibreur, .bourse { box-shadow: inset 0 0 0 1px var(--bord); }
/* (sur les écrans à titre, le son et les vibrations restent sur l'accueil et en partie) */
body.avec-entete #son, body.avec-entete #vibreur, body.avec-entete.manette-active:not(.en-jeu) #vibreur:not([hidden]) { display: none; }
/* (le titre de l'écran est dans l'en-tête ; les « ← Retour » du bas : la barre du bas et l'en-tête s'en chargent) */
#collection > h2, #defis > h2, #classements > h2, #amis > h2, #joueur > h2:first-of-type, #partage > h2 { display: none; }
#passe > h2 { font-size: 12px; letter-spacing: .14em; color: var(--ocre); }
#joueur > h2:not(:first-of-type) { width: min(360px, 94vw); margin: 12px 0 0; text-align: left; font-size: 12px; letter-spacing: .12em; }
body.avec-nav .ecran > .retour[data-retour], body.avec-nav #passe-retour, #fermer-partage { display: none; }
.retour { padding: 10px 18px; border-radius: 999px; background: rgba(255, 240, 220, .07); color: var(--texte-doux); }
.retour:active { background: rgba(255, 240, 220, .14); }
/* ── La barre du bas : pleine ── */
.nav { pointer-events: auto; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(27, 20, 16, .95);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--bord); }
body.avec-nav .ecran { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
/* ── Des cartes pleines ── */
.carte { background: var(--surface); border: 1px solid var(--bord); border-left: 5px solid var(--teinte); box-shadow: 0 6px 14px rgba(0, 0, 0, .25); }
.carte.choisie { background: var(--surface-2); border-color: rgba(255, 240, 220, .24); border-left-color: var(--teinte); }
.niveau-titre { background: var(--surface); box-shadow: inset 0 0 0 1px var(--bord), 0 6px 14px rgba(0, 0, 0, .2); }
.cadeau-titre { background: linear-gradient(135deg, #4b2d30, #2d211d 75%); }
.offre-titre { background: linear-gradient(135deg, #4d3a25, #2d211d 75%); }
.rangee-titre .fleche { background: var(--surface); }
.tableau { background: var(--surface); border-color: var(--bord); }
/* ── Les vignettes peintes des maps ── */
.cartes.defile .carte { flex: 0 0 47%; }
.carte.vignette { padding: 0; gap: 0; min-height: 0; overflow: hidden; border-left-width: 1px; border-bottom: 4px solid var(--teinte); }
.carte.vignette.choisie { border-color: rgba(255, 240, 220, .4); border-bottom-color: var(--teinte); }
.carte .art { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #241a16; pointer-events: none; }
.carte.vignette .nom { padding: 8px 10px 0; }
.carte.vignette .detail, .carte.vignette.imagee .detail { padding: 1px 10px 9px; }
.carte.vignette .image { display: none; }
.carte.vignette .badge { top: 7px; right: 7px; }
.carte.fermee { opacity: .92; }
.carte.fermee .art { filter: grayscale(.9) brightness(.5); }
.carte.fermee .nom { color: var(--discret); }
/* ── L'écran de fin en blocs ── */
.fin-recompenses { width: min(360px, 94vw); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--bord); box-shadow: var(--ombre); }
.fin-recompenses:has(> #fin-gains[hidden]):has(> #fin-xp[hidden]):has(> #fin-gains-detail:empty) { display: none; }
.fin-xp { width: 100%; }
.fin-xp .jauge { width: 100%; height: 10px; }
#fin-gains-detail { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: none; min-height: 0; color: #f2cf8a; }
.gain-ligne { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 240, 220, .05);
  font-size: 13px; font-weight: 800; line-height: 1.3; text-align: left; }
.gain-ligne .ico { width: 24px; height: 24px; margin: 0; flex: none; vertical-align: 0; }
.gain-ligne.or { color: var(--texte-doux); background: rgba(220, 169, 92, .07); border: 1px dashed rgba(220, 169, 92, .4); }
#fin .tableau { width: min(360px, 94vw); }
/* ── La boutique ── */
.boutique-vue .prix.bientot:disabled { background: transparent; color: var(--texte-doux); border: 1.5px solid rgba(255, 240, 220, .16); box-shadow: none; }
.une-points { display: flex; gap: 6px; justify-content: center; margin: -4px 0 2px; }
.une-points[hidden] { display: none; }
.une-points i { width: 7px; height: 7px; border-radius: 999px; background: rgba(255, 240, 220, .22); transition: width .2s, background-color .2s; }
.une-points i.actif { width: 20px; background: var(--ocre); }
/* ── Les amis : une carte pour inviter, la liste, le pseudo ── */
.carte-amis { width: min(360px, 94vw); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--bord); box-shadow: var(--ombre); }
.carte-amis .ligne input { flex: 1; width: auto; min-width: 0; }
.carte-amis .ligne { width: 100%; }
.profil { padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--bord); }
.liste-amis li { padding: 9px 10px; margin-bottom: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--bord); }
.liste-amis li.vide, ol li.vide { padding: 16px 8px; font-size: 15px; background: none; border: 0; }
#amis-etat:empty { display: none; }

/* ── Le modèle du lancement (18/11/2026) : Roko Premium, la tirelire, l'essai d'un costume, la collection de Noël ── */
/* Roko Premium, en tête de la boutique : l'image peinte, ce qu'il donne, son prix. */
.premium { position: relative; width: min(360px, 94vw); display: flex; flex-direction: column; gap: 11px; padding: 0 0 14px; border-radius: 22px; overflow: hidden; text-align: left;
  background: linear-gradient(180deg, #3b2a1c, var(--surface) 64%); border: 1.5px solid rgba(220, 169, 92, .55); box-shadow: var(--ombre); }
.premium[hidden] { display: none; }
.premium-image { position: relative; height: 186px; overflow: hidden; background: #2a1e19; }
.premium-image img { width: 100%; height: 100%; object-fit: cover; object-position: 12% 42%; display: block; }
.premium-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, #37281b 100%); }
.premium-nom { position: absolute; right: 14px; top: 46%; transform: translateY(-50%); width: 43%; display: flex; flex-direction: column; gap: 5px; z-index: 1; }
.premium-nom b { font-size: 26px; line-height: 1.02; font-weight: 900; color: #f2cf8a; }
.premium-nom span { font-size: 12px; font-weight: 800; line-height: 1.25; color: var(--creme); opacity: .86; }
.premium-atouts { list-style: none; margin: 0; padding: 0 14px; display: flex; flex-direction: column; gap: 8px; }
.premium-atouts li { position: relative; display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; line-height: 1.25; color: var(--texte-doux); }
.premium-atouts li b { color: var(--creme); font-weight: 900; }
.premium-atouts img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.premium-atouts li.sans::before { content: ""; position: absolute; left: 1px; top: 50%; width: 26px; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--rose); transform: rotate(-40deg); z-index: 1; }
.premium-action { padding: 2px 14px 0; display: flex; }
.premium .prix { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 13px; border-radius: 999px; background: var(--ocre); color: #3a2618; font-size: 17px; font-weight: 900;
  box-shadow: 0 4px 0 var(--ocre-fonce); white-space: nowrap; }
.premium .prix:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ocre-fonce); }
.premium-merci { flex: 1; margin: 0; padding: 11px; border-radius: 14px; text-align: center; font-size: 14px; font-weight: 900; color: #d6ecc4; background: rgba(143, 174, 114, .16); }
.premium-note { margin: 0; padding: 0 14px; font-size: 11.5px; font-weight: 700; color: var(--discret); text-align: center; }
.premium.acquis .premium-note { display: none; }
body.manette-ui .premium .prix:focus { transform: translateY(-2px); }
/* La carte Premium de l'accueil et de l'écran de fin (comme la carte du cadeau, en ocre et sans bouger). */
.premium-titre { border: 1.5px solid rgba(220, 169, 92, .65); background: linear-gradient(135deg, #4d3a25, #2d211d 75%); }
.premium-titre img { animation: none; }
.premium-titre em { background: var(--ocre); color: #3a2618; white-space: nowrap; }
.premium-titre em:empty { display: none; }
/* La tirelire. */
.offre.tirelire { width: min(360px, 94vw); border-color: rgba(214, 149, 124, .5); background: linear-gradient(135deg, rgba(214, 149, 124, .17), rgba(255, 240, 220, .04)); }
.offre.tirelire .vignette { width: 68px; height: 68px; }
.offre.tirelire .jauge { width: 100%; margin-top: 4px; }
.offre.tirelire.pleine .vignette { animation: flotte 1.3s ease-in-out infinite; }
.offre.tirelire .prix img { width: 16px; height: 16px; }
.tirelire-action { flex: none; display: flex; }
.tirelire-action .prix.bientot:disabled { display: flex; align-items: center; gap: 3px; }
/* L'essai d'un costume : le bouton de la vitrine, la carte de l'écran de fin. */
.bouton.essai { margin-top: 4px; padding: 9px 18px; background: transparent; border: 1.5px solid rgba(255, 240, 220, .2); color: var(--creme); font-size: 14px; font-weight: 900; }
.bouton.essai[hidden] { display: none; }
.fin-essai { width: min(360px, 94vw); display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 16px; text-align: left;
  background: linear-gradient(135deg, rgba(214, 149, 124, .24), var(--surface)); border: 1.5px solid rgba(214, 149, 124, .6); }
.fin-essai[hidden] { display: none; }
.fin-essai > img { width: 50px; height: 50px; object-fit: contain; flex: none; }
.fin-essai > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fin-essai b { font-size: 14.5px; font-weight: 900; line-height: 1.2; }
.fin-essai small { font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--texte-doux); }
.fin-essai .prix { flex: none; display: flex; align-items: center; gap: 4px; padding: 10px 13px; border-radius: 999px; background: var(--ocre); color: #3a2618; font-size: 14px; font-weight: 900;
  box-shadow: 0 4px 0 var(--ocre-fonce); white-space: nowrap; }
.fin-essai .prix:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ocre-fonce); }
.fin-essai .prix img { width: 18px; height: 18px; }
.fin-essai .prix[hidden] { display: none; }
/* L'écran de fin : « ×2 » d'un Premium ; une ligne de gain qui mène quelque part. */
.x2 { padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, #f2cf8a, #dca95c); color: #3a2618; font-size: 12px; font-weight: 900; letter-spacing: .03em; white-space: nowrap; }
.x2[hidden] { display: none; }
.gain-ligne.lien { cursor: pointer; }
.gain-ligne.lien::after { content: "›"; margin-left: auto; padding-left: 6px; font-size: 19px; line-height: 1; opacity: .6; }
/* Le nom en or d'un Premium, dans les classements et chez les amis. */
ol li .nom.or { color: #f2cf8a; }
/* Une édition limitée, dans la grille des costumes et sur sa grande carte. */
.case[data-limite]::before { content: attr(data-limite); position: absolute; top: 4px; left: 4px; padding: 1px 5px; border-radius: 999px; background: #cf6a5f; color: #2a1e19; font-size: 8.5px; font-weight: 900; letter-spacing: .05em; }
.carte-une .prix img { width: 18px; height: 18px; }
/* (une seule grande offre : elle prend toute la largeur, au lieu de laisser un vide à droite) */
.une > .carte-une:only-child { flex-basis: 100%; }
.prix img[hidden] { display: none; }
/* Les règles des pseudos, sous les deux champs où l'on en choisit un. */
.regles-pseudo { margin: -4px 0 0; font-size: 12px; font-weight: 600; color: var(--discret); }
.regles-pseudo a { color: var(--texte-doux); font-weight: 800; }
#envoi[hidden] + .regles-pseudo { display: none; }
