/* ==========================================================================
   dev boîte — ze-boite.com
   Feuille de style unique. Aucune dépendance externe.
   ========================================================================== */

/* --- 1. Jetons de design ------------------------------------------------- */
:root {
  --ink:        #15181c;
  --ink-2:      #3c4249;
  --ash:        #6a7078;
  --paper:      #fbfaf7;
  --card:       #ffffff;
  --sand:       #f2ede5;
  --cta-bg:     #1a1d22;
  --cta-fg:     #f7f4ee;
  --cta-dim:    #a8a49c;
  --diag:       #efe9e0;
  --line:       rgba(21, 24, 28, .12);
  --line-2:     rgba(21, 24, 28, .07);
  --accent:     #c05621;
  --accent-ink: #8f3d13;
  --accent-bg:  #fbeadf;
  --teal:       #2f5d62;
  --teal-bg:    #e2eceb;
  --shadow:     0 1px 2px rgba(21, 24, 28, .04), 0 10px 30px -12px rgba(21, 24, 28, .12);
  --shadow-lg:  0 2px 4px rgba(21, 24, 28, .05), 0 24px 50px -20px rgba(21, 24, 28, .2);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1140px;
  --gut: clamp(1rem, 4vw, 2.5rem);
  --sec: clamp(4rem, 8.5vw, 7.5rem);
  --r: 14px;
  --r-lg: 22px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #f2efe9;
    --ink-2:      #d2cec6;
    --ash:        #9aa0a8;
    --paper:      #14161a;
    --card:       #1e2228;
    --sand:       #0f1114;
    --cta-bg:     #23272e;
    --cta-fg:     #f3efe8;
    --cta-dim:    #a3a8b0;
    --diag:       #2b3037;
    --line:       rgba(242, 239, 233, .14);
    --line-2:     rgba(242, 239, 233, .08);
    --accent:     #e8834a;
    --accent-ink: #f3a878;
    --accent-bg:  #2a1d15;
    --teal:       #7fb3b6;
    --teal-bg:    #162324;
    --shadow:     0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .5);
    --shadow-lg:  0 2px 4px rgba(0, 0, 0, .35), 0 24px 50px -20px rgba(0, 0, 0, .65);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.018em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.15rem, 5.4vw, 3.9rem); line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); letter-spacing: -.01em; }
p  { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

strong { font-weight: 650; color: var(--ink); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.1rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* --- 3. Structure -------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

section { padding-block: var(--sec); }
.band { background: var(--sand); }
.band + .band { padding-top: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--sans);
  font-size: .7rem; font-weight: 650;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 1.15rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px;
  background: var(--accent); border-radius: 2px; flex: none;
}

.lead { font-size: clamp(1.09rem, 1.6vw, 1.28rem); color: var(--ink-2); line-height: 1.6; }
.measure { max-width: 62ch; }
.measure-s { max-width: 48ch; }

.sec-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* --- 4. Boutons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: inherit; font-size: .97rem; font-weight: 600;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1.5px); }
.btn--primary { background: var(--ink); color: var(--paper); box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--accent-ink); box-shadow: var(--shadow-lg); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); background: var(--card); }
.btn--sm { padding: .6rem 1.1rem; font-size: .88rem; }

