:root {
  --fond: #0e1117;
  --carte: #161b22;
  --bord: #2a313c;
  --texte: #e6edf3;
  --doux: #9aa7b4;
  --accent: #4cc2ff;
  --ok: #3fb950;
  --alerte: #f85149;
  --or: #e3b341;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 1.7rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 28px 0 12px; color: var(--accent); }
.sous { color: var(--doux); margin: 0 0 20px; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 18px; margin: 14px 0; }
label { display: block; font-size: .85rem; color: var(--doux); margin: 10px 0 4px; }
input {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--bord);
  background: #0b0f14; color: var(--texte); font: inherit;
}
input:focus { outline: none; border-color: var(--accent); }
button {
  margin-top: 14px; padding: 10px 16px; border: 0; border-radius: 8px;
  background: var(--accent); color: #04121c; font: inherit; font-weight: 600; cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button.sec { background: #243040; color: var(--texte); }
.msg { margin-top: 10px; font-size: .9rem; min-height: 1.2em; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--alerte); }
.statut { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; }
.statut b { color: var(--accent); }
.grand { font-size: 2rem; font-weight: 700; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { background: #0b0f14; border: 1px solid var(--bord); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: .85rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--bord); }
th { color: var(--doux); font-weight: 600; }
.pastilles { display: flex; gap: 3px; }
.pastille { width: 14px; height: 14px; border-radius: 3px; background: #223; border: 1px solid var(--bord); }
.pastille.on { background: var(--ok); border-color: var(--ok); }
.podium { display: flex; gap: 12px; align-items: flex-end; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.marche { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; padding: 14px; text-align: center; min-width: 150px; }
.marche .rang { font-size: 1.4rem; }
.marche .noms { font-weight: 600; margin-top: 6px; animation: entree .6s ease both, lueur 3s ease-in-out infinite; }
.marche.p1 { border-color: var(--or); } .marche.p1 .rang { color: var(--or); }
.marche.p1 { transform: translateY(-10px); }
@keyframes entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes lueur { 0%,100% { text-shadow: none; } 50% { text-shadow: 0 0 12px var(--accent); } }
.vide { color: var(--doux); font-style: italic; }
.alarme { background: #2a1416; border: 1px solid var(--alerte); color: #ffb3ae; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.bandeau-alarme { position: sticky; top: 0; background: var(--alerte); color: #1a0000; font-weight: 700; padding: 10px; border-radius: 8px; text-align: center; display: none; }
.bandeau-alarme.on { display: block; animation: clignote 1s step-start infinite; }
@keyframes clignote { 50% { opacity: .55; } }

/* utilitaires, pour garder une CSP stricte sans style en ligne */
.cache { display: none; }
.flush { margin-top: 0; }
.mt { margin-top: 12px; }
.carte-table { padding: 6px 0; }

/* ===== Immeuble de progression ===== */
.immeuble-cadre { display: flex; justify-content: center; margin: 10px 0 8px; }
.immeuble { width: 100%; max-width: 560px; border: 2px solid var(--bord); border-radius: 10px 10px 4px 4px; overflow: visible; background: linear-gradient(#10151c, #0b0f14); }
.etage { position: relative; display: flex; align-items: stretch; min-height: 64px; border-bottom: 1px solid #1c2330; }
.etage:last-child { border-bottom: 0; }
.etiquette { flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0c1119; color: var(--doux); font-size: .72rem; text-align: center; border-right: 1px solid #1c2330; }
.etiquette b { color: var(--accent); font-size: 1.1rem; }
.quai { flex: 1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px 6px; padding: 6px 10px; }
.rdc .etiquette { background: #121a24; }
.rdc { border-radius: 0 0 4px 4px; }

/* fenetres decoratives */
.etage::after { content: ""; position: absolute; right: 10px; top: 8px; width: 36px; height: 10px; background: repeating-linear-gradient(90deg,#1b2740 0 8px,transparent 8px 12px); opacity: .5; pointer-events: none; }

/* avatar style South Park : grosse tete, petit corps */
.avatar { width: 40px; display: flex; flex-direction: column; align-items: center; animation: arrive .5s ease both; }
.avatar .nom { font-size: .62rem; font-weight: 700; line-height: 1; margin-bottom: 2px; max-width: 46px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar .tete { width: 30px; height: 30px; border-radius: 50%; position: relative; border: 2px solid rgba(0,0,0,.35); animation: dandine 2.6s ease-in-out infinite; }
.avatar .tete::before, .avatar .tete::after { content: ""; position: absolute; top: 11px; width: 5px; height: 5px; border-radius: 50%; background: #10151c; }
.avatar .tete::before { left: 7px; } .avatar .tete::after { right: 7px; }
.avatar .corps { width: 20px; height: 14px; border-radius: 4px 4px 2px 2px; margin-top: -1px; }
@keyframes arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dandine { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-2px) rotate(2deg); } }

/* 8e etage, la fete */
.etage.fete { background: linear-gradient(120deg,#2a0f3a,#131033,#0f2a3a); background-size: 300% 300%; animation: disco 6s ease infinite; min-height: 86px; }
.etage.fete .etiquette { background: #1a0a2a; color: #ffd8a8; }
.etage.fete .etiquette b { color: var(--or); }
@keyframes disco { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
.lumiere { position: absolute; width: 60px; height: 60px; border-radius: 50%; filter: blur(14px); opacity: .5; pointer-events: none; animation: spot 3s ease-in-out infinite; }
.lumiere.l1 { background: #ff4db8; left: 20%; top: -8px; } .lumiere.l2 { background: #4cc2ff; left: 55%; top: -4px; animation-delay: .6s; } .lumiere.l3 { background: #e3b341; left: 80%; top: -10px; animation-delay: 1.2s; }
@keyframes spot { 0%,100% { transform: translateY(0) scale(1); opacity:.35 } 50% { transform: translateY(6px) scale(1.25); opacity:.65 } }
/* zone des notes = tout l'etage de la fete ; chaque note part d'un point quelconque */
.notes { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 2; }
.notes span { position: absolute; font-size: 1rem; color: #ffd8a8; opacity: 0; will-change: transform, opacity;
  animation: envol var(--dur, 3.4s) linear infinite; }
/* envol dans une direction quelconque (--dx, --dy fixes par note en JS), donc dans tous les sens */
@keyframes envol {
  0%   { opacity: 0; transform: translate(0,0) rotate(0); }
  15%  { opacity: .95; }
  100% { opacity: 0; transform: translate(var(--dx, 60px), var(--dy, -60px)) rotate(var(--rot, 40deg)); }
}
.etage.fete .quai { align-items: center; }

/* ===== Mouvements : cent pas (reflexion) + escalade Spiderman (reussite) ===== */
@keyframes apparait { from { opacity: 0; } to { opacity: 1; } }
/* les cent pas : va-et-vient avec demi-tour (scaleX) aux extremites */
@keyframes cent-pas {
  0%   { transform: translateX(0) scaleX(1); }
  47%  { transform: translateX(32px) scaleX(1); }
  50%  { transform: translateX(32px) scaleX(-1); }
  97%  { transform: translateX(0) scaleX(-1); }
  100% { transform: translateX(0) scaleX(1); }
}
/* escalade facon Spiderman : monte depuis l'etage du dessous en ondulant */
@keyframes escalade {
  0%   { transform: translateY(120px) scale(.9); opacity: 0; }
  12%  { opacity: 1; }
  30%  { transform: translateY(82px) rotate(-7deg); }
  45%  { transform: translateY(60px) rotate(7deg); }
  60%  { transform: translateY(40px) rotate(-7deg); }
  78%  { transform: translateY(18px) rotate(6deg); }
  100% { transform: translateY(0) rotate(0); opacity: 1; }
}
/* par defaut : apparition douce puis cent pas en boucle (duree desynchronisee en JS) */
.avatar { animation: apparait .4s ease both, cent-pas var(--pas,4.5s) ease-in-out infinite; }
/* vient de reussir une mission : il grimpe, puis se met a faire les cent pas */
.avatar.grimpe { animation: apparait .4s ease both, escalade 1.7s ease-out both, cent-pas var(--pas,4.5s) ease-in-out 1.7s infinite; }
@media (prefers-reduced-motion: reduce) {
  .avatar, .avatar.grimpe, .avatar.entre { animation: none !important; opacity: 1 !important; transform: none !important; }
  .avatar .tete, .etage.fete, .lumiere { animation: none !important; }
  .notes span { animation: none !important; opacity: .9 !important; }
}

/* arrivee d'un nouveau connecte : entre par la droite et marche vers l'immeuble */
@keyframes entre-droite {
  0%   { transform: translateX(160px) scaleX(-1); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translateX(0) scaleX(-1); opacity: 1; }
}
.avatar.entre { animation: entre-droite 1.7s ease-out both, cent-pas var(--pas,4.5s) ease-in-out 1.7s infinite; }
/* eviter toute barre de defilement horizontale due aux entrees et aux notes */
html, body { overflow-x: hidden; }

/* ===== Boutons de pilotage + avatar de demonstration + descente ===== */
.demo-ctrl { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; }
.demo-ctrl button { margin-top: 0; }
.avatar.demo .nom { color: var(--or) !important; }
.avatar.demo .tete { box-shadow: 0 0 0 2px var(--or), 0 0 10px rgba(227,179,65,.5); }
/* descente facon rappel : vient de l'etage du dessus en ondulant */
@keyframes descend {
  0%   { transform: translateY(-120px) scale(.95); opacity: 0; }
  12%  { opacity: 1; }
  30%  { transform: translateY(-82px) rotate(7deg); }
  50%  { transform: translateY(-50px) rotate(-7deg); }
  72%  { transform: translateY(-20px) rotate(7deg); }
  100% { transform: translateY(0) rotate(0); opacity: 1; }
}
.avatar.descend { animation: apparait .4s ease both, descend 1.5s ease-in both, cent-pas var(--pas,4.5s) ease-in-out 1.5s infinite; }

/* ===== v2 : grille d'ascenseurs, chrono, decompte, messagerie ===== */
.rangee { flex: 1; display: flex; }
.cellule { flex: 1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 2px 4px; padding: 4px 2px; border-left: 1px solid #1c2330; position: relative; min-height: 56px; }
.cellule:first-child { border-left: 0; }
.cellule.porte { background: rgba(76,194,255,.08); box-shadow: inset 0 0 0 1px rgba(76,194,255,.35); }
.rejoindre { margin-top: 0; font-size: .72rem; padding: 5px 8px; align-self: center; }
.chrono-av { font-size: .58rem; color: #9aa7b4; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 1px; }
.chrono-av.fige { color: var(--ok); } .chrono-av.fini { color: var(--or); }
.avatar.deco { opacity: .45; filter: grayscale(.6); }
.cellule .avatar { width: 38px; animation: apparait .4s ease both; }
.cellule .avatar.entre { animation: entre-droite 1.4s ease-out both; }
.decompte { font-size: 1.5rem; font-weight: 700; color: var(--or); font-variant-numeric: tabular-nums; }
.fil { max-height: 170px; overflow: auto; font-size: .9rem; }
.fil p { margin: 4px 0; } .fil .de-prof b { color: var(--accent); }

/* console admin large */
.large { max-width: 1400px; }
.grow{flex:1}.w70{width:70px}.ac{align-self:center}

/* ===== Immeuble vitre (image + cabines d'ascenseur) ===== */
#immeuble { display: flex; justify-content: center; }
.immeuble-art { position: relative; width: 100%; max-width: 540px; aspect-ratio: 900 / 1613; background: #0e1117 url('immeuble-fond.jpg') center/cover no-repeat; border-radius: 12px; overflow: hidden; border: 1px solid var(--bord); }
.etage-rep { position: absolute; left: 4px; font-size: .58rem; color: rgba(230,237,243,.8); background: rgba(14,17,23,.55); padding: 0 4px; border-radius: 3px; transform: translateY(-50%); pointer-events: none; z-index: 1; }
.etage-rep.fete { color: var(--or); }
.cabine { position: absolute; height: 9%; transition: top 1.35s cubic-bezier(.45,.05,.2,1); background: rgba(150,205,255,.10); border: 1px solid rgba(165,215,255,.55); border-radius: 3px; box-shadow: 0 0 10px rgba(120,200,255,.3), inset 0 0 14px rgba(120,200,255,.14); overflow: hidden; }
.cabine .gens { position: absolute; inset: 3px; display: flex; flex-wrap: wrap; align-content: flex-end; justify-content: center; gap: 2px; z-index: 1; }
.tete-mini { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 3px rgba(0,0,0,.45); }
.tete-mini.done { outline: 1.5px solid var(--ok); } .tete-mini.fini { outline: 1.5px solid var(--or); } .tete-mini.deco { opacity: .35; }
.cab-label { position: absolute; top: 1px; left: 0; right: 0; text-align: center; font-size: .55rem; color: #dfeaff; z-index: 2; text-shadow: 0 1px 2px #000; pointer-events: none; }
.cabine .porte { position: absolute; top: 0; bottom: 0; width: 50%; background: linear-gradient(rgba(185,220,255,.4), rgba(120,170,230,.3)); transition: transform .6s ease; z-index: 3; }
.cabine .porte.g { left: 0; border-right: 1px solid rgba(210,235,255,.4); } .cabine .porte.d { right: 0; border-left: 1px solid rgba(210,235,255,.4); }
.cabine.ouvert .porte.g { transform: translateX(-102%); } .cabine.ouvert .porte.d { transform: translateX(102%); }
.cabine .rejoindre { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: .58rem; padding: 2px 6px; margin: 0; z-index: 4; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .cabine, .cabine .porte { transition: none; } }

/* occupants = mini visages (on voit les yeux), ranges sur plusieurs rangs */
.cabine { height: 11%; }
.cabine .gens { gap: 1px 3px; }
.mini { display: flex; flex-direction: column; align-items: center; width: 17px; }
.mini .h { width: 15px; height: 15px; border-radius: 50%; position: relative; box-shadow: 0 0 3px rgba(0,0,0,.55); border: 1px solid rgba(0,0,0,.25); }
.mini .h::before, .mini .h::after { content: ""; position: absolute; top: 5px; width: 3px; height: 3px; border-radius: 50%; background: #0e1117; }
.mini .h::before { left: 3px; } .mini .h::after { right: 3px; }
.mini .b { width: 10px; height: 5px; border-radius: 2px 2px 1px 1px; margin-top: -1px; }
.mini.done .h { outline: 1.5px solid var(--ok); } .mini.fini .h { outline: 1.5px solid var(--or); } .mini.deco { opacity: .4; }

/* ===== scene (immeuble a gauche, panneau a droite), lumieres, fleches, parvis, DJ ===== */
.scene { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.col-immeuble { flex: 1 1 300px; min-width: 270px; }
.col-panneau { flex: 1 1 320px; min-width: 270px; }
.lumieres { position: absolute; top: 0; left: 0; right: 0; height: 20%; pointer-events: none; z-index: 1; overflow: visible; }
.lumieres .spot { position: absolute; top: 5%; width: 16%; height: 130%; transform-origin: top center; opacity: .5; mix-blend-mode: screen; filter: blur(3px); }
.spot.s0 { left: 18%; background: linear-gradient(to bottom, rgba(255,77,184,.6), transparent 70%); animation: balance 3.2s ease-in-out infinite; }
.spot.s1 { left: 38%; background: linear-gradient(to bottom, rgba(76,194,255,.6), transparent 70%); animation: balance 2.6s ease-in-out infinite .4s; }
.spot.s2 { left: 56%; background: linear-gradient(to bottom, rgba(227,179,65,.6), transparent 70%); animation: balance 3.5s ease-in-out infinite .2s; }
.spot.s3 { left: 74%; background: linear-gradient(to bottom, rgba(160,110,255,.6), transparent 70%); animation: balance 2.9s ease-in-out infinite .6s; }
@keyframes balance { 0%,100% { transform: rotate(-16deg); } 50% { transform: rotate(16deg); } }
.fleche { position: absolute; transform: translateX(-50%); color: var(--accent); font-size: 1.1rem; z-index: 5; text-shadow: 0 0 6px var(--accent); animation: saute 1s ease-in-out infinite; pointer-events: none; }
@keyframes saute { 0%,100% { transform: translate(-50%,0); opacity: 1; } 50% { transform: translate(-50%,7px); opacity: .5; } }
.parvis { position: absolute; left: 2%; right: 2%; bottom: 1%; display: flex; flex-wrap: wrap; gap: 2px 4px; align-items: flex-end; justify-content: flex-end; z-index: 4; pointer-events: none; }
.dj-booth { position: absolute; top: 10%; left: 50%; transform: translateX(-50%); z-index: 3; background: rgba(227,179,65,.92); color: #1a0a2a; font-weight: 700; font-size: .62rem; padding: 2px 7px; border-radius: 10px; box-shadow: 0 0 12px rgba(227,179,65,.8); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .lumieres .spot, .fleche { animation: none !important; } }

/* ===== montgolfiere ESGI + message plein ecran ===== */
.col-immeuble { position: relative; }
.montgolfiere { position: absolute; top: 40px; left: 4%; width: 54px; z-index: 4; pointer-events: none; animation: derive 12s ease-in-out infinite; }
.montgolfiere .ballon { width: 54px; height: 62px; border-radius: 50% 50% 48% 48% / 62% 62% 38% 38%; background: radial-gradient(circle at 35% 28%, #5fd0ff, #2b6fb0 72%); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: .7rem; letter-spacing: 1px; border: 1px solid rgba(255,255,255,.3); box-shadow: 0 4px 12px rgba(0,0,0,.45), inset -6px -8px 12px rgba(0,0,0,.25); text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.montgolfiere .nacelle { width: 14px; height: 10px; background: #8a5a2b; border-radius: 2px; margin: 8px auto 0; position: relative; }
.montgolfiere .nacelle::before, .montgolfiere .nacelle::after { content: ""; position: absolute; top: -8px; width: 1px; height: 8px; background: rgba(255,255,255,.45); }
.montgolfiere .nacelle::before { left: 2px; } .montgolfiere .nacelle::after { right: 2px; }
@keyframes derive { 0%,100% { transform: translate(0,0); } 25% { transform: translate(9px,-10px); } 50% { transform: translate(-7px,-3px); } 75% { transform: translate(6px,-13px); } }
.pe { position: fixed; inset: 0; z-index: 9999; background: rgba(6,8,12,.94); padding: 24px; }
.pe:not(.cache) { display: flex; align-items: center; justify-content: center; }
.pe.perso { background: rgba(20,8,30,.95); }
.pe-box { max-width: 900px; text-align: center; }
#pe-text { font-size: clamp(1.6rem, 5vw, 3.2rem); font-weight: 700; color: #fff; line-height: 1.3; margin: 0 0 28px; word-wrap: break-word; }
.pe.perso #pe-text { color: var(--or); }
#pe-fermer { font-size: 1.1rem; padding: 12px 24px; }
@media (prefers-reduced-motion: reduce) { .montgolfiere { animation: none; } }

/* montgolfiere pilotee en JS : flamme du rechaud (allumee quand elle monte) */
.montgolfiere { animation: none; }
.montgolfiere .flamme { width: 10px; height: 14px; margin: -2px auto 0; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff3b0, #ffb33a 45%, #ff6a00 82%); box-shadow: 0 0 9px rgba(255,140,0,.85); opacity: 0; transform-origin: bottom center; }
.montgolfiere.flamme-on .flamme { opacity: 1; animation: vacille .18s ease-in-out infinite alternate; }
@keyframes vacille { from { transform: scaleY(.82) scaleX(1.08); } to { transform: scaleY(1.18) scaleX(.9); } }
@media (prefers-reduced-motion: reduce) { .montgolfiere.flamme-on .flamme { animation: none; } }

/* montgolfiere = image ESGI fournie + flamme sur le rechaud */
.montgolfiere { width: 66px; }
.ballon-img { width: 100%; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.montgolfiere .flamme { position: absolute; top: 65%; left: calc(50% - 5px); margin: 0; }

/* gros numeros d'etage, gras */
.etage-rep { font-size: 1.15rem; font-weight: 800; padding: 1px 6px; }
.etage-rep.fete { font-size: 1.15rem; }

/* arrivee cinematique : zoom RDC, marche 4s depuis la droite, pseudo en arc */
#arrivee { position: fixed; inset: 0; z-index: 9998; background: #0a0d13 url('immeuble-fond.jpg') no-repeat; background-size: 300% auto; background-position: center 88%; overflow: hidden; }
#arrivee .sol { position: absolute; left: 0; right: 0; bottom: 20%; height: 4px; background: linear-gradient(90deg, transparent, rgba(120,200,255,.55), transparent); box-shadow: 0 0 14px rgba(120,200,255,.5); }
#arrivee .perso-arrivee { position: absolute; bottom: 20%; left: 50%; animation: marche-arrivee 4s ease-out both; }
@keyframes marche-arrivee { 0% { transform: translateX(44vw); } 100% { transform: translateX(-50%); } }
#arrivee .av-grand { animation: pas-arrivee .5s ease-in-out infinite; transform-origin: bottom center; }
@keyframes pas-arrivee { 0%,100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-7px) rotate(2.5deg); } }
.av-grand { width: 86px; display: flex; flex-direction: column; align-items: center; }
.av-grand .tete { width: 74px; height: 74px; border-radius: 50%; background: #4cc2ff; position: relative; border: 3px solid rgba(0,0,0,.3); box-shadow: 0 0 18px rgba(76,194,255,.6); }
.av-grand .tete::before, .av-grand .tete::after { content: ""; position: absolute; top: 30px; width: 11px; height: 11px; border-radius: 50%; background: #0e1117; }
.av-grand .tete::before { left: 17px; } .av-grand .tete::after { right: 17px; }
.av-grand .corps { width: 48px; height: 32px; background: #4cc2ff; border-radius: 9px 9px 4px 4px; margin-top: -2px; }
#arrivee .arc { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); width: 160px; height: 70px; overflow: visible; }
#arrivee .arc text { fill: var(--or); font: 800 22px system-ui, sans-serif; }
#arrivee .arc text, #arrivee .arc textPath { text-anchor: middle; }
@media (prefers-reduced-motion: reduce) { #arrivee .perso-arrivee, #arrivee .av-grand { animation: none; } }

/* ===== personnages (sol + cabines), sol, badges A-F, zoom arrivee, boutons actifs ===== */
.perso { width: 18px; display: flex; flex-direction: column; align-items: center; position: relative; }
.cabine .perso { width: 15px; }
.perso .h { width: 15px; height: 15px; border-radius: 50%; position: relative; box-shadow: 0 0 3px rgba(0,0,0,.55); border: 1px solid rgba(0,0,0,.25); }
.perso .h::before, .perso .h::after { content: ""; position: absolute; top: 5px; width: 3px; height: 3px; border-radius: 50%; background: #0e1117; }
.perso .h::before { left: 3px; } .perso .h::after { right: 3px; }
.perso .b { width: 10px; height: 5px; border-radius: 2px 2px 1px 1px; margin-top: -1px; }
.perso .pseudo { font-size: .5rem; font-weight: 700; line-height: 1; margin-bottom: 0; white-space: nowrap; text-shadow: 0 1px 2px #000, 0 0 2px #000; }
.perso.moi .h { outline: 2px solid #fff; box-shadow: 0 0 8px #fff; }
.perso.done .h { outline: 1.5px solid var(--ok); } .perso.fini .h { outline: 1.5px solid var(--or); } .perso.deco { opacity: .4; }
.sol-zone { position: absolute; left: 0; right: 0; bottom: 2%; height: 16%; z-index: 4; pointer-events: none; }
.grp-sol { position: absolute; bottom: 0; transform: translateX(-50%); display: flex; flex-wrap: wrap-reverse; gap: 1px 3px; justify-content: center; width: 16%; }
.immeuble-art { transition: transform 1.1s ease; }
.immeuble-art.zoom-sol { transform: scale(1.7); transform-origin: 50% 100%; }
.perso.sol.moi.entre { animation: marche-sol 4s ease-out both; }
@keyframes marche-sol { 0% { transform: translateX(60vw); opacity: 0; } 8% { opacity: 1; } 100% { transform: translateX(0); opacity: 1; } }
.perso.sol.moi.entre .h { animation: pas-tete .4s ease-in-out infinite; }
@keyframes pas-tete { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.badge-asc { position: absolute; width: 22px; height: 22px; border-radius: 50%; transform: translate(-50%,-50%); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .72rem; color: #06121c; border: 2px solid rgba(255,255,255,.7); box-shadow: 0 0 8px rgba(0,0,0,.55); z-index: 6; }
.badge-asc.cliquable { cursor: pointer; } .badge-asc.cliquable:hover { filter: brightness(1.2); }
button.actif { background: var(--accent); color: #04121c; box-shadow: 0 0 0 2px var(--accent); }
@media (prefers-reduced-motion: reduce) { .immeuble-art { transition: none; } .perso.sol.moi.entre, .perso.sol.moi.entre .h { animation: none; } }
