/* ============================================
   AMBIANCE — HIVER : Tempête de neige
   ============================================
   L'Atelier du Bout du Monde : blanc pur, bleus tempête,
   sapins enneigés, voile de neige qui souffle.
   Basée sur la maquette 2 validée par Jo.
*/

body.ambiance-winter {
  /* Fonds — tempête */
  --bg-main: #ecf0f4;
  --bg-section: #dde4e8;
  --bg-section-alt: #cfd9df;
  --bg-photo: #2d3d55;              /* Photo passe en nuit polaire */
  --bg-footer: #0c1930;
  --bg-header: rgba(236, 240, 244, 0.92);
  --bg-card: rgba(255, 255, 255, 0.6);

  /* Textes — bleus profonds */
  --text-body: #2d3d55;
  --text-title: #182842;
  --text-heading: #182842;
  --text-lead: #4a5a75;
  --text-muted: #7b8ba0;
  --text-inverse: #ffffff;

  /* Accents — or ancien + rouge terre */
  --accent-primary: #b58c3f;
  --accent-bright: #d4a960;
  --accent-soft: rgba(181, 140, 63, 0.5);
  --accent-secondary: #8f4032;
  --accent-cool: #4a5a75;
  --accent-cool-2: #182842;

  /* Bordures — plus visibles sur fond clair */
  --border-subtle: rgba(45, 61, 85, 0.1);
  --border-visible: rgba(45, 61, 85, 0.2);
  --border-strong: rgba(45, 61, 85, 0.35);

  /* Ombres — plus marquées pour le blizzard */
  --shadow-soft: 0 10px 30px rgba(24, 40, 66, 0.12);
  --shadow-medium: 0 20px 50px rgba(24, 40, 66, 0.18);
  --shadow-deep: 0 30px 80px rgba(24, 40, 66, 0.3);
  --shadow-glow: 0 10px 40px rgba(24, 40, 66, 0.25);

  /* Boutons */
  --btn-primary-bg: #182842;
  --btn-primary-color: #ffffff;
  --btn-primary-hover-bg: #8f4032;
  --btn-ghost-color: #ffffff;
  --btn-ghost-border: rgba(255, 255, 255, 0.5);

  /* Hero — dégradé tempête */
  --hero-bg:
    radial-gradient(ellipse 60% 40% at 30% 100%, rgba(24, 40, 66, 0.4) 0%, transparent 70%),
    linear-gradient(180deg,
      #b8c4d2 0%,
      #7b8ba0 40%,
      #4a5a75 75%,
      #2d3d55 100%);
  --hero-eyebrow-color: #d4a960;
  --hero-title-color: #ffffff;
  --hero-title-glow-color: #d4a960;
  --hero-lede-color: #ecf0f4;

  /* Cartes univers */
  --uni-card-bg: #182842;
  --uni-num-color: #d4a960;
  --uni-title-color: #ffffff;
  --uni-p-color: #ecf0f4;
  --uni-cta-color: #d4a960;

  /* Manifeste — plus lumineux */
  --manifesto-bg: #dde4e8;
  --manifesto-quote-color: #182842;
  --manifesto-highlight-color: #b58c3f;
  --manifesto-signature-color: #b58c3f;

  /* Photo — nuit polaire */
  --photo-bg: linear-gradient(180deg, #4a5a75 0%, #182842 100%);
  --photo-title-color: #ffffff;
  --photo-haiku-color: #ecf0f4;

  /* Particules = flocons */
  --ambient-particle-color: rgba(255, 255, 255, 0.9);
  --ambient-particle-glow: rgba(255, 255, 255, 0.6);

  /* Compat */
  --night: #182842;
  --night-deep: #0c1930;
  --paper: #ecf0f4;
  --paper-warm: #dde4e8;
  --gold: #b58c3f;
  --gold-bright: #d4a960;
  --gold-soft: rgba(181, 140, 63, 0.5);
  --ice: #7b8ba0;

  /* Variables héritées v2 supplémentaires (adaptées hiver) */
  --night-2: #2d3d55;
  --deep-blue: #4a5a75;
  --ocean: #7b8ba0;
  --sky: #b8c4d2;
  --amber: #b58c3f;
  --neon-cyan: #d4a960;
  --neon-magenta: #8f4032;
  --aurora-green: #b8c4d2;
  --ink: #182842;
  --ink-soft: #2d3d55;
}

/* ============================================
   ÉLÉMENTS SPÉCIFIQUES AU HIVER
   ============================================ */

/* Surcharges de lisibilité du hero (indispensable pour écraser
   le dégradé aurore du thème de base sur .glow) */
body.ambiance-winter .hero h1,
body.ambiance-winter #hero-title {
  color: #ffffff !important;
  text-shadow: 0 4px 24px rgba(12, 25, 48, 0.7) !important;
}
body.ambiance-winter .hero h1 .glow,
body.ambiance-winter #hero-title .glow {
  color: #d4a960 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: #d4a960 !important;
  background-clip: initial !important;
  animation: none !important;
  text-shadow: 0 4px 24px rgba(12, 25, 48, 0.7) !important;
}
body.ambiance-winter .hero p,
body.ambiance-winter .hero .hero-lede {
  color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: 0 2px 16px rgba(12, 25, 48, 0.65) !important;
}
body.ambiance-winter .hero-eyebrow,
body.ambiance-winter .section-eyebrow {
  color: #d4a960 !important;
  text-shadow: 0 2px 12px rgba(12, 25, 48, 0.5) !important;
}
body.ambiance-winter .scroll-indicator {
  color: #ffffff !important;
  opacity: 0.85 !important;
}

