@font-face { font-family: "Gilmer"; src: url("assets/fonts/gilmer-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Gilmer"; src: url("assets/fonts/gilmer-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Gilmer"; src: url("assets/fonts/gilmer-heavy.woff2") format("woff2"); font-weight: 900; font-display: swap; }

/* Couleurs relevées sur la maquette du graphiste de HIGH5 (AILFEVE-site-editable, export sRGB).
   Toute la page passe par ces variables : aucune couleur codée en dur plus bas. */
:root {
  --vert: #028c4a;          /* fond de la hero et de la section contact */
  --vert-motif: #289c44;    /* formes du motif sur fond vert, formes 3D ton sur ton */
  --vert-lime: #84c335;     /* boutons, mots en évidence */
  --vert-fonce: #1f4a2a;    /* titres sur fond blanc */
  --vert-profond: #004f27;  /* fonds foncés : histoire, tuile, pied de page */
  --vert-nuit: #10301b;     /* texte courant, texte des boutons */
  --jaune: #f9df4a;         /* « sans saveur. » */
  --jaune-vif: #ffdd00;     /* accents des tuiles */
  --jaune-chaud: #ffc31f;   /* macaronis de la tuile orangée */
  --orange: #ffa543;
  --tomate: #e9604a;
  --tomate-fonce: #da513c;  /* bas du dégradé de la tuile tomate */
  --rouge: #ff523b;         /* citation sur fond vert foncé */
  --bordeaux: #5e1630;
  --creme: #f7f0e1;         /* texte sur fond vert */
  --blanc: #ffffff;
  --gris-champ: #d7ded9;    /* filets des tableaux, jauge des étapes */

  /* Transparences dérivées de la palette */
  --lueur-lime: rgba(132, 195, 53, .34);
  --ombre-verte: rgba(0, 52, 26, .5);
  --ombre-bordeaux: rgba(94, 22, 48, .2);
  --ombre-perso: rgba(16, 48, 27, .32);
  --entete-plein: rgba(0, 79, 39, .95);
  --voile: rgba(16, 48, 27, .9);        /* fond de la visionneuse vidéo */
  --filet-pied: rgba(247, 240, 225, .22); /* filet du pied de page */

  /* Agencement par section, repris de la maquette (fond / titre / mot en évidence / texte) */
  --bouton: var(--vert-lime);
  --bouton-texte: var(--vert-nuit);
  --hero-fond: var(--vert);
  --hero-titre: var(--vert-lime);         /* remplacé plus bas par un lime éclairci, là où color-mix est pris en charge */
  --hero-accent: var(--blanc);
  --hero-texte: var(--creme);
  --manifeste-fond: var(--tomate); /* aussi la couleur de la vague sous la hero */
  --manifeste-titre: var(--bordeaux);
  --manifeste-accent: var(--jaune);
  --manifeste-texte: var(--blanc);
  --bandeau-1-fond: var(--bordeaux);
  --bandeau-1-texte: var(--vert-lime);
  --bandeau-1-puce: var(--tomate);
  --services-fond: var(--blanc);
  --services-titre: var(--vert-fonce);
  --services-accent: var(--vert-lime);
  --tuile-orange-fond: var(--orange);
  --tuile-orange-titre: var(--vert-fonce);
  --tuile-orange-accent: var(--jaune-vif);
  --tuile-orange-inclus: var(--blanc);
  --tuile-orange-texte: var(--vert-nuit);
  --tuile-fonce-fond: var(--vert-profond);
  --tuile-fonce-titre: var(--jaune-vif);
  --tuile-fonce-accent: var(--blanc);
  --tuile-fonce-inclus: var(--vert-lime);
  --tuile-fonce-texte: var(--creme);
  --tuile-tomate-fond: var(--tomate);
  --tuile-tomate-titre: var(--bordeaux);
  --tuile-tomate-accent: var(--blanc);
  --tuile-tomate-inclus: var(--jaune-vif);
  --tuile-tomate-texte: var(--blanc);
  --histoire-fond: var(--vert-profond);
  --histoire-titre: var(--vert-lime);
  --histoire-accent: var(--blanc);
  --histoire-texte: var(--creme);
  --histoire-fort: var(--vert-lime);
  --histoire-chute: var(--rouge);
  --histoire-chute-fin: var(--blanc);
  --realisations-fond: var(--blanc);
  --realisations-titre: var(--vert-fonce);
  --realisations-accent: var(--tomate);
  --realisations-texte: var(--vert-nuit);
  --formulaire-fond: var(--vert);
  --formulaire-panneau: var(--blanc);
  --formulaire-texte: var(--vert-fonce);
  --formulaire-accent: var(--vert-lime);
  --pied-fond: var(--vert-profond);
  --pied-texte: var(--creme);

  --vague-h: clamp(60px, 9vw, 140px);   /* hauteur des vagues de transition */
  /* Bord supérieur en vague de la section contact (masque) : laisse voir la section précédente au-dessus de la courbe */
  --masque-vague: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'%3E%3Cpath d='M0 70 C260 130 520 20 800 60 S1200 0 1440 40 V140 H0 Z'/%3E%3C/svg%3E");
  --entete-h: 61px; /* hauteur de l'en-tête plein : aligne les ancres dessous */
  --rayon: 999px;
  --rayon-carte: 28px;
  --rayon-media: 24px;                  /* vidéos des projets */
  --gouttiere: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.16, 1, .3, 1);       /* courbe principale : entrées, révélations */
  --ease-doux: cubic-bezier(.45, 0, .25, 1);  /* courbe secondaire : survols, allers-retours */

  /* Grain très léger posé sur les fonds pleins (bruit neutre, sans couleur) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.1 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --grain-force: .055;
}

/* Titre de la hero : lime éclairci vers le crème, pour mieux ressortir sur le vert. « baver » reste blanc. */
@supports (color: color-mix(in srgb, red, blue)) {
  :root { --hero-titre: color-mix(in srgb, var(--vert-lime) 40%, var(--creme)); }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lenis { scroll-behavior: auto; } /* Lenis gère le défilement doux sur ordinateur */
section[id] { scroll-margin-top: var(--entete-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "Gilmer", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--vert-nuit);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
main { overflow-x: clip; }
h1, h2, h3 { font-weight: 900; line-height: 1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

.conteneur { width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--gouttiere); }
.cache { position: absolute; left: -9999px; }
.gabarits { position: absolute; } /* symboles SVG réutilisés dans la page */

/* Boutons : pilule, remplissage qui glisse, flèche qui bouge, effet magnétique (main.js) */
.bouton {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: .7em;
  font: inherit;
  font-weight: 900;
  font-size: 1.0625rem;
  line-height: 1;
  text-decoration: none;
  padding: 1.15em 1.7em;
  border: 0;
  border-radius: var(--rayon);
  cursor: pointer;
  transition: color .45s var(--ease);
}
.bouton::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--fond-survol, var(--vert-nuit));
  transform: translateY(101%);
  transition: transform .5s var(--ease);
}
.bouton:hover::before, .bouton:focus-visible::before { transform: translateY(0); }
.bouton__icone { width: 1.15em; height: 1.15em; flex: none; transition: transform .5s var(--ease); }
.bouton:hover .bouton__icone { animation: fleche 1s var(--ease) infinite; }
@keyframes fleche {
  0% { transform: translateY(0); }
  45% { transform: translateY(5px); }
  100% { transform: translateY(0); }
}
.bouton:focus-visible { outline: 3px solid var(--blanc); outline-offset: 4px; }
.bouton--accent { background: var(--bouton); color: var(--bouton-texte); --fond-survol: var(--creme); }
/* Sur fond blanc, le survol passe au vert foncé et le texte prend l'accent */
.services .bouton--accent, .realisations .bouton--accent, .formulaire__panneau .bouton--accent { --fond-survol: var(--vert-profond); }
.services .bouton--accent:hover, .realisations .bouton--accent:hover, .formulaire__panneau .bouton--accent:hover,
.services .bouton--accent:focus-visible, .realisations .bouton--accent:focus-visible, .formulaire__panneau .bouton--accent:focus-visible { color: var(--bouton); }
.services .bouton:focus-visible, .realisations .bouton:focus-visible, .formulaire__panneau .bouton:focus-visible { outline-color: var(--vert-fonce); }
.bouton--petit { font-size: .95rem; padding: .85em 1.3em; }

/* Mot en évidence de chaque section (voir l'agencement en haut) */
.hero { --accent: var(--hero-accent); }
.manifeste { --accent: var(--manifeste-accent); }
.services { --accent: var(--services-accent); }
.histoire { --accent: var(--histoire-accent); }
.realisations { --accent: var(--realisations-accent); }
.formulaire__panneau { --accent: var(--formulaire-accent); }
.accent, .accent .mot > span { color: var(--accent); }

/* En-tête : transparent sur la hero, plein une fois qu'on défile */
.entete {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gouttiere);
  transition: background-color .4s ease, padding .4s ease;
}
.entete.est-plein { padding-block: 10px; background: var(--entete-plein); }
.entete__logo img { width: clamp(160px, 20vw, 240px); }

/* Grain : même texture pour le fond et le personnage */
.grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--grain);
  opacity: var(--grain-force);
  mix-blend-mode: overlay;
}

