/* Abidjan Nitro — néon de nuit, couleurs de la marque en aplats, aucun dégradé. */
:root {
  --fond: #050814;
  --panneau: rgba(6, 10, 22, 0.84);
  --panneau-hud: rgba(5, 8, 20, 0.66);
  --bleu: #144971;
  --orange: #ED841B;
  --orange-clair: #F59A3D;
  --sur-orange: #0B1020;
  --texte: #F1F5F9;
  --texte-2: #A9B6CC;
  --ligne: rgba(148, 163, 184, 0.26);
  --cyan: #22D3EE;
  --rouge: #EF4444;
  --vert: #22C55E;
  --jaune: #FACC15;
  --titre: 'Orbitron', 'Arial Black', Impact, sans-serif;
  --corps: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  --haut: env(safe-area-inset-top, 0px);
  --bas: env(safe-area-inset-bottom, 0px);
  --gauche: env(safe-area-inset-left, 0px);
  --droite: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--fond); color: var(--texte); font-family: var(--corps); font-size: 16px; line-height: 1.5;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
kbd {
  display: inline-block; min-width: 26px; padding: 1px 7px; border: 1px solid var(--ligne); border-radius: 6px;
  background: rgba(255, 255, 255, 0.06); font-family: var(--titre); font-size: 11px; font-weight: 600; text-align: center; color: var(--texte);
}

/* ---------- Chargement ---------- */
.chargement {
  position: fixed; inset: 0; z-index: 50; background: var(--fond);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity 0.5s ease;
}
.chargement.fini { opacity: 0; pointer-events: none; }
.ch-titre { font-family: var(--titre); font-weight: 900; font-size: clamp(30px, 6vw, 52px); letter-spacing: 0.06em; }
.ch-titre span { color: var(--orange); }
.ch-barre { width: min(300px, 70vw); height: 4px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; }
.ch-barre i { display: block; height: 100%; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease; }
.chargement p { margin: 0; color: var(--texte-2); font-size: 15px; }
.chargement.erreur p { color: var(--rouge); }

/* ---------- Écrans ---------- */
.ecran {
  position: fixed; inset: 0; z-index: 10; display: flex;
  padding: calc(20px + var(--haut)) calc(20px + var(--droite)) calc(20px + var(--bas)) calc(20px + var(--gauche));
  animation: apparait 260ms ease-out;
}
@keyframes apparait { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.panneau {
  background: var(--panneau); border: 1px solid var(--ligne); border-left: 4px solid var(--orange);
  border-radius: 18px; padding: clamp(20px, 3vw, 36px);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.surtitre {
  margin: 0 0 6px; font-family: var(--titre); font-weight: 600; font-size: 12px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--texte-2); display: flex; align-items: center; gap: 10px;
}
.puce { width: 9px; height: 9px; background: var(--orange); border-radius: 2px; animation: clignote 1.6s steps(2) infinite; }
@keyframes clignote { 50% { opacity: 0.25; } }
h1, h2, h3 { font-family: var(--titre); margin: 0; }
h2 { font-weight: 800; font-size: clamp(22px, 3vw, 32px); letter-spacing: 0.03em; }
h3 { font-weight: 800; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte-2); margin-bottom: 12px; }

.btn {
  min-height: 52px; padding: 0 26px; border-radius: 12px; border: 2px solid var(--ligne); background: rgba(255, 255, 255, 0.03);
  font-family: var(--titre); font-weight: 800; font-size: 15px; letter-spacing: 0.12em; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.btn:hover { border-color: var(--texte-2); background: rgba(255, 255, 255, 0.07); }
.btn:active { transform: scale(0.97); }
.btn.principal { background: var(--orange); border-color: var(--orange); color: var(--sur-orange); }
.btn.principal:hover { background: var(--orange-clair); border-color: var(--orange-clair); }
.btn.principal svg { fill: currentColor; stroke: none; width: 20px; height: 20px; }
.btn.large { width: 100%; }
button:focus-visible, .carte-voiture:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.opt {
  min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--ligne); background: rgba(255, 255, 255, 0.04);
  font-weight: 600; font-size: 14px; color: var(--texte-2); cursor: pointer; transition: border-color 150ms ease, color 150ms ease;
}
.opt:hover { color: var(--texte); border-color: var(--texte-2); }
.opt[aria-pressed="false"] { opacity: 0.75; }
.retour {
  width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--ligne); background: rgba(255, 255, 255, 0.04);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.retour:hover { border-color: var(--texte-2); }
