/* ============================================================
   MINOTERIES GOUBET — Refonte moderne
   ============================================================ */

:root {
  /* Légende : on conserve les noms de variables, mais la charte passe au
     blanc / rose framboise (#d7295c) de l'identité historique Goubet. */
  --flour:      #FFFFFF;            /* fond clair principal */
  --cream:      #FDF1F5;            /* fond de section rose très clair */
  --cream-2:    #F7DEEA;            /* bordures / séparateurs rose clair */
  --wheat:      #D7295C;            /* accent rose framboise (ex-or) */
  --wheat-deep: #B11E4B;            /* rose foncé (liens / survol) */
  --wheat-soft: #EE9DB6;            /* rose doux */
  --bark:       #8A2A48;            /* framboise foncé secondaire */
  --espresso:   #241019;            /* prune quasi noir (texte / éléments sombres) */
  --ink:        #2C2230;            /* texte / titres */
  --muted:      #847C84;            /* texte secondaire gris-mauve */
  --line:       rgba(36, 16, 25, 0.12);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;

  --container: 1180px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  /* Canvas / over-scroll en rose clair : le bas de page (footer) est rose,
     un débordement blanc y ferait une « boîte blanche ». La barre d'état
     iOS reste blanche via <meta name="theme-color">. */
  background: var(--cream);
  overflow-x: hidden;
}
html.legal-html { background: var(--cream); }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--flour);
  line-height: 1.65;
  overflow-x: hidden;
  font-weight: 400;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: italic; }

::selection { background: var(--wheat); color: var(--espresso); }

.container { width: min(100% - 3rem, var(--container)); margin-inline: auto; }
.section { padding: clamp(5rem, 11vw, 9rem) 0; position: relative; }

/* ---------- Typography ---------- */
.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--espresso);
}
.section__title em { color: var(--wheat-deep); font-weight: 400; }

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--wheat-deep);
  margin-bottom: 1.1rem;
  position: relative;
  padding-left: 2.6rem;
}
.eyebrow::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 2rem; height: 1px;
  background: var(--wheat-deep);
}
.eyebrow--center { padding-left: 0; }
.eyebrow--center::before { display: none; }

.section__head { max-width: 640px; margin-bottom: 3.5rem; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__intro { margin-top: 1.3rem; font-size: 1.08rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  --pad: 0.95rem 1.9rem;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: var(--pad);
  font-weight: 600; font-size: 0.95rem;
  border-radius: 100px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .4s var(--ease), background .35s, color .35s, box-shadow .35s;
  position: relative; overflow: hidden;
}
.btn--solid {
  background: var(--wheat); color: #fff;
  box-shadow: 0 10px 30px -12px rgba(215, 41, 92, 0.55);
}
.btn--solid:hover { background: var(--wheat-deep); transform: translateY(-3px); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { background: rgba(215, 41, 92, 0.06); transform: translateY(-3px); border-color: var(--wheat); color: var(--wheat-deep); }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--wheat-deep), var(--wheat-soft));
  z-index: 200; transition: width .1s linear;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 300;
  background: var(--flour);
  display: grid; place-items: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__inner { text-align: center; color: var(--wheat); }
.preloader__wheat { width: 34px; height: 68px; color: var(--wheat); animation: sway 1.6s ease-in-out infinite; }
.preloader__text {
  display: block; margin-top: 1rem;
  font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--espresso);
  opacity: 0; animation: fadeUp .8s .2s forwards;
}
@keyframes sway { 0%,100%{ transform: rotate(-6deg);} 50%{ transform: rotate(6deg);} }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  transition: background .4s var(--ease), box-shadow .4s, padding .4s;
  padding: 1.4rem 0;
}
.nav.is-scrolled {
  box-shadow: 0 1px 0 var(--line);
  padding: 0.5rem 0;
}
/* Frosted background on a pseudo-element: a backdrop-filter on .nav itself would
   make the header the containing block for the fixed mobile drawer (.nav__links) */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0; transition: opacity .4s var(--ease);
}
.nav.is-scrolled::before { opacity: 1; }
.nav__inner {
  width: min(100% - 3rem, 1280px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); transition: color .4s; }
.nav__logo { height: 52px; width: auto; display: block; transition: height .4s var(--ease); }
.nav.is-scrolled .nav__logo { height: 42px; }
.nav__brand-icon { width: 16px; height: 32px; color: var(--wheat); }
.nav__brand-text { font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; letter-spacing: .01em; }
.nav__brand-text strong { font-weight: 600; }

.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a {
  font-size: 0.92rem; font-weight: 500; color: var(--ink);
  position: relative; transition: color .35s; opacity: .92;
}
.nav.is-scrolled .nav__links a { color: var(--ink); }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 1.5px; background: var(--wheat-deep); transition: width .35s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__links a:not(.nav__cta):hover { opacity: 1; }
.nav__cta {
  padding: 0.55rem 1.4rem; border-radius: 100px;
  opacity: 1 !important; transition: background .3s, color .3s, transform .3s, box-shadow .3s;
  background: var(--wheat) !important;
  color: #fff !important;
  border: 1px solid var(--wheat) !important;
  font-weight: 700;
}
.nav__cta::after { display: none !important; }
.nav__cta:hover {
  background: var(--wheat-deep) !important; color: #fff !important;
  border-color: var(--wheat-deep) !important;
  transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(215,41,92,.6);
}

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__burger span { width: 26px; height: 2px; background: var(--ink); transition: .35s var(--ease); }
.nav.is-scrolled .nav__burger span { background: var(--espresso); }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  color: var(--ink); overflow: hidden;
  padding: 8rem 0 4rem;
  /* Own stacking context so the negative-z background layers stay scoped
     to the hero (and aren't hidden by the body background). */
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -4;
  background:
    radial-gradient(ellipse at 72% 18%, rgba(215,41,92,.12), transparent 55%),
    /* Top stop = white so the hero top matches the body / status-bar tint (no seam) */
    linear-gradient(165deg, #ffffff 0%, #fdeef4 55%, #fbe2ec 100%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("../assets/wheat-deco.png");
  background-repeat: no-repeat;
  background-size: clamp(340px, 38vw, 660px) auto;
  background-position: right clamp(-50px, -2vw, -10px) bottom -30px;
  opacity: 0.4;
}
/* Background video — scaled to COVER the hero (16:9 cover trick).
   Until the visitor interacts, the poster (the video's own logo intro) is shown. */
