/* ==========================================================================
   Rabatlav : feuille de style
   Palette bleu / vert / blanc, géométrie inspirée du zellige de Fès.
   Voir DESIGN.md pour le raisonnement.
   ========================================================================== */

/* --- 1. Tokens --------------------------------------------------------- */
:root {
  /* Couleurs */
  --bleu-fes:   #0A3A5A;
  --bleu:       #0F5C8C;
  --bleu-clair: #E3F0F8;
  --vert:       #14A085;
  --vert-fonce: #0C7A65;
  --vert-pale:  #D9F0E9;
  --chaux:      #F6FAF9;
  --blanc:      #FFFFFF;
  --encre:      #10222E;
  --encre-doux: #4A6070;
  --trait:      #DCE8E6;

  /* Typographie : échelle 1.25, fluide */
  --f-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --f-texte:   "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --t-xs:  0.75rem;
  --t-sm:  0.875rem;
  --t-md:  1rem;
  --t-lg:  clamp(1.125rem, 0.4vw + 1.05rem, 1.25rem);
  --t-xl:  clamp(1.35rem, 0.9vw + 1.2rem, 1.7rem);
  --t-2xl: clamp(1.7rem, 1.6vw + 1.35rem, 2.4rem);
  --t-3xl: clamp(2.1rem, 2.8vw + 1.5rem, 3.3rem);
  --t-4xl: clamp(2.5rem, 4.6vw + 1.4rem, 4.6rem);

  /* Rythme */
  --gouttiere: clamp(1.25rem, 4vw, 3rem);
  --large:     1240px;
  --section:   clamp(4.5rem, 9vw, 8rem);

  /* Les rayons encodent la hiérarchie : plus l'élément est grand, plus il est doux */
  --r-champ: 4px;
  --r-bloc:  14px;
  --r-carte: 20px;

  --ombre-basse: 0 1px 2px rgba(10, 58, 90, .06), 0 4px 14px rgba(10, 58, 90, .05);
  --ombre-haute: 0 10px 40px rgba(10, 58, 90, .13);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* --- 2. Base ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* décale les ancres sous l'en-tête fixe */
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--chaux);
  color: var(--encre);
  font-family: var(--f-texte);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--vert);
  outline-offset: 3px;
  border-radius: 2px;
}

.saut-contenu {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bleu-fes);
  color: var(--blanc);
  padding: .75rem 1.25rem;
  z-index: 200;
}
.saut-contenu:focus { left: .5rem; top: .5rem; }

/* --- 3. Typographie ---------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -.025em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: var(--t-4xl); letter-spacing: -.038em; }
h2 { font-size: var(--t-3xl); }
h3 { font-size: var(--t-xl); letter-spacing: -.015em; }

p { margin: 0 0 1rem; max-width: 62ch; }

.plomb {
  font-size: var(--t-lg);
  color: var(--encre-doux);
  line-height: 1.55;
  max-width: 54ch;
}

.mention { font-size: var(--t-sm); color: var(--encre-doux); }

/* --- 4. Mise en page --------------------------------------------------- */
.enveloppe {
  width: 100%;
  max-width: var(--large);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

.section { padding-block: var(--section); }
.section-sombre { background: var(--bleu-fes); color: var(--blanc); }
.section-sombre .plomb { color: rgba(255, 255, 255, .72); }
.section-blanche { background: var(--blanc); }

.entete-section { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* Frise de zellige : remplace le filet de séparation habituel */
.frise {
  height: 14px;
  background-image:
    linear-gradient(135deg, var(--vert) 25%, transparent 25%),
    linear-gradient(225deg, var(--vert) 25%, transparent 25%),
    linear-gradient(45deg,  var(--bleu) 25%, transparent 25%),
    linear-gradient(315deg, var(--bleu) 25%, transparent 25%);
  background-position: 0 0, 7px 0, 7px -7px, 0 7px;
  background-size: 14px 14px;
  background-repeat: repeat;
  opacity: .9;
}

/* --- 5. Boutons -------------------------------------------------------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--f-display);
  font-size: var(--t-md);
  font-weight: 600;
  letter-spacing: -.01em;
  padding: .95rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--r-bloc);
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s var(--ease), background-color .18s, border-color .18s, color .18s;
}
.bouton:active { transform: translateY(1px) scale(.99); }

.bouton-primaire { background: var(--vert); color: var(--blanc); }
.bouton-primaire:hover { background: var(--vert-fonce); }

.bouton-secondaire {
  background: transparent;
  color: var(--bleu-fes);
  border-color: var(--trait);
}
.bouton-secondaire:hover { border-color: var(--bleu); color: var(--bleu); }

.section-sombre .bouton-secondaire { color: var(--blanc); border-color: rgba(255,255,255,.3); }
.section-sombre .bouton-secondaire:hover { border-color: var(--blanc); color: var(--blanc); }

.bouton-large { width: 100%; }

/* --- 6. En-tête -------------------------------------------------------- */
.entete {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(246, 250, 249, 0);
  transition: background-color .3s, box-shadow .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.entete.est-collee {
  background: rgba(246, 250, 249, .92);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--trait);
  box-shadow: var(--ombre-basse);
}

.entete-barre {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 5rem;
  transition: height .3s var(--ease);
}
.entete.est-collee .entete-barre { height: 4.25rem; }

.entete:not(.est-collee) .tel-entete { color: var(--blanc); text-shadow: 0 1px 10px rgba(10, 34, 46, .6); }

/* Au-dessus du héros, le logotype bicolore deviendrait illisible : on le passe
   en blanc plein, avec la même lueur que le reste de la barre. */
.entete:not(.est-collee) .logo-img {
  filter: brightness(0) invert(1) drop-shadow(0 1px 10px rgba(10, 34, 46, .55));
}
@media (min-width: 801px) {
  .entete:not(.est-collee) .nav a { color: rgba(255, 255, 255, .9); text-shadow: 0 1px 10px rgba(10, 34, 46, .7); }
  .entete:not(.est-collee) .nav a:hover { color: var(--blanc); }
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  display: block;
  width: auto;
  height: 2.1rem;
  transition: height .3s var(--ease), filter .3s;
}
.entete.est-collee .logo-img { height: 1.8rem; }

.nav { display: flex; margin-left: auto; }
.nav-interieur { display: flex; gap: 1.75rem; }
.nav a {
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--encre-doux);
  padding-block: .35rem;
  position: relative;
  transition: color .18s;
}
.nav a:hover { color: var(--bleu); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 0;
  background: var(--vert);
  transition: width .25s var(--ease);
}
.nav a:hover::after { width: 100%; }

.entete-actions { display: flex; align-items: center; gap: .75rem; }
.tel-entete {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: var(--t-sm);
  text-decoration: none;
  color: var(--bleu-fes);
  white-space: nowrap;
}

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--trait);
  border-radius: var(--r-champ);
  background: var(--blanc);
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.burger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--encre);
  margin: 3px auto;
  transition: transform .25s var(--ease), opacity .2s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* --- 7. Héros ----------------------------------------------------------
   Le défilement fait passer une buse de lavage sur le tapis : à gauche de la
   ligne, le tapis est propre ; à droite, encore terne. Le titre est coupé par
   la même ligne. --p (0 → 1) pilote tout : l'image, le titre, la buse, la jauge.
   ------------------------------------------------------------------------ */