.entete { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.etiq { font-family: var(--titre); font-size: 11px; font-weight: 600; letter-spacing: 0.2em; color: var(--texte-2); }

/* Titre */
.titre { align-items: center; padding-left: calc(clamp(20px, 6vw, 96px) + var(--gauche)); }
.titre .panneau { max-width: 520px; }
.titre h1 { font-weight: 900; font-size: clamp(44px, 7.4vw, 92px); line-height: 0.95; letter-spacing: 0.04em; margin: 4px 0 14px; }
.titre h1 span { display: block; color: var(--orange); animation: neon 4s ease-in-out infinite; }
@keyframes neon { 0%, 100% { opacity: 1; } 47% { opacity: 1; } 48% { opacity: 0.55; } 49% { opacity: 1; } 51% { opacity: 0.7; } 52% { opacity: 1; } }
.accroche { margin: 0 0 22px; color: var(--texte-2); font-size: 17px; max-width: 42ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.titre .actions .principal { min-width: 180px; }
.options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.record { margin: 16px 0 0; font-size: 14px; color: var(--texte-2); }
.tous-jeux {
  position: absolute; top: calc(16px + var(--haut)); left: calc(20px + var(--gauche)); z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--ligne); background: var(--panneau); color: var(--texte); text-decoration: none; font-weight: 700; font-size: 15px;
  transition: border-color 150ms ease;
}
.tous-jeux:hover { border-color: var(--texte-2); }
.tous-jeux:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.pied { position: absolute; right: calc(24px + var(--droite)); bottom: calc(16px + var(--bas)); margin: 0; font-size: 13px; color: var(--texte-2); }

/* Garage */
.garage { align-items: stretch; }
.garage-panneau {
  width: min(560px, 54vw); display: flex; flex-direction: column; gap: 16px; overflow: auto;
  background: var(--panneau); border: 1px solid var(--ligne); border-radius: 18px; padding: clamp(16px, 2.4vw, 28px);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.garage .entete { margin: 0; }
.cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.carte-voiture {
  text-align: left; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--ligne); cursor: pointer; display: flex; flex-direction: column; gap: 6px;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.carte-voiture:hover { border-color: var(--texte-2); }
.carte-voiture:active { transform: scale(0.98); }
.carte-voiture[aria-pressed="true"] { border-color: var(--orange); background: rgba(237, 132, 27, 0.12); }
.carte-voiture .genre { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte-2); }
.carte-voiture[aria-pressed="true"] .genre { color: var(--orange); }
.carte-voiture strong { font-family: var(--titre); font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.stat { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--texte-2); }
.seg { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.seg i { height: 7px; border-radius: 2px; background: rgba(148, 163, 184, 0.2); }
.seg i.on { background: var(--texte); }
.carte-voiture[aria-pressed="true"] .seg i.on { background: var(--orange); }
.bloc-couleur .etiq { margin: 0 0 8px; }
.couleurs { display: flex; flex-wrap: wrap; gap: 10px; }
.pastille {
  width: 44px; height: 44px; border-radius: 50%; background: var(--c); border: 3px solid var(--fond);
  box-shadow: 0 0 0 2px var(--ligne); cursor: pointer; transition: transform 150ms ease;
}
.pastille:hover { transform: scale(1.08); }
.pastille[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--texte); }
.garage-nom {
  position: absolute; right: calc(5vw + var(--droite)); bottom: calc(7vh + var(--bas)); text-align: right;
  display: flex; flex-direction: column; pointer-events: none;
}
.garage-nom span { font-family: var(--titre); font-size: 13px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--orange); }
.garage-nom strong { font-family: var(--titre); font-weight: 900; font-size: clamp(28px, 4.2vw, 56px); letter-spacing: 0.03em; }