/* --- 5. En-tête ---------------------------------------------------------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.hdr.is-stuck { border-bottom-color: var(--line-2); }
.hdr__in {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--ink); font-weight: 650; font-size: 1.02rem;
  letter-spacing: -.01em; margin-right: auto;
  text-decoration: none !important;
}
.brand svg { flex: none; }
.brand b { font-weight: 650; }
.brand span { color: var(--ash); font-weight: 500; }

.nav { display: flex; gap: 1.6rem; }
.nav a {
  color: var(--ink-2); font-size: .93rem; font-weight: 500;
  text-decoration: none !important;
  padding-block: .3rem;
  border-bottom: 1.5px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

@media (max-width: 860px) {
  .nav { display: none; }
}

/* --- 6. Hero ------------------------------------------------------------- */
.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 7vw, 6rem); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 { margin-bottom: 1.1rem; }
.hero h1 em {
  font-style: normal;
  color: var(--accent-ink);
  background: linear-gradient(to top, var(--accent-bg) 0 32%, transparent 32%);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.facts {
  display: flex; flex-wrap: wrap; gap: 1.1rem 2.2rem;
  margin-top: 2.6rem; padding-top: 1.7rem;
  border-top: 1px solid var(--line-2);
  list-style: none; padding-left: 0;
}
.facts li { max-width: 15rem; }
.facts b {
  display: block;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600;
  letter-spacing: -.02em; line-height: 1.1; color: var(--ink);
}
.facts span { font-size: .87rem; color: var(--ash); line-height: 1.45; display: block; margin-top: .2rem; }

.hero__art { position: relative; }
.hero__art .ph { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.chip {
  position: absolute; left: -1rem; bottom: -1.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: .9rem 1.1rem;
  max-width: 15.5rem;
  font-size: .85rem; line-height: 1.45; color: var(--ink-2);
}
.chip b { display: block; color: var(--ink); font-size: .93rem; margin-bottom: .1rem; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__art .ph { aspect-ratio: 4 / 3; }
  .chip { position: static; max-width: none; margin-top: 1rem; box-shadow: var(--shadow); }
}

/* --- 7. Emplacements photo ---------------------------------------------- */
.ph {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  background:
    radial-gradient(120% 80% at 15% 10%, var(--accent-bg) 0%, transparent 60%),
    radial-gradient(110% 90% at 90% 90%, var(--teal-bg) 0%, transparent 55%),
    var(--sand);
  aspect-ratio: 4 / 3;
}
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph--wide { aspect-ratio: 16 / 10; }
.ph--tall { aspect-ratio: 5 / 6; }
.ph.is-empty::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* --- 8. Grilles de cartes ----------------------------------------------- */
.grid { display: grid; gap: 1.2rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(clamp(15rem, 28vw, 19rem), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: clamp(1.2rem, 3vw, 2.5rem); }

.card {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: clamp(1.3rem, 2.4vw, 1.75rem);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .96rem; color: var(--ash); line-height: 1.6; }
.card__ico {
  width: 38px; height: 38px; margin-bottom: 1rem;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-bg); color: var(--accent-ink);
}
.card__ico svg { width: 20px; height: 20px; }
.card__n {
  font-family: var(--mono); font-size: .75rem; font-weight: 600;
  letter-spacing: .06em; color: var(--accent-ink);
  display: block; margin-bottom: .7rem;
}

/* --- 9. Prêt-à-porter / cousu main -------------------------------------- */
.vs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.2rem; }
.vs__col {
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: clamp(1.3rem, 2.4vw, 1.9rem);
  background: var(--card);
}
.vs__col--them { background: transparent; border-style: dashed; }
.vs__col h3 { display: flex; align-items: baseline; gap: .6rem; margin-bottom: 1.2rem; }
.vs__col h3 small {
  font-family: var(--sans); font-size: .68rem; font-weight: 650;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ash);
}
.vs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.vs li {
  display: grid; grid-template-columns: 1.15rem 1fr; gap: .75rem;
  font-size: .96rem; line-height: 1.55; color: var(--ink-2);
}
/* Marqueurs dessinés en CSS : un trait pour la colonne de gauche,
   une coche pour celle de droite. Aucun caractère spécial. */
.vs li::before {
  content: "";
  width: .7rem; height: 2px;
  background: var(--ash);
  border-radius: 2px;
  margin-top: .72em;
}
.vs__col--us li::before {
  width: .42rem; height: .68rem;
  background: none;
  border: 0 solid var(--accent);
  border-right-width: 2px;
  border-bottom-width: 2px;
  border-radius: 1px;
  transform: rotate(42deg);
  margin: .3em 0 0 .15rem;
}

