/* ═══════════════════════════════════════════════════════════════
   Liste d'attente : la cabine avant l'ouverture.
   Pensée d'abord pour le téléphone (visiteurs venus d'Instagram et TikTok).
═══════════════════════════════════════════════════════════════ */

.wl-body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

/* ── Haut de page ──────────────────────────────────────────── */
.wl-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-4) var(--gutter);
  border-bottom: var(--stroke) solid var(--line);
}
.wl-brand {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-display); font-size: 1.35rem; text-transform: uppercase;
}
.wl-top-tag { display: inline-flex; align-items: center; gap: var(--s-2); }
.wl-dot {
  width: 8px; height: 8px; background: var(--red); display: inline-block;
  animation: wl-blink 1.6s steps(2, start) infinite;
}
@keyframes wl-blink { to { visibility: hidden; } }

/* ── Héros ─────────────────────────────────────────────────── */
.wl-main { flex: 1; }
.wl-hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--s-7); align-items: center;
  padding: var(--s-7) var(--gutter);
  border-bottom: var(--stroke) solid var(--line);
}
.wl-title { font-size: clamp(3rem, 7vw, 5.6rem); line-height: 0.92; margin-bottom: var(--s-5); }
.wl-lead { font-size: 1.1rem; color: var(--ink-2); max-width: 44ch; margin-bottom: var(--s-6); }

/* ── Formulaire / ticket ───────────────────────────────────── */
.wl-card { padding: var(--s-5); max-width: 480px; }
.wl-card .input-custom { margin-bottom: var(--s-4); font-size: 1rem; }
.wl-check { margin-bottom: var(--s-4); }
.wl-card .btn-booth { justify-content: center; }
.wl-card .error-msg { margin-bottom: var(--s-3); }
.wl-count { margin: var(--s-4) 0 0; text-align: center; }
.wl-count strong { color: var(--red); }

.wl-ticket { display: flex; flex-direction: column; gap: var(--s-1); }
.wl-ticket.d-none { display: none !important; }
.wl-ticket-num { font-family: var(--font-mono); font-size: 2.4rem; letter-spacing: 0.08em; line-height: 1.1; }
.wl-done { margin: var(--s-4) 0; }

/* ── Visuel : la bande de tirages ──────────────────────────── */
.wl-visual { display: flex; justify-content: center; }
.wl-strip {
  width: min(230px, 100%);
  background: var(--print);
  border: var(--stroke) solid var(--line);
  padding: var(--s-3) var(--s-3) var(--s-4);
  display: grid; gap: var(--s-2);
  transform: rotate(3deg);
  box-shadow: 8px 8px 0 var(--red);
}
.wl-frame {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--s-3);
}
/* Petite scène dessinée au trait, comme la bande de l'accueil */
.wl-frame svg {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 78%; height: 82%;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0.55;
}
.wl-frame span, .wl-frame b { position: relative; z-index: 1; }
.wl-frame b { text-shadow: 0 0 6px var(--ink); }
.wl-frame--flash b { text-shadow: 0 0 6px var(--red); }
.wl-frame span { font-family: var(--font-mono); font-size: 0.75rem; opacity: 0.7; }
.wl-frame b { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.2rem; line-height: 1; }
.wl-frame--flash { background: var(--red); color: var(--on-red); }
.wl-strip-stamp { text-align: center; padding-top: var(--s-1); }

/* ── Étapes ────────────────────────────────────────────────── */
.wl-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: var(--stroke) solid var(--line);
}
.wl-step { padding: var(--s-6) var(--s-5); border-right: var(--stroke) solid var(--line); }
.wl-step:last-child { border-right: 0; }
.wl-step-n { font-family: var(--font-mono); color: var(--red); font-size: 0.85rem; }
.wl-step h2 { font-size: 1.4rem; margin: var(--s-2) 0; }
.wl-step p { color: var(--ink-2); margin: 0; font-size: 0.95rem; }

.wl-safe {
  display: flex; gap: var(--s-4); align-items: flex-start;
  padding: var(--s-6) var(--gutter);
}
.wl-safe .ico { width: 28px; height: 28px; color: var(--red); margin-top: 2px; }
.wl-safe p { margin: 0; max-width: 70ch; }

/* ── Pied de page ──────────────────────────────────────────── */
.wl-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  padding: var(--s-5) var(--gutter);
  border-top: var(--stroke) solid var(--line);
}
.wl-links { display: flex; gap: var(--s-4); flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-2); }

/* ── Choix de la langue ────────────────────────────────────── */
.wl-langs { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: 0.85rem; }
.wl-langs a { color: var(--ink-2); text-decoration: none; }
.wl-langs a:hover { color: var(--red); }
.wl-langs a.is-current { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ── Écriture de droite à gauche (arabe) ───────────────────── */
/* L'espacement entre les lettres casse les ligatures de l'arabe : on le retire partout. */
[dir="rtl"] body, [dir="rtl"] body * { letter-spacing: 0 !important; }
[dir="rtl"] .wl-title, [dir="rtl"] .wl-step h2, [dir="rtl"] .wl-frame b, [dir="rtl"] .btn-booth, [dir="rtl"] .btn-line {
  font-family: 'Segoe UI', Tahoma, 'Noto Sans Arabic', 'Geeza Pro', system-ui, sans-serif; font-weight: 800;
}
[dir="rtl"] .wl-title { line-height: 1.15; }
[dir="rtl"] .wl-arrow { transform: scaleX(-1); }
[dir="rtl"] .wl-step { border-right: 0; border-left: var(--stroke) solid var(--line); }
[dir="rtl"] .wl-step:last-child { border-left: 0; }
[dir="rtl"] .section-label::before { content: ''; }

/* ── Tablette ──────────────────────────────────────────────── */
@media (max-width: 991px) {
  .wl-hero { grid-template-columns: 1fr; gap: var(--s-6); padding-top: var(--s-6); }
  .wl-strip { width: 100%; max-width: 520px; grid-template-columns: repeat(4, minmax(0, 1fr)); transform: rotate(-1.5deg); box-shadow: 6px 6px 0 var(--red); }
  .wl-frame b { font-size: 0.85rem; }
  .wl-strip-stamp { grid-column: 1 / -1; }
  .wl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wl-step:nth-child(2) { border-right: 0; }
  [dir="rtl"] .wl-step:nth-child(2) { border-left: 0; }
  .wl-step:nth-child(-n+2) { border-bottom: var(--stroke) solid var(--line); }
}

/* ── Téléphone ─────────────────────────────────────────────── */
@media (max-width: 575px) {
  .wl-top, .wl-hero, .wl-safe, .wl-foot { padding-left: var(--s-4); padding-right: var(--s-4); }
  .wl-hero { padding-top: var(--s-5); padding-bottom: var(--s-6); gap: var(--s-5); }
  .wl-title { font-size: clamp(2.6rem, 14vw, 3.6rem); }
  .wl-lead { font-size: 1rem; margin-bottom: var(--s-5); }
  .wl-card { padding: var(--s-4); }
  .wl-frame { padding: var(--s-2); }
  .wl-frame span { display: none; }
  .wl-frame b { font-size: 0.68rem; }
  .wl-steps { grid-template-columns: 1fr; }
  .wl-step { border-right: 0; border-bottom: var(--stroke) solid var(--line); padding: var(--s-5) var(--s-4); }
  [dir="rtl"] .wl-step { border-left: 0; }
  .wl-step:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wl-dot { animation: none; }
}
