/* ===================================================================
   LES DOMAINES — brand tokens
=================================================================== */
@font-face {
  font-family: "Dax";
  src: url("../assets/fonts/Dax-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Dax";
  src: url("../assets/fonts/Dax-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Dax";
  src: url("../assets/fonts/Dax-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bone: #F7F5EF;
  --night-olive: #12180F;
  --deep-olive: #2E3A22;
  --leaf-green: #7E9C31;
  --lime: #C2D500;
  --seal-red: #BE1622;

  --font-display: "Dax", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Dax", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --space-1: 4px;  --space-2: 8px;  --space-3: 16px; --space-4: 24px;
  --space-5: 32px; --space-6: 48px; --space-7: 64px; --space-8: 96px;
  --space-9: 128px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1360px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
html { scroll-behavior: smooth; }
html.lenis { scroll-behavior: auto !important; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--night-olive);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, blockquote, p, ul { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--lime); color: var(--night-olive); }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--leaf-green);
  margin-bottom: var(--space-3);
}

h1, h2, .manifesto__quote {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}
em { font-style: normal; color: inherit; }

/* ===================================================================
   TEXTURE PLACEHOLDER SYSTEM
   Every [data-texture] container gets a mood-matched gradient so the
   page reads intentionally before real Higgsfield assets are dropped
   in. Real media sits on top; JS (main.js) hides broken media so the
   gradient shows through cleanly instead of a blank video box.
=================================================================== */
[data-texture] {
  position: relative;
  background-size: cover;
  background-position: center;
}
[data-texture="sol"]            { background: radial-gradient(120% 120% at 30% 20%, #3c3226, #14100b); }
[data-texture="champ-dore"]      { background: radial-gradient(120% 120% at 30% 20%, #cbab55, #6b5321); }
[data-texture="lait"]            { background: radial-gradient(120% 120% at 40% 30%, #fbfaf6, #d8d3c4); }
[data-texture="verre-boutique"]  { background: radial-gradient(120% 120% at 50% 30%, #4a4030, #1b1712); }
[data-texture="lin-agrumes"]     { background: radial-gradient(120% 120% at 40% 30%, #e9dfc4, #c98a3f); }
[data-texture="paturage"]        { background: radial-gradient(120% 120% at 30% 20%, #92a35a, #465225); }
[data-texture="feuille"]         { background: radial-gradient(120% 120% at 40% 30%, #5c7a3c, #253616); }
[data-texture="herbes"]          { background: radial-gradient(120% 120% at 40% 30%, #7c9463, #33422a); }
[data-texture="rucher"]          { background: radial-gradient(120% 120% at 40% 30%, #d9a53a, #7a5915); }
[data-texture="pousse"]          { background: radial-gradient(120% 120% at 40% 60%, #5c7a3c, #241c14); }
[data-texture="marque-chergui"]  { background: radial-gradient(120% 120% at 50% 40%, #ffffff, #dedad0); }
[data-texture="marque-tiyya"]    { background: radial-gradient(120% 120% at 50% 40%, #e8c766, #6b5321); }
[data-texture="marque-afourer"]  { background: radial-gradient(120% 120% at 50% 40%, #f2a33f, #b3541d); }
[data-texture="boutique-casablanca"] { background: radial-gradient(120% 120% at 50% 30%, #4a4030, #1b1712); }
[data-texture="boutique-rabat"]      { background: radial-gradient(120% 120% at 50% 30%, #4a4030, #1b1712); }
[data-texture="boutique-marrakech"]  { background: radial-gradient(120% 120% at 50% 30%, #4a4030, #1b1712); }

[data-texture] video,
[data-texture] img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
[data-texture].media-fallback video,
[data-texture].media-fallback img { display: none; }

/* ===================================================================
   PILL BUTTON — glass, sliding arrow chip
=================================================================== */
.pill-btn {
  position: relative;
  display: inline-flex; align-items: center;
  height: 52px; padding: 0 100px 0 24px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 0.9375rem; letter-spacing: -0.01em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  isolation: isolate;
}
.pill-btn--ghost {
  /* Header is position:fixed and scrolls over both dark and light section
     backgrounds — the glass tint is kept dark enough on its own that the
     white label stays AA-legible regardless of what's behind it. */
  background: rgba(18,24,15,0.62);
  border: 1px solid rgba(247,245,239,0.3);
  color: var(--bone);
}
.pill-btn--solid {
  background: rgba(247,245,239,0.9);
  border: 1px solid rgba(247,245,239,0.9);
  color: var(--night-olive);
}
.pill-btn__chip {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--lime); color: var(--night-olive);
  transition: right 0.45s var(--ease);
}
/* Hover target is a fixed offset kept inside the button's own right-hand
   padding zone (100px), never a fraction of total width — that's what
   made the old calc(100% - 48px) land on top of the label for any button
   wider than ~90px. This way the chip always stops with a safe margin
   before the label, regardless of label length. */
.pill-btn:hover .pill-btn__chip { right: 48px; }

/* ===================================================================
   LOADER
=================================================================== */
#loader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: var(--night-olive);
  overflow: hidden;
}
.loader-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transform: scale(1.45);
}
.loader-scrim { position: absolute; inset: 0; background: rgba(18,24,15,0.6); }
.loader-mark {
  position: relative; width: 72px; height: 72px;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.35));
}
.loader-mark img {
  width: 100%; height: 100%; object-fit: contain;
  /* Real logo is full-color (red/green/white) — force it to a flat white
     mark for the loader per the brief's "white logo floating" spec. */
  filter: brightness(0) invert(1);
}
body.loader-active { overflow: hidden; height: 100vh; }

/* ===================================================================
   HEADER
=================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: center;
  padding: var(--space-4) var(--space-5);
  color: var(--bone);
}
.header-bar {
  width: 100%; max-width: 1180px;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5);
  padding: 10px 12px 10px 22px;
  border-radius: 999px;
  background: rgba(18, 24, 15, 0.42);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(247, 244, 235, 0.14);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}
.brand-lockup { display: flex; align-items: center; color: inherit; }
.brand-mark { height: 68px; width: auto; display: block; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.25)); }
.header-nav {
  display: flex; align-items: center; gap: var(--space-5);
  list-style: none; margin: 0; padding: 0;
}
.header-nav a {
  color: inherit; text-decoration: none;
  font-size: 0.9rem; letter-spacing: 0.01em; opacity: 0.82;
  transition: opacity 0.2s ease;
}
.header-nav a:hover, .header-nav a:focus-visible { opacity: 1; }

/* ===================================================================
   HERO
=================================================================== */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden; background: var(--night-olive);
}
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,24,15,0.08) 0%, rgba(18,24,15,0.22) 55%, rgba(18,24,15,0.48) 100%);
}
.hero__content {
  position: relative; z-index: 2; color: var(--bone);
  padding: var(--space-9) var(--space-5) var(--space-8);
  max-width: 900px;
}
.hero__title {
  font-size: clamp(2.25rem, 4.6vw + 1rem, 5.75rem);
  margin-bottom: var(--space-4);
}
.hero__sub {
  max-width: 560px; font-size: 1.05rem; opacity: 0.92;
  margin-bottom: var(--space-5);
}
.word { display: inline-block; }
.char { display: inline-block; will-change: transform, color; }

/* ===================================================================
   MANIFESTO
=================================================================== */
.manifesto {
  padding: var(--space-9) var(--space-5);
  display: flex; justify-content: center;
  background: var(--bone);
}
.manifesto__quote {
  max-width: 900px; text-align: center;
  font-size: clamp(1.75rem, 2.6vw + 1rem, 3.25rem);
  font-weight: 700;
}
.manifesto__quote .char { color: var(--leaf-green); opacity: 0.35; }

/* ===================================================================
   SIGNATURE LINE SECTION
=================================================================== */
.line-section {
  position: relative; color: var(--bone);
  /* A flat solid fill read as dead weight around the small stage photos —
     a soft vignette gives the section depth even where no media covers it. */
  background: radial-gradient(120% 90% at 50% 0%, #212b18 0%, var(--night-olive) 55%, #0c1008 100%);
}
.line-section__intro {
  padding: var(--space-8) var(--space-5) var(--space-6);
  max-width: 720px; margin: 0 auto; text-align: center;
}
.line-section__intro h2 { font-size: clamp(2rem, 3.2vw + 1rem, 4rem); margin-bottom: var(--space-3); }
.line-section__intro-copy { opacity: 0.85; font-size: 1.0625rem; }

.line-runway {
  position: relative;
  height: 500vh; /* scroll runway driving the 5-stage progress */
}
.line-viewport {
  position: sticky; top: 0; left: 0;
  width: 100%; height: 100vh;
  overflow: hidden;
}
.line-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0 auto; display: block;
}
#unbroken-path-fill { stroke: var(--lime); stroke-width: 2; fill: none; }
#unbroken-path { stroke: rgba(247,245,239,0.15); stroke-width: 2; fill: none; }

.stage-marker {
  position: absolute; left: 50%;
  width: 22px; height: 22px; margin-left: -11px;
  opacity: 0; transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.stage-marker.is-active { opacity: 1; transform: scale(1); }
.stage-marker__glyph {
  display: block; width: 100%; height: 100%;
  /* Recolor the real logo's alpha shape to solid lime for a small in-line
     pip via mask (not <img>, so we control the fill color directly) —
     the full-color lockup reads as noise at 22px. */
  -webkit-mask-image: url("../assets/logo/compact-logo.png");
  mask-image: url("../assets/logo/compact-logo.png");
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  background-color: var(--lime);
}

.stage-card {
  position: absolute; top: 50%; left: 50%;
  width: min(560px, 90vw);
  transform: translate(-50%, -50%) translateY(24px);
  padding: var(--space-3);
  border-radius: 24px;
  background: rgba(247,245,239,0.08);
  border: 1px solid rgba(247,245,239,0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.stage-card.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0);
  pointer-events: auto;
}
.stage-card__num {
  position: absolute; top: var(--space-4); left: var(--space-4); z-index: 1;
  font-family: var(--font-display); font-weight: 700;
  color: var(--bone); font-size: 0.875rem; letter-spacing: 0.08em;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(18,24,15,0.5); backdrop-filter: blur(6px);
}
.stage-card__media {
  position: relative;
  aspect-ratio: 4 / 3; width: 100%; height: auto;
  border-radius: 18px; overflow: hidden;
  margin-bottom: var(--space-3);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.stage-card__body { padding: 0 var(--space-2) var(--space-2); }
.stage-card h3 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.stage-card p { opacity: 0.85; font-size: 0.9375rem; }

/* ===================================================================
   ENGAGEMENTS
=================================================================== */
.engagements { padding: var(--space-8) var(--space-5); background: var(--bone); }
.engagements .eyebrow { text-align: center; }
.engagements__list {
  list-style: none; padding: 0; margin: 0 auto; max-width: var(--container);
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3);
}
.engagement-chip {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  background: rgba(46,58,34,0.06);
  border: 1px solid rgba(46,58,34,0.12);
  font-size: 0.9375rem; font-weight: 500;
  opacity: 0; transform: translateY(12px);
}
.draw-icon {
  width: 18px; height: 18px; flex-shrink: 0;
  fill: none; stroke: var(--leaf-green); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60;
}

/* ===================================================================
   FILIÈRES BENTO
=================================================================== */
.filieres { padding: var(--space-8) var(--space-5); background: var(--deep-olive); color: var(--bone); }
.filieres .eyebrow { color: var(--lime); }
.filieres h2 { font-size: clamp(1.75rem, 2.6vw + 1rem, 3rem); max-width: 640px; margin-bottom: var(--space-6); }
.bento {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3);
  max-width: var(--container); margin: 0 auto;
}
.bento-tile {
  position: relative; border-radius: 16px; overflow: hidden;
  min-height: 220px; grid-column: span 1;
  opacity: 0; transform: translateY(24px);
}
.bento-tile--large { grid-column: span 2; grid-row: span 2; min-height: 460px; }
.bento-tile__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,24,15,0.1), rgba(18,24,15,0.75)); }
.bento-tile h3 {
  position: relative; z-index: 1; align-self: flex-end;
  padding: var(--space-3); font-size: 1.125rem;
}
.bento-tile { display: flex; align-items: flex-end; }

/* ===================================================================
   NOS MARQUES
=================================================================== */
.marques { padding: var(--space-8) var(--space-5); background: var(--bone); }
.marques .eyebrow { text-align: center; }
.marques__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3);
  max-width: var(--container); margin: 0 auto;
}
.marque-panel {
  position: relative; border-radius: 16px; overflow: hidden;
  aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--bone); padding: var(--space-4);
}
.marque-panel__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,24,15,0.05), rgba(18,24,15,0.7)); }
.marque-panel h3, .marque-panel p { position: relative; z-index: 1; }
.marque-panel h3 { font-size: 1.5rem; margin-bottom: var(--space-1); }
.marque-panel p { opacity: 0.85; font-size: 0.9375rem; }

/* ===================================================================
   RÉSEAU DE BOUTIQUES
=================================================================== */
.reseau { padding: var(--space-8) var(--space-5); background: var(--bone); }
.reseau .eyebrow { text-align: center; }
.reseau__list {
  list-style: none; padding: 0; margin: 0 auto; max-width: 640px;
}
.reseau__list li {
  display: flex; justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(46,58,34,0.15);
  font-family: var(--font-display); font-weight: 500; font-size: 1.0625rem;
}
.reseau__upcoming { opacity: 0.55; }

/* ===================================================================
   CITY SELECTOR
=================================================================== */
.city-select { padding: var(--space-8) var(--space-5); background: var(--night-olive); color: var(--bone); text-align: center; }
.city-select .eyebrow { color: var(--lime); }
.city-select h2 { font-size: clamp(2rem, 3.2vw + 1rem, 3.5rem); margin-bottom: var(--space-6); }
.city-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3);
  max-width: var(--container); margin: 0 auto var(--space-5);
}
.city-tile {
  position: relative; border-radius: 16px; overflow: hidden;
  min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--space-4); text-align: left;
  transition: transform 0.4s var(--ease);
}
.city-tile:hover { transform: translateY(-4px); }
.city-tile__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,24,15,0.15), rgba(18,24,15,0.8)); }
.city-tile__name { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; }
.city-tile__zone { position: relative; z-index: 1; font-size: 0.8125rem; opacity: 0.75; margin-top: var(--space-1); }
.city-select__facts { opacity: 0.65; font-size: 0.875rem; max-width: 640px; margin: 0 auto; }

/* ===================================================================
   FOOTER
=================================================================== */
.site-footer { background: var(--deep-olive); color: var(--bone); padding: var(--space-8) var(--space-5) var(--space-5); overflow: hidden; }
.site-footer__top {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4);
  max-width: var(--container); margin: 0 auto var(--space-7);
  font-size: 0.9375rem;
}
.site-footer__links { display: flex; gap: var(--space-4); }
.site-footer__links a { opacity: 0.8; }
.site-footer__links a:hover { opacity: 1; color: var(--lime); }
.footer-wordmark {
  font-size: clamp(3rem, 14vw, 12rem);
  text-align: center; white-space: nowrap;
  color: var(--bone);
  transform: translateY(40px);
  opacity: 0.92;
}
.site-footer__legal { text-align: center; opacity: 0.55; font-size: 0.8125rem; margin-top: var(--space-5); }

/* ===================================================================
   REDUCED MOTION
=================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .char, .stage-card, .stage-marker, .engagement-chip, .bento-tile, .draw-icon {
    opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important;
  }
  .manifesto__quote .char { color: var(--night-olive); }
  .line-runway { height: auto; }
  .line-viewport { position: relative; height: auto; padding: var(--space-6) 0; }
  .line-svg { display: none; }
  .stage-marker { display: none; }
  .stage-card {
    position: relative; top: 0; left: 0; transform: none !important;
    margin: 0 auto var(--space-5); opacity: 1 !important;
  }
  .footer-wordmark { transform: none; }
}

/* ===================================================================
   MOBILE
=================================================================== */
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-tile--large { grid-column: span 2; grid-row: span 1; min-height: 260px; }
  .marques__grid { grid-template-columns: 1fr; }
  .city-grid {
    grid-template-columns: 1fr; }
  .header-nav { display: none; }
}

@media (max-width: 720px) {
  .site-header { padding: var(--space-3) var(--space-4); }
  .header-bar { padding: 8px 8px 8px 16px; }
  .brand-mark { height: 44px; }
  .hero__content { padding: var(--space-8) var(--space-4) var(--space-6); }
  .line-runway { height: auto; }
  .line-viewport {
    position: relative; height: auto;
    display: flex; flex-direction: column; gap: var(--space-4);
    padding: var(--space-6) var(--space-4) var(--space-8);
  }
  .line-svg { display: none; }
  .stage-marker { display: none; }
  .stage-card {
    position: relative; top: 0; left: 0; transform: none !important;
    opacity: 1 !important; width: 100%; margin: 0;
  }
  .city-grid { scroll-snap-type: x mandatory; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; display: flex; }
  .city-tile { scroll-snap-align: center; flex: 0 0 82%; }

  .pill-btn__label { white-space: nowrap; }
  .pill-btn { padding: 0 76px 0 18px; height: 44px; font-size: 0.8125rem; }
  .pill-btn__chip { width: 30px; height: 30px; top: 7px; right: 7px; }
  .pill-btn:hover .pill-btn__chip, .pill-btn:active .pill-btn__chip { right: 30px; }
  .brand-mark { height: 36px; }
}

@media (max-width: 360px) {
  .hero__title { font-size: 2rem; }
  .footer-wordmark { font-size: 2.5rem; }
  .pill-btn { font-size: 0.75rem; padding: 0 68px 0 14px; }
  .pill-btn:hover .pill-btn__chip, .pill-btn:active .pill-btn__chip { right: 22px; }
  .brand-mark { height: 32px; }
}
