/* =========================================================
   VISIONARY — colors_and_type.css
   Foundation tokens: brand palette + typography system
   ---------------------------------------------------------
   Brand palette is lifted directly from the Fiche de marque
   V.2026. Ratios guide usage: Crème 60% surface, Cacao 30%,
   Café noir 7%, Moka 3%.
   ========================================================= */

/* ---- Webfonts ------------------------------------------------
   Local variable-font files (one woff2 per family, full weight range).
   Display: Outfit           — warm geometric sans.
   Text:    Instrument Sans  — modern neutral, high legibility.
   Mono:    JetBrains Mono   — code samples, metadata.
   Stored under /fonts so the design system works fully offline.
--------------------------------------------------------------- */
@font-face {
  font-family: 'Outfit';
  src: url('fonts/outfit.woff2') format('woff2-variations'),
       url('fonts/outfit.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('fonts/instrument-sans.woff2') format('woff2-variations'),
       url('fonts/instrument-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono.woff2') format('woff2-variations'),
       url('fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ==========================================================
     COLORS — Brand palette
     ========================================================== */
  --cacao:       #4E3321;  /* signature — logo, titles, CTA, borders (60% usage) */
  --creme:       #F1E6CE;  /* surface — main background, breathing room (30%) */
  --cafe-noir:   #2E1E12;  /* text dense — maximum contrast (7%) */
  --moka:        #8B6B4A;  /* accent — subtitles, metadata (3%) */

  /* Tonal steps derived from the palette (oklch harmonious) */
  --creme-50:    #FBF7EC;  /* lightest surface, hover-lift */
  --creme-100:   #F7F0DC;
  --creme-200:   #F1E6CE;  /* = creme (base) */
  --creme-300:   #E6D7B2;
  --creme-400:   #D4BF8E;

  --moka-300:    #B39070;
  --moka-400:    #9C7C5D;
  --moka-500:    #8B6B4A;  /* = moka (base) */
  --moka-600:    #71563A;
  --moka-700:    #5E482F;

  --cacao-400:   #6B4A30;
  --cacao-500:   #5B3D27;
  --cacao-600:   #4E3321;  /* = cacao (base) */
  --cacao-700:   #3E2819;
  --cacao-800:   #2E1E12;  /* = cafe-noir */

  /* ==========================================================
     SEMANTIC — foreground & surface
     ========================================================== */
  --bg:          var(--creme);
  --bg-raised:   var(--creme-50);
  --bg-sunk:     var(--creme-300);
  --bg-inverse:  var(--cacao);

  --fg:          var(--cafe-noir);
  --fg-1:        var(--cafe-noir);   /* primary text */
  --fg-2:        var(--cacao);       /* secondary — titles */
  --fg-3:        var(--moka);        /* tertiary — metadata, captions */
  --fg-on-cacao: var(--creme);       /* text on dark */
  --fg-on-moka:  var(--creme);

  --border:      color-mix(in oklch, var(--cacao) 18%, transparent);
  --border-strong: var(--cacao);
  --border-hair: color-mix(in oklch, var(--cacao) 10%, transparent);

  --accent:      var(--cacao);
  --accent-hover:var(--cacao-700);
  --accent-press:var(--cacao-800);

  /* Status (tinted to stay in warm family) */
  --success:     #5F7A3E;
  --warning:     #B8863A;
  --danger:      #A04A2E;

  /* ==========================================================
     TYPOGRAPHY — families
     ========================================================== */
  --font-display: 'Outfit', ui-sans-serif, system-ui, sans-serif;
  --font-text:    'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Type scale — modular, 1.25 minor third on display */
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   20px;
  --fs-xl:   24px;
  --fs-2xl:  32px;
  --fs-3xl:  44px;
  --fs-4xl:  60px;
  --fs-5xl:  80px;
  --fs-6xl:  104px;

  /* Line heights */
  --lh-tight:  1.04;
  --lh-snug:   1.18;
  --lh-normal: 1.45;
  --lh-loose:  1.65;

  /* Tracking — the brand uses wide tracking on small caps eyebrows */
  --tr-tight:   -0.02em;
  --tr-normal:  0;
  --tr-wide:    0.06em;
  --tr-wider:   0.18em;   /* section eyebrows "F I C H E D E M A R Q U E" */
  --tr-widest:  0.32em;   /* page labels */

  /* Weights */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-black:    800;

  /* ==========================================================
     SPACING — 4px base
     ========================================================== */
  --sp-0:  0;
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* ==========================================================
     RADII — sparse. The brand is squared / documentary.
     ========================================================== */
  --r-none: 0;
  --r-xs:   2px;
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   14px;
  --r-xl:   22px;
  --r-full: 999px;

  /* ==========================================================
     SHADOWS — soft, warm-tinted (cacao-based)
     ========================================================== */
  --sh-xs: 0 1px 0 0 color-mix(in oklch, var(--cacao) 10%, transparent);
  --sh-sm: 0 1px 2px 0 color-mix(in oklch, var(--cacao) 14%, transparent);
  --sh-md: 0 4px 12px -2px color-mix(in oklch, var(--cacao) 16%, transparent),
           0 2px 4px -1px color-mix(in oklch, var(--cacao) 10%, transparent);
  --sh-lg: 0 16px 32px -8px color-mix(in oklch, var(--cacao) 22%, transparent),
           0 4px 8px -2px color-mix(in oklch, var(--cacao) 10%, transparent);
  --sh-xl: 0 32px 56px -12px color-mix(in oklch, var(--cacao) 28%, transparent),
           0 8px 16px -4px color-mix(in oklch, var(--cacao) 14%, transparent);
  --sh-inner: inset 0 1px 0 0 color-mix(in oklch, #fff 40%, transparent);

  /* ==========================================================
     MOTION — subtle, crafted. No bounces.
     ========================================================== */
  --ease-out:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in:     cubic-bezier(0.42, 0, 0.58, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:    140ms;
  --dur-base:    240ms;
  --dur-slow:    420ms;

  /* Layout */
  --container:   1240px;
  --container-narrow: 880px;
}

/* =========================================================
   SEMANTIC TEXT STYLES
   Use these directly on real elements (h1, p, etc).
   ========================================================= */

html { background: var(--bg); color: var(--fg-1); font-family: var(--font-text); font-size: var(--fs-base); line-height: var(--lh-normal); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body { overflow-x: hidden; }

/* Display — hero titles. Tight, confident, minus-tracked. */
.t-display, h1.hero {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: clamp(48px, 8vw, var(--fs-6xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  color: var(--fg-2);
}

/* H1 — section titles */
h1, .t-h1 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  color: var(--fg-2);
}

/* H2 */
h2, .t-h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-3xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  color: var(--fg-2);
}

/* H3 */
h3, .t-h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-normal);
  color: var(--fg-2);
}

/* H4 */
h4, .t-h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  color: var(--fg-2);
}

/* Eyebrow — the signature "F I C H E  D E  M A R Q U E" treatment */
.t-eyebrow {
  font-family: var(--font-text);
  font-weight: var(--fw-medium);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tr-wider);
  color: var(--fg-3);
}

/* Eyebrow large — section dividers like "PRINCIPES DE MARQUE 01" */
.t-eyebrow-lg {
  font-family: var(--font-text);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: var(--tr-wider);
  color: var(--fg-2);
}

/* Lede — intro paragraph */
.t-lede {
  font-family: var(--font-text);
  font-weight: var(--fw-regular);
  font-size: var(--fs-lg);
  line-height: var(--lh-loose);
  color: var(--fg-1);
  max-width: 60ch;
}

/* Body */
p, .t-body {
  font-family: var(--font-text);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--fg-1);
}

