/*
 * STORM PREDICT - DESIGN SYSTEM
 * SystÃ¨me de composants rÃ©utilisables pour toutes les pages
 * Excellence sinon rien. ðŸŒ©ï¸
 */

/* ============================================
   VARIABLES & TOKENS
   ============================================ */
:root {
  /* Palette chromatique - Descente dans l'orage */
  --color-sky-clear: #ffffff;
  --color-sky-light: #f8f9fa;
  --color-cloud-light: #e5e7eb;
  --color-cloud-medium: #d1d5db;
  --color-cloud-dark: #9ca3af;
  --color-storm-light: #6b7280;
  --color-storm-medium: #4b5563;
  --color-storm-dark: #374151;
  --color-storm-darker: #1f2937;
  --color-storm-night: #0f172a;

  /* Accent principal */
  --color-accent: #4169e1;
  --color-accent-hover: #3154c6;

  /* Textes adaptatifs */
  --text-light: #1f2937;
  --text-medium: #4b5563;
  --text-dark: #f9fafb;
  --text-muted-light: #6b7280;
  --text-muted-dark: #9ca3af;

  /* Typographie */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;
  --font-display: "Inter", sans-serif;

  /* Espacements */
  --space-xs: 0.5rem; /* 8px */
  --space-sm: 1rem; /* 16px */
  --space-md: 1.5rem; /* 24px */
  --space-lg: 2rem; /* 32px */
  --space-xl: 3rem; /* 48px */
  --space-2xl: 4rem; /* 64px */
  --space-3xl: 6rem; /* 96px */

  /* Conteneur */
  --container-width: 1200px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Ombres */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-light);
  min-height: 100vh;
}

/* Gradient vertical - Descente dans l'orage */
.storm-descent {
  background: linear-gradient(
    to bottom,
    var(--color-sky-clear) 0%,
    var(--color-sky-light) 15%,
    var(--color-cloud-light) 35%,
    var(--color-cloud-medium) 50%,
    var(--color-cloud-dark) 65%,
    var(--color-storm-light) 75%,
    var(--color-storm-medium) 85%,
    var(--color-storm-dark) 92%,
    var(--color-storm-darker) 97%,
    var(--color-storm-night) 100%
  );
  min-height: 400vh;
}

/* ============================================
   NAVIGATION
   ============================================ */
.storm-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all var(--transition-base);
}

.storm-nav.dark-mode {
  background: rgba(15, 23, 42, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: color var(--transition-base);
}

.dark-mode .nav-logo {
  color: var(--text-dark);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
  align-items: center;
}

.nav-links a {
  color: var(--text-medium);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color var(--transition-base);
}

.nav-links a:hover {
  color: var(--text-light);
}

.dark-mode .nav-links a {
  color: var(--text-muted-dark);
}

.dark-mode .nav-links a:hover {
  color: var(--text-dark);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-storm {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(248, 249, 250, 0.7) 50%,
    rgba(229, 231, 235, 0.8) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  padding: 0 var(--space-lg);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  color: var(--text-light);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--text-medium);
  margin-bottom: var(--space-2xl);
  font-weight: 400;
  line-height: 1.5;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  position: relative;
  padding: var(--space-3xl) 0;
}

.section-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  color: var(--text-light);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: var(--space-2xl);
  /*max-width: 700px;*/
}

.text-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Zones de transition */
.light-zone .section-title,
.light-zone .section-subtitle {
  color: var(--text-light);
}

.mid-zone .section-title {
  color: var(--text-light);
}

.mid-zone .section-subtitle {
  color: var(--text-medium);
}

.dark-zone .section-title {
  color: var(--text-dark);
}

.dark-zone .section-subtitle {
  color: var(--text-muted-dark);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.dark-zone .card {
  background: rgba(31, 41, 55, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 0.75rem;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

.btn-secondary:hover {
  background: var(--text-light);
  color: white;
}

.dark-zone .btn-secondary {
  color: var(--text-dark);
  border-color: var(--text-dark);
}

.dark-zone .btn-secondary:hover {
  background: var(--text-dark);
  color: var(--text-light);
}

/* ============================================
   GRID SYSTEMS
   ============================================ */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ============================================
   FOOTER ORAGEUX
   ============================================ */
.footer-storm {
  position: relative;
  background: var(--color-storm-night);
  padding: var(--space-3xl) 0;
  overflow: hidden;
}

.footer-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.footer-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
}

.footer-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted-dark);
  margin-bottom: var(--space-2xl);
  line-height: 1.6;
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}
.mb-xl {
  margin-bottom: var(--space-xl);
}
.mt-2xl {
  margin-top: var(--space-2xl);
}
.mb-2xl {
  margin-bottom: var(--space-2xl);
}
.mt-3xl {
  margin-top: var(--space-3xl);
}
.mb-3xl {
  margin-bottom: var(--space-3xl);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .grid {
    gap: var(--space-md);
  }
}

/* ============================================
   FOCUS & ACCESSIBILITY
   ============================================ */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

/* PrÃ©fÃ©rence de mouvement rÃ©duit */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   QUIZ PAGE STYLES
   ============================================ */

/* Full screen hero sans scroll */
body.quiz-page,
html.quiz-page {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

.fullscreen-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(15, 23, 42, 0.75) 50%,
    rgba(30, 41, 59, 0.85) 100%
  );
  z-index: 1;
}

/* Navigation compacte */
.nav-compact {
  position: relative;
  z-index: 10;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.nav-logo-compact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.nav-logo-compact img {
  width: 40px;
  height: 40px;
}

.nav-links-compact {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links-compact a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links-compact a:hover,
.nav-links-compact a.active {
  color: white;
}

/* Zone centrale quiz */
.quiz-central {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.quiz-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 1.5rem;
  padding: 2.5rem;
  max-width: 700px;
  width: 100%;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Footer compact */
.footer-compact {
  position: relative;
  z-index: 10;
  padding: 1rem 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.footer-compact a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  margin: 0 1rem;
}

.footer-compact a:hover {
  color: white;
}

/* Responsive pour Quiz */
@media (max-width: 768px) {
  .nav-links-compact {
    gap: 1rem;
    font-size: 0.85rem;
  }

  .quiz-card {
    padding: 1.5rem;
    margin: 1rem;
  }

  .footer-compact {
    font-size: 0.75rem;
  }

  .footer-compact a {
    margin: 0 0.5rem;
  }
}

/* Ajustements pour les écrans très petits */
@media (max-height: 700px) {
  .nav-compact {
    padding: 0.75rem 1.5rem;
  }

  .quiz-card {
    padding: 1.5rem;
  }

  .footer-compact {
    padding: 0.75rem 1.5rem;
  }
}