/* Hero : vert de la maquette, lueur lime en haut, plus foncé vers la vague */
.hero {
  position: relative;
  overflow: hidden;
  overflow: clip; /* « clip » plutôt que « hidden » : la section ne peut pas défiler sur elle-même (focus clavier, ancres) */
  min-height: max(100svh, 720px);
  display: flex;
  align-items: center;
  padding: clamp(104px, 12svh, 150px) var(--gouttiere) clamp(140px, 17svh, 210px);
  color: var(--hero-texte);
  background: var(--hero-fond);
}
/* Motif de la maquette : formes vert clair sur le vert de fond (le SVG sert de masque) */
.hero__motif { position: absolute; inset: -12%; pointer-events: none; }
.hero__motif-derive {
  position: absolute;
  inset: 0;
  background: var(--vert-motif);
  -webkit-mask: url("assets/img/motif-hero.svg") center / cover no-repeat;
  mask: url("assets/img/motif-hero.svg") center / cover no-repeat;
  opacity: .42; /* une texture, pas un élément */
}
/* Dégradé de la maquette : le vert fonce vers la vague, par-dessus le motif */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 25%, var(--ombre-verte) 100%);
}
.hero__contenu {
  position: relative;
  z-index: 3;
  width: min(1240px, 100%);
  margin-inline: auto;
}
.hero__titre {
  font-size: clamp(3.3rem, min(10.6vw, 14.2svh), 10.5rem); /* tient dans le premier écran, vague comprise */
  line-height: .93;
  letter-spacing: -0.035em;
  margin-bottom: .34em;
  color: var(--hero-titre);
}
/* Chaque ligne du titre est son propre masque; le dégagement garde les accents et les jambages */
.ligne { display: block; overflow: hidden; padding-block: .1em .14em; margin-block: -.1em -.14em; white-space: nowrap; }
.ligne > span { display: block; will-change: transform; }
.mot {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .24em;
  margin-bottom: -.24em;
}
.mot > span { display: inline-block; position: relative; }
.mot--cle > span { color: var(--accent); }
.hero__texte { max-width: 23.5rem; line-height: 1.6; margin-bottom: 2.2rem; }

