/* =================================================================
   Martin BTC — Le Lab nº 3 : « 0 franc », le Swiss Bitcoin Tour
   (page /lab-suisse). Chargée après css/style.css et css/lab.css dont
   elle reprend les variables, les classes .lab-top, .pin, .acte--hero.
   Pas de backdrop-filter : il fait de l'en-tête le bloc conteneur des
   éléments fixed et coûte cher sur téléphone.
   ================================================================= */

body.suisse { background: var(--bg); }

/* ---------- Acte 1 : héros ---------- */
.sx-hero { position: relative; overflow: hidden; }
.sx-hero-carte { position: absolute; top: 50%; right: -8vw; width: min(78vw, 1100px); aspect-ratio: 1000 / 671; transform: translateY(-46%);
  opacity: 0.62; pointer-events: none;
  -webkit-mask-image: radial-gradient(70% 70% at 55% 50%, #000 40%, transparent 100%);
          mask-image: radial-gradient(70% 70% at 55% 50%, #000 40%, transparent 100%); }
.sx-hero .container { position: relative; }
.sx-hero h1 { font-size: clamp(3.4rem, 11vw, 9rem); }
.sx-zero { color: var(--orange); }
.sx-question { margin: 2rem 0 0; padding: 0.3rem 0 0.3rem 1.15rem; border-left: 2px solid var(--orange); max-width: 34rem; }
.sx-question blockquote { margin: 0; }
.sx-question blockquote p { font-family: var(--font-display); font-size: clamp(1.15rem, 2.1vw, 1.45rem); line-height: 1.35; color: var(--text); min-height: 2.7em; }
.sx-question figcaption { margin-top: 0.55rem; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; color: var(--muted-2); }
.sx-question figcaption a { color: var(--orange-2); text-decoration: none; }
.sx-curseur { display: inline-block; width: 0.55em; height: 1.05em; margin-left: 2px; vertical-align: -0.12em; background: var(--orange); animation: sx-clignote 1s steps(1) infinite; }
@keyframes sx-clignote { 50% { opacity: 0; } }

/* ---------- Acte 2 : la scène collée ---------- */
.sx-tour { position: relative; }
.sx-scene { background: var(--bg); }
.sx-carte { position: absolute; inset: 0; }
.sx-carte svg { width: 100%; height: 100%; display: block; }
.sx-scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(120% 90% at 42% 50%, transparent 55%, rgba(11,11,13,0.85) 100%),
              linear-gradient(to bottom, rgba(11,11,13,0.75), transparent 22%, transparent 70%, rgba(11,11,13,0.8)); }

.sx-arret-nom { font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; fill: var(--text);
  paint-order: stroke; stroke: #0B0B0D; stroke-linejoin: round; }

/* Tableau de bord */
.sx-bord { position: absolute; z-index: 3; top: clamp(5rem, 11vh, 6.2rem); left: clamp(1rem, 3vw, 2rem); right: calc(300px + clamp(1rem, 3vw, 2rem) * 2);
  display: flex; flex-wrap: nowrap; gap: 0.5rem; max-width: 46rem; }
.sx-cellule { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0.1rem; flex: 1 1 0; min-width: 0; padding: 0.55rem 0.8rem 0.6rem;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(15,16,20,0.86); }
.sx-k { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-2); }
.sx-cellule b { font-family: var(--font-display); font-size: 1.32rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1.15; transition: opacity 0.4s; }
.sx-cellule b.ancien { opacity: 0.42; }
.sx-cellule small { font-family: var(--font-mono); font-size: 0.64rem; line-height: 1.25; color: var(--muted-2); letter-spacing: 0.02em; }
@media (max-width: 1180px) { .sx-cellule { padding: 0.5rem 0.6rem 0.55rem; } .sx-cellule b { font-size: 1.12rem; } .sx-k { letter-spacing: 0.12em; } }
.sx-cellule--jour b { color: var(--orange); }
.sx-jauge { display: block; width: 100%; height: 5px; margin-top: 0.25rem; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.sx-jauge i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange-deep), var(--orange-2)); transition: width 0.6s var(--ease), opacity 0.4s; }
.sx-cellule--francs b { color: var(--orange-2); }
/* Batterie : en charge, la jauge respire ; un relevé dit dans la vidéo passe en blanc franc */
.sx-cellule--batt.en-charge .sx-jauge i { animation: sx-charge 1.1s ease-in-out infinite; }
.sx-cellule--batt.en-charge small { color: var(--orange-2); }
.sx-cellule--batt.reel small { color: var(--text); }
@keyframes sx-charge { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .sx-cellule--batt.en-charge .sx-jauge i { animation: none; } }

/* Carte de l'étape */
.sx-etape { position: absolute; z-index: 3; left: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vh, 1.8rem); width: min(31rem, calc(100% - 300px - clamp(1rem, 3vw, 2rem) * 3));
  padding: 1.05rem 1.25rem 1.1rem; border: 1px solid var(--line-2); border-radius: var(--radius); background: rgba(11,11,13,0.9); box-shadow: var(--shadow); }
