/* ================================================================
   home.css - Styles spécifiques page d'accueil
   Dépend de : tokens.css, components.css
   ================================================================ */

/* ================================================================
   HERO  — Vanta.NET animated background
   z-index layers (bottom → top):
     0  Vanta canvas  (JS-injected, interactive network)
     1  ::before      (radial spotlight behind content)
     2  .hero__overlay (darkening veil)
     3  .container    (text / CTAs)
     3  .hero__scroll-hint
     4  ::after       (grain texture)
   ================================================================ */

.hero {
  padding-top: calc(var(--navbar-height) + var(--space-16));
  padding-bottom: calc(var(--space-24) + 52px);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  /* Dark base shown before Vanta loads */
  background-color: #05101e;
}

/* Vanta injects <canvas> as first child — pin + lift above bg */
#accueil > canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
}

/* Radial spotlight — centred glow behind content */
.hero::before {
  content: '';
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(520px, 80vw, 1100px);
  height: clamp(360px, 55vw, 740px);
  background: radial-gradient(
    ellipse at center,
    rgba(28, 88, 195, 0.20) 0%,
    rgba(14, 48, 115, 0.08) 50%,
    transparent 72%
  );
  z-index: 1;
  pointer-events: none;
}

/* Film-grain overlay — premium texture */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Darkening veil for text legibility */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    155deg,
    rgba(4, 10, 22, 0.55) 0%,
    rgba(3, 7, 16, 0.20) 50%,
    rgba(4, 10, 22, 0.52) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Content above everything */
.hero .container {
  position: relative;
  z-index: 3;
}

/* ── Single centered column ─────────────────────────────────────── */
.hero__content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* Badge */
.hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(232, 101, 10, 0.12);
  border: 1px solid rgba(232, 101, 10, 0.38);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Pulsing live-dot inside badge */
.hero__label-pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ab869;
  flex-shrink: 0;
}

.hero__label-pulse::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid rgba(90, 184, 105, 0.55);
  animation: pulseDot 2.2s ease-out infinite;
}

@keyframes pulseDot {
  0%   { transform: scale(0.5); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0;   }
}

/* H1 */
.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-6);
  text-wrap: balance;
}

/* Accent span — gradient fill + orange glow */
.hero__title span {
  background: linear-gradient(135deg, #f59840 0%, #e8650a 45%, #ff8c38 85%, #f5a050 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 28px rgba(232, 101, 10, 0.52));
}

/* Subtitle */
.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(205, 218, 240, 0.70);
  max-width: 58ch;
  margin: 0 auto var(--space-10);
  line-height: 1.78;
}

/* CTAs */
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-10);
}

/* Ghost button — dark-background hero */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.20);
  cursor: pointer;
  min-height: 44px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.22);
}

.btn-ghost:active {
  transform: none;
  box-shadow: none;
}

/* Stats row */
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  justify-content: center;
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.hero__stat {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: rgba(195, 212, 240, 0.58);
  letter-spacing: 0.01em;
}

.hero__stat-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: #5ab869;
  flex-shrink: 0;
  box-shadow: 0 0 7px rgba(90, 184, 105, 0.65);
}

/* ── Scroll hint ─────────────────────────────────────────────────── */
.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: fadeInHint 0.8s 2.0s ease forwards;
}

@keyframes fadeInHint {
  to { opacity: 0.32; }
}

.hero__scroll-line {
  width: 1.5px;
  height: 44px;
  background: rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 55%;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95), transparent);
  animation: scrollTravel 2.2s 2.8s ease-in-out infinite;
  top: -55%;
}

@keyframes scrollTravel {
  0%   { top: -55%; }
  100% { top: 155%; }
}

/* ── Responsive hero ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    padding-top: calc(var(--navbar-height) + var(--space-12));
    padding-bottom: calc(var(--space-16) + 52px);
    min-height: 90dvh;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: var(--text-2xl);
  }

  .hero__ctas {
    flex-direction: column;
    align-items: center;
  }

  .hero__ctas .btn-primary,
  .hero__ctas .btn-ghost {
    width: 100%;
    max-width: 340px;
    justify-content: center;
  }

  .hero__stats {
    gap: var(--space-3);
    flex-direction: column;
    align-items: center;
  }

  .hero__scroll-hint {
    display: none;
  }
}

/* ================================================================
   SOLUTIONS GRID
   ================================================================ */

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

@media (max-width: 640px) {
  .solutions-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   ABOUT
   ================================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.about__img-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.about__img-wrap img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
}

.about__accent-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-accent);
}

.about__text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-5);
  max-width: 60ch;
}

.about__values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-8);
  list-style: none;
}

.about__value {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

.about__value-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-highlight);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .about__img-wrap {
    order: -1;
  }
}

/* ================================================================
   SECTEURS ROW
   ================================================================ */

.sectors-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-4);
}

@media (max-width: 1024px) {
  .sectors-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 500px) {
  .sectors-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
}

/* ================================================================
   WHY ODOO (banner dans section solutions)
   ================================================================ */

.why-odoo-wrap {
  margin-top: var(--space-16);
}