/* Personnages et aliments détourés : le conteneur porte le parallax (main.js), l'image flotte */
.perso, .aliment { pointer-events: none; }
.perso img, .aliment img { width: 100%; filter: drop-shadow(0 22px 26px var(--ombre-perso)); transition: transform .8s var(--ease-doux); }
.perso--hero {
  position: absolute;
  z-index: 1;
  right: 5%;
  bottom: clamp(24px, 3vw, 44px);
  /* Sans formes autour d'elle, la cuisinière occupe la moitié droite : elle répond au titre sans laisser de vide */
  width: clamp(280px, min(41vw, 71svh), 680px);
  pointer-events: auto;
}
.perso--hero img { transition: scale .8s var(--ease-doux); }
.perso--hero:hover img { scale: 1.015; }

@media (prefers-reduced-motion: no-preference) {
  .perso--hero img { animation: flotte-lent 9s ease-in-out infinite; }
  .aliment img { animation: flotte-lent 8s ease-in-out infinite; }
  .aliment--citron img { animation-duration: 7s; animation-delay: -2s; }
}
@keyframes flotte-lent {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

/* Vagues de transition entre sections */
.vague {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--vague-h);
  z-index: 4;
  pointer-events: none;
}
.vague--bas { bottom: -1px; fill: var(--manifeste-fond); }
.vague--fonce { fill: var(--histoire-fond); }
.vague--blanc { fill: var(--realisations-fond); }