.hero__video {
  position: absolute; inset: 0; z-index: -3; overflow: hidden; pointer-events: none;
  background: #fff url("../assets/photos/video-poster.jpg") center/cover no-repeat;
}
.hero__video iframe {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 100vw; height: 56.25vw;            /* 16:9 by width */
  min-height: 100vh; min-width: 177.78vh;   /* …or by height, whichever covers */
  border: 0;
}
/* Desktop / paysage : l'affiche et la vidéo vivent SOUS l'en-tête, jamais derrière
   les liens. Hauteur de l'en-tête en haut de page = logo 52px + 2 × 1.4rem.
   - Avant la vidéo : l'affiche (le logo de l'intro de la vidéo) est entière, centrée,
     sur son blanc, à la taille exacte d'une image 16:9 « contain » (video-poster-logo.jpg
     = video-poster.jpg sans ses bords noirs : 1px à gauche/droite, 7px en haut/bas,
     d'où les facteurs 1198/1200 et 661/675, pour rester calée pixel pour pixel).
   - Vidéo : couvre la zone. Elle reste invisible tant que YouTube charge, puis apparaît
     en fondu à la taille de l'affiche (même image), puis grandit jusqu'à couvrir (.is-on).
     Sans animation si prefers-reduced-motion. */
@media (min-width: 768px) {
  .hero { --nav-h: calc(52px + 2.8rem); }
  .hero__bg { display: none; }               /* entièrement caché par la zone vidéo */
  .hero__video {
    top: var(--nav-h);
    background: #fff;
    container-type: size;
  }
  .hero__video::before {
    content: ""; position: absolute; inset: 0;
    background: url("../assets/photos/video-poster-logo.jpg") center no-repeat;
    background-size:
      calc(min(100cqw, 177.78cqh) * 0.99833)
      calc(min(56.25cqw, 100cqh) * 0.97926);
  }
  .hero__video iframe {
    width: max(100cqw, 177.78cqh);
    height: max(56.25cqw, 100cqh);
    min-width: 0; min-height: 0;
    opacity: 0;
    /* Les images de la vidéo ont les mêmes fins bords noirs que l'affiche : rognés ici
       (le rognage suit le zoom), et 2,5 % de marge au final pour couvrir malgré lui. */
    clip-path: inset(1.1% 0.2%);
    transform: translate(-50%, -50%) scale(var(--hv-from, 1));
    transition: opacity .6s ease, transform 1.6s var(--ease) .6s;   /* fondu, puis zoom */
  }
  .hero__video iframe.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1.025); }
}
@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .hero__video iframe { transition: none; }
}
/* Mobile portrait: full-bleed cover would hide ~74% of the 16:9 footage,
   so the hero becomes a compact branded block with the video in a card. */
.hero__eyebrow.hero__eyebrow--mobile { display: none; }
@media (max-width: 767px) {
  .hero {
    min-height: 0;
    justify-content: flex-start; align-items: center;
    gap: 1.5rem;
    padding: 6.8rem 1.25rem 2.4rem;
  }
  .hero__eyebrow.hero__eyebrow--mobile {
    display: block; margin: 0; text-align: center;
    font-size: .72rem; letter-spacing: .26em;
  }
  .hero__video {
    position: relative; inset: auto; z-index: 0;
    width: 100%; max-width: 560px; aspect-ratio: 16 / 9;
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 24px 48px -22px rgba(215, 41, 92, .4);
    border: 1px solid var(--line);
    pointer-events: auto;
  }
  .hero__video iframe {
    top: 0; left: 0; transform: none;
    width: 100%; height: 100%;
    min-width: 0; min-height: 0;
  }
  .hero .hero__scroll { position: static; transform: none; margin-top: .6rem; }
}

/* Light veil keeps the white/pink identity and the dark text readable */
.hero__overlay {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(100deg, rgba(255,255,255,.96) 0%, rgba(255,250,252,.86) 34%,
                            rgba(255,247,250,.5) 66%, rgba(255,245,249,.22) 100%),
    linear-gradient(to bottom, rgba(255,255,255,.4) 0%, transparent 22%,
                            transparent 78%, rgba(255,255,255,.85) 100%);
}
.hero__grain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .5; }

/* Bouton son de la vidéo — fixe, toujours visible en bas à droite */
.audio-toggle {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 120;
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  padding: .6rem 1rem; border-radius: 100px; font: inherit; font-size: .82rem; font-weight: 600;
  color: #fff; background: var(--wheat); border: none;
  box-shadow: 0 12px 28px -10px rgba(215,41,92,.6);
  transition: background .3s, transform .3s, bottom .5s var(--ease);
}
.audio-toggle[hidden] { display: none !important; }
.audio-toggle:hover { background: var(--wheat-deep); transform: translateY(-2px); }
.audio-toggle__icon { width: 20px; height: 20px; flex: none; }
.audio-toggle.is-muted .audio-toggle__waves { display: none; }
.audio-toggle:not(.is-muted) .audio-toggle__x { display: none; }
@media (max-width: 600px) {
  .audio-toggle { right: 1rem; bottom: 1rem; padding: .7rem; }
  .audio-toggle__label { display: none; }
}

/* Contrôles vidéo (lecture / pause + barre draggable) — fixe, bas-gauche.
   Desktop uniquement : sur mobile l'iframe YouTube garde ses contrôles natifs. */
.video-ctrl {
  position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 120;
  display: inline-flex; align-items: center; gap: .8rem;
  padding: .55rem .95rem; border-radius: 100px;
  background: var(--wheat); color: #fff;
  box-shadow: 0 12px 28px -10px rgba(215, 41, 92, .6);
  transition: bottom .5s var(--ease);
}
.video-ctrl[hidden] { display: none !important; }
/* Bandeau cookies ouvert : le bouton « Son » et les contrôles passent au-dessus de lui */
.cookie-open .audio-toggle, .cookie-open .video-ctrl { bottom: calc(var(--cookie-h, 0px) + 1.75rem); }
.video-ctrl__play {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .18); color: #fff;
  transition: background .3s;
}
.video-ctrl__play:hover { background: rgba(255, 255, 255, .32); }
.video-ctrl__play svg { width: 16px; height: 16px; }
.video-ctrl.is-paused .video-ctrl__ic-pause { display: none; }
.video-ctrl:not(.is-paused) .video-ctrl__ic-play { display: none; }
.video-ctrl__bar {
  position: relative; width: clamp(110px, 16vw, 220px); height: 22px;
  cursor: pointer; touch-action: none;
}
/* rail */
.video-ctrl__bar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 4px; transform: translateY(-50%);
  border-radius: 4px; background: rgba(255, 255, 255, .35);
}
.video-ctrl__fill {
  position: absolute; left: 0; top: 50%; width: 0%;
  height: 4px; transform: translateY(-50%);
  border-radius: 4px; background: #fff;
  pointer-events: none;
}
.video-ctrl__knob {
  position: absolute; left: 0%; top: 50%;
  width: 12px; height: 12px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff;
  box-shadow: 0 1px 6px rgba(36, 16, 25, .4);
  pointer-events: none;
  transition: transform .2s;
}
.video-ctrl__bar:hover .video-ctrl__knob,
.video-ctrl.is-dragging .video-ctrl__knob { transform: translate(-50%, -50%) scale(1.25); }
.video-ctrl__bar:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }
.video-ctrl__time {
  font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums;
  white-space: nowrap; opacity: .9;
}
@media (max-width: 767px) {
  .video-ctrl { display: none !important; }
}
.hero__content { width: min(100% - 3rem, var(--container)); margin-inline: auto; max-width: 880px; }
.hero__eyebrow {
  font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase;
  font-weight: 700; color: var(--wheat-deep); margin-bottom: 1.6rem; display: inline-block;
}
.hero__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3rem, 9vw, 6.6rem); line-height: 0.96;
  letter-spacing: -0.03em; margin-bottom: 1.8rem;
}
.hero__title { color: var(--espresso); }
.hero__title em { color: var(--wheat); font-style: italic; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span {
  display: block; transform: translateY(110%);
  animation: heroLine 1.1s var(--ease) forwards;
}
.hero__title .line:nth-child(2) > span { animation-delay: .14s; }
@keyframes heroLine { to { transform: translateY(0); } }

.hero__lead { max-width: 540px; font-size: 1.12rem; color: var(--muted); margin-bottom: 2.4rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  font-size: .7rem; letter-spacing: .25em; text-transform: uppercase;
  /* Legible over the (mostly light) video and the pink gradient alike */
  color: var(--wheat-deep); font-weight: 700;
  text-shadow: 0 1px 6px rgba(255,255,255,.8);
}
.hero__scroll-line { width: 1px; height: 46px; background: linear-gradient(var(--wheat), transparent); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 40%; background: var(--wheat-deep); animation: scrollDot 1.8s var(--ease) infinite; }
@keyframes scrollDot { 0%{ transform: translateY(-100%);} 100%{ transform: translateY(250%);} }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--wheat); color: #fff;
  padding: 1.1rem 0; overflow: hidden; white-space: nowrap;
}
/* The track holds the sequence 4 times (2 per half) so one half is wider than a 2560px
   screen; padding-right = gap so -50% lands exactly on the second half (no jump).
   Duration keeps the July reading speed (~50 px/s). */