.sx-etape.change { animation: sx-carte-entre 0.55s var(--ease); }
@keyframes sx-carte-entre { from { opacity: 0; transform: translateY(14px); } }
.sx-etape-kicker { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); }
.sx-etape h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); letter-spacing: -0.03em; margin-top: 0.35rem; }
.sx-etape-lieu { color: var(--muted); font-size: 0.92rem; margin-top: 0.15rem; }
.sx-etape-citation { margin: 0.75rem 0 0; padding-left: 0.85rem; border-left: 2px solid var(--orange-line); }
.sx-etape-citation p { color: var(--text); font-size: 1rem; line-height: 1.45; }
.sx-etape-citation cite { display: block; margin-top: 0.3rem; font-style: normal; font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted-2); letter-spacing: 0.06em; }
.sx-etape-citation cite:empty { display: none; }
.sx-etape-lien { display: inline-block; margin-top: 0.75rem; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.06em; color: var(--orange-2); text-decoration: none; }
.sx-etape-lien:hover, .sx-etape-lien:focus-visible { text-decoration: underline; }

/* La caisse : le ticket sort de la fente, en bas, et monte */
.sx-caisse { position: absolute; z-index: 3; top: clamp(5rem, 11vh, 6.2rem); bottom: clamp(1rem, 3vh, 1.8rem); right: clamp(1rem, 3vw, 2rem); width: 300px;
  display: flex; flex-direction: column; }
