:root {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

:focus-visible {
  outline: 3px solid #00a6c2;
  outline-offset: 3px;
}

.mobile-bottom-nav {
  display: none;
}

[data-theme="dark"] body {
  background: radial-gradient(circle at top, #2a1725 0%, #171018 48%, #110c12 100%) fixed !important;
  color: #f3eaf1 !important;
}

[data-theme="dark"] .navbar,
[data-theme="dark"] nav.navbar {
  background: rgba(22, 15, 24, 0.94) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .nav-right,
[data-theme="dark"] .navbar a:not(.btn-nav),
[data-theme="dark"] .logo-text {
  color: #f8edf5 !important;
}

[data-theme="dark"] .nav-right {
  background-color: rgba(22, 15, 24, 0.98) !important;
}

[data-theme="dark"] .feature,
[data-theme="dark"] .trust-card,
[data-theme="dark"] .team-member,
[data-theme="dark"] .rating-card,
[data-theme="dark"] .download-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .form-wrapper,
[data-theme="dark"] .popup-content,
[data-theme="dark"] .step-card,
[data-theme="dark"] .privacy-card,
[data-theme="dark"] .question-card,
[data-theme="dark"] .card {
  background: #241a27 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24) !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] .hero h1,
[data-theme="dark"] .faq-item summary,
[data-theme="dark"] .sentence,
[data-theme="dark"] .french-word,
[data-theme="dark"] .french-verb {
  color: #fff7fc !important;
}

[data-theme="dark"] p,
[data-theme="dark"] .subtitle,
[data-theme="dark"] .score,
[data-theme="dark"] label,
[data-theme="dark"] .correction,
[data-theme="dark"] .section-subtitle {
  color: #cdbdca !important;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #19121b !important;
  border-color: #4b374e !important;
  color: #fff7fc !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #8f7d8d !important;
}

[data-theme="dark"] .section-tag,
[data-theme="dark"] .label-badge,
[data-theme="dark"] .version-tag {
  background: rgba(229, 5, 133, 0.14) !important;
  color: #ff72bc !important;
}

[data-theme="dark"] .heading-icon {
  color: #55d1e5 !important;
}

[data-theme="dark"] .feature-icon,
[data-theme="dark"] .trust-icon {
  background: rgba(255, 114, 188, 0.1) !important;
  color: #ff72bc !important;
}

[data-theme="dark"] .feature:nth-child(even) .feature-icon,
[data-theme="dark"] .trust-card:nth-child(even) .trust-icon {
  background: rgba(85, 209, 229, 0.1) !important;
  color: #55d1e5 !important;
}

[data-theme="dark"] .rating-card:first-child .rating-icon { color: #f4c95d; }
[data-theme="dark"] .rating-card:last-child .rating-icon { color: #55d1e5; }

[data-theme="dark"] .grid .card:nth-child(3n + 1) .icon { color: #ff72bc !important; }
[data-theme="dark"] .grid .card:nth-child(3n + 2) .icon { color: #55d1e5 !important; }
[data-theme="dark"] .grid .card:nth-child(3n) .icon { color: #f4c95d !important; }

[data-theme="dark"] .training-index .heading-icon,
[data-theme="dark"] .training-index .grid .card .icon {
  color: #ff72bc !important;
}

[data-theme="dark"] .result.correct,
[data-theme="dark"] .correctBox {
  background: rgba(16, 185, 129, 0.13) !important;
  color: #6ee7b7 !important;
}

[data-theme="dark"] .result.incorrect,
[data-theme="dark"] .incorrectBox {
  background: rgba(239, 68, 68, 0.13) !important;
  color: #fca5a5 !important;
}

[data-theme="dark"] .btn-primary .lucide,
[data-theme="dark"] .btn-download .lucide,
[data-theme="dark"] button .lucide {
  color: currentColor;
}

[data-theme="dark"] .blob {
  opacity: 0.14;
}

[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(29, 20, 31, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .mobile-bottom-nav a {
  color: #dfcedc;
}

[data-theme="dark"] .mobile-bottom-nav a:last-child {
  color: #ff72bc;
}

@media (max-width: 700px) {
  body {
    padding-bottom: 78px !important;
  }

  .navbar,
  nav.navbar {
    position: relative !important;
    top: auto !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 900;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    min-height: 62px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    padding: 7px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(29, 7, 32, 0.08);
    border-radius: 20px;
    box-shadow: 0 12px 38px rgba(29, 7, 32, 0.18);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav a {
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 14px;
    color: #503a51;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
  }

  .mobile-bottom-nav a:last-child {
    background: rgba(229, 5, 133, 0.09);
    color: #e50585;
  }

  .mobile-bottom-nav .lucide {
    width: 19px;
    height: 19px;
  }

  .mobile-bottom-nav a:first-child .lucide { color: #e50585; }
  .mobile-bottom-nav a:nth-child(2) .lucide { color: #007f95; }
  .mobile-bottom-nav a:last-child .lucide { color: currentColor; }

  .trust-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