.marquee__track { display: inline-flex; align-items: center; gap: 2.5rem; padding-right: 2.5rem; animation: marquee 73s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-size: 1.5rem; font-style: italic; font-weight: 400; }
.marquee__track .dot { color: rgba(255,255,255,.65); font-style: normal; font-size: 1rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { background: var(--cream); padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.stat { text-align: center; padding: 1rem; position: relative; }
.stat:not(:last-child)::after {
  content: ""; position: absolute; right: 0; top: 20%; height: 60%; width: 1px; background: var(--line);
}
.stat__num {
  display: block; font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; color: var(--wheat-deep);
  letter-spacing: -0.02em;
}
.stat__label { display: block; margin-top: .5rem; font-size: .9rem; color: var(--muted); font-weight: 500; }

/* ---------- Le Moulin ---------- */
.moulin__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.moulin__media { position: relative; aspect-ratio: 4 / 5; }
.moulin__img { position: absolute; border-radius: var(--radius); background-size: cover; background-position: center; box-shadow: 0 30px 60px -30px rgba(38,28,19,.5); }
.moulin__img--main {
  inset: 0 15% 18% 0;
  background-image: linear-gradient(120deg, rgba(38,28,19,.05), rgba(38,28,19,.2)), url("../assets/photos/moulin-3.jpg");
}
.moulin__img--accent {
  width: 48%; aspect-ratio: 1; right: 0; bottom: 0;
  border: 6px solid var(--flour);
  background-image: url("../assets/photos/moulin-4.jpg");
}
.moulin__badge {
  position: absolute; top: -1.5rem; left: -1.5rem; z-index: 3;
  background: var(--wheat); color: var(--espresso);
  width: 118px; height: 118px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  box-shadow: 0 16px 36px -14px rgba(178,126,34,.7);
  animation: spinHint 18s linear infinite;
}
@keyframes spinHint { to { transform: rotate(360deg); } }
.moulin__badge-year { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; line-height: 1; }
.moulin__badge-text { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; line-height: 1.4; margin-top: .25rem; }

.moulin__text p { color: var(--muted); margin-top: 1.2rem; font-size: 1.05rem; }
.moulin__note {
  margin-top: 1.6rem !important; padding: .9rem 1.2rem;
  border-left: 3px solid var(--wheat); background: var(--cream);
  border-radius: 0 10px 10px 0; font-size: 1rem !important;
}
.moulin__note strong { color: var(--espresso); font-weight: 700; }
.moulin__text strong { color: var(--bark); font-weight: 700; }
.moulin__features { margin-top: 2rem; display: grid; gap: 1rem; }
.moulin__features li {
  padding-left: 1.8rem; position: relative; color: var(--muted);
}
.moulin__features li::before {
  content: "✦"; position: absolute; left: 0; color: var(--wheat-deep);
}
.moulin__features strong { color: var(--espresso); }

/* ---------- Timeline ---------- */
.timeline { margin-top: clamp(4.5rem, 9vw, 7.5rem); text-align: center; }
.timeline__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 3.5vw, 2.6rem); color: var(--espresso); margin-bottom: 3.5rem; }
.timeline__title:has(+ .timeline__subtitle) { margin-bottom: 0; }
.timeline__subtitle { margin: .6rem auto 3.5rem; max-width: 640px; }
.timeline__track { position: relative; }
.timeline__line {
  position: absolute; top: 9px; left: 0; right: 0; height: 2px;
  background: var(--cream-2); border-radius: 2px;
}
.timeline__line span {
  position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, var(--wheat-deep), var(--wheat-soft));
  border-radius: 2px; transition: width 1.4s var(--ease);
}
.timeline__items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.tl-item { padding-top: 2.6rem; position: relative; }
.tl-item__dot {
  position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px; border-radius: 50%; background: var(--flour);
  border: 3px solid var(--wheat-soft); transition: border-color .4s, transform .4s, background .4s;
}
.tl-item.is-active .tl-item__dot { background: var(--wheat-deep); border-color: var(--wheat-deep); transform: translateX(-50%) scale(1.25); }
.tl-item__gen { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--wheat-deep); font-weight: 600; }
.tl-item__name { display: block; font-weight: 700; margin-top: .3rem; color: var(--espresso); }
.tl-item__role { display: block; font-size: .85rem; color: var(--muted); }

/* ---------- Évolution du moulin ---------- */
.evolution { margin-top: clamp(4rem, 8vw, 6.5rem); }
.evolution__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem,3.5vw,2.6rem); color: var(--espresso); }
.evolution__prose {
  margin-top: 2.4rem; display: grid; gap: 1.2rem;
  max-width: 780px; margin-inline: auto;
  border-left: 2px solid var(--cream-2); padding-left: 1.8rem;
}
.evolution__prose p { color: var(--muted); font-size: 1.05rem; }
.evolution__prose p strong { color: var(--espresso); }

/* ---------- Rayons (carte animée) ---------- */
.rmap { margin-top: clamp(3.5rem, 7vw, 5rem); }
.rmap__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 3.2vw, 2.3rem); color: var(--espresso); margin-top: .3rem; }
.rmap__stage {
  position: relative; max-width: 680px; margin: 1.1rem auto 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 28px 56px -34px rgba(36,16,25,.35);
}
.rmap__france { display: block; width: 100%; height: auto; }

