/* ==========================================================================
   QuizQuest — Landing page styles
   Préfixe : ld-  (aucun conflit avec qq-tokens.css)
   Chargé APRÈS qq-tokens.css (qui fournit toutes les variables)
   ========================================================================== */

/* --------------------------------------------------------------------------
   RESET LANDING — complète le reset minimal de qq-tokens.css
   -------------------------------------------------------------------------- */

p, ul, li, figure {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   LAYOUT UTILITAIRES LANDING
   -------------------------------------------------------------------------- */

.ld-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 900px) {
  .ld-container {
    padding-inline: var(--space-10);
  }
}

/* --------------------------------------------------------------------------
   NAV — barre sticky haut
   -------------------------------------------------------------------------- */

.ld-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 11, 26, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(199, 189, 240, 0.10);
}

.ld-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 64px;
}

.ld-nav__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}

.ld-nav__logo span {
  color: var(--accent);
}

.ld-nav__links {
  display: none;
  align-items: center;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .ld-nav__links {
    display: flex;
  }
}

.ld-nav__links a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-dim);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color var(--t-fast) var(--ease);
  padding-block: var(--space-2);
}

.ld-nav__links a:hover,
.ld-nav__links a[aria-current="page"] {
  color: var(--text);
}

.ld-nav__links a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.ld-nav__cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Réduction taille CTA nav sur mobile */
.ld-nav__cta .qq-btn {
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  min-height: 40px;
}

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */

.ld-hero {
  position: relative;
  min-height: 90dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-block: var(--space-16);
  text-align: center;
  background: var(--bg);
}

/* Glow de fond violet + magenta — pur CSS, aucune image */
.ld-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(108, 59, 255, 0.30) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(255, 60, 128, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(108, 59, 255, 0.15) 0%, transparent 55%);
  pointer-events: none;
}

/* Grain léger surimposé pour profondeur */
.ld-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 70% at 50% 0%, rgba(36, 26, 71, 0.55) 0%, transparent 70%);
  pointer-events: none;
}

.ld-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.ld-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: rgba(108, 59, 255, 0.18);
  border: 1px solid rgba(108, 59, 255, 0.35);
  font-family: var(--font-score);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ld-hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-hot);
  flex-shrink: 0;
  animation: ld-pulse-dot 2s ease-in-out infinite;
}

@keyframes ld-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}

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

.ld-hero__h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.ld-hero__h1 em {
  font-style: normal;
  color: var(--accent);
}

.ld-hero__sub {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 56ch;
}

.ld-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

/* Orbes décoratifs flottants */
.ld-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.35;
}

.ld-hero__orb--1 {
  width: 320px;
  height: 320px;
  background: var(--accent);
  top: -80px;
  left: -60px;
  opacity: 0.22;
}

.ld-hero__orb--2 {
  width: 240px;
  height: 240px;
  background: var(--accent-hot);
  bottom: 40px;
  right: -40px;
  opacity: 0.18;
}

.ld-hero__orb--3 {
  width: 180px;
  height: 180px;
  background: var(--accent);
  bottom: 20%;
  left: 10%;
  opacity: 0.12;
}

/* --------------------------------------------------------------------------
   FEATURES — grille 6 cartes
   -------------------------------------------------------------------------- */

.ld-features {
  background: var(--bg-2);
  padding-block: var(--space-16);
}

.ld-section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.ld-section-label {
  display: inline-block;
  font-family: var(--font-score);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.ld-section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.ld-features__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .ld-features__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.ld-feature-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid rgba(108, 59, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition:
    transform var(--t-normal) var(--ease),
    border-color var(--t-normal) var(--ease),
    box-shadow var(--t-normal) var(--ease);
}

.ld-feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 59, 255, 0.45);
  box-shadow: var(--shadow-md);
}

.ld-feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(108, 59, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ld-feature-card__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ld-feature-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-md);
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

.ld-feature-card__desc {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Animations fade-up sur les cartes features */
@media (prefers-reduced-motion: no-preference) {
  .ld-feature-card {
    opacity: 0;
    animation: qq-fade-up 400ms var(--ease) forwards;
  }

  .ld-feature-card:nth-child(1) { animation-delay: 0ms; }
  .ld-feature-card:nth-child(2) { animation-delay: 80ms; }
  .ld-feature-card:nth-child(3) { animation-delay: 160ms; }
  .ld-feature-card:nth-child(4) { animation-delay: 240ms; }
  .ld-feature-card:nth-child(5) { animation-delay: 320ms; }
  .ld-feature-card:nth-child(6) { animation-delay: 400ms; }
}

/* --------------------------------------------------------------------------
   HOW IT WORKS — 3 étapes
   -------------------------------------------------------------------------- */

.ld-steps {
  background: var(--bg);
  padding-block: var(--space-16);
}

.ld-steps__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

@media (min-width: 900px) {
  .ld-steps__list {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
  }
}

.ld-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  flex: 1;
}