.sx-ticket-zone { position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; align-items: flex-end; padding: 0 10px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%); mask-image: linear-gradient(to bottom, transparent 0, #000 18%); }
.sx-ticket { position: relative; width: 100%; padding: 1.1rem 1rem 0.5rem; color: #1B1C20; background: #F4F1EA;
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.4; box-shadow: 0 -10px 40px -18px rgba(0,0,0,0.9);
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.018) 0 1px, transparent 1px 3px); }
.sx-ticket-tete { display: grid; justify-items: center; gap: 0.05rem; text-align: center; padding-bottom: 0.35rem; }
.sx-ticket-tete b { font-size: 0.92rem; letter-spacing: 0.16em; }
.sx-ticket-tete span { font-size: 0.66rem; letter-spacing: 0.08em; color: #55575E; text-transform: uppercase; }
.sx-tirets { width: 100%; height: 0; margin-top: 0.45rem; border-top: 1px dashed rgba(0,0,0,0.35); }
.sx-lignes { list-style: none; margin: 0; padding: 0; }
.sx-ligne { overflow: hidden; }
.sx-ligne-in { display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 0.6rem; padding: 0.5rem 0; border-bottom: 1px dashed rgba(0,0,0,0.22); }
.sx-ligne a { color: inherit; text-decoration: none; }
.sx-lib { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.sx-det { grid-column: 1; font-size: 0.66rem; color: #5E6067; }
.sx-statut { grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; }
.sx-paye { font-weight: 700; letter-spacing: 0.08em; }
.sx-paye::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 0.35rem; border-radius: 50%; background: var(--orange); vertical-align: 0.05em; }
.sx-sats { display: block; font-size: 0.62rem; color: #8A8C92; letter-spacing: 0.04em; }
.sx-tampon { display: inline-block; padding: 0.05rem 0.35rem; border: 1.5px solid currentColor; border-radius: 3px; transform: rotate(-5deg);
  font-weight: 700; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; }
.sx-tampon--refus { color: #B4462A; }
.sx-tampon--essai { color: #77797F; transform: rotate(3deg); }
.sx-tampon--offert { color: #C26A00; transform: rotate(-3deg); }
.sx-note { grid-column: 1 / -1; font-size: 0.66rem; color: #B4462A; }
.sx-note--info { color: #6E7077; }
.sx-articles { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.6rem; margin: 0.25rem 0 0; padding: 0; list-style: none; font-size: 0.64rem; color: #5E6067; }
.sx-articles li::before { content: "· "; }
.sx-temps { font-size: 0.6rem; color: #8A8C92; }
.sx-fente { position: relative; height: 30px; border-radius: 9px; border: 1px solid var(--line-2); background: linear-gradient(#17191F, #0E0F13);
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2);
  transition: box-shadow 0.9s var(--ease), color 0.9s; }
.sx-fente::before { content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 3px; border-radius: 2px; background: #000; }
.sx-fente.flash { box-shadow: 0 0 0 1px var(--orange), 0 0 28px rgba(247,147,26,0.55); color: var(--orange-2); transition-duration: 0.08s; }

/* Surcouches (statue, nuit) */
.sx-surcouche { position: absolute; inset: 0; z-index: 4; opacity: 0; visibility: hidden; transition: opacity 0.45s var(--ease), visibility 0s 0.45s; }
.sx-surcouche.on { opacity: 1; visibility: visible; transition: opacity 0.45s var(--ease), visibility 0s; }
.sx-surcouche canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.sx-statue { background: radial-gradient(70% 80% at 32% 55%, #1E1A14 0%, #0B0B0D 70%); }
.sx-statue-texte { position: absolute; right: clamp(1.2rem, 6vw, 6rem); top: 50%; transform: translateY(-50%); width: min(30rem, 42vw); }
.sx-statue-texte h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); letter-spacing: -0.035em; margin: 0.8rem 0 0.9rem; }
.sx-statue-texte p { color: var(--muted); }
.sx-statue-texte p strong { color: var(--text); }
.sx-petit { margin-top: 0.9rem; font-size: 0.82rem; color: var(--muted-2) !important; }
.sx-consigne { margin-top: 1.4rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange) !important; }

.sx-nuit { background: linear-gradient(to bottom, #03050B 0%, #070B17 60%, #0B0B0D 100%); }
.sx-nuit-texte { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); width: min(44rem, calc(100% - 2.4rem)); text-align: center; }
.sx-nuit-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.4rem; }
.sx-nuit-chiffres b { display: block; font-size: clamp(2.2rem, 5.4vw, 4.2rem); color: var(--text); margin-top: 0.3rem; }
.sx-nuit-chiffres div:first-child b { color: var(--orange-2); }
.sx-nuit-heure { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.sx-nuit blockquote { margin: 1.4rem auto 0; max-width: 32rem; }
.sx-nuit blockquote p { font-family: var(--font-display); font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--text); }

/* ---------- Acte 3 : la fin ---------- */
.sx-fin { padding: clamp(6rem, 16vh, 10rem) 0 clamp(7rem, 18vh, 11rem); }
.sx-fin-titre { font-size: clamp(2.1rem, 5.2vw, 4.2rem); letter-spacing: -0.04em; line-height: 1.02; margin: 1rem 0 1.2rem; }
.sx-fin-titre .lab-num { color: var(--orange); }
.sx-gris { color: var(--muted-2); }
.sx-fin .lead strong { color: var(--text); }
.sx-bilan { display: flex; flex-wrap: wrap; gap: 1rem 2.6rem; margin: 2rem 0 1rem; }
.sx-bilan b { display: block; font-size: clamp(2rem, 4.4vw, 3.2rem); color: var(--text); }
.sx-bilan div:first-child b { color: var(--orange-2); }
.sx-bilan span:not([id]) { display: block; margin-top: 0.35rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.sx-bilan [hidden] { display: none; }
.sx-fin .lab-note a { color: var(--orange-2); }
.sx-question--fin { margin-top: 2.2rem; }
.sx-fin-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2.4rem; }

/* ---------- Téléphone ---------- */
@media (max-width: 820px) {
  .sx-hero-carte { right: -30vw; width: 140vw; opacity: 0.35; top: 62%; }
  .sx-bord { right: clamp(1rem, 3vw, 2rem); top: 4.6rem; gap: 0.35rem; }
  .sx-cellule { min-width: 0; flex: 1 1 0; padding: 0.4rem 0.5rem 0.45rem; border-radius: 10px; }
  .sx-cellule b { font-size: 1.02rem; }
  .sx-k { font-size: 0.56rem; letter-spacing: 0.12em; }
  .sx-cellule small { display: none; }
  .sx-cellule--francs, .sx-cellule--dehors { display: none; }
  .sx-caisse { top: 9.4rem; bottom: auto; height: 26svh; width: 46vw; right: 0.8rem; }
  .sx-ticket { font-size: 0.6rem; padding: 0.7rem 0.6rem 0.3rem; }
  .sx-ticket-tete b { font-size: 0.66rem; letter-spacing: 0.1em; }
  .sx-ticket-tete span:not(.sx-tirets) { display: none; }
  .sx-articles { grid-template-columns: 1fr; }
  .sx-fente { height: 24px; font-size: 0.54rem; }
  .sx-etape { left: 0.8rem; right: 0.8rem; width: auto; bottom: 0.8rem; padding: 0.85rem 1rem 0.9rem; }
  .sx-etape h2 { font-size: 1.25rem; }
  .sx-etape-citation p { font-size: 0.9rem; }
  .sx-statue-texte { left: 1.2rem; right: 1.2rem; width: auto; top: auto; bottom: 1.4rem; transform: none; }
  .sx-statue-texte h2 { font-size: 1.6rem; margin: 0.5rem 0; }
  .sx-statue-texte p { font-size: 0.9rem; }
  .sx-petit { display: none; }
  .sx-nuit-texte { top: 13%; }
}

@media (prefers-reduced-motion: reduce) {
  .sx-etape.change { animation: none; }
  .sx-curseur { animation: none; }
}

/* Sous 360 px, quatre éléments dans l'en-tête pousseraient « Quitter » hors de l'écran :
   le lien vers le Lab nº 1 reste en fin de page et dans le pied de page. */
@media (max-width: 359px) { .lab-top .lab-btn[href="lab"] { display: none; } }
