/* Cédric BIDET, Forward Deployed Engineer
   Design system : Cédric BIDET (forêt, sauge, blanc ; Recoleta/Fraunces + Open Sans) */

/* ---------- Polices (auto-hébergées) ---------- */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/open-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/open-sans-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/open-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/open-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --foret: #0d2900;
  --sauge: #e0edda;
  --blanc: #ffffff;
  --violet: #6610f2;
  --corail: #ff6b6b;
  --ocean: #175676;
  --ink: #0d2900;
  --ink-muted: #4a5d42;
  --line: #c4d6bb;
  --accent-soft: #efe6fe;

  --font-display: Recoleta, "Fraunces", Georgia, serif;
  --font-sans: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --section-gap: clamp(56px, 8vw, 96px);

  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 32px; --radius-pill: 999px;
  --blade: 32px 8px 32px 8px;
  --blade-alt: 8px 32px 8px 32px;
  --blade-sm: 8px 22px 8px 22px;

  --container: 1152px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--blanc); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure, blockquote { margin: 0; }
address { font-style: normal; }
a { color: var(--ocean); }
a:hover { color: var(--foret); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.on-dark :focus-visible { outline-color: #c2a3ff; }

.container { width: 100%; max-width: calc(var(--container) + 48px); margin-inline: auto; padding-inline: 24px; }
.section { padding-top: var(--section-gap); }
.stack { display: flex; flex-direction: column; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; background: var(--foret); color: var(--blanc); padding: 12px 20px; border-radius: var(--radius-md); font-weight: 600; }
.skip-link:focus { top: 16px; color: var(--blanc); }

/* ---------- Typo ---------- */
.label { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.label--ocean { color: var(--ocean); }
.label--sauge { color: var(--sauge); }
.h2 { font-size: 32px; line-height: 38px; letter-spacing: -0.01em; }
.h3 { font-size: 22px; line-height: 28px; }
.lead { font-size: 19px; line-height: 30px; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; line-height: 22px; }
.section-head { display: flex; flex-direction: column; gap: var(--space-3); max-width: 760px; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: background-color .2s, color .2s; }
.btn--brand { background: var(--foret); color: var(--blanc); min-height: 44px; padding: 10px 20px; }
.btn--brand:hover { background: #1b4210; color: var(--blanc); }
.btn--accent { background: var(--violet); color: var(--blanc); }
.btn--accent:hover { background: #5209c9; color: var(--blanc); }
.btn--ghost { color: var(--blanc); border-color: var(--sauge); }
.btn--ghost:hover { background: rgba(224, 237, 218, .12); color: var(--blanc); }

/* ---------- En-tête ---------- */
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand__mark { width: 30px; height: 34px; }
.brand__name { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-size: 15px; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 24px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.site-nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Hero ---------- */
.hero__band { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-7); padding: clamp(40px, 7vw, 96px); border-radius: var(--blade); background: var(--foret); color: var(--blanc); }
.hero__watermark { position: absolute; right: -60px; bottom: -120px; z-index: -1; width: 520px; opacity: .09; pointer-events: none; }
.hero__text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-5); }
.hero__title { font-size: clamp(40px, 5vw, 64px); line-height: 1.07; letter-spacing: -0.02em; }
.hero__lead { max-width: 60ch; font-size: 19px; line-height: 30px; color: var(--sauge); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.hero__aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.hero__portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--blade); background: var(--sauge); }
.hero__baseline { font-family: var(--font-display); font-size: 26px; line-height: 32px; color: var(--sauge); }

/* ---------- Preuves ---------- */
.proofs { padding-top: var(--space-7); }
.proofs__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-5); }
.proof { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--line); }
.proof--column { flex-direction: column; gap: 12px; }
.proof__title { display: block; font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 600; }
.proof__text { color: var(--ink-muted); }
.proof__logo--caen { width: 64px; flex: none; margin-top: 4px; }
.proof__logo--nn { width: 140px; }