/* Bascule Départements / Satellite — fondu enchaîné de .8s (instantané si
   prefers-reduced-motion, via la règle globale). L'image satellite (NASA Blue
   Marble, recalée sur cette carte) n'est chargée qu'au premier passage. */
.rmap__views {
  display: flex; width: max-content; margin: 2rem auto 0; padding: 4px; gap: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 10px 24px -18px rgba(36,16,25,.4);
}
.rmap__view {
  min-height: 44px; min-width: 44px; padding: 0 1.25rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer;
  font: 600 .93rem/1 var(--font-body); letter-spacing: .01em;
  transition: background-color .3s ease, color .3s ease;
}
.rmap__view:hover { background: var(--cream); color: var(--wheat-deep); }
.rmap__view[aria-pressed="true"] { background: var(--wheat); color: #fff; }
.rmap__view:focus-visible { outline: 3px solid var(--wheat-deep); outline-offset: 2px; }
.rmap__sat {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity .8s ease; pointer-events: none;
}
.rmap__stage.is-sat .rmap__sat { opacity: 1; }
.rmap__credit {
  max-width: 680px; margin: .55rem auto 0; text-align: right;
  font-size: .78rem; color: var(--muted);
  opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s linear .8s;
}
.rmap.is-sat .rmap__credit { opacity: 1; visibility: visible; transition: opacity .8s ease, visibility 0s; }

/* Zones — tracés SVG d'après le dessin du client (07/2026), en % de l'image
   (viewBox 0 0 100 100 + preserveAspectRatio none). Chaque zone grandit
   depuis son propre centre quand la carte est révélée. */
.rmap__svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.rmap__zonepath {
  transform-box: fill-box; transform-origin: center;
  transform: scale(0); opacity: 0;
  transition: transform 1.3s var(--ease), opacity .9s ease;
  /* traits en unités du viewBox (100 large ≈ 680px rendus) : .3 ≈ 2px */
}
.rmap__zonepath--commercial {
  /* Région Centre (41-37-72-45-28) + sud de la Région Parisienne */
  fill: rgba(215, 41, 92, .16);
  stroke: rgba(215, 41, 92, .55); stroke-width: .3; stroke-dasharray: 1.2 .9;
  /* délai sur l'apparition seulement ; la couleur suit le fondu de fond */
  transition: transform 1.3s var(--ease) .35s, opacity .9s ease .35s,
              fill .8s ease, stroke .8s ease, stroke-width .8s ease;
}
.rmap__zonepath--recoltes {
  /* 50 km autour du moulin (Saint-Jean-Froidmentel) */
  fill: rgba(177, 30, 75, .38);
  stroke: rgba(177, 30, 75, .8); stroke-width: .3;
  transition: transform 1.3s var(--ease) 1.05s, opacity .9s ease 1.05s,
              fill .8s ease, stroke .8s ease, stroke-width .8s ease;
}
.rmap__stage.is-visible .rmap__zonepath { transform: scale(1); opacity: 1; }
/* Vue satellite : zones plus claires et cernées, halo sombre pour la lisibilité */
.rmap__svg { transition: filter .8s ease; }
.rmap__stage.is-sat .rmap__svg { filter: drop-shadow(0 0 1.5px rgba(0,0,0,.75)); }
.rmap__stage.is-sat .rmap__zonepath--commercial {
  fill: rgba(238, 157, 182, .26); stroke: rgba(255, 255, 255, .95); stroke-width: .42;
}
.rmap__stage.is-sat .rmap__zonepath--recoltes {
  fill: rgba(215, 41, 92, .55); stroke: #fff; stroke-width: .42;
}

/* Mill marker — Saint-Jean-Froidmentel (47.99 N, 1.21 E), position recalée
   sur la géométrie de la carte (tools/warp_satellite.py) */
.rmap__mill { position: absolute; left: 45.6%; top: 34.4%; transform: translate(-50%, -50%); }
.rmap__mill-dot {
  display: block; width: 11px; height: 11px; border-radius: 50%;
  background: var(--wheat-deep); box-shadow: 0 0 0 3px #fff;
  position: relative;
}
.rmap__mill-dot::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  border: 2px solid var(--wheat); opacity: 0;
}
.rmap__stage.is-visible .rmap__mill-dot::after { animation: pulse 2.2s ease-out .5s infinite; }

.rmap__legend {
  max-width: 680px; margin: 1.6rem auto 0;
  display: grid; gap: .8rem;
}
.rmap__legend li { display: flex; align-items: flex-start; gap: .7rem; color: var(--muted); font-size: .96rem; line-height: 1.5; }
.rmap__legend strong { color: var(--espresso); }
.rmap__swatch {
  flex: none; width: 15px; height: 15px; border-radius: 50%; margin-top: 0.25rem;
}
.rmap__swatch--commercial { background: rgba(215,41,92,.16); border: 2px dashed rgba(215,41,92,.55); }
.rmap__swatch--recoltes { background: rgba(177,30,75,.38); border: 2px solid rgba(177,30,75,.8); }

/* (styles La Pétrie regroupés plus bas — univers dédié) */

/* ---------- Savoir-faire ---------- */
/* Sections without their own background now need one (body is dark) */
.moulin, .projet { background: var(--flour); }

.savoir { background: linear-gradient(180deg, var(--flour), var(--cream)); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.card {
  background: var(--flour); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.4rem 2rem; transition: transform .5s var(--ease), box-shadow .5s, border-color .5s;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 28px 50px -28px rgba(38,28,19,.4); border-color: var(--wheat-soft); }
.card__icon {
  width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center;
  background: var(--cream); color: var(--wheat-deep); margin-bottom: 1.4rem;
  transition: background .4s, color .4s;
}
.card:hover .card__icon { background: var(--wheat-deep); color: var(--flour); }
.card__icon svg { width: 30px; height: 30px; }
.card h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; color: var(--espresso); margin-bottom: .7rem; }
.card p { color: var(--muted); font-size: .98rem; }