/* États initiaux quand les animations sont actives (main.js les révèle) */
.anim .mot > span { transform: translateY(105%); }
.anim .ligne > span { transform: translateY(112%); }
.anim .revele { opacity: 0; transform: translateY(24px); }
.anim [data-decoupe]:not(.est-decoupe) { visibility: hidden; }
.anim .tuile, .anim .projet, .anim .clients li, .anim .perso, .anim .aliment { opacity: 0; }
/* Sur mobile, la cuisinière s'affiche dès qu'elle est chargée (c'est le plus grand élément du premier écran) */
@media (max-width: 899px) { .anim .perso--hero { opacity: 1; } }

/* Manifeste : piment à gauche, grand; texte à droite */
.manifeste {
  position: relative;
  color: var(--manifeste-titre);
  padding-block: clamp(50px, 6vw, 90px) clamp(190px, 19vw, 280px);
  background:
    radial-gradient(60% 70% at 100% 100%, var(--ombre-bordeaux), transparent 70%),
    var(--manifeste-fond);
}
.manifeste__grille {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(24px, 3.5vw, 50px);
  align-items: center;
}
.aliment--piment { margin-left: clamp(-120px, -8vw, 0px); margin-right: clamp(0px, 2vw, 30px); }
.manifeste h2 { font-size: clamp(2.3rem, 3.95vw, 3.7rem); line-height: .92; letter-spacing: -0.03em; margin-bottom: .9em; }
.manifeste p { max-width: 25rem; color: var(--manifeste-texte); }

/* Bande défilante de la maquette : un seul ruban incliné, en travers de deux sections */
.bandeaux { position: relative; z-index: 5; height: 0; }
.bandeau {
  position: absolute;
  left: -5%;
  width: 110%;
  top: clamp(-128px, -9vw, -66px);
  transform: rotate(-2.8deg);
  overflow: hidden;
  padding-block: .52em;
  font-weight: 900;
  font-size: clamp(2.1rem, 5vw, 4.7rem);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: var(--bandeau-1-fond);
  color: var(--bandeau-1-texte);
}
.bandeau__piste { display: inline-flex; align-items: center; gap: .5em; padding-right: .5em; will-change: transform; }
.bandeau__piste span { flex: none; }
.pastille { flex: none; display: inline-block; width: .3em; height: .3em; border-radius: 50%; background: var(--bandeau-1-puce); }

/* Services */
.services {
  position: relative;
  padding-block: clamp(170px, 19vw, 270px) clamp(150px, 16vw, 230px);
  background: var(--services-fond);
}
.services__titre {
  font-size: clamp(3rem, 8.5vw, 8rem);
  line-height: .9;
  letter-spacing: -0.035em;
  color: var(--services-titre);
  max-width: 11ch;
  margin-bottom: clamp(40px, 7vw, 100px);
}
.mosaique__cadre { position: relative; }
.mosaique {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-rows: auto auto;
  gap: 18px;
}
.tuile {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 3.7vw, 52px);
  border-radius: var(--rayon-carte);
}
.tuile h3 { font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: .97; max-width: 13ch; margin-bottom: .75em; position: relative; z-index: 1; color: var(--titre); }
.tuile p { position: relative; z-index: 1; max-width: 29rem; font-size: 1rem; line-height: 1.65; }
.tuile .tuile__inclus { font-weight: 700; font-size: .9375rem; margin-bottom: .9em; color: var(--inclus); }
.tuile--orange { background: var(--tuile-orange-fond); color: var(--tuile-orange-texte); --titre: var(--tuile-orange-titre); --accent: var(--tuile-orange-accent); --inclus: var(--tuile-orange-inclus); }
.tuile--fonce { background: var(--tuile-fonce-fond); color: var(--tuile-fonce-texte); --titre: var(--tuile-fonce-titre); --accent: var(--tuile-fonce-accent); --inclus: var(--tuile-fonce-inclus); }
.tuile--tomate { background: linear-gradient(160deg, var(--tuile-tomate-fond) 35%, var(--tomate-fonce)); color: var(--tuile-tomate-texte); --titre: var(--tuile-tomate-titre); --accent: var(--tuile-tomate-accent); --inclus: var(--tuile-tomate-inclus); }