/* Small / meta */
.t-meta, small {
  font-family: var(--font-text);
  font-size: var(--fs-sm);
  color: var(--fg-3);
  line-height: var(--lh-normal);
}

/* Label — for numbered items "01", "02" — geometric, confident */
.t-label {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-xl);
  letter-spacing: var(--tr-wide);
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}

/* Mono / code */
code, kbd, pre, .t-mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--fg-2);
}

/* Link */
a { color: var(--cacao); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--cacao-800); }

/* =========================================================
   COMPONENTS — réutilisables sur toutes les pages
   ========================================================= */

/* Lead capture form — embarqué inline dans articles ou pages outils */
.lead-form {
  margin: 40px auto;
  padding: 32px;
  background: var(--cacao);
  color: var(--creme);
  border-radius: var(--r-md);
  position: relative;
}
.lead-form-light {
  background: var(--creme-50);
  color: var(--fg-1);
  border: 1px solid var(--border);
  box-shadow: var(--sh-md);
}
.lead-form .lf-eyebrow {
  font-family: var(--font-text);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: color-mix(in oklch, var(--moka) 60%, var(--creme));
  margin: 0 0 10px;
}
.lead-form-light .lf-eyebrow { color: var(--moka); }
.lead-form .lf-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.015em;
  color: var(--creme);
  line-height: 1.2;
}
.lead-form-light .lf-title { color: var(--cacao); }
.lead-form .lf-lede {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.55;
  color: color-mix(in oklch, var(--creme) 80%, transparent);
}
.lead-form-light .lf-lede { color: var(--fg-1); }
.lead-form .lf-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}
@media (max-width: 640px) {
  .lead-form .lf-fields { grid-template-columns: 1fr; }
}
.lead-form input[type="email"],
.lead-form input[type="text"],
.lead-form input[type="url"],
.lead-form textarea,
.lead-form select {
  font-family: var(--font-text);
  font-size: 15px;
  padding: 12px 14px;
  background: color-mix(in oklch, var(--creme) 14%, transparent);
  color: var(--creme);
  border: 1px solid color-mix(in oklch, var(--creme) 24%, transparent);
  border-radius: var(--r-sm);
  width: 100%;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.lead-form-light input[type="email"],
.lead-form-light input[type="text"],
.lead-form-light input[type="url"],
.lead-form-light textarea,
.lead-form-light select {
  background: #fff;
  color: var(--fg-1);
  border-color: var(--border);
}
.lead-form input::placeholder, .lead-form textarea::placeholder {
  color: color-mix(in oklch, var(--creme) 50%, transparent);
}
.lead-form-light input::placeholder, .lead-form-light textarea::placeholder {
  color: var(--moka);
}
.lead-form input:focus, .lead-form textarea:focus, .lead-form select:focus {
  border-color: var(--creme);
  background: color-mix(in oklch, var(--creme) 22%, transparent);
}
.lead-form-light input:focus, .lead-form-light textarea:focus, .lead-form-light select:focus {
  border-color: var(--cacao);
  background: #fff;
}
.lead-form textarea { min-height: 90px; resize: vertical; }
.lead-form button[type="submit"] {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 15px;
  padding: 12px 22px;
  background: var(--creme);
  color: var(--cacao);
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.lead-form button[type="submit"]:hover { background: #fff; transform: translateY(-1px); }
.lead-form-light button[type="submit"] { background: var(--cacao); color: var(--creme); }
.lead-form-light button[type="submit"]:hover { background: var(--cacao-700); }
.lead-form button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.lead-form .lf-consent {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.45;
  color: color-mix(in oklch, var(--creme) 70%, transparent);
}
.lead-form-light .lf-consent { color: var(--moka); }
.lead-form .lf-consent input { margin-top: 2px; flex-shrink: 0; accent-color: var(--cacao); }
.lead-form .lf-consent a { color: inherit; text-underline-offset: 3px; }
.lead-form .lf-status {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  display: none;
}
.lead-form .lf-status.success {
  display: block;
  padding: 14px 16px;
  background: color-mix(in oklch, var(--success) 18%, transparent);
  border: 1px solid color-mix(in oklch, var(--success) 40%, transparent);
  border-radius: var(--r-sm);
  color: var(--creme);
}
.lead-form-light .lf-status.success {
  background: color-mix(in oklch, var(--success) 8%, transparent);
  color: var(--success);
}
.lead-form .lf-status.error {
  display: block;
  color: color-mix(in oklch, var(--danger) 70%, var(--creme));
}
.lead-form-light .lf-status.error { color: var(--danger); }
.lead-form .lf-status a {
  color: inherit;
  font-weight: 600;
}

/* Honeypot anti-bot, invisible */
.lf-honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* TL;DR — réutilise .key-takeaways de blog/article.css mais version standalone */
.tldr {
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--creme-50);
  border: 1px solid var(--border);
  border-left: 4px solid var(--cacao);
  border-radius: var(--r-sm);
}
.tldr-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moka);
  margin: 0 0 10px;
}
.tldr p, .tldr ul {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}
.tldr ul { padding-left: 22px; }
.tldr li { margin-bottom: 6px; }
.tldr strong { color: var(--cacao); font-weight: 600; }

/* Bloc FAQ stylé — alternative aux <h2>FAQ + paragraphes */
.faq-block { margin: 48px 0; }
.faq-block h2 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.015em;
  color: var(--cacao);
}
.faq-item {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.005em;
  color: var(--cacao);
  list-style: none;
  position: relative;
  padding-right: 32px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: -2px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--moka);
  transition: transform var(--dur-fast) var(--ease-out);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { padding-bottom: 12px; }
.faq-item .faq-answer {
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-1);
}
.faq-item .faq-answer p { margin: 0 0 10px; }
.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* Bandeau "Mis à jour le ..." en haut d'article */
.article-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--moka);
  background: var(--creme-50);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 4px 12px;
  margin-bottom: 16px;
}
.article-updated::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
}

/* Banner CTA outil interactif (intégré en haut d'article) */
.tool-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 32px;
  padding: 16px 22px;
  background: linear-gradient(135deg, var(--cacao) 0%, var(--cacao-700) 100%);
  color: var(--creme);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.tool-banner:hover { transform: translateY(-1px); box-shadow: var(--sh-lg); color: var(--creme); }
.tool-banner-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: grid; place-items: center;
  background: color-mix(in oklch, var(--creme) 14%, transparent);
  border: 1px solid color-mix(in oklch, var(--creme) 22%, transparent);
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 18px;
}
.tool-banner-text { flex: 1; }
.tool-banner-eyebrow {
  font-family: var(--font-text);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: color-mix(in oklch, var(--moka) 60%, var(--creme));
  margin: 0 0 4px;
}
.tool-banner-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  margin: 0;
  line-height: 1.2;
  color: var(--creme);
}
.tool-banner-arrow {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--creme);
  transition: transform var(--dur-fast) var(--ease-out);
}
.tool-banner:hover .tool-banner-arrow { transform: translateX(4px); }
@media (max-width: 560px) {
  .tool-banner { padding: 14px 16px; }
  .tool-banner-icon { width: 36px; height: 36px; }
  .tool-banner-title { font-size: 15px; }
}

/* ============================================================
   Nav CTA — long/short label switch (responsive)
   ============================================================ */
.nav-cta-long { display: inline; }
.nav-cta-short { display: none; }
@media (max-width: 720px) {
  .nav-cta-long { display: none; }
  .nav-cta-short { display: inline; }
}