/* Aide */
.aide { align-items: center; justify-content: center; overflow: auto; }
.panneau.large { width: min(1060px, 100%); max-height: 100%; overflow: auto; }
.colonnes { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; margin-bottom: 20px; }
.commandes { width: 100%; border-collapse: collapse; font-size: 14px; }
.commandes th { text-align: left; font-family: var(--titre); font-size: 11px; letter-spacing: 0.16em; color: var(--texte-2); padding: 0 8px 8px; }
.commandes td { padding: 8px; border-top: 1px solid var(--ligne); }
.commandes td:first-child { color: var(--texte-2); padding-left: 0; }
.astuce { font-size: 14px; color: var(--texte-2); margin: 14px 0 0; }
.liste-bonus { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.liste-bonus li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; }
.liste-bonus svg { width: 44px; height: 44px; padding: 8px; border-radius: 12px; border: 2px solid var(--c); color: var(--c); }
.liste-bonus strong { display: block; font-family: var(--titre); font-size: 14px; letter-spacing: 0.06em; }
.liste-bonus span { font-size: 14px; color: var(--texte-2); line-height: 1.4; }

/* Pause */
.pause { align-items: center; justify-content: center; background: rgba(5, 8, 20, 0.45); }
.panneau.petit { width: min(400px, 100%); display: flex; flex-direction: column; gap: 10px; }
.panneau.petit h2 { margin-bottom: 8px; }
.panneau.petit .options { margin-top: 8px; }