@property --p   { syntax: "<number>";  inherits: true; initial-value: 1; }
@property --pct { syntax: "<integer>"; inherits: true; initial-value: 100; }

.heros { position: relative; background: var(--encre); }

.heros-scene {
  /* marge de calage alignée sur .enveloppe, pour des blocs pleine largeur */
  --cale: max(var(--gouttiere), calc((100% - var(--large)) / 2 + var(--gouttiere)));
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  color: var(--blanc);
}

.heros-couche,
.heros-couche img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.heros-couche img { object-fit: cover; }

/* Le tapis encrassé : fibres ternies, voile de poussière, auréoles */
.heros-sale img { filter: grayscale(.65) sepia(.5) brightness(.6) contrast(.85); }
.heros-sale::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 26% 20% at 28% 38%, rgba(60, 42, 24, .45), transparent 70%),
    radial-gradient(ellipse 20% 26% at 74% 62%, rgba(60, 42, 24, .38), transparent 70%),
    radial-gradient(ellipse 14% 12% at 55% 22%, rgba(60, 42, 24, .3), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .35 0 0 0 0 .25 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  opacity: .75;
}

.heros-propre { clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0); }
.heros-propre img { filter: saturate(1.12) contrast(1.04); }

/* Assombrit le haut (en-tête) et le bas (texte), laisse respirer le motif au centre */
.heros-voile {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(10, 34, 46, .75) 0%,
    rgba(10, 34, 46, 0) 26%,
    rgba(10, 34, 46, .15) 48%,
    rgba(10, 34, 46, .9) 100%);
}

/* La buse : un trait d'eau claire bordé de vert */
.heros-buse {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--p) * 100%);
  width: 2px;
  z-index: 2;
  translate: -1px 0;
  background: var(--blanc);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 0 32px 8px rgba(20, 160, 133, .6);
  opacity: min(1, calc((1 - var(--p)) * 14));
}

.heros-jauge {
  position: absolute;
  top: clamp(6rem, 16vh, 9rem);
  left: 0;
  /* passe de droite à gauche du trait pour ne jamais sortir de l'écran */
  translate: calc(var(--p) * -100% + 14px - var(--p) * 28px) 0;
  counter-reset: pct var(--pct);
  font-family: var(--f-display);
  font-size: var(--t-sm);
  font-weight: 600;
  white-space: nowrap;
  background: var(--vert);
  padding: .3rem .8rem;
  border-radius: 100px;
}
.heros-jauge::before { content: counter(pct) " % lavé"; font-variant-numeric: tabular-nums; }

.heros-indice {
  position: absolute;
  z-index: 3;
  top: clamp(6rem, 16vh, 9rem);
  right: var(--cale);
  margin: 0;
  font-size: var(--t-sm);
  color: rgba(255, 255, 255, .8);
  opacity: clamp(0, calc((.35 - var(--p)) * 5), 1);
  text-shadow: 0 1px 10px rgba(10, 34, 46, .7);
}
/* sur petit écran, la jauge suffit à annoncer le principe */
@media (max-width: 520px) { .heros-indice { display: none; } }

.heros-texte {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  padding-bottom: clamp(1.75rem, 6vh, 4rem);
}

.heros-titre {
  display: grid;
  margin: 0 0 clamp(1.25rem, 3vh, 2.25rem);
  font-size: clamp(3rem, 1rem + 8.2vw, 9.25rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.055em;
  text-wrap: nowrap;
}
/* deux calques superposés, coupés par la même ligne que l'image */
.heros-titre > span { grid-area: 1 / 1; padding-inline: var(--cale); }
.titre-sale { color: #CFC2AA; }
.titre-propre {
  color: var(--blanc);
  clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0);
}

.heros-pied {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 3rem;
  padding-inline: var(--cale);
}
.heros-accroche {
  margin: 0;
  max-width: 36ch;
  font-size: var(--t-lg);
  color: rgba(255, 255, 255, .86);
}
.heros-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
  margin-top: 2rem;
}
.heros .heros-actions { margin-top: 0; }
.heros-tel {
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--blanc);
  text-underline-offset: .28em;
  text-decoration-color: rgba(255, 255, 255, .45);
}
.heros-tel:hover { text-decoration-color: var(--vert); }

/* Le lavage n'existe que si l'utilisateur accepte le mouvement :
   sinon --p reste à 1 et le tapis s'affiche propre. */
@media (prefers-reduced-motion: no-preference) {
  .heros { height: 230vh; height: 230svh; }
  .heros-scene { position: sticky; top: 0; }

  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .heros { view-timeline: --heros block; }
    .heros-scene {
      animation: lavage linear both;
      animation-timeline: --heros;
      animation-range: contain 0% contain 100%;
    }
  }
}
/* le lavage se termine avant la fin de la course : on lit le titre propre */
@keyframes lavage {
  0%        { --p: 0; --pct: 0; }
  82%, 100% { --p: 1; --pct: 100; }
}

.coche {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--vert-pale);
  color: var(--vert-fonce);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}

/* --- 9. Bandeau défilant ----------------------------------------------- */
.bandeau {
  background: var(--bleu-fes);
  color: var(--blanc);
  padding-block: 1.1rem;
  overflow: hidden;
  display: flex;
  gap: 0;
}
.bandeau-piste {
  display: flex;
  gap: 3rem;
  padding-right: 3rem;
  flex-shrink: 0;
  min-width: 100%;
  animation: defilement 38s linear infinite;
}
.bandeau:hover .bandeau-piste { animation-play-state: paused; }
@keyframes defilement { to { transform: translateX(-100%); } }

.bandeau-element {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--f-display);
  font-size: var(--t-md);
  font-weight: 500;
  white-space: nowrap;
  color: rgba(255, 255, 255, .88);
}
.bandeau-element::before {
  content: "";
  width: 9px; height: 9px;
  background: var(--vert);
  /* losange : le motif du tapis berbère */
  rotate: 45deg;
  flex-shrink: 0;
}

/* --- 10. Textures tissées ----------------------------------------------
   Dessinées en CSS et SVG, partagées par le plan du calculateur, le nuancier
   et la chaîne de l'atelier.
   ------------------------------------------------------------------------ */