.savoir__support { margin-top: 3.5rem; text-align: center; }
.savoir__support-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--espresso); margin-bottom: 1.6rem; max-width: 760px; margin-inline: auto; }
.savoir__support-note { margin-top: 1.5rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.chip {
  padding: .6rem 1.3rem; border-radius: 100px; background: var(--flour);
  border: 1px solid var(--line); font-size: .9rem; font-weight: 500; color: var(--bark);
  transition: background .35s, color .35s, transform .35s, border-color .35s;
}
.chip:hover { background: var(--wheat); color: var(--espresso); border-color: var(--wheat); transform: translateY(-3px); }

/* ---------- Service ---------- */
.service { background: var(--cream); }
.service__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.service__text p { color: var(--muted); margin-top: 1.2rem; font-size: 1.05rem; }
.service__text .btn { margin-top: 2rem; }
.service__solutions {
  background: var(--flour); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.6rem); align-self: start;
  box-shadow: 0 24px 48px -34px rgba(36,16,25,.3);
}
.service__solutions h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem,3vw,1.85rem); color: var(--wheat-deep); margin-bottom: 1.1rem; }
.service__solutions p { color: var(--muted); margin-bottom: 1rem; }
.service__solutions-strong { color: var(--espresso); font-weight: 700; }
.service__steps { display: grid; gap: 1.2rem; }
.service__step {
  display: flex; gap: 1.4rem; align-items: flex-start;
  background: var(--flour); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.8rem; transition: transform .45s var(--ease), box-shadow .45s;
}
.service__step:hover { transform: translateX(8px); box-shadow: 0 20px 40px -26px rgba(38,28,19,.45); }
.service__step-num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--wheat-soft); line-height: 1; }
.service__step h4 { font-size: 1.12rem; color: var(--espresso); margin-bottom: .3rem; }
.service__step p { color: var(--muted); font-size: .95rem; }

/* ============================================================
   LA PÉTRIE — univers dédié (charte graphique La Pétrie 2020)
   Rose 192C #E50046 · bordeaux 504C #4E1C27 · pop-art / halftone
   ============================================================ */
.petrie {
  --lp: #E50046;          /* Pantone 192 C */
  --lp-dark: #4E1C27;     /* Pantone 504 C */
  --lp-rose: #FDE9EF;     /* rose très clair (fonds) */
  --lp-line: rgba(78, 28, 39, 0.14);
  background: #fff;
  color: var(--lp-dark);
  overflow: hidden;
  padding: 0;                     /* le padding vit dans .petrie__content */
  display: grid;
  grid-template-columns: minmax(220px, 23vw) minmax(0, 1fr);
  grid-template-rows: 1fr auto;   /* rangée 2 : bande rose de clôture */
}
/* Trame de points pop-art dans l'angle supérieur droit */
.petrie::after {
  content: ""; position: absolute; top: 0; right: 0; z-index: 0;
  width: clamp(220px, 30vw, 480px); height: clamp(220px, 30vw, 480px);
  background-image: radial-gradient(circle, rgba(229, 0, 70, 0.18) 2px, transparent 2.5px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 30%, transparent 72%);
          mask-image: radial-gradient(ellipse at top right, #000 30%, transparent 72%);
  pointer-events: none;
}

/* --- Portrait pop-art (les 2 quarts gauches de lapetrie.fr) --- */
.petrie__warhol { position: relative; display: flex; flex-direction: column; min-height: 100%; }
/* Deux calques superposés : la version couleur en fond, la version N&B
   par-dessus qui s'efface au survol. Les deux images sont chargées dès le
   rendu initial (pas de flash blanc au premier survol) et le fondu est
   animable partout, contrairement à un swap de background-image. */
.petrie__warhol-half { flex: 1; position: relative; background-size: cover; background-repeat: no-repeat; }
.petrie__warhol-half::after {
  content: ""; position: absolute; inset: 0;
  background-size: cover; background-repeat: no-repeat;
  opacity: 1; transition: opacity .5s ease;
}
.petrie__warhol-half:hover::after { opacity: 0; }
.petrie__warhol-half--top { background-image: url("../assets/petrie/warhol-top-on.webp"); background-position: right bottom; }
.petrie__warhol-half--top::after { background-image: url("../assets/petrie/warhol-top-off.webp"); background-position: right bottom; }
.petrie__warhol-half--bottom { background-image: url("../assets/petrie/warhol-bottom-on.webp"); background-position: right top; }
.petrie__warhol-half--bottom::after { background-image: url("../assets/petrie/warhol-bottom-off.webp"); background-position: right top; }
/* voile rose en pied pour ancrer la bande dans la section (comme lapetrie.fr) */
.petrie__warhol::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 22%;
  background: linear-gradient(to top, rgba(229,0,70,.28), transparent);
  pointer-events: none;
}

/* --- Contenu (pleine largeur à droite du portrait) --- */
.petrie__content {
  position: relative; z-index: 1;
  padding: clamp(3.5rem, 6vw, 5.5rem) clamp(1.5rem, 4vw, 4.5rem);
}

/* En-tête : logo officiel + intro à gauche, grande baguette à droite */
.petrie__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.petrie__eyebrow {
  display: inline-block;
  font-size: 0.74rem; letter-spacing: 0.32em; text-transform: uppercase; font-weight: 700;
  color: var(--lp-dark); opacity: .85;
  margin-bottom: 1.6rem; padding-left: 2.6rem; position: relative;
}
.petrie__eyebrow::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 2rem; height: 1px; background: var(--lp);
}
/* Le logotype officiel tient lieu de titre (charte : ne jamais le redessiner) */
.petrie__logo {
  display: block;
  width: clamp(180px, 18vw, 250px); height: auto;
  filter: drop-shadow(0 18px 36px rgba(78, 28, 39, 0.22));
}
.petrie__intro { margin-top: 1.8rem; font-size: 1.08rem; color: var(--muted); max-width: 560px; }
.petrie__intro strong { color: var(--lp); }

/* La baguette dans son sachet — grande, au centre-droit de l'en-tête */
.petrie__brand {
  width: clamp(90px, 8.5vw, 128px); height: auto;
  justify-self: center;
  margin-right: clamp(0rem, 6vw, 6rem);
  filter: drop-shadow(0 24px 40px rgba(78, 28, 39, 0.3));
  transform: rotate(3deg);
}

/* Cartes-liens */
.petrie__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; margin-top: 2.4rem; }
.pcard {
  position: relative; display: block;
  border: 1px solid var(--lp-line); border-radius: var(--radius);
  padding: 2.2rem 2rem 3.4rem; background: #fff;
  border-top: 4px solid var(--lp);
  transition: transform .5s var(--ease), background .5s, border-color .5s, box-shadow .5s;
}
.pcard:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 50px -28px rgba(78, 28, 39, 0.35);
  border-color: var(--lp);
  background: var(--lp-rose);
}
.pcard h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; color: var(--lp-dark); margin-bottom: .8rem; }
.pcard:hover h3 { color: var(--lp); }
.pcard p { color: var(--muted); font-size: .96rem; }
.pcard__plus {
  position: absolute; right: 1.4rem; bottom: 1rem;
  font-size: 1.9rem; font-weight: 300; line-height: 1;
  color: var(--lp-dark); opacity: .4;
  transition: color .35s, opacity .35s, transform .35s;
}
.pcard:hover .pcard__plus { color: var(--lp); opacity: 1; transform: rotate(90deg); }