@media (min-width: 900px) {
  .ld-step {
    align-items: center;
    text-align: center;
    padding-inline: var(--space-6);
  }
}

/* Séparateur entre étapes sur desktop */
.ld-step + .ld-step {
  position: relative;
}

@media (min-width: 900px) {
  .ld-step + .ld-step::before {
    content: "";
    position: absolute;
    top: 36px;
    left: 0;
    width: 1px;
    height: 2px;
    /* On utilise un séparateur visuel via le numéro */
  }
}

.ld-step__connector {
  display: none;
}

@media (min-width: 900px) {
  /* Flèche entre steps sur desktop, rendue via pseudo sur le parent */
  .ld-steps__list {
    position: relative;
  }
}

.ld-step__num {
  font-family: var(--font-score);
  font-weight: 800;
  font-size: 4rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  text-stroke: 2px var(--accent);
  text-shadow: 0 0 32px rgba(108, 59, 255, 0.55);
  letter-spacing: -0.02em;
  user-select: none;
}

.ld-step__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ld-step__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--text);
  margin: 0;
}

.ld-step__desc {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 28ch;
}

@media (min-width: 900px) {
  .ld-step__desc {
    max-width: 24ch;
  }
}

/* Séparateurs entre étapes — ligne horizontale desktop */
.ld-steps__sep {
  display: none;
}

@media (min-width: 900px) {
  .ld-steps__sep {
    display: block;
    align-self: flex-start;
    margin-top: 36px;
    flex-shrink: 0;
    width: var(--space-8);
    height: 2px;
    background: linear-gradient(90deg, rgba(108, 59, 255, 0.45), rgba(108, 59, 255, 0.10));
    border-radius: 1px;
  }
}

/* --------------------------------------------------------------------------
   CAS D'USAGE — grille 2×2
   -------------------------------------------------------------------------- */

.ld-usecases {
  background: var(--bg-2);
  padding-block: var(--space-16);
}

.ld-usecases__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .ld-usecases__grid {
    gap: var(--space-6);
  }
}

.ld-usecase-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-6) var(--space-8);
  border: 1px solid rgba(108, 59, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition:
    transform var(--t-normal) var(--ease),
    border-color var(--t-normal) var(--ease);
}

.ld-usecase-card:hover {
  transform: translateY(-3px);
  border-color: rgba(108, 59, 255, 0.38);
}

.ld-usecase-card__emoji {
  font-size: 2rem;
  line-height: 1;
}

.ld-usecase-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-md);
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.ld-usecase-card__desc {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--text-dim);
  line-height: 1.6;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   CTA FINAL
   -------------------------------------------------------------------------- */

.ld-cta {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-16);
  text-align: center;
  background: var(--bg);
}

/* Fond dégradé chaud centré */
.ld-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 100% at 50% 50%, rgba(108, 59, 255, 0.28) 0%, transparent 65%),
    radial-gradient(ellipse 60% 60% at 30% 20%, rgba(255, 60, 128, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 75% 80%, rgba(255, 60, 128, 0.10) 0%, transparent 50%);
  pointer-events: none;
}

.ld-cta__inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.ld-cta__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.ld-cta__sub {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 48ch;
}

.ld-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */

.ld-footer {
  background: var(--bg);
  border-top: 1px solid rgba(199, 189, 240, 0.10);
  padding-block: var(--space-8);
}

.ld-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.ld-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
}

.ld-footer__nav a {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-dim);
  transition: color var(--t-fast) var(--ease);
}

.ld-footer__nav a:hover {
  color: var(--text);
}

.ld-footer__nav a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.ld-footer__sep {
  color: rgba(199, 189, 240, 0.25);
  font-size: var(--text-xs);
  user-select: none;
}

.ld-footer__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}

.ld-footer__copy {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--text-dim);
  opacity: 0.55;
}

/* --------------------------------------------------------------------------
   FOCUS-VISIBLE GLOBAL LANDING — surcharge au niveau landing
   (qq-tokens définit 2px, on cible les CTA landing à 3px)
   -------------------------------------------------------------------------- */

.ld-hero__actions .qq-btn:focus-visible,
.ld-cta__actions .qq-btn:focus-visible,
.ld-nav__cta .qq-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   RESPONSIVE — ajustements spécifiques
   -------------------------------------------------------------------------- */

@media (max-width: 639px) {
  .ld-hero__actions .qq-btn {
    width: 100%;
    max-width: 320px;
  }

  .ld-features__grid {
    grid-template-columns: 1fr;
  }

  .ld-usecases__grid {
    grid-template-columns: 1fr;
  }

  .ld-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .ld-footer__right {
    align-items: flex-start;
  }

  .ld-cta__actions .qq-btn {
    width: 100%;
    max-width: 320px;
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  .ld-features__grid {
    grid-template-columns: 1fr 1fr;
  }
}