/* v4.6 : bouton ghost du hero en doré (lisible sur fond variable) */
body.ambiance-winter .hero .btn-ghost {
  color: #d4a960 !important;
  border: 1px solid #d4a960 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px) !important;
}
body.ambiance-winter .hero .btn-ghost:hover {
  background: #d4a960 !important;
  color: #182842 !important;
  border-color: #d4a960 !important;
}

/* v4.6 : nom du site forcé en doré (fond header transparent laisse voir
   le hero bleu → texte bleu foncé disparaissait, texte clair aussi selon la position) */
body.ambiance-winter .brand,
body.ambiance-winter .brand-name {
  color: #b58c3f !important;
}
body.ambiance-winter .brand-seasonal {
  color: #b58c3f !important;
}

/* Voile de neige lumineux (statique v4.5, ne bouge plus pour éviter les bords visibles) */
body.ambiance-winter .ambient-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
body.ambiance-winter .ambient-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.18) 0%, transparent 45%);
}

/* Silhouettes de sapins enneigés en bas du hero (tileable) */
body.ambiance-winter .ambient-layer::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 240' preserveAspectRatio='xMidYMax meet'><g fill='%23e0e6ec' opacity='0.75'><path d='M0,240 L0,180 L20,160 L10,160 L30,130 L20,130 L40,90 L60,130 L50,130 L70,160 L60,160 L80,180 L80,240 Z'/><path d='M120,240 L120,190 L140,170 L130,170 L150,140 L140,140 L160,100 L180,140 L170,140 L190,170 L180,170 L200,190 L200,240 Z'/></g><g fill='%23c8d0da' opacity='0.85'><path d='M60,240 L60,200 L80,180 L70,180 L90,150 L80,150 L100,110 L120,150 L110,150 L130,180 L120,180 L140,200 L140,240 Z'/><path d='M200,240 L200,205 L220,185 L210,185 L230,155 L220,155 L240,115 L260,155 L250,155 L270,185 L260,185 L280,205 L280,240 Z'/><path d='M300,240 L300,195 L320,175 L310,175 L330,145 L320,145 L340,105 L360,145 L350,145 L370,175 L360,175 L380,195 L380,240 Z'/></g><path d='M0,240 L0,225 Q100,215 200,220 T400,225 L400,240 Z' fill='%23eef2f6' opacity='0.95'/></svg>") repeat-x bottom center;
  background-size: auto 100%;
}