/* ---------- Grilles génériques ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-6) var(--space-5); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-5); }

.feature { display: flex; flex-direction: column; gap: 14px; }
.tile { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: var(--blade-sm); background: var(--sauge); }

/* ---------- Doctrine ---------- */
.doctrine { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-6); padding: clamp(32px, 5vw, 64px); border-radius: var(--blade-alt); background: var(--sauge); }
.doctrine__title { flex: 1 1 320px; }
.doctrine__body { flex: 999 1 420px; min-width: 0; max-width: 65ch; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Déroulé ---------- */
.steps-wrap { display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 2px solid var(--foret); }
.step__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.step__num { font-family: var(--font-display); font-size: 44px; line-height: 50px; font-weight: 600; color: var(--ocean); }
.tag { display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--sauge); color: var(--foret); font-size: 14px; line-height: 22px; }
.tag--accent { background: var(--accent-soft); }
.socle { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 24px 32px; border-radius: var(--radius-md); background: var(--foret); color: var(--blanc); }
.socle__icon { flex: none; }
.socle__title { flex: 1 1 280px; font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 600; }
.socle__text { flex: 999 1 360px; max-width: 65ch; color: var(--sauge); }

/* ---------- Semaine ---------- */
.week { display: flex; flex-direction: column; gap: 40px; padding: clamp(32px, 5vw, 64px); border-radius: var(--blade-alt); background: var(--sauge); }
.week__timeline { position: relative; }
.week__line { position: absolute; left: 28px; right: 28px; top: 55px; height: 2px; background: var(--foret); opacity: .25; }
.week__days { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px 24px; }
.day { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.day__tile { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--foret); border-radius: var(--blade-sm); background: var(--blanc); }
.day__tile--dark { background: var(--foret); }
.day__title { font-size: 20px; line-height: 26px; }
.day__text { font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.week__loop { display: flex; align-items: center; gap: 12px; font-weight: 600; }
@media (max-width: 980px) { .week__line { display: none; } }

/* ---------- Ce que je livre ---------- */
.deliverable { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--foret); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 4px 14px; border-radius: var(--radius-pill); background: var(--sauge); font-size: 14px; line-height: 22px; }

