/* ============================================
   QRfly - JLS Studio
   Light mode (default) + Flux mode (data-flux="1")
   Thème : 1985 / flammes / cuivre / cyan électrique
   ============================================ */

:root {
  --bg: #fafaf9;
  --bg-soft: #f5f5f4;
  --bg-card: #ffffff;
  --bg-hover: #f1f1f0;

  --text: #0b0f1e;
  --text-dim: #475569;
  --text-faint: #94a3b8;
  --text-mute: #cbd5e1;

  --border: #e7e5e4;
  --border-strong: #d6d3d1;

  --accent: #ff7a18;          /* flammes */
  --accent-hover: #f25f00;
  --accent-soft: #fff1e3;
  --accent-text: #7c2d12;
  --accent-glow: rgba(255, 122, 24, 0.30);

  --copper: #c2410c;
  --amber: #fbbf24;
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.35);

  --red: #dc2626;
  --red-soft: #fee2e2;
  --warn: #b45309;
  --warn-soft: #fef3c7;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.10);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --font-display: 'Orbitron', 'Inter', sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
}

/* FLUX MODE - saut temporel */
body[data-flux="1"] {
  --bg: #050816;
  --bg-soft: #0a1024;
  --bg-card: #0e1530;
  --bg-hover: #131c40;

  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --text-faint: #64748b;
  --text-mute: #475569;

  --border: #1e293b;
  --border-strong: #334155;

  --accent: #ff8c42;
  --accent-hover: #ffa56a;
  --accent-soft: rgba(255, 122, 24, 0.15);
  --accent-text: #ffd4b3;
  --accent-glow: rgba(255, 122, 24, 0.55);

  --copper: #ea580c;
  --amber: #fcd34d;
  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.55);

  --shadow: 0 4px 24px rgba(255, 122, 24, 0.18);
  --shadow-lg: 0 16px 60px rgba(255, 122, 24, 0.28);
}

body[data-flux="1"] .hero-title,
body[data-flux="1"] .section-title,
body[data-flux="1"] .step-title,
body[data-flux="1"] .config-title,
body[data-flux="1"] .studio-title {
  text-shadow: 0 0 14px var(--accent-glow), 0 0 28px rgba(255, 122, 24, 0.15);
}

body[data-flux="1"] #flux-trails { display: block; }

body[data-flux="1"] .nav {
  background: rgba(5, 8, 22, 0.75);
  border-bottom-color: var(--border);
}

body[data-flux="1"] .footer {
  background: #02030a;
  border-top: 1px solid var(--border);
}

body[data-flux="1"] .btn-primary {
  background: var(--accent);
  color: #1a0c00;
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 0 30px var(--accent-glow);
}

body[data-flux="1"] .btn-primary:hover {
  box-shadow: 0 0 44px var(--accent-glow);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* L'attribut [hidden] doit toujours masquer, même quand on a aussi `display: flex`
   sur la même classe (modale, form-panes, warnings, etc.) - sinon tout s'affiche
   au chargement et la modale email cache le site. */
[hidden] { display: none !important; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Focus visible global - accessibilité clavier */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
button:focus-visible,
.btn:focus-visible,
.input:focus-visible {
  outline-offset: 2px;
}
.input:focus-visible {
  outline: none; /* déjà géré par border + box-shadow sur :focus */
}

/* Flux canvas (saut temporel) */
#flux-trails {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

body > * { position: relative; z-index: 1; }
#flux-trails { z-index: 0; }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  cursor: pointer;
  color: var(--text);
}

.brand-logo {
  color: var(--accent);
  display: inline-flex;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.brand-name { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em; }
.brand-name-fly {
  color: var(--accent);
  font-style: italic;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--text-dim);
}
.nav-links a:hover { color: var(--text); }
.nav-link-studio { color: var(--accent) !important; font-weight: 600; }

/* Speedo (saut temporel toggle) */
.speedo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-family: var(--font-display);
  color: var(--text);
  position: relative;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm), inset 0 0 0 3px var(--bg-card);
}
.speedo:hover { transform: scale(1.05); box-shadow: 0 0 24px var(--accent-glow), inset 0 0 0 3px var(--bg-card); }
.speedo-num { font-size: 18px; font-weight: 900; line-height: 1; }
.speedo-unit { font-size: 8px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.05em; }
body[data-flux="1"] .speedo { background: #1a0c00; color: var(--accent); border-color: var(--accent); box-shadow: 0 0 24px var(--accent-glow), inset 0 0 0 2px #2a1500; }
body[data-flux="1"] .speedo-unit { color: var(--amber); }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 24px 60px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-soft) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