/* Flocons denses partout sur le site */
body.ambiance-winter .ambient-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
body.ambiance-winter .ambient-particles span {
  position: absolute;
  top: -30px;
  color: var(--ambient-particle-color);
  text-shadow: 0 0 6px var(--ambient-particle-glow);
  animation: winter-fall linear infinite;
  display: block;
  line-height: 1;
}
/* CORRECTIF v4.1 : les <span> étaient vides, on leur donne un flocon via ::before */
body.ambiance-winter .ambient-particles span::before {
  content: '❆';
  display: inline-block;
}
body.ambiance-winter .ambient-particles span:nth-child(even)::before {
  content: '❅';
}
body.ambiance-winter .ambient-particles span:nth-child(3n)::before {
  content: '❄';
}
body.ambiance-winter .ambient-particles span:nth-child(1)  { left: 5%;  font-size: 14px; animation-duration: 15s; }
body.ambiance-winter .ambient-particles span:nth-child(2)  { left: 12%; font-size: 10px; animation-duration: 18s; animation-delay: 2s; }
body.ambiance-winter .ambient-particles span:nth-child(3)  { left: 20%; font-size: 16px; animation-duration: 12s; animation-delay: 4s; }
body.ambiance-winter .ambient-particles span:nth-child(4)  { left: 28%; font-size: 8px;  animation-duration: 20s; animation-delay: 1s; }
body.ambiance-winter .ambient-particles span:nth-child(5)  { left: 35%; font-size: 12px; animation-duration: 14s; animation-delay: 6s; }
body.ambiance-winter .ambient-particles span:nth-child(6)  { left: 43%; font-size: 10px; animation-duration: 17s; animation-delay: 3s; }
body.ambiance-winter .ambient-particles span:nth-child(7)  { left: 52%; font-size: 14px; animation-duration: 13s; animation-delay: 8s; }
body.ambiance-winter .ambient-particles span:nth-child(8)  { left: 60%; font-size: 8px;  animation-duration: 19s; animation-delay: 5s; }
body.ambiance-winter .ambient-particles span:nth-child(9)  { left: 68%; font-size: 12px; animation-duration: 16s; animation-delay: 2.5s; }
body.ambiance-winter .ambient-particles span:nth-child(10) { left: 76%; font-size: 10px; animation-duration: 18s; animation-delay: 7s; }
body.ambiance-winter .ambient-particles span:nth-child(11) { left: 84%; font-size: 6px;  animation-duration: 22s; animation-delay: 9s; }
body.ambiance-winter .ambient-particles span:nth-child(12) { left: 92%; font-size: 12px; animation-duration: 21s; animation-delay: 4.5s; }

@keyframes winter-fall {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(110vh) translateX(80px); opacity: 0.3; }
}
@media (prefers-reduced-motion: reduce) {
  body.ambiance-winter .ambient-particles span,
  body.ambiance-winter .ambient-layer::before { animation: none; opacity: 0.3; }
}

/* ============================================
   CONTRASTES RENFORCÉS v4.5 — sections texte
   ============================================ */

/* Section "L'atelier" (intro) */
body.ambiance-winter .intro,
body.ambiance-winter .intro-text {
  color: #ecf0f4 !important;
}
body.ambiance-winter .intro p,
body.ambiance-winter .intro-text p {
  color: #ffffff !important;
  opacity: 1 !important;
}
body.ambiance-winter .intro strong,
body.ambiance-winter .intro-text strong {
  color: #d4a960 !important;
  font-weight: 600 !important;
}

/* Cartes univers — texte descriptif toujours lisible */
body.ambiance-winter .uni-card p {
  color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: 0 1px 4px rgba(12, 25, 48, 0.85), 0 0 12px rgba(12, 25, 48, 0.6) !important;
}
body.ambiance-winter .uni-card h3 {
  color: #ffffff !important;
  text-shadow: 0 2px 6px rgba(12, 25, 48, 0.85) !important;
}
body.ambiance-winter .uni-card .uni-num,
body.ambiance-winter .uni-card .uni-arrow {
  color: #d4a960 !important;
  text-shadow: 0 1px 4px rgba(12, 25, 48, 0.7) !important;
}

/* Manifeste */
body.ambiance-winter .manifesto p,
body.ambiance-winter .manifesto-quote,
body.ambiance-winter .manifesto-sign {
  color: #ffffff !important;
  opacity: 1 !important;
}
body.ambiance-winter .manifesto .glow-cyan {
  color: #d4a960 !important;
}
