/* ============================================================
   FILARIANE — Système de design « L'atelier numérique »
   Vitrine (papier clair) + Atelier/outils (encre sombre)
   ============================================================ */

/* Polices chargées via <link rel="stylesheet"> dans le <head> de chaque page
   (preconnect + display=swap) — plus de @import bloquant ici. */

:root {
  /* Palette « mercerie » */
  --papier: #F7F1E6;
  --craie: #FFFDF8;
  --encre: #22252e;
  --encre-2: #3a3e4a;
  --garance: #d8442b;        /* le fil rouge */
  --garance-fonce: #b33420;
  --ocre: #e09c33;
  --loire: #2e6b5e;
  --bleu-nuit: #28344d;
  --gris-fil: #b9b0a0;
  --ombre: 0 14px 40px -18px rgba(34, 37, 46, .35);

  --f-titre: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-texte: "Outfit", system-ui, sans-serif;
  --f-main: "Caveat", cursive;

  --radius: 14px;
  --maxw: 1180px;
  --stitch: 1px solid rgba(34,37,46,.16);

  /* Thème clair du Studio (outils internes) */
  --at-panneau: #fffdf8;
  --at-surface: #f7f1e4;
  --at-creux: #f3ecdd;
  --at-creux2: #ece4d2;
  --at-texte: #22252e;
  --at-texte2: #4a4537;
  --at-sourdine: #6e6655;
  --at-sourdine2: #6e6655;
  --at-bordure: rgba(34,37,46,.3);
  --at-bordure-faible: rgba(34,37,46,.14);
  --at-ok: #1f7a4d;
  --at-alerte: #b33420;
  --at-attention: #8a5d0e;
  --at-accent: #8a5d0e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

html, body { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--f-texte);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--encre);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
}

/* Grain papier très léger */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

/* Aurore colorée : nappe de dégradés fixes qui relie visuellement toutes les sections */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(52vw 36vh at 94% -4%, rgba(224,156,51,.32), transparent 64%),   /* doré */
    radial-gradient(44vw 36vh at -6% 22%, rgba(46,107,94,.22), transparent 64%),    /* vert Loire */
    radial-gradient(40vw 32vh at 30% -6%, rgba(123,97,200,.28), transparent 62%),   /* lavande */
    radial-gradient(42vw 34vh at 106% 44%, rgba(86,140,220,.28), transparent 62%),  /* bleu ciel */
    radial-gradient(40vw 32vh at 60% 74%, rgba(224,95,158,.24), transparent 62%),   /* rose pivoine */
    radial-gradient(44vw 34vh at 22% 64%, rgba(216,68,43,.18), transparent 62%),    /* garance */
    radial-gradient(48vw 38vh at 0% 106%, rgba(224,156,51,.24), transparent 64%),   /* doré bas */
    radial-gradient(36vw 30vh at 88% 102%, rgba(96,180,160,.26), transparent 62%);  /* menthe bas */
}
body.atelier::after { display: none; }

::selection { background: var(--garance); color: var(--craie); }

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

/* Les ancres ne disparaissent pas sous l'en-tête collant */
[id] { scroll-margin-top: 90px; }

img { max-width: 100%; display: block; }
a { color: var(--garance-fonce); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--garance); }

h1, h2, h3, h4 { font-family: var(--f-titre); line-height: 1.08; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.025em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
h1 em, h2 em {
  font-style: normal; color: inherit;
  background: linear-gradient(180deg, transparent 60%, rgba(216,68,43,.32) 60%, rgba(216,68,43,.32) 92%, transparent 92%);
  padding: 0 .06em;
}

.conteneur { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; }
.section--craie { background: rgba(255,253,248,.30); border-top: var(--stitch); border-bottom: var(--stitch); }
/* Section « signature » : ivoire encadré de noir, écho au logo N&B */
.section--encre {
  background:
    repeating-linear-gradient(-45deg, rgba(34,37,46,.022) 0 1px, transparent 1px 14px),
    linear-gradient(160deg, rgba(253,244,228,.92), rgba(248,228,206,.78));
  color: var(--encre); border-top: 3px solid var(--encre); border-bottom: 3px solid var(--encre);
}
.section--encre h2, .section--encre h3 { color: var(--encre); }
.section--encre a { color: var(--garance-fonce); }

/* Accès rapide clavier */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1001;
  background: var(--garance); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 100;
  border-top: 4px solid; border-image: linear-gradient(90deg, var(--garance), var(--ocre), #6fae9a, #6e93d6, #9a82d8, var(--garance)) 1;
  background: color-mix(in srgb, var(--papier) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: var(--stitch);
}
.entete__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1.1rem, 4vw, 2.5rem); max-width: var(--maxw); margin: 0 auto; }
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--encre); font-family: var(--f-titre); font-weight: 700; font-size: 1.45rem; letter-spacing: -.02em; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo b { font-weight: 700; }
.logo span { color: var(--garance); }

.nav { display: flex; align-items: center; gap: clamp(.55rem, 1.6vw, 1.4rem); }
.nav a { text-decoration: none; color: var(--encre-2); font-weight: 500; font-size: .96rem; position: relative; padding: .25rem 0; white-space: nowrap; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--garance); border-radius: 2px;
  transform: scaleX(0); transform-origin: center; transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.nav a:hover { color: var(--garance); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--encre); font-weight: 700; }
.nav__sep { width: 1px; height: 22px; background: rgba(34,37,46,.25); flex: none; }
.nav a.nav__client {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--encre); border-radius: 999px; padding: .42rem 1.1rem;
  font-weight: 600; font-size: .96rem; line-height: 1.65; color: var(--encre); transition: .18s;
}
.nav a.nav__client::after, .nav a.btn::after { display: none; }
.nav a.nav__client:hover { background: var(--encre); color: var(--papier); }
.nav .btn.btn--sm { padding: .42rem 1.1rem; font-size: .96rem; line-height: 1.65; border-width: 1.5px; box-shadow: 0 3px 0 var(--garance-fonce); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: linear-gradient(135deg, #C73A20, #b33420); color: #fff !important; text-decoration: none; /* garance foncé : contraste AA du texte blanc (≥ 4.5:1) */
  font-weight: 600; font-size: 1rem; font-family: var(--f-texte);
  padding: .75rem 1.5rem; border-radius: 999px; border: 2px solid var(--garance);
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s;
  box-shadow: 0 4px 0 var(--garance-fonce);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--garance-fonce); background: var(--garance-fonce); border-color: var(--garance-fonce); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--garance-fonce); }
body:not(.atelier) .btn:not(.btn--sm)::after { content: "→"; display: inline-block; transition: transform .2s ease; }
body:not(.atelier) .btn:not(.btn--sm):hover::after { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--encre) !important; border: 2px solid var(--encre); box-shadow: 0 4px 0 var(--encre); }
.btn--ghost:hover { background: var(--encre); color: var(--papier) !important; box-shadow: 0 6px 0 var(--encre-2); border-color: var(--encre); }
.btn--clair { background: var(--encre); color: var(--papier) !important; border-color: var(--encre); box-shadow: 0 4px 0 #000; }
.btn--clair:hover { background: #000; border-color: #000; }
.btn--sm { padding: .45rem 1rem; font-size: .9rem; box-shadow: 0 3px 0 var(--garance-fonce); }

.burger { display: none; background: none; border: none; cursor: pointer; padding: .55rem .4rem; z-index: 101; position: relative; }
.burger span {
  display: block; width: 26px; height: 2.5px; background: var(--encre); margin: 6px 0; border-radius: 3px;
  transition: transform .38s cubic-bezier(.22, 1, .36, 1), opacity .25s ease, background .2s;
}
.burger[aria-expanded="true"] span { background: var(--garance-fonce); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(.3); }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

@media (max-width: 980px) {
  /* IMPORTANT : backdrop-filter sur l'en-tête ferait du panneau fixe un enfant
     positionné DANS l'en-tête (bloc conteneur) → menu invisible. On le retire ici. */
  .entete { backdrop-filter: none; background: var(--papier); }
  .burger { display: block; }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: flex-start; align-items: stretch;
    padding: calc(70px + 1.6rem) clamp(1.4rem, 6vw, 3rem) 2.2rem; gap: 0; background: var(--papier);
    transform: translateX(100%); transition: transform .45s cubic-bezier(.22, 1, .36, 1), visibility .45s; z-index: 99;
    visibility: hidden; overflow-y: auto;
  }
  .nav.ouvert { transform: translateX(0); visibility: visible; }
  .nav {
    counter-reset: lien-menu;
    background:
      radial-gradient(60vw 30vh at 100% 0%, rgba(224,156,51,.14), transparent 65%),
      radial-gradient(50vw 26vh at 0% 100%, rgba(46,107,94,.10), transparent 65%),
      var(--papier);
  }
  .nav a:not(.nav__client):not(.btn) {
    display: flex; align-items: center; gap: .9rem;
    font-size: 1.4rem; padding: .95rem 0; border-bottom: 1px solid rgba(34,37,46,.1);
    font-family: var(--f-titre); font-weight: 700; letter-spacing: -.01em;
  }
  .nav a:not(.nav__client):not(.btn)::before {
    counter-increment: lien-menu;
    content: counter(lien-menu, decimal-leading-zero);
    font-family: var(--f-texte); font-size: .78rem; font-weight: 600;
    color: var(--garance); letter-spacing: .08em; min-width: 1.6em;
  }
  .nav a:not(.nav__client):not(.btn)::after {
    content: "→"; display: block !important; position: static; height: auto; background: none;
    margin-left: auto; font-size: 1.1rem; color: rgba(34,37,46,.35); transition: none;
  }
  .nav a[aria-current="page"] { color: var(--garance-fonce); }
  .nav a[aria-current="page"]::after { color: var(--garance); }
  .nav__sep { display: none; }
  .nav a, .nav .nav__contact { opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .35s ease; }
  .nav.ouvert a, .nav.ouvert .nav__contact { opacity: 1; transform: none; }
  .nav.ouvert a:nth-child(2) { transition-delay: .04s; } .nav.ouvert a:nth-child(3) { transition-delay: .08s; }
  .nav.ouvert a:nth-child(4) { transition-delay: .12s; } .nav.ouvert a:nth-child(5) { transition-delay: .16s; }
  .nav.ouvert a:nth-child(6) { transition-delay: .20s; } .nav.ouvert a:nth-child(8) { transition-delay: .24s; }
  .nav.ouvert a:nth-child(9) { transition-delay: .28s; } .nav.ouvert .nav__contact { transition-delay: .32s; }
  .nav a.nav__client {
    margin-top: auto; text-align: center; justify-content: center; display: flex;
    border: 2px solid var(--encre); font-family: var(--f-texte); font-size: 1.02rem;
    padding: .7rem 1rem; border-radius: 999px;
  }
  .nav a.btn { margin-top: .8rem; justify-content: center; font-size: 1.02rem; border-bottom: none; font-family: var(--f-texte); padding: .7rem 1rem; }
  .nav .nav__contact {
    display: flex; flex-direction: column; gap: .2rem; align-items: center;
    margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid rgba(34,37,46,.14);
    text-align: center;
  }
  .nav .nav__contact a {
    border: none; padding: .15rem 0; font-family: var(--f-texte); display: inline;
  }
  .nav .nav__contact a:not(.nav__client):not(.btn)::before,
  .nav .nav__contact a:not(.nav__client):not(.btn)::after { display: none !important; content: none !important; counter-increment: none; }
  .nav .nav__contact .nav__tel { font-family: var(--f-titre); font-weight: 800; font-size: 1.5rem; color: var(--encre); }
  .nav .nav__contact a:not(.nav__tel) { font-size: .92rem; color: var(--garance-fonce); }
  .nav .nav__contact span { font-size: .82rem; color: var(--encre-2); }
  body.nav-bloque { overflow: hidden; }
  body.nav-bloque .entete { background: var(--papier); backdrop-filter: none; box-shadow: 0 1px 0 rgba(34,37,46,.16); }
}

/* ---------- Héros ---------- */
.heros { position: relative; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem); overflow: hidden; }
.heros::before {
  content: ""; position: absolute; width: 560px; height: 560px; right: -160px; top: -140px;
  border-radius: 50%; background: radial-gradient(circle, rgba(224,156,51,.28), transparent 65%); pointer-events: none;
}
.heros::after {
  content: ""; position: absolute; width: 460px; height: 460px; left: -180px; bottom: -160px;
  border-radius: 50%; background: radial-gradient(circle, rgba(216,68,43,.18), transparent 65%); pointer-events: none;
}
.heros__grille { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 880px) { .heros__grille { grid-template-columns: 1fr; } }
.heros p.accroche { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--encre-2); max-width: 34rem; }
.surtitre {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--encre); background: linear-gradient(120deg, rgba(252,228,218,.9), rgba(252,238,211,.9)); border: 1.5px solid var(--encre);
  border-radius: 999px; padding: .32rem .95rem; margin-bottom: 1.2rem;
}
.surtitre::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--garance); flex: none; }

