/* =============================================================================================
   Carte de vœux AR Mikron 2027 — interface (refonte du 6 nov. 2026)
   Langage visuel de la borne tactile Mikron (mikron-viewer.pages.dev), poussé pour le téléphone :
   - Bebas Neue pour les titres et les chiffres, Gothic A1 pour le texte (polices locales : assets/polices) ;
   - bleu Mikron #003399 et ses nuances, gris neutres, blanc ; fond clair parcouru de rubans de fines lignes ;
   - repères de précision : coins de visée, croix, cercles numérotés (comme les repères de la carte imprimée) ;
   - éléments vitrés (blanc translucide flouté) par-dessus la caméra.
   Règle de couleur : l'interface n'utilise que le bleu Mikron. L'or, le corail et le jaune restent dans la 3D :
   ce sont les couleurs de la carte imprimée.
   ============================================================================================= */

@font-face { font-family: "Bebas Neue"; src: url("../assets/polices/BebasNeue-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Gothic A1"; src: url("../assets/polices/GothicA1-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Gothic A1"; src: url("../assets/polices/GothicA1-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Gothic A1"; src: url("../assets/polices/GothicA1-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Gothic A1"; src: url("../assets/polices/GothicA1-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --bleu: #003399;            /* bleu Mikron */
  --bleu-vif: #1d58d0;        /* bas des dégradés */
  --bleu-70: #4c70b7;
  --bleu-50: #7f99cc;
  --bleu-30: #b2c1e0;
  --bleu-15: #d9e1f0;
  --bleu-nuit: #011d58;
  --bleu-abysse: #000c2c;
  --gris-700: #4d4d4d;
  --gris-600: #878787;
  --verre: rgba(255, 255, 255, 0.84);
  --verre-bord: rgba(0, 51, 153, 0.1);
  --ombre-verre: 0 0 0 1px var(--verre-bord), 0 14px 34px -10px rgba(1, 29, 88, 0.42);
  --flou: blur(18px) saturate(1.5);
  --degrade-bleu: linear-gradient(180deg, var(--bleu) 0%, var(--bleu-vif) 100%);
  --display: "Bebas Neue", "Oswald", "Arial Narrow", Impact, sans-serif;
  --texte: "Gothic A1", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --haut: max(14px, env(safe-area-inset-top));
  --bas: max(14px, env(safe-area-inset-bottom));
  --doux: cubic-bezier(0.22, 1, 0.36, 1);
  --ressort: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #f4f7fc; color: var(--gris-700); font-family: var(--texte);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
body.en-ar { background: #000; }
button { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- scène 3D / caméra */
#scene-ar { position: fixed; inset: 0; overflow: hidden; isolation: isolate; }
#scene-ar video { object-fit: cover; }
/* 8th Wall : son module three.js fixe la taille d'affichage de la toile à sa taille en pixels réels (style.width =
   750px sur un écran de 375 px à densité 2) : l'image était affichée 2 à 3 fois trop grande (« zoom »). On impose la
   taille de l'écran. */
.toile-8thwall { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
/* voile bleu Mikron entre la vidéo (z-index -2) et la 3D */
.voile-camera { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: #003399; opacity: 0; transition: opacity 0.8s ease; }
.mindar-ui-overlay { display: none !important; }
/* aperçu sans caméra : scène bleu nuit, lignes blanches (interface.js), 3D par-dessus */
.scene-apercu { background: radial-gradient(120% 75% at 50% 40%, #1a59cf 0%, #0a3c9f 30%, #032a73 60%, var(--bleu-abysse) 100%); }
.scene-apercu canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------------------------------------------------------------- fond des écrans plein cadre */
.fond-ecrans {
  position: fixed; inset: 0; z-index: 19; pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity 0.6s var(--doux), visibility 0s linear 0.6s;
  background:
    linear-gradient(118deg, rgba(255,255,255,0) 28%, rgba(255,255,255,0.65) 44%, rgba(255,255,255,0) 60%),
    radial-gradient(90% 55% at 10% 0%, #ffffff 0%, rgba(255,255,255,0) 70%),
    radial-gradient(80% 50% at 100% 100%, rgba(0,51,153,0.09) 0%, rgba(0,51,153,0) 70%),
    linear-gradient(180deg, #f8fafd 0%, #eef2f9 58%, #e1e8f5 100%);
}
.fond-ecrans.visible { opacity: 1; visibility: visible; transition: opacity 0.6s var(--doux); }
.fond-ecrans canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------------------------------------------------------------- écrans (accueil, chargement, erreur) */
.ecran {
  position: fixed; inset: 0; z-index: 20; overflow-x: hidden; overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity 0.45s var(--doux), visibility 0s linear 0.45s;
}
.ecran.visible { opacity: 1; visibility: visible; transition: opacity 0.45s var(--doux) 0.1s; }
.ecran-contenu {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-width: 460px; min-height: 100%; margin: 0 auto;
  padding: calc(var(--haut) + 12px) 24px calc(var(--bas) + 16px);
}

.entete { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
.entete .logo { height: 17px; width: auto; display: block; }
.etiquette-mini {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 9.5px/1 var(--texte); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gris-600);
}
.etiquette-mini::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bleu); box-shadow: 0 0 0 3px rgba(0,51,153,0.14); }

/* accueil */
.accueil-centre { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 30px 0 24px; }
.surtitre {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px;
  font: 600 10.5px/1 var(--texte); letter-spacing: 0.28em; text-transform: uppercase; color: var(--gris-700);
}
.filet { display: block; width: 44px; height: 1px; background: currentColor; opacity: 0.7; transform-origin: left; animation: filet 1s var(--doux) 0.4s both; }
@keyframes filet { from { transform: scaleX(0); } }
.titre-accueil {
  margin: 0; font: 400 clamp(46px, 15vw, 66px)/0.9 var(--display); letter-spacing: 0.01em;
  color: var(--bleu); text-transform: uppercase;
}
.masque { display: block; overflow: hidden; }
.monte { display: block; transform: translateY(105%); animation: monte 1s var(--doux) both; animation-delay: calc(var(--d, 0) * 110ms + 250ms); }
@keyframes monte { to { transform: none; } }
/* « 2026 » dont le dernier chiffre roule jusqu'à 7 */
.millesime { margin: 0.03em 0 0 -0.035em; font: 400 clamp(150px, 52vw, 236px)/0.8 var(--display); letter-spacing: -0.012em; }
.millesime .monte { display: flex; }
/* line-height 0.92 dans une boîte de 0.8em : la ligne de base descend de 0.06em. Avec 0.8, le haut des chiffres ronds
   (0, 2) dépassait de la boîte et était rogné (retour de Lori, 8 nov.) : Bebas Neue monte à 0.71em au-dessus de la ligne
   de base, qui était à 0.70em du haut de la boîte. */
.millesime .chiffre, .rouleau .piste > span {
  display: block; height: 0.8em; line-height: 0.92;
  background: var(--degrade-bleu); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.rouleau { display: block; height: 0.8em; overflow: hidden; }
.rouleau .piste { display: block; animation: roule 1.3s var(--ressort) 1.45s both; }
@keyframes roule { from { transform: translateY(0); } to { transform: translateY(-0.8em); } }
.intro { margin: 22px 0 0; max-width: 34ch; font: 400 15px/1.6 var(--texte); color: var(--gris-700); }
/* trois étapes, cercles numérotés reliés par un filet (comme les repères de la carte) */
.etapes { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.etapes::before { content: ""; position: absolute; top: 15px; left: 15px; width: calc((100% - 24px) / 3 * 2 + 24px); height: 1px; background: var(--bleu-30); }
.etapes li { position: relative; display: flex; flex-direction: column; gap: 10px; font: 500 11.5px/1.4 var(--texte); color: var(--gris-700); }
.num {
  position: relative; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1.5px var(--bleu); font: 800 10px/1 var(--texte); letter-spacing: 0.04em; color: var(--bleu);
}
.accueil-pied { display: flex; flex-direction: column; align-items: stretch; }
.apparait { animation: apparait 0.9s var(--doux) both; animation-delay: calc(var(--d, 0) * 110ms + 250ms); }
@keyframes apparait { from { opacity: 0; transform: translateY(16px); } }

/* boutons */
.bouton-principal {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; height: 60px; padding: 0 10px 0 24px; border: 0; border-radius: 16px;
  background: var(--bleu); color: #fff; font: 700 13px/1 var(--texte); letter-spacing: 0.24em; text-transform: uppercase;
  box-shadow: 0 18px 36px -16px rgba(0,51,153,0.8), inset 0 1px 0 rgba(255,255,255,0.16);
  transition: transform 0.2s var(--doux);
}
.bouton-principal::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.22) 50%, transparent 65%);
  transform: translateX(-120%); animation: reflet 5s ease-in-out 2.6s infinite;
}
@keyframes reflet { 0% { transform: translateX(-120%); } 28%, 100% { transform: translateX(120%); } }
.bouton-principal:active { transform: scale(0.985); }
.fleche { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
.fleche svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lien {
  display: block; margin: 16px auto 0; padding: 6px 8px; background: none; border: 0;
  font: 600 13px/1.3 var(--texte); color: var(--bleu);
  text-decoration: underline; text-decoration-color: rgba(0,51,153,0.3); text-underline-offset: 5px;
}
.mention { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0; font: 400 11px/1.45 var(--texte); color: var(--gris-600); text-align: center; }
.mention svg { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.avertissement { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(0,51,153,0.07); font: 600 12px/1.45 var(--texte); color: var(--bleu); text-align: center; }
.titre-erreur { font-size: clamp(44px, 13vw, 60px); }

/* ESSAI (à retirer avant l'envoi) : choix « 3 / 4 · test » sur l'accueil (js/design.js) */
.choix-design { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 0; }
.choix-design > span { font: 700 9px/1 var(--texte); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gris-600); }
.choix-design .segments { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(0,51,153,0.07); box-shadow: inset 0 0 0 1px rgba(0,51,153,0.1); }
.choix-design button { min-width: 42px; height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: none; font: 400 17px/1 var(--display); letter-spacing: 0.04em; color: var(--bleu-50); transition: background 0.25s var(--doux), color 0.25s var(--doux); }
.choix-design button.actif { background: #fff; color: var(--bleu); box-shadow: 0 2px 8px -2px rgba(1,29,88,0.35); }

/* chargement */
#chargement .ecran-contenu { align-items: center; justify-content: center; text-align: center; }
.chargement-centre { display: flex; flex-direction: column; align-items: center; }
.reticule { width: 156px; height: 156px; }
.reticule svg { width: 100%; height: 100%; overflow: visible; }
.reticule circle, .reticule path { fill: none; }
.r-pointilles { stroke: var(--bleu-30); stroke-width: 1.4; stroke-dasharray: 0.1 5.8; stroke-linecap: round; }
.r-fond { stroke: var(--bleu-15); stroke-width: 1; }
.r-progres { stroke: var(--bleu); stroke-width: 1.8; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 80px 80px; }
.r-arc1, .r-arc2 { transform-origin: 80px 80px; }
.r-arc1 { animation: tourne 1.9s linear infinite; }
.r-arc2 { animation: tourne 3s linear infinite reverse; }
.r-arc1 path { stroke: var(--bleu-70); stroke-width: 1.2; stroke-linecap: round; }
.r-arc2 path { stroke: var(--bleu-50); stroke-width: 1; stroke-linecap: round; }
.r-croix { stroke: var(--bleu); stroke-width: 1; }
.r-reperes { stroke: var(--bleu-50); stroke-width: 1; }
@keyframes tourne { to { transform: rotate(360deg); } }
.pct { margin: 22px 0 0; font: 400 34px/1 var(--display); letter-spacing: 0.04em; color: var(--bleu); font-variant-numeric: tabular-nums; }
.pct small { margin-left: 3px; font: 700 11px/1 var(--texte); color: var(--bleu-70); }
.etape { margin: 10px 0 0; min-height: 1.4em; font: 600 10px/1.4 var(--texte); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gris-600); }
.chargement-pied { position: absolute; left: 0; right: 0; bottom: calc(var(--bas) + 18px); margin: 0; text-align: center; font: 600 9.5px/1 var(--texte); letter-spacing: 0.26em; text-transform: uppercase; color: var(--gris-600); }

/* ---------------------------------------------------------------- HUD par-dessus la caméra */
.hud { position: fixed; inset: 0; z-index: 12; pointer-events: none; opacity: 0; transition: opacity 0.5s var(--doux); }
.hud.ouvert { opacity: 1; }
.hud-haut { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: calc(var(--haut) + 2px) 12px 0; }
.hud-droite { display: flex; gap: 8px; }
.puce {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px;
  border: 0; border-radius: 13px; background: var(--verre); -webkit-backdrop-filter: var(--flou); backdrop-filter: var(--flou);
  box-shadow: var(--ombre-verre); color: var(--bleu);
}
.puce-logo img { display: block; height: 12.5px; width: auto; }
.puce-face { gap: 0; padding: 0 14px 0 12px; }
.pf-n { min-width: 1.05em; padding-top: 2px; font: 400 23px/1 var(--display); letter-spacing: 0.02em; color: var(--bleu); }
.puce-face[data-face=""] .pf-n { color: var(--bleu-30); }
.pf-sur { margin: 0 10px 0 3px; font: 600 10px/1 var(--texte); letter-spacing: 0.06em; color: var(--gris-600); }
.pf-nom { display: flex; align-items: center; height: 16px; padding-left: 10px; border-left: 1px solid var(--bleu-15); font: 700 9.5px/1 var(--texte); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gris-700); }
.puce-face[data-face=""] .pf-nom::after { content: ""; width: 5px; height: 5px; margin-left: 8px; border-radius: 50%; background: var(--bleu); animation: clignote 1.2s ease-in-out infinite; }
@keyframes clignote { 50% { opacity: 0.15; } }
.puce-face.change { animation: pop 0.55s var(--ressort); }
@keyframes pop { 40% { transform: scale(1.07); } }
.puce-icone { width: 40px; padding: 0; justify-content: center; }
.puce-icone svg { width: 14px; height: 14px; fill: none; stroke: var(--bleu); stroke-width: 1.8; stroke-linecap: round; }
#bouton-fermer { display: none; }
body.mode-apercu #bouton-fermer { display: inline-flex; }

/* viseur */
.viseur { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding-bottom: 3vh; }
.cadre { position: relative; width: min(84vw, 460px); aspect-ratio: 1264 / 848; animation: respire 3s ease-in-out infinite; }
@keyframes respire { 50% { transform: scale(0.972); } }
.coin { position: absolute; width: 28px; height: 28px; border: 0 solid #fff; filter: drop-shadow(0 0 1px rgba(0,12,44,0.5)) drop-shadow(0 3px 10px rgba(0,12,44,0.3)); }
.c1 { left: 0; top: 0; border-left-width: 2.5px; border-top-width: 2.5px; border-top-left-radius: 7px; }
.c2 { right: 0; top: 0; border-right-width: 2.5px; border-top-width: 2.5px; border-top-right-radius: 7px; }
.c3 { right: 0; bottom: 0; border-right-width: 2.5px; border-bottom-width: 2.5px; border-bottom-right-radius: 7px; }
.c4 { left: 0; bottom: 0; border-left-width: 2.5px; border-bottom-width: 2.5px; border-bottom-left-radius: 7px; }
.mire { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.mire::before, .mire::after { content: ""; position: absolute; background: rgba(255,255,255,0.9); box-shadow: 0 0 2px rgba(0,12,44,0.45); }
.mire::before { left: 50%; top: 0; bottom: 0; width: 1px; margin-left: -0.5px; }
.mire::after { top: 50%; left: 0; right: 0; height: 1px; margin-top: -0.5px; }
.balayage {
  position: absolute; left: 5%; right: 5%; top: 6%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.95) 50%, rgba(255,255,255,0));
  box-shadow: 0 0 14px 3px rgba(120,165,255,0.55); animation: balaie 2.4s var(--doux) infinite alternate;
}
@keyframes balaie { to { top: 94%; } }
.consigne { height: auto; min-height: 54px; padding: 8px 18px 8px 9px; gap: 12px; border-radius: 16px; }
.consigne strong { display: block; font: 700 10.5px/1.2 var(--texte); letter-spacing: 0.22em; text-transform: uppercase; color: var(--bleu); }
.consigne small { display: block; margin-top: 4px; font: 400 12px/1.3 var(--texte); color: var(--gris-700); }
/* icône : une petite carte qui se retourne */
.icone-carte { position: relative; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgba(0,51,153,0.07); perspective: 90px; }
.icone-carte.grande { width: 50px; height: 50px; border-radius: 14px; }
.icone-carte i {
  width: 22px; height: 15px; border-radius: 2.5px; box-shadow: inset 0 0 0 1.5px var(--bleu);
  background: linear-gradient(var(--bleu), var(--bleu)) 4px 4px / 6px 1.5px no-repeat, linear-gradient(var(--bleu), var(--bleu)) 4px 8px / 11px 1.5px no-repeat;
  animation: retourne 3s var(--doux) infinite;
}
.icone-carte.grande i { width: 28px; height: 19px; background-size: 8px 1.6px, 14px 1.6px; background-position: 5px 5px, 5px 10px; }
@keyframes retourne { 0%, 32% { transform: rotateY(0deg) rotateX(14deg); } 52%, 82% { transform: rotateY(180deg) rotateX(14deg); } 100% { transform: rotateY(360deg) rotateX(14deg); } }
.icone-tourner { display: none; width: 28px; height: 28px; fill: none; stroke: var(--bleu); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; animation: oscille 3s var(--doux) infinite; }
@keyframes oscille { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(18deg); } }
#indice[data-icone="tourner"] .icone-carte i { display: none; }
#indice[data-icone="tourner"] .icone-tourner { display: block; }

/* bas de l'écran : astuce, compte à rebours, bouton Replay */
.hud-bas { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 12px calc(var(--bas) + 22px); }
body.mode-apercu .hud-bas { padding-bottom: calc(var(--bas) + 84px); }
.carte-verre {
  pointer-events: auto; width: 100%; max-width: 420px; border-radius: 20px;
  background: var(--verre); -webkit-backdrop-filter: var(--flou); backdrop-filter: var(--flou);
  box-shadow: var(--ombre-verre); color: var(--gris-700);
}
.entree { opacity: 0; transform: translateY(18px) scale(0.98); transition: opacity 0.45s var(--doux), transform 0.6s var(--doux); }
.entree.ouvert { opacity: 1; transform: none; }
.indice { display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; }
.indice-texte { display: block; min-width: 0; }
.indice-titre { display: block; font: 400 26px/1 var(--display); letter-spacing: 0.02em; color: var(--bleu); }
.indice-sous { display: block; margin-top: 3px; font: 400 12.5px/1.35 var(--texte); color: var(--gris-700); }

.arrivees { padding: 13px 16px 12px; }
.arr-haut { display: flex; align-items: center; justify-content: space-between; }
.micro { font: 700 9.5px/1 var(--texte); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gris-600); }
.arr-rang { color: var(--bleu); }
.arr-lieu { display: flex; align-items: baseline; gap: 10px; margin-top: 9px; white-space: nowrap; }
.arr-ville { flex: none; font: 400 27px/0.9 var(--display); letter-spacing: 0.02em; color: var(--bleu); }
.arr-pays { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 600 11px/1 var(--texte); color: var(--gris-600); }
.arr-compte { display: flex; align-items: baseline; height: 48px; margin-top: 4px; overflow: hidden; font: 400 52px/1 var(--display); color: var(--bleu); white-space: nowrap; }
.arr-compte .ch {
  display: inline-block; width: 0.43em; text-align: center;
  background: var(--degrade-bleu); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.arr-compte .ch.roule { animation: chiffre 0.5s var(--doux); }
@keyframes chiffre { from { transform: translateY(-0.3em); opacity: 0; } }
.arr-compte .sep { margin: 0 0.04em; color: var(--bleu-50); }
.arr-compte .unite { margin: 0 0.5em 0 0.1em; font: 800 12px/1 var(--texte); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bleu); }
.arr-compte .blanc { width: 0; }
.arr-compte .fete { background: var(--degrade-bleu); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
/* frise des cinq arrivées */
.frise { --avance: 0; position: relative; display: flex; justify-content: space-between; margin: 10px 0 0; padding: 0; list-style: none; }
.frise::before, .frise::after { content: ""; position: absolute; top: 10px; left: 10px; height: 1px; }
.frise::before { right: 10px; background: var(--bleu-30); }
.frise::after { width: calc((100% - 20px) * var(--avance)); height: 2px; margin-top: -0.5px; background: var(--bleu); transition: width 0.6s var(--doux); }
.frise li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.noeud { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--bleu-30); font: 800 8px/1 var(--texte); color: var(--bleu-50); }
.code { font: 700 8px/1 var(--texte); letter-spacing: 0.14em; color: var(--gris-600); }
.frise .passe .noeud { background: var(--bleu); box-shadow: none; color: #fff; }
.frise .prochaine .noeud { color: var(--bleu); box-shadow: 0 0 0 1.5px var(--bleu), 0 0 0 5px rgba(0,51,153,0.12); animation: pouls 1.8s ease-in-out infinite; }
.frise .prochaine .code { color: var(--bleu); }
@keyframes pouls { 50% { box-shadow: 0 0 0 1.5px var(--bleu), 0 0 0 8px rgba(0,51,153,0); } }

.bouton-rond {
  pointer-events: auto; position: relative; display: grid; place-items: center; align-content: center; gap: 5px;
  width: 76px; height: 76px; border: 0; border-radius: 50%;
  background: var(--verre); -webkit-backdrop-filter: var(--flou); backdrop-filter: var(--flou); box-shadow: var(--ombre-verre);
  color: var(--bleu); font: 700 8.5px/1 var(--texte); letter-spacing: 0.2em; text-transform: uppercase;
}
.bouton-rond::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6); }
.bouton-rond svg { width: 22px; height: 22px; fill: none; stroke: var(--bleu); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bouton-rond span { padding-left: 0.2em; }

.toast {
  position: absolute; left: 50%; top: calc(var(--haut) + 58px); height: auto; flex-direction: column; gap: 5px;
  padding: 12px 22px 11px; border-radius: 16px; text-align: center; white-space: nowrap;
  opacity: 0; transform: translate(-50%, -12px); transition: opacity 0.4s var(--doux), transform 0.55s var(--ressort);
}
.toast.ouvert { opacity: 1; transform: translate(-50%, 0); }
.toast strong { font: 400 25px/1 var(--display); letter-spacing: 0.02em; color: var(--bleu); }
.toast span { font: 600 11px/1.2 var(--texte); color: var(--gris-700); }

/* verrouillage sur la carte */
.verrou { position: fixed; inset: 0; z-index: 13; pointer-events: none; }
.verrou svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 6px rgba(120,165,255,0.85)); }
.verrou polygon { fill: rgba(255,255,255,0.1); stroke: rgba(255,255,255,0.95); stroke-width: 1.5; stroke-linejoin: round; opacity: 0; }
.verrou .coin { left: 0; top: 0; width: 26px; height: 26px; opacity: 0; will-change: transform, opacity; }
.v1 { border-left-width: 2.5px; border-top-width: 2.5px; border-top-left-radius: 7px; }
.v2 { border-right-width: 2.5px; border-top-width: 2.5px; border-top-right-radius: 7px; }
.v3 { border-right-width: 2.5px; border-bottom-width: 2.5px; border-bottom-right-radius: 7px; }
.v4 { border-left-width: 2.5px; border-bottom-width: 2.5px; border-bottom-left-radius: 7px; }

/* boutons de l'aperçu */
.commandes-apercu { position: fixed; left: 0; right: 0; bottom: 0; z-index: 13; display: flex; justify-content: center; gap: 10px; padding: 0 14px calc(var(--bas) + 14px); }
.bouton-principal.compact { flex: 1; width: auto; max-width: 260px; height: 56px; padding-left: 20px; letter-spacing: 0.2em; font-size: 12px; }
.bouton-principal.compact .fleche { width: 36px; height: 36px; }
.bouton-secondaire {
  display: inline-flex; align-items: center; gap: 9px; height: 56px; padding: 0 20px; border: 0; border-radius: 16px;
  background: var(--verre); -webkit-backdrop-filter: var(--flou); backdrop-filter: var(--flou); box-shadow: var(--ombre-verre);
  color: var(--bleu); font: 700 11.5px/1 var(--texte); letter-spacing: 0.2em; text-transform: uppercase;
}
.bouton-secondaire svg { width: 18px; height: 18px; fill: none; stroke: var(--bleu); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* mention exigée par la licence du moteur 8th Wall */
.mention-moteur {
  display: none; position: fixed; left: 0; right: 0; bottom: max(4px, calc(env(safe-area-inset-bottom) - 10px)); z-index: 14;
  margin: 0; padding: 0 12px; text-align: center; font: 400 8px/1.3 var(--texte); color: rgba(255,255,255,0.82);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6); pointer-events: auto;
}
.mention-moteur a { color: inherit; }
body.en-ar[data-moteur="8thwall"] .mention-8thwall { display: block; }

/* ---------------------------------------------------------------- outils d'essai (?essai=1 seulement) */
body:not(.essai) .choix-moteur, body:not(.essai) .badge-moteur, body:not(.essai) .diag-camera,
body:not(.essai) .bouton-essai-image, body:not(.essai) .etiquette-calibrage { display: none !important; }
.choix-moteur { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--bleu-15); text-align: center; }
.choix-moteur p { margin: 0 0 8px; font: 700 9.5px/1 var(--texte); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gris-600); }
.choix-boutons { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.bouton-essai { padding: 9px 12px; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--bleu-15); font: 600 12px/1 var(--texte); color: var(--bleu); text-decoration: none; }
html[data-moteur="zappar"] .choix-moteur { display: none !important; }
.badge-moteur { position: fixed; right: 12px; top: calc(var(--haut) + 50px); z-index: 16; display: flex; gap: 6px; align-items: center; font: 600 11px/1.2 var(--texte); color: #fff; }
.badge-moteur span { padding: 5px 8px; border-radius: 8px; background: rgba(0,51,153,0.8); }
.badge-moteur button { padding: 5px 8px; border: 0; border-radius: 8px; background: rgba(255,255,255,0.92); color: var(--bleu); font: inherit; }
.etiquette-calibrage { position: fixed; left: 12px; top: calc(var(--haut) + 50px); z-index: 15; padding: 4px 8px; border-radius: 6px; font: 12px/1.3 system-ui, sans-serif; color: #fff; background: rgba(0,51,153,0.75); pointer-events: none; }
.bouton-essai-image { position: fixed; right: 12px; top: calc(var(--haut) + 84px); z-index: 16; padding: 6px 10px; border: 0; border-radius: 8px; font: 12px/1 system-ui, sans-serif; color: #fff; background: rgba(0,51,153,0.8); }
.diag-camera { position: fixed; left: 12px; top: calc(var(--haut) + 52px); z-index: 15; max-width: 70vw; font: 10px/1.3 system-ui, sans-serif; color: rgba(255,255,255,0.9); text-shadow: 0 1px 2px rgba(0,0,0,0.65); pointer-events: none; }

/* ---------------------------------------------------------------- petits écrans, grands écrans, mouvement réduit */
@media (max-height: 740px) {
  .etapes { display: none; }
  .accueil-centre { padding: 18px 0 16px; }
  .millesime { font-size: clamp(130px, 46vw, 210px); }
}
@media (max-height: 620px) {
  .intro { display: none; }
  .cadre { width: min(70vw, 400px); }
}
@media (min-width: 720px) {
  .ecran-contenu { max-width: 520px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .balayage { display: none; }
}