/* Boutiques La Pétrie */
.petrie__gallery {
  margin-top: 2rem;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
  grid-auto-rows: clamp(110px, 13vw, 175px);
}
.petrie__gallery .gallery__item:nth-child(1) { grid-column: span 3; }
.petrie__gallery .gallery__item:nth-child(2) { grid-column: span 3; }
.petrie__gallery .gallery__item:nth-child(3),
.petrie__gallery .gallery__item:nth-child(4),
.petrie__gallery .gallery__item:nth-child(5) { grid-column: span 2; }
.petrie__gallery .gallery__item { border-radius: 14px; }
.petrie__gallery .gallery__item::after {
  background: linear-gradient(to top, rgba(229, 0, 70, 0.35), transparent 60%);
}

/* Bande rose de clôture (bandeau 192C de la charte) — sépare la section de la suivante */
.petrie__band {
  grid-column: 1 / -1;
  background: var(--lp);
  padding: 1.1rem 1.5rem;
  text-align: center;
}
.petrie__band-accroche {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: #fff; letter-spacing: .02em;
}

/* Boutons : déclinés aux couleurs La Pétrie */
.petrie__actions { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; position: relative; }
.petrie__actions .btn--solid {
  background: var(--lp); color: #fff;
  box-shadow: 0 12px 30px -12px rgba(229, 0, 70, 0.6);
}
.petrie__actions .btn--solid:hover { background: var(--lp-dark); }
.petrie__actions .btn--ghost { border-color: var(--lp-line); color: var(--lp-dark); }
.petrie__actions .btn--ghost:hover { background: var(--lp-rose); border-color: var(--lp); color: var(--lp); }

@media (max-width: 900px) {
  .petrie { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  /* le portrait pop-art reste empilé (les 2 moitiés reconstituent le visage) ;
     en bandeau horizontal les moitiés se retrouvaient côte à côte, recadrées
     n'importe comment */
  /* > 112.5vw (hauteur naturelle des 2 images 960×540) : les moitiés
     débordent horizontalement, ce qui recadre le vide gris à gauche ;
     le visage reste ancré au bord droit (background-position right) */
  .petrie__warhol { flex-direction: column; min-height: 0; height: clamp(480px, 173vw, 720px); }
  .petrie__warhol-half { flex: 1; }
  .petrie__warhol-half--top { background-position: right bottom; }
  .petrie__warhol-half--bottom { background-position: right top; }
  .petrie__warhol::after { display: none; }
  .petrie__content { padding-top: 3rem; }
  .petrie__head { gap: 1.2rem; }
  .petrie__logo { width: clamp(150px, 40vw, 200px); }
  .petrie__brand { width: clamp(64px, 17vw, 100px); margin-right: 0; }
  .petrie__gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .petrie__gallery .gallery__item:nth-child(n) { grid-column: auto; }
}

/* ---------- Mon Projet ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.step {
  background: var(--flour); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; position: relative; overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s, border-color .5s;
}
.step::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--wheat); transform: scaleY(0); transform-origin: top; transition: transform .5s var(--ease);
}
.step:hover { transform: translateY(-6px); box-shadow: 0 26px 48px -30px rgba(38,28,19,.45); border-color: var(--wheat-soft); }
.step:hover::before { transform: scaleY(1); }
.step--wide { grid-column: span 3; }
.step__num {
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 600;
  color: var(--cream-2); line-height: 1; display: block; margin-bottom: .8rem;
  transition: color .4s;
}
.step:hover .step__num { color: var(--wheat); }
.step h4 { font-size: 1.18rem; color: var(--espresso); margin-bottom: .5rem; }
.step p { color: var(--muted); font-size: .96rem; }

.projet__cta {
  margin-top: 3.5rem; text-align: center;
  background: var(--cream); border-radius: var(--radius); padding: 3rem 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
}
.projet__cta p { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.9rem); color: var(--espresso); max-width: 520px; }

/* ---------- Contact ---------- */
.contact { background: linear-gradient(180deg, var(--cream), var(--flour)); }
.contact__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2.5rem, 6vw, 5rem); }
.contact__info p { color: var(--muted); margin-top: 1rem; }
.contact__list { margin-top: 2.4rem; display: grid; gap: 1.5rem; }
.contact__list li { display: flex; gap: 1.1rem; align-items: flex-start; }
.contact__ico {
  width: 44px; height: 44px; flex: none; border-radius: 12px;
  background: var(--flour); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--wheat-deep); font-size: 1.2rem;
}
.contact__k { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.contact__v { display: block; color: var(--espresso); font-weight: 600; margin-top: .2rem; transition: color .3s; }
a.contact__v:hover { color: var(--wheat-deep); }

.contact__map {
  margin-top: 2.4rem; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); position: relative;
  box-shadow: 0 24px 48px -34px rgba(38,28,19,.5);
}
.contact__map iframe {
  display: block; width: 100%; height: 240px; border: 0;
  filter: sepia(0.18) saturate(1.05);
}
.contact__map-link {
  position: absolute; bottom: 12px; right: 12px;
  background: var(--espresso); color: var(--flour);
  font-size: .8rem; font-weight: 600; padding: .45rem .9rem; border-radius: 100px;
  transition: background .3s;
}
.contact__map-link:hover { background: var(--wheat-deep); }

.contact__form {
  background: var(--flour); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.8rem); box-shadow: 0 30px 60px -40px rgba(38,28,19,.5);
}
.field { position: relative; margin-bottom: 1.4rem; }
.field input, .field select {
  width: 100%; height: 56px; padding: 1.35rem 1rem .35rem; font-family: inherit; font-size: 1rem;
  color: var(--espresso); background: var(--cream); border: 1px solid var(--line);
  border-radius: 12px; outline: none; transition: border-color .3s, background .3s;
}
.field textarea {
  width: 100%; padding: 1.7rem 1rem .6rem; font-family: inherit; font-size: 1rem;
  color: var(--espresso); background: var(--cream); border: 1px solid var(--line);
  border-radius: 12px; outline: none; transition: border-color .3s, background .3s; resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--wheat-deep); background: var(--flour); }

/* Resting label — vertically centered for input & select */
.field label {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 1rem; pointer-events: none;
  transition: .22s var(--ease); transform-origin: left top;
}
/* Textarea label sits near the top, not centered */
.field textarea + label { top: 1.15rem; transform: none; }

/* Floated label (focused or filled) — identical for all field types */
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field select:focus + label, .field select:valid + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: .5rem; transform: scale(.72); color: var(--wheat-deep); font-weight: 600;
}