/* --- 10. Schémas -------------------------------------------------------- */
.figure {
  margin: clamp(2rem, 4vw, 3.2rem) 0 0;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: clamp(1.2rem, 3vw, 2.2rem);
  box-shadow: var(--shadow);
}
/* Le SVG est dans .fig-scroll, pas directement dans .figure : le sélecteur
   doit viser le bon niveau, sinon le schéma garde sa taille intrinsèque et
   laisse un grand vide à droite. */
.figure svg { width: 100%; height: auto; display: block; }
.figure:has(figcaption) > .fig-scroll {
  border-bottom: 1px solid var(--line-2);
  padding-bottom: clamp(1rem, 2vw, 1.4rem);
}
.figure figcaption {
  margin-top: 1.15rem;
  font-size: .89rem; color: var(--ash); line-height: 1.55;
  max-width: 68ch;
}
.figure figcaption b { color: var(--ink); font-weight: 600; }

/* Jetons utilisés à l'intérieur des SVG */
svg .s-fill    { fill: var(--card); }
svg .s-stroke  { stroke: var(--ink); }
svg .s-line    { stroke: var(--line); }
svg .s-txt     { fill: var(--ink); font-family: var(--sans); }
svg .s-sub     { fill: var(--ash); font-family: var(--sans); }
svg .s-acc     { fill: var(--accent); }
svg .s-acc-st  { stroke: var(--accent); }
svg .s-acc-bg  { fill: var(--accent-bg); }
svg .s-teal    { fill: var(--teal); }
svg .s-teal-bg { fill: var(--teal-bg); }
svg .s-sand    { fill: var(--diag); }
svg text { font-family: var(--sans); }

/* Les schémas font 920 unités de large. En dessous d'une certaine largeur,
   les réduire rendrait les libellés illisibles : on autorise donc un
   défilement horizontal, avec une largeur plancher. */
.fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.fig-scroll > svg { min-width: 560px; }

/* Quand le schéma dépasse, on le montre : un dégradé sur le bord droit indique
   qu'il y a une suite, et une ligne de texte l'explique. Sans ça, le schéma a
   l'air coupé alors qu'il est simplement à faire glisser.
   La classe .deborde est posée par assets/app.js. */
.figure:has(.fig-scroll.deborde) { position: relative; }
.figure:has(.fig-scroll.deborde)::after {
  content: "";
  position: absolute;
  top: clamp(1.2rem, 3vw, 2.2rem);
  right: clamp(1.2rem, 3vw, 2.2rem);
  width: 2.5rem;
  height: var(--h-schema, 12rem);
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--card) 80%);
  border-radius: 0 var(--r) var(--r) 0;
}
.fig-hint {
  display: none;
  margin: .6rem 0 0;
  font-size: .78rem; color: var(--ash);
}
.figure:has(.fig-scroll.deborde) .fig-hint { display: block; }
.fig-hint::before {
  content: ""; display: inline-block; vertical-align: -1px;
  width: .5rem; height: .5rem; margin-right: .45rem;
  border-right: 1.5px solid var(--accent); border-top: 1.5px solid var(--accent);
  transform: rotate(45deg);
}

