/* ═══════════════════════════════════════════════════════════════
   AlcalSpark — Design System
   Palette exclusive : #385144 (vert) + #F8F5F2 (crème)
═══════════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --green: #385144;
  --cream: #F8F5F2;

  --g90: rgba(56,81,68,.9);
  --g70: rgba(56,81,68,.7);
  --g50: rgba(56,81,68,.5);
  --g30: rgba(56,81,68,.3);
  --g15: rgba(56,81,68,.15);
  --g08: rgba(56,81,68,.08);
  --g04: rgba(56,81,68,.04);

  --c90: rgba(248,245,242,.9);
  --c70: rgba(248,245,242,.7);
  --c50: rgba(248,245,242,.5);
  --c30: rgba(248,245,242,.3);
  --c15: rgba(248,245,242,.15);
  --c08: rgba(248,245,242,.08);

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:  'Raleway', 'Segoe UI', system-ui, sans-serif;

  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.4, 0, 1, 1);
  --ease-std: cubic-bezier(0.25, 0.1, 0.25, 1);

  --max-w:      1320px;
  --pad-x:      clamp(1.25rem, 5vw, 4.5rem);
  --section-py: clamp(5rem, 10vw, 9rem);
  --nav-h:      4.75rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--cream);
  color: var(--green);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; border: none; background: none; cursor: pointer; }
ul, ol { list-style: none; }
em { font-style: italic; }
svg { display: block; flex-shrink: 0; }

/* ── Typographie ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(3.5rem, 9vw, 13rem); }
h2 { font-size: clamp(2.5rem, 5vw, 6.5rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 2.2rem); }
h4 {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: .05em;
  text-transform: uppercase;
}

h1 em, h2 em, h3 em { font-style: italic; font-weight: 300; }

p { max-width: 62ch; text-wrap: pretty; }

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

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

/* ── Page heroes (shared layout) ────────────────────────────── */
.page-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}
.ph-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ph-content {
  position: relative;
  z-index: 2;
  padding-top: clamp(60px, 8vw, 100px);
  padding-bottom: clamp(60px, 8vw, 100px);
}

/* ── Label / eyebrow ─────────────────────────────────────────── */
.label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-sans);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--g50);
  margin-bottom: 1.25rem;
}
.label::before,
.eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

/* ── Reveal on scroll ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal-scale {
  opacity: 0;
  transform: scale(.96);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible { opacity: 1; transform: none; }

.delay-1 { transition-delay: .10s; }
.delay-2 { transition-delay: .22s; }
.delay-3 { transition-delay: .34s; }
.delay-4 { transition-delay: .46s; }
.delay-5 { transition-delay: .58s; }
.delay-6 { transition-delay: .72s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    transition: opacity .3s;
    transform: none;
  }
}

/* ── Grain / noise ───────────────────────────────────────────── */
.noise-overlay {
  position: fixed;
  inset: -200%;
  width: 400%;
  height: 400%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: .3;
}

/* ── Loading screen ──────────────────────────────────────────── */
@keyframes ls-safeguard {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--green);
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transition: opacity .7s var(--ease), visibility .7s;
  animation: ls-safeguard .8s 4s forwards;
}
#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 300;
  letter-spacing: .2em;
  color: var(--cream);
  display: flex;
}
.loading-logo span {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  animation: loadChar .55s var(--ease) forwards;
}
@keyframes loadChar {
  to { opacity: 1; transform: none; }
}

.loading-bar-wrap {
  width: 7rem;
  height: 1px;
  background: var(--c15);
  overflow: hidden;
}
.loading-bar {
  height: 100%;
  background: var(--cream);
  width: 0;
  transition: width .05s linear;
}
.loading-percent {
  font-size: .68rem;
  letter-spacing: .2em;
  color: var(--c50);
}

/* ── Page transition ─────────────────────────────────────────── */
#page-transition {
  position: fixed;
  inset: 0;
  z-index: 9980;
  pointer-events: none;
}
.curtain-gold {
  position: absolute;
  inset: 0;
  background: var(--g70);
  transform: translateY(100%);
  transition: transform .42s var(--ease-in);
}
.curtain {
  position: absolute;
  inset: 0;
  background: var(--green);
  transform: translateY(100%);
  transition: transform .52s .06s var(--ease-in);
}
#page-transition.active .curtain,
#page-transition.active .curtain-gold { transform: translateY(0); }

.logo-reveal {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-serif);
  font-size: 2rem;
  letter-spacing: .22em;
  color: var(--cream);
  opacity: 0;
  transition: opacity .3s .25s;
}
#page-transition.active .logo-reveal { opacity: 1; }