body[data-flux="1"] .hero {
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(255, 122, 24, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(6, 182, 212, 0.18) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 122, 24, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 122, 24, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center;
  mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
  pointer-events: none;
}
body[data-flux="1"] .hero-grid {
  background-image:
    linear-gradient(rgba(255, 122, 24, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 122, 24, 0.18) 1px, transparent 1px);
}

.hero-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 50%);
  filter: blur(60px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 50px 20px 40px; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  box-shadow: var(--shadow-sm);
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 18px 0 18px;
}
.hero-title .hl { color: var(--accent); }
.hero-title .hl-strong {
  font-weight: 900;
  text-shadow: 0 0 24px var(--accent-glow), 0 0 6px var(--accent);
}

.hero-sub {
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 28px;
  max-width: 540px;
}
.hero-sub strong { color: var(--text); }

.hero-cta { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 18px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 6px 24px var(--accent-glow); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-sub { display: block; font-weight: 400; font-size: 12px; opacity: 0.85; margin-top: 2px; }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.dot { color: var(--text-mute); }

/* HERO VISUAL : frame DeLorean + QR live flottant */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 380px;
}
.hero-gif-wrap {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 16 / 11;
  border-radius: 18px;
  overflow: hidden;
  background: #0b0f1e;
  box-shadow:
    0 30px 70px rgba(255, 122, 24, 0.35),
    0 0 0 1px var(--border);
  isolation: isolate;
}
.hero-gif-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(255, 122, 24, 0.55) 0%, transparent 55%),
    linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
}
body[data-flux="1"] .hero-gif-wrap {
  box-shadow: 0 30px 90px rgba(255, 122, 24, 0.6), 0 0 0 1px var(--accent);
}
.hero-gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Badge coin haut-droit (REC style) */
.hero-gif-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 8px #ff3b30;
  animation: pulse 1.4s infinite;
}

