@font-face { font-family: "Bricolage"; src: url("fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("fonts/sourceserif.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("fonts/sourceserif-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --paper: #F3F4F1;      /* papier granit, froid */
  --ardoise: #1B2427;    /* encre ardoise */
  --goemon: #1F4D45;     /* vert profond, algue */
  --granit: #5F696E;     /* texte secondaire */
  --ciel: #CFDDE3;       /* ciel breton, fonds légers */
  --ajonc: #E4B44B;      /* jaune ajonc, signal */
  --line: #D5D9D6;
  --sans: "Bricolage", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif", Georgia, serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ardoise); font: 400 1.125rem/1.62 var(--serif); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ajonc); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1.04; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.muted { color: var(--granit); }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(243,244,241,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.mark { text-decoration: none; display: flex; align-items: baseline; gap: 14px; }
.mark b { font: 700 1.5rem/1 var(--sans); font-stretch: 82%; letter-spacing: -0.03em; }
.mark b span { color: var(--goemon); }
.mark small { font: 400 .92rem/1.2 var(--serif); font-style: italic; color: var(--granit); }
.top nav { display: flex; align-items: center; gap: 28px; font: 500 .98rem/1 var(--sans); }
.top nav a { text-decoration: none; color: var(--granit); }
.top nav a:hover { color: var(--ardoise); }
.top nav a.write { color: var(--ardoise); background: var(--ajonc); padding: 11px 18px; border-radius: 4px; }
.top nav a.write:hover { background: #d9a53a; }

/* ---------- Ouverture ---------- */
.open { padding: 88px 0 0; }
.open h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); font-stretch: 78%; font-weight: 640; max-width: 15ch; }
.open .lead { margin-top: 34px; max-width: 58ch; font-size: 1.24rem; line-height: 1.6; }
.open .where { margin-top: 18px; font: 500 1rem/1.4 var(--sans); color: var(--goemon); display: flex; align-items: center; gap: 10px; }
.open .where svg { width: 18px; height: 18px; flex: none; }

/* L'équation : l'élément signature de la page */
.equation { margin-top: 72px; background: var(--goemon); color: var(--paper); }
.equation .wrap { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 0 28px; padding-top: 56px; padding-bottom: 56px; align-items: start; }
.term .big { font: 600 clamp(1.6rem, 3.2vw, 2.7rem)/1.02 var(--sans); font-stretch: 80%; letter-spacing: -0.025em; display: block; min-height: 2.1em; }
.term p { margin: 18px 0 0; color: rgba(243,244,241,.78); font-size: 1rem; line-height: 1.55; max-width: 30ch; }
.term.result .big { color: var(--ajonc); }
.op { font: 300 clamp(2rem, 4vw, 3.4rem)/1 var(--sans); color: var(--ajonc); padding-top: .05em; }
@media (prefers-reduced-motion: no-preference) {
  .js .equation .term, .js .equation .op { opacity: 0; transform: translateY(10px); transition: opacity .7s ease, transform .7s ease; }
  .js .equation.on .term, .js .equation.on .op { opacity: 1; transform: none; }
  .js .equation.on > .wrap > :nth-child(2) { transition-delay: .25s; }
  .js .equation.on > .wrap > :nth-child(3) { transition-delay: .4s; }
  .js .equation.on > .wrap > :nth-child(4) { transition-delay: .65s; }
  .js .equation.on > .wrap > :nth-child(5) { transition-delay: .8s; }
}

/* ---------- Sections ---------- */
.block { padding: 112px 0; }
.block > .wrap > h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-stretch: 84%; max-width: 20ch; }
.block > .wrap > .intro { margin-top: 20px; max-width: 60ch; color: var(--granit); }

/* Missions : deux publics, deux traitements */
.missions { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 56px; border: 1px solid var(--ardoise); }
.mission { padding: 44px 44px 40px; display: flex; flex-direction: column; }
.mission + .mission { background: var(--ardoise); color: var(--paper); }
.mission .who { font: 500 1rem/1.3 var(--sans); color: var(--goemon); margin: 0 0 14px; }
.mission + .mission .who { color: var(--ajonc); }
.mission h3 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); font-stretch: 86%; max-width: 18ch; }
.mission ul { list-style: none; margin: 30px 0 34px; padding: 0; flex: 1; }
.mission li { padding: 13px 0 13px 30px; border-top: 1px solid var(--line); position: relative; line-height: 1.5; }
.mission + .mission li { border-color: rgba(243,244,241,.16); }
.mission li::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 12px; height: 2px; background: var(--goemon); }
.mission + .mission li::before { background: var(--ajonc); }
.mission .terms { font: 500 .98rem/1.4 var(--sans); margin: 0; }
.mission .terms span { color: var(--granit); font-weight: 400; }
.mission + .mission .terms span { color: rgba(243,244,241,.65); }