/* Grande tuile : texte en haut, personnage coupé par le bas de la carte (effet affiche) */
.tuile--haute { grid-row: span 2; display: flex; flex-direction: column; padding-bottom: 0; }
.tuile--haute h3 { font-size: clamp(2.5rem, 4.6vw, 4.2rem); line-height: .98; }
.tuile__scene {
  position: relative;
  flex: 1 1 auto;
  width: min(100%, 460px);
  min-height: clamp(200px, 22vw, 330px);
  margin: 12px auto 0;
}
.tuile__perso { position: absolute; top: 8px; left: 50%; width: 84%; translate: -50% 0; transition: translate .8s var(--ease-doux); filter: drop-shadow(0 16px 20px var(--ombre-perso)); }
.tuile--haute:hover .tuile__perso { translate: -50% -8px; }
.tuile__macaronis { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--jaune-chaud); stroke-width: 34; }

/* Badge « 5 » : l'anneau tourne lentement (main.js) */
.badge__svg { display: block; width: 100%; height: auto; overflow: visible; }
.tuile__badge { position: absolute; top: clamp(18px, 2vw, 28px); right: clamp(18px, 2.2vw, 30px); width: clamp(56px, 5.4vw, 76px); }
.tuile__badge .badge__anneau { fill: var(--vert-lime); }
.tuile__badge .badge__cinq { fill: var(--blanc); }
.tuile--fonce h3 { padding-right: 60px; }

.aliment--citron { position: absolute; top: clamp(18px, 2.6vw, 38px); right: clamp(6px, 1vw, 14px); width: clamp(130px, 16vw, 228px); }
.aliment--citron img { transition: scale .8s var(--ease-doux); }
.tuile--tomate:hover .aliment--citron img { scale: 1.04; }
.tuile--tomate h3 { max-width: 9ch; }
.services__action { margin-top: clamp(40px, 4.5vw, 64px); }

/* Indicateur d'étapes 01 / 02 / 03 : visible seulement quand la mosaïque est épinglée (main.js ajoute .epingle) */
.etapes { display: none; }
.epingle .etapes {
  position: absolute;
  left: -46px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  grid-template-columns: auto 6px;
  grid-template-rows: repeat(3, 46px);
  column-gap: 8px;
  align-items: center;
  font-weight: 900;
  font-size: .8125rem;
  line-height: 1;
  color: var(--services-titre);
}
.etapes__jauge { grid-column: 2; grid-row: 1 / span 3; align-self: stretch; overflow: hidden; border-radius: var(--rayon); background: var(--gris-champ); }
.etapes__jauge > span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--vert-lime); transform-origin: 50% 0; transform: scaleY(.34); }
.etapes__no { grid-column: 1; opacity: .3; transition: opacity .4s ease; }
.etapes__no.est-active { opacity: 1; }

/* Écrans larges mais bas : tuiles plus compactes pour que la mosaïque tienne à l'écran une fois épinglée */
@media (min-width: 1000px) and (max-height: 900px) {
  .tuile { padding: clamp(24px, 2.4vw, 36px); }
  .tuile--haute { padding-bottom: 0; }
  .tuile h3 { font-size: clamp(1.7rem, 2.5vw, 2.3rem); margin-bottom: .6em; }
  .tuile--haute h3 { font-size: clamp(2.2rem, 3.7vw, 3.4rem); }
  .tuile p { font-size: .9375rem; line-height: 1.55; }
  .tuile .tuile__inclus { font-size: .875rem; margin-bottom: .7em; }
  .tuile__scene { min-height: 180px; }
  .aliment--citron { width: clamp(120px, 12vw, 180px); }
}