.texture-synthetique {
  background:
    radial-gradient(circle, #aea595 30%, transparent 34%) 0 0 / 6px 6px,
    radial-gradient(circle, #c3bbad 30%, transparent 34%) 3px 3px / 6px 6px,
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27220%27%20height%3D%27220%27%3E%3Cfilter%20id%3D%27n%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%27.9%27%20numOctaves%3D%272%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200%20%200%200%200%200%200%20%200%200%200%200%200%20%20.5%200%200%200%200%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23n%29%27%2F%3E%3C%2Fsvg%3E") 0 0 / 220px 220px,
    #d9d2c5;
}
.texture-laine {
  background:
    radial-gradient(ellipse at 30% 35%, rgba(255, 255, 255, .35), transparent 60%),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27260%27%20height%3D%27260%27%3E%3Cfilter%20id%3D%27n%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%27.32%27%20numOctaves%3D%274%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%20.35%20%200%200%200%200%20.25%20%200%200%200%200%20.12%20%20.75%200%200%200%20-.1%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23n%29%27%2F%3E%3C%2Fsvg%3E") 0 0 / 260px 260px,
    #e6d8bc;
}
.texture-berbere {
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2756%27%20height%3D%2756%27%3E%3Cpath%20d%3D%27M0%2028L28%200L56%2028L28%2056Z%27%20fill%3D%27none%27%20stroke%3D%27%233b2e25%27%20stroke-width%3D%273.4%27%2F%3E%3Cpath%20d%3D%27M28%2019L37%2028L28%2037L19%2028Z%27%20fill%3D%27none%27%20stroke%3D%27%233b2e25%27%20stroke-width%3D%272%27%2F%3E%3C%2Fsvg%3E") 0 0 / 56px 56px, url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27220%27%20height%3D%27220%27%3E%3Cfilter%20id%3D%27n%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%27.9%27%20numOctaves%3D%272%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200%20%200%200%200%200%200%20%200%200%200%200%200%20%20.5%200%200%200%200%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23n%29%27%2F%3E%3C%2Fsvg%3E") 0 0 / 220px 220px, #efe7d6;
}
.texture-viscose {
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .22) 0 1px, transparent 1px 5px),
    linear-gradient(115deg, #7f97a4, #dce6eb 32%, #93a9b5 52%, #e6eef1 72%, #7c93a0);
}
.texture-persan { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27220%27%20height%3D%27220%27%3E%3Cfilter%20id%3D%27n%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%27.9%27%20numOctaves%3D%272%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200%20%200%200%200%200%200%20%200%200%200%200%200%20%20.5%200%200%200%200%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23n%29%27%2F%3E%3C%2Fsvg%3E") 0 0 / 220px 220px, url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2764%27%20height%3D%2764%27%3E%3Crect%20width%3D%2764%27%20height%3D%2764%27%20fill%3D%27%237d1f26%27%2F%3E%3Cpath%20d%3D%27M32%2013L51%2032L32%2051L13%2032Z%27%20fill%3D%27%23d8b27a%27%2F%3E%3Crect%20x%3D%2723%27%20y%3D%2723%27%20width%3D%2718%27%20height%3D%2718%27%20fill%3D%27%231e2d52%27%2F%3E%3Ccircle%20cx%3D%2732%27%20cy%3D%2732%27%20r%3D%274%27%20fill%3D%27%23d8b27a%27%2F%3E%3Ccircle%20cx%3D%270%27%20cy%3D%270%27%20r%3D%277%27%20fill%3D%27%231e2d52%27%2F%3E%3Ccircle%20cx%3D%2764%27%20cy%3D%270%27%20r%3D%277%27%20fill%3D%27%231e2d52%27%2F%3E%3Ccircle%20cx%3D%270%27%20cy%3D%2764%27%20r%3D%277%27%20fill%3D%27%231e2d52%27%2F%3E%3Ccircle%20cx%3D%2764%27%20cy%3D%2764%27%20r%3D%277%27%20fill%3D%27%231e2d52%27%2F%3E%3C%2Fsvg%3E") 0 0 / 64px 64px; }
.texture-soie {
  background:
    repeating-linear-gradient(0deg, rgba(110, 90, 60, .07) 0 1px, transparent 1px 3px),
    linear-gradient(100deg, #e3d9c4, #fffaf0 28%, #ddd1ba 50%, #faf4e8 70%, #d8ccb4);
}
.texture-kilim { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27220%27%20height%3D%27220%27%3E%3Cfilter%20id%3D%27n%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%27.9%27%20numOctaves%3D%272%27%20stitchTiles%3D%27stitch%27%2F%3E%3CfeColorMatrix%20values%3D%270%200%200%200%200%20%200%200%200%200%200%20%200%200%200%200%200%20%20.5%200%200%200%200%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23n%29%27%2F%3E%3C%2Fsvg%3E") 0 0 / 220px 220px, url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2740%27%20height%3D%2728%27%3E%3Crect%20width%3D%2740%27%20height%3D%2728%27%20fill%3D%27%23b8302d%27%2F%3E%3Cpath%20d%3D%27M0%209L10%203L20%209L30%203L40%209%27%20fill%3D%27none%27%20stroke%3D%27%23f1e2c6%27%20stroke-width%3D%273%27%2F%3E%3Cpath%20d%3D%27M0%2022L10%2016L20%2022L30%2016L40%2022%27%20fill%3D%27none%27%20stroke%3D%27%231f2e4d%27%20stroke-width%3D%273%27%2F%3E%3C%2Fsvg%3E") 0 0 / 40px 28px; }

/* --- 11. Formules : deux moitiés ---------------------------------------- */
.formules { padding-bottom: 0; }

.moities { display: flex; min-height: clamp(540px, 80vh, 760px); }

.moitie {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  color: var(--blanc);
  transition: flex-grow .7s var(--ease);
}
.moitie + .moitie { border-left: 3px solid var(--chaux); }
.moitie picture,
.moitie img { position: absolute; inset: 0; width: 100%; height: 100%; }
.moitie img {
  object-fit: cover;
  z-index: -2;
  filter: saturate(.9);
  transition: scale 1s var(--ease), filter .6s;
}
.moitie::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 34, 46, .05) 0%, rgba(10, 34, 46, .3) 38%, rgba(10, 34, 46, .93) 100%);
}
.moitie-corps { padding: clamp(1.75rem, 4vw, 3.5rem); max-width: 34rem; }
.moitie-prix {
  display: inline-block;
  margin-bottom: 1rem;
  padding: .3rem .85rem;
  border-radius: 100px;
  background: var(--vert);
  font-family: var(--f-display);
  font-size: var(--t-sm);
  font-weight: 700;
}
.moitie h3 { font-size: var(--t-2xl); letter-spacing: -.035em; margin-bottom: .6rem; }
.moitie p { color: rgba(255, 255, 255, .86); }
.moitie-liste { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; gap: .45rem; font-size: var(--t-sm); }
.moitie-liste li { display: flex; align-items: baseline; gap: .7rem; }
.moitie-liste li::before {
  content: "";
  flex-shrink: 0;
  width: 7px; height: 7px;
  background: var(--vert);
  rotate: 45deg;
  translate: 0 -2px;
}