/* Méthode : une vraie séquence */
.method { background: var(--ciel); }
.steps { list-style: none; margin: 60px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; left: 24px; right: calc(25% - 8px); top: 23px; height: 2px; background: var(--ardoise); }
.steps li { counter-increment: s; position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ardoise); color: var(--paper); font: 600 1.15rem/1 var(--sans); margin-bottom: 26px; position: relative; }
.steps h3 { font-size: 1.45rem; font-stretch: 86%; margin-bottom: 10px; }
.steps p { font-size: 1rem; line-height: 1.55; margin: 0; }

/* Parcours */
.about-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 80px; margin-top: 56px; align-items: start; }
.about-grid .story p { font-size: 1.2rem; line-height: 1.66; }
.about-grid .story p:first-child::first-line { font-weight: 600; }
.facts { margin: 0; border-top: 2px solid var(--ardoise); }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 500 .95rem/1.45 var(--sans); color: var(--granit); }
.facts dd { margin: 0; font-size: 1.02rem; line-height: 1.45; }

/* Contact */
.contact { background: var(--ardoise); color: var(--paper); }
.contact .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: end; }
.contact h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); font-stretch: 78%; max-width: 14ch; }
.contact .intro { margin-top: 22px; color: rgba(243,244,241,.75); max-width: 48ch; }
.mail { display: block; text-decoration: none; font: 600 clamp(1.25rem, 2.4vw, 1.9rem)/1.2 var(--sans); font-stretch: 86%; color: var(--ajonc); border-bottom: 2px solid var(--ajonc); padding-bottom: 10px; word-break: break-all; }
.mail:hover { color: #f0c86c; border-color: #f0c86c; }
.contact .note { margin-top: 22px; font-size: 1rem; color: rgba(243,244,241,.75); }
.contact .note b { color: var(--paper); font-weight: 600; }

/* Pied de page */
.foot { background: var(--ardoise); color: rgba(243,244,241,.6); border-top: 1px solid rgba(243,244,241,.14); padding: 26px 0 34px; font: 400 .9rem/1.5 var(--sans); }
.foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot a { color: rgba(243,244,241,.8); }

/* Page mentions légales */
.legal { padding: 80px 0 110px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: 3rem; font-stretch: 80%; margin-bottom: 30px; }
.legal h2 { font-size: 1.4rem; margin: 40px 0 10px; }

/* ---------- Petits écrans ---------- */
@media (max-width: 960px) {
  .top nav a:not(.write) { display: none; }
  .equation .wrap { grid-template-columns: 1fr; gap: 6px; }
  .op { padding: 4px 0; font-size: 2.4rem; }
  .term .big { min-height: 0; }
  .term p { margin: 10px 0 8px; }
  .missions, .about-grid, .contact .wrap { grid-template-columns: 1fr; gap: 0; }
  .about-grid, .contact .wrap { gap: 48px; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 44px; }
  .steps::before { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 1.06rem; }
  .wrap { padding: 0 20px; }
  .mark small { display: none; }
  .open { padding-top: 56px; }
  .block { padding: 80px 0; }
  .mission { padding: 32px 24px; }
  .steps { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}