/* Plaque OUTATIME (style plaque US années 80) */
.hero-gif-plate {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 5px 10px 4px;
  color: #1a0c00;
  background: linear-gradient(180deg, #fff 0%, #e8e8e8 100%);
  border: 1.5px solid #1a0c00;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.8);
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

/* Caption "Là où on va…" en bas */
.hero-gif-caption {
  position: absolute;
  bottom: 14px;
  left: 16px;
  z-index: 3;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

/* QR live flottant en bas droit */
.hero-qr-floater {
  position: absolute;
  bottom: -18px;
  right: -18px;
  z-index: 4;
  width: 120px;
  height: 120px;
  background: #fff;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 12px 36px rgba(255, 122, 24, 0.5), 0 0 0 3px #fff, 0 0 0 4px var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-4deg);
  transition: transform 0.3s ease;
}
.hero-qr-floater:hover { transform: rotate(0deg) scale(1.05); }
.hero-qr-floater canvas, .hero-qr-floater svg { max-width: 100%; max-height: 100%; }
body[data-flux="1"] .hero-qr-floater {
  box-shadow: 0 12px 40px rgba(255, 122, 24, 0.7), 0 0 0 3px #fff, 0 0 0 4px var(--accent);
}

.hero-qr-arrow {
  position: absolute;
  bottom: -36px;
  right: 110px;
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  transform: rotate(-6deg);
  white-space: nowrap;
}

@media (max-width: 880px) {
  .hero-gif-wrap { max-width: 380px; aspect-ratio: 4 / 3; }
  .hero-qr-floater { width: 96px; height: 96px; bottom: -12px; right: -12px; }
  .hero-qr-arrow { right: 90px; bottom: -28px; }
}
@media (max-width: 440px) {
  .hero-gif-wrap { aspect-ratio: 5 / 4; }
  .hero-gif-caption { font-size: 13px; }
  .hero-gif-plate { font-size: 9px; padding: 4px 8px 3px; }
}

.portal-trail {
  position: absolute;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 4px;
  opacity: 0.7;
  filter: blur(1px);
}
.portal-trail-1 { top: 30%; left: -40px; width: 100px; animation: trail 3s linear infinite; }
.portal-trail-2 { top: 60%; left: -30px; width: 80px; animation: trail 3s 0.8s linear infinite; }
.portal-trail-3 { top: 75%; left: -50px; width: 120px; animation: trail 3s 1.6s linear infinite; }
@keyframes trail {
  0% { transform: translateX(0); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translateX(400px); opacity: 0; }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 90px 24px;
  position: relative;
}
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-narrow { max-width: 780px; margin: 0 auto; }

.section-head { text-align: center; margin-bottom: 50px; }
.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-sub { font-size: 17px; color: var(--text-dim); }

@media (max-width: 720px) {
  .section { padding: 60px 18px; }
}

/* ============================================
   GENERATOR
   ============================================ */
.generator {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 980px) {
  .generator { grid-template-columns: 1fr; }
}

.gen-config { display: flex; flex-direction: column; gap: 24px; }

.config-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.config-head { margin-bottom: 18px; }
.config-step {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.config-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* TYPE GRID */
.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 540px) {
  .type-grid { grid-template-columns: repeat(2, 1fr); }
}
.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: all 0.15s ease;
}
.type-card:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.type-card.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.1);
}
.type-card.active .type-name { color: var(--accent-text); font-weight: 700; }
.type-icon { font-size: 24px; line-height: 1; }
.type-name { font-size: 13px; font-weight: 500; }
body[data-flux="1"] .type-card.active .type-name { color: var(--accent); }

/* FORM */
.form-pane { display: flex; flex-direction: column; gap: 14px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) { .form-grid { grid-template-columns: 1fr; } }

.ctrl { display: flex; flex-direction: column; gap: 6px; }
.ctrl-full { grid-column: 1 / -1; }
.ctrl-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}
.ctrl-hint {
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.5;
}

.input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  transition: all 0.15s ease;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { min-height: 84px; resize: vertical; font-family: inherit; }
select.input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'><path fill='%23475569' d='M7 10l5 5 5-5z'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 36px; }

.ctrl-check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.ctrl-check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* CONTROL ROWS (style block) */
.ctrl-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.ctrl-row:first-of-type { border-top: none; padding-top: 0; }

.palette-list { display: flex; gap: 8px; flex-wrap: wrap; }
.palette {
  display: inline-flex;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  background: transparent;
  padding: 2px;
  width: 50px;
  height: 32px;
  overflow: hidden;
  transition: transform 0.15s ease;
}
.palette span { flex: 1; display: block; border-radius: 4px; }
.palette span:first-child { margin-right: 2px; }
.palette:hover { transform: scale(1.05); }
.palette.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.ctrl-color { flex-direction: row; align-items: center; gap: 12px; flex: 1; }
.color-wrap { display: inline-flex; align-items: center; gap: 8px; }
.color-wrap input[type=color] {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 2px;
}
.input-hex { width: 110px; font-family: var(--font-mono); font-size: 13px; }