.bouton-blanc { background: var(--blanc); color: var(--bleu-fes); }
.bouton-blanc:hover { background: var(--vert-pale); }

@media (hover: hover) and (min-width: 801px) {
  .moities:hover .moitie { flex-grow: .72; }
  .moities .moitie:hover { flex-grow: 1.4; }
  .moitie:hover img { scale: 1.05; filter: saturate(1.1); }
}
@media (max-width: 800px) {
  .moities { flex-direction: column; min-height: 0; }
  .moitie { min-height: 500px; }
  .moitie + .moitie { border-left: 0; border-top: 3px solid var(--chaux); }
}

/* --- 12. Calculateur : plan à l'échelle et ticket ----------------------- */
.calcul {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .75fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}
.calcul-atelier { display: grid; gap: 1.5rem; }

/* Le sol : un carreau = 50 cm, recalé sur le tapis par le script */
.plan {
  position: relative;
  height: clamp(320px, 40vw, 470px);
  overflow: hidden;
  border-radius: var(--r-carte);
  background-color: #EDF4F2;
  background-image:
    linear-gradient(rgba(15, 92, 140, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 92, 140, .1) 1px, transparent 1px);
  background-size: var(--carreau, 40px) var(--carreau, 40px);
  background-position: var(--sol-x, 0) var(--sol-y, 0);
  box-shadow: inset 0 0 0 1px var(--trait);
}

.plan-tapis,
.plan-canape {
  position: absolute;
  transition: left .45s var(--ease), top .45s var(--ease), width .45s var(--ease), height .45s var(--ease);
}
.plan.en-glisse .plan-tapis,
.plan.en-glisse .plan-canape { transition: none; }

.plan-tapis { border-radius: 2px; box-shadow: 0 8px 20px rgba(10, 34, 46, .2); }
/* franges sur les deux petits côtés */
.plan-tapis::before,
.plan-tapis::after {
  content: "";
  position: absolute;
  top: 5%; bottom: 5%;
  width: 9px;
  background: repeating-linear-gradient(180deg, #eee4d0 0 2px, transparent 2px 5px);
}
.plan-tapis::before { right: 100%; }
.plan-tapis::after { left: 100%; }

.plan-cote {
  position: absolute;
  z-index: 2;
  padding: .15rem .55rem;
  border-radius: 100px;
  background: var(--blanc);
  box-shadow: var(--ombre-basse);
  font-family: var(--f-display);
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--bleu-fes);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.plan-cote-longueur { left: 50%; bottom: 0; translate: -50% calc(100% + 10px); }
.plan-cote-largeur { top: 50%; left: 10px; translate: 0 -50%; }

.plan-poignee {
  position: absolute;
  z-index: 3;
  right: 0; bottom: 0;
  translate: 50% 50%;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--vert);
  border: 3px solid var(--blanc);
  box-shadow: 0 4px 14px rgba(10, 34, 46, .35);
  cursor: nwse-resize;
  touch-action: none;
}
.plan-poignee::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
.plan-poignee::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  animation: appel 2.2s infinite;
}
.plan.a-servi .plan-poignee::after { animation: none; }
@keyframes appel {
  0%   { box-shadow: 0 0 0 0 rgba(20, 160, 133, .6); }
  70%  { box-shadow: 0 0 0 14px rgba(20, 160, 133, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 160, 133, 0); }
}

/* Canapé vu du dessus : assise, accoudoirs, trois coussins, dossier */
.plan-canape { z-index: 1; filter: drop-shadow(0 6px 10px rgba(10, 34, 46, .22)); }
.plan-canape-assise {
  position: absolute;
  inset: 20% 0 0;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 12%, rgba(10, 34, 46, .22) 12% calc(12% + 1px), transparent calc(12% + 1px) calc(41.3% - .5px), rgba(10, 34, 46, .22) calc(41.3% - .5px) calc(41.3% + .5px), transparent calc(41.3% + .5px) calc(58.7% - .5px), rgba(10, 34, 46, .22) calc(58.7% - .5px) calc(58.7% + .5px), transparent calc(58.7% + .5px) calc(88% - 1px), rgba(10, 34, 46, .22) calc(88% - 1px) 88%, transparent 88%),
    linear-gradient(90deg, #6f8591 0 12%, #93a7b1 12% 88%, #6f8591 88%);
}
.plan-canape-dossier {
  position: absolute;
  inset: 0 0 auto;
  height: 30%;
  border-radius: 8px 8px 3px 3px;
  background: #5f7582;
}
.plan-legende {
  position: absolute;
  left: 50%; top: 0;
  translate: -50% calc(-100% - 6px);
  font-size: var(--t-xs);
  color: var(--encre-doux);
  white-space: nowrap;
}
.plan-aide {
  position: absolute;
  left: 1rem; bottom: .8rem;
  margin: 0;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--vert-fonce);
  transition: opacity .3s;
}
.plan.a-servi .plan-aide { opacity: 0; }

.calcul-reglages { display: flex; flex-wrap: wrap; gap: 1.25rem 2.25rem; }
.reglage { border: 0; margin: 0; padding: 0; min-width: 0; }
.reglage legend {
  padding: 0;
  margin-bottom: .55rem;
  font-family: var(--f-display);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--bleu-fes);
}

.bascule,
.pastilles-matiere label { position: relative; }
.bascule {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--trait);
  border-radius: 100px;
  background: var(--chaux);
}
.bascule label { position: relative; }
.bascule input,
.pastilles-matiere input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.bascule span {
  display: block;
  padding: .5rem 1.05rem;
  border-radius: 100px;
  font-size: var(--t-sm);
  font-weight: 600;
  transition: background-color .2s, color .2s;
}
.bascule input:checked + span { background: var(--bleu-fes); color: var(--blanc); }

.pastilles-matiere { display: flex; flex-wrap: wrap; gap: .45rem; max-width: 36rem; }
.pastilles-matiere span {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .85rem .3rem .3rem;
  border: 1.5px solid var(--trait);
  border-radius: 100px;
  background: var(--blanc);
  font-size: var(--t-sm);
  font-weight: 600;
  transition: border-color .2s, background-color .2s;
}
.pastilles-matiere i {
  width: 26px; height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(10, 34, 46, .15);
}
.pastilles-matiere span:hover { border-color: var(--bleu); }
.pastilles-matiere input:checked + span { border-color: var(--vert); background: var(--vert-pale); }
.bascule input:focus-visible + span,
.pastilles-matiere input:focus-visible + span { outline: 3px solid var(--vert); outline-offset: 2px; }