/* ---------- Références ---------- */
.refs__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.client-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.client-tab { min-height: 48px; padding: 10px 22px; border: 2px solid var(--foret); border-radius: var(--radius-pill); background: var(--blanc); color: var(--foret); font-weight: 600; cursor: pointer; }
.client-tab:hover { background: var(--sauge); }
.client-tab[aria-selected="true"] { background: var(--foret); color: var(--blanc); cursor: default; }
.client + .client { margin-top: var(--space-9); }
.client__layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.client__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.client__head { display: flex; flex-direction: column; gap: 12px; }
.client__name { font-size: 32px; line-height: 38px; letter-spacing: -0.01em; }
.client__main { flex: 999 1 560px; min-width: 0; }
.tools { display: flex; flex-direction: column; gap: 4px; }
.tool-tab { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--foret); font-weight: 600; text-align: left; cursor: pointer; }
.tool-tab:hover { background: var(--sauge); }
.tool-tab__num { flex: none; font-family: var(--font-display); font-size: 20px; color: var(--ocean); }
.tool-tab[aria-selected="true"] { background: var(--foret); color: var(--blanc); cursor: default; }
.tool-tab[aria-selected="true"] .tool-tab__num { color: var(--sauge); }
.tool { display: flex; flex-direction: column; gap: 20px; }
.tool + .tool { margin-top: 40px; }
.tool__title { font-size: 24px; line-height: 30px; }
.tool__text { max-width: 65ch; }
.quote { display: flex; align-items: flex-start; gap: 20px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.quote__mark { flex: none; font-family: var(--font-display); font-weight: 600; font-size: 88px; line-height: 64px; color: var(--corail); }
.quote__body { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.quote__text { font-family: var(--font-display); font-size: 26px; line-height: 34px; text-wrap: balance; }
.quote__text p { margin: 0; }
.quote__author { font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.quote__author strong { color: var(--foret); font-weight: 600; }

/* Amélioration progressive : sans JS, tout est visible les uns sous les autres */
.js .client[hidden], .js .tool[hidden] { display: none; }
.js .tool + .tool { margin-top: 0; }
.js .client + .client { margin-top: 0; }
.no-js .client-tabs, .no-js .tools-hint { display: none; }

/* ---------- Schémas animés ---------- */
.stage { display: flex; align-items: center; justify-content: center; min-height: 380px; padding: 32px 16px; overflow: hidden; border-radius: var(--blade-alt); background: var(--sauge); }
.flow { width: 340px; max-width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; zoom: 1.5; }
@media (max-width: 760px) { .flow { zoom: 1; } .stage { min-height: 260px; } }
.flow * { box-sizing: border-box; }
.box { background: var(--blanc); border: 1px solid var(--line); border-radius: var(--radius-md); }
.cap { font-size: 11px; line-height: 14px; color: var(--ink-muted); }
.engine { flex: none; width: 76px; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: var(--radius-md); background: var(--foret); color: var(--blanc); font-size: 11px; line-height: 14px; font-weight: 700; }
.engine__ia { padding: 1px 8px; border-radius: var(--radius-pill); background: var(--violet); }
.track { position: relative; flex: 1 1 20px; min-width: 20px; height: 0; border-top: 2px dotted var(--ink-muted); }
.dot { position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--ocean); opacity: 0; }
.node { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative; }
.bubble { flex: none; width: 100px; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 12px 12px 12px 2px; font-size: 11px; line-height: 14px; }
.chart { flex: none; width: 84px; height: 84px; display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.chart__bars { flex: 1; display: flex; align-items: flex-end; gap: 6px; }
.chart__bar { flex: 1; border-radius: 3px 3px 0 0; background: var(--ocean); }
.chart__bar--dark { background: var(--foret); }
.fiche { flex: none; width: 108px; display: flex; flex-direction: column; gap: 5px; padding: 8px 10px; }
.fiche__title { font-size: 10px; line-height: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ocean); }
.fiche__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; line-height: 14px; }
.check { flex: none; width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--foret); }
.docs { flex: none; position: relative; width: 92px; height: 96px; }
.docs__item { position: absolute; display: flex; align-items: center; justify-content: center; }
.scan { position: absolute; left: -4px; right: -4px; top: 0; height: 2px; background: var(--violet); }
.badge { position: absolute; white-space: nowrap; padding: 2px 10px; border-radius: var(--radius-pill); font-size: 11px; line-height: 14px; font-weight: 600; }
.badge--corail { background: var(--corail); color: var(--foret); }
.badge--foret { background: var(--foret); color: var(--blanc); }
.spark { position: absolute; top: -10px; right: -10px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--corail); }
.outs { flex: none; width: 96px; display: flex; flex-direction: column; gap: 6px; }
.out { padding: 4px 10px; border-radius: var(--radius-pill); font-size: 11px; line-height: 14px; }
.out--dark { background: var(--foret); color: var(--blanc); }
.mail { flex: none; width: 112px; display: flex; flex-direction: column; gap: 5px; padding: 10px; }
.mail__line { position: relative; height: 6px; border-radius: 3px; background: var(--line); }
.hl { position: absolute; inset: -2px -3px; border-radius: 4px; background: var(--corail); }
.stepper { position: relative; width: 100%; max-width: 380px; display: flex; justify-content: space-between; }
.stepper__line { position: absolute; left: 36px; right: 36px; top: 21px; height: 2px; background: var(--line); }
.stepper__fill { position: absolute; inset: 0; background: var(--foret); }
.stepper__step { position: relative; z-index: 1; flex: none; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; line-height: 14px; text-align: center; }
.stepper__dot { position: relative; width: 44px; height: 44px; }
.stepper__dot > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.stepper__off { background: var(--blanc); border: 1px solid var(--line); }
.stepper__on { background: var(--foret); }