.chip-group { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 0.15s ease;
}
.chip:hover { background: var(--bg-hover); }
.chip.active { background: var(--text); color: var(--bg-card); border-color: var(--text); }
body[data-flux="1"] .chip.active { background: var(--accent); color: #1a0c00; border-color: var(--accent); }

.ctrl-range { flex-direction: column; align-items: stretch; }
.quality-val { font-family: var(--font-mono); color: var(--accent); font-weight: 700; margin-left: 6px; }
input[type=range] { -webkit-appearance: none; width: 100%; height: 6px; background: var(--bg-hover); border-radius: 3px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 0 4px var(--accent-soft); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: none; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 0 4px var(--accent-soft); }

/* LOGO */
.logo-row { display: flex; gap: 16px; align-items: center; }
.logo-preview {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1.5px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-empty { font-size: 10px; color: var(--text-faint); text-align: center; padding: 4px; font-family: var(--font-mono); }
.logo-actions { flex: 1; }

/* WARNINGS */
.warn {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--red-soft);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  color: #7f1d1d;
  font-size: 14px;
  line-height: 1.5;
}
.warn-soft { background: var(--warn-soft); border-color: #fde68a; color: var(--warn); }
.warn-icon { font-size: 18px; flex-shrink: 0; }
body[data-flux="1"] .warn { background: rgba(220, 38, 38, 0.15); border-color: rgba(220, 38, 38, 0.4); color: #fecaca; }
body[data-flux="1"] .warn-soft { background: rgba(180, 83, 9, 0.2); border-color: rgba(252, 211, 77, 0.4); color: var(--amber); }

/* ============================================
   PREVIEW
   ============================================ */
.preview-sticky { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 980px) { .preview-sticky { position: static; } }

.preview-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
}
.preview-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
}
.qr-host {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.qr-host canvas, .qr-host svg { max-width: 100%; max-height: 100%; display: block; }
.preview-meta {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

.export-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.export-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.export-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.btn-export {
  padding: 10px 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
}
.btn-pack {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding: 14px;
}
.btn-pdf { font-size: 14px; padding: 11px; }
.export-trust { font-size: 12px; color: var(--text-faint); line-height: 1.5; margin-top: 2px; }

.scan-tip {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--accent-soft);
  border: 1px solid #ffd4b3;
  border-radius: var(--radius-sm);
  color: var(--accent-text);
  font-size: 13px;
  line-height: 1.5;
}
body[data-flux="1"] .scan-tip { background: var(--accent-soft); border-color: rgba(255, 122, 24, 0.3); color: var(--accent); }
.scan-tip-icon { font-size: 22px; flex-shrink: 0; }

/* ============================================
   STEPS + WHY
   ============================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  transition: all 0.2s ease;
}
.step:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.step-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
  text-shadow: 0 0 16px var(--accent-glow);
}
.step-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step-body { color: var(--text-dim); font-size: 15px; line-height: 1.6; }

.why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 720px) { .why { grid-template-columns: 1fr; } }
.why-row {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.why-icon { font-size: 28px; flex-shrink: 0; }
.why-title { font-weight: 700; margin-bottom: 4px; }
.why-body { font-size: 14px; color: var(--text-dim); line-height: 1.55; }
.why-body a { color: var(--accent); text-decoration: underline; }

/* ============================================
   DOC BROWN QUOTE (transition vers la FAQ)
   ============================================ */
.doc-quote-section {
  background: #000;
  padding: 70px 24px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
}
.doc-quote-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(255, 122, 24, 0.18) 0%, transparent 70%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
}
.doc-quote-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.doc-quote-mark {
  font-family: var(--font-display);
  font-size: 90px;
  line-height: 0.6;
  color: var(--accent);
  margin-bottom: 8px;
  text-shadow: 0 0 24px var(--accent-glow);
}
.doc-quote-text {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.2vw, 30px);
  font-weight: 700;
  line-height: 1.35;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  font-style: italic;
  margin-bottom: 24px;
}
.doc-quote-hl {
  color: var(--accent);
  font-style: normal;
  white-space: nowrap;
  text-shadow: 0 0 16px var(--accent-glow);
}
.doc-quote-attr {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .doc-quote-section { padding: 50px 20px; }
  .doc-quote-mark { font-size: 64px; }
}

/* ============================================
   FAQ
   ============================================ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  padding: 0;
}
.faq-item summary {
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 50px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--accent);
  font-weight: 300;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-body { padding: 16px 22px 22px; color: var(--text-dim); font-size: 15px; line-height: 1.65; }
.faq-body p { margin-bottom: 12px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body ol { padding-left: 20px; margin: 8px 0; }
.faq-body a { color: var(--accent); text-decoration: underline; }
.faq-body strong { color: var(--text); }

/* ============================================
   SISTER TOOLS (autres outils JLS Studio)
   ============================================ */