.dimensions { display: flex; gap: .75rem; }
.champ label { display: block; margin-bottom: .25rem; font-size: var(--t-xs); color: var(--encre-doux); }
.champ input {
  width: 7.5rem;
  padding: .5rem .7rem;
  border: 1.5px solid var(--trait);
  border-radius: var(--r-champ);
  background: var(--chaux);
  font-family: var(--f-display);
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--encre);
}
.champ input:focus { border-color: var(--vert); background: var(--blanc); outline: none; }

/* Ticket de pressing : bords dentelés, légèrement de biais */
.ticket {
  position: sticky;
  top: 6.5rem;
  rotate: 1.2deg;
  filter: drop-shadow(0 14px 24px rgba(10, 34, 46, .15));
}
.ticket-papier {
  --dent: 14px;
  padding: 2.1rem 1.6rem 2.6rem;
  background: #FFFDF7;
  -webkit-mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--dent) 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--dent) 51% repeat-x;
  mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--dent) 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--dent) 51% repeat-x;
}
.ticket.imprime .ticket-papier { animation: impression .45s var(--ease); }
@keyframes impression { from { translate: 0 -10px; } to { translate: 0 0; } }

.ticket-marque {
  margin: 0;
  font-family: var(--f-display);
  font-size: var(--t-lg);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--bleu-fes);
}
.ticket-type {
  margin: 0 0 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed var(--trait);
  font-size: var(--t-xs);
  color: var(--encre-doux);
}
.ticket-lignes { margin: 0 0 1rem; display: grid; gap: .5rem; }
.ticket-lignes div { display: flex; align-items: baseline; gap: .5rem; font-size: var(--t-sm); }
.ticket-lignes div[hidden] { display: none; }
.ticket-lignes dt { flex: 1; display: flex; gap: .5rem; color: var(--encre-doux); }
.ticket-lignes dt::after { content: ""; flex: 1; border-bottom: 1.5px dotted #c3d2cf; translate: 0 -4px; }
.ticket-lignes dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.ticket-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 2px dashed var(--trait);
}
.ticket-total span { font-size: var(--t-sm); font-weight: 600; }
.ticket-total strong {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
  color: var(--vert-fonce);
  font-variant-numeric: tabular-nums;
}
.ticket-total small { font-size: .38em; letter-spacing: 0; }
.ticket-delai { margin: .45rem 0 1.25rem; font-size: var(--t-sm); color: var(--encre-doux); }
.ticket-note { margin: 1rem 0 0; font-size: var(--t-xs); color: var(--encre-doux); }

@media (max-width: 960px) {
  .calcul { grid-template-columns: 1fr; }
  .ticket { position: static; rotate: 0deg; max-width: 460px; }
}

/* --- 13. Chaîne de l'atelier -------------------------------------------- */
.chaine { position: relative; --q: 0; }

.chaine-rail { position: relative; height: 60px; margin-bottom: 1.75rem; }
.chaine-rail::before,
.chaine-rail::after {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  height: 2px;
}
.chaine-rail::before { right: 0; background: repeating-linear-gradient(90deg, var(--trait) 0 10px, transparent 10px 16px); }
.chaine-rail::after { width: calc(var(--q) * 100%); background: var(--vert); }

.chaine-tapis {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: calc(var(--q) * (100% - 80px));
  width: 80px; height: 46px;
  translate: 0 -50%;
  border-radius: 2px;
  box-shadow: 0 6px 14px rgba(10, 34, 46, .22);
  filter: grayscale(.75) sepia(.55) brightness(.7);
  transition: filter .8s var(--ease);
}
.chaine-tapis::before,
.chaine-tapis::after {
  content: "";
  position: absolute;
  top: 6%; bottom: 6%;
  width: 7px;
  background: repeating-linear-gradient(180deg, #eee4d0 0 2px, transparent 2px 4px);
}
.chaine-tapis::before { right: 100%; }
.chaine-tapis::after { left: 100%; }
.chaine.est-propre .chaine-tapis { filter: none; }

.postes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.25rem;
}
.poste { opacity: .4; transition: opacity .5s var(--ease); }
.poste.est-atteint { opacity: 1; }
.poste-dessin {
  width: 100%;
  max-width: 116px;
  height: auto;
  margin-bottom: .9rem;
  color: var(--encre-doux);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color .5s;
}
.poste.est-atteint .poste-dessin { color: var(--bleu); }
.poste-quand {
  display: inline-block;
  margin: 0 0 .4rem;
  padding: .15rem .6rem;
  border-radius: 100px;
  background: var(--vert-pale);
  color: var(--vert-fonce);
  font-size: var(--t-xs);
  font-weight: 700;
}
.poste-quand { justify-self: start; }
.poste h3 { font-size: var(--t-lg); margin-bottom: .3rem; }
.poste p:last-child { margin: 0; font-size: var(--t-sm); color: var(--encre-doux); }

.d-roue { fill: var(--chaux); }
.d-poussiere circle,
.d-bulles circle,
.d-gouttes path { fill: currentColor; stroke: none; }
.d-tapette,
.d-poussiere,
.d-bulles,
.d-gouttes,
.d-rouleau,
.d-eclat,
.d-air { transform-box: fill-box; transform-origin: center; }
.d-tapette { transform-origin: 20% 100%; }
.d-suspendu { transform-box: view-box; transform-origin: 48px 10px; }

@media (prefers-reduced-motion: no-preference) {
  .poste.est-courant .d-camion { animation: cahot .45s ease-in-out infinite alternate; }
  .poste.est-courant .d-route { stroke-dasharray: 8 6; animation: route .6s linear infinite; }
  .poste.est-courant .d-tapette { animation: battre .6s ease-in-out infinite alternate; }
  .poste.est-courant .d-poussiere { animation: tomber 1.3s linear infinite; }
  .poste.est-courant .d-vague { animation: vague 1.1s linear infinite; }
  .poste.est-courant .d-bulles { animation: monter 1.8s ease-in infinite; }
  .poste.est-courant .d-rouleau { animation: tourner 1.6s linear infinite; }
  .poste.est-courant .d-rouleau-bas { animation-direction: reverse; }
  .poste.est-courant .d-gouttes { animation: tomber 1s linear infinite; }
  .poste.est-courant .d-suspendu { animation: balancer 2.2s ease-in-out infinite alternate; }
  .poste.est-courant .d-air { animation: souffle 1.3s ease-in-out infinite alternate; }
  .poste.est-courant .d-eclat { animation: eclat 1.1s ease-in-out infinite alternate; }
}
@keyframes cahot   { to { translate: 0 -1.5px; } }
@keyframes route   { to { stroke-dashoffset: -14; } }
@keyframes battre  { from { rotate: -16deg; } to { rotate: 10deg; } }
@keyframes tomber  { from { translate: 0 -6px; opacity: 1; } to { translate: 0 10px; opacity: 0; } }
@keyframes vague   { to { translate: -24px 0; } }
@keyframes monter  { 0% { translate: 0 6px; opacity: 0; } 30% { opacity: 1; } 100% { translate: 0 -8px; opacity: 0; } }
@keyframes tourner { to { rotate: 360deg; } }
@keyframes balancer { from { rotate: -4deg; } to { rotate: 4deg; } }
@keyframes souffle { from { translate: 0 0; opacity: .35; } to { translate: 4px 0; opacity: 1; } }
@keyframes eclat   { from { scale: .7; opacity: .5; } to { scale: 1.12; opacity: 1; } }