.field select { color: var(--espresso); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23756450' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
/* Empty placeholder option has no text, so the resting "Sujet" label shows over it */
.field select option { color: var(--espresso); }
.field select option[value=""] { color: var(--muted); }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .86rem; color: var(--muted); margin-bottom: 1.6rem; }
.consent input { margin-top: .25rem; accent-color: var(--wheat-deep); }
.form__feedback { margin-top: 1rem; text-align: center; color: var(--wheat-deep); font-weight: 600; }
.form__feedback--error { color: #b3402b; }

/* ---------- Footer ---------- */
.footer { background: var(--cream); color: var(--muted); padding: 4.5rem 0 2rem; border-top: 1px solid var(--line); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.footer__brand span { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-size: 1.4rem; color: var(--espresso); }
.footer__logo { height: 64px; width: auto; }
.footer__icon { width: 16px; height: 32px; color: var(--wheat); }
.footer__brand p { margin-top: 1rem; max-width: 280px; font-size: .95rem; }
.footer__nav { display: grid; gap: .7rem; align-content: start; }
.footer__nav a { transition: color .3s; }
.footer__nav a:hover { color: var(--wheat-deep); }
.footer__meta p { margin-bottom: .8rem; font-size: .95rem; }
.footer__bottom {
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted);
}
.footer__bottom a:hover { color: var(--wheat-deep); }

/* ---------- Vidéo ---------- */
.video { background: linear-gradient(180deg, var(--cream), var(--flour)); }
.video__frame {
  position: relative; max-width: 980px; margin-inline: auto;
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  cursor: pointer; background: var(--espresso);
  box-shadow: 0 40px 80px -40px rgba(38,28,19,.6);
}
.video__poster {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .6s var(--ease), filter .5s;
}
.video__frame:hover .video__poster { transform: scale(1.04); filter: brightness(.82); }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--wheat); color: var(--espresso);
  display: grid; place-items: center;
  box-shadow: 0 12px 36px -8px rgba(178,126,34,.8);
  transition: transform .35s var(--ease), background .35s;
}
.video__play svg { width: 38px; height: 38px; margin-left: 4px; }
.video__play::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid var(--wheat); opacity: .6; animation: pulse 2s ease-out infinite;
}
.video__frame:hover .video__play { transform: translate(-50%, -50%) scale(1.08); background: var(--wheat-soft); }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.35); opacity: 0; } }
.video__fallback {
  display: block; text-align: center; margin-top: 1.2rem;
  font-size: .92rem; font-weight: 600; color: var(--wheat-deep);
}
.video__fallback:hover { text-decoration: underline; }

/* ---------- Nos farines (carrousel) ---------- */
.farines { margin-top: clamp(3.5rem, 7vw, 5rem); }
.farines__head { max-width: 760px; margin: 0 auto 2.2rem; text-align: center; }
.farines__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem,3.5vw,2.4rem); color: var(--espresso); line-height: 1.15; text-wrap: balance; margin: .3rem 0 .8rem; }

.fcar {
  position: relative; max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center; gap: clamp(2rem, 5vw, 4.5rem);
}
.fcar__stage { position: relative; }
.fcar__viewport { overflow: hidden; border-radius: var(--radius); }
.fcar__track { display: flex; transition: transform .55s var(--ease); }
.fcar__slide {
  min-width: 100%; margin: 0; box-sizing: border-box;
  display: flex; justify-content: center; align-items: center;
  /* Même fond de studio que les photos des sacs : leurs bords estompés s'y fondent sans trace */
  background: radial-gradient(130% 100% at 50% 8%, #f4f2f6 0%, #e6e3e9 78%, #dedae0 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
/* La photo (760×834) déborde un peu de la carte : seul son fond estompé est rogné, le sac grandit */
.fcar__photo { display: block; width: 116%; max-width: 640px; height: auto; margin: -4% -8% -6%; flex: none; }

/* Nom et type de la farine, à droite du carrousel */
.fcar__caption { min-width: 0; }
.fcar__count {
  display: block; font-size: .74rem; letter-spacing: .32em; font-weight: 700;
  color: var(--muted); margin-bottom: 1.1rem; font-variant-numeric: tabular-nums;
}
.fcar__num { color: var(--wheat-deep); }
.fcar__items { display: grid; }
.fcar__item {
  grid-area: 1 / 1; align-self: start;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s linear .4s;
}
.fcar__item.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .45s var(--ease) .1s, transform .45s var(--ease) .1s, visibility 0s;
}
.fcar__name {
  display: block; font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.4rem, 4.6vw, 3.8rem); line-height: 1.04; letter-spacing: -0.02em;
  color: var(--espresso); text-wrap: balance;
}
.fcar__rule { display: block; width: 52px; height: 3px; border-radius: 2px; background: var(--fcar-accent, var(--wheat)); margin: 1.2rem 0 1rem; }
.fcar__type { display: block; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); letter-spacing: .01em; }

.fcar__arrow {
  position: absolute; top: calc((100% - 3.15rem) / 2); transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--wheat); color: #fff; border: none;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px -10px rgba(215,41,92,.6);
  transition: background .3s, transform .3s;
}
.fcar__arrow svg { width: 22px; height: 22px; }
.fcar__arrow:hover { background: var(--wheat-deep); }
.fcar__arrow--prev { left: -14px; }
.fcar__arrow--next { right: -14px; }
.fcar__arrow--prev:hover { transform: translateY(-50%) translateX(-3px); }
.fcar__arrow--next:hover { transform: translateY(-50%) translateX(3px); }

.fcar__arrow:focus-visible { outline: 3px solid var(--espresso); outline-offset: 3px; }

/* Points : la pastille reste de 9px, la zone cliquable fait 44px de haut */
.fcar__dots { display: flex; justify-content: center; margin-top: .4rem; }
.fcar__dot {
  position: relative; width: 26px; height: 44px; border: none; cursor: pointer; padding: 0;
  background: none; border-radius: 8px;
}
.fcar__dot::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border-radius: 50%; background: var(--cream-2); transition: background .3s, transform .3s;
}
.fcar__dot.is-active::before { background: var(--wheat); transform: scale(1.25); }
.fcar__dot:focus-visible { outline: 3px solid var(--espresso); outline-offset: -4px; }

/* Téléphones : le nom passe sous le sac, toujours plus grand qu'avant */
@media (max-width: 719px) {
  .fcar { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; max-width: 480px; }
  .fcar__caption { text-align: center; }
  /* Le sac prend toute la largeur ; les flèches passent sous la carte, de part et d'autre des points */
  .fcar__stage {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-areas: "view view view" "prev dots next";
    align-items: center; row-gap: .7rem;
  }
  .fcar__viewport { grid-area: view; }
  .fcar__photo { width: 118%; margin: -5% -9% -7%; }
  .fcar__arrow { position: static; transform: none; width: 44px; height: 44px; }
  .fcar__arrow--prev { grid-area: prev; }
  .fcar__arrow--next { grid-area: next; }
  .fcar__arrow--prev:hover, .fcar__arrow--next:hover { transform: none; }
  .fcar__dots { grid-area: dots; margin-top: 0; }
  .fcar__count { margin-bottom: .7rem; }
  .fcar__name { font-size: clamp(2rem, 8.5vw, 2.5rem); }
  .fcar__rule { margin: .9rem auto .75rem; }
  .fcar__type { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  .fcar__item, .fcar__item.is-active { transition-delay: 0s; }
}

/* ---------- Galerie ---------- */
.gallery { margin-top: clamp(4rem, 8vw, 6.5rem); }
.gallery__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem,3.5vw,2.6rem); color: var(--espresso); }
.gallery__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px;
  gap: 1rem; grid-auto-flow: dense;
}
.gallery__item { margin: 0; border-radius: 14px; overflow: hidden; position: relative; cursor: pointer; background: var(--cream); }
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gallery__item::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(38,28,19,.35), transparent 55%);
  opacity: 0; transition: opacity .4s;
}
.gallery__item:hover img { transform: scale(1.07); }
.gallery__item:hover::after { opacity: 1; }
.gallery__item:focus-visible { outline: 3px solid var(--wheat-deep); outline-offset: 3px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 250; display: grid; place-items: center;
  background: rgba(20,14,9,.82); backdrop-filter: blur(6px); padding: 4vw;
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(760px, 76vw); max-height: 72vh; width: auto; height: auto;
  border-radius: 14px; box-shadow: 0 40px 90px -25px #000;
  transform: scale(.92); transition: transform .4s var(--ease);
}
.lightbox.is-open img { transform: scale(1); }
.lightbox__close {
  position: absolute; top: 1.4rem; right: 1.8rem; width: 48px; height: 48px;
  border-radius: 50%; border: 1px solid rgba(244,236,221,.4); background: transparent;
  color: var(--flour); font-size: 1.6rem; cursor: pointer; line-height: 1; transition: background .3s;
}
.lightbox__close:hover { background: rgba(244,236,221,.15); }