/* Histoire : section calme, sans personnage ni 3D */
.histoire {
  position: relative;
  color: var(--histoire-texte);
  padding-block: clamp(50px, 7vw, 100px) clamp(170px, 18vw, 260px);
  background: var(--histoire-fond);
}
.histoire__grille {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(60px, 9vw, 130px) clamp(32px, 5.5vw, 80px);
  align-items: start;
}
.histoire h2 { font-size: clamp(2.8rem, 6.4vw, 6rem); line-height: .92; letter-spacing: -0.035em; color: var(--histoire-titre); }
.histoire__texte { display: grid; gap: 1.4em; max-width: 31rem; padding-top: .9em; }
.histoire__fort { font-weight: 700; color: var(--histoire-fort); }
.clients {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px) clamp(16px, 3vw, 40px);
  align-items: center;
  justify-items: center;
  max-width: 34rem;
}
.clients li { width: 100%; display: grid; place-items: center; }
.histoire__chute {
  align-self: center;
  color: var(--histoire-chute);
  font-weight: 900;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  line-height: .98;
  letter-spacing: -0.025em;
}
.chute__fin { display: block; }
.chute__fin, .chute__fin .mot > span { color: var(--histoire-chute-fin); }

/* Réalisations : texte, puis les projets en rangées */
.realisations {
  position: relative;
  padding-block: clamp(50px, 7vw, 100px) calc(var(--vague-h) + clamp(72px, 8vw, 120px));
  color: var(--realisations-texte);
  background: var(--realisations-fond);
}
.realisations__grille {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.realisations h2 { font-size: clamp(2.8rem, 6.6vw, 6.2rem); line-height: .92; letter-spacing: -0.035em; color: var(--realisations-titre); }
.realisations__texte { padding-top: .9em; }
.realisations__texte > p { max-width: 31rem; margin-bottom: 1.4em; }
.realisations__appel { font-weight: 700; }

/* Projets : un par rangée, la vidéo à gauche (58 %), le nom et le texte à droite, centrés sur la vidéo */
.projets { display: grid; gap: clamp(64px, 9vw, 130px); margin-top: clamp(64px, 8vw, 120px); }
.projet {
  display: grid;
  grid-template-columns: 58fr 42fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.projets__suite { margin-top: clamp(56px, 7vw, 100px); }

.projet__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--creme);
  cursor: pointer;
  aspect-ratio: 16 / 9;                 /* même format pour les trois vidéos */
  border-radius: var(--rayon-media);
  isolation: isolate;                   /* garde les coins arrondis pendant le zoom */
}
.projet__media img, .projet__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease), opacity .5s ease;
}
.projet__video { opacity: 0; }
.projet__media.joue .projet__video { opacity: 1; }
.projet__media:hover img, .projet__media:hover .projet__video,
.projet__media:focus-visible img, .projet__media:focus-visible .projet__video { transform: scale(1.05); }
.projet__media:focus-visible { outline: 3px solid var(--vert-fonce); outline-offset: 5px; }
.projet__lecture {
  position: absolute;
  left: clamp(14px, 1.6vw, 22px);
  bottom: clamp(14px, 1.6vw, 22px);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bouton);
  color: var(--bouton-texte);
  transition: transform .5s var(--ease), opacity .4s ease;
}
.projet__lecture svg { width: 20px; height: 20px; margin-left: 2px; }
.curseur-actif .projet__media { cursor: none; }
.curseur-actif .projet__media:hover .projet__lecture { opacity: 0; transform: scale(.6); }
.projet__nom { font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: .95; letter-spacing: -0.03em; color: var(--realisations-titre); margin-bottom: .45em; }
.projet__texte p { max-width: 24rem; font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.6; }

/* Curseur « Voir le projet » (ordinateur) : positionné par main.js */
.curseur {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  margin: -58px 0 0 -58px;
  padding: 14px;
  border-radius: 50%;
  background: var(--bouton);
  color: var(--bouton-texte);
  font-weight: 900;
  font-size: .875rem;
  line-height: 1.1;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

/* Visionneuse vidéo */
.visionneuse {
  width: min(1200px, 92vw);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
}
.visionneuse::backdrop { background: var(--voile); }
.visionneuse[open] { animation: ouverture .5s var(--ease); }
@keyframes ouverture { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.visionneuse__video {
  width: 100%;
  height: auto;
  max-height: 80svh;
  aspect-ratio: 16 / 9;
  border-radius: var(--rayon-carte);
  background: var(--vert-nuit);
}
.visionneuse__fermer {
  position: absolute;
  top: -62px;
  right: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bouton);
  color: var(--bouton-texte);
  cursor: pointer;
  transition: transform .4s var(--ease);
}
.visionneuse__fermer:hover { transform: scale(1.08); }
.visionneuse__fermer:focus-visible { outline: 3px solid var(--blanc); outline-offset: 3px; }
.visionneuse__fermer svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .visionneuse[open] { animation: none; } }

