/*
  Feuille de style de la vitrine PopSalon.

  Jetons : valeurs du thème « PopForge sombre » de design-system/tokens.json
  (face coiffeuse, toujours avec l'aurora). Les noms reprennent ceux du design
  system ; seuls les jetons dont la vitrine a besoin sont recopiés ici.
*/

/* ---------- Jetons ---------- */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #090916;
  --bg-card: rgba(16, 17, 36, 0.88);
  --border: rgba(255, 255, 255, 0.08);
  --border-card: rgba(160, 170, 255, 0.16);
  --border-focus: rgba(217, 70, 239, 0.65);

  /* Texte */
  --text-1: #f1f5f9;
  --text-2: #c4c4d8;
  --text-label: #a0a0b8;
  --text-muted: #64748b; /* 3,9:1 sur bg-card : texte non essentiel seulement */

  /* Accent et dégradés (arrêts) */
  --accent: #c026d3;
  --accent-strong: #6d28d9;
  --grad-btn-from: #6d28d9;
  --grad-btn-to: #c026d3;
  --grad-btn-hover-from: #7c3aed;
  --grad-btn-hover-to: #d946ef;
  --grad-text-from: #a855f7;
  --grad-text-to: #f97316;
  --on-accent: #ffffff;

  /* Boutons */
  --button-primary-color: var(--on-accent);
  --button-primary-shadow: 0 10px 22px rgba(192, 38, 211, 0.24);
  --button-secondary-bg: rgba(255, 255, 255, 0.05);
  --button-secondary-bg-hover: rgba(255, 255, 255, 0.08);
  --button-secondary-color: var(--text-1);
  --button-secondary-border: rgba(255, 255, 255, 0.12);
  --button-ghost-bg-hover: rgba(255, 255, 255, 0.06);
  --button-ghost-color: var(--text-2);

  /* Aurora (néon, thème sombre) */
  --aurora-violet: rgba(109, 40, 217, 0.65);
  --aurora-rose: rgba(192, 38, 211, 0.55);
  --aurora-orange: rgba(249, 115, 22, 0.42);
  --aurora-blue: rgba(59, 130, 246, 0.38);
  --aurora-cyan: rgba(6, 182, 212, 0.28);

  /* Ligne décorative */
  --deco-line-violet: #8b4dff;
  --deco-line-rose: #ff3fb7;
  --deco-line-orange: #ff9b2f;
  --deco-line-cyan: #22c8ff;
  --deco-diamond: #ffb13b;

  /* Typographie */
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --text-hero: 28px;
  --text-xl: 22px;
  --text-lg: 18px;
  --text-md: 16px;
  --text-base: 14px;
  --text-sm: 12px;
  --display-gradient: 2.4rem;
  --brand-title: 1.5rem;
  --hero-title: 1.35rem;
  --body: 0.9375rem;
  --eyebrow: 0.72rem;

  /* Espacement */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Rayons */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 20px;
  --radius-pill: 999px;

  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.20);
  --shadow-card: 0 30px 90px rgba(0, 0, 0, 0.48), 0 0 45px rgba(192, 38, 211, 0.1);

  /* Mise en page */
  --touch-min: 44px;
  --content-max: 1200px;

  /* Mouvement */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;

  /* Dégradés recomposés à partir des arrêts */
  --grad-btn: linear-gradient(135deg, var(--grad-btn-from), var(--grad-btn-to));
  --grad-btn-hover: linear-gradient(135deg, var(--grad-btn-hover-from), var(--grad-btn-hover-to));
  --grad-text: linear-gradient(90deg, var(--grad-text-from), var(--grad-text-to));
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Fond de marque : vagues néon sur mobile (scroll, iOS ignore fixed), bg en secours */
  background: var(--bg) url("/images/bg-wave-mobile.webp") center top / cover no-repeat scroll;
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  /* border-focus est sous 3:1 en sombre : l'anneau prend l'arrêt plein grad-btn-hover-to. */
  outline: 2px solid var(--grad-btn-hover-to);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-1);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Aurora ---------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  animation: aurora-drift 24s ease-in-out infinite alternate;
}

