/**
 * Main Layout & Responsive Stylesheet
 * Strict Mobile First Architecture - Zero Natural Horizontal Overflow
 * Palette : #361102 (Acajou), #B95512 (Terre cuite), #FFDE73 (Or ambré), #004777 (Lapis), #00AFB5 (Turquoise)
 */

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-primary);
  line-height: 1.55;
  overflow-x: clip; /* Safety net only: layout is naturally constrained */
  display: flex;
  flex-direction: column;
}

/* Atmospheric Ambient Background Lights & Tactile Noise */
.ambient-noise {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 160px 160px;
}

/* Ancrage spatial dans le flux du document (Suit naturellement la hauteur de la page) */
.ambient-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Halo 1 - Hero & Décompte (Chaleur cuivrée & or ambré) */
.glow-orb-1 {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translate(-50%, 0);
  width: min(105vw, 860px);
  height: min(105vw, 860px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(var(--brand-terracotta-rgb), 0.28) 0%,
    rgba(var(--brand-gold-rgb), 0.12) 35%,
    rgba(var(--brand-mahogany-rgb), 0.45) 65%,
    transparent 82%
  );
  filter: blur(85px);
  animation: floatOrb1 18s ease-in-out infinite alternate;
}

/* Halo 2 - Section "Au programme" (Profondeur océane & turquoise) */
.glow-orb-2 {
  position: absolute;
  top: 48%;
  right: -12%;
  width: min(90vw, 720px);
  height: min(90vw, 720px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(var(--accent-teal-rgb), 0.18) 0%,
    rgba(var(--accent-navy-rgb), 0.16) 45%,
    transparent 75%
  );
  filter: blur(95px);
  animation: floatOrb2 22s ease-in-out infinite alternate;
}

/* Halo 3 - Section "Réseaux" & Footer (Ancrage acajou & cuivre) */
.glow-orb-3 {
  position: absolute;
  bottom: 40px;
  left: -10%;
  width: min(85vw, 680px);
  height: min(85vw, 680px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(var(--brand-mahogany-rgb), 0.5) 0%,
    rgba(var(--brand-terracotta-rgb), 0.16) 50%,
    transparent 78%
  );
  filter: blur(90px);
  animation: floatOrb3 20s ease-in-out infinite alternate;
}

/* Micro-particules de lumière en suspension (Floating Stardust) */
.ambient-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  top: var(--p-y, 50%);
  left: var(--p-x, 50%);
  width: var(--p-size, 2px);
  height: var(--p-size, 2px);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.15;
  animation: floatParticle var(--p-dur, 16s) ease-in-out infinite alternate;
  animation-delay: var(--p-delay, 0s);
}

.particle.p-gold {
  background-color: var(--brand-gold);
  box-shadow: 0 0 8px 1px rgba(var(--brand-gold-rgb), 0.65);
}

.particle.p-teal {
  background-color: var(--accent-teal);
  box-shadow: 0 0 8px 1px rgba(var(--accent-teal-rgb), 0.7);
}

@keyframes floatParticle {
  0% {
    transform: translate(0, 0) scale(0.9);
    opacity: 0.2;
  }
  50% {
    transform: translate(16px, -40px) scale(1.35);
    opacity: 0.68;
  }
  100% {
    transform: translate(-14px, -80px) scale(0.85);
    opacity: 0.15;
  }
}

/* Animations de respiration cinétique douce (Coût CPU/GPU quasi nul sur mobile) */
@keyframes floatOrb1 {
  0% {
    transform: translate(-50%, 0) scale(1);
  }
  50% {
    transform: translate(calc(-50% + 22px), 30px) scale(1.05);
  }
  100% {
    transform: translate(calc(-50% - 18px), -15px) scale(0.97);
  }
}

@keyframes floatOrb2 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-30px, -25px) scale(1.06);
  }
  100% {
    transform: translate(20px, 25px) scale(0.96);
  }
}

@keyframes floatOrb3 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(25px, -20px) scale(1.05);
  }
  100% {
    transform: translate(-18px, 20px) scale(0.96);
  }
}



/* Layout Containers */
.site-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Premier Écran (Above the Fold) : 100% de la hauteur visible
   Englobe le Header et la Hero Section pour garantir que seuls ces éléments
   sont visibles à l'arrivée sur mobile et PC, sans débordement ni coupure.
   ========================================================================== */