/* --- 11. Terrains (secteurs) -------------------------------------------- */
.sectors { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.sector {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.sector .ph { border-radius: 0; aspect-ratio: 16 / 10; }
.sector__body { padding: 1.15rem 1.25rem 1.35rem; }
.sector__tag {
  font-size: .68rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-ink); display: block; margin-bottom: .45rem;
}
.sector h3 { font-size: 1.12rem; margin-bottom: .45rem; }
.sector p { font-size: .92rem; color: var(--ash); line-height: 1.55; margin: 0; }

/* --- 12. Méthode : étapes ---------------------------------------------- */
.steps { display: grid; gap: 0; margin-top: clamp(2rem, 4vw, 3rem); counter-reset: st; }
.step {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding-block: 1.5rem;
  border-top: 1px solid var(--line-2);
}
.step:last-child { border-bottom: 1px solid var(--line-2); }
.step__n {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 600;
  color: var(--accent); line-height: 1; letter-spacing: -.02em;
}
.step h3 { margin-bottom: .4rem; }
.step p { font-size: .97rem; color: var(--ash); margin: 0; max-width: 60ch; }

/* --- 13. Citation ------------------------------------------------------- */
.quote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.35; letter-spacing: -.015em;
  color: var(--ink);
  max-width: 34ch;
}
.quote__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
@media (min-width: 60rem) {
  #questions .quote__grid > div:first-child { position: sticky; top: 104px; }
}

/* --- 14. FAQ ------------------------------------------------------------ */
.faq { border-top: 1px solid var(--line-2); max-width: 74ch; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.25rem 2.5rem 1.25rem 0;
  position: relative;
  font-family: var(--serif); font-size: 1.12rem; font-weight: 600;
  letter-spacing: -.01em; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .4rem; top: 1.75rem;
  width: 11px; height: 11px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.85rem; }
.faq summary:hover { color: var(--accent-ink); }
.faq p { padding: 0 1.5rem 1.4rem 0; margin: 0; color: var(--ash); font-size: .98rem; }

/* --- 15. Contact -------------------------------------------------------- */
.cta {
  background: var(--cta-bg);
  color: var(--cta-fg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: clamp(2.2rem, 5vw, 4rem);
}
.cta h2, .cta .quote { color: var(--cta-fg); }
.cta p { color: var(--cta-dim); }
.cta .eyebrow { color: #eb9460; }
.cta .eyebrow::before { background: #eb9460; }
.cta__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: clamp(1.8rem, 4vw, 3.5rem); align-items: start;
}
.contacts { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.3rem; }
.contacts li { display: grid; gap: .15rem; }
.contacts small {
  font-size: .7rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase;
  color: var(--cta-dim);
}
.contacts a, .contacts span {
  font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--cta-fg); letter-spacing: -.01em; word-break: break-word;
}
.contacts a:hover { color: #eb9460; }

/* --- 16. Pied de page --------------------------------------------------- */
.ftr { border-top: 1px solid var(--line-2); padding-block: 2.5rem 3rem; font-size: .87rem; color: var(--ash); }
.ftr__in { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.ftr a { color: var(--ash); }
.ftr a:hover { color: var(--ink); }
.ftr__legal { display: flex; flex-wrap: wrap; gap: 1.2rem; }

/* --- 17. Petites utilitaires ---------------------------------------------- */
/* Ces classes remplacent les anciens attributs style="..." écrits dans le
   HTML. La CSP du serveur interdit les styles en ligne (style-src 'self'),
   donc tout doit vivre ici. */
.mt-0 { margin-top: 0 !important; }
.mt-m { margin-top: 1.2rem; }
.mt-l { margin-top: 1.5rem; }
.note { margin-top: 2rem; font-size: .92rem; }
.cta .note { color: var(--cta-dim); }
.ftr strong { color: var(--ink); }

/* --- 18. Page mentions légales -------------------------------------------- */
.doc { max-width: 70ch; }
.doc h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-top: 2.6rem; }
.doc dl { margin: 0 0 1.4rem; }
.doc dl > div {
  display: flex; flex-wrap: wrap; gap: .1rem 1.5rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--line-2);
}
.doc dl > div:first-child { border-top: 1px solid var(--line-2); }
.doc dt { flex: 0 0 13rem; color: var(--ash); font-size: .92rem; line-height: 1.6; }
.doc dd { flex: 1 1 14rem; margin: 0; line-height: 1.6; }
@media (max-width: 34rem) {
  .doc dt { flex-basis: 100%; }
}