.annotation { font-family: var(--f-main); font-size: 1.35rem; color: var(--garance-fonce); transform: rotate(-2deg); display: inline-block; }

/* Fil rouge décoratif (SVG plein écran dessiné au scroll) */
.fil-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.fil-svg path { fill: none; stroke: var(--garance); stroke-width: 2; stroke-linecap: round; opacity: .3; }
.heros > .conteneur { position: relative; z-index: 1; }

/* ---------- Étiquettes (cartes à œillet) ---------- */
.etiquette {
  position: relative; background: linear-gradient(180deg, #FFFDF8, #FBF4E7);
  border: 1.5px solid var(--encre);
  border-radius: var(--radius); padding: 1.6rem 1.5rem 1.5rem;
  box-shadow: 4px 4px 0 rgba(34,37,46,.9);
  transition: transform .2s ease, box-shadow .2s ease;
}
.etiquette:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--garance); }
a.etiquette { display: flex; flex-direction: column; }
a.etiquette p { flex: 1; }
a.etiquette .lien-fil { margin-top: auto; padding-top: .6rem; }
.etiquette { overflow: hidden; }
.etiquette::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 1;
  background: linear-gradient(90deg, var(--garance), var(--ocre));
}
.grille-3 > .etiquette:nth-child(3n+2)::before, .grille-4 > .etiquette:nth-child(4n+2)::before { background: linear-gradient(90deg, var(--ocre), #6fae9a); }
.grille-3 > .etiquette:nth-child(3n)::before, .grille-4 > .etiquette:nth-child(4n+3)::before { background: linear-gradient(90deg, #2e6b5e, #6e93d6); }
.grille-4 > .etiquette:nth-child(4n)::before { background: linear-gradient(90deg, #6e93d6, #9a82d8); }
.etiquette h3 { margin-top: .2rem; }
.pico {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  border-radius: 13px; background: var(--papier); border: 1.5px solid var(--encre);
  color: var(--garance-fonce); margin-bottom: .9rem;
  box-shadow: 2.5px 2.5px 0 rgba(34,37,46,.85);
}
.pico svg { width: 23px; height: 23px; }
/* Rotation de teintes pastel : chaque carte porte sa couleur */
.grille-3 > :nth-child(3n+1) .pico, .grille-4 > :nth-child(4n+1) .pico { background: linear-gradient(135deg, #FCE4DA, #F6CDBC); color: var(--garance-fonce); }
.grille-3 > :nth-child(3n+2) .pico, .grille-4 > :nth-child(4n+2) .pico { background: linear-gradient(135deg, #FCEED3, #F4DCAB); color: #8a5d0e; }
.grille-3 > :nth-child(3n) .pico, .grille-4 > :nth-child(4n+3) .pico { background: linear-gradient(135deg, #DFEEE6, #C5DFCE); color: var(--loire); }
.grille-4 > :nth-child(4n) .pico { background: linear-gradient(135deg, #E2E8F4, #C9D4EA); color: var(--bleu-nuit); }
.centre .pico, .etiquette.centre .pico { margin-inline: auto; }
.etiquette p { color: var(--encre-2); font-size: .98rem; margin: 0; }
.etiquette .lien-fil { display: inline-block; margin-top: .9rem; font-weight: 600; font-size: .95rem; }

/* Place l'élément en colonne gauche sur grand écran, mais après le texte sur mobile */
@media (min-width: 621px) { .swap-gauche { order: -1; } }

.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.8rem); }
.grille-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.5vw, 1.8rem); }
.grille-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(.9rem, 2vw, 1.4rem); }
/* Grilles : toutes les cartes gardent la même largeur (pas de recentrage d'orphelin). */
@media (max-width: 960px) {
  .grille-3, .grille-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grille-3, .grille-2, .grille-4 { grid-template-columns: 1fr; }
  .etapes { margin-top: 2.6rem; }
}

/* ---------- Bandeau défilant (villes) ---------- */
.ruban { overflow: hidden; border-top: var(--stitch); border-bottom: var(--stitch); background: linear-gradient(90deg, #22252e, #322c3e 50%, #22252e); color: var(--papier); padding: .7rem 0; }
.ruban__piste { display: flex; gap: 2.4rem; width: max-content; animation: defile 38s linear infinite; font-family: var(--f-titre); font-style: italic; font-size: 1.05rem; white-space: nowrap; }
.ruban__piste span { display: inline-flex; align-items: center; gap: 2.4rem; }
.ruban__piste i { color: var(--garance); font-style: normal; }
@keyframes defile { to { transform: translateX(-50%); } }
.ruban:hover .ruban__piste { animation-play-state: paused; }

/* ---------- Méthode (le fil en 5 étapes) ---------- */
.etapes { position: relative; display: grid; gap: clamp(1.5rem, 3vw, 2.2rem); }
.etape { display: grid; grid-template-columns: 70px 1fr; gap: 1.3rem; align-items: start; position: relative; }
.etape__num {
  width: 54px; height: 54px; border-radius: 14px; flex: none; transform: rotate(-4deg);
  display: grid; place-items: center; font-family: var(--f-titre); font-weight: 800; font-size: 1.45rem;
  background: var(--craie); border: 2px solid var(--encre); position: relative; z-index: 1;
  box-shadow: 3px 3px 0 rgba(34,37,46,.8);
}
.etape:nth-child(odd) .etape__num { background: var(--garance); color: #fff; border-color: var(--garance-fonce); }
.etapes::before {
  content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px;
  background: linear-gradient(180deg, var(--garance), var(--ocre)); opacity: .5; width: 2px;
}
.etape h3 .annotation { font-size: 1.15rem; margin-left: .5rem; }
.etape p { margin: .2rem 0 0; color: var(--encre-2); }

/* ---------- Portfolio (échantillons tissu) ---------- */
.echantillons { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.5vw, 2rem); }
@media (max-width: 960px) { .echantillons { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .echantillons { grid-template-columns: 1fr; } }
.echantillon { background: var(--craie); border: 1.5px solid var(--encre); border-radius: var(--radius); overflow: hidden; box-shadow: var(--ombre); transition: transform .25s ease; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.echantillon:hover { transform: translateY(-6px) rotate(-.4deg); }
.echantillon__visuel { aspect-ratio: 16/10; display: grid; place-items: center; font-size: 3rem; position: relative; border-bottom: var(--stitch); }
.echantillon__visuel small { position: absolute; bottom: .6rem; right: .8rem; font-family: var(--f-main); font-size: 1.1rem; color: rgba(255,255,255,.95); text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.echantillon__corps { padding: 1.1rem 1.2rem 1.2rem; }
.echantillon__corps h3 { font-size: 1.15rem; margin-bottom: .25rem; }
.echantillon__corps p { font-size: .92rem; color: var(--encre-2); margin: 0; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: .2rem .65rem; border-radius: 999px; border: 1.5px solid currentColor; margin: 0 .3rem .4rem 0; }
.badge--loire { color: var(--loire); background: rgba(46,107,94,.12); border-color: rgba(46,107,94,.45); }
.badge--garance { color: var(--garance-fonce); background: rgba(216,68,43,.10); border-color: rgba(216,68,43,.45); }
.badge--bleu { color: #3a5ea8; background: rgba(86,140,220,.12); border-color: rgba(86,140,220,.5); }
.badge--ocre { color: #9a6a14; background: rgba(224,156,51,.14); border-color: rgba(224,156,51,.55); }

/* ---------- Références (vrais clients) ---------- */
.reference {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0;
  background: var(--craie); border: 2px solid var(--encre); border-radius: var(--radius);
  overflow: hidden; box-shadow: 8px 8px 0 rgba(34,37,46,.85); margin-bottom: clamp(2rem, 4vw, 3rem);
}
.reference:nth-of-type(1) { box-shadow: 8px 8px 0 rgba(216,68,43,.8); }
.reference:nth-of-type(2) { box-shadow: 8px 8px 0 rgba(224,156,51,.85); }
.reference:nth-of-type(3) { box-shadow: 8px 8px 0 rgba(110,147,214,.85); }
.reference:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.reference:nth-child(even) .reference__visuel { order: 2; }
@media (max-width: 820px) {
  .reference, .reference:nth-child(even) { grid-template-columns: 1fr; }
  .reference:nth-child(even) .reference__visuel { order: 0; }
}
.reference__visuel { position: relative; min-height: 260px; display: grid; place-items: center; font-size: 4rem; }
.reference__visuel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reference__visuel .photo-attente { position: absolute; inset: 0; border: none; border-radius: 0; }
.reference__visuel small { position: absolute; bottom: .8rem; right: 1rem; font-family: var(--f-main); font-size: 1.25rem; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.55); z-index: 1; }
.reference__corps { padding: clamp(1.4rem, 3vw, 2.2rem); }
.reference__corps h3 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); margin-bottom: .2rem; }
.reference__corps .metier { font-family: var(--f-main); font-size: 1.3rem; color: var(--garance-fonce); margin: 0 0 .9rem; }
.reference__corps ul { list-style: none; padding: 0; margin: .9rem 0; }
.reference__corps li { padding: .34rem 0 .34rem 1.6rem; position: relative; font-size: .96rem; color: var(--encre-2); }
.reference__corps li::before { content: "—"; position: absolute; left: 0; top: .34rem; color: var(--garance); font-weight: 700; }
.reference__resultat {
  display: inline-block; background: linear-gradient(120deg, #23262f, #34304a); color: var(--papier); font-weight: 600;
  font-size: .9rem; padding: .45rem .9rem; border-radius: 10px; margin-top: .4rem;
}
.reference__resultat strong { color: var(--ocre); }

/* ---------- Espace client ---------- */
.ec-connexion { min-height: 80vh; display: grid; place-items: center; padding: 2rem 1rem; }

/* ----- Coquille applicative (barre latérale), une fois connecté ----- */
body.ec-app { background: var(--papier); }
.ec-side {
  position: fixed; top: 0; left: 0; bottom: 0; width: 264px; z-index: 90;
  display: flex; flex-direction: column; background: var(--craie);
  border-right: 1.5px solid var(--encre);
  border-top: 4px solid; border-image: linear-gradient(90deg, var(--garance), var(--ocre), #6fae9a, #6e93d6, #9a82d8, var(--garance)) 1;
}
.ec-side__marque { display: flex; align-items: center; gap: .6rem; padding: 1.05rem 1.1rem .9rem; border-bottom: 1px dashed rgba(34,37,46,.18); text-decoration: none; flex: none; }
.ec-side__marque img { width: 34px; height: 34px; border-radius: 7px; flex: none; }
.ec-side__marque b { font-family: var(--f-titre); font-size: 1.12rem; color: var(--encre); line-height: 1.1; }
.ec-side__marque i { display: block; font-style: normal; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--garance); margin-top: .1rem; }
.ec-side__nav { flex: 1; overflow-y: auto; padding: .8rem .7rem; }
.ec-side__lien {
  display: flex; align-items: center; gap: .65rem; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--f-texte); font-weight: 600; font-size: .95rem; color: var(--encre-2);
  padding: .58rem .7rem; border-radius: 10px; margin-bottom: .15rem; transition: background .15s, color .15s;
}
.ec-side__lien:hover { background: rgba(34,37,46,.06); color: var(--encre); }
.ec-side__lien[aria-current="true"] { background: var(--encre); color: var(--papier); }
.ec-side__ic { font-size: 1.05rem; width: 1.4rem; text-align: center; flex: none; }
.ec-side__pied { padding: .9rem 1.1rem; border-top: 1px dashed rgba(34,37,46,.18); display: flex; flex-direction: column; gap: .55rem; flex: none; }
.ec-deco { background: none; border: 1.5px solid var(--encre); color: var(--encre); border-radius: 999px; padding: .45rem 1rem; cursor: pointer; font-family: var(--f-texte); font-weight: 600; font-size: .9rem; transition: .15s; }
.ec-deco:hover { background: var(--encre); color: var(--papier); }
.ec-side__pied a { font-size: .82rem; color: var(--encre-2); text-decoration: none; }
.ec-side__pied a:hover { color: var(--garance); }

.ec-main { margin-left: 264px; min-height: 100vh; display: flex; flex-direction: column; }
.ec-main > .conteneur { flex: 1; width: 100%; }
.ec-vue[hidden] { display: none; }
.ec-card { background: var(--craie); border: 1.5px solid var(--encre); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: 5px 5px 0 rgba(34,37,46,.1); }
.ec-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 900px) { .ec-kpis { grid-template-columns: repeat(2, 1fr); } }
.ec-kpi { background: var(--craie); border: 1.5px solid var(--encre); border-radius: 12px; padding: 1rem 1.1rem; box-shadow: 3px 3px 0 rgba(34,37,46,.1); }
.ec-kpi b { display: block; font-family: var(--f-titre); font-size: 1.7rem; color: var(--garance-fonce); line-height: 1; }
.ec-kpi span { font-size: .85rem; color: var(--encre-2); }

.ec-topbar { display: none; }
.ec-scrim { display: none; }
@media (max-width: 980px) {
  .ec-side { transform: translateX(-100%); transition: transform .34s cubic-bezier(.22, 1, .36, 1); width: min(300px, 86vw); }
  body.ec-open .ec-side { transform: translateX(0); box-shadow: 14px 0 50px rgba(34,37,46,.28); }
  .ec-main { margin-left: 0; padding-top: 54px; }
  .ec-topbar {
    display: flex; align-items: center; gap: .7rem; position: fixed; top: 0; left: 0; right: 0; height: 54px; z-index: 80; padding: 0 1rem;
    background: rgba(247,241,230,.95); backdrop-filter: blur(8px); border-bottom: 1.5px solid var(--encre);
    border-top: 4px solid; border-image: linear-gradient(90deg, var(--garance), var(--ocre), #6fae9a, #6e93d6, #9a82d8, var(--garance)) 1;
  }
  .ec-topbar__titre { font-family: var(--f-titre); font-weight: 700; font-size: 1.05rem; color: var(--encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ec-burger { background: none; border: 0; cursor: pointer; padding: .4rem .3rem; flex: none; }
  .ec-burger span { display: block; width: 24px; height: 2.5px; background: var(--encre); margin: 5px 0; border-radius: 3px; transition: transform .3s, opacity .25s; }
  body.ec-open .ec-burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  body.ec-open .ec-burger span:nth-child(2) { opacity: 0; }
  body.ec-open .ec-burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .ec-scrim { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(34,37,46,.42); border: 0; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  body.ec-open .ec-scrim { opacity: 1; visibility: visible; }
}
.ec-entete-client {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  background: var(--craie); border: 2px solid var(--encre); border-radius: var(--radius);
  padding: 1.4rem 1.6rem; box-shadow: 6px 6px 0 rgba(34,37,46,.85); margin-bottom: 2rem;
}
.ec-timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin: 1.2rem 0 .4rem; }
@media (max-width: 700px) { .ec-timeline { grid-template-columns: 1fr; } }
.ec-etape { text-align: center; padding: .7rem .4rem; border-radius: 10px; border: 1.5px dashed rgba(34,37,46,.3); font-size: .82rem; font-weight: 600; color: var(--encre-2); background: var(--craie); position: relative; }
.ec-etape--faite { background: #e7f2ea; border: 1.5px solid var(--loire); color: var(--loire); }
.ec-etape--encours { background: var(--garance); border: 1.5px solid var(--garance-fonce); color: #fff; }
.ec-etape--encours::after { content: "en cours"; display: block; font-family: var(--f-main); font-size: .95rem; font-weight: 400; }
@media (max-width: 700px) { .ec-etape { text-align: left; padding-left: 1rem; } }
.ec-message { padding: .9rem 1.1rem; background: var(--craie); border: 1.5px solid var(--encre); border-left: 5px solid var(--garance); border-radius: 10px; margin-bottom: .8rem; }
.ec-message time { font-size: .8rem; font-weight: 700; color: var(--garance-fonce); text-transform: uppercase; letter-spacing: .06em; }
.ec-message p { margin: .25rem 0 0; font-size: .95rem; color: var(--encre-2); }
.ec-liste-simple { list-style: none; margin: 0; padding: 0; }
.ec-liste-simple li { display: flex; justify-content: space-between; gap: .8rem; align-items: center; padding: .65rem 0; border-bottom: 1px dashed rgba(34,37,46,.2); font-size: .95rem; }
.ec-liste-simple li:last-child { border-bottom: none; }

.filtres { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 2rem; }
.filtres button {
  font-family: var(--f-texte); font-weight: 600; font-size: .92rem; cursor: pointer;
  background: var(--craie); color: var(--encre); border: 1.5px solid var(--encre);
  border-radius: 999px; padding: .45rem 1.1rem; transition: .18s;
}
.filtres button:hover { background: var(--papier); }
.filtres button[aria-pressed="true"] { background: var(--encre); color: var(--papier); }

/* ---------- Statistiques (section chiffres redessinée) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(.9rem, 2vw, 1.4rem); }
@media (max-width: 960px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.stat {
  position: relative; background: rgba(255,253,248,.82); border: 1.5px solid var(--encre);
  border-radius: var(--radius); padding: 1.5rem 1.4rem 1.3rem;
  box-shadow: 4px 4px 0 rgba(34,37,46,.85); overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--garance), var(--ocre));
}
.stat__num {
  display: block; font-family: var(--f-titre); font-weight: 800; line-height: 1;
  font-size: clamp(2.6rem, 5vw, 3.6rem); letter-spacing: -.03em;
  background: linear-gradient(120deg, var(--garance), #e07a33 60%, var(--ocre));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { display: block; font-weight: 700; font-size: .98rem; margin-top: .55rem; line-height: 1.35; }
.stat__note { display: block; font-size: .84rem; color: var(--encre-2); margin-top: .25rem; }

/* ---------- Témoignages ---------- */
.temoignage { margin: 0; background: var(--craie); border: 1.5px solid var(--encre); border-radius: var(--radius); padding: 1.6rem; position: relative; box-shadow: 4px 4px 0 rgba(34,37,46,.15); height: 100%; display: flex; flex-direction: column; }
.temoignage blockquote { flex: 1; }
.temoignage::before { content: "“"; position: absolute; top: -.5rem; left: 1rem; font-family: var(--f-titre); font-size: 4.5rem; color: var(--garance); line-height: 1; }
.temoignage blockquote { margin: 1.1rem 0 1rem; font-size: 1.02rem; font-style: italic; color: var(--encre-2); }
.temoignage figcaption { font-weight: 700; font-size: .95rem; }
.temoignage figcaption small { display: block; font-weight: 400; color: var(--encre-2); }
.etoiles { color: var(--ocre); letter-spacing: .15em; font-size: .9rem; }

/* ---------- Offres / tarifs ---------- */
.offres { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.5vw, 1.8rem); align-items: stretch; }
@media (max-width: 960px) { .offres { grid-template-columns: 1fr; max-width: 540px; margin: 0 auto; } }
.offre { background: var(--craie); border: 2px solid var(--encre); border-radius: var(--radius); padding: 1.9rem 1.6rem; display: flex; flex-direction: column; position: relative; }
.offre--star { border-color: var(--garance); box-shadow: 8px 8px 0 var(--garance); }
.offre__pop { position: absolute; top: -16px; left: 50%; transform: translateX(-50%) rotate(-2deg); background: var(--garance); color: #fff; font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .9rem; border-radius: 999px; white-space: nowrap; }
.offre h3 { font-size: 1.5rem; }
.offre .prix { font-family: var(--f-titre); font-size: 2.5rem; font-weight: 700; margin: .4rem 0 .1rem; }
.offre .prix small { font-size: 1rem; font-weight: 400; font-family: var(--f-texte); color: var(--encre-2); }
.offre .pour-qui { font-family: var(--f-main); font-size: 1.25rem; color: var(--loire); margin: 0 0 .6rem; }
/* Fourchette de prix indicative (offres) */
.fourchette { font-family: var(--f-titre); font-weight: 700; color: var(--garance-fonce); font-size: 1.15rem; margin: 0 0 1rem; line-height: 1.2; }
.fourchette small { display: block; font-family: var(--f-texte); font-weight: 400; font-size: .78rem; color: var(--encre-2); margin-top: .15rem; }
.etiquette .fourchette { font-size: 1.05rem; margin: .1rem 0 .6rem; }
.offre ul { list-style: none; padding: 0; margin: 0 0 1.4rem; flex: 1; }
.offre li { padding: .42rem 0 .42rem 1.7rem; position: relative; font-size: .97rem; border-bottom: 1px dashed rgba(34,37,46,.18); }
.offre li:last-child { border-bottom: none; }
.offre li::before { content: "✓"; position: absolute; left: 0; top: .42rem; color: var(--garance); font-weight: 700; }
.offre li.non { opacity: .45; }
.offre li.non::before { content: "—"; transform: none; color: var(--gris-fil); }

/* ---------- FAQ ---------- */
.faq details { background: var(--craie); border: 1.5px solid var(--encre); border-radius: 12px; margin-bottom: .8rem; overflow: hidden; }
.faq summary { cursor: pointer; padding: 1rem 3rem 1rem 1.3rem; font-weight: 600; font-size: 1.05rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-family: var(--f-titre); font-size: 1.6rem; color: var(--garance); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 1.3rem 1.2rem; color: var(--encre-2); }

/* ---------- Formulaires ---------- */
.champ { margin-bottom: 1.1rem; }
.champ label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.champ input, .champ select, .champ textarea {
  width: 100%; font-family: var(--f-texte); font-size: 1rem; color: var(--encre);
  background: var(--craie); border: 1.5px solid var(--encre); border-radius: 10px;
  padding: .7rem .9rem; transition: box-shadow .15s, border-color .15s;
}
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: none; border-color: var(--garance); box-shadow: 3px 3px 0 rgba(216,68,43,.35);
}
.champ .aide { font-size: .83rem; color: var(--encre-2); margin-top: .25rem; }
.champ .aide { display: block; }
.aide--ok { color: #2c7a4b; font-weight: 600; }
.aide--avert { color: #b4451f; font-weight: 600; }

/* ---------- Barre d'actions d'un document (devis / facture) ----------
   Hiérarchie visuelle : 1 action primaire, un groupe « Partager » secondaire,
   l'action « suivante » mise en avant, et le danger isolé à droite. */
.barre-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.4rem; }
.barre-actions__sep { width: 1px; align-self: stretch; min-height: 1.8rem; background: currentColor; opacity: .18; margin: 0 .25rem; }
.barre-actions__lbl { font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; opacity: .6; margin-right: .1rem; }
.btn-icone--accent { border-color: var(--at-accent, var(--garance)); color: var(--at-accent, var(--garance)); font-weight: 600; }

/* Bandeau d'erreur bloquante persistant (ex. échec d'enregistrement serveur) */
.bandeau-erreur { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; justify-content: space-between;
  margin-top: 1.2rem; padding: .8rem 1rem; border-radius: 12px;
  background: #fdecea; border: 1.5px solid #d8442b; color: #8f2c1c; font-size: .92rem; font-weight: 600; }
.bandeau-erreur[hidden] { display: none; }
.bandeau-erreur .btn-icone { border-color: #d8442b; color: #8f2c1c; background: #fff; font-weight: 700; flex: none; }

/* ---------- Bandeau CTA ---------- */
.cta-final { text-align: center; }
.cta-final h2 { max-width: 22ch; margin-inline: auto; }
.cta-final .annotation { font-size: 1.5rem; }

/* ---------- Pied de page ---------- */
.pied { background: linear-gradient(180deg, rgba(255,253,248,.4), rgba(248,232,210,.55)); color: var(--encre); padding: 3.5rem 0 1.5rem; border-top: 4px solid; border-image: linear-gradient(90deg, var(--garance), var(--ocre), #6fae9a, #6e93d6, #9a82d8, var(--garance)) 1; }
.pied a { color: var(--encre); text-decoration: none; opacity: .8; }
.pied a:hover { opacity: 1; color: var(--garance-fonce); }
.pied__grille { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px dashed rgba(34,37,46,.3); }
@media (max-width: 880px) { .pied__grille { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pied__grille { grid-template-columns: 1fr; } }
.pied h4 { color: var(--garance-fonce); font-size: 1.05rem; margin-bottom: .8rem; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: .45rem; font-size: .95rem; }
.pied__bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.4rem; font-size: .85rem; opacity: .7; }
.pied .logo { color: var(--encre); }

/* Wordmark image (logo fourni, noir sur transparent) */
.logo-img { height: 30px; width: auto; aspect-ratio: 4274 / 736; max-width: 180px; object-fit: contain; display: block; }
.pied .logo-img { height: 40px; max-width: 240px; }
@media (max-width: 560px) { .logo-img { height: 25px; } }

/* Séparateur « fil » entre sections */
.fil-separateur { display: block; width: min(420px, 70%); margin: 0 auto; color: var(--garance); opacity: .7; }
.fil-separateur svg { width: 100%; height: 26px; display: block; }

/* ---------- Photos ---------- */
/* Photo encadrée façon tirage épinglé à l'atelier */
.photo-cadre {
  position: relative; border: 1.5px solid var(--encre); border-radius: var(--radius);
  overflow: hidden; box-shadow: 6px 6px 0 rgba(34,37,46,.85); background: var(--craie);
}
.photo-cadre img, .photo-cadre .photo-attente { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-cadre img { transition: transform .5s ease; }
.photo-cadre:hover img { transform: scale(1.04); }
.initiales {
  font-family: var(--f-titre); font-weight: 800; font-size: clamp(2.6rem, 5vw, 4rem);
  color: rgba(255,255,255,.9); letter-spacing: .04em; text-shadow: 0 2px 14px rgba(0,0,0,.25);
}
.photo-cadre figcaption {
  position: absolute; bottom: .7rem; left: .8rem; right: .8rem;
  font-family: var(--f-main); font-size: 1.15rem; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.55); pointer-events: none;
}
.photo-cadre--penche { transform: rotate(-1.2deg); box-shadow: 6px 6px 0 rgba(216,68,43,.75); }
.photo-cadre--penche2 { transform: rotate(1deg); box-shadow: 6px 6px 0 rgba(224,156,51,.8); }

/* Emplacement en attente de photo (généré par site.js si le fichier manque) */
.photo-attente {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  background: repeating-linear-gradient(-45deg, var(--craie) 0 14px, #f3ecdd 14px 28px);
  border: 2px dashed rgba(34,37,46,.35); border-radius: inherit;
  color: var(--encre-2); text-align: center; padding: 1rem; min-height: 120px;
}
.photo-attente span { font-size: 1.8rem; }
.photo-attente small { font-family: var(--f-main); font-size: 1.15rem; max-width: 26ch; line-height: 1.25; }
.photo-attente code { font-size: .72rem; background: rgba(34,37,46,.08); padding: .1rem .5rem; border-radius: 6px; }

/* Bande de photos (accueil) */
.bande-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.8rem); align-items: stretch; }
@media (max-width: 760px) { .bande-photos { grid-template-columns: 1fr; } }
.bande-photos .photo-cadre { aspect-ratio: 4/3; }

/* Visuels des réalisations : la photo recouvre le fond dégradé quand elle existe */
.echantillon__visuel { position: relative; overflow: hidden; }
.echantillon__visuel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.echantillon:hover .echantillon__visuel > img { transform: scale(1.05); }
.echantillon__visuel small { z-index: 1; }

/* Photo dans les sections services */
.photo-service { aspect-ratio: 16/10; margin-bottom: 1.1rem; }
.photo-service > .photo-attente { height: 100%; border: none; border-radius: 0; }

/* ---------- Numéros fantômes de sections ---------- */
.section[data-num]::after {
  content: attr(data-num);
  position: absolute; top: clamp(1rem, 3vw, 2.2rem); right: clamp(1rem, 4vw, 3rem);
  font-family: var(--f-titre); font-weight: 800; font-size: clamp(3.4rem, 8vw, 6.5rem);
  line-height: 1; color: rgba(34,37,46,.055); pointer-events: none; letter-spacing: -.04em;
}

/* ---------- Chips de confiance (héros) ---------- */
.confiance-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.4rem 0 0; }
.confiance-chips li {
  font-size: .85rem; font-weight: 600; color: var(--encre-2);
  background: var(--craie); border: 1.5px solid rgba(34,37,46,.3); border-radius: 999px;
  padding: .32rem .85rem .32rem .7rem; display: inline-flex; align-items: center; gap: .4rem;
}
.confiance-chips li::before { content: "✓"; color: var(--garance); font-weight: 800; }
.confiance-chips li:nth-child(1) { background: rgba(216,68,43,.10); border-color: rgba(216,68,43,.4); }
.confiance-chips li:nth-child(2) { background: rgba(224,156,51,.13); border-color: rgba(224,156,51,.5); }
.confiance-chips li:nth-child(3) { background: rgba(46,107,94,.10); border-color: rgba(46,107,94,.4); }
.confiance-chips li:nth-child(2)::before { color: #9a6a14; }
.confiance-chips li:nth-child(3)::before { color: var(--loire); }

/* ---------- Offre 360° (bannière large) ---------- */
.offre-360 {
  display: grid; grid-template-columns: 1fr auto; gap: clamp(1.4rem, 3vw, 2.5rem); align-items: center;
  background:
    radial-gradient(60% 120% at 85% 10%, rgba(216,68,43,.35), transparent 60%),
    radial-gradient(50% 100% at 10% 100%, rgba(224,156,51,.22), transparent 60%),
    linear-gradient(135deg, #23262f, #2e2a3a);
  color: var(--papier);
  border-radius: var(--radius); padding: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-top: clamp(1.6rem, 3vw, 2.4rem); box-shadow: 8px 8px 0 rgba(216,68,43,.85);
}
@media (max-width: 760px) { .offre-360 { grid-template-columns: 1fr; } }
.offre-360 h3 { color: var(--papier); font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .1rem; }
.offre-360 .pour-qui { color: var(--ocre); font-family: var(--f-main); font-size: 1.3rem; margin: 0 0 .7rem; }
.offre-360 p { color: rgba(247,241,230,.85); margin: 0; }
.offre-360__cta { text-align: center; }
.offre-360__cta .prix { font-family: var(--f-titre); font-weight: 800; font-size: 1.9rem; color: var(--papier); margin: 0 0 .8rem; }
.offre-360__cta .prix small { display: block; font-family: var(--f-texte); font-weight: 400; font-size: .95rem; color: rgba(247,241,230,.75); }

/* ---------- Citation éditoriale ---------- */
.citation { position: relative; text-align: center; }
.citation__texte {
  position: relative; font-family: var(--f-titre); font-weight: 800;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem); line-height: 1.25; letter-spacing: -.02em;
  max-width: 30ch; margin: 0 auto .9rem;
  text-wrap: balance;
}
.citation__guillemet {
  font-size: 1.5em; line-height: 0; color: var(--garance); vertical-align: -.12em;
}
.citation__guillemet--ouvre { margin-right: .12em; }
.citation__guillemet--ferme { margin-left: .12em; }
.citation__source { color: var(--encre-2); font-size: .95rem; margin: 0; }

/* Tampon estampillé sur une photo */
.tampon--photo { position: absolute; top: -24px; right: -12px; background: var(--craie); z-index: 2; }
@media (max-width: 620px) { .tampon--photo { right: 6px; top: -20px; } }

/* ---------- Slider (avis, références) : actif dès que les cartes devraient replier ---------- */
.indice-slider { display: none; }
.slider-zone { position: relative; }
.slider-fleche {
  display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--craie); border: 1.5px solid var(--encre); color: var(--encre);
  font-size: 1.15rem; line-height: 1; place-items: center;
  box-shadow: 3px 3px 0 rgba(34,37,46,.8); transition: .18s;
}
.slider-fleche:hover { background: var(--encre); color: var(--papier); }
.slider-fleche[disabled] { opacity: .22; pointer-events: none; box-shadow: none; }
.slider-fleche--prec { left: -8px; }
.slider-fleche--suiv { right: -8px; }
@media (max-width: 960px) {
  .slider-mobile {
    display: flex; grid-template-columns: none; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
    gap: .9rem; padding: .9rem .25rem 1.4rem; margin-inline: -.25rem;
    scrollbar-width: none; -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .slider-mobile::-webkit-scrollbar { display: none; }
  .slider-mobile > * { flex: 0 0 calc(50% - .7rem); scroll-snap-align: center; width: auto !important; grid-column: auto !important; }
  .slider-fleche { display: grid; }
}
@media (max-width: 620px) {
  .slider-mobile > * { flex: 0 0 84%; }
  .slider-fleche--prec { left: -4px; }
  .slider-fleche--suiv { right: -4px; }
}

/* Bloc contact du menu mobile : masqué sur desktop */
.nav__contact { display: none; }

/* ---------- Sous-menu d'ancrage (sommaire de page) ---------- */
:root { --entete-h: 78px; }
.sous-menu { position: sticky; top: var(--entete-h); z-index: 40; background: rgba(247,241,230,.94); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(34,37,46,.12); }
.sous-menu__inner {
  display: flex; gap: .35rem; align-items: center; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  max-width: var(--maxw); margin: 0 auto; padding: .55rem clamp(1.1rem, 4vw, 2.5rem);
}
.sous-menu__inner::-webkit-scrollbar { display: none; }
.sous-menu__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--encre-2); margin-right: .3rem; white-space: nowrap; }
.sous-menu a { white-space: nowrap; text-decoration: none; font-size: .9rem; font-weight: 600; color: var(--encre-2); padding: .38rem .9rem; border-radius: 999px; border: 1.5px solid transparent; transition: .15s; }
.sous-menu a:hover { color: var(--garance-fonce); background: rgba(216,68,43,.1); border-color: transparent; }
.sous-menu a.actif { background: var(--encre); color: var(--papier); border-color: var(--encre); }
@media (max-width: 620px) { .sous-menu__label { display: none; } }
/* Décalage d'ancre : les sections ciblées ne passent pas sous l'en-tête + le sommaire */
section[id], [id].ancre { scroll-margin-top: calc(var(--entete-h) + 60px); }

/* ---------- Retours ---------- */
.lien-retour {
  display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
  font-weight: 600; font-size: .92rem; color: var(--encre-2);
  border: 1.5px solid rgba(34,37,46,.35); border-radius: 999px; padding: .4rem 1rem; transition: .18s;
}
.lien-retour:hover { border-color: var(--encre); color: var(--encre); }

.btn-haut {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--encre); color: var(--papier); border: none; font-size: 1.2rem;
  box-shadow: 0 6px 18px rgba(34,37,46,.3);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.btn-haut.visible { opacity: 1; transform: none; pointer-events: auto; }
.btn-haut:hover { background: var(--garance); }

/* ---------- Bandeau de consentement (cookies / mesure d'audience) ---------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 95; max-width: 720px; margin-inline: auto;
  background: var(--craie); border: 2px solid var(--encre); border-radius: var(--radius);
  box-shadow: 6px 6px 0 rgba(34,37,46,.18); padding: 1.1rem 1.3rem;
  display: flex; gap: 1rem 1.2rem; align-items: center; flex-wrap: wrap;
  transform: translateY(160%); transition: transform .4s cubic-bezier(.22, 1, .36, 1);
}
.cookie-banner.visible { transform: none; }
.cookie-banner p { margin: 0; flex: 1 1 280px; font-size: .9rem; color: var(--encre-2); line-height: 1.5; }
.cookie-banner__actions { display: flex; gap: .6rem; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .cookie-banner { transition: none; } }

/* ---------- Bannière d'installation PWA (Atelier + Espace client) ---------- */
.pwa-banniere {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%) translateY(180%);
  z-index: 400; width: min(440px, calc(100% - 1.4rem));
  display: grid; grid-template-columns: auto 1fr auto; gap: .15rem .9rem; align-items: center;
  background: var(--papier); color: var(--encre);
  border: 1.5px solid var(--encre); border-radius: 16px; padding: .95rem 1.1rem;
  box-shadow: 0 14px 44px rgba(34,37,46,.32);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1);
}
.pwa-banniere.visible { transform: translateX(-50%) translateY(0); }
.pwa-banniere__icone { width: 44px; height: 44px; border-radius: 11px; }
.pwa-banniere__txt strong { display: block; font-size: 1rem; line-height: 1.2; }
.pwa-banniere__txt span { font-size: .85rem; color: var(--encre-2); }
.pwa-banniere .pwa-fermer { background: none; border: none; color: var(--encre-2); font-size: 1.5rem; line-height: 1; cursor: pointer; align-self: start; padding: 0 .1rem; }
.pwa-banniere .pwa-fermer:hover { color: var(--garance-fonce); }
.pwa-banniere__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .5rem; }
.pwa-banniere .pwa-installer { margin-right: auto; }
.pwa-banniere .pwa-plus-tard, .pwa-banniere .pwa-jamais {
  background: none; border: none; cursor: pointer; font-family: var(--f-texte);
  font-size: .85rem; color: var(--encre-2); padding: .35rem .5rem; border-radius: 8px;
}
.pwa-banniere .pwa-plus-tard:hover, .pwa-banniere .pwa-jamais:hover { color: var(--encre); text-decoration: underline; }
.pwa-banniere .pwa-jamais { color: var(--encre-2); }

/* ---------- Révélations au scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .12s; } .reveal-d2 { transition-delay: .24s; } .reveal-d3 { transition-delay: .36s; }

/* ---------- Page article / prose ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.2rem; }
.prose figure { margin: 2rem 0; }
.prose .encadre { background: var(--craie); border-left: 4px solid var(--garance); border-radius: 0 12px 12px 0; padding: 1.1rem 1.3rem; margin: 1.6rem 0; }

/* ---------- Blog (index magazine + article) ---------- */
.fil-ariane { font-size: .85rem; color: var(--encre-2); margin-bottom: .5rem; }
.fil-ariane a { color: var(--encre-2); text-decoration: none; }
.fil-ariane a:hover { color: var(--garance-fonce); }
.cat-badge { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--garance-fonce); background: rgba(216,68,43,.1); border-radius: 999px; padding: .22rem .7rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; font-size: .85rem; color: var(--encre-2); margin: .55rem 0 0; }
.blog-une { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(1.2rem, 3vw, 2.2rem); align-items: stretch; }
@media (max-width: 800px) { .blog-une { grid-template-columns: 1fr; } }
.blog-une .echantillon { height: 100%; }

/* ---------- Tableaux vitrine ---------- */
.tableau { width: 100%; border-collapse: collapse; background: var(--craie); border: 1.5px solid var(--encre); border-radius: 12px; overflow: hidden; }
.tableau th, .tableau td { padding: .75rem 1rem; text-align: left; border-bottom: 1px dashed rgba(34,37,46,.2); font-size: .96rem; }
.tableau th { background: var(--encre); color: var(--papier); font-family: var(--f-texte); font-weight: 600; }
.tableau tr:last-child td { border-bottom: none; }

/* ---------- Divers ---------- */
.centre { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }
.tampon {
  display: inline-grid; place-items: center; width: 110px; height: 110px; border-radius: 50%;
  border: 2.5px solid var(--garance); color: var(--garance); font-weight: 700;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; text-align: center;
  transform: rotate(-12deg); padding: .6rem; line-height: 1.3; opacity: .9;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='110'%3E%3Cfilter id='g'%3E%3CfeTurbulence baseFrequency='.6'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .8 .2'/%3E%3C/filter%3E%3Crect width='110' height='110' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ============================================================
   L'ATELIER — interface des outils internes (thème encre)
   ============================================================ */
body.atelier {
  background: #f2ebdc; color: var(--at-texte);
  --studio-side: 256px;
  padding-left: var(--studio-side);
}
body.atelier::before { opacity: .05; }
.atelier .entete { display: none; }   /* marque + navigation vivent désormais dans la barre latérale */
.atelier h1, .atelier h2, .atelier h3, .atelier h4 { color: var(--encre); }

/* ----- Barre latérale du Studio ----- */
.studio-nav {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--studio-side); z-index: 90;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #fffdf8, #f5eede);
  border-right: var(--stitch);
  border-top: 4px solid; border-image: linear-gradient(90deg, var(--garance), var(--ocre), #6fae9a, #6e93d6, #9a82d8, var(--garance)) 1;
}
.studio-nav__marque {
  display: flex; align-items: center; gap: .6rem; text-decoration: none;
  padding: 1.05rem 1.1rem .9rem; border-bottom: 1px dashed var(--at-bordure-faible); flex: none;
}
.studio-nav__marque img { border-radius: 7px; }
.studio-nav__avatar { border-radius: 50%; object-fit: cover; }   /* photo de la personne connectée (ronde, au repos comme chargée) */
.studio-nav__marque span { display: flex; flex-direction: column; line-height: 1.06; }
.studio-nav__marque b { font-family: var(--f-titre); font-size: 1.18rem; color: var(--encre); letter-spacing: -.01em; }
.studio-nav__marque i { font-style: normal; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--garance); margin-top: .05rem; }
.studio-nav__liens { flex: 1; overflow-y: auto; padding: .8rem .7rem 1rem; }
/* Groupes de la sidebar : séparés par un filet discret pour se lire comme des blocs distincts. */
.studio-nav__groupe { margin-bottom: .55rem; padding-bottom: .55rem; border-bottom: 1px solid var(--at-bordure-faible); }
.studio-nav__groupe:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
/* Titre de groupe : contraste renforcé (--encre, AA/AAA) + pastille fil rouge de la marque. */
.studio-nav__titre { display: flex; align-items: center; gap: .4rem; font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--encre); margin: 0 0 .32rem .35rem; }
.studio-nav__titre::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--garance); flex: none; }
.studio-nav__liens a {
  display: flex; align-items: center; gap: .6rem; text-decoration: none;
  font-weight: 600; font-size: .92rem; color: var(--at-texte2);
  padding: .48rem .6rem; border-radius: 9px; position: relative; transition: background .15s, color .15s;
}
.studio-nav__ic { font-size: 1.02rem; width: 1.3rem; text-align: center; flex: none; }
.studio-nav__liens a:hover { background: var(--at-creux); color: var(--encre); }
.studio-nav__liens a[aria-current="page"] { background: var(--encre); color: var(--papier); }
.studio-nav__liens a[aria-current="page"]::before {
  content: ""; position: absolute; left: -.7rem; top: .35rem; bottom: .35rem; width: 4px; border-radius: 0 4px 4px 0; background: var(--garance);
}
.studio-nav__pied { padding: .8rem 1.1rem 1rem; border-top: 1px dashed var(--at-bordure-faible); flex: none; }
.studio-nav__pied a { text-decoration: none; font-size: .86rem; font-weight: 600; color: var(--at-sourdine); }
.studio-nav__pied a:hover { color: var(--garance); }

/* ---------- En-tête de page du Studio (titre + actions + Outils, puis barre client) ---------- */
.studio-entete { margin-bottom: 1.4rem; }
.studio-entete__barre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .7rem 1rem; }
.studio-entete__titre h1 { font-family: var(--f-titre); font-size: clamp(1.5rem, 3.2vw, 2rem); margin: 0; line-height: 1.1; }
.studio-entete__sous { color: var(--at-sourdine); margin: .15rem 0 0; font-size: .92rem; }
.studio-entete__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.studio-entete .barre-client { margin-top: .9rem; }
/* Menu « Outils ↗ » : dropdown sans JS (via <details>). */
.studio-outils { position: relative; }
.studio-outils > summary { list-style: none; }
.studio-outils > summary::-webkit-details-marker { display: none; }
.studio-outils__menu { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 60;
  display: flex; flex-direction: column; min-width: 220px; padding: .4rem; gap: .1rem;
  background: var(--at-panneau); border: 1.5px solid var(--at-bordure); border-radius: 12px;
  box-shadow: 0 18px 44px -16px rgba(34,37,46,.5); }
.studio-outils__menu a { display: flex; align-items: center; gap: .5rem; text-decoration: none;
  font-size: .9rem; font-weight: 600; color: var(--at-texte2); padding: .5rem .7rem; border-radius: 8px; }
.studio-outils__menu a:hover { background: var(--at-creux); color: var(--encre); }
@media (max-width: 640px) { .studio-outils__menu { right: auto; left: 0; } }

/* ----- Barre supérieure + barre d'onglets (mobile) + voile ----- */
.studio-topbar { display: none; }
.studio-tabbar { display: none; }
.studio-scrim { display: none; }

@media (max-width: 980px) {
  body.atelier { padding-left: 0; padding-top: 52px; padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }

  /* ----- Tiroir latéral ----- */
  .studio-nav { width: min(300px, 86vw); transform: translateX(-100%); transition: transform .34s cubic-bezier(.22, 1, .36, 1); z-index: 90; }
  body.studio-open .studio-nav { transform: translateX(0); box-shadow: 14px 0 50px rgba(34,37,46,.28); }

  /* ----- Barre supérieure : contexte (page en cours) ----- */
  .studio-topbar {
    display: flex; align-items: center; gap: .6rem; position: fixed; top: 0; left: 0; right: 0; height: 52px; z-index: 80; padding: 0 1rem;
    background: color-mix(in srgb, #f2ebdc 94%, transparent); backdrop-filter: blur(8px); border-bottom: var(--stitch);
    border-top: 4px solid; border-image: linear-gradient(90deg, var(--garance), var(--ocre), #6fae9a, #6e93d6, #9a82d8, var(--garance)) 1;
  }
  .studio-topbar__menu { appearance: none; -webkit-appearance: none; background: none; border: 0; cursor: pointer; font-size: 1.5rem; line-height: 1; color: var(--encre); padding: .1rem .35rem; margin: 0 .1rem 0 -.2rem; }
  .studio-topbar__page { font-family: var(--f-titre); font-weight: 700; font-size: 1.08rem; color: var(--encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* ----- Barre d'onglets : accès direct aux outils du quotidien + Menu ----- */
  .studio-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 75;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: color-mix(in srgb, #f2ebdc 96%, transparent); backdrop-filter: blur(10px); border-top: var(--stitch);
  }
  .studio-tabbar a, .studio-tabbar button {
    appearance: none; -webkit-appearance: none; background: none; border: 0; cursor: pointer; text-decoration: none; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .14rem;
    min-height: 58px; font-size: 1.2rem; color: var(--at-sourdine); font-family: var(--f-texte); transition: color .15s;
  }
  .studio-tabbar span { font-size: .68rem; font-weight: 600; }
  .studio-tabbar a:hover, .studio-tabbar button:hover { color: var(--encre); }
  .studio-tabbar a[aria-current="page"], body.studio-open .studio-tab--menu { color: var(--garance); }
  .studio-tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 24%; right: 24%; height: 3px; border-radius: 0 0 3px 3px; background: var(--garance); }

  /* ----- Voile ----- */
  .studio-scrim { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(34,37,46,.44); border: 0; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  body.studio-open .studio-scrim { opacity: 1; visibility: visible; }

  /* ===== Contenu : anti-débordement mobile (audit) ===== */
  .atelier .tableau { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .atelier .tableau th, .atelier .tableau td { padding: .55rem .65rem; font-size: .9rem; }
  .atelier .panneau * { min-width: 0; }                 /* laisse rétrécir les enfants flex:1 */
  .atelier .panneau { overflow-wrap: anywhere; }        /* césure des URLs / e-mails longs */
  .atelier .panneau [style*="justify-content:space-between"],
  .atelier #a-criteres > div, .atelier #historique > div,
  .atelier #liste-brouillons > div, .atelier #liste-posts label { flex-wrap: wrap; }
  .atelier .ligne-dyn { flex-wrap: wrap; }
  .atelier .ligne-dyn > input, .atelier .ligne-dyn > select { flex: 1 1 100% !important; width: auto !important; min-width: 0; }
  .atelier .ligne-dyn > [data-suppr] { flex: 0 0 auto; }
  .atelier .btn-icone { min-height: 40px; padding: .5rem .8rem; display: inline-flex; align-items: center; justify-content: center; }
  .atelier .btn-icone--danger, .atelier .crit { min-width: 40px; }

  /* espace client (pas de .atelier) : mêmes garde-fous */
  .ec-liste-simple li { flex-wrap: wrap; }
  .ec-liste-simple li > span { min-width: 0; overflow-wrap: anywhere; }
  .ec-liste-simple .btn-icone { min-height: 40px; }
}

@media (max-width: 620px) {
  .atelier .grille-2 > *, .atelier .grille-3 > *, .atelier .grille-4 > * { min-width: 0; }
}

/* Résumé du pipeline (6 colonnes) : responsive sans déborder */
.pipeline-grille { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; }
@media (max-width: 760px) { .pipeline-grille { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 380px) { .pipeline-grille { grid-template-columns: repeat(2, 1fr); } }

.panneau {
  background: var(--at-panneau); border: 1.5px solid var(--encre); border-radius: var(--radius);
  /* Ombre décalée nette, assumée comme sur le site public (avant : .12 = délavé sur fond papier). */
  padding: 1.4rem 1.5rem; box-shadow: 4px 4px 0 rgba(34,37,46,.22);
}
.panneau h2, .panneau h3 { margin-top: 0; }
.panneau--accent { border-color: var(--garance); box-shadow: 5px 5px 0 rgba(216,68,43,.4); }
.kpi { box-shadow: 3px 3px 0 rgba(34,37,46,.16); }

.kpi { display: flex; flex-direction: column; gap: .15rem; }
.kpi b { font-family: var(--f-titre); font-size: 2rem; color: var(--garance-fonce); line-height: 1.1; }
.kpi span { font-size: .85rem; color: var(--at-sourdine); }
.kpi small.tendance { font-size: .8rem; color: var(--at-ok); }

.atelier .champ label { color: var(--at-texte2); }
.atelier .champ input, .atelier .champ select, .atelier .champ textarea {
  background: #fff; border-color: var(--at-bordure); color: var(--at-texte);
}
.atelier .champ input:focus, .atelier .champ select:focus, .atelier .champ textarea:focus {
  border-color: var(--garance); box-shadow: 3px 3px 0 rgba(216,68,43,.25);
}
.atelier ::placeholder { color: #a89f8a; }

.atelier .tableau { background: var(--at-panneau); border-color: var(--encre); color: var(--at-texte); }
.atelier .tableau th { background: var(--encre); color: var(--papier); }
.atelier .tableau td { border-color: var(--at-bordure-faible); }
.atelier .tableau tbody tr:hover { background: var(--at-surface); }

.pastille { display: inline-block; padding: .18rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .03em; }
.pastille--vert { background: rgba(76,160,110,.16); color: var(--at-ok); }
.pastille--ocre { background: rgba(224,156,51,.2); color: var(--at-attention); }
.pastille--rouge { background: rgba(216,68,43,.13); color: var(--at-alerte); }
.pastille--bleu { background: rgba(80,110,180,.13); color: #3a5ea8; }
.pastille--gris { background: rgba(34,37,46,.08); color: var(--at-sourdine); }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(248px, 1fr); gap: 1rem; overflow-x: auto; padding-bottom: 1rem; align-items: start; }
.kanban__col { background: var(--at-creux2); border: 1.5px dashed var(--at-bordure); border-radius: 12px; padding: .8rem; min-height: 260px; }
.kanban__col h3 { font-family: var(--f-texte); font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; color: var(--at-sourdine); display: flex; justify-content: space-between; padding: 0 .2rem; }
.kanban__col.survol { border-color: var(--garance); background: var(--at-surface); }
/* Mobile : le glisser-déposer horizontal est pénible. On empile les colonnes en une seule
   liste verticale (une section par étape) ; le déplacement passe par le menu « Déplacer » des cartes. */
@media (max-width: 760px) {
  .kanban { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow-x: visible; }
  .kanban__col { min-height: auto; }
}
.carte {
  background: var(--at-panneau); border: 1.5px solid var(--at-bordure); border-radius: 10px;
  padding: .8rem .9rem; margin-bottom: .7rem; cursor: grab; transition: .15s;
  border-left: 4px solid var(--garance);
  box-shadow: 2px 2px 0 rgba(34,37,46,.1);
}
.carte:hover { border-color: var(--encre); transform: translateY(-1px); }
.carte.glisse { opacity: .4; }
.carte h4 { font-family: var(--f-texte); font-size: .98rem; margin: 0 0 .25rem; color: var(--encre); }
.carte p { font-size: .82rem; color: var(--at-sourdine); margin: 0 0 .4rem; }
.carte .meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .78rem; }
.carte--vert { border-left-color: #4ca06e; }
.carte--ocre { border-left-color: var(--ocre); }
.carte--bleu { border-left-color: #4a6fbb; }
.carte--gris { border-left-color: #9b958a; }
/* Ajouts CRM (ne PAS modifier les 4 classes ci-dessus, partagées avec projets.html) :
   « Devis envoyé » = violet (proposition en jeu), « Perdu » = rouge sombre (négatif, distinct du --garance de marque). */
.carte--violet { border-left-color: #7c5cc4; }
.carte--rouge { border-left-color: #a23b2c; }
/* Menu « Déplacer » : caché sur ordinateur (on glisse les cartes), affiché au doigt
   sur mobile/tablette tactile, où le glisser-déposer HTML5 ne fonctionne pas. */
.carte__deplacer { display: none; margin-top: .6rem; align-items: center; gap: .4rem; font-size: .72rem; color: var(--at-sourdine); cursor: pointer; }
.carte__deplacer select { flex: 1; min-width: 0; background: var(--at-creux); border: 1.5px solid var(--at-bordure); color: var(--at-texte); border-radius: 8px; padding: .4rem .55rem; font-family: var(--f-texte); font-size: .82rem; }
@media (max-width: 640px) { .carte__deplacer { display: flex; } .carte { cursor: default; } }
@media (hover: none) and (pointer: coarse) { .carte__deplacer { display: flex; } .carte { cursor: default; } }

/* Boutons atelier */
.atelier .btn--ghost { color: var(--encre) !important; border-color: var(--encre); box-shadow: 0 4px 0 var(--encre); }
.atelier .btn--ghost:hover { background: var(--encre); color: var(--papier) !important; }
/* Bouton secondaire unifié : même langage « pilule » que .btn, aligné, hauteur constante, jamais coupé. */
.btn-icone { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; white-space: nowrap;
  background: var(--at-panneau); border: 1.5px solid var(--at-bordure); color: var(--at-texte2);
  border-radius: 999px; padding: .42rem .9rem; min-height: 2.1rem; line-height: 1; vertical-align: middle;
  font-family: var(--f-texte); font-weight: 600; font-size: .85rem; text-decoration: none; cursor: pointer; transition: .15s; }
.btn-icone:hover { border-color: var(--encre); color: var(--encre); }
/* Variante danger : teinte rouge dès le repos (sinon indistincte d'un bouton neutre). */
.btn-icone--danger { border-color: color-mix(in srgb, var(--at-alerte) 55%, var(--at-bordure)); color: var(--at-alerte); }
.btn-icone--danger:hover { border-color: var(--garance); color: var(--at-alerte); }

/* Catalogue & tarifs (éditeur de lignes paramétrables) */
.tarifs-entete { display: grid; grid-template-columns: 1fr 160px 38px; gap: .6rem; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--at-sourdine); margin-bottom: .35rem; padding: 0 .2rem; }
.tarifs-entete span:nth-child(2) { padding-left: .1rem; }
.liste-tarifs { display: flex; flex-direction: column; gap: .5rem; }
.ligne-tarif { display: grid; grid-template-columns: 1fr 160px 38px; gap: .6rem; align-items: center; }
.ligne-tarif input { width: 100%; background: var(--at-creux); border: 1.5px solid var(--at-bordure); color: var(--at-texte); border-radius: 8px; padding: .5rem .7rem; font-family: var(--f-texte); font-size: .95rem; }
.ligne-tarif input:focus { outline: none; border-color: var(--encre); }
.tarif-prix { display: flex; align-items: center; gap: .35rem; }
.tarif-prix input { text-align: right; }
.tarif-prix span { color: var(--at-sourdine); font-size: .88rem; white-space: nowrap; }
.tarif-suppr { background: none; border: 1.5px solid var(--at-bordure); color: var(--at-alerte); border-radius: 8px; width: 38px; height: 38px; cursor: pointer; font-size: 1rem; line-height: 1; transition: .15s; }
.tarif-suppr:hover { background: var(--at-alerte); border-color: var(--at-alerte); color: #fff; }
@media (max-width: 620px) { .ligne-tarif, .tarifs-entete { grid-template-columns: 1fr 120px 34px; } .tarif-suppr { width: 34px; height: 34px; } }

/* Modale */
.voile { position: fixed; inset: 0; background: rgba(34,37,46,.45); backdrop-filter: blur(3px); z-index: 200; display: none; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; }
.voile.ouvert { display: flex; }
.modale { background: var(--at-panneau); border: 2px solid var(--encre); border-radius: var(--radius); padding: 1.8rem; width: min(640px, 100%); position: relative; box-shadow: 8px 8px 0 rgba(34,37,46,.2); }
.modale h2 { font-size: 1.5rem; }
.modale .fermer { position: absolute; top: .9rem; right: 1rem; background: none; border: none; color: var(--at-sourdine); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.modale .fermer:hover { color: var(--garance); }

/* Jauges */
.jauge { height: 10px; background: rgba(34,37,46,.12); border-radius: 999px; overflow: hidden; }
.jauge > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--garance), var(--ocre)); transition: width .6s ease; }

/* Lignes de devis/factures */
.lignes-doc { width: 100%; }
.ligne-doc { display: grid; grid-template-columns: 1fr 80px 110px 110px 40px; gap: .6rem; margin-bottom: .55rem; align-items: center; }
@media (max-width: 720px) { .ligne-doc { grid-template-columns: 1fr 48px 74px 34px; gap: .4rem; } .ligne-doc .total-ligne { display: none; } }
.ligne-doc input { width: 100%; }
.total-ligne { text-align: right; font-weight: 600; font-size: .95rem; color: var(--at-attention); }

.totaux { margin-left: auto; max-width: 320px; }
.totaux div { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px dashed var(--at-bordure-faible); font-size: .98rem; }
.totaux .grand { font-size: 1.25rem; font-weight: 700; color: var(--garance-fonce); border-bottom: none; }

/* Verrou d'accès atelier */
.verrou { position: fixed; inset: 0; z-index: 500; background: #f2ebdc; display: grid; place-items: center; padding: 1rem; }
.verrou .panneau { width: min(420px, 100%); text-align: center; }
.verrou input { text-align: center; font-size: 1.25rem; letter-spacing: .12em; font-family: var(--f-titre); }

/* Toast — notification discrète : sombre pour les infos, vert pour les succès (plus de rouge alarmant). */
.toast {
  position: fixed; bottom: 1.6rem; left: 50%; transform: translateX(-50%) translateY(.8rem);
  display: inline-flex; align-items: center; gap: .6rem; max-width: min(90vw, 460px);
  background: linear-gradient(180deg, #2b2f3a, var(--encre)); color: var(--papier);
  font-family: var(--f-texte); font-weight: 600; font-size: .92rem; line-height: 1.3;
  padding: .78rem 1.15rem .78rem .95rem; border-radius: 13px; z-index: 600;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 44px -12px rgba(34,37,46,.65), inset 0 1px 0 rgba(255,255,255,.07);
  /* Masquage par opacité + visibility : aucun « dépassement » possible en bas, quelle que soit la position. */
  opacity: 0; visibility: hidden; transition: opacity .28s ease, transform .28s cubic-bezier(.22,1,.36,1), visibility .28s;
}
.toast::before {
  content: "i"; flex: none; width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.16); font-style: italic; font-weight: 800; font-size: .82rem;
}
.toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.toast--vert { background: linear-gradient(180deg, #2e9a63, #1f7a4d); border-color: rgba(255,255,255,.2); }
.toast--vert::before { content: "✓"; background: rgba(255,255,255,.22); font-style: normal; }
.toast--erreur { background: linear-gradient(180deg, #d8442b, #b33420); border-color: rgba(255,255,255,.24); }
.toast--erreur::before { content: "!"; background: rgba(255,255,255,.24); font-style: normal; }
/* Sur mobile, le toast passe au-dessus de la barre d'onglets (sinon il la chevauche). */
@media (max-width: 980px) { .toast { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity .28s ease, visibility .28s; } }

/* ---------- Barre de contexte « client courant » (outils du Studio) ---------- */
.barre-client {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1.3rem;
  background: var(--at-panneau); border: 1.5px solid var(--encre);
  border-left: 4px solid var(--garance); border-radius: 12px; padding: .55rem .85rem;
  box-shadow: 4px 4px 0 rgba(34,37,46,.16);   /* vraie barre d'outils, posée au-dessus du contenu */
}
.barre-client__sel { display: flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--encre); }
.barre-client__sel select {
  background: var(--at-creux); border: 1.5px solid var(--at-bordure); color: var(--at-texte);
  border-radius: 8px; padding: .42rem .6rem; font-family: var(--f-texte); font-size: .92rem; max-width: 17rem;
}
.barre-client__liens { display: flex; flex-wrap: wrap; gap: .3rem; }
.barre-client__liens a {
  text-decoration: none; font-weight: 600; font-size: .85rem; color: var(--at-texte2);
  padding: .32rem .7rem; border-radius: 999px; border: 1.5px solid var(--at-bordure-faible); transition: .15s;
}
.barre-client__liens a:hover { border-color: var(--encre); color: var(--encre); background: var(--at-creux); }
.barre-client__hint { font-size: .86rem; color: var(--at-sourdine); }
.barre-client__hint--fort { color: var(--at-texte2); font-weight: 600; }
.barre-client__hint--fort a { color: var(--garance-fonce); font-weight: 700; }
.barre-client__actif { font-weight: 700; font-size: .85rem; color: var(--papier); background: var(--encre); padding: .32rem .7rem; border-radius: 999px; }
.barre-client__n { display: inline-block; min-width: 1.15em; padding: 0 .25em; border-radius: 999px; background: var(--garance); color: #fff; font-size: .72em; font-weight: 800; line-height: 1.55; text-align: center; }
.barre-client__ok { color: var(--at-ok); font-weight: 800; }

/* ---------- Bandeau « Mode aperçu » (agence qui visualise l'espace d'un client) ---------- */
.ec-apercu { position: sticky; top: 0; z-index: 500; display: flex; flex-wrap: wrap; justify-content: center;
  gap: .6rem; background: var(--encre); color: var(--papier); text-align: center;
  padding: .55rem 1rem; font-size: .88rem; font-weight: 600; border-bottom: 2px solid var(--garance); }
.ec-apercu a { color: #ffe9e4; text-decoration: underline; }
.ec-apercu a:hover { color: #fff; }

/* ============================================================
   IMPRESSION — devis, factures, rapports d'audit (A4 propre)
   ============================================================ */
.doc-imprimable { display: none; }
@media print {
  @page { margin: 14mm; }
  body, body.atelier { background: #fff !important; color: #111 !important; font-size: 11pt; }
  body::before { display: none !important; }
  .entete, .studio-nav, .studio-topbar, .studio-tabbar, .studio-scrim, .pied, .no-print, .toast, .voile, .verrou { display: none !important; }
  body.atelier { padding-left: 0 !important; padding-top: 0 !important; }
  .doc-imprimable { display: block !important; color: #111; }
  .doc-imprimable h1, .doc-imprimable h2, .doc-imprimable h3 { color: #111; }
  .doc-imprimable .doc-entete { display: flex; justify-content: space-between; border-bottom: 3px solid #d8442b; padding-bottom: 6mm; margin-bottom: 8mm; }
  .doc-imprimable table { width: 100%; border-collapse: collapse; margin: 4mm 0; }
  .doc-imprimable th { background: #22252e !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 2.5mm; text-align: left; font-size: 10pt; }
  .doc-imprimable td { padding: 2.5mm; border-bottom: .5pt solid #999; font-size: 10pt; }
  .doc-imprimable .doc-totaux { margin-left: auto; width: 70mm; }
  .doc-imprimable .doc-totaux div { display: flex; justify-content: space-between; padding: 1.5mm 0; }
  .doc-imprimable .doc-totaux .grand { font-weight: 700; font-size: 13pt; border-top: 2px solid #22252e; color: #d8442b; }
  .doc-imprimable .mentions { font-size: 8pt; color: #555; margin-top: 10mm; border-top: .5pt solid #999; padding-top: 3mm; }
  .doc-imprimable .doc-pied { position: fixed; bottom: 0; left: 0; right: 0; text-align: center; font-size: 8pt; color: #777; }
}