@media (max-width: 900px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery__item--wide { grid-column: span 2; }
}
@media (max-width: 540px) {
  .gallery__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
  .gallery__item--wide, .gallery__item--tall { grid-column: auto; grid-row: auto; }
}

/* ---------- Legal page ---------- */
.legal-body { background: var(--cream); }
.legal-topbar {
  display: flex; align-items: center; justify-content: space-between;
  width: min(100% - 3rem, var(--container)); margin: 0 auto; padding: 1.6rem 0;
}
.legal-topbar .nav__brand, .legal-topbar .nav__brand-text { color: var(--espresso); }
.legal-topbar .nav__brand-icon { color: var(--wheat-deep); }
.legal-back {
  font-size: .92rem; font-weight: 600; color: var(--bark);
  padding: .5rem 1.1rem; border: 1px solid var(--line); border-radius: 100px;
  transition: background .3s, color .3s, border-color .3s;
}
.legal-back:hover { background: var(--espresso); color: var(--flour); border-color: var(--espresso); }
.legal { padding: clamp(2.5rem, 6vw, 5rem) 0 5rem; }
.legal__inner {
  width: min(100% - 3rem, 760px); margin: 0 auto;
  background: var(--flour); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.8rem, 5vw, 3.5rem);
  box-shadow: 0 30px 60px -42px rgba(38,28,19,.5);
}
.legal__title {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(2rem, 5vw, 3rem); color: var(--espresso); margin: .4rem 0 1.2rem;
}
.legal__lead { color: var(--muted); font-size: 1.05rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.legal__block { margin-top: 2.2rem; }
.legal__block h2 {
  font-family: var(--font-display); font-weight: 500; font-size: 1.4rem;
  color: var(--espresso); margin-bottom: .7rem;
}
.legal__block p { color: var(--muted); margin-bottom: .8rem; }
.legal__block a { color: var(--wheat-deep); font-weight: 600; }
.legal__block a:hover { text-decoration: underline; }
.legal__hint { font-size: .92rem; color: var(--muted); opacity: .85; }

/* ---------- Bandeau cookies ---------- */
.cookie {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 220;
  background: var(--flour); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(38,28,19,.45);
  transform: translateY(140%); transition: transform .5s var(--ease);
}
.cookie.is-visible { transform: none; }
.cookie__inner {
  max-width: var(--container); margin-inline: auto;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: 1.1rem 1.4rem;
}
.cookie__text { flex: 1 1 320px; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.cookie__text strong { color: var(--espresso); }
.cookie__text a { color: var(--wheat-deep); font-weight: 600; }
.cookie__text a:hover { text-decoration: underline; }
.cookie__actions { display: flex; gap: .7rem; flex: 0 0 auto; }
.cookie__btn {
  padding: .7rem 1.5rem; border-radius: 100px; font-family: inherit; font-weight: 600;
  font-size: .92rem; cursor: pointer; border: 1px solid transparent;
  transition: background .3s, color .3s, transform .3s;
}
.cookie__btn--solid { background: var(--wheat); color: #fff; }
.cookie__btn--solid:hover { background: var(--wheat-deep); transform: translateY(-2px); }
.cookie__btn--ghost { background: transparent; color: var(--espresso); border-color: var(--line); }
.cookie__btn--ghost:hover { background: var(--cream); transform: translateY(-2px); }

.footer__links { display: inline-flex; align-items: center; gap: 1.4rem; }
.footer__cookie {
  background: none; border: none; padding: 0; cursor: pointer; font: inherit;
  font-size: .85rem; color: var(--muted); transition: color .3s;
}
.footer__cookie:hover { color: var(--wheat-deep); }

@media (max-width: 600px) {
  .cookie { left: .6rem; right: .6rem; bottom: .6rem; }
  .cookie__inner { flex-direction: column; align-items: stretch; text-align: center; gap: 1rem; padding: 1.1rem; }
  /* In a column, flex-basis becomes a HEIGHT — reset it so the box hugs its text */
  .cookie__text { flex: 0 1 auto; font-size: .88rem; }
  .cookie__actions { justify-content: center; }
  .cookie__btn { flex: 1; padding: .8rem 1rem; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
    background: var(--espresso); flex-direction: column; justify-content: center;
    gap: 1.8rem; padding: 2rem; transform: translateX(100%); transition: transform .5s var(--ease), visibility .5s var(--ease);
    visibility: hidden;
  }
  .nav__links.is-open { transform: none; visibility: visible; }
  .nav__links a { color: var(--flour) !important; font-size: 1.1rem; }
  .nav__burger { display: flex; z-index: 160; }
  .nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--flour); }
  .nav__burger.is-open span:nth-child(2) { opacity: 0; }
  .nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--flour); }

  .moulin__grid, .service__grid, .contact__grid { grid-template-columns: 1fr; }
  .moulin__media { max-width: 460px; margin-inline: auto; width: 100%; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .stat:nth-child(2)::after { display: none; }
  .cards, .petrie__cards, .steps { grid-template-columns: 1fr; }
  .step--wide { grid-column: span 1; }
  .timeline__items { grid-template-columns: 1fr; gap: 0; }
  .timeline__line { left: 7px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .timeline__line span { width: 2px !important; height: 0; transition: height 1.4s var(--ease); }
  .tl-item { padding: 1.4rem 0 1.4rem 2.4rem; text-align: left; }
  .tl-item__dot { left: 7px; top: 1.7rem; transform: translateX(-50%); }
  .tl-item.is-active .tl-item__dot { transform: translateX(-50%) scale(1.25); }
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 540px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat::after { display: none !important; }
  .footer__bottom { flex-direction: column; gap: .6rem; text-align: center; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