/* Section contact (carte et courriel) : son bord supérieur en vague recouvre le bas de la section précédente */
.formulaire {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin-top: calc(-1 * var(--vague-h));
  padding: clamp(170px, 17vw, 240px) var(--gouttiere) clamp(60px, 6vw, 90px);
  background: var(--formulaire-fond);
  -webkit-mask:
    var(--masque-vague) top / 100% var(--vague-h) no-repeat,
    linear-gradient(#000 0 0) 0 calc(var(--vague-h) - 1px) / 100% calc(100% - var(--vague-h) + 1px) no-repeat;
  mask:
    var(--masque-vague) top / 100% var(--vague-h) no-repeat,
    linear-gradient(#000 0 0) 0 calc(var(--vague-h) - 1px) / 100% calc(100% - var(--vague-h) + 1px) no-repeat;
}
.formulaire__motif {
  position: absolute;
  inset: 0;
  background: var(--vert-motif);
  -webkit-mask: url("assets/img/motif-formulaire.svg") center / cover no-repeat;
  mask: url("assets/img/motif-formulaire.svg") center / cover no-repeat;
  pointer-events: none;
}
.formulaire__panneau {
  position: relative;
  z-index: 2;
  width: min(780px, 100%);
  margin-inline: auto;
  color: var(--formulaire-texte);
  padding: clamp(32px, 5vw, 68px);
  border-radius: 32px;
  background: var(--formulaire-panneau);
}
/* Badge « 5 » au coin de la carte. Avec la 3D (badge.js), le badge en volume prend la place du badge vectoriel. */
.sceau {
  position: absolute;
  top: clamp(-58px, -4vw, -34px);
  right: clamp(22px, 5vw, 58px);
  width: clamp(104px, 19%, 172px);
  aspect-ratio: 1;
  pointer-events: none;
}
.sceau .badge__anneau { fill: var(--tomate); }
.sceau .badge__cinq { fill: var(--vert-fonce); }
.sceau canvas { position: absolute; left: 50%; top: 50%; width: 130%; height: 130%; translate: -50% -50%; }
.badge-3d .sceau svg { visibility: hidden; }
.formulaire h2 { font-size: clamp(2.4rem, 5.2vw, 4.6rem); line-height: .94; letter-spacing: -0.035em; margin-bottom: .6em; max-width: 6.5em; }
.formulaire__panneau > p { margin-bottom: 2.2rem; max-width: 26rem; line-height: 1.65; }
/* Courriel de contact : l'adresse est longue, elle peut se couper sur un très petit écran */
.formulaire__panneau .bouton { max-width: 100%; }
.formulaire__panneau .bouton__texte { overflow-wrap: anywhere; }
/* Icône de lien sortant */
.bouton:hover .bouton__icone--sortie { animation: sortie 1s var(--ease) infinite; }
@keyframes sortie {
  0% { transform: translate(0, 0); }
  45% { transform: translate(3px, -3px); }
  100% { transform: translate(0, 0); }
}

/* Pied de page */
.pied { position: relative; z-index: 1; background: var(--pied-fond); color: var(--pied-texte); padding-block: 38px; }
.pied__grille { display: grid; grid-template-columns: auto 1fr; gap: 22px clamp(24px, 5vw, 64px); align-items: center; }
.pied img { width: 220px; }
.pied p { font-size: .9375rem; }
.pied__liens { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 26px; font-size: .9375rem; font-weight: 700; }
.pied__liens a { display: inline-block; padding-block: 6px; text-decoration: none; }
.pied__liens a:hover { text-decoration: underline; text-underline-offset: 4px; }
.pied a:focus-visible { outline: 3px solid var(--blanc); outline-offset: 3px; border-radius: 4px; }
.pied__droits { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--filet-pied); }

/* Pages simples : pages légales, confirmation d'envoi, page introuvable */
.page-simple { padding-top: var(--entete-h); }
.evitement { position: absolute; left: -9999px; z-index: 100; padding: 12px 18px; border-radius: var(--rayon); background: var(--blanc); color: var(--vert-nuit); font-weight: 700; }
.evitement:focus { left: 16px; top: 16px; }
.legal { padding-block: clamp(56px, 8vw, 110px) clamp(70px, 9vw, 130px); min-height: 60svh; }
.legal__colonne { max-width: calc(46rem + 2 * var(--gouttiere)); }
.legal h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: .95; letter-spacing: -0.035em; color: var(--vert-fonce); margin-bottom: .45em; }
.legal h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.1; letter-spacing: -0.02em; color: var(--vert-fonce); margin: 2.2em 0 .7em; }
.legal h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; color: var(--vert-fonce); margin: 1.6em 0 .5em; }
.legal p, .legal ul { margin-bottom: 1em; max-width: 42rem; }
.legal ul { padding-left: 1.3em; list-style: disc; }
.legal li { margin-bottom: .35em; }
.legal li::marker { color: var(--vert-lime); }
.legal a:not(.bouton) { color: var(--vert-fonce); font-weight: 700; text-underline-offset: 3px; }
.legal a:focus-visible { outline: 3px solid var(--vert-fonce); outline-offset: 3px; border-radius: 4px; }
.legal__chapeau { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; }
.legal__dates { font-size: .9375rem; font-weight: 700; color: var(--vert-fonce); padding: 14px 20px; border-radius: 16px; background: var(--creme); display: inline-block; margin-bottom: 1.8em; }
.coordonnees { font-style: normal; padding: 20px 24px; border-radius: 20px; background: var(--creme); margin-bottom: 1.2em; max-width: 34rem; line-height: 1.65; }
.tableau { overflow-x: auto; margin-bottom: 1.2em; border: 2px solid var(--gris-champ); border-radius: 20px; }
.tableau table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.tableau th, .tableau td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--gris-champ); }
.tableau tr:last-child th, .tableau tr:last-child td { border-bottom: 0; }
.tableau thead th, .tableau th[scope="row"] { font-weight: 700; color: var(--vert-fonce); background: var(--creme); }
/* Information manquante : bien visible à la relecture; le build de production refuse de partir tant qu'il en reste */
.a-completer { padding: .1em .4em; border-radius: 6px; background: var(--jaune); color: var(--vert-nuit); font-weight: 700; }

