/* =============================================================
   FRONTIÈRES — Direction artistique
   Fond clair · pastels vifs · contours noirs fins · typo grasse
   ============================================================= */

:root {
  --bg:      #e9e6dd;    /* derrière le téléphone */
  --paper:   #fbfaf6;    /* l'écran de l'app */
  --surface: #ffffff;    /* cartes/boutons "blancs" (champs, choix…) */
  --ink:     #16130f;    /* texte + contours */
  --muted:   #736c61;    /* gris doux (contraste 4,97:1 sur --paper) */
  --msg-ok:  #1f8a4c;    /* messages : verts/rouges/ambre, variabilises pour le sombre */
  --msg-ko:  #c0392b;
  --msg-info:#8a5d00;
  --coeur-vide: #e7e2d8; /* coeur perdu : DOIT etre plus sombre que le fond en clair */
  --grat:    rgba(22,19,15,0.07);
  --halo:    rgba(255,255,255,0.85);
  --panel:   #eaf0fb;    /* fond du globe */
  --avatar-bg:#cfe3ff;   /* fond derrière un avatar */

  --green:  #8fe0a0;
  --blue:   #9ec1ff;
  --pink:   #ffb3cf;
  --yellow: #ffdd6b;
  --lavender:#c6b6ff;
  --coral:  #ffb38a;
  --rouge:  #e63946;

  --bw: 1.6px;                          /* épaisseur des contours */
  --r: 18px;                            /* arrondi standard */
  --sh: 2px 3px 0 rgba(22,19,15,0.14);  /* petite ombre "sticker" */
}

/* =============================================================
   THÈME SOMBRE — tons profonds (pas des pastels criards sur noir).
   "auto" suit le réglage du téléphone ; le profil peut forcer.
   ============================================================= */
/* Le CLAIR est le thème de base (celui de :root). Le SOMBRE s'active
   uniquement via data-theme="dark" (choix explicite dans le profil) —
   on ne suit plus le réglage système du téléphone. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:      #100e0b;
  --paper:   #201d17;
  --surface: #2c2820;
  --ink:     #f1ece1;
  --muted:   #9d9584;
  --panel:   #171f2a;
  --avatar-bg:#33404f;
  --green:  #3f9d5a;
  --blue:   #4f80c4;
  --pink:   #c76d92;
  --yellow: #c9a23a;
  --lavender:#8574c8;
  --coral:  #cc7749;
  --rouge:  #e6473a;
  --msg-ok:  #6cd48f;
  --msg-ko:  #ff7b6b;
  --msg-info:#e0b23c;
  --coeur-vide: #3a3529;
  --grat:    rgba(255,255,255,0.10);
  --halo:    rgba(0,0,0,0.75);
  --sh: 2px 3px 0 rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  height: 100vh;
  height: 100dvh;                 /* suit le clavier sur mobile */
  min-height: 100dvh;
  font-family: "Space Grotesk", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  background: var(--paper);       /* plus aucune bordure de fond visible sur mobile */
  color: var(--ink);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* Sensation « vraie app » : pas de sélection de texte à l'appui long,
     pas de rebond / pull-to-refresh du navigateur. */
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }

/* Le jeu reste simplement en portrait ; le paysage ne fait rien (pas d'overlay). */

/* --- Cadre téléphone --- */
.telephone {
  width: 100%;
  max-width: 430px;
  height: 100%;
  max-height: 100%;      /* sur telephone, le cadre remplit TOUT l'ecran */
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
/* Cadre « téléphone » seulement sur un écran assez HAUT (ordinateur, tablette) : un téléphone
   tenu en paysage (390 px de haut) perdait la moitié de sa hauteur dans le cadre décoratif. */
@media (min-width: 460px) and (min-height: 600px) {
  body { padding: 24px; background: var(--bg); }
  .telephone {
    max-height: 920px;
    border-radius: 40px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25), 0 0 0 10px #14110f, 0 0 0 12px #2a2722;
  }
}

.jeu {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 18px 22px;
  min-height: 0;
}

/* =============================================================
   EN-TÊTE
   ============================================================= */
.entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.titre { display: flex; align-items: center; gap: 9px; }
h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.5px; }

/* Logo planète mignonne */
.logo-planete { width: 30px; height: 30px; flex: 0 0 auto; }
.lp-corps   { fill: var(--green); stroke: var(--ink); stroke-width: 2.4; }
.lp-trait   { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.lp-sparkle { fill: var(--ink); }

/* Mascotte Terre (aplats) : océan bleu + continents verts + visage */
.terre-ocean { fill: var(--blue); stroke: var(--ink); stroke-width: 2.4; }
.terre-sol   { fill: var(--green); }
.terre-trait { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.terre-star  { fill: var(--ink); }
/* Visage « nouvelle mascotte » (yeux ouverts + sourire, comme l'icône) */
.terre-oeil    { fill: var(--ink); }
.terre-sourire { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.actions { display: flex; gap: 8px; }

.icone {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  padding: 0;
  border-radius: 50%;
  border: var(--bw) solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--sh);
  transition: transform 0.12s ease, background 0.2s ease;
}
.icone svg { width: 19px; height: 19px; }
.icone:hover { background: var(--surface); }
.icone:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(22,19,15,0.14); }

/* =============================================================
   MISSION
   ============================================================= */
.mission {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 12px;
}
.pays-cible {
  flex: 1;
  padding: 11px 12px;
  border-radius: 14px;
  border: var(--bw) solid var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  box-shadow: var(--sh);
}
.depart-cible  { background: var(--green); }
.arrivee-cible { background: var(--pink); }
.fleche { display: grid; place-items: center; color: var(--ink); }
.fleche svg { width: 22px; height: 22px; }

/* =============================================================
   GLOBE (panneau clair)
   ============================================================= */
.zone-globe {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 6px 0 12px;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
  border: var(--bw) solid var(--ink);
  box-shadow: var(--sh);
}
#globe {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
#globe:active { cursor: grabbing; }

.sphere    { fill: none; stroke: none; }
.graticule { fill: none; stroke: var(--grat); stroke-width: 0.4; }

.pays { fill: var(--surface); stroke: var(--ink); stroke-width: 0.7; transition: fill 0.35s ease; }
.pays.pays-depart      { fill: var(--green); }
.pays.pays-destination { fill: var(--pink); }
.pays.pays-chemin      { fill: var(--blue); }
/* Repère des micro-États (Vatican, Monaco…) : sans lui, invisibles sous les contours */
.repere { stroke: var(--ink); stroke-width: 1.6; }
.repere.pays-depart { fill: var(--green); }
.repere.pays-destination { fill: var(--pink); }
.repere.pays-chemin { fill: var(--blue); }

.pays-contour { fill: rgba(22,19,15,0.035); stroke: rgba(22,19,15,0.22); stroke-width: 0.4; }

.marqueur { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.marqueur-pulse {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { r: 3;  opacity: 0.8; }
  100% { r: 16; opacity: 0;   }
}

/* Bouton recentrer flottant */
.recentrer {
  position: absolute;
  right: 8px; bottom: 8px;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  padding: 0;
  border-radius: 50%;
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  color: var(--ink);
  box-shadow: var(--sh);
}
.recentrer svg { width: 20px; height: 20px; }
.recentrer:active { transform: translate(1px, 1px); }

/* =============================================================
   CHEMIN (pastilles)
   ============================================================= */
.chemin {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 6px;
  min-height: 42px;
  scrollbar-width: none;
}
.chemin::-webkit-scrollbar { display: none; }
.etape {
  flex: 0 0 auto;
  background: var(--blue);
  border: var(--bw) solid var(--ink);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  animation: pop 0.28s ease;
}
.etape.depart  { background: var(--green); }
.etape.arrivee { background: var(--pink); }
@keyframes pop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* =============================================================
   MESSAGE
   ============================================================= */
.message {
  text-align: center;
  min-height: 22px;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 8px 0;
}
.message.erreur { color: var(--msg-ko); }
.message.succes { color: var(--msg-ok); }
.message.info   { color: var(--msg-info); }

/* =============================================================
   LES 4 CHOIX
   ============================================================= */
.choix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 12px;
}
.choix-btn {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: var(--bw) solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  box-shadow: var(--sh);
}
.choix-btn.bon     { background: var(--green); }
.choix-btn.mauvais { background: var(--coral); }
.choix-btn.elimine { opacity: 0.28; }
.choix-btn:disabled { cursor: default; }

button {
  cursor: pointer;
  font-family: inherit;
  border: var(--bw) solid var(--ink);
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 20px;
  background: var(--green);
  color: var(--ink);
  box-shadow: var(--sh);
  transition: transform 0.1s ease, background 0.2s ease;
}
button:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(22,19,15,0.14); }
button:disabled { opacity: 0.4; cursor: default; box-shadow: none; }

