/* =============================
   PAVIGA Landing — style.css
   ============================= */

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

:root {
  --blue: #1a367e;
  --blue-light: #2a4fa8;
  --blue-bright: #4a7dff;
  --bg: #0c0c14;
  --bg-2: #12121e;
  --bg-3: #1a1a2c;
  --border: rgba(255,255,255,0.07);
  --text: #e8e8f0;
  --text-muted: #a8a8c4;
  --white: #ffffff;
  --radius: 12px;
  --radius-lg: 20px;
  --logo: url('assets/logo_paviga_white.svg');
}

[data-theme="light"] {
  --bg: #f4f4f8;
  --bg-2: #ffffff;
  --bg-3: #eaeaf2;
  --border: rgba(0,0,0,0.08);
  --text: #1a1a2e;
  --text-muted: #5a5a7a;
  --white: #1a1a2e;
  --logo: url('assets/logo_paviga_bleu.svg');
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

img { max-width: 100%; }

/* ---- UTILS ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--blue-bright); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border: 1.5px solid var(--blue-light);
}
.btn-primary:hover {
  background: var(--blue-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(74,125,255,0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--blue-bright);
  color: var(--blue-bright);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
  background: var(--blue);
  color: #fff;
  border: 1.5px solid var(--blue-light);
}
.btn-sm:hover {
  background: var(--blue-light);
}

/* ---- REVEAL ANIMATIONS ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.65s ease 0.15s, transform 0.65s ease 0.15s;
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo { display: flex; align-items: center; }

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ---- THEME TOGGLE ---- */
.theme-toggle {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--blue-bright);
  color: var(--blue-bright);
  background: rgba(74,125,255,0.08);
}

/* affiche soleil en dark, lune en light */
[data-theme="dark"] .icon-moon  { display: none; }
[data-theme="dark"] .icon-sun   { display: block; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 64px;
}

.hero-inner {
  flex: 1;
  max-width: 600px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--blue);
  background: rgba(26,54,126,0.15);
  color: var(--blue-bright);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-note {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ---- HERO STATS ---- */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--blue-bright);
  letter-spacing: -0.02em;
}

.hero-stat span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
  max-width: 120px;
}

.hero-stat-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* Phone mockup */
.hero-mockup {
  flex-shrink: 0;
}

.phone-frame {
  width: 260px;
  height: 520px;
  border: 2px solid var(--border);
  border-radius: 40px;
  background: var(--bg-2);
  padding: 20px 12px;
  position: relative;
  box-shadow: 0 0 0 1px rgba(74,125,255,0.1), 0 32px 80px rgba(0,0,0,0.5);
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  background: var(--bg-3);
  border-radius: 100px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg-3);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.phone-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 28px;
}

/* ---- PAIN ---- */
.pain {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.pain-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  text-align: center;
}

.pain-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 280px;
}

.pain-icon {
  font-size: 36px;
}

.accent-icon {
  color: var(--blue-bright);
  font-size: 36px;
  font-weight: 800;
}

.pain-item p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
}

.pain-item--after p { color: var(--text); }
.pain-item--after p strong { color: var(--blue-bright); }

.pain-arrow {
  font-size: 28px;
  color: var(--blue);
  font-weight: 300;
}

/* ---- FEATURES ---- */
.features {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 17px;
}

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

.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.25s, transform 0.25s;
}

.feature-card:hover {
  border-color: rgba(74,125,255,0.35);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- PREVIEW ---- */
.preview {
  padding: 100px 0 0;
  background: var(--bg-2);
  overflow: hidden;
}

.preview-header {
  margin-bottom: 56px;
}

/* Scrollable track */
.screenshots-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  padding: 20px 0 60px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.screenshots-scroll-wrap:active { cursor: grabbing; }
.screenshots-scroll-wrap::-webkit-scrollbar { display: none; }

.screenshots-track {
  display: flex;
  gap: 28px;
  width: max-content;
  min-width: 100%;
  justify-content: center;
  padding: 0 max(40px, calc((100vw - 1100px) / 2));
}

/* Each screen card */
.ss-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 220px;
  flex-shrink: 0;
}

.ss-phone {
  width: 220px;
  height: 440px;
  border-radius: 36px;
  border: 2px solid var(--border);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  flex-shrink: 0;
}

.ss-phone:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(74,125,255,0.2);
}


.ss-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.ss-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
}

.ss-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-bright);
  letter-spacing: 0.08em;
  padding-top: 3px;
  flex-shrink: 0;
}

.ss-label strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.ss-label p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ---- DOWNLOAD ---- */
.download {
  padding: 100px 0;
}

.download-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.download-inner h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.download-inner p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 36px;
}

.download-badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.dl-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg-2);
  transition: all 0.2s;
  min-width: 160px;
  position: relative;
}

.dl-badge--web {
  border-color: var(--blue);
  background: rgba(26,54,126,0.15);
  cursor: pointer;
}

.dl-badge--web:hover {
  border-color: var(--blue-bright);
  transform: translateY(-2px);
}

.dl-badge--soon {
  opacity: 0.55;
  cursor: default;
}

.dl-icon {
  font-size: 22px;
}

.dl-store-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.dl-badge span small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.dl-badge span strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.soon-tag {
  position: absolute;
  top: -8px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ---- EARLY ACCESS ---- */
.early-access {
  padding: 100px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.ea-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.ea-inner h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.ea-inner > p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 28px;
}

.ea-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.ea-input {
  flex: 1;
  min-width: 220px;
  padding: 12px 18px;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.ea-input:focus {
  border-color: var(--blue-bright);
}

.ea-input::placeholder {
  color: var(--text-muted);
}

.ea-actions {
  margin-bottom: 24px;
}

.ea-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 12px;
}
.ea-divider::before,
.ea-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.ea-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* success state */
.ea-success {
  display: none;
  color: var(--blue-bright);
  font-weight: 600;
  font-size: 16px;
  margin-top: 12px;
}

/* ---- FOOTER ---- */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.footer-brand p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-bottom p a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom p a:hover { color: var(--text); }

.footer-credit {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.45;
}
.footer-credit a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-credit:hover { opacity: 0.7; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    min-height: auto;
    padding: 100px 24px 60px;
    text-align: center;
    gap: 48px;
  }

  .hero-inner { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .hero-note { text-align: center; }
  .hero-sub { margin: 0 auto 36px; }
  .hero-mockup { width: 100%; display: flex; justify-content: center; }

  .hero-stats { justify-content: center; }
  .hero-stat { align-items: center; text-align: center; }

  .nav-links { display: none; }
  .theme-toggle { margin-left: auto; }

  .pain-arrow { display: none; }
  .pain-grid { flex-direction: column; gap: 24px; }

  .features-grid { grid-template-columns: 1fr; }

  /* Screenshots — scroll horizontal centré */
  .screenshots-track {
    justify-content: flex-start;
    padding: 0 24px;
  }

  /* Download badges — pleine largeur */
  .download-badges { flex-direction: column; align-items: stretch; }
  .dl-badge { justify-content: center; }

  /* Early access form — plein écran */
  .ea-form { flex-direction: column; }
  .ea-input { min-width: 0; width: 100%; }
  .ea-form .btn { width: 100%; justify-content: center; }

  /* Footer */
  .footer-inner { flex-direction: column; }
  .footer-bottom p { font-size: 12px; line-height: 1.8; }
  .footer-bottom p a { display: inline-block; }
}