.hero-screen {
  min-height: 100vh;
  min-height: 100svh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

@media (max-height: 520px) {
  .hero-screen {
    height: auto;
    min-height: 100svh;
    padding-bottom: 1.5rem;
  }
}

/* 1. Header / Navigation */
.site-header {
  width: 100%;
  padding-block: clamp(0.55rem, 1.3vh, 1.1rem);
  flex-shrink: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  position: relative;
  outline: none;
  border-radius: var(--radius-pill);
}

.brand-logo {
  width: clamp(38px, 4.4vw, 46px);
  height: clamp(38px, 4.4vw, 46px);
  object-fit: cover;
  object-position: center;
  display: block;
  image-rendering: auto;
  /* Lissage des arêtes via filtre SVG anti-crénelage et micro-lumière rasante ambrée */
  filter: url(#logo-smooth)
          drop-shadow(0 0 1px rgba(var(--brand-gold-rgb), 0.75))
          drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55))
          drop-shadow(0 0 12px rgba(var(--brand-gold-rgb), 0.28));
  transition: transform var(--duration-normal) var(--ease-spring),
              filter var(--duration-normal) var(--ease-smooth);
  will-change: transform;
}

.brand-mark:hover .brand-logo {
  transform: scale(1.08);
  filter: url(#logo-smooth)
          drop-shadow(0 0 1.5px rgba(var(--brand-gold-rgb), 0.95))
          drop-shadow(0 4px 12px rgba(0, 0, 0, 0.65))
          drop-shadow(0 0 18px rgba(var(--brand-gold-rgb), 0.52));
}

.brand-mark:focus-visible .brand-logo {
  filter: url(#logo-smooth)
          drop-shadow(0 0 2px rgba(var(--brand-gold-rgb), 1))
          drop-shadow(0 0 20px rgba(var(--brand-gold-rgb), 0.75));
}

/* Accessibility: text visually hidden for screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand-gold);
  box-shadow: 0 0 9px var(--brand-gold);
  display: inline-block;
  animation: pulseBeacon 2.5s infinite var(--ease-smooth);
}

.status-pill-dot.is-active {
  background-color: var(--accent-teal);
  box-shadow: 0 0 12px var(--accent-teal);
}

@keyframes pulseBeacon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* 2. Hero Section - Centrage vertical dans l'espace restant du premier écran */
.hero-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-block: clamp(0.4rem, 1.2vh, 1.25rem);
  text-align: center;
  box-sizing: border-box;
  width: 100%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.45rem, 1.3vh, 1rem);
  max-width: 800px;
  margin-inline: auto;
  width: 100%;
}

.hero-title {
  font-size: clamp(1.55rem, 1.25rem + 1.3vw, 2.85rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-wrap: balance;
}

.hero-title-gradient {
  background: linear-gradient(180deg, #ffffff 35%, var(--brand-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  font-size: clamp(0.85rem, 0.78rem + 0.22vw, 1.025rem);
  color: var(--text-secondary);
  line-height: 1.48;
  max-width: 600px;
  text-wrap: pretty;
}

/* 3. Countdown Section (Mobile First 4-unit capsules) */
.countdown-wrapper {
  width: 100%;
  max-width: 480px;
  margin-block: clamp(0.25rem, 0.7vh, 0.75rem);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.45rem, 1.6vw, 0.8rem);
  width: 100%;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(0.45rem, 1.1vh, 0.85rem) clamp(0.2rem, 1vw, 0.55rem);
  min-width: 0; /* Prevents flex/grid overflow */
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.countdown-number {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 1.05rem + 1vw, 2.15rem);
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.2rem;
}

.countdown-label {
  font-size: clamp(0.6rem, 0.55rem + 0.12vw, 0.7rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-gold);
  opacity: 0.9;
}

/* Hero CTA Wrapper */
.hero-cta-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.35rem, 0.75vh, 0.55rem);
}

.cta-subtext {
  font-size: clamp(0.7rem, 0.65rem + 0.12vw, 0.75rem);
  color: var(--text-muted);
}

/* 4. Section "Au programme" */
.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 540px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile First: single column */
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

@media (min-width: 720px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Carte pleine largeur flexible */
.card-full-width {
  grid-column: 1 / -1;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  border-radius: var(--radius-card);
}

.feature-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.feature-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.feature-card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.feature-card-desc {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

/* 5. Section "Réseaux" */
.social-card {
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 680px;
  margin-inline: auto;
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.social-icon-large {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(220, 39, 67, 0.45);
}

.social-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.social-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 460px;
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: var(--touch-target-min);
  padding: 0.8rem 1.85rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 222, 115, 0.08);
  border: 1px solid rgba(255, 222, 115, 0.25);
  color: var(--brand-gold);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  box-shadow: var(--glass-specular);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all var(--duration-normal) var(--ease-spring);
}

.social-button:hover {
  background: rgba(255, 222, 115, 0.18);
  border-color: rgba(255, 222, 115, 0.45);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 222, 115, 0.25);
}

/* 6. Footer */
.site-footer {
  margin-top: auto;
  padding-block: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer-badge {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* Reduced Motion Safety */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .status-pill-dot,
  .glow-orb-1,
  .glow-orb-2,
  .glow-orb-3,
  .particle {
    animation: none !important;
  }
  .social-button:hover {
    transform: none;
  }
}