/* ── Scroll progress ─────────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 1px;
  background: var(--green);
  z-index: 1001;
  transition: width .1s linear;
  pointer-events: none;
}

/* ── Navigation ──────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  border-bottom: 1px solid transparent;
  transition: background .45s var(--ease),
              border-color .45s var(--ease),
              color .45s var(--ease);
  background: transparent;
  color: var(--green);
}

#navbar.nav-dark {
  background: var(--green);
  color: var(--cream);
  border-bottom-color: var(--c15);
}
#navbar.scrolled {
  background: var(--green);
  color: var(--cream);
  border-bottom-color: var(--c15);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1;
}
.nav-logo em { font-style: italic; font-weight: 300; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3.5rem);
}

.nav-link {
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  position: relative;
  opacity: .65;
  transition: opacity .3s;
}
.nav-link:hover, .nav-link.active { opacity: 1; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -.25em;
  width: 0; height: 1px;
  background: currentColor;
  transition: width .38s var(--ease);
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.nav-cta {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: .6rem 1.5rem;
  border: 1px solid currentColor;
  opacity: 1;
  transition: background .3s, color .3s, border-color .3s;
}
.nav-cta::after { display: none; }

#navbar:not(.scrolled):not(.nav-dark) .nav-cta:hover {
  background: var(--green);
  color: var(--cream);
  border-color: var(--green);
}
#navbar.scrolled .nav-cta:hover,
#navbar.nav-dark .nav-cta:hover {
  background: var(--cream);
  color: var(--green);
  border-color: var(--cream);
}

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
}
.nav-burger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform .38s var(--ease), opacity .38s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile overlay nav ──────────────────────────────────────── */
.nav-mobile {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--green);
  color: var(--cream);
  z-index: 990;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: calc(var(--nav-h) + 3rem) var(--pad-x) 3.5rem;
  gap: 1.75rem;
  transform: translateY(-105%);
  transition: transform .5s var(--ease-in);
  pointer-events: none;
}
.nav-mobile.open {
  transform: translateY(0);
  pointer-events: auto;
}
.nav-mobile a {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 400;
  opacity: .85;
  transition: opacity .3s;
}
.nav-mobile a:hover { opacity: 1; }

/* ── Boutons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-sans);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 1.1rem 2.75rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background .35s var(--ease),
              color .35s var(--ease),
              border-color .35s var(--ease),
              transform .35s var(--ease);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.btn:active { transform: scale(.97) translateY(1px) !important; }

/* Plein vert */
.btn-primary {
  background: var(--green);
  color: var(--cream);
  border: 1px solid var(--green);
}
.btn-primary:hover { background: transparent; color: var(--green); }

/* Contour vert */
.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--g30);
}
.btn-outline:hover {
  background: var(--green);
  color: var(--cream);
  border-color: var(--green);
}

/* Inversé — fond vert */
.btn-inv {
  background: var(--cream);
  color: var(--green);
  border: 1px solid var(--cream);
}
.btn-inv:hover { background: transparent; color: var(--cream); }

.btn-outline-inv {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--c30);
}
.btn-outline-inv:hover {
  background: var(--cream);
  color: var(--green);
  border-color: var(--cream);
}

/* Texte + flèche */
.btn-ghost {
  background: transparent;
  color: inherit;
  border: none;
  padding: 0;
  letter-spacing: .14em;
  font-size: .72rem;
  gap: 1rem;
}
.arrow-line {
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  position: relative;
  top: -.05em;
  transition: width .4s var(--ease);
}
.btn-ghost:hover .arrow-line { width: 3.5rem; }

/* Bouton or — compatibilité CSS existant (pas utilisé en practice) */
.btn-gold { background: var(--green); color: var(--cream); border: 1px solid var(--green); }
.btn-gold:hover { background: transparent; color: var(--green); }

/* Ripple */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
  animation: btnRipple .65s linear forwards;
  background: rgba(255,255,255,.2);
}
@keyframes btnRipple {
  from { transform: scale(0); opacity: .4; }
  to   { transform: scale(8); opacity: 0; }
}

/* ── Marquee ─────────────────────────────────────────────────── */
.marquee-track {
  overflow: hidden;
  border-top: 1px solid var(--g15);
  border-bottom: 1px solid var(--g15);
  padding: 1rem 0;
}
.marquee-inner {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marqueeScroll 32s linear infinite;
}
.marquee-inner span {
  font-family: var(--font-sans);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--g50);
  flex-shrink: 0;
}
.marquee-inner .accent { color: var(--g30); }

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .marquee-inner { animation: none; } }

/* ── Footer ──────────────────────────────────────────────────── */
#footer {
  background: #243029;
  border-top: 1px solid rgba(248,245,242,0.12);
  color: var(--cream);
  padding: 3.5rem var(--pad-x) 2rem;
}
.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2.2fr repeat(3, 1fr);
  gap: 2.5rem 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--c15);
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: .05em;
  margin-bottom: 1.25rem;
}
.footer-logo-link em { font-style: italic; font-weight: 300; }
.footer-logo-img { display: none; }

.footer-tagline {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--c90);
  margin-bottom: .4rem;
}
.footer-brand p {
  font-size: .85rem;
  color: var(--c50);
  line-height: 1.65;
  max-width: 28ch;
}
.footer-socials {
  margin-top: 1.75rem;
  display: flex;
  gap: 1rem;
}
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--c30);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .3s, color .3s, border-color .3s;
}
.social-icon:hover { background: var(--cream); color: var(--green); border-color: var(--cream); }

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--c50);
  margin-bottom: 1.5rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: .75rem; }