@media (max-width: 800px) {
  .chaine { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 1rem; }
  .chaine-rail { height: auto; margin: 0; }
  .chaine-rail::before,
  .chaine-rail::after { left: 50%; top: 0; width: 2px; height: auto; }
  .chaine-rail::before { right: auto; bottom: 0; background: repeating-linear-gradient(180deg, var(--trait) 0 10px, transparent 10px 16px); }
  .chaine-rail::after { height: calc(var(--q) * 100%); }
  .chaine-tapis { left: 50%; top: calc(var(--q) * (100% - 72px)); width: 40px; height: 72px; translate: -50% 0; }
  .chaine-tapis::before,
  .chaine-tapis::after { display: none; }
  .postes { grid-template-columns: 1fr; gap: 2.25rem; }
  .poste { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 0 1rem; align-items: start; }
  .poste-dessin { grid-row: span 3; margin: 0; }
}

/* --- 14. Nuancier des fibres -------------------------------------------- */
.nuancier { display: flex; gap: .5rem; height: clamp(440px, 44vw, 520px); }

.echantillon {
  position: relative;
  flex: 0 1 5.25rem;
  overflow: hidden;
  border-radius: var(--r-bloc);
  box-shadow: inset 0 0 0 1px rgba(10, 34, 46, .08);
  transition: flex-grow .6s var(--ease);
}
.echantillon.est-ouvert { flex-grow: 1; }

.echantillon-onglet {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--encre);
  cursor: pointer;
}
.est-ouvert .echantillon-onglet { right: auto; width: 5.25rem; cursor: default; }
.echantillon-nom,
.echantillon-prix {
  writing-mode: vertical-rl;
  rotate: 180deg;
  padding: .8rem .32rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, .93);
  font-family: var(--f-display);
  font-size: var(--t-sm);
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .2s;
}
.echantillon-prix { font-size: var(--t-xs); font-weight: 600; color: var(--vert-fonce); }
.echantillon-onglet:hover .echantillon-nom { background: var(--blanc); }

.echantillon-detail {
  position: absolute;
  left: 6rem;
  bottom: 1rem;
  width: min(25rem, calc(100% - 7rem));
  padding: 1.35rem 1.4rem;
  border-radius: var(--r-bloc);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--ombre-haute);
  opacity: 0;
  translate: 0 14px;
  visibility: hidden;
  transition: opacity .25s, translate .3s var(--ease), visibility 0s .3s;
}
.est-ouvert .echantillon-detail {
  opacity: 1;
  translate: 0 0;
  visibility: visible;
  transition: opacity .35s .2s, translate .5s .2s var(--ease), visibility 0s;
}
.echantillon-detail h3 { font-size: var(--t-xl); margin-bottom: .1rem; }
.echantillon-sous { margin-bottom: .75rem; font-size: var(--t-sm); color: var(--encre-doux); }
.echantillon-detail p { font-size: var(--t-sm); }
.fiche {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: .5rem 1rem;
  margin: 1rem 0 0;
  padding-top: .9rem;
  border-top: 1px solid var(--trait);
}
.fiche dt { font-size: var(--t-xs); color: var(--encre-doux); }
.fiche dd { margin: 0; font-family: var(--f-display); font-size: var(--t-sm); font-weight: 600; }

@media (max-width: 800px) {
  .nuancier { flex-direction: column; height: auto; }
  .echantillon { flex: none; height: 4.25rem; transition: height .55s var(--ease); }
  .echantillon.est-ouvert { height: 31rem; }
  .echantillon-onglet { flex-direction: row; padding: 0 .9rem; }
  .est-ouvert .echantillon-onglet { right: 0; bottom: auto; width: auto; height: 4.25rem; }
  .echantillon-nom,
  .echantillon-prix { writing-mode: horizontal-tb; rotate: 0deg; padding: .35rem .85rem; }
  .echantillon-detail { left: 1rem; right: 1rem; width: auto; }
}

