/* ============================================================
   BASE RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body, sans-serif);
  font-size: var(--text-sm);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow: hidden;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }

/* Smooth crossfade for ALL themed elements when universe changes */
body, #app,
.screen, .screen-inner, .screen-container,
.quiz-header, .header-back, .progress-label, .progress-fill, .progress-bar,
.welcome-headline, .welcome-subtitle, .welcome-badge,
.universe-card, .universe-card .card-title, .universe-card .card-desc,
.question-label, .question-title, .question-subtitle,
.answer-card, .budget-card, .style-card, .vision-card,
.btn, .btn-primary, .btn-secondary, .btn-ghost,
.card-label, .card-sublabel, .card-icon-sm,
.lead-form, .lead-title, .lead-subtitle, .lead-trust,
.form-field label, .form-field input, .form-checkbox,
.result-badge, .result-headline, .result-subtitle,
.pack-card, .pack-header, .pack-body, .pack-name, .pack-config, .pack-desc, .pack-price,
.profile-tag, .option-card, .passion-badge {
  transition: background-color 0.6s ease,
              color 0.6s ease,
              border-color 0.6s ease,
              box-shadow 0.6s ease;
}
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection {
  background: var(--color-primary-highlight);
  color: var(--color-text);
}
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* ============================================================
   DESIGN TOKENS — AVCP DARK CINEMA THEME
   ============================================================ */
:root, [data-theme="dark"] {
  --font-display: 'Roboto', 'Helvetica Neue', sans-serif;
  --font-body: 'Roboto', 'Helvetica Neue', sans-serif;

  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-enter: 350ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-exit: 200ms cubic-bezier(0.4, 0, 1, 1);

  --content-narrow: 640px;
  --content-default: 720px;

  /* Default = Cinéma Privé (noir + doré) */
  --color-bg:             #000000;
  --color-surface:        #111111;
  --color-surface-2:      #1A1A1A;
  --color-surface-offset: #0A0A0A;
  --color-divider:        #1f2937;
  --color-border:         #1f2937;

  --color-text:           #ffffff;
  --color-text-muted:     #9ca3af;
  --color-text-faint:     #6b7280;
  --color-text-inverse:   #000000;

  --color-primary:        #d4a853;
  --color-primary-hover:  #e0b965;
  --color-primary-active: #c49840;
  --color-primary-highlight: rgba(212,168,83,0.1);

  --color-error:          #D4564E;
  --color-success:        #5BA861;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
  --shadow-gold: 0 4px 24px rgba(212,168,83,0.15);

  /* Crossfade transition on ALL themed properties */
  --theme-transition: 0.6s ease;
}

/* === UNIVERSE THEMES — crossfade via data attribute === */

/* Pièce de Vie : blanc + bleu */
[data-universe="piece_de_vie"] {
  --color-bg:             #ffffff;
  --color-surface:        #f3f4f6;
  --color-surface-2:      #e5e7eb;
  --color-surface-offset: #f9fafb;
  --color-divider:        #e5e7eb;
  --color-border:         #d1d5db;

  --color-text:           #111827;
  --color-text-muted:     #374151;
  --color-text-faint:     #6b7280;
  --color-text-inverse:   #ffffff;

  --color-primary:        #3b82f6;
  --color-primary-hover:  #2563eb;
  --color-primary-active: #1d4ed8;
  --color-primary-highlight: rgba(59,130,246,0.08);

  --shadow-gold: 0 4px 24px rgba(59,130,246,0.12);
}

/* Cinéma Privé : noir + doré (explicite, identique à :root) */
[data-universe="cinema_prive"] {
  --color-bg:             #000000;
  --color-surface:        #111111;
  --color-surface-2:      #1A1A1A;
  --color-surface-offset: #0A0A0A;
  --color-divider:        #1f2937;
  --color-border:         #1f2937;

  --color-text:           #ffffff;
  --color-text-muted:     #9ca3af;
  --color-text-faint:     #6b7280;
  --color-text-inverse:   #000000;

  --color-primary:        #d4a853;
  --color-primary-hover:  #e0b965;
  --color-primary-active: #c49840;
  --color-primary-highlight: rgba(212,168,83,0.1);

  --shadow-gold: 0 4px 24px rgba(212,168,83,0.15);
}

/* Média Room : beige chaud + or chaud */
[data-universe="media_room"] {
  --color-bg:             #f5f5f4;
  --color-surface:        #e7e5e4;
  --color-surface-2:      #d6d3d1;
  --color-surface-offset: #fafaf9;
  --color-divider:        #d6d3d1;
  --color-border:         #a8a29e;

  --color-text:           #1c1917;
  --color-text-muted:     #57534e;
  --color-text-faint:     #78716c;
  --color-text-inverse:   #f5f5f4;

  --color-primary:        #c9a86c;
  --color-primary-hover:  #b8944f;
  --color-primary-active: #a07d3a;
  --color-primary-highlight: rgba(201,168,108,0.1);

  --shadow-gold: 0 4px 24px rgba(201,168,108,0.15);
}