/* ==========================================================================
   Koova — fondations : couleurs, typographie, mise en page, utilitaires
   Palette « atelier + plan technique » : papier chaud, encre bleu nuit, bleu outremer, orange signal.
   ========================================================================== */

/* Polices de secours aux mêmes proportions que les polices du site (mesurées) : le texte ne « saute » pas
   quand les polices web finissent de se charger. */
@font-face { font-family: 'Bricolage Fallback'; src: local('Arial'), local('ArialMT'); font-weight: 100 600; size-adjust: 95.25%; ascent-override: 97.63%; descent-override: 28.35%; line-gap-override: 0%; }
@font-face { font-family: 'Bricolage Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 700 900; size-adjust: 92.58%; ascent-override: 100.46%; descent-override: 29.16%; line-gap-override: 0%; }
@font-face { font-family: 'Inter Fallback'; src: local('Arial'), local('ArialMT'); font-weight: 100 550; size-adjust: 106.99%; ascent-override: 90.66%; descent-override: 22.43%; line-gap-override: 0%; }
@font-face { font-family: 'Inter Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 551 900; size-adjust: 101.4%; ascent-override: 95.6%; descent-override: 23.6%; line-gap-override: 0%; }
@font-face { font-family: 'Serif Fallback'; src: local('Times New Roman Italic'), local('TimesNewRomanPS-ItalicMT'); font-style: italic; size-adjust: 87.37%; ascent-override: 113.31%; descent-override: 35.48%; line-gap-override: 0%; }

:root {
  --paper: #f6f3ec;
  --paper-2: #eee8da;
  --paper-3: #e5dfd0;
  --card: #fffdf8;
  --white: #fff;
  --ink: #0d1220;
  --ink-2: #1a2138;
  --ink-3: #2b3452;
  --muted: #566076;
  --muted-2: #5f6981;
  --line: rgba(13, 18, 32, .11);
  --line-2: rgba(13, 18, 32, .2);
  --line-inv: rgba(255, 255, 255, .14);

  --blue: #2b39f5;
  --blue-2: #1d29cf;
  --blue-soft: #e8eaff;
  --orange: #ff5a1f;
  --orange-2: #ff7a45;
  --orange-d: #dd4310;               /* orange lisible sur fond clair (texte de titres) */
  --orange-soft: #ffe7dc;
  --mint: #0ea77a;
  --mint-soft: #d8f4e9;
  --sun: #ffc93c;
  --rose: #ff6f86;
  --danger: #c8321f;

  --ff-head: 'Bricolage Grotesque', 'Bricolage Fallback', 'Segoe UI', system-ui, sans-serif;
  --ff: 'Inter', 'Inter Fallback', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --ff-serif: 'Instrument Serif', 'Serif Fallback', Georgia, 'Times New Roman', serif;
  --ff-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;

  --r-xs: 8px;
  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;
  --r-xl: 36px;

  --sh-1: 0 1px 2px rgba(13, 18, 32, .06), 0 1px 1px rgba(13, 18, 32, .04);
  --sh-2: 0 10px 26px -10px rgba(13, 18, 32, .22), 0 2px 6px rgba(13, 18, 32, .06);
  --sh-3: 0 40px 70px -28px rgba(13, 18, 32, .42), 0 14px 28px -14px rgba(13, 18, 32, .2);

  --wrap: 1200px;
  --gut: clamp(1.1rem, 4vw, 2rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hdr-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; font-family: var(--ff); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg, video, canvas { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration-color: rgba(13, 18, 32, .3); text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
::selection { background: var(--orange); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: var(--orange-2); }
[hidden] { display: none !important; }
table { border-collapse: collapse; }

/* ---------- titres ---------- */
h1, h2, h3, h4 { font-family: var(--ff-head); font-weight: 700; letter-spacing: -.025em; line-height: 1.06; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
h2 { font-size: clamp(2.05rem, 4.4vw, 3.5rem); letter-spacing: -.035em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.2; letter-spacing: -.018em; }
h4 { font-size: 1.05rem; line-height: 1.3; letter-spacing: -.01em; }
h1 em, h2 em, h3 em, .serif { font-family: var(--ff-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; font-size: 1.08em; }
h1 em, h2 em { color: var(--orange-d); }
.on-dark h1 em, .on-dark h2 em { color: var(--orange-2); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.32rem); line-height: 1.55; color: var(--muted); max-width: 40em; }
.on-dark .lead { color: #b9c0d3; }
.small { font-size: .9rem; } .tiny { font-size: .8rem; }
.muted { color: var(--muted); } .on-dark .muted { color: #aab2c6; }
.center { text-align: center; } .center .lead { margin-inline: auto; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--ff-mono); }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font: 700 .76rem/1 var(--ff-head); letter-spacing: .15em; text-transform: uppercase; color: var(--blue); margin-bottom: 1.1rem; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; border-radius: 2px; }
.on-dark .eyebrow { color: var(--orange-2); }
.center .eyebrow { justify-content: center; }

/* ---------- mise en page ---------- */
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
.wrap-s { width: min(100% - 2 * var(--gut), 820px); margin-inline: auto; }
.wrap-m { width: min(100% - 2 * var(--gut), 980px); margin-inline: auto; }
.sec { padding: clamp(4.5rem, 9vw, 8rem) 0; position: relative; }
.sec-tight { padding: clamp(3rem, 6vw, 5rem) 0; }
.sec-paper2 { background: var(--paper-2); }
.sec-dark { background: var(--ink); color: #f2f0e9; }
.sec-blue { background: var(--blue); color: #fff; }
.sec-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.4rem); }
.sec-head.center { margin-inline: auto; }
.sec-head h2 { margin-bottom: .4em; }
.sec-head .lead { margin: 0; }
.center .lead { margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.row-between { justify-content: space-between; }
.grid { display: grid; gap: 1.2rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 200; background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 10px; text-decoration: none; transition: top .2s; }
.skip:focus { top: 1rem; }

/* fonds décoratifs */
.blueprint { position: relative; }
.blueprint::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background-image: linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 25%, transparent 78%); mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 25%, transparent 78%);
}
.blueprint-light::before { background-image: linear-gradient(rgba(13, 18, 32, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(13, 18, 32, .05) 1px, transparent 1px); }
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* apparition au défilement (uniquement si JavaScript est actif) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0ms); }
@media (max-width: 760px) { .grain::after { display: none; } }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-l { transform: translateX(-30px); } .js .reveal-r { transform: translateX(30px); }
.js .reveal-l.in, .js .reveal-r.in { transform: none; }

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .hide-s { display: none !important; }
}
@media (min-width: 641px) { .only-s { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