.footer-col a {
  font-size: .9rem;
  color: var(--c90);
  transition: color .3s;
}
.footer-col a:hover { color: var(--cream); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .75rem;
  color: var(--c50);
}

/* ── WhatsApp ────────────────────────────────────────────────── */
.whatsapp-btn {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 3.25rem; height: 3.25rem;
  background: var(--green);
  color: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  box-shadow: 0 4px 24px rgba(56,81,68,.28);
  transition: transform .3s var(--ease), box-shadow .3s;
  border: 1px solid var(--g30);
}
.whatsapp-btn:hover { transform: scale(1.1); box-shadow: 0 8px 36px rgba(56,81,68,.4); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

@media (max-width: 768px) {
  :root { --nav-h: 4rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}

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

/* ── Compatibilité — anciens tokens vers nouveau système ───── */
:root {
  --gold:          var(--green);
  --gold-light:    var(--g70);
  --gold-muted:    var(--g50);
  --black:         var(--green);
  --off-white:     var(--cream);
  --bg-dark:       var(--green);
  --bg-dark-2:     #2e4139;
  --text-light:    var(--cream);
  --text-muted:    var(--c70);
  --border-subtle: var(--g15);
  --font-display:  var(--font-serif);
  --font-ui:       var(--font-sans);
  --font-body:     var(--font-sans);
  --ease-spring:   var(--ease);
  --ease-out-expo: var(--ease);
  --gold-rgb:      56,81,68;
  --black-soft:    #2e4139;
  --beige:         var(--cream);
  --brown:         var(--g70);
}

/* Sections sombres héritées */
.section-dark {
  background: var(--green);
  color: var(--cream);
}
.section-dark .eyebrow,
.section-dark .label { color: var(--cream); }

/* Texte et boutons sur fond vert */
.section-dark .text-gradient {
  color: var(--c90);
  -webkit-text-fill-color: var(--c90);
  font-style: italic;
  font-weight: 300;
}
.section-dark .btn-gold,
.section-dark .btn-primary {
  background: var(--cream);
  color: var(--green);
  border-color: var(--cream);
}
.section-dark .btn-gold:hover,
.section-dark .btn-primary:hover {
  background: transparent;
  color: var(--cream);
}
.section-dark .btn-outline {
  color: var(--cream);
  border-color: var(--c40);
}
.section-dark .btn-outline:hover {
  background: var(--cream);
  color: var(--green);
  border-color: var(--cream);
}

/* Carte générique — fond vert, texte crème */
.card {
  background: var(--green);
  color: var(--cream);
  border: 1px solid var(--g15);
  border-radius: 6px;
}

/* Ligne décorative dorée → verte */
.gold-line-center {
  width: 3rem;
  height: 1px;
  background: var(--g30);
  margin: 1.5rem auto;
}

/* Dégradé texte → italic simple */
.text-gradient {
  font-style: italic;
  font-weight: 300;
  color: var(--green);
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: var(--green);
  background-clip: initial;
}

.section-desc {
  font-size: clamp(.9rem, 1.2vw, 1.05rem);
  color: var(--g70);
  max-width: 54ch;
}
.section-dark .section-desc { color: var(--c70); }

/* Espacements utilitaires */
.mt-sm  { margin-top: 1.25rem; }
.mt-md  { margin-top: 2rem; }
.mt-lg  { margin-top: 3rem; }
.mt-xl  { margin-top: 4.5rem; }

/* Section header centré */
.section-header { margin-bottom: 3rem; }
.section-header.text-center { text-align: center; }
.section-header.text-center .gold-line-center { margin: 1.5rem auto; }
.section-header.text-center .eyebrow { justify-content: center; }

/* Bandeau cookie */
#cookie-banner {
  position: fixed;
  bottom: -150px;
  left: 1rem; right: 1rem;
  max-width: 700px;
  margin: 0 auto;
  background: var(--green);
  color: var(--cream);
  z-index: 8000;
  padding: 1.5rem 2rem;
  border: 1px solid var(--c15);
  transition: bottom .5s var(--ease);
}
#cookie-banner.show { bottom: 1.5rem; }
.cookie-inner { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; }
.cookie-text strong {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}
.cookie-text p { font-size: .82rem; color: var(--c70); line-height: 1.5; }
.cookie-text a { color: var(--cream); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: .75rem; flex-shrink: 0; }
.cookie-btn {
  font-family: var(--font-sans);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .65rem 1.35rem;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
  border: 1px solid transparent;
}
.cookie-refuse { background: transparent; color: var(--c70); border-color: var(--c30); }
.cookie-refuse:hover { color: var(--cream); border-color: var(--cream); }
.cookie-accept { background: var(--cream); color: var(--green); }
.cookie-accept:hover { opacity: .9; }