/* =============================================================
   BARRE DU BAS
   ============================================================= */
.barre-bas {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.compteur { font-weight: 600; color: var(--muted); font-size: 0.9rem; }

.vies { display: flex; align-items: center; gap: 4px; }
.coeur { width: 22px; height: 22px; }
.coeur path { fill: var(--rouge); stroke: var(--ink); stroke-width: 1.6; }
.coeur.perdu path { fill: var(--coeur-vide); }
.coeur.casse { transform-box: fill-box; transform-origin: center; animation: coeurCasse 0.55s ease forwards; }
.coeur.casse path { fill: var(--rouge); }
@keyframes coeurCasse {
  0%   { transform: scale(1) rotate(0); }
  20%  { transform: scale(1.4) rotate(-12deg); }
  40%  { transform: scale(1.2) rotate(12deg); }
  65%  { transform: scale(1.25) rotate(-7deg); }
  100% { transform: scale(0.3) translateY(10px) rotate(25deg); opacity: 0; }
}


/* =============================================================
   PAGE D'ACCUEIL
   ============================================================= */
.accueil[hidden], .jeu[hidden] { display: none; }

.accueil {
  overflow-x: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 14px 18px;
  min-height: 0;
  /* TOUT l'accueil defile ensemble : avant, seule la liste interieure scrollait,
     ce qui coupait le logo et laissait des barres figees en haut et en bas. */
  overflow-y: auto;
  scrollbar-width: none;
}
.accueil::-webkit-scrollbar { display: none; }
.accueil > :first-child { margin-top: auto; }
.accueil > :last-child { margin-bottom: auto; }
.accueil-liste {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 2px;
}
.accueil-liste::-webkit-scrollbar { display: none; }
.beta { text-align: center; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.5px; padding: 18px 0 6px; }

/* Liens legaux (bas du profil) : politique de confidentialite + CGU, sur atlasia.hyas.fr */
.legal { text-align: center; font-size: 0.78rem; color: var(--muted); padding: 16px 0 0; line-height: 1.7; }
.legal a { color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.legal span { margin: 0 5px; opacity: 0.55; }

/* Gros globe animé (dessiné par script.js) + nom */
.accueil-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 2px 0 4px; }
.globe-accueil { width: 96px; height: 96px; flex: 0 0 auto; filter: drop-shadow(2px 4px 0 rgba(22, 19, 15, 0.16)); }
.acc-ocean { fill: var(--blue); stroke: var(--ink); stroke-width: 2.2; }
.acc-terre { fill: var(--green); stroke: var(--ink); stroke-width: 0.9; stroke-linejoin: round; }
.brand-nom { font-size: 2.25rem; font-weight: 700; letter-spacing: -1.2px; }
.liste-label { margin-bottom: -7px; font-size: 0.76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.9px; padding-left: 8px; }

/* Modes collés : pilules entières qui se touchent (bordures fusionnées) */
.pills-stack { display: flex; flex-direction: column; }
.pills-stack .pill { box-shadow: none; position: relative; }
.pills-stack .pill + .pill { margin-top: -3px; }
.pills-stack .pill:active { box-shadow: none; z-index: 2; }
.continents-pills { margin-top: 10px; }

/* --- Pilules de l'accueil (un mode = une grosse pilule colorée) --- */
.pill {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%;
  padding: 13px 22px;
  min-height: 62px;
  border-radius: 999px;
  border: var(--bw) solid var(--ink);
  background: var(--accent, var(--surface));
  color: var(--ink);
  text-align: left;
  box-shadow: var(--sh);
}
.pill:active { transform: translate(1px, 2px); box-shadow: 1px 1px 0 rgba(22,19,15,0.14); }
/* Nom + sous-titre empilés : le joueur comprend le mode sans l'ouvrir. */
.pill-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.pill-sous { display: none;
  font-size: 0.76rem; font-weight: 600; line-height: 1.15; opacity: 0.72; letter-spacing: -0.1px;
  /* une seule ligne : sinon un long record fait gonfler la pilule et les hauteurs dansent */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pill-sous:empty { display: none; }
.pill-nom { font-size: 1.44rem; font-weight: 800; letter-spacing: -0.6px; line-height: 1; }
.pill-nom-sm { font-size: 1.15rem; display: flex; align-items: center; gap: 7px; }
.pill-num { font-size: 0.92rem; max-width: 45%; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; opacity: 0.9; flex: 0 0 auto; white-space: nowrap; }
.pill-num:empty { display: none; }
.pill-chevron { width: 22px; height: 22px; flex: 0 0 auto; color: var(--muted); }

.pill-defi { --accent: var(--lavender); }
.pill-defi .pill-num {
  background: var(--yellow); border: 1.6px solid var(--ink); border-radius: 999px;
  padding: 4px 14px; font-size: 0.95rem; box-shadow: var(--sh);
  animation: defiPulse 2.2s ease-in-out infinite;
}
.pill-defi .pill-num.fait { background: var(--green); animation: none; }
@keyframes defiPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.pill-cls { --accent: var(--surface); }

/* Accents par mode / continent (variables → suivent le thème clair/sombre) */
#mode-frontieres { --accent: var(--blue); }
#mode-drapeaux   { --accent: var(--yellow); }
#mode-localise   { --accent: var(--green); }
#mode-capitales  { --accent: var(--pink); }
#mode-chrono     { --accent: var(--coral); }
.continent-carte[data-mode="Europe"]   { --accent: var(--blue); }
.continent-carte[data-mode="Afrique"]  { --accent: var(--yellow); }
.continent-carte[data-mode="Amérique"] { --accent: var(--green); }
.continent-carte[data-mode="Asie"]     { --accent: var(--pink); }
.continent-carte[data-mode="Monde"]    { --accent: var(--lavender); }

.modes {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mode-carte {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 18px 16px;
  border-radius: var(--r);
  border: var(--bw) solid var(--ink);
  background: var(--accent);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--sh);
  transition: transform 0.12s ease;
}
.mode-carte:active { transform: translate(1px, 2px); box-shadow: 1px 1px 0 rgba(22,19,15,0.14); }
.mode-nom { font-size: 1.2rem; font-weight: 700; }
.mode-compte { font-size: 0.78rem; font-weight: 500; opacity: 0.65; }
.mode-monde { grid-column: 1 / -1; align-items: center; gap: 1px; }

/* Écran choix du continent */
.continents[hidden] { display: none; }
.continents { flex: 1; display: flex; flex-direction: column; padding: 20px 20px 24px; }
.continents-sous { text-align: center; color: var(--muted); margin: 2px 0 18px; font-size: 0.95rem; }
.continents .modes { margin-top: 0; }

/* =============================================================
   ÉCRAN COURT (clavier ouvert) : on resserre pour garder la
   saisie visible au-dessus du clavier.
   ============================================================= */
@media (max-height: 620px) {
  .jeu { padding: 12px 16px 14px; }
  .entete { margin-bottom: 8px; }
  .mission { margin-bottom: 8px; }
  .zone-globe { margin: 4px 0 8px; }
  .chemin { min-height: 34px; }
  .message { margin: 4px 0; min-height: 14px; }
}

/* =============================================================
   PROFIL : barre d'accueil + écran profil
   ============================================================= */
.profil[hidden] { display: none; }
.pays-cible { cursor: pointer; }   /* tap = caméra vers le pays */

.profil-bar {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 16px;
  border: var(--bw) solid var(--ink);
  background: var(--paper);
  box-shadow: var(--sh);
  text-align: left;
  font-family: inherit;
}
.profil-bar:active { transform: translate(1px, 1px); }
.pb-txt { display: flex; flex-direction: column; line-height: 1.15; gap: 3px; min-width: 0; flex: 1 1 auto; }
.pb-xp { display: block; height: 4px; border-radius: 999px; background: rgba(22,19,15,0.13); overflow: hidden; margin-top: 1px; }
:root[data-theme="dark"] .pb-xp { background: rgba(255,255,255,0.14); }
.pb-xp-jauge { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width 0.6s ease; }
.pb-prochain { display: flex; align-items: center; gap: 5px; font-size: 0.68rem; font-weight: 700; color: var(--muted); }
.pb-prochain[hidden] { display: none; }
.pb-prochain .prochain-av, .pb-prochain .prochain-av svg, .pb-prochain .prochain-av img { width: 15px; height: 15px; }
.pb-nom { font-weight: 700; font-size: 1rem; color: var(--ink); }
.pb-niv { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.pb-fleche { width: 20px; height: 20px; margin-left: auto; color: var(--muted); }

/* Avatar "fisheye" (drapeau dans une bille) */
.avatar {
  position: relative;
  width: 44px; height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: var(--bw) solid var(--ink);
  overflow: hidden;
  background: var(--avatar-bg);
  display: grid;
  place-items: center;
  padding: 0;
}
/* Boule plate texturée au drapeau (aplats + contour noir, comme la planète d'accueil) */
.avatar .flag-img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar .av-planete { width: 100%; height: 100%; }
.avatar.grand { width: 104px; height: 104px; }

/* Écran profil */
.profil { flex: 1; display: flex; flex-direction: column; padding: 20px 18px; min-height: 0; }
.profil-corps {
  overflow-x: hidden;
  flex: 1;
  min-height: 0;                 /* indispensable : sinon la zone ne peut pas défiler (flexbox) */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.profil-corps::-webkit-scrollbar { display: none; }
.nom-input {
  width: 100%;
  max-width: 240px;
  text-align: center;
  padding: 12px;
  border-radius: 14px;
  border: var(--bw) solid var(--ink);
  background: var(--surface);
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  box-shadow: var(--sh);
}
.niveau-bloc { width: 100%; }
.niveau-ligne { display: flex; justify-content: space-between; font-weight: 600; font-size: 0.85rem; margin-bottom: 5px; }
.niveau-ligne span:last-child { color: var(--muted); }
.xp-barre {
  height: 16px;
  border-radius: 999px;
  border: var(--bw) solid var(--ink);
  background: var(--surface);
  overflow: hidden;
}
.xp-jauge { height: 100%; width: 0%; background: var(--green); transition: width 0.5s ease; }

.stats { display: flex; gap: 12px; width: 100%; }
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: var(--bw) solid var(--ink);
  background: var(--yellow);
  box-shadow: var(--sh);
}
.stat b { font-size: 1.4rem; }
.stat span { font-size: 0.78rem; font-weight: 500; }

.section-titre { align-self: flex-start; font-weight: 700; font-size: 0.95rem; margin-top: 4px; }
.section-hint { font-weight: 500; font-size: 0.72rem; color: var(--muted); }

/* Panneau de fin de partie */
.fin[hidden] { display: none; }
.fin { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; animation: finApparait 0.4s ease; }
@keyframes finApparait { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fin-titre { text-align: center; font-weight: 700; font-size: 1.05rem; }
.fin-xp { text-align: center; font-weight: 700; font-size: 1.7rem; color: #1f8a4c; }
.fin-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fin-boutons button { width: 100%; }
.fin-boutons .secondaire-fin { background: var(--paper); }
.fin-infos { width: 100%; background: var(--lavender); }

/* Fiche pays (modale) */
.fiche-overlay[hidden] { display: none; }
.fiche-overlay {
  position: absolute; inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(22, 19, 15, 0.45);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fiche-carte {
  position: relative;
  width: 100%;
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  border-radius: 22px;
  box-shadow: 4px 6px 0 rgba(22, 19, 15, 0.2);
  padding: 22px 20px;
  animation: finApparait 0.3s ease;
}
.fiche-fermer {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  padding: 0;
  border-radius: 50%;
  border: var(--bw) solid var(--ink);
  background: var(--paper);
  box-shadow: none;
}
.fiche-fermer svg { width: 18px; height: 18px; }
.fiche-haut { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-right: 32px; }
.fiche-drapeau { font-size: 2.4rem; line-height: 1; }
.fiche-haut h2 { font-size: 1.5rem; font-weight: 700; }
.fiche-lignes { display: flex; flex-direction: column; gap: 2px; }
.fiche-ligne {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(22, 19, 15, 0.1);
}
.fiche-ligne:last-child { border-bottom: none; }
.fiche-ligne span { color: var(--muted); font-size: 0.9rem; }
.fiche-ligne b { font-weight: 700; text-align: right; }

/* =============================================================
   MODE DRAPEAUX
   ============================================================= */
.dr-haut { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

/* Progression de la collection (X / 195) */
.dr-collection { margin-bottom: 12px; }
.dr-collec-tete { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.dr-collec-label { font-weight: 700; font-size: 0.82rem; }
.dr-collec-compte { font-weight: 700; font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dr-collec-barre {
  height: 10px; border-radius: 99px;
  background: var(--paper);
  border: 1.6px solid var(--ink);
  overflow: hidden;
  box-shadow: var(--sh);
}
.dr-collec-barre span {
  display: block; height: 100%; width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--yellow), var(--coral));
  transition: width 0.55s cubic-bezier(0.2, 0.85, 0.25, 1);
}
.dr-collec-barre.pleine span { background: linear-gradient(90deg, var(--green), var(--blue)); }

/* =============================================================
   V2 — JUICE (sensations) : tremblement + texte flottant
   ============================================================= */
@keyframes secousse {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-6px, 2px); }
  30% { transform: translate(6px, -2px); }
  45% { transform: translate(-5px, -1px); }
  60% { transform: translate(5px, 1px); }
  75% { transform: translate(-3px, 1px); }
}
.secoue { animation: secousse 0.4s ease; }
.secoue-fort { animation: secousse 0.5s cubic-bezier(.36,.07,.19,.97); }

.flottant {
  position: absolute; z-index: 80; pointer-events: none;
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.5px;
  color: #1f8a4c; text-shadow: 0 1.5px 0 rgba(255,255,255,.8);
  transform: translate(-50%, 0);
  animation: flotteMonte 0.95s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes flotteMonte {
  0%   { opacity: 0; transform: translate(-50%, 4px) scale(0.6); }
  22%  { opacity: 1; transform: translate(-50%, -10px) scale(1.12); }
  100% { opacity: 0; transform: translate(-50%, -58px) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .secoue, .secoue-fort { animation: none; }
  /* Sans animation, le texte doit rester VISIBLE (il etait mis a opacity:0,
     donc "NOUVEAU !" et les "+1" disparaissaient totalement pour les joueurs
     qui activent "Reduire les animations" sur iOS/Android). */
  .flottant { animation: none; opacity: 1; transform: translate(-50%, -22px); }
}

/* Confettis en superposition */
.confettis {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 65;   /* au-dessus de la carte « niveau supérieur » (60), sinon assombris */
  display: none;
}
.confettis.actif { display: block; }

/* Écran de fin « fête » (sans-faute / collection complète) */
.fin-badge { text-align: center; font-size: 3.2rem; line-height: 1; margin-bottom: 2px; animation: badgePop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.fin-badge[hidden] { display: none; }
.fin-sous { text-align: center; color: var(--muted); font-weight: 600; font-size: 0.92rem; margin-top: -6px; }
.fin-sous[hidden] { display: none; }

/* Récap « À revoir » en fin de manche : puces drapeau + nom des pays ratés */
.arevoir { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.arevoir[hidden] { display: none; }
.arevoir-titre { font-weight: 700; font-size: 0.9rem; color: var(--muted); }
.arevoir-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.arevoir-chip {
  cursor: pointer; box-shadow: none;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 6px;
  background: var(--surface, var(--paper));
  border: var(--bw) solid var(--ink); border-radius: 999px;
  font-size: 0.85rem; font-weight: 700;
  animation: finApparait 0.35s ease both;
}
.arevoir-chip img {
  width: 26px; height: 19px; object-fit: cover;
  border-radius: 5px; border: 1.4px solid var(--ink);
}
.fin.fete .fin-titre { font-size: 1.35rem; }
@keyframes badgePop { from { opacity: 0; transform: scale(0.3) rotate(-12deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.dr-flag-zone { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.dr-flag {
  width: clamp(200px, 74vw, 300px);
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  border: var(--bw) solid var(--ink);
  box-shadow: var(--sh);
  background: var(--surface);
  object-fit: cover;
}
.dr-question { text-align: center; font-weight: 700; font-size: 1.05rem; margin: 10px 0 2px; }

/* =============================================================
   MODE LOCALISE
   ============================================================= */
#localise { position: relative; }
#globe-loc { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#globe-loc:active { cursor: grabbing; }
.loc-ocean    { fill: var(--blue); stroke: var(--ink); stroke-width: 0.7; }
.loc-grat     { fill: none; stroke: rgba(22, 19, 15, 0.07); stroke-width: 0.4; }
.loc-pays     { fill: var(--green); stroke: var(--ink); stroke-width: 0.4; }
.loc-cible      { fill: var(--coral); stroke: var(--ink); stroke-width: 0.9; }
.loc-cible.bon  { fill: var(--yellow); stroke-width: 1.6; animation: cibleTrouvee 0.7s ease; }
@keyframes cibleTrouvee { 0% { opacity: 0.25; } 45% { opacity: 1; } 100% { opacity: 1; } }
.loc-cible.rate { fill: var(--rouge); }
.loc-pt-cible   { fill: var(--ink); stroke: #fff; stroke-width: 1.4; }
.loc-pt-guess   { fill: #fff; stroke: var(--ink); stroke-width: 1.8; }
/* Boutons de zoom sur le globe Localise */
.loc-zoom { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 7px; }
.loc-zbtn {
  width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: var(--bw) solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--sh);
}
.loc-zbtn svg { width: 20px; height: 20px; }
.loc-zbtn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(22,19,15,0.14); }

.loc-question { text-align: center; font-weight: 700; font-size: 1.1rem; margin: 6px 0; }
.loc-suivant  { width: 100%; margin-bottom: 12px; }

.loc-fin-overlay[hidden] { display: none; }
.loc-fin-overlay {
  position: absolute; inset: 0;
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 30px;
  animation: finApparait 0.3s ease;
}
.loc-fin-overlay .fin-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.loc-fin-overlay .fin-boutons button { width: 100%; }
.loc-fin-overlay .secondaire-fin { background: var(--paper); }
.avatars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: 100%; justify-items: center; }
.avatars .avatar.actif { box-shadow: 0 0 0 3px var(--blue); }

.son-btn {
  width: 100%;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.9rem;
}
.son-btn.off { color: var(--muted); }

.reset-btn {
  width: 100%;
  margin-top: 2px;
  background: transparent;
  color: #c0392b;
  border: var(--bw) solid #c0392b;
  font-size: 0.85rem;
  box-shadow: none;
}

/* =============================================================
   MASCOTTE (sur le globe) + VISAGE de la planète d'accueil
   ============================================================= */
.masc-ocean   { fill: var(--blue); stroke: var(--ink); stroke-width: 2; }
.masc-terre   { fill: var(--green); stroke: none; }
.masc-bord    { fill: none; stroke: var(--ink); stroke-width: 2; }
.masc-trait   { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.masc-sparkle { fill: var(--ink); }
.masc-oeil    { fill: var(--ink); }
.masc-pulse   { fill: none; stroke: var(--ink); stroke-width: 1.4; animation: gpsPulse 1.9s ease-out infinite; }
@keyframes gpsPulse { 0% { r: 8; opacity: 0.5; } 100% { r: 24; opacity: 0; } }

/* origine par défaut (0,0) = centre de la mascotte → anime sur place, sans à-coup */
.mascotte-anim.content { animation: mascBond 0.6s cubic-bezier(.34, 1.56, .64, 1); }
.mascotte-anim.triste  { animation: mascSecoue 0.5s ease-in-out; }
@keyframes mascBond {
  0%   { transform: translateY(0) scale(1); }
  40%  { transform: translateY(-6px) scale(1.14); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes mascSecoue {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  20% { transform: translateX(-2.5px) rotate(-8deg); }
  60% { transform: translateX(2.5px) rotate(8deg); }
}

/* Visage de la planète qui tourne (accueil) */
.acc-oeil    { fill: var(--ink); }
.acc-sourire { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.acc-visage  { animation: accBob 3.4s ease-in-out infinite; }
@keyframes accBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.acc-yeux { animation: accBlink 4.6s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes accBlink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.12); } }

/* =============================================================
   V2 — CLASSEMENT MONDIAL
   ============================================================= */
/* Accès compact au classement, juste sous la barre de profil */
.classement-lien {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  margin-top: -6px;   /* colle a la barre de profil */
  padding: 8px 12px;
  border-radius: 13px;
  border: var(--bw) solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--sh);
}
.classement-lien:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(22,19,15,0.14); }
.cll-ico { font-size: 1.1rem; line-height: 1; flex: 0 0 auto; }
.cll-txt { font-weight: 700; font-size: 0.9rem; }
.classement-lien > svg { margin-left: auto; width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); }

.clsmt-total { text-align: center; color: var(--muted); font-weight: 600; font-size: 0.85rem; margin-bottom: 10px; }
.clsmt-liste {
  flex: 1; min-height: 0;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.clsmt-liste::-webkit-scrollbar { display: none; }
.clsmt-info { text-align: center; color: var(--muted); font-weight: 600; padding: 40px 16px; line-height: 1.5; }
.clsmt-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 14px;
  border: var(--bw) solid var(--ink);
  background: var(--paper);
  box-shadow: var(--sh);
}
.clsmt-row.moi { background: var(--green); }
.clsmt-moi-bas { margin-top: 6px; border-style: dashed; }
.clsmt-rang { flex: 0 0 32px; text-align: center; font-weight: 700; font-size: 0.95rem; }
.clsmt-av {
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 50%;
  border: 1.6px solid var(--ink);
  overflow: hidden;
  background: var(--avatar-bg);
  display: grid; place-items: center;
}
.clsmt-av .flag-img, .clsmt-av .av-planete { width: 100%; height: 100%; display: block; object-fit: cover; }
.clsmt-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.clsmt-txt b { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clsmt-niv { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.clsmt-row.moi .clsmt-niv { color: var(--ink); opacity: 0.65; }
.clsmt-serie { flex: 0 0 auto; font-size: 0.78rem; font-weight: 700; }
.clsmt-xp { flex: 0 0 auto; font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums; }

/* =============================================================
   V2 — TRANSITIONS D'ÉCRANS
   ============================================================= */
.ecran-in { animation: ecranIn 0.28s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes ecranIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   V2 — STREAK (flamme) dans la barre de profil
   ============================================================= */
.pb-flamme {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 999px;
  border: var(--bw) solid var(--ink);
  background: var(--yellow);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: var(--sh);
}
.pb-flamme[hidden] { display: none; }
.profil-bar .pb-fleche { margin-left: 0; }
.profil-bar:has(.pb-flamme[hidden]) .pb-fleche { margin-left: auto; }
.stat-flamme { background: var(--coral); }

/* =============================================================
   V2 — MODE CAPITALES (grande carte question)
   ============================================================= */
.cap-zone { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.cap-carte {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: clamp(210px, 76vw, 310px);
  min-height: 150px;
  padding: 22px 18px;
  border-radius: var(--r);
  border: var(--bw) solid var(--ink);
  background: var(--surface);
  box-shadow: var(--sh);
  text-align: center;
}
.cap-emoji { font-size: 2.6rem; line-height: 1; display: flex; align-items: center; justify-content: center; }
.carte-flag {
  display: block;
  width: 64px; height: 48px;
  object-fit: cover;
  border-radius: 7px;
  border: 1.6px solid var(--ink);
  box-shadow: var(--sh);
}
.cap-titre { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.3px; }
.cap-sous  { font-size: 0.82rem; color: var(--muted); font-weight: 600; min-height: 1em; }

/* =============================================================
   V2 — MODE CHRONO (barre de temps + combo)
   ============================================================= */
.chr-timer {
  height: 12px;
  border-radius: 99px;
  border: 1.6px solid var(--ink);
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--sh);
  margin-bottom: 10px;
}
.chr-timer span {
  display: block; height: 100%; width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--yellow));
}
.chr-timer.urgent span { background: linear-gradient(90deg, var(--coral), var(--rouge)); }
.chr-points { font-weight: 700; color: var(--ink); }
.chr-combo {
  padding: 4px 11px;
  border-radius: 999px;
  border: var(--bw) solid var(--ink);
  background: var(--coral);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: var(--sh);
  animation: comboPop 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.chr-combo[hidden] { display: none; }
@keyframes comboPop { from { transform: scale(0.6); } to { transform: scale(1); } }

/* =============================================================
   V2 — DÉFI DU JOUR
   ============================================================= */
.def-barre { margin-bottom: 12px; }
.def-barre span {
  display: block; height: 100%; width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--lavender), var(--pink));
  transition: width 0.4s cubic-bezier(0.2, 0.85, 0.25, 1);
}
.def-zone { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.def-zone .dr-flag-zone, .def-zone .cap-zone { flex: 1; }
/* IMPORTANT : sans ça, le `display:flex` des zones écrase l'attribut [hidden]
   → les deux zones (drapeau + carte) s'affichaient en même temps. */
.dr-flag-zone[hidden], .cap-zone[hidden] { display: none; }
.def-recap {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  padding: 4px 16px;
}
.def-case {
  aspect-ratio: 1;
  border-radius: 9px;
  border: 1.6px solid var(--ink);
  display: grid; place-items: center;
  font-size: 0.8rem;
  animation: pop 0.3s ease backwards;
}
.def-case.bonne { background: var(--green); }
.def-case.ratee { background: var(--coral); }

/* =============================================================
   V2 — BADGES (profil)
   ============================================================= */
.badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));   /* minmax(0,…) : sinon le
     contenu impose sa largeur et la grille deborde du profil */
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  aspect-ratio: 1;
  min-width: 0; overflow: hidden;
  padding: 5px 3px;
  border-radius: 16px;
  border: var(--bw) solid var(--ink);
  background: var(--yellow);
  box-shadow: var(--sh);
  text-align: center;
}
.badge-emoji { font-size: 1.25rem; line-height: 1.1; flex: 0 0 auto; }
.badge-nom { font-size: 0.58rem; font-weight: 700; line-height: 1.15; }
.badge.verrou { background: var(--paper); opacity: 0.45; filter: grayscale(1); box-shadow: none; }

/* =============================================================
   V2 — MAÎTRISE PAR CONTINENT (profil)
   ============================================================= */
.maitrise { width: 100%; display: flex; flex-direction: column; gap: 9px; }
.mait-ligne { display: flex; align-items: center; gap: 10px; }
.mait-nom { flex: 0 0 88px; font-size: 0.82rem; font-weight: 700; }
.mait-barre {
  flex: 1;
  height: 12px;
  border-radius: 99px;
  border: 1.6px solid var(--ink);
  background: var(--surface);
  overflow: hidden;
}
.mait-barre span { display: block; height: 100%; border-radius: 99px; background: var(--blue); transition: width 0.5s ease; }
.mait-pct { flex: 0 0 40px; text-align: right; font-size: 0.78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

/* =============================================================
   V2 — AVATARS VERROUILLÉS
   ============================================================= */
.avatar.verrou { opacity: 0.45; filter: grayscale(0.9); }
.avatar .av-cadenas {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 1rem;
  background: rgba(251, 250, 246, 0.45);
}

/* =============================================================
   V2 — TOAST (badge débloqué, record…)
   ============================================================= */
.toast {
  position: absolute;
  left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  color: #16130f;   /* texte foncé sur jaune, y compris en thème sombre (contraste) */
  transform: translateX(-50%);
  z-index: 70;
  max-width: 86%;
  padding: 12px 18px;
  border-radius: 999px;
  border: var(--bw) solid var(--ink);
  background: var(--yellow);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 3px 4px 0 rgba(22, 19, 15, 0.2);
  pointer-events: none;
}
.toast[hidden] { display: none; }
.toast.in { animation: toastIn 0.35s cubic-bezier(0.2, 1.3, 0.4, 1); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.9); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }

/* =============================================================
   V2 — TUTORIEL (premier lancement)
   ============================================================= */
.tuto-carte { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tuto-masc { width: 74px; height: 74px; }
.tuto-titre { font-size: 1.35rem; font-weight: 700; text-align: center; letter-spacing: -0.4px; }
.tuto-liste { list-style: none; display: flex; flex-direction: column; gap: 11px; width: 100%; }
.tuto-liste li { font-size: 0.9rem; line-height: 1.45; }
.tuto-pseudo-label { font-weight: 700; font-size: 0.95rem; margin-top: 2px; text-align: center; }
.tuto-carte .nom-input { margin-top: -4px; }
.tuto-go { width: 100%; margin-top: 4px; }

/* =============================================================
   LOT 1 — CORRECTIFS UX (audit)
   ============================================================= */

/* --- Overlays scrollables : le clavier poussait le bouton du tuto hors ecran,
   les nouveaux joueurs restaient bloques sur petit telephone. --- */
.fiche-overlay { align-items: center; justify-content: center; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.fiche-overlay > .fiche-carte { margin: auto; }
/* Boutons secondaires des overlays : meme largeur que le bouton principal */
.tuto-secondaire {
  width: 100%; padding: 11px 16px; margin-top: 2px;
  border-radius: 999px; border: var(--bw) solid var(--ink);
  background: var(--paper); color: var(--ink);
  font-family: inherit; font-size: 0.92rem; font-weight: 700;
  box-shadow: none;
}
.tuto-secondaire:active { transform: translate(1px, 1px); }

/* --- Frontieres : choix eteints apres une erreur (1 erreur = 1 coeur, pas 3) --- */
.choix-btn.eteint { opacity: 0.32; filter: grayscale(0.6); pointer-events: none; }

/* --- Compteur « Encore N frontieres » : pulse a chaque pas, rouge sur la derniere --- */
.compteur.pulse { animation: compteurPulse 0.42s cubic-bezier(0.2, 0.9, 0.3, 1); }
.compteur.urgent { color: var(--rouge); font-weight: 800; }
@keyframes compteurPulse {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.16); }
  100% { transform: scale(1); }
}

/* --- Halo du texte flottant : etait blanc sur fond noir en theme sombre --- */
.flottant { text-shadow: 0 2px 0 var(--halo); }

/* --- Barre de collection qui pulse quand un drapeau est ajoute --- */
.dr-collec-barre.gagne { animation: collecPulse 0.6s ease; }
@keyframes collecPulse {
  0%, 100% { transform: scale(1); }
  40%      { transform: scale(1.04); }
}

/* --- Safe areas iPhone : sans ca, le joker et la barre du bas passent
   sous l'indicateur d'accueil et sous l'encoche (viewport-fit=cover). --- */
@supports (padding: max(0px)) {
  .accueil {
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  .jeu, .profil {
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(22px, env(safe-area-inset-bottom));
  }
  /* Le choix du continent (Frontieres ET Localise) partage cet ecran :
     sans safe-area l'en-tete passait sous l'encoche de l'iPhone. */
  .continents {
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  @media (min-width: 460px) and (min-height: 600px) {
    .accueil { padding-top: 14px; padding-bottom: 14px; }
    .jeu, .profil { padding-top: 20px; padding-bottom: 22px; }
    .continents { padding-top: 20px; padding-bottom: 24px; }
  }
}

/* --- Accessibilite : respect reel de « animations reduites » --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  /* Ces elements n'existent QUE par leur animation : on les force visibles,
     sinon le joueur ne voit plus ni ses gains, ni ses toasts, ni le decompte. */
  .flottant, .toast.in, .chr-decompte.pop, .nivup-ov.in .nivup-carte,
  .ecran-in, .arevoir-chip, .def-case {
    animation: none !important; opacity: 1 !important;
  }
  .globe-accueil, .marqueur-pulse, .pill-defi .pill-num,
  .rotate-terre, .masc-pulse { animation: none !important; }
}
/* Bouton de reset arme (confirmation en 2 temps) */
.reset-btn.arme { background: var(--rouge); color: #fff; border-color: var(--ink); animation: compteurPulse 0.4s ease; }

/* Chargement du globe : sans ca, le joueur fixe un rectangle vide 1 a 3 s. */
.globe-charge {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--panel); color: var(--muted);
  font-size: 0.9rem; font-weight: 600;
  transition: opacity 0.35s ease;
}
.globe-charge[hidden] { display: none; }
.globe-charge.parti { opacity: 0; pointer-events: none; }
.globe-charge-masc { width: 64px; height: 64px; animation: mascRespire 1.6s ease-in-out infinite; }
.globe-charge p { margin: 0; padding: 0 24px; text-align: center; }
.globe-charge.echec .globe-charge-masc { animation: none; opacity: 0.55; }
@keyframes mascRespire {
  0%, 100% { transform: scale(1) translateY(0); }
  50%      { transform: scale(1.07) translateY(-4px); }
}

/* Barre de niveau sur les ecrans de fin des modes rapides */
.niveau-fin { margin-top: -2px; }
.niveau-fin[hidden] { display: none; }

/* Decompte 3-2-1 du Chrono : le joueur demarre pret, pas en retard. */
.chr-decompte {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  background: rgba(251, 250, 246, 0.78);
  font-size: 3.2rem; font-weight: 800; color: var(--muted); letter-spacing: -1.5px;
}
:root[data-theme="dark"] .chr-decompte { background: rgba(32, 29, 23, 0.78); }
.chr-decompte[hidden] { display: none; }
.chr-decompte.pop { animation: decomptePop 0.45s ease-out; }
@keyframes decomptePop {
  0%   { transform: scale(0.9); opacity: 0.2; }
  100% { transform: scale(1); opacity: 1; }
}
/* Badge de combo qui chauffe */
.chr-combo.chaud { background: var(--coral); border-color: var(--ink); }

/* Prochain deblocage : le joueur sait toujours ce qu'il vient chercher. */
.prochain {
  display: flex; align-items: center; gap: 9px;
  margin: 0 2px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.4px dashed var(--ink);
  font-size: 0.8rem; font-weight: 700; color: var(--ink);
}
.prochain[hidden] { display: none; }
.prochain-av { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; }
.prochain-av svg, .prochain-av img { width: 24px; height: 24px; border-radius: 50%; }

/* Toast de recompense (badge, niveau) : plus chaud que les toasts neutres */
.toast.or { background: var(--yellow); border-color: var(--ink); font-weight: 800; }

/* Carte de regles d'un mode */
.regles-carte { max-width: 340px; text-align: left; }
.regles-titre { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.6px; text-align: center; margin-bottom: 4px; }
.regles-liste { display: flex; flex-direction: column; gap: 11px; padding-left: 20px; margin: 4px 0 6px; }
.regles-liste li { font-size: 0.93rem; line-height: 1.35; }
.regles-liste li::marker { color: var(--muted); font-weight: 800; }

/* Objectifs du jour : des mini-pilules, même DA que les modes (contour ink, fond franc, pas d'ombre). */
.quetes { display: flex; flex-direction: column; margin-top: 2px; }
.quete {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 5px 13px 5px 11px;
  min-height: 40px;
  border-radius: 999px;
  border: var(--bw) solid var(--ink);
  background: var(--surface);
  color: var(--ink); text-align: left;
  font-size: 0.88rem; font-weight: 500; letter-spacing: -0.2px;
  box-shadow: none; position: relative;
}
.quete + .quete { margin-top: -3px; }        /* collées, comme le menu des modes */
.quete:active { transform: translate(1px, 2px); z-index: 2; }
.quete-case {
  flex: 0 0 auto; width: 22px; text-align: center;
  font-size: 1.12rem; line-height: 1;
}
.quete-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quete-xp {
  flex: 0 0 auto; font-size: 0.72rem; font-weight: 600; letter-spacing: -0.2px;
  padding: 3px 10px; border-radius: 999px;
  border: var(--bw) solid var(--ink);
  background: var(--yellow); color: #16130f;
}
.quete.faite { background: var(--green); z-index: 1; }
.quete.faite .quete-txt { text-decoration: line-through; opacity: 0.65; }
.quete.faite .quete-xp { background: var(--paper); color: var(--ink); }

/* --- Ecran Collection : 195 vignettes, manquants en silhouette --- */
.collec-corps { flex: 1; overflow-y: auto; padding-bottom: 16px; -webkit-overflow-scrolling: touch; }
.collec-cont { font-size: 0.82rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; margin: 14px 2px 7px; }
.collec-cont.complet { color: var(--msg-ok); }
.collec-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 7px; }
.collec-case { padding: 0; border: 1.4px solid var(--ink); border-radius: 7px; overflow: hidden; background: var(--surface); box-shadow: none; aspect-ratio: 4 / 3; }
.collec-case img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collec-case.manquant img { filter: grayscale(1) brightness(0.35) contrast(0.2); opacity: 0.35; }
.collec-case:active { transform: translate(1px, 1px); }

/* --- Overlay de montee de niveau --- */
.nivup-ov {
  position: absolute; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(22, 19, 15, 0.55);
}
.nivup-ov[hidden] { display: none; }
.nivup-ov.in .nivup-carte { animation: nivupPop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1); }
.nivup-carte {
  width: 100%; max-width: 320px; text-align: center;
  background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 26px;
  box-shadow: var(--sh); padding: 26px 22px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.nivup-label { font-size: 0.8rem; font-weight: 800; letter-spacing: 3px; color: var(--muted); }
.nivup-n { font-size: 4.4rem; font-weight: 800; line-height: 1; letter-spacing: -2px; }
.nivup-titre { font-size: 1.15rem; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.nivup-av { display: flex; align-items: center; gap: 9px; font-size: 0.85rem; font-weight: 700;
  background: var(--yellow); border: 1.4px solid var(--ink); border-radius: 999px; padding: 6px 14px 6px 6px; margin-bottom: 6px; }
.nivup-av[hidden] { display: none; }
.nivup-avatar { width: 28px; height: 28px; display: grid; place-items: center; }
.nivup-avatar svg, .nivup-avatar img { width: 28px; height: 28px; border-radius: 50%; }
@keyframes nivupPop {
  0%   { transform: scale(0.7) translateY(20px); opacity: 0; }
  55%  { transform: scale(1.05) translateY(0); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Jauge de proximite sur les badges verrouilles */
.badge-jauge { display: block; width: 84%; height: 4px; margin-top: 5px; border-radius: 999px; background: rgba(22,19,15,0.14); overflow: hidden; }
:root[data-theme="dark"] .badge-jauge { background: rgba(255,255,255,0.14); }
.badge-jauge i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.badge-reste { display: block; font-size: 0.62rem; font-weight: 800; color: var(--muted); margin-top: 2px; }
.arevoir-chip:active { transform: translate(1px, 1px); }

/* Recap de session : ce qu'on vient d'accomplir + une raison de revenir. */
.sess-recap {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 2px 6px; padding: 9px 12px;
  border-radius: 16px; border: 1.4px solid var(--ink);
  background: var(--yellow);
  font-size: 0.8rem; font-weight: 700;
}
.sess-recap[hidden] { display: none; }
.sess-txt { flex: 1 1 auto; min-width: 0; }
.sess-btn {
  flex: 0 0 auto; padding: 5px 12px; font-size: 0.74rem; font-weight: 800;
  border-radius: 999px; border: 1.4px solid var(--ink); background: var(--paper); color: var(--ink);
  box-shadow: none;
}
.sess-btn:active { transform: translate(1px, 1px); }

/* Tuto : une seule phrase, pas un discours */
.tuto-phrase { font-size: 0.98rem; line-height: 1.4; text-align: center; color: var(--ink); margin: 2px 0 4px; }

/* Demande d'avis */
.avis-carte { max-width: 330px; }
.avis-texte { font-size: 0.94rem; line-height: 1.42; text-align: center; color: var(--ink); margin: 2px 0 6px; }

/* =============================================================
   ECRANS COURTS (Samsung compacts, vieux Android, 640-720 px)
   Tout doit tenir sans scroller : on resserre au lieu de couper.
   ============================================================= */
@media (max-height: 730px) {
  .accueil { gap: 8px; padding-left: 15px; padding-right: 15px; }
  .accueil-liste { gap: 8px; }
  .globe-accueil { width: 58px; height: 58px; }
  .brand-nom { font-size: 1.6rem; }
  .accueil-brand { margin: 0; gap: 9px; }
  .pill { min-height: 49px; padding: 8px 20px; }
  .pill-nom { font-size: 1.2rem; }
  .quete { min-height: 34px; padding: 3px 12px 3px 10px; font-size: 0.82rem; }
  .quete-case { font-size: 1rem; }
  .liste-label { font-size: 0.7rem; margin-bottom: -5px; }
  .pb-prochain { font-size: 0.64rem; }
}
/* Tres petits ecrans : on masque le logo, le nom du jeu est deja partout */
@media (max-height: 620px) {
  .accueil-brand { display: none; }
  .pill { min-height: 46px; padding: 7px 18px; }
  .pill-nom { font-size: 1.08rem; }
}

/* ============================================================
   Refonte accueil (chantier 09/2026) — moins chargé, plus d'air,
   marque plus grande, classement en badge trophée compact.
   ============================================================ */
.accueil-tete { display: flex; gap: 10px; align-items: stretch; }
.accueil-tete > .profil-bar { flex: 1 1 auto; min-width: 0; margin: 0; }
.classement-badge {
  flex: 0 0 auto; align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  width: 60px; padding: 0;
  background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 18px;
  font-size: 1.7rem; line-height: 1; cursor: pointer;
  box-shadow: 2px 3px 0 rgba(22,19,15,.14);
  transition: transform .05s ease;
}
.classement-badge:active { transform: translate(1px,2px); box-shadow: 1px 1px 0 rgba(22,19,15,.14); }

/* Drapeaux : certains SVG (clipPath+transform) laissent un mince liseré
   transparent une fois rastérisés en petit → apparaît blanc sur la carte.
   Un léger agrandissement recadre ce liseré. */
.carte-flag, .dr-flag { transform: scale(1.06); }

/* Scroller horizontal de pilules (chemin Frontières) : full-bleed jusqu'aux
   bords de l'écran + padding interne, pour que les pilules ne soient plus
   coupées net au padding gauche/droite quand on scrolle. */
.chemin { margin-inline: -18px; padding-inline: 18px; }
@media (max-height: 700px) { .chemin { margin-inline: -16px; padding-inline: 16px; } }

/* ============ AMIS / 1v1 ============ */
.amis-intro { font-size: 0.92rem; color: var(--muted); text-align: center; margin: 4px 6px 12px; }
.amis-add { display: flex; gap: 8px; margin-bottom: 8px; }
#amis-input {
  flex: 1 1 auto; min-width: 0; padding: 12px 14px; font: inherit; font-weight: 700;
  border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--surface); color: var(--ink);
}
.amis-add-btn {
  flex: 0 0 auto; padding: 12px 18px; font: inherit; font-weight: 800; cursor: pointer;
  border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--lavender); color: var(--ink); box-shadow: var(--sh);
}
.amis-add-btn:active { transform: translate(1px,2px); box-shadow: 1px 1px 0 rgba(22,19,15,.14); }
.amis-msg { text-align: center; font-weight: 700; font-size: 0.88rem; margin: 2px 0 8px; }
.amis-msg.ok { color: var(--msg-ok); } .amis-msg.ko { color: var(--msg-ko); }
.amis-liste { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ami-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px;
  border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--surface); box-shadow: var(--sh);
}
.ami-av { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; border: 1.6px solid var(--ink); display: grid; place-items: center; background: var(--avatar-bg); }
.ami-av img { width: 100%; height: 100%; object-fit: cover; }
.ami-infos { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.ami-nom { max-width: 100%; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ami-defier { flex: 0 0 auto; padding: 8px 14px; font: inherit; font-weight: 800; cursor: pointer; border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--green); color: var(--ink); }
.ami-defier:active { transform: translate(1px,2px); }
.ami-suppr { flex: 0 0 auto; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; line-height: 1; border: none; border-radius: 50%; box-shadow: none; background: none; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.amis-vide { text-align: center; color: var(--muted); font-size: 0.9rem; padding: 14px 0; }
.amis-notif { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; padding: 10px 10px 10px 12px; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--blue); box-shadow: var(--sh); }
.amis-notif[hidden] { display: none; }
.amis-notif-ico { font-size: 1.3rem; line-height: 1; }
.amis-notif-txt { flex: 1 1 auto; font-size: 0.86rem; font-weight: 700; line-height: 1.3; }
.amis-notif-btn { flex: 0 0 auto; padding: 8px 14px; font: inherit; font-weight: 800; cursor: pointer; border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); }
.ami-nouveau { padding: 1px 7px; border: 1.6px solid var(--ink); border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 0.7rem; font-weight: 800; animation: pop 0.3s ease; }
.ami-suppr.confirme { width: auto; padding: 0 10px; border-radius: 999px; background: var(--rouge); color: #fff; font-size: 0.78rem; font-weight: 800; }
/* Pastille « nouvel ami » sur le bouton 👥 de l'accueil */
.classement-badge { position: relative; }
.classement-badge.notif::after { content: ""; position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--rouge); border: 2px solid var(--ink); animation: pop 0.3s ease; }
/* .liste-label a une marge négative pensée pour l'accueil : ici elle faisait
   remonter la liste des modes par-dessus le libellé. */
#amis .liste-label { margin: 18px 0 8px; }
.duel-modes { display: flex; flex-direction: column; gap: 7px; }
.duel-mode { padding: 11px 14px; border: var(--bw) solid var(--ink); border-radius: 14px; font-weight: 800; background: var(--surface); }
.duel-mode.actif { background: var(--yellow); }
.duel-mode.soon { opacity: 0.55; font-weight: 700; }

/* ============ DUEL (jeu 1v1) ============ */
.duel-versus { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 10px; }
.duel-joueur { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 6px; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--surface); box-shadow: var(--sh); }
.duel-joueur.moi { background: var(--lavender); }
.duel-joueur.adv { background: var(--pink); }
.duel-nom { font-weight: 700; font-size: 0.85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-score { font-weight: 800; font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.duel-vs { flex: 0 0 auto; font-weight: 800; color: var(--muted); }
.duel-barre { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.duel-qnum { font-weight: 800; font-size: 0.85rem; flex: 0 0 auto; }
.duel-timer { flex: 1 1 auto; height: 14px; border: 1.6px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--surface); }
.duel-timer-jauge { height: 100%; width: 100%; background: var(--green); transition: width 0.1s linear; }
.duel-timer-jauge.urgent { background: var(--coral); }
.duel-count { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(251,250,246,0.92); z-index: 30; }
:root[data-theme="dark"] .duel-count { background: rgba(32,29,23,0.92); }
.duel-count span { font-size: 6rem; font-weight: 800; color: var(--ink); }
/* Sans ça, le display:grid écrase [hidden] : le compte à rebours restait affiché
   sur « 1 » par-dessus la question et bloquait tous les clics. */
.duel-count[hidden] { display: none; }
/* Le 3-2-1 est purement visuel : il ne bloque aucun clic et laisse l'en-tête visible,
   pour pouvoir quitter pendant le décompte (le bouton maison était recouvert). */
.duel-count { pointer-events: none; }
#duel:has(.duel-count:not([hidden])) .entete { position: relative; z-index: 31; }
/* Les calques du duel reprennent la carte du popup d'avis, sans espacement :
   « Accepter » et « Refuser » se touchaient. */
#duel-invite .tuto-secondaire, #duel-attente .tuto-secondaire { margin-top: 10px; }
/* Une invitation reçue passe AU-DESSUS de tout, y compris « Défi envoyé » (sinon « Accepter »
   était caché sous le bouton « Annuler » de son propre défi en attente). */
#duel-invite { z-index: 60; }
/* Fin du duel : même logique que les autres fins (titre + gain d'XP en vert),
   le score est neutre — un « 0 contre 147 » en vert se lisait comme un succès. */
.duel-fin-emoji { font-size: 3.6rem; line-height: 1; margin-bottom: -6px; }
.duel-fin-titre { text-align: center; font-weight: 800; font-size: 1.9rem; line-height: 1.1; }
.duel-fin-score { text-align: center; font-weight: 700; font-size: 1.02rem; color: var(--muted); margin-top: -8px; }
#duel-flag[hidden] { display: none; }
/* Manches synchronisées : choix verrouillé en attendant l'autre (pas encore corrigé),
   pastille ✓ sur le joueur qui a répondu, étiquettes « qui a choisi quoi » à la correction. */
#duel .choix-btn { position: relative; }
/* button:disabled passe tout à 40 % : on garde le choix verrouillé bien lisible, seuls les autres s'estompent. */
#duel .choix-btn:disabled:not(.attente):not(.eteint) { opacity: 1; }
#duel .choix-btn.attente { opacity: 0.45; }
.choix-btn.choisi { background: var(--lavender); }
.duel-choix { margin-top: 12px; row-gap: 14px; }
.duel-tags { position: absolute; top: -9px; right: 8px; display: flex; gap: 4px; pointer-events: none; }
.duel-tag { max-width: 88px; padding: 1px 7px; border: 1.6px solid var(--ink); border-radius: 999px; font-size: 0.68rem; font-weight: 800; line-height: 1.25; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: pop 0.25s ease; }
.duel-tag.moi { background: var(--lavender); }
.duel-tag.adv { background: var(--pink); }
.duel-joueur { position: relative; min-width: 0; }   /* sans min-width:0, un pseudo long élargit la carte hors de l'écran */
.duel-joueur.repondu::after { content: "✓"; position: absolute; top: -8px; right: -6px; width: 22px; height: 22px; display: grid; place-items: center; border: 1.6px solid var(--ink); border-radius: 50%; background: var(--green); color: var(--ink); font-size: 0.78rem; font-weight: 800; animation: pop 0.25s ease; }

/* Thème sombre : textes lisibles sur le doré (contraste ~2:1 avant, crème sur or) */
:root[data-theme="dark"] #mode-drapeaux,
:root[data-theme="dark"] .continent-carte[data-mode="Afrique"] { --accent: #9c7a1f; }
:root[data-theme="dark"] .stat,
:root[data-theme="dark"] .classement-lien,
:root[data-theme="dark"] .pb-flamme,
:root[data-theme="dark"] .badge:not(.verrou),
:root[data-theme="dark"] .nivup-av,
:root[data-theme="dark"] .sess-recap,
:root[data-theme="dark"] .ami-nouveau,
:root[data-theme="dark"] .duel-mode.actif,
:root[data-theme="dark"] .pill-defi .pill-num:not(.fait) { color: #16130f; }
:root[data-theme="dark"] .reset-btn:not(.arme) { color: var(--msg-ko); border-color: var(--msg-ko); }