/* --- 15. Bande parallaxe ------------------------------------------------ */
.bande-parallaxe {
  position: relative;
  height: clamp(280px, 42vw, 460px);
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.bande-parallaxe img {
  position: absolute;
  inset: -18% 0 auto;
  width: 100%;
  height: 136%;
  object-fit: cover;
  z-index: -2;
}
.bande-parallaxe::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,58,90,.78), rgba(10,34,46,.68));
  z-index: -1;
}
.bande-citation {
  text-align: center;
  color: var(--blanc);
  max-width: 24ch;
  font-family: var(--f-display);
  font-size: var(--t-2xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.025em;
  margin: 0 auto;
  padding-inline: var(--gouttiere);
}
.bande-source { display: block; font-family: var(--f-texte); font-size: var(--t-sm); font-weight: 400; color: var(--vert-pale); margin-top: 1rem; letter-spacing: 0; }

@supports (animation-timeline: view()) {
  .bande-parallaxe img {
    animation: parallaxe linear both;
    animation-timeline: view();
  }
  @keyframes parallaxe {
    from { transform: translateY(-9%); }
    to   { transform: translateY(9%); }
  }
}

/* --- 16. Engagements : l'étiquette d'entretien -------------------------- */
.engagements {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.engagements-intro { position: sticky; top: 7rem; }

.etiquette { position: relative; justify-self: center; width: 100%; max-width: 540px; padding-top: 2.75rem; }
/* le fil et le clou auxquels elle pend */
.etiquette::before {
  content: "";
  position: absolute;
  left: 50%; top: 6px;
  width: 1.5px; height: 2.9rem;
  background: rgba(10, 34, 46, .3);
}
.etiquette::after {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  width: 11px; height: 11px;
  translate: -45% 0;
  border-radius: 50%;
  background: var(--bleu-fes);
}

.etiquette-tissu {
  position: relative;
  padding: 2.9rem 2.25rem 2rem;
  border-radius: 3px;
  background:
    repeating-linear-gradient(0deg, rgba(10, 58, 90, .025) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(10, 58, 90, .02) 0 1px, transparent 1px 3px),
    #FCFBF7;
  box-shadow: 0 1px 0 rgba(10, 34, 46, .05), 0 22px 44px rgba(10, 34, 46, .13);
  rotate: -1.5deg;
  transform-origin: 50% 0;
}
/* ourlet replié et piqûre */
.etiquette-tissu::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 20px;
  background: linear-gradient(180deg, #E4ECE9, #F3F6F3);
  border-bottom: 1px solid rgba(10, 34, 46, .08);
}
.etiquette-tissu::after {
  content: "";
  position: absolute;
  inset: 28px 10px 10px;
  border: 1.5px dashed rgba(15, 92, 140, .32);
  border-radius: 2px;
  pointer-events: none;
}

.etiquette-marque {
  margin: 0 0 1.5rem;
  text-align: center;
  font-family: var(--f-display);
  font-size: var(--t-lg);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--bleu-fes);
}
.etiquette-marque span {
  display: block;
  font-family: var(--f-texte);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--encre-doux);
}
.etiquette-lignes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.etiquette-lignes li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1rem; align-items: start; }
.symbole {
  width: 44px; height: 44px;
  fill: none;
  stroke: var(--bleu-fes);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.symbole text { fill: var(--bleu-fes); stroke: none; font-family: var(--f-display); font-size: 11px; font-weight: 700; }
.etiquette-lignes h3 { margin: .1rem 0 .15rem; font-size: var(--t-md); }
.etiquette-lignes p { margin: 0; font-size: var(--t-sm); color: var(--encre-doux); }
.etiquette-pied {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1.5px dashed rgba(15, 92, 140, .25);
  text-align: center;
  font-size: var(--t-xs);
  color: var(--encre-doux);
}

/* elle se balance en traversant l'écran : décoratif, sans repli */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .etiquette-tissu {
      animation: pendre linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
  }
}
@keyframes pendre {
  from { rotate: -6deg; }
  50%  { rotate: -1deg; }
  to   { rotate: 2.5deg; }
}

@media (max-width: 900px) {
  .engagements { grid-template-columns: 1fr; }
  .engagements-intro { position: static; }
}

/* --- 17. Zones : carte du littoral -------------------------------------- */
.zones {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.zones-liste { list-style: none; margin: 1.75rem 0 0; padding: 0; columns: 2; column-gap: 2rem; }
.zones-liste li {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding-block: .35rem;
  break-inside: avoid;
  font-family: var(--f-display);
  font-size: var(--t-sm);
  font-weight: 600;
}
.zones-liste li::before {
  content: "";
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--vert);
  box-shadow: 0 0 0 3px var(--vert-pale);
}
.zones-liste .bientot { font-weight: 500; color: var(--encre-doux); }
.zones-liste .bientot::before { background: transparent; box-shadow: inset 0 0 0 2px var(--encre-doux); }

.carte { margin: 0; }
.carte svg { width: 100%; height: auto; border-radius: var(--r-carte); }
.carte .ocean { fill: var(--bleu-clair); }
.carte .mer { font-family: var(--f-display); font-size: 14px; fill: var(--bleu); opacity: .55; letter-spacing: .06em; }
.carte .terre { fill: var(--blanc); stroke: var(--bleu); stroke-width: 1.5; }
.carte .zone { fill: none; stroke: var(--vert-pale); stroke-width: 40; stroke-linecap: round; stroke-linejoin: round; }
.carte .route { fill: none; stroke: var(--vert); stroke-width: 2.5; stroke-dasharray: 6 6; }
.carte .ville { fill: var(--vert); stroke: var(--blanc); stroke-width: 2.5; }
.carte .ville-bientot { fill: var(--blanc); stroke: var(--encre-doux); stroke-width: 2; stroke-dasharray: 3 2; }
/* Rabat est la ville d'attache de la marque : elle porte plus de poids que les autres. */
.carte .ville-siege { fill: var(--bleu-fes); stroke-width: 3; }
.carte .nom-siege { font-size: 14.5px; font-weight: 700; fill: var(--bleu-fes); }
.carte text { font-family: var(--f-texte); font-size: 12.5px; font-weight: 600; fill: var(--encre); paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 3px; }
.carte .mer { stroke: none; }
.carte .nom-bientot { font-weight: 500; fill: var(--encre-doux); }
.carte .camion rect,
.carte .camion path { fill: var(--bleu-fes); }
.carte .camion circle { fill: var(--encre); }
.carte-legende { margin-top: .6rem; text-align: right; font-size: var(--t-xs); color: var(--encre-doux); }

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