/* Tablette */
@media (max-width: 900px) {
  .manifeste__grille, .histoire__grille, .realisations__grille { grid-template-columns: 1fr; }
  .histoire__grille { gap: clamp(36px, 7vw, 60px); }
  .aliment--piment { width: min(84%, 460px); margin-left: -6%; }
  .manifeste p { max-width: 34rem; }
  .mosaique { grid-template-columns: 1fr; }
  .tuile--haute { grid-row: auto; }
  .tuile__scene { min-height: clamp(260px, 62vw, 380px); margin-top: 28px; }
  .clients { max-width: none; }
  .hero__texte { max-width: 24rem; }
  .pied__grille { grid-template-columns: 1fr; }
  .pied__liens { justify-content: flex-start; }

  /* Projets : la vidéo au-dessus, le texte en dessous, pleine largeur */
  .projet { grid-template-columns: 1fr; gap: 20px; }
  .projets { gap: clamp(48px, 10vw, 72px); }
}

/* Mobile */
@media (max-width: 560px) {
  :root { --entete-h: 54px; }
  .entete .bouton--petit { font-size: .85rem; padding: .75em 1em; }
  .entete .bouton--petit::before { display: none; }
  .hero { min-height: auto; padding: 120px var(--gouttiere) 300px; }
  .hero__titre { font-size: clamp(2.5rem, 13.4vw, 4.4rem); }
  .perso--hero { right: 4px; bottom: 18px; width: 250px; }
  .bouton { font-size: 1rem; }
  .tuile--tomate h3 { max-width: 8ch; }
  .clients { gap: 34px 22px; }
  .formulaire__panneau { padding-top: 92px; }
  .sceau { top: -34px; right: 18px; width: 100px; }
  .pied__grille { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pied__liens { justify-content: center; }
  .tableau th, .tableau td { padding: 10px 12px; }
}