/* Séquence commune : un cycle de 7 s */
.fx { animation-duration: 7s; animation-iteration-count: infinite; animation-timing-function: ease-out; animation-fill-mode: both; }
.s0 { animation-name: s0; } .s1 { animation-name: s1; } .s2 { animation-name: s2; }
.s3 { animation-name: s3; } .s4 { animation-name: s4; } .s5 { animation-name: s5; }
@keyframes s0 { 0%, 2% { opacity: 0; transform: translateY(6px) scale(.92); } 8%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes s1 { 0%, 15% { opacity: 0; transform: scale(.8); } 22%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes s2 { 0%, 35% { opacity: 0; transform: scale(.8); } 42%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes s3 { 0%, 55% { opacity: 0; transform: translateY(6px) scale(.9); } 62%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes s4 { 0%, 65% { opacity: 0; transform: translateY(6px) scale(.9); } 72%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes s5 { 0%, 75% { opacity: 0; transform: translateY(6px) scale(.8); } 80% { opacity: 1; transform: scale(1.12); } 84%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.t1 { animation-name: t1; } .t2 { animation-name: t2; } .r1 { animation-name: r1; } .r2 { animation-name: r2; }
@keyframes t1 { 0%, 8% { left: 0; opacity: 0; } 10%, 24% { opacity: 1; } 26%, 100% { left: calc(100% - 10px); opacity: 0; } }
@keyframes t2 { 0%, 38% { left: 0; opacity: 0; } 40%, 54% { opacity: 1; } 56%, 100% { left: calc(100% - 10px); opacity: 0; } }
@keyframes r1 { 0%, 44% { left: calc(100% - 10px); opacity: 0; } 46%, 58% { opacity: 1; } 60%, 100% { left: 0; opacity: 0; } }
@keyframes r2 { 0%, 60% { left: calc(100% - 10px); opacity: 0; } 62%, 76% { opacity: 1; } 78%, 100% { left: 0; opacity: 0; } }
.think { animation-name: think; }
@keyframes think { 0%, 24%, 46%, 100% { box-shadow: 0 0 0 0 rgba(102, 16, 242, 0); transform: none; } 30%, 40% { box-shadow: 0 0 0 8px rgba(102, 16, 242, .22); transform: scale(1.06); } 35% { transform: scale(.97); } }
.bar { transform-origin: bottom; animation-name: bar; }
@keyframes bar { 0%, 55% { transform: scaleY(0); } 66%, 92% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.scan { animation-name: scan; }
@keyframes scan { 0%, 6% { top: 0; opacity: 0; } 8% { opacity: 1; } 24% { top: 100%; opacity: 1; } 26%, 100% { top: 100%; opacity: 0; } }
.hl { animation-name: hl; }
@keyframes hl { 0%, 8% { opacity: 0; transform: scaleX(0); } 16%, 92% { opacity: .55; transform: scaleX(1); } 100% { opacity: 0; } }
.pop { animation-name: pop; }
@keyframes pop { 0%, 10% { opacity: 0; transform: scale(0) rotate(-40deg); } 16% { opacity: 1; transform: scale(1.25) rotate(10deg); } 20%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.fill { transform-origin: left; animation-name: fill; }
@keyframes fill { 0%, 22% { transform: scaleX(0); } 42% { transform: scaleX(.333); } 62% { transform: scaleX(.666); } 80%, 92% { transform: scaleX(1); } 100% { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fx { animation: none !important; }
  .dot, .scan { display: none; }
}

/* ---------- Rendez-vous ---------- */
.cta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-7); padding: clamp(40px, 7vw, 96px); border-radius: var(--blade-alt); background: var(--foret); color: var(--blanc); }
.cta__main { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cta__title { font-size: clamp(32px, 4vw, 44px); line-height: 1.14; letter-spacing: -0.015em; }
.cta__lead { max-width: 55ch; font-size: 19px; line-height: 30px; color: var(--sauge); }
.cta__contact { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; color: var(--sauge); }
.cta__contact a { color: var(--blanc); }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: var(--section-gap); border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 24px; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.site-footer strong { color: var(--foret); }
/* Avant l'initialisation du script : n'afficher que le premier client et le premier outil */
.js .refs__clients:not(.is-ready) .client:not(:first-child),
.js .refs__clients:not(.is-ready) .tool:not(:first-child) { display: none; }