/* Résultats */
.resultats { align-items: center; justify-content: center; background: rgba(5, 8, 20, 0.35); }
.r-titre { font-weight: 900; font-size: clamp(34px, 5vw, 56px); letter-spacing: 0.03em; }
.r-titre[data-podium="oui"] { color: var(--orange); }
.r-phrase { margin: 4px 0 6px; color: var(--texte-2); font-size: 16px; }
.r-record { display: inline-block; margin: 6px 0 0; padding: 4px 12px; border-radius: 8px; background: var(--jaune); color: var(--sur-orange); font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.r-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.r-stats div { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ligne); background: rgba(255, 255, 255, 0.03); display: flex; flex-direction: column; }
.r-stats span { font-size: 12px; color: var(--texte-2); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.r-stats b { font-family: var(--titre); font-size: 22px; font-variant-numeric: tabular-nums; }
.r-tableau { max-height: 36vh; overflow: auto; margin-bottom: 18px; border-radius: 12px; border: 1px solid var(--ligne); }
.r-tableau table { width: 100%; border-collapse: collapse; font-size: 15px; }
.r-tableau th { position: sticky; top: 0; background: #0A1022; text-align: left; padding: 10px 14px; font-family: var(--titre); font-size: 11px; letter-spacing: 0.16em; color: var(--texte-2); }
.r-tableau td { padding: 9px 14px; border-top: 1px solid var(--ligne); font-variant-numeric: tabular-nums; }
.r-tableau td i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 10px; }
.r-tableau tr.moi td { background: rgba(237, 132, 27, 0.14); font-weight: 700; }
.r-tableau tr.moi td:first-child { box-shadow: inset 4px 0 0 var(--orange); }
.actions.ligne .btn { flex: 1 1 180px; }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; font-family: var(--titre); }
.hud-hg {
  position: absolute; top: calc(14px + var(--haut)); left: calc(16px + var(--gauche));
  background: var(--panneau-hud); border: 1px solid var(--ligne); border-radius: 14px; padding: 10px 16px 12px; min-width: 190px;
}
.place { font-weight: 900; font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; }
.place small { font-size: 20px; color: var(--texte-2); margin-left: 4px; }
.infos { display: flex; gap: 18px; margin-top: 6px; }
.infos div { display: flex; flex-direction: column; }
.infos b { font-size: 18px; font-variant-numeric: tabular-nums; }
.secteur { margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--orange); }
.hud-hd { position: absolute; top: calc(14px + var(--haut)); right: calc(16px + var(--droite)); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.btn-pause {
  pointer-events: auto; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--ligne);
  background: var(--panneau-hud); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-pause svg { stroke-width: 3; }
.carte { width: 150px; height: 150px; border-radius: 14px; background: var(--panneau-hud); border: 1px solid var(--ligne); }

.hud-bonus { position: absolute; left: 50%; bottom: calc(18px + var(--bas)); transform: translateX(-50%); display: flex; gap: 10px; align-items: flex-end; }
.case {
  position: relative; width: 176px; height: 66px; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 14px; background: var(--panneau-hud); border: 2px solid var(--c, var(--ligne));
}
.case svg { width: 40px; height: 40px; color: var(--c); }
.case .nom { font-family: var(--corps); font-weight: 800; font-size: 15px; line-height: 1.15; }
.case kbd { position: absolute; top: -11px; right: 10px; background: #0A1022; }
.case[data-vide="oui"] { border-color: var(--ligne); }
.case[data-vide="oui"] .nom { color: var(--texte-2); font-weight: 600; }
.case.petite { width: 132px; height: 52px; grid-template-columns: 30px 1fr; opacity: 0.85; }
.case.petite svg { width: 30px; height: 30px; }
.case.petite .nom { font-size: 13px; }
.case.petite[data-vide="oui"] { opacity: 0.5; }
.case.nouveau { animation: pop 280ms ease-out; }
@keyframes pop { from { transform: scale(1.14); } to { transform: none; } }

.hud-bd { position: absolute; right: calc(18px + var(--droite)); bottom: calc(16px + var(--bas)); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.vitesse { display: flex; align-items: baseline; gap: 8px; }
.vitesse b { font-weight: 900; font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.vitesse small { font-size: 13px; color: var(--texte-2); letter-spacing: 0.16em; }
.sante { width: 230px; }
.sante-tete { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 0.16em; color: var(--texte-2); margin-bottom: 5px; }
.sante-tete b { color: var(--texte); font-variant-numeric: tabular-nums; }
.sante-barre { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.sante-barre i { display: block; height: 100%; background: var(--vert); transform-origin: left; transition: transform 200ms ease, background-color 200ms ease; }
.sante-barre i[data-niveau="moyen"] { background: var(--jaune); }
.sante-barre i[data-niveau="bas"] { background: var(--rouge); animation: clignote 0.8s steps(2) infinite; }
.etat-boost { padding: 4px 12px; border-radius: 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--sur-orange); background: var(--jaune); }
.etat-boost[data-type="bouclier"] { background: var(--vert); }
.etat-boost[data-type="fantome"] { background: var(--cyan); }

.messages { position: absolute; top: 21%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; width: max-content; max-width: 90vw; }
.msg {
  font-weight: 800; font-size: 17px; letter-spacing: 0.08em; color: var(--texte); text-align: center;
  background: rgba(5, 8, 20, 0.78); border-left: 4px solid var(--c); padding: 7px 16px; border-radius: 8px;
  animation: msg 220ms ease-out; transition: opacity 0.4s ease, transform 0.4s ease;
}
.msg.part { opacity: 0; transform: translateY(-6px); }
@keyframes msg { from { opacity: 0; transform: translateY(-10px) scale(0.96); } to { opacity: 1; transform: none; } }
.alerte {
  position: absolute; top: 12%; left: 50%; transform: translateX(-50%); padding: 9px 20px; border-radius: 10px;
  font-weight: 900; font-size: 20px; letter-spacing: 0.1em; background: var(--orange); color: var(--sur-orange);
  animation: clignote 0.9s steps(2) infinite;
}
.alerte[data-type="danger"] { background: var(--rouge); color: #fff; }
.flash { position: absolute; inset: 0; opacity: 0; box-shadow: inset 0 0 140px 30px var(--c, var(--rouge)); }
.flash.on { animation: flash 600ms ease-out; }
@keyframes flash { from { opacity: 0.9; } to { opacity: 0; } }

.compte {
  position: fixed; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; pointer-events: none;
  font-family: var(--titre); font-weight: 900; font-size: clamp(90px, 18vw, 180px); color: var(--texte);
  text-shadow: 0 0 30px rgba(237, 132, 27, 0.7);
}
.compte[data-go="oui"] { color: var(--orange); }
.compte.pulse { animation: compte 600ms ease-out; }
@keyframes compte { from { transform: scale(1.7); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); } }

/* ---------- Tactile ---------- */
.tactile { position: fixed; inset: 0; z-index: 7; pointer-events: none; }
.tactile button {
  pointer-events: auto; touch-action: none; border-radius: 22px; background: rgba(5, 8, 20, 0.55);
  border: 2px solid rgba(241, 245, 249, 0.34); display: flex; align-items: center; justify-content: center;
  transition: transform 80ms ease, background-color 80ms ease, border-color 80ms ease;
}
.tactile button.appuye { transform: scale(0.94); background: rgba(237, 132, 27, 0.35); border-color: var(--orange); }
.t-gauche { position: absolute; left: calc(18px + var(--gauche)); bottom: calc(18px + var(--bas)); display: flex; gap: 14px; }
.t-gauche button { width: 92px; height: 92px; }
.t-gauche svg { width: 42px; height: 42px; stroke-width: 2.8; }
.t-droite { position: absolute; right: calc(18px + var(--droite)); bottom: calc(18px + var(--bas)); display: flex; gap: 14px; align-items: flex-end; }
.t-petit { width: 60px; height: 60px; }
.t-frein { width: 86px; height: 86px; font-family: var(--titre); font-weight: 800; font-size: 13px; letter-spacing: 0.1em; }
.t-bonus { width: 108px; height: 108px; border-radius: 50% !important; flex-direction: column; gap: 2px; border-color: var(--c, var(--ligne)) !important; border-width: 3px !important; }
.t-bonus svg { width: 44px; height: 44px; color: var(--c); }
.t-bonus span { font-family: var(--titre); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; }
.t-bonus[data-vide="oui"] { opacity: 0.55; }

body.tactile-on .hud-bonus { bottom: auto; top: calc(14px + var(--haut)); }
body.tactile-on .case kbd { display: none; }
body.tactile-on .hud-bd { right: 50%; transform: translateX(50%); bottom: calc(14px + var(--bas)); align-items: center; }

.tourner { display: none; }

/* ---------- Petits écrans ---------- */
@media (max-width: 900px) {
  body:not(.tactile-on) .hud-bonus { left: calc(16px + var(--gauche)); transform: none; }
  .colonnes { grid-template-columns: 1fr; }
  .r-stats { grid-template-columns: repeat(2, 1fr); }
  .pied { display: none; }
}
@media (max-height: 520px) {
  .ecran { padding-top: calc(10px + var(--haut)); padding-bottom: calc(10px + var(--bas)); }
  .titre .panneau { padding: 18px 22px; max-width: 470px; }
  .tous-jeux { top: auto; left: auto; bottom: calc(12px + var(--bas)); right: calc(20px + var(--droite)); }
  .titre h1 { font-size: 44px; margin-bottom: 8px; }
  .accroche { font-size: 14px; margin-bottom: 12px; }
  .options { margin-top: 10px; }
  .record { margin-top: 8px; font-size: 13px; }
  .garage-panneau { gap: 10px; padding: 12px 14px; width: min(620px, 62vw); }
  .garage .entete h2 { font-size: 20px; }
  .cartes { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .carte-voiture { padding: 8px 10px; gap: 3px; }
  .carte-voiture strong { font-size: 14px; margin: 0; }
  .stat { grid-template-columns: 82px 1fr; font-size: 11px; line-height: 1.2; }
  .seg i { height: 5px; }
  .garage-nom strong { font-size: 30px; }
  .place { font-size: 40px; }
  .hud-hg { padding: 8px 12px; min-width: 150px; }
  .infos b { font-size: 15px; }
  .carte { width: 104px; height: 104px; }
  .vitesse b { font-size: 44px; }
  .sante { width: 170px; }
  .case { width: 150px; height: 54px; grid-template-columns: 34px 1fr; padding: 6px 10px; }
  .case svg { width: 32px; height: 32px; }
  .case.petite { width: 110px; height: 46px; }
  .messages { top: 26%; }
  .msg { font-size: 14px; }
  .alerte { font-size: 16px; top: 17%; }
  .t-gauche button { width: 80px; height: 80px; }
  .t-frein { width: 76px; height: 76px; }
  .t-bonus { width: 96px; height: 96px; }
  .r-tableau { max-height: 30vh; }
  .r-stats { margin: 10px 0; }
}
@media (max-width: 700px) and (orientation: portrait) {
  .titre { padding-left: calc(16px + var(--gauche)); align-items: flex-end; }
  .garage { flex-direction: column; justify-content: flex-end; }
  .garage-panneau { width: 100%; max-height: 64vh; }
  .garage-nom { top: calc(20px + var(--haut)); bottom: auto; right: 20px; }
  .cartes { grid-template-columns: 1fr 1fr; }
  .stat { grid-template-columns: 1fr; gap: 2px; }
}
@media (orientation: portrait) and (pointer: coarse) {
  body[data-mode="course"] .tourner, body[data-mode="pause"] .tourner {
    position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    background: var(--fond); text-align: center; font-family: var(--titre); font-weight: 800; font-size: 18px; letter-spacing: 0.06em;
  }
  .tourner svg { width: 64px; height: 64px; color: var(--orange); animation: pivote 2s ease-in-out infinite; }
  @keyframes pivote { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