/* --- 18. FAQ ------------------------------------------------------------ */
.faq { display: grid; gap: .6rem; max-width: 820px; }
.question {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--r-bloc);
  overflow: hidden;
  transition: border-color .25s;
}
.question[open] { border-color: var(--vert); }
.question summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem 1.35rem;
  cursor: pointer;
  font-family: var(--f-display);
  font-size: var(--t-md);
  font-weight: 600;
  list-style: none;
}
.question summary::-webkit-details-marker { display: none; }
.question-signe {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--vert-pale);
  color: var(--vert-fonce);
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
  transition: rotate .3s var(--ease), background-color .25s;
}
.question[open] .question-signe { rotate: 45deg; background: var(--vert); color: var(--blanc); }
.question-corps { padding: 0 1.35rem 1.35rem; }
.question-corps p { font-size: var(--t-sm); color: var(--encre-doux); margin: 0; max-width: 70ch; }
.question[open] .question-corps { animation: deplie .32s var(--ease); }
@keyframes deplie { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* --- 19. Fin de page : notre tapis, franges comprises ------------------- */
.tapis-final {
  padding: clamp(3rem, 6vw, 5rem) var(--gouttiere) 0;
  background: linear-gradient(180deg, var(--chaux) 0 45%, var(--encre) 45% 100%);
}
.tapis-final-trame {
  position: relative;
  isolation: isolate;
  max-width: var(--large);
  margin-inline: auto;
  padding: clamp(3.75rem, 8vw, 6.5rem) clamp(1.75rem, 6vw, 5rem);
  text-align: center;
  color: var(--blanc);
  background: var(--bleu-fes);
  /* bordures rayées, comme la lisière d'un tapis */
  box-shadow:
    inset 0 0 0 12px var(--bleu-fes),
    inset 0 0 0 16px var(--vert),
    inset 0 0 0 22px var(--bleu-fes),
    inset 0 0 0 25px var(--chaux),
    0 26px 50px rgba(0, 0, 0, .28);
}
.tapis-final-trame::before {
  content: "";
  position: absolute;
  inset: 34px;
  z-index: -1;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2748%27%20height%3D%2748%27%3E%3Cpath%20d%3D%27M0%2024L24%200L48%2024L24%2048Z%27%20fill%3D%27none%27%20stroke%3D%27%2314A085%27%20stroke-width%3D%272%27%2F%3E%3Cpath%20d%3D%27M24%2016L32%2024L24%2032L16%2024Z%27%20fill%3D%27%23F6FAF9%27%20fill-opacity%3D%27.85%27%2F%3E%3C%2Fsvg%3E") 0 0 / 48px 48px;
  opacity: .32;
  -webkit-mask: radial-gradient(ellipse 58% 52% at 50% 50%, transparent 30%, #000 78%);
  mask: radial-gradient(ellipse 58% 52% at 50% 50%, transparent 30%, #000 78%);
}
.tapis-final h2 { max-width: 18ch; margin-inline: auto; }
.tapis-final .plomb { margin-inline: auto; color: rgba(255, 255, 255, .78); }
.tapis-final .heros-actions { justify-content: center; }
.tapis-final .bouton-secondaire { color: var(--blanc); border-color: rgba(255, 255, 255, .35); }
.tapis-final .bouton-secondaire:hover { border-color: var(--blanc); }
.tapis-final .mention { margin: 1.25rem auto 0; color: rgba(255, 255, 255, .6); }

.franges {
  max-width: calc(var(--large) - 40px);
  height: 42px;
  margin-inline: auto;
  background:
    repeating-linear-gradient(90deg, transparent 0 5px, #DCE9E5 5px 7px, transparent 7px 11px),
    repeating-linear-gradient(90deg, transparent 0 2px, rgba(220, 233, 229, .6) 2px 3px, transparent 3px 11px);
  -webkit-mask: linear-gradient(#000 45%, transparent);
  mask: linear-gradient(#000 45%, transparent);
  transform-origin: top;
}
@media (prefers-reduced-motion: no-preference) {
  .franges { animation: frange 3.8s ease-in-out infinite alternate; }
}
@keyframes frange { from { transform: skewX(-4deg); } to { transform: skewX(4deg); } }

/* --- 20. Pied de page --------------------------------------------------- */
.pied { background: var(--encre); color: rgba(255,255,255,.72); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; font-size: var(--t-sm); }
.pied-grille {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 3rem;
}
.pied .logo { margin-bottom: 1rem; }
.pied .logo-img { height: 3.3rem; filter: brightness(0) invert(1); }
.pied h4 { color: var(--blanc); font-size: var(--t-sm); margin-bottom: 1rem; }
.pied ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.pied a { text-decoration: none; transition: color .2s; }
.pied a:hover { color: var(--vert); }
.pied-bas {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  font-size: var(--t-xs);
  color: rgba(255,255,255,.5);
}
.pied-legal { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* --- 21. Apparitions au scroll ----------------------------------------- */
.apparait {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.apparait.est-visible { opacity: 1; transform: none; }
/* décalages en cascade posés sur les enfants directs */
.cascade > *  { transition-delay: 0ms; }
.cascade > :nth-child(2) { transition-delay: 90ms; }
.cascade > :nth-child(3) { transition-delay: 180ms; }
.cascade > :nth-child(4) { transition-delay: 270ms; }
.cascade > :nth-child(5) { transition-delay: 360ms; }
.cascade > :nth-child(6) { transition-delay: 450ms; }

/* Entrée du héros : la seule séquence qui se joue sans action de l'utilisateur */
.entree { opacity: 0; animation: monte .85s var(--ease) forwards; }
.entree-1 { animation-delay: .06s; }
.entree-2 { animation-delay: .17s; }
.entree-3 { animation-delay: .28s; }
.entree-4 { animation-delay: .39s; }
.entree-5 { animation-delay: .5s; }
@keyframes monte { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* --- 22. Barre d'action mobile ----------------------------------------- */
.barre-mobile {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
  gap: .6rem;
  padding: .7rem var(--gouttiere) calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--trait);
  transform: translateY(110%);
  transition: transform .35s var(--ease);
}
.barre-mobile.est-visible { transform: none; }
.barre-mobile .bouton { flex: 1; padding-block: .8rem; padding-inline: 1rem; white-space: nowrap; font-size: var(--t-sm); }

/* --- 23. Responsive ----------------------------------------------------- */

@media (max-width: 800px) {
  .burger { display: grid; }
  .tel-entete { display: none; }
  .entete-actions .bouton { display: none; }

  /* En mobile, .nav passe en position fixed : il sort du flux flex, et c'est lui
     qui portait le margin-left:auto poussant la barre vers la droite. Sans ce
     relais, les actions se collent au logo. */
  .entete-actions { margin-left: auto; }

  /* L'étiquette se balance au défilement (keyframes « pendre », -6deg → 2.5deg).
     La boîte englobante d'un bloc incliné mesure w·cosθ + h·sinθ : avec 703 px
     de haut, elle gagne jusqu'à 71 px de large, et cette largeur varie pendant
     tout le défilement. Sur mobile l'étiquette occupe presque toute la largeur,
     donc le document déborde horizontalement de façon mouvante — la page
     tressaute et laisse des bandes vides sur les côtés.
     On retire le balancement ET l'inclinaison : à 360 px, même 1,5° sur un bloc
     de ~860 px de haut dépasse encore de 3 px. À plat, la boîte vaut exactement
     la largeur du bloc. L'inclinaison reste sur tablette et bureau. */
  .etiquette-tissu { animation: none; rotate: 0deg; }

  .nav {
    position: fixed;
    inset: 5rem 0 auto;
    flex-direction: column;
    gap: 0;
    background: var(--blanc);
    border-bottom: 1px solid var(--trait);
    box-shadow: var(--ombre-haute);
    padding: .5rem var(--gouttiere) 1.5rem;
    margin-left: 0;
    /* replié par défaut */
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    transition: grid-template-rows .32s var(--ease), opacity .25s, visibility .32s;
  }
  .nav.est-ouverte { grid-template-rows: 1fr; opacity: 1; visibility: visible; }
  .nav-interieur { overflow: hidden; display: grid; }
  .nav a { padding-block: .9rem; border-bottom: 1px solid var(--trait); font-size: var(--t-md); }
  .nav a::after { display: none; }

  .barre-mobile { display: flex; }
  body { padding-bottom: 4.5rem; }

}

@media (max-width: 520px) {
  .pied-grille { grid-template-columns: 1fr 1fr; }
}

/* --- 24. Impression ----------------------------------------------------- */
@media print {
  .entete, .barre-mobile, .bandeau { display: none; }
  body { background: #fff; }
}

/* --- 25. Mouvement réduit ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .apparait { opacity: 1; transform: none; }
  .entree { opacity: 1; }
  .bandeau-piste { animation: none; }
}