.sister-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 880px) { .sister-grid { grid-template-columns: 1fr; } }

.sister-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}
.sister-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--copper));
  opacity: 0;
  transition: opacity 0.22s ease;
}
.sister-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.sister-card:hover::before { opacity: 1; }

.sister-theme {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.sister-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text);
}
.sister-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 20px;
  flex: 1;
}
.sister-desc strong { color: var(--text); }
.sister-inline {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.sister-inline:hover { color: var(--accent-hover); }

.sister-cta {
  display: inline-block;
  padding: 10px 16px;
  background: var(--accent-soft);
  color: var(--accent-text);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}
.sister-cta:hover {
  background: var(--accent);
  color: #fff;
  transform: translateX(3px);
}

.sister-current {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-card) 100%);
  border-color: var(--accent);
}
.sister-current::before { opacity: 1; }
.sister-current:hover { transform: none; }
.sister-cta-here {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  cursor: default;
}
.sister-cta-here:hover { background: transparent; color: var(--accent); transform: none; }

body[data-flux="1"] .sister-cta { color: var(--accent); }
body[data-flux="1"] .sister-cta:hover { color: #1a0c00; }

/* ============================================
   STUDIO BLOCK
   ============================================ */
.section-studio { padding-top: 0; }
.studio-card {
  background: linear-gradient(135deg, var(--accent) 0%, var(--copper) 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px var(--accent-glow);
}
.studio-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.studio-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  text-transform: uppercase;
  font-weight: 600;
  position: relative;
}
.studio-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  position: relative;
  letter-spacing: -0.01em;
}
.studio-body {
  font-size: 17px;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto 28px;
  opacity: 0.95;
  position: relative;
}
.studio-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.studio-card .btn-primary { background: #fff; color: var(--accent); border-color: #fff; }
.studio-card .btn-primary:hover { background: #fff; transform: translateY(-2px); }
.studio-card .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.studio-card .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 50px 24px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 14px;
}
.footer-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 14px;
}
.footer-meta { font-size: 13px; color: var(--text-faint); display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.footer-meta a { color: var(--text-dim); text-decoration: underline; }
.footer-suite { margin-top: 18px; font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }
.footer-suite a { color: var(--text-dim); text-decoration: underline; }

/* ============================================
   TOAST
   ============================================ */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  max-width: 340px;
}
.toast-err { border-left-color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================
   MODAL
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(11, 15, 30, 0.7); backdrop-filter: blur(6px); cursor: pointer; }
.modal-content {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: var(--text-faint);
  border-radius: 8px;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text); }
.modal-eyebrow { font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 6px; }
.modal-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.modal-sub { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin-bottom: 20px; }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-legal { font-size: 12px; color: var(--text-faint); line-height: 1.5; margin-top: 4px; }
.modal-legal a { color: var(--accent); text-decoration: underline; }
.ctrl-jls {
  background: var(--accent-soft);
  border: 1px solid #ffd4b3;
  padding: 12px;
  border-radius: var(--radius-sm);
  align-items: flex-start;
}
body[data-flux="1"] .ctrl-jls { background: var(--accent-soft); border-color: rgba(255, 122, 24, 0.3); }

.modal-success,
.modal-loading { text-align: center; padding: 20px 0 8px; }
.modal-success-icon { font-size: 48px; margin-bottom: 12px; }
.modal-success h3,
.modal-loading h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 10px; color: var(--accent); }
.modal-success p,
.modal-loading p { color: var(--text-dim); line-height: 1.55; }

.loader-ring {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
  box-shadow: 0 0 24px var(--accent-glow);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Lock badge sur le bouton SVG (mur email) */
.btn-export-lock {
  position: relative;
}
.btn-export-lock:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
body[data-flux="1"] .btn-export-lock:hover { color: var(--accent); }

/* Flux mode: invert modal */
body[data-flux="1"] .modal-content { background: var(--bg-card); border-color: var(--border-strong); }

/* ============================================
   UTILS
   ============================================ */
.muted { color: var(--text-faint); font-weight: 400; }