.aurora .violet { width: 520px; height: 520px; top: -160px; left: -140px; background: radial-gradient(ellipse, var(--aurora-violet) 0%, transparent 70%); }
.aurora .rose { width: 440px; height: 400px; top: 15%; right: -160px; background: radial-gradient(ellipse, var(--aurora-rose) 0%, transparent 70%); animation-delay: -6s; }
.aurora .orange { width: 460px; height: 360px; bottom: -160px; left: 30%; background: radial-gradient(ellipse, var(--aurora-orange) 0%, transparent 70%); animation-delay: -12s; }
.aurora .blue { width: 360px; height: 340px; bottom: 10%; left: -120px; background: radial-gradient(ellipse, var(--aurora-blue) 0%, transparent 70%); animation-delay: -3s; }
.aurora .cyan { width: 340px; height: 320px; top: 40%; left: 55%; background: radial-gradient(ellipse, var(--aurora-cyan) 0%, transparent 70%); animation-delay: -9s; }

@keyframes aurora-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 30px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .aurora span {
    animation: none;
  }

  .btn {
    transition: none;
  }
}

/* ---------- Mise en page ---------- */

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

main {
  flex: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

/* Marque : l'icône d'app s'ajoutera devant le mot ; le mot reste le repli. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch-min);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
}

.brand-word {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-6);
}

.section-title {
  font-size: var(--brand-title);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section-lead {
  margin-top: var(--space-3);
  font-size: var(--body);
  color: var(--text-2);
}

/* ---------- Hero ---------- */

.hero {
  padding: var(--space-10) 0 var(--space-12);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  font-size: var(--eyebrow);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-label);
}

.display-gradient {
  font-size: var(--display-gradient);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  padding-bottom: 0.08em; /* garde le jambage du p dans la zone du dégradé */
  background: var(--grad-btn);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: var(--brand-title);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.hero-lead {
  font-size: var(--body);
  color: var(--text-2);
  max-width: 560px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.deco {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 12px;
}

.deco::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--deco-line-violet), var(--deco-line-rose), var(--deco-line-orange), var(--deco-line-cyan), transparent);
}

.deco::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  background: var(--deco-diamond);
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 10px var(--deco-diamond);
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--body);
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn-primary {
  background: var(--grad-btn);
  color: var(--button-primary-color);
  box-shadow: var(--button-primary-shadow);
}

.btn-primary:hover {
  background: var(--grad-btn-hover);
}

.btn-secondary {
  background: var(--button-secondary-bg);
  color: var(--button-secondary-color);
  border-color: var(--button-secondary-border);
  font-weight: 600;
}

.btn-secondary:hover {
  background: var(--button-secondary-bg-hover);
}

.btn-ghost {
  color: var(--button-ghost-color);
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.btn-ghost:hover {
  background: var(--button-ghost-bg-hover);
  color: var(--text-1);
}

.btn-sm {
  min-height: var(--touch-min);
  padding: 0 var(--space-4);
  font-size: var(--text-base);
}

/* ---------- Cartes ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.feature {
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.feature-title {
  font-size: var(--hero-title);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.feature p {
  font-size: var(--body);
  color: var(--text-2);
}

.cta {
  padding: var(--space-8) var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.card .section-lead {
  margin-top: 0;
}

/* ---------- Pied de page ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
  border-top: 1px solid var(--border);
  font-size: var(--text-base);
  color: var(--text-label);
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  color: var(--text-2);
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--text-1);
}

/* ---------- Page 404 ---------- */

.not-found {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-12) 0;
}

.not-found .card {
  width: 100%;
  max-width: 460px;
  padding: var(--space-8) var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: center;
  align-items: center;
}

.not-found .deco {
  max-width: 200px;
}

.not-found .actions {
  justify-content: center;
}

/* ---------- Ordinateur ---------- */

@media (min-width: 480px) {
  /* Scène salon-forge retournée (fauteuil à droite) et voilée à gauche, sous le texte */
  body {
    background-image:
      linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 45%, transparent 75%),
      url("/images/hero-login.webp");
    background-attachment: fixed;
  }

  .section-title,
  .hero-tagline {
    font-size: 1.625rem; /* brand-title dès 480px, selon le design system */
  }
}

@media (min-width: 768px) {
  .site-header,
  main,
  .site-footer {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }

  .hero {
    padding: var(--space-12) 0;
    gap: var(--space-6);
  }

  .display-gradient {
    font-size: calc(var(--display-gradient) * 1.75);
  }

  .hero-tagline {
    font-size: calc(var(--brand-title) * 1.4);
  }

  .hero-lead {
    font-size: var(--text-lg);
  }

  .cta {
    padding: var(--space-10) var(--space-8);
  }
}
