/* COMMUNES · 35 000 — style « carte IGN + panneaux routiers ». Boutons en pastilles cube. */
@font-face { font-family: 'Barlow'; src: url(/fonts/barlow-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(/fonts/barlow-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(/fonts/barlow-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url(/fonts/barlow-condensed-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url(/fonts/barlow-condensed-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --papier: #f4efe3; --papier2: #ebe2cd; --papier3: #e0d4b8; --trait: #cdbf9f;
  --encre: #1d2125; --encre2: #5a5d5f; --encre3: #8a8a82;
  --rouge: #c8102e; --bleu: #1d4e89; --bleu2: #2f6db5; --vert: #3d7a3a; --vert2: #5f9b4c; --or: #c99a2e; --jaune: #f2c230;
  --carte-ombre: 0 2px 0 rgba(0,0,0,.08), 0 10px 26px rgba(40,30,10,.16);
  --cube-bord: #1d2125; --cube-fond: linear-gradient(#fffdf7, #efe6d2);
  --rail: 232px;
  --r-hameau: #6b8f3a; --r-village: #8a6a3b; --r-bourg: #2f6db5; --r-ville: #7b3fa0; --r-grande: #c0392b; --r-metropole: #c99a2e; --r-capitale: #1d4e89; --r-memoire: #6d5a45;
  color-scheme: light;
}
html.nuit {
  --papier: #13171b; --papier2: #1b2127; --papier3: #252d35; --trait: #34404b;
  --encre: #eee7d8; --encre2: #b5ae9f; --encre3: #807a6e;
  --carte-ombre: 0 2px 0 rgba(0,0,0,.4), 0 10px 26px rgba(0,0,0,.5);
  --cube-bord: #0a0c0e; --cube-fond: linear-gradient(#2a323a, #1e252c);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Barlow', system-ui, sans-serif; color: var(--encre); background: var(--papier);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.35), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23b9a77f' stroke-opacity='.18' stroke-width='1'%3E%3Cpath d='M-10 60 C40 30 80 90 130 60 S210 20 250 50'/%3E%3Cpath d='M-10 80 C40 50 80 110 130 80 S210 40 250 70'/%3E%3Cpath d='M-10 150 C30 120 90 180 140 150 S220 120 250 140'/%3E%3Cpath d='M-10 172 C30 142 90 202 140 172 S220 142 250 162'/%3E%3Cpath d='M-10 194 C30 164 90 224 140 194 S220 164 250 184'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-tap-highlight-color: transparent;
}
html.nuit body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%235b6b7b' stroke-opacity='.18' stroke-width='1'%3E%3Cpath d='M-10 60 C40 30 80 90 130 60 S210 20 250 50'/%3E%3Cpath d='M-10 80 C40 50 80 110 130 80 S210 40 250 70'/%3E%3Cpath d='M-10 150 C30 120 90 180 140 150 S220 120 250 140'/%3E%3Cpath d='M-10 172 C30 142 90 202 140 172 S220 142 250 162'/%3E%3C/g%3E%3C/svg%3E"); }
a { color: var(--bleu2); }
h1, h2, h3 { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; letter-spacing: .01em; margin: 0 0 .4em; line-height: 1.05; }
h2 { font-size: 1.5rem; text-transform: uppercase; }
h3 { font-size: 1.15rem; text-transform: uppercase; }
p { margin: .3em 0 .8em; line-height: 1.45; }
.discret { color: var(--encre2); font-size: .92rem; }
.nombre { font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ─── Pastilles cube ─────────────────────────────────────────────────────── */
.cube {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em; cursor: pointer; text-decoration: none; color: var(--encre);
  padding: .62em 1.05em; border-radius: 14px; border: 2px solid var(--cube-bord); background: var(--cube-fond);
  box-shadow: 0 4px 0 var(--cube-bord); font-weight: 700; line-height: 1.1; transition: transform .08s, box-shadow .08s; user-select: none; white-space: nowrap;
}
.cube:hover { filter: brightness(1.03); }
.cube:active, .cube.appuye { transform: translateY(3px); box-shadow: 0 1px 0 var(--cube-bord); }
.cube.actif, .cube.bleu { background: linear-gradient(140deg, #1d4e89, #3a7bd0); color: #fff; }
.cube.rouge { background: linear-gradient(140deg, #a50e26, #e0334d); color: #fff; }
.cube.vert { background: linear-gradient(140deg, #2f6a2c, #5f9b4c); color: #fff; }
.cube.or { background: linear-gradient(140deg, #a8781a, #e5bd4f); color: #231a05; }
.cube.petit { padding: .4em .75em; border-radius: 11px; font-size: .9rem; box-shadow: 0 3px 0 var(--cube-bord); }
.cube.petit:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cube-bord); }
.cube[disabled], .cube.off { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 var(--cube-bord); filter: grayscale(.6); }
.cube .px { font-variant-numeric: tabular-nums; opacity: .9; font-weight: 600; }
.pastilles { display: flex; flex-wrap: wrap; gap: .55rem; margin: .2rem 0 1rem; }
.pastilles .cube { flex: 0 0 auto; }

/* ─── Mise en page : rail à gauche (ordinateur), barre en bas (téléphone) ── */
#app { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
#rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1rem; padding: 1rem .9rem;
  background: linear-gradient(180deg, var(--papier2), var(--papier)); border-right: 3px double var(--trait); z-index: 20;
}
.logo { text-decoration: none; display: block; }
.logo-panneau, .panneau-charge {
  display: flex; flex-direction: column; align-items: center; background: #fff; color: #111; border: 6px solid var(--rouge);
  border-radius: 10px; padding: .45rem .6rem .35rem; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #b9b2a2, var(--carte-ombre);
}
.logo-panneau b, .panneau-charge b { font-family: 'Barlow Condensed'; font-weight: 800; font-size: 1.75rem; letter-spacing: .04em; line-height: 1; }
.logo-panneau i, .panneau-charge i { font-style: normal; font-family: 'Barlow Condensed'; font-weight: 600; font-size: .95rem; letter-spacing: .3em; color: #333; }
.onglets { display: grid; grid-template-columns: 1fr; gap: .7rem; }
.onglet { flex-direction: column; padding: .55rem .4rem .5rem; gap: .2rem; border-radius: 16px; width: 100%; }
.onglet svg { width: 30px; height: 30px; }
.onglet span { font-family: 'Barlow Condensed'; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 1rem; }
.onglet { position: relative; }
.onglet .bulle { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--rouge); color: #fff; font-size: .78rem; display: grid; place-items: center; border: 2px solid var(--papier); padding: 0 5px; }
.jauges { margin-top: auto; display: grid; gap: .5rem; }
.jauge { display: flex; align-items: center; gap: .5rem; background: var(--papier); border: 2px solid var(--trait); border-radius: 12px; padding: .45rem .6rem; font-weight: 700; }
.jauge svg { width: 22px; height: 22px; flex: none; }
.jauge small { display: block; color: var(--encre2); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
main#vue { padding: 1.4rem clamp(1rem, 3vw, 2.4rem) 6rem; outline: none; min-width: 0; }
.chargement { display: grid; place-items: center; min-height: 70vh; }
.panneau-charge i { letter-spacing: .02em; margin-top: .2rem; }

@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; }
  #rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; align-items: center; padding: .45rem .5rem calc(.5rem + env(safe-area-inset-bottom)); border-right: 0; border-top: 3px double var(--trait); background: var(--papier2); }
  #rail .logo, #rail .jauges { display: none; }
  .onglets { grid-template-columns: repeat(5, 1fr); gap: .4rem; width: 100%; }
  .onglet { padding: .38rem .1rem .32rem; border-radius: 13px; box-shadow: 0 3px 0 var(--cube-bord); }
  .onglet svg { width: 24px; height: 24px; }
  .onglet span { font-size: .74rem; }
  main#vue { padding: .9rem .8rem 7.2rem; }
  .barre-mobile { display: flex !important; }
}
.barre-mobile { display: none; align-items: center; justify-content: space-between; gap: .5rem; margin: -.2rem 0 .9rem; }
.barre-mobile .logo-panneau { border-width: 4px; padding: .2rem .45rem .15rem; }
.barre-mobile .logo-panneau b { font-size: 1.15rem; }
.barre-mobile .logo-panneau i { font-size: .62rem; }
.barre-mobile .jauge { padding: .3rem .5rem; font-size: .92rem; }
.barre-mobile .jauge small { display: none; }

/* ─── Titres en panneaux de direction ──────────────────────────────────── */
.direction {
  display: inline-flex; align-items: center; gap: .7rem; background: var(--bleu); color: #fff; padding: .45rem 2.4rem .45rem 1rem; margin: 0 0 1rem;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%); border-radius: 6px 0 0 6px;
  font-family: 'Barlow Condensed'; font-weight: 800; font-size: clamp(1.4rem, 3.5vw, 2rem); text-transform: uppercase; letter-spacing: .02em; box-shadow: inset 0 0 0 3px rgba(255,255,255,.9);
}
.direction.vert { background: var(--vert); }
.direction.blanc { background: #fff; color: #111; box-shadow: inset 0 0 0 3px #111; }
.direction small { font-family: 'Barlow'; font-weight: 600; font-size: .9rem; opacity: .9; text-transform: none; letter-spacing: 0; }
.sous-onglets { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.2rem 0 1.1rem; }

/* ─── Blocs ────────────────────────────────────────────────────────────── */
.bloc { background: color-mix(in srgb, var(--papier) 70%, #fff 30%); border: 2px solid var(--trait); border-radius: 16px; padding: 1rem 1.1rem; box-shadow: 0 3px 0 var(--trait); }
html.nuit .bloc { background: var(--papier2); }
.grille2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 1100px) { .grille2 { grid-template-columns: 1fr; } }
.ligne { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.espace { justify-content: space-between; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin: .4rem 0 1rem; }
.chiffre { background: var(--papier); border: 2px solid var(--trait); border-radius: 12px; padding: .55rem .7rem; }
.chiffre b { display: block; font-family: 'Barlow Condensed'; font-size: 1.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.chiffre small { color: var(--encre2); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.barre { height: 12px; background: var(--papier3); border-radius: 8px; overflow: hidden; border: 1px solid var(--trait); }
.barre i { display: block; height: 100%; background: linear-gradient(90deg, var(--vert), var(--vert2)); border-radius: 8px; }
.champ { display: grid; gap: .3rem; margin: 0 0 .8rem; font-weight: 600; }
.champ input, .champ select, .champ textarea, input.texte, select.texte {
  padding: .65em .8em; border-radius: 12px; border: 2px solid var(--cube-bord); background: var(--papier); min-width: 0;
}
input.texte:focus, select.texte:focus, .champ input:focus { outline: 3px solid var(--bleu2); outline-offset: 1px; }
.vide { text-align: center; padding: 2rem 1rem; color: var(--encre2); }
.erreur-txt { color: var(--rouge); font-weight: 700; }

/* ─── Cartes de communes ───────────────────────────────────────────────── */
.carte { display: block; width: 100%; height: auto; aspect-ratio: 5 / 7; border-radius: 4.5% / 3.2%; box-shadow: var(--carte-ombre); background: transparent; cursor: pointer; transition: transform .15s; }
.carte:hover { transform: translateY(-3px) rotate(-.6deg); }
.carte.fantome { box-shadow: none; opacity: .85; }
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem .9rem; }
@media (max-width: 520px) { .grille-cartes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; } }
.case { position: relative; min-width: 0; }
.case .etiquette { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); background: var(--encre); color: var(--papier); font-weight: 700; font-size: .75rem; padding: .1rem .45rem; border-radius: 8px; white-space: nowrap; }
.case .badge-n { position: absolute; top: -7px; right: -6px; background: var(--rouge); color: #fff; font-weight: 800; font-size: .78rem; border-radius: 10px; padding: .05rem .4rem; border: 2px solid var(--papier); }
.case .prix { display: flex; justify-content: space-between; align-items: center; gap: .3rem; margin-top: .45rem; font-weight: 700; font-size: .9rem; }

/* ─── Cartes géographiques ─────────────────────────────────────────────── */
.carte-france { width: 100%; height: auto; display: block; }
.carte-france path.dep { stroke: var(--papier); stroke-width: 1.6; cursor: pointer; transition: filter .15s; }
.carte-france path.dep:hover { filter: brightness(.88) saturate(1.2); stroke: var(--encre); }
.carte-france .encart-cadre { fill: none; stroke: var(--trait); stroke-width: 1.5; }
.carte-france text { font-family: 'Barlow Condensed'; font-weight: 600; fill: var(--encre2); }
.carte-dep { width: 100%; height: auto; display: block; max-height: 72vh; }
.carte-dep .commune { cursor: pointer; vector-effect: non-scaling-stroke; }
.carte-dep .commune:hover { filter: brightness(.85); }
.bulle-carte { position: fixed; pointer-events: none; z-index: 60; background: var(--encre); color: var(--papier); padding: .35rem .6rem; border-radius: 9px; font-weight: 700; font-size: .88rem; white-space: nowrap; }
.legende { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .82rem; color: var(--encre2); margin: .5rem 0; }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: .3rem; }

/* ─── Recherche ────────────────────────────────────────────────────────── */
.recherche { position: relative; }
.recherche input { width: 100%; padding-left: 2.4rem; }
.recherche svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; opacity: .6; }
.resultats { display: grid; gap: .35rem; margin-top: .5rem; }
.resultat { display: flex; align-items: center; justify-content: space-between; gap: .6rem; text-align: left; padding: .5rem .7rem; border-radius: 12px; border: 2px solid var(--trait); background: var(--papier); cursor: pointer; }
.resultat:hover { border-color: var(--encre); }
.resultat b { font-family: 'Barlow Condensed'; font-size: 1.1rem; }
.pastille-rar { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .12rem .45rem; border-radius: 8px; color: #fff; }

/* ─── Modale ───────────────────────────────────────────────────────────── */
#modale { position: fixed; inset: 0; z-index: 50; background: rgba(15,18,20,.62); display: grid; place-items: center; padding: 1rem; overflow-y: auto; }
.fenetre { background: var(--papier); border-radius: 20px; border: 3px solid var(--cube-bord); box-shadow: 0 8px 0 var(--cube-bord), 0 30px 80px rgba(0,0,0,.4); width: min(940px, 100%); max-height: calc(100vh - 2rem); overflow: auto; padding: 1.2rem; position: relative; }
.fenetre.etroite { width: min(480px, 100%); }
.fermer { position: absolute; top: .7rem; right: .7rem; z-index: 2; }
.fiche { display: grid; grid-template-columns: minmax(220px, 330px) 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 680px) { .fiche { grid-template-columns: 1fr; } .fiche .carte { max-width: 300px; margin: 0 auto; } }
.infos { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: .4rem 0 1rem; }
.infos dt { color: var(--encre2); font-weight: 600; }
.infos dd { margin: 0; font-weight: 700; }
.voisines { display: flex; flex-wrap: wrap; gap: .35rem; }
.voisines button { border: 2px solid var(--trait); background: var(--papier); border-radius: 10px; padding: .2rem .5rem; cursor: pointer; font-weight: 600; font-size: .85rem; }
.voisines button.a { border-color: var(--vert); }

/* ─── Toasts ───────────────────────────────────────────────────────────── */
#toasts { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: .5rem; width: min(440px, calc(100% - 2rem)); pointer-events: none; }
.toast { background: var(--encre); color: var(--papier); padding: .7rem 1rem; border-radius: 14px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: glisse .25s ease-out; }
.toast.erreur { background: var(--rouge); color: #fff; }
.toast.ok { background: var(--vert); color: #fff; }
@keyframes glisse { from { transform: translateY(-12px); opacity: 0; } }

/* ─── Enveloppes ───────────────────────────────────────────────────────── */
.enveloppes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.enveloppe { display: grid; gap: .6rem; background: transparent; border: 0; padding: 0; text-align: left; }
.enveloppe .dessin { width: 100%; aspect-ratio: 16 / 10; display: block; filter: drop-shadow(0 6px 10px rgba(50,35,10,.22)); }
.enveloppe h3 { margin: 0; }

/* Ouverture */
.ouverture { position: fixed; inset: 0; z-index: 70; background: radial-gradient(ellipse at center, #2b3b52 0%, #101821 70%); display: grid; place-items: center; overflow: hidden; color: #fff; }
.ouverture .scene { position: relative; width: min(92vw, 1000px); height: min(86vh, 720px); display: grid; place-items: center; }
.ouverture .env-grande { width: min(420px, 80vw); cursor: pointer; transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .4s; }
.ouverture .env-grande .rabat { transform-origin: 50% 0; transition: transform .55s ease-in; transform-box: fill-box; }
.ouverture.ouverte .env-grande .rabat { transform: scaleY(-1); }
.ouverture.ouverte .env-grande { transform: translateY(32vh) scale(.8); opacity: 0; }
.ouverture .tirage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: clamp(.4rem, 1.5vw, 1rem); flex-wrap: wrap; padding: 1rem; }
.ouverture .tirage .slot { width: clamp(110px, 17vw, 180px); perspective: 900px; opacity: 0; transform: translateY(40px); transition: opacity .35s, transform .45s cubic-bezier(.2,.8,.2,1); position: relative; }
.ouverture .tirage .slot.la { opacity: 1; transform: none; }
.flip { position: relative; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,.7,.3,1); cursor: pointer; }
.flip.retournee { transform: rotateY(180deg); }
.flip .face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .face.avant { position: absolute; inset: 0; transform: rotateY(180deg); }
.slot .rayons { position: absolute; inset: -40%; z-index: -1; opacity: 0; transition: opacity .6s; background: repeating-conic-gradient(from 0deg, rgba(255,220,120,.25) 0 10deg, transparent 10deg 20deg); border-radius: 50%; mask: radial-gradient(circle, #000 25%, transparent 68%); -webkit-mask: radial-gradient(circle, #000 25%, transparent 68%); animation: tourne 14s linear infinite; }
.slot.rare.vue .rayons { opacity: 1; }
.slot.rare.vue .flip { animation: rebond .6s ease-out; }
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes rebond { 0% { transform: rotateY(180deg) scale(1); } 40% { transform: rotateY(180deg) scale(1.08) translateY(-8px); } 100% { transform: rotateY(180deg) scale(1); } }
.slot .badges { position: absolute; left: 0; right: 0; bottom: -2.1rem; display: flex; justify-content: center; gap: .3rem; flex-wrap: wrap; opacity: 0; transition: opacity .3s .3s; }
.slot.vue .badges { opacity: 1; }
.badge { font-size: .72rem; font-weight: 800; text-transform: uppercase; padding: .15rem .45rem; border-radius: 8px; background: #fff; color: #111; letter-spacing: .03em; }
.badge.cle { background: var(--jaune); }
.badge.nouv { background: #9be37a; }
.ouverture .bas { position: absolute; bottom: 1.2rem; left: 0; right: 0; display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.ouverture .indice { position: absolute; top: 1.2rem; left: 0; right: 0; text-align: center; font-family: 'Barlow Condensed'; font-weight: 800; font-size: 1.3rem; letter-spacing: .04em; text-transform: uppercase; opacity: .9; }

/* ─── Route ────────────────────────────────────────────────────────────── */
.route-carte { width: 100%; height: auto; display: block; background: color-mix(in srgb, var(--papier) 60%, #cfe3c3 40%); border-radius: 16px; border: 2px solid var(--trait); max-height: 62vh; }
html.nuit .route-carte { background: #18231c; }
.route-carte .vois { cursor: pointer; }
.route-carte .vois:hover path { filter: brightness(.9); stroke-width: 3; }
.route-carte text { font-family: 'Barlow Condensed'; font-weight: 800; paint-order: stroke; stroke: var(--papier); stroke-width: 4px; fill: var(--encre); }
.essence { display: flex; gap: 3px; align-items: flex-end; }
.essence i { width: 10px; height: 22px; border-radius: 3px; background: var(--papier3); border: 1px solid var(--trait); }
.essence i.p { background: linear-gradient(#f5c84b, #d8901b); border-color: #a86c10; }
.liste-vois { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.liste-vois .cube { justify-content: space-between; white-space: normal; text-align: left; }
.liste-vois .cube small { display: block; font-weight: 600; opacity: .8; }
.boussole { width: 64px; height: 64px; flex: none; }
.arrivee { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; background: rgba(15,18,20,.55); }
.arrivee .boite { display: grid; justify-items: center; gap: .8rem; animation: glisse .3s ease-out; }
.arrivee .boite .carte { width: min(280px, 72vw); }

/* ─── Défi ─────────────────────────────────────────────────────────────── */
.defi-carte { cursor: crosshair; }
.defi-q { font-family: 'Barlow Condensed'; font-weight: 800; font-size: 1.5rem; }

/* ─── Classements / fil ────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { padding: .45rem .5rem; border-bottom: 1px solid var(--trait); text-align: left; }
.table th { font-size: .78rem; text-transform: uppercase; color: var(--encre2); letter-spacing: .05em; }
.table td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.fil { display: grid; gap: .45rem; }
.fil div { padding: .45rem .7rem; border-left: 4px solid var(--rouge); background: var(--papier); border-radius: 0 10px 10px 0; }
.fil small { color: var(--encre2); }
.joueur { font-weight: 800; color: var(--bleu2); cursor: pointer; text-decoration: none; }

/* ─── Accueil (déconnecté) ─────────────────────────────────────────────── */
.accueil { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; min-height: 72vh; }
@media (max-width: 900px) { .accueil { grid-template-columns: 1fr; } }
.accueil .grand-panneau { background: #fff; color: #111; border: 12px solid var(--rouge); border-radius: 18px; padding: 1rem 1.4rem; text-align: center; box-shadow: 0 0 0 4px #fff, 0 0 0 6px #b9b2a2, var(--carte-ombre); max-width: 520px; }
.accueil .grand-panneau b { display: block; font-family: 'Barlow Condensed'; font-weight: 800; font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: .95; letter-spacing: .03em; }
.accueil .grand-panneau i { display: block; font-style: normal; font-family: 'Barlow Condensed'; font-weight: 600; letter-spacing: .35em; font-size: 1.2rem; }
.accueil .eventail { position: relative; height: 330px; }
.accueil .eventail .carte { position: absolute; width: 170px; left: 50%; top: 10px; }

/* Mode photosensible : ni rayons, ni rebonds, ni secousses. */
html.photosensible *, html.photosensible *::before, html.photosensible *::after { animation: none !important; }
html.photosensible .slot .rayons { display: none; }
html.photosensible .flip, html.photosensible .ouverture .env-grande, html.photosensible .ouverture .tirage .slot { transition-duration: .2s !important; }
html.photosensible .carte:hover { transform: none; }

/* Lignes de progression (régions, départements) */
.prog { display: grid; gap: .3rem; padding: .5rem .7rem; border-radius: 12px; border: 2px solid var(--trait); background: var(--papier); text-decoration: none; color: inherit; }
.prog:hover { border-color: var(--encre); }
#vue { overflow-x: clip; }
/* Les cartes hors de l'écran ne sont dessinées qu'en approchant (grosses grilles de département). */
.grille-cartes .case { content-visibility: auto; contain-intrinsic-size: auto 230px; }
@media (max-width: 520px) { .enveloppes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; } .enveloppe h3 { font-size: 1rem; } .enveloppe p { font-size: .85rem; } .enveloppe .cube { padding: .5em .6em; font-size: .9rem; } .enveloppe select { width: 100%; } }
