/* ============ Les couleurs et réglages de base ============ */
:root {
  /* La palette Blaise */
  --creme: #FBF6EE;       /* fond crème chaud */
  --braise: #F2672E;      /* orange braise : couleur principale */
  --braise-fonce: #D9511B;
  --braise-clair: #FDE7DA;
  --or: #F5B841;          /* or : les récompenses */
  --or-fonce: #D9971A;
  --or-clair: #FDF1D3;
  --nuit: #1E2235;        /* bleu nuit : le texte */

  --fond: var(--creme);
  --surface: #FFFFFF;
  --texte: var(--nuit);
  --texte-doux: #64687D;
  --bord: #EFE6D8;
  --principal: var(--braise);
  --principal-fonce: var(--braise-fonce);
  --vert: #22A97A;
  --vert-clair: #DDF4EA;
  --rouge: #E5484D;
  --rouge-clair: #FDE2E3;
  --orange: #F39C12;
  --jaune: var(--or);
  --ocean: #DCEBF5;
  --terre-autre: #EDE6DA;
  --terre: #FFFFFF;
  --terre-survol: #FDE9C4;
  --repere: #4A5394;      /* ce qu'il faut trouver sur les cartes (bleu nuit clair) */
  --repere-clair: #A5ACDB;
  --ombre: 0 1px 2px rgba(30, 34, 53, .05), 0 8px 24px rgba(30, 34, 53, .07);
  --ombre-haute: 0 2px 4px rgba(30, 34, 53, .06), 0 14px 32px rgba(30, 34, 53, .11);
  --rayon: 24px;
  --titre: 'Fredoka', 'Nunito', system-ui, sans-serif;
  /* couleurs qui changent entre le jour et la nuit */
  --barre: rgba(251, 246, 238, .9);
  --voile: rgba(251, 246, 238, .8);
  --piste: #F1E8DA;
  --etoile-vide: #E4DACB;
  --pointille: #E2D6C3;
  --trait-carte: #B9B2A5;
  --braise-texte: #D9511B;
  --or-texte: #8A5A00;
  --ok-texte: #138A61;
  --bulle-fond: #1E2235;
  --bulle-texte: #FFFFFF;
  --eteinte-fond: #ECE9EE;
  --bouton-carte: rgba(255, 255, 255, .95);
  --silhouette: brightness(0) opacity(.15);
  --point: #2D3436;        /* le point des petits pays et des îles */
  --point-bord: #FFFFFF;
  --fleuve: #2E86DE;
  /* plus d'orange : la barre du haut, la lueur du fond, le liseré et l'ombre des cartes */
  --barre-fond: linear-gradient(90deg, #F2672E 0%, #F7873A 100%);
  --barre-bord: #D9511B;
  --lueur: rgba(242, 103, 46, .20);
  --lisere: rgba(242, 103, 46, .30);
  --lisere-fort: rgba(242, 103, 46, .65);
  --ombre-braise: 0 1px 2px rgba(217, 81, 27, .08), 0 8px 22px rgba(242, 103, 46, .16);
  --ombre-braise-haute: 0 2px 4px rgba(217, 81, 27, .10), 0 14px 30px rgba(242, 103, 46, .28);
  color-scheme: light;
}

/* ============ Le mode nuit : fond bleu nuit, texte crème ============ */
/* (automatique si le téléphone est en mode sombre, ou choisi avec le bouton 🌙 / ☀️) */
:root[data-theme="dark"] { 
  --fond: #1E2235;
  --surface: #282D45;
  --texte: #F6F0E6;
  --texte-doux: #A9ADC3;
  --bord: #393F5E;
  --braise-fonce: #C24614;
  --braise-clair: #43302E;
  --or-fonce: #B57D12;
  --or-clair: #3B3426;
  --vert-clair: #1B3B33;
  --rouge-clair: #46262D;
  --ocean: #111829;        /* mer très sombre… */
  --terre: #7880AE;        /* …pays à trouver bien plus clairs */
  --terre-autre: #3C4268;  /* les autres terres, entre les deux */
  --terre-survol: #D4AE55;
  --trait-carte: #1E2235;  /* frontières foncées, bien visibles sur les pays clairs */
  --repere: #E3E6FF;
  --repere-clair: #A4ABEB;
  --point: #FFF1D6;        /* points des petits pays : crème, bien visibles */
  --point-bord: #1E2235;
  --fleuve: #5CB8FF;
  --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  --ombre-haute: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 32px rgba(0, 0, 0, .4);
  --barre: rgba(30, 34, 53, .9);
  --voile: rgba(30, 34, 53, .82);
  --piste: #363C5A;
  --etoile-vide: #464C6C;
  --pointille: #41476A;
  --braise-texte: #FF9A6B;
  --or-texte: #F5C86A;
  --ok-texte: #5ED6A8;
  --bulle-fond: #F6F0E6;
  --bulle-texte: #1E2235;
  --eteinte-fond: #2E3144;
  --bouton-carte: rgba(40, 45, 69, .95);
  --silhouette: brightness(0) invert(1) opacity(.13);
  --barre-fond: linear-gradient(90deg, #C9501C 0%, #DB6A2C 100%);
  --barre-bord: #A93F12;
  --lueur: rgba(242, 103, 46, .17);
  --lisere: rgba(255, 154, 107, .28);
  --lisere-fort: rgba(255, 154, 107, .65);
  --ombre-braise: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(242, 103, 46, .14);
  --ombre-braise-haute: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 32px rgba(242, 103, 46, .26);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { 
  --fond: #1E2235;
  --surface: #282D45;
  --texte: #F6F0E6;
  --texte-doux: #A9ADC3;
  --bord: #393F5E;
  --braise-fonce: #C24614;
  --braise-clair: #43302E;
  --or-fonce: #B57D12;
  --or-clair: #3B3426;
  --vert-clair: #1B3B33;
  --rouge-clair: #46262D;
  --ocean: #111829;        /* mer très sombre… */
  --terre: #7880AE;        /* …pays à trouver bien plus clairs */
  --terre-autre: #3C4268;  /* les autres terres, entre les deux */
  --terre-survol: #D4AE55;
  --trait-carte: #1E2235;  /* frontières foncées, bien visibles sur les pays clairs */
  --repere: #E3E6FF;
  --repere-clair: #A4ABEB;
  --point: #FFF1D6;        /* points des petits pays : crème, bien visibles */
  --point-bord: #1E2235;
  --fleuve: #5CB8FF;
  --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  --ombre-haute: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 32px rgba(0, 0, 0, .4);
  --barre: rgba(30, 34, 53, .9);
  --voile: rgba(30, 34, 53, .82);
  --piste: #363C5A;
  --etoile-vide: #464C6C;
  --pointille: #41476A;
  --braise-texte: #FF9A6B;
  --or-texte: #F5C86A;
  --ok-texte: #5ED6A8;
  --bulle-fond: #F6F0E6;
  --bulle-texte: #1E2235;
  --eteinte-fond: #2E3144;
  --bouton-carte: rgba(40, 45, 69, .95);
  --silhouette: brightness(0) invert(1) opacity(.13);
  --barre-fond: linear-gradient(90deg, #C9501C 0%, #DB6A2C 100%);
  --barre-bord: #A93F12;
  --lueur: rgba(242, 103, 46, .17);
  --lisere: rgba(255, 154, 107, .28);
  --lisere-fort: rgba(255, 154, 107, .65);
  --ombre-braise: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(242, 103, 46, .14);
  --ombre-braise-haute: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 32px rgba(242, 103, 46, .26);
  color-scheme: dark;
}
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(ellipse 130% 460px at 50% 0, var(--lueur), transparent 100%) no-repeat, var(--fond);
  color: var(--texte);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  min-height: 100vh;
}
/* Les titres : Fredoka 600, ronde et chaleureuse */
h1, h2, .tuile-titre, .niveau-titre, .barre-titre, .bilan-score, .chrono-infos, .cible-nom, .quiz-legende, .quiz-texte, .cq-invite, .survol-nom.actif {
  font-family: var(--titre);
  font-weight: 600;
}
h1 { font-weight: 600; color: var(--braise-texte); }
.btn { font-family: var(--titre); font-weight: 600; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--principal); outline-offset: 3px; }

/* ============ Barre du haut ============ */
.barre-haut {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: minmax(48px, auto) 1fr minmax(48px, auto); align-items: center; gap: 8px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--barre-fond);
  color: #FFFFFF;
  border-bottom: 2px solid var(--barre-bord);
  box-shadow: 0 4px 14px rgba(217, 81, 27, .18);
}
.barre-titre { text-align: center; font-weight: 600; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { display: flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
.logo img { width: 40px; height: 40px; object-fit: contain; padding: 2px; border-radius: 50%; background: #FFF6EA; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.logo-nom { font-family: var(--titre); font-weight: 600; font-size: 1.35rem; color: #FFFFFF; text-shadow: 0 1px 0 rgba(160, 50, 10, .35); }
/* Le compteur de flammes (jours d'affilée), en haut à droite */
.flammes {
  justify-self: end; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px;
  border: 0; border-radius: 99px; background: var(--surface); box-shadow: var(--ombre);
  font-weight: 800; font-size: 1rem; color: var(--braise-texte); white-space: nowrap;
}
.flammes.eteinte { color: var(--texte-doux); filter: grayscale(1); }
.flammes.somnole { color: var(--or-texte); }
.btn-retour {
  width: 44px; height: 44px; border-radius: 16px; border: none;
  background: var(--surface); box-shadow: var(--ombre); font-size: 1.3rem; color: var(--texte);
}
.btn-retour:active { transform: translateY(2px); }

.ecran { max-width: 980px; margin: 0 auto; padding: 16px 16px 48px; }
.intro { text-align: center; margin: 12px 0 22px; }
.intro h1 { font-size: clamp(1.5rem, 4.5vw, 2.2rem); margin: 0 0 4px; }
.intro p { margin: 0; color: var(--texte-doux); }
.centre { text-align: center; margin: 8px 0; }

/* ============ Tuiles (thématiques et continents) ============ */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.tuile {
  --couleur: var(--principal);
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 180px; padding: 18px 12px;
  background: var(--surface);
  border: 2px solid var(--lisere);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-braise);
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
button.tuile:hover { transform: translateY(-4px); box-shadow: var(--ombre-braise-haute); border-color: var(--lisere-fort); }
button.tuile:active { transform: translateY(0) scale(.98); }
/* L'emoji posé dans une pastille ronde, teintée de la couleur de la thématique */
.tuile-emoji {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: color-mix(in srgb, var(--couleur) 16%, var(--surface));
  font-size: 2.5rem; line-height: 1; margin-bottom: 8px;
}
.tuile-titre { font-size: 1.22rem; font-weight: 600; line-height: 1.2; }
.tuile-sous { color: var(--texte-doux); font-size: .92rem; }
.tuile-pied { margin-top: 6px; font-weight: 700; color: var(--couleur); font-size: .95rem; }
.tuile-theme { min-height: 210px; }
.tuile-bientot { opacity: .6; box-shadow: none; border: 2px dashed var(--pointille); background: transparent; }
.tuile-bientot .tuile-emoji { background: var(--bord); filter: grayscale(.6); }
.badge { margin-top: 6px; font-size: .8rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: var(--or-clair); color: var(--or-fonce); }

/* ============ Étoiles ============ */
.etoiles { display: inline-flex; gap: 2px; vertical-align: middle; }
.etoile { color: var(--etoile-vide); font-size: 1.1em; }
.etoile.pleine { color: var(--or); text-shadow: 0 1px 0 var(--or-fonce); }
.etoiles-grandes { font-size: 2.6rem; gap: 8px; margin: 4px 0; }
.etoiles-grandes .etoile.pleine { animation: pop .5s ease both; }
.etoiles-grandes .etoile.pleine:nth-child(2) { animation-delay: .15s; }
.etoiles-grandes .etoile.pleine:nth-child(3) { animation-delay: .3s; }

/* ============ Niveaux ============ */
.liste-niveaux { display: flex; flex-direction: column; gap: 16px; max-width: 640px; margin: 0 auto; }
.niveau {
  --couleur: var(--vert);
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px;
  padding: 16px 18px; text-align: left;
  background: var(--surface); border: 2px solid var(--lisere); border-left: 8px solid var(--couleur);
  border-radius: var(--rayon); box-shadow: var(--ombre-braise);
  transition: transform .2s ease, box-shadow .2s ease;
}
.niveau:not(.ferme):hover { transform: translateY(-3px); box-shadow: var(--ombre-braise-haute); border-color: var(--lisere-fort); border-left-color: var(--couleur); }
.niveau.ferme { filter: grayscale(1); opacity: .6; box-shadow: none; }
.niveau-emoji { font-size: 2.4rem; text-align: center; }
.niveau-texte { display: flex; flex-direction: column; }
.niveau-titre { font-size: 1.3rem; font-weight: 600; color: var(--couleur); }
.niveau-desc { font-weight: 700; }
.niveau-regle { font-size: .85rem; color: var(--texte-doux); }
.niveau-score { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.meilleur { font-size: .8rem; color: var(--texte-doux); white-space: nowrap; }
@media (max-width: 520px) {
  .niveau { grid-template-columns: 48px 1fr; }
  .niveau-emoji { font-size: 2rem; }
  .niveau-score { grid-column: 2; align-items: flex-start; flex-direction: row; gap: 8px; }
}

/* ============ Boutons ============ */
.btn {
  border: none; border-radius: 99px; padding: 13px 24px;
  font-size: 1.02rem;
  box-shadow: 0 3px 0 rgba(30, 34, 53, .12);
  transition: transform .1s ease, box-shadow .1s ease, background .15s ease;
}
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(30, 34, 53, .12); }
.btn-principal { background: var(--braise); color: #fff; box-shadow: 0 3px 0 var(--braise-fonce), 0 8px 18px rgba(242, 103, 46, .25); }
.btn-principal:hover { background: #F37A45; }
.btn-principal:active:not(:disabled) { box-shadow: 0 1px 0 var(--braise-fonce); }
.btn-secondaire { background: var(--surface); color: var(--texte); box-shadow: 0 4px 0 var(--bord); border: 2px solid var(--bord); }
.btn-discret { background: var(--surface); color: var(--texte-doux); border: 2px solid var(--bord); box-shadow: none; padding: 10px 14px; }
.btn-grand { font-size: 1.3rem; padding: 16px 32px; }
.btn:disabled { opacity: .5; }

/* ============ Barre de progression ============ */
.progres { margin-bottom: 14px; }
.progres-barre { height: 12px; background: var(--piste); border-radius: 99px; overflow: hidden; }
.progres-remplissage { height: 100%; width: 0; background: linear-gradient(90deg, var(--braise), var(--or)); border-radius: 99px; transition: width .4s ease; }
.progres-infos { display: flex; justify-content: space-between; font-weight: 700; color: var(--texte-doux); font-size: .92rem; margin-top: 4px; }

/* ============ Jeu : question à choix ============ */
.carte-jeu { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 24px 20px; max-width: 640px; margin: 0 auto; text-align: center; }
.quiz-visuel { display: flex; flex-direction: column; justify-content: center; min-height: 150px; align-items: center; gap: 10px; }
.quiz-legende { font-size: 1.7rem; font-weight: 600; color: var(--principal); }
.drapeau-grand { max-width: min(320px, 80%); max-height: 200px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.12); user-select: none; }
.quiz-texte { font-size: 2rem; font-weight: 600; }
.quiz-consigne { font-weight: 700; font-size: 1.1rem; margin: 18px 0 14px; }
.quiz-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-choix-carte { margin-top: 14px; }
.choix {
  position: relative; min-height: 64px; padding: 12px 12px 12px 40px;
  background: var(--surface); border: 2px solid var(--bord); border-radius: 18px;
  font-weight: 700; font-size: 1.02rem; text-align: left;
  box-shadow: 0 3px 0 var(--bord);
  transition: transform .1s ease, border-color .15s ease, background .15s ease;
}
.choix:hover:not(:disabled) { border-color: var(--principal); background: var(--braise-clair); }
.choix:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--bord); }
.choix-touche { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 6px; background: var(--bord); font-size: .75rem; display: grid; place-items: center; color: var(--texte-doux); }
.choix.juste { background: var(--vert-clair); border-color: var(--vert); box-shadow: 0 3px 0 var(--vert); animation: rebond .45s ease; }
.choix.faux { background: var(--rouge-clair); border-color: var(--rouge); box-shadow: 0 3px 0 var(--rouge); }
.choix:disabled { opacity: 1; }
@media (max-width: 420px) { .quiz-choix { grid-template-columns: 1fr; } .choix { min-height: 54px; } }
@media (hover: none) { .choix-touche { display: none; } .choix { padding-left: 14px; text-align: center; } }

.message { min-height: 1.6em; margin: 12px 0 8px; font-weight: 700; text-align: center; color: var(--texte-doux); }
.message.ok { color: var(--ok-texte); }
.message.ko { color: var(--rouge); }

/* ============ Jeu : carte ============ */
.consigne-carte {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  font-size: 1.3rem; font-weight: 700; text-align: center;
}
.cible-nom { font-size: 1.6rem; color: var(--principal); }
.drapeau-mini { height: 28px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.1); }
.zone-carte { position: relative; }
.carte-boite { position: relative; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); background: var(--ocean); }
.carte { display: block; width: 100%; height: auto; max-height: 68vh; touch-action: none; user-select: none; -webkit-user-select: none; }
.carte .ocean { fill: var(--ocean); }
.carte path { stroke: var(--trait-carte); stroke-width: .6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.carte path.autre { fill: var(--terre-autre); pointer-events: none; }
.carte path.pays { fill: var(--terre); cursor: pointer; transition: fill .15s ease; }
/* Point noir sur les petits pays et les îles : un repère, on clique à travers */
.carte .point-pays { fill: var(--point); pointer-events: none; }
.carte .point-pays.point-cliquable { pointer-events: auto; cursor: pointer; stroke: var(--point-bord); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.carte .rond { fill: var(--terre); stroke: var(--principal); stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; }
@media (hover: hover) {
  .carte path.pays:hover, .carte .rond:hover { fill: var(--terre-survol); }
}
.carte .trouve, .carte .trouve:hover { fill: var(--vert) !important; }
.carte .trouve-tard, .carte .trouve-tard:hover { fill: #7FDBB6 !important; }
.carte .rate, .carte .rate:hover { fill: var(--rouge) !important; }
.carte .faux { fill: var(--orange) !important; }
.carte .montre { animation: clignote .45s ease-in-out 4; }
/* Pays mis en valeur derrière les fleuves (ex. la France) */
.carte path.autre.fond { fill: var(--terre); }
/* Fleuves : un trait bleu, et une bande invisible plus large pour les toucher */
.carte path.fleuve { fill: none !important; stroke: var(--fleuve); stroke-width: 2.6px; stroke-linecap: round; pointer-events: none; transition: stroke .15s ease; }
.carte path.fleuve-zone { fill: none !important; stroke: transparent !important; stroke-width: 16px; stroke-linecap: round; cursor: pointer; animation: none !important; }
@media (hover: hover) { .carte .fleuve-groupe:hover path.fleuve { stroke: var(--repere); stroke-width: 4px; } }
.carte path.fleuve.trouve { stroke: var(--vert) !important; stroke-width: 4px; }
.carte path.fleuve.trouve-tard { stroke: #2FB98A !important; stroke-width: 4px; }
.carte path.fleuve.rate { stroke: var(--rouge) !important; stroke-width: 4px; }
.carte path.fleuve.faux { stroke: var(--orange) !important; stroke-width: 4px; }
.carte path.fleuve.apercu { stroke: #E17055 !important; stroke-width: 4.5px; }
.carte path.fleuve.actuel { stroke: #E5484D !important; stroke-width: 5px; animation: respire-trait 1.2s ease-in-out infinite; }
@keyframes respire-trait { 50% { stroke: #B3141B; stroke-width: 7px; } }
/* Jeu « Quel est ce fleuve ? » : le rouge sert au fleuve à deviner, donc les ratés restent en orange */
.carte path.fleuve.manque { stroke: var(--orange) !important; stroke-width: 4px; }
/* Même chose pour les ronds (villes) : rouge qui clignote = à deviner, orange = raté */
.carte .rond.actuel { fill: #E5484D !important; stroke: #B3141B; animation: respire-rond 1.2s ease-in-out infinite; }
@keyframes respire-rond { 50% { fill: #B3141B; } }
.carte .rond.manque { fill: var(--orange) !important; }
.carte .eclat { animation: clignote .35s ease-in-out 2; }
.carte-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.carte-zoom button { width: 40px; height: 40px; border-radius: 12px; border: none; background: var(--bouton-carte); color: var(--texte); box-shadow: 0 2px 6px rgba(0,0,0,.15); font-size: 1.3rem; font-weight: 700; }
.astuce { text-align: center; color: var(--texte-doux); font-size: .88rem; margin-top: 10px; }

/* ============ Jeu : contre la montre ============ */
.chrono-haut { position: sticky; top: 66px; z-index: 5; background: var(--fond); padding: 6px 0 4px; }
.chrono-infos { display: flex; justify-content: space-between; font-size: 1.4rem; font-weight: 600; margin-bottom: 8px; }
.chrono-temps.urgent { color: var(--rouge); animation: battement .5s ease infinite alternate; display: inline-block; }
@keyframes battement { to { transform: scale(1.15); } }
.chrono-saisie { display: flex; gap: 8px; }
.chrono-champ {
  flex: 1; min-width: 0; font: inherit; font-size: 1.15rem; font-weight: 700;
  padding: 12px 16px; border-radius: 16px; border: 3px solid var(--bord); background: var(--surface);
}
.chrono-champ:focus { outline: none; border-color: var(--principal); }
.chrono-milieu { position: relative; }
.chrono-depart {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--voile); border-radius: var(--rayon); text-align: center; font-weight: 700; padding: 16px;
}
.chrono-depart:empty { display: none; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.puce { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 2px solid var(--vert); border-radius: 99px; padding: 4px 12px 4px 6px; font-weight: 700; font-size: .92rem; }
.puce img { height: 16px; border-radius: 3px; }

/* ============ Résultat ============ */
.bilan { text-align: center; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 28px 18px; max-width: 560px; margin: 8px auto 20px; }
.bilan-emoji { font-size: 4rem; line-height: 1; }
.bilan-blaise { width: 150px; height: 150px; object-fit: contain; margin: -8px auto 0; display: block; animation: pop .5s cubic-bezier(.3, 1.5, .6, 1) both; }
.bilan h1 { margin: 8px 0 0; font-size: 2rem; }
.bilan-score { font-size: 3rem; font-weight: 600; margin: 0; color: var(--braise); }
.bilan-detail { color: var(--texte-doux); margin: 0 0 14px; font-weight: 600; }
.bandeau { background: var(--or-clair); border-radius: 16px; padding: 10px 14px; font-weight: 700; }
.bandeau.ok { background: var(--vert-clair); color: var(--ok-texte); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 18px; }
.revoir { max-width: 760px; margin: 0 auto; }
.revoir h2 { text-align: center; font-size: 1.3rem; }
.revoir-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.revoir-item { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--surface); border-radius: 14px; padding: 10px; box-shadow: var(--ombre); font-weight: 700; text-align: center; font-size: .92rem; }
.revoir-item img { height: 48px; max-width: 100%; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }

/* ============ Animations ============ */
.confettis { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; }
.apparition { animation: apparition .35s ease both; }
.saut { animation: saut .4s ease; }
.secousse { animation: secousse .4s ease; }
@keyframes apparition { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes saut { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.06); } }
@keyframes secousse { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes clignote { 50% { opacity: .25; } }
@keyframes rebond { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============ Jeu : contre la montre, une question à la fois ============ */
.chrono-infos .btn-discret { font-size: .95rem; padding: 6px 12px; }
.chrono-infos { align-items: center; }
.cq-carte { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 14px; }
.cq-question { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; min-height: 52px; }
.drapeau-moyen { height: 44px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.1); }
/* Photos (animaux) : un cadre de taille fixe, la photo entière tient dedans */
.photo-animal { width: min(440px, 100%); height: 260px; object-fit: contain; border-radius: 14px; background: var(--terre-autre);
  box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.12); user-select: none; }
.photo-question { width: min(380px, 100%); height: 220px; object-fit: contain; border-radius: 14px; background: var(--terre-autre); box-shadow: var(--ombre); }
.cq-question:has(.photo-question:not([hidden])) { flex-direction: column; }
.credit-photo { font-size: .75rem; color: var(--texte-doux); text-decoration: none; margin-top: -4px; }
@media (max-width: 420px) { .photo-animal { height: 210px; } .photo-question { height: 180px; } }
.cq-invite { font-size: 1.7rem; font-weight: 600; color: var(--principal); text-align: center; }
.carte .actuel { fill: var(--repere) !important; animation: respire 1.2s ease-in-out infinite; }
@keyframes respire { 50% { fill: var(--repere-clair); } }

/* Nom du pays survolé, sous la carte (aide) */
.survol-nom {
  text-align: center; margin: 10px auto 0; padding: 8px 16px; width: fit-content; max-width: 100%;
  border-radius: 99px; background: var(--surface); box-shadow: var(--ombre);
  font-weight: 700; color: var(--texte-doux); min-height: 2.4em;
}
.survol-nom.actif { color: var(--principal); font-size: 1.15rem; }
/* Au doigt : pays touché une fois, en attente du 2e appui pour valider */
.carte .apercu { fill: #FDCB6E !important; stroke: #E17055; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }

/* ---------- Petit « ? » avec une bulle d'explication (ex. ce que fait une entreprise) ---------- */
.aide {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 20px; height: 20px; margin-left: 6px; padding: 0; border: 0; border-radius: 50%;
  background: var(--texte-doux); color: var(--fond); font-family: inherit; font-weight: 800; font-size: .75rem; line-height: 1; cursor: help; vertical-align: middle;
}
.aide:hover, .aide.ouverte, .aide:focus-visible { background: var(--texte); }
.aide-bulle {
  display: none; position: absolute; z-index: 30; bottom: calc(100% + 8px); left: 50%; transform: translateX(calc(-50% + var(--decalage, 0px)));
  width: max-content; max-width: min(280px, 80vw); padding: 10px 12px; border-radius: 12px;
  background: var(--bulle-fond); color: var(--bulle-texte); font-weight: 500; font-size: .85rem; line-height: 1.35; text-align: left;
  box-shadow: var(--ombre); white-space: normal; pointer-events: none;
}
.aide-bulle::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--bulle-fond); }
@media (hover: hover) { .aide:hover .aide-bulle { display: block; } }
.aide.ouverte .aide-bulle, .aide:focus-visible .aide-bulle { display: block; }
.puce.rate { border-color: var(--rouge); }
.choix.bloque { cursor: default; pointer-events: none; }
.choix.bloque .aide { pointer-events: auto; }
.quiz-texte.texte-long { font-size: 1.15rem; line-height: 1.4; font-weight: 600; max-width: 560px; margin: 0 auto; }
.photo-tableau { width: 440px; max-width: 100%; height: 300px; object-fit: contain; border-radius: 10px; }
@media (max-width: 420px) { .photo-tableau { height: 230px; } }

/* ---------- Tableau périodique ---------- */
.tp-cadre { overflow-x: auto; margin: 10px 0; }
.tableau-periodique {
  display: grid; grid-template-columns: repeat(18, minmax(18px, 1fr)); grid-template-rows: repeat(7, auto) 8px auto auto;
  gap: 2px; min-width: 330px; max-width: 760px; margin: 0 auto;
}
.tp-case {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0;
  border: 0; border-radius: 4px; font-family: inherit; color: var(--nuit); cursor: default; line-height: 1; min-width: 0;
}
.tableau-periodique .tp-case[tabindex="0"] { cursor: pointer; }
.tableau-periodique .tp-case[tabindex="0"]:hover { outline: 2px solid var(--texte); }
.tp-z { font-size: clamp(5px, 1vw, 8px); opacity: .7; }
.tp-symbole { font-weight: 800; font-size: clamp(8px, 1.8vw, 15px); }
.tp-repere { font-size: clamp(5px, 1vw, 8px); display: flex; align-items: center; justify-content: center; color: var(--texte-doux); }
.tp-alcalin { background: #FFB4A2; } .tp-alcalinoTerreux { background: #FFD6A5; } .tp-transition { background: #FDFFB6; }
.tp-pauvre { background: #CAFFBF; } .tp-metalloide { background: #9BF6FF; } .tp-nonMetal { background: #A0C4FF; }
.tp-halogene { background: #BDB2FF; } .tp-gazNoble { background: #FFC6FF; } .tp-lanthanide { background: #E2ECE9; } .tp-actinide { background: #DFE7FD; }
.tp-pale { opacity: .35; }
.tableau-periodique .tp-case.actuel { background: var(--rouge); color: #fff; opacity: 1; animation: tp-clignote 1.2s ease-in-out infinite; }
@keyframes tp-clignote { 50% { background: #B3141B; transform: scale(1.15); } }
.tp-case.juste { background: var(--vert) !important; color: #fff; opacity: 1; }
.tp-case.faux { background: var(--rouge) !important; color: #fff; opacity: 1; }
.tp-case.manque { background: #F39C12 !important; color: #fff; opacity: 1; }
.quiz-visuel .tableau-periodique { width: 100%; }

/* ---------- Dessins du corps humain ---------- */
.schema-cadre, .quiz-visuel .schema-corps { margin: 8px auto; }
.schema-corps svg { display: block; width: 100%; max-width: 420px; max-height: 58vh; margin: 0 auto; }
.schema-muscles svg { max-width: 560px; }
.schema-corps .zone { transition: opacity .2s; }
.schema-corps.cliquable .zone, .zone-carte .schema-corps .zone { cursor: pointer; }
.schema-corps.cliquable .zone:hover { opacity: .75; }
.schema-corps .zone-clic { fill: transparent !important; stroke: none !important; pointer-events: all; }
.schema-legende { font: 700 14px 'Nunito', sans-serif; fill: var(--texte-doux); }
.zone.actuel { fill: var(--rouge); stroke: var(--nuit); stroke-width: 3; animation: zone-clignote 1.1s ease-in-out infinite; }
.zone.trait.actuel { fill: none; stroke: var(--rouge); }
.zone.trouve, .zone.juste { fill: var(--vert); } .zone.trait.trouve, .zone.trait.juste { fill: none; stroke: var(--vert); }
.zone.rate, .zone.faux { fill: var(--rouge); } .zone.trait.rate, .zone.trait.faux { fill: none; stroke: var(--rouge); }
.zone.manque { fill: #F39C12; } .zone.trait.manque { fill: none; stroke: #F39C12; }
.zone.eclat { opacity: .5; }
@keyframes zone-clignote { 50% { opacity: .45; } }
.schema-corps.focus .zone:not(.actuel) { opacity: .28; }
.schema-corps.focus .decor { opacity: .5; }

/* ---------- Le Système solaire ---------- */
.schema-systeme svg { max-width: 100%; max-height: none; border-radius: 14px; }
.schema-systeme .zone.astre { fill: none; stroke: none; }
.schema-systeme .zone.actuel .halo { stroke: #FF4D4D; stroke-width: 4; }
.schema-systeme .zone.trouve .halo, .schema-systeme .zone.juste .halo { stroke: #2ECC71; stroke-width: 4; }
.schema-systeme .zone.rate .halo, .schema-systeme .zone.faux .halo { stroke: #FF4D4D; stroke-width: 4; }
.schema-systeme .zone.manque .halo { stroke: #F39C12; stroke-width: 4; }
.schema-systeme.focus .zone:not(.actuel) { opacity: .3; }
.progres-chrono { font-weight: 800; }
.progres-chrono.urgent { color: var(--rouge); }
.image-ciel { background: #0B1026 !important; }

/* ---------- Revoir ses fautes ---------- */
.niveau-bloc { display: flex; flex-direction: column; gap: 6px; }
.btn-fautes {
  align-self: flex-end; margin-right: 8px; padding: 6px 14px; border: 2px solid var(--or); border-radius: 99px;
  background: var(--or-clair); color: var(--or-texte); font-family: inherit; font-weight: 700; font-size: .9rem; cursor: pointer;
}
.btn-fautes:hover { background: color-mix(in srgb, var(--or) 30%, var(--surface)); }
.btn-fautes-grand { background: var(--or); color: var(--nuit); border: 0; box-shadow: 0 3px 0 var(--or-fonce); }
.btn-fautes-grand:hover { filter: brightness(1.05); }

/* ============ Blaise, le phénix ============ */
/* La carte de Blaise sur l'accueil : le phénix + sa bulle */
.blaise-carte {
  display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 16px;
  width: 100%; max-width: 720px; margin: 6px auto 26px; padding: 16px 20px;
  border: 2px solid var(--lisere); border-radius: var(--rayon); text-align: left; color: inherit;
  background: linear-gradient(135deg, var(--surface) 0%, var(--or-clair) 100%);
  box-shadow: var(--ombre-braise); transition: transform .2s ease, box-shadow .2s ease;
}
.blaise-carte:hover { transform: translateY(-3px); box-shadow: var(--ombre-braise-haute); border-color: var(--lisere-fort); }
.blaise-carte.eteinte { background: linear-gradient(135deg, var(--surface) 0%, var(--eteinte-fond) 100%); }
.blaise-image { width: 130px; height: 130px; object-fit: contain; animation: flotte 4s ease-in-out infinite; }
.blaise-carte.eteinte .blaise-image, .blaise-carte.somnole .blaise-image { animation-duration: 7s; }
.blaise-texte { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.blaise-bulle {
  position: relative; margin: 0; padding: 12px 14px; border-radius: 18px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 600; line-height: 1.4;
}
.blaise-bulle::before {
  content: ''; position: absolute; left: -8px; top: 22px; border: 8px solid transparent; border-left: 0; border-right-color: var(--surface);
}
.blaise-infos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .9rem; font-weight: 700; color: var(--texte-doux); }
.blaise-stade { font-family: var(--titre); font-weight: 600; font-size: 1.05rem; color: var(--texte); }
.jauge { flex: 1 1 120px; height: 8px; border-radius: 99px; background: var(--piste); overflow: hidden; min-width: 90px; }
.jauge > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--braise), var(--or)); }
@media (max-width: 520px) {
  .blaise-carte { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 14px 16px; }
  .blaise-image { width: 110px; height: 110px; }
  .blaise-bulle::before { left: 50%; top: -8px; transform: translateX(-50%); border: 8px solid transparent; border-top: 0; border-bottom-color: var(--surface); }
  .blaise-infos { justify-content: center; }
}
@keyframes flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* L'écran « Mon phénix » */
.phenix { max-width: 720px; margin: 0 auto; text-align: center; }
.phenix-grand { width: 220px; height: 220px; object-fit: contain; animation: flotte 4s ease-in-out infinite; }
.phenix h1 { margin: 4px 0 2px; font-size: 2rem; }
.phenix-sous { color: var(--texte-doux); font-weight: 600; margin: 0 0 18px; }
.phenix-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 24px; }
.stat { background: var(--surface); border-radius: 20px; box-shadow: var(--ombre); padding: 14px 8px; }
.stat-valeur { display: block; font-family: var(--titre); font-weight: 600; font-size: 1.7rem; color: var(--braise); }
.stat-nom { font-size: .85rem; font-weight: 700; color: var(--texte-doux); }
.phenix h2 { font-size: 1.3rem; margin: 26px 0 12px; }
.evolution { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.etape { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 20px; background: var(--surface); box-shadow: var(--ombre); font-size: .85rem; font-weight: 700; color: var(--texte-doux); }
.etape img { width: 72px; height: 72px; object-fit: contain; }
.etape-nom { color: var(--texte); font-weight: 800; line-height: 1.2; }
.etape.future img { filter: var(--silhouette); }
.etape.actuelle { outline: 3px solid var(--or); background: var(--or-clair); }
.phenix-regles { text-align: left; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 6px 20px; }
.phenix-regles p { display: flex; gap: 12px; align-items: center; }
.phenix-regles img { width: 52px; height: 52px; object-fit: contain; flex: none; }
@media (max-width: 420px) { .phenix-stats { gap: 8px; } .stat-valeur { font-size: 1.4rem; } }

/* Sur l'écran de résultat : la flamme du jour, la renaissance, l'évolution */
.bandeau.flamme { background: var(--braise-clair); color: var(--braise-texte); }
.bandeau.evolue { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--or-clair); color: var(--or-texte); }
.bandeau.evolue img { width: 64px; height: 64px; object-fit: contain; flex: none; animation: pop .6s cubic-bezier(.3, 1.5, .6, 1) both; }
.bilan .bandeau + .bandeau { margin-top: 8px; }

/* ============ Étincelles quand on répond juste ============ */
.etincelle {
  position: fixed; z-index: 120; pointer-events: none; width: var(--t, 12px); height: var(--t, 12px); margin: calc(var(--t, 12px) / -2) 0 0 calc(var(--t, 12px) / -2);
  background: var(--c, var(--or));
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: etincelle .7s cubic-bezier(.2, .7, .3, 1) forwards;
}
.etincelle.rond { clip-path: circle(50%); }
@keyframes etincelle {
  0% { transform: translate(0, 0) scale(.2) rotate(0); opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--r, 90deg)); opacity: 0; }
}

/* ============ Bouton jour / nuit ============ */
.haut-droite { justify-self: end; display: flex; align-items: center; gap: 8px; }
.btn-theme {
  width: 40px; height: 40px; border: 0; border-radius: 50%; padding: 0;
  background: var(--surface); box-shadow: var(--ombre); font-size: 1.15rem; line-height: 1;
}
.btn-theme:active { transform: scale(.94); }

/* ============ Bienvenue (première visite) ============ */
.bienvenue {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: calc(100vh - 32px); min-height: calc(100dvh - 32px); max-width: 520px; margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 4px max(16px, env(safe-area-inset-bottom));
  text-align: center; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.bienvenue-page { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding-top: 16px; }
.bienvenue-page.depuis-droite { animation: glisse-droite .35s ease both; }
.bienvenue-page.depuis-gauche { animation: glisse-gauche .35s ease both; }
@keyframes glisse-droite { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes glisse-gauche { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
.bienvenue-image { width: min(230px, 56vw); height: min(230px, 56vw); object-fit: contain; animation: flotte 4s ease-in-out infinite; pointer-events: none; }
.bienvenue h1 { margin: 6px 0 0; font-size: clamp(1.6rem, 6vw, 2.1rem); line-height: 1.15; }
.bienvenue-texte { margin: 0; max-width: 380px; color: var(--texte-doux); font-size: 1.08rem; font-weight: 600; line-height: 1.45; }
.pastilles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; max-width: 440px; }
.pastille { padding: 6px 12px; border-radius: 99px; background: var(--surface); box-shadow: var(--ombre); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.bienvenue-evolution { display: flex; align-items: flex-end; justify-content: center; gap: 2px; margin: 4px 0 14px; width: 100%; order: -1; }
.bienvenue-evolution img { width: 17%; max-width: 86px; aspect-ratio: 1; object-fit: contain; pointer-events: none; animation: pop .5s cubic-bezier(.3, 1.5, .6, 1) both; }
.bienvenue-evolution img:nth-child(1) { width: 11%; }
.bienvenue-evolution img:nth-child(2) { width: 13%; animation-delay: .08s; }
.bienvenue-evolution img:nth-child(3) { width: 15%; animation-delay: .16s; }
.bienvenue-evolution img:nth-child(4) { animation-delay: .24s; }
.bienvenue-evolution img:nth-child(5) { width: 19%; animation-delay: .32s; }
.bienvenue-evolution img:nth-child(6) { width: 22%; max-width: 110px; animation-delay: .4s; }
.bienvenue-evolution img.cachee { filter: var(--silhouette); }
.bienvenue-bas { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 18px; }
.points { display: flex; gap: 8px; }
.point { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 99px; background: var(--piste); transition: width .25s ease, background .25s ease; }
.point.actif { width: 28px; background: var(--braise); }
.bienvenue-boutons { display: flex; gap: 10px; width: 100%; justify-content: center; }
.bienvenue-boutons .btn-principal { flex: 1; max-width: 320px; }
.barre-haut[hidden] { display: none; }

/* ============ Pause de mémoire (5 min après une partie avec des erreurs) ============ */
.niveau.en-pause { opacity: .75; box-shadow: none; cursor: default; }
.niveau.en-pause .niveau-regle { color: var(--or-texte); font-weight: 700; }
.bandeau.pause-memoire { display: flex; align-items: center; gap: 12px; margin-top: 8px; text-align: left; background: var(--or-clair); font-weight: 600; }
.bandeau.pause-memoire img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.btn-pause { font-variant-numeric: tabular-nums; }
.btn-pause:disabled { opacity: .7; }

/* ============ Petits téléphones : rien de coupé ============ */
/* Titre de la barre du haut trop long même en version courte : sur deux lignes, un peu plus petit. */
.barre-titre.deux-lignes {
  white-space: normal; font-size: .95rem; line-height: 1.15;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* « Passer ⏭ » devient « ⏭ » pour laisser de la place à la case réponse. */
@media (max-width: 420px) {
  .btn-passer { padding-left: 16px; padding-right: 16px; }
  .btn-passer-mot { display: none; }
}
/* Le tableau périodique montré dans une question rétrécit pour tenir entièrement dans l'écran. */
.quiz-visuel .tableau-periodique { min-width: 0; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: 1px; }
@media (max-width: 420px) {
  .quiz-visuel .tp-z, .quiz-visuel .tp-repere { display: none; }
  .quiz-visuel .tp-symbole { font-size: clamp(6px, 2.4vw, 11px); }
  .quiz-visuel .tp-case { border-radius: 2px; }
}
/* Contre-la-montre sans carte : le bloc « Tu as 5:00… / Partez ! » se place sous la consigne au lieu de la recouvrir. */
.chrono-milieu:has(> .zone-carte:empty) > .chrono-depart { position: static; background: none; padding: 8px 0 0; }

/* ============ Partie en cours (long niveau quitté avant la fin) ============ */
.niveau-regle.en-cours { color: var(--braise-texte); font-weight: 700; }
.reprise { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.reprise .btn { padding: 10px 16px; font-size: 1rem; }

/* ============ Contre-la-montre au téléphone : chrono visible clavier ouvert ============ */
.chrono-mini { display: none; }
@media (hover: none) {
  .clavier-ouvert .chrono-mini {
    display: flex; justify-content: center; align-items: center; gap: 6px; margin: 0 0 8px;
    font-family: var(--titre); font-weight: 600; font-size: 1.05rem; color: var(--texte); font-variant-numeric: tabular-nums;
  }
  .chrono-mini.urgent { color: var(--rouge); }
  .chrono-mini-sep { opacity: .4; margin: 0 4px; }
}

/* Famille « Bientôt » qu'on peut quand même ouvrir pour voir ses thématiques à venir (ex. Bricolage) */
button.tuile-bientot-ouvrable { opacity: .8; cursor: pointer; }
button.tuile-bientot-ouvrable:hover { opacity: 1; transform: translateY(-4px); border-color: var(--lisere-fort); }

/* ============ Pied de page de l'accueil, pages Crédits et Confidentialité, rappels ============ */
.pied { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 28px 0 8px; color: var(--texte-doux); font-size: .9rem; }
.lien-discret { background: none; border: none; padding: 6px 4px; font: inherit; color: var(--texte-doux); cursor: pointer; }
.lien-discret:hover { color: var(--texte); text-decoration: underline; }
.page-texte { max-width: 720px; margin: 0 auto; line-height: 1.55; }
.page-texte h1 { text-align: center; }
.page-texte h2 { margin-top: 26px; }
.page-texte ul { padding-left: 22px; }
.page-texte li { margin: 4px 0; }
.page-texte a { color: var(--braise-texte); font-weight: 700; }
.page-date { text-align: center; color: var(--texte-doux); font-size: .9rem; margin-top: -6px; }
.credits-theme { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); margin: 10px 0; padding: 10px 16px; }
.credits-theme summary { cursor: pointer; font-family: var(--titre); font-weight: 600; font-size: 1.1rem; }
.credits-liste { padding-left: 0 !important; list-style: none; font-size: .9rem; }
.credits-liste li { padding: 6px 0; border-top: 1px solid var(--lisere, rgba(0, 0, 0, .08)); overflow-wrap: anywhere; }
.credits-fichier { color: var(--texte-doux); font-size: .82rem; }
.credits-licences { font-size: .95rem; overflow-wrap: anywhere; }
.rappels { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 6px 20px 14px; margin-top: 18px; text-align: left; }
.rappels p { margin: 10px 0 0; flex: 1 1 220px; }
