/* =========================================================
   Génération IA Entreprise - Design System
   Tokens, atoms, layout primitives, components
   ========================================================= */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, picture, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ---------- TOKENS ---------- */
:root {
  /* Color - Génération IA Entreprise (Letter theme) */
  --ink:           #1A1A1A;            /* near-black */
  --ink-2:         #2e2e2e;            /* secondary text */
  --ink-3:         #5D5B59;            /* muted text / dividers */
  --ink-4:         #8a8783;            /* very muted */
  --rule:          #ebe5d6;            /* hairline rules / dividers */
  --rule-strong:   #d6cfb8;
  --surface-a:     #FAF5EC;            /* primary cream */
  --surface-b:     #f3eee3;            /* secondary - soft layered cream */
  --surface-c:     #ebe4d2;            /* tertiary - slightly warmer for callouts */
  --surface-ink:   #1A1A1A;            /* dark surface */
  --on-ink:        #FAF5EC;            /* text on dark */

  /* Accent - bordeaux (interactive) */
  --accent:        #6A1F2B;
  --accent-soft:   #d9b8be;
  --accent-deep:   #4d141d;

  /* Decorative - jaune moutarde */
  --decorative:    #F2C13C;
  --on-decorative: #1A1A1A;

  /* Secondary accent - encre */
  --ink-blue:      #1f3a5c;

  /* Semantic */
  --success:       #2f6b3d;
  --warning:       #b87a1a;
  --danger:        #a8331f;

  /* Type */
  --font-display:  'Newsreader', 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale - fluid via clamp(min, preferred, max).
     Each step interpolates between mobile (≤375px viewport) and desktop (≥1280px). */
  --fs-xs:   12px;                                          /* fixed: micro */
  --fs-sm:   13px;                                          /* fixed: meta */
  --fs-base: clamp(15px, 0.9375rem + 0.1vw, 16px);          /* body */
  --fs-md:   clamp(16px, 0.9375rem + 0.3vw, 18px);          /* lead body */
  --fs-lg:   clamp(18px, 1.05rem + 0.45vw, 21px);           /* large body / lead */
  --fs-xl:   clamp(20px, 1.1rem + 0.85vw, 26px);            /* card / subsection */
  --fs-2xl:  clamp(24px, 1.25rem + 1.6vw, 34px);            /* h3 */
  --fs-3xl:  clamp(30px, 1.5rem + 2.6vw, 44px);             /* h2 */
  --fs-4xl:  clamp(36px, 1.75rem + 3.6vw, 56px);            /* big h2 / hero small */
  --fs-5xl:  clamp(42px, 2rem + 5vw, 72px);                 /* hero / display */

  /* Space - small steps fixed for precision; large steps fluid for section rhythm. */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  clamp(32px, 1.5rem + 2vw, 48px);                  /* section gutter */
  --s-8:  clamp(40px, 1.75rem + 3vw, 64px);                 /* section padding */
  --s-9:  clamp(56px, 2.5rem + 4.5vw, 96px);                /* big section padding */
  --s-10: clamp(72px, 3rem + 7vw, 128px);                   /* hero padding */

  /* Radius */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(26,26,26,0.04), 0 0 0 1px rgba(26,26,26,0.04);
  --shadow-md: 0 4px 14px rgba(26,26,26,0.06), 0 0 0 1px rgba(26,26,26,0.04);
  --shadow-lg: 0 12px 32px rgba(26,26,26,0.08), 0 0 0 1px rgba(26,26,26,0.04);

  /* Layout */
  --container-sm: 720px;
  --container-md: 960px;
  --container-lg: 1120px;
  --container-xl: 1280px;
}

/* ---------- BASE ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--surface-a);
}

.font-display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
.font-mono { font-family: var(--font-mono); }
.italic { font-style: italic; }

/* ---------- LAYOUT PRIMITIVES ---------- */
.container-sm, .container-md, .container-lg, .container-xl {
  width: 100%;
  margin: 0 auto;
  padding-inline: var(--s-5);
}
.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-xl { max-width: var(--container-xl); }

@media (min-width: 768px) {
  .container-sm, .container-md, .container-lg, .container-xl { padding-inline: var(--s-7); }
}

.bg-surface-a { background: var(--surface-a); }
.bg-surface-b { background: var(--surface-b); }
.bg-surface-c { background: var(--surface-c); }
.bg-ink { background: var(--surface-ink); color: var(--on-ink); }
.bg-ink .font-display { color: var(--on-ink); }

.section-content { padding-block: var(--s-7); }
.section-content-lg { padding-block: var(--s-9); }
.section-hero { padding-block: var(--s-7) var(--s-5); }
.section-divider { padding-block: var(--s-6); }

/* First content section after hero gets reduced top padding to avoid double-gap */
.section-hero + .section-content { padding-top: var(--s-5); }

@media (min-width: 768px) {
  .section-content { padding-block: var(--s-8); }
  .section-content-lg { padding-block: var(--s-10); }
  .section-hero { padding-block: var(--s-8) var(--s-5); }
  .section-hero + .section-content { padding-top: var(--s-6); }
}

/* ---------- PROSE ---------- */
.prose { font-size: var(--fs-md); line-height: 1.7; color: var(--ink-2); max-width: 75ch; }
.prose-sm { font-size: var(--fs-base); line-height: 1.65; }
.prose p + p,
.prose ul + p, .prose p + ul,
.prose p + table, .prose table + p { margin-top: 1em; }
.prose ul { padding-left: 1.2em; }
.prose ul li + li { margin-top: 0.4em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-deep); }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: var(--s-5); font-style: italic; color: var(--ink-2); }
.prose table { font-size: var(--fs-sm); }
.prose table th, .prose table td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose table th { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-base); color: var(--ink); border-bottom-color: var(--rule-strong); }
.prose table tbody tr:last-child td { border-bottom: 0; }

/* ---------- TYPOGRAPHY ---------- */
.hero-title { font-size: clamp(40px, 7vw, var(--fs-5xl)); line-height: 1.05; letter-spacing: -0.02em; max-width: 18ch; }
.hero-title em { font-style: normal; color: var(--accent); }
.section-heading { font-size: clamp(28px, 4vw, var(--fs-3xl)); line-height: 1.15; letter-spacing: -0.015em; margin-bottom: var(--s-5); max-width: 22ch; }
.subsection-heading { font-size: var(--fs-2xl); line-height: 1.2; letter-spacing: -0.01em; margin-bottom: var(--s-4); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: var(--s-3);
}
.cta-heading { font-size: var(--fs-2xl); margin-bottom: var(--s-4); }

/* ---------- DIVIDERS ---------- */
.divider-line {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.divider-hr { flex: 1; height: 1px; background: var(--rule-strong); }
.divider-text {
  font-size: var(--fs-md);
  color: var(--ink-3);
  white-space: nowrap;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}
.chapter-break { padding-block: var(--s-8); text-align: center; }
.chapter-rule { border: 0; height: 1px; background: var(--rule-strong); max-width: 80px; margin: 0 auto var(--s-4); }
.chapter-label {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

/* ---------- BUTTONS ---------- */
/* Primary "CTA" - square bordeaux block with moutarde corner accent */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-6);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  background: var(--accent);
  color: var(--on-ink);
  border: 0;
  transition: transform 200ms ease, background 200ms;
  cursor: pointer;
}
.btn::after {
  content: '';
  position: absolute;
  bottom: -4px; right: -4px;
  width: 12px; height: 12px;
  background: var(--decorative);
}
.btn:hover { transform: scale(1.04) rotate(-1deg); }

.btn-primary { background: var(--accent); color: var(--on-ink); }
.btn-primary:hover { background: var(--accent-deep); }

.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { background: #000; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost::after { display: none; }
.btn-ghost:hover { background: var(--ink); color: var(--on-ink); transform: none; }

.btn-link {
  padding: 0;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
  font-size: var(--fs-base);
}
.btn-link::after { display: none; }
.btn-link:hover { color: var(--accent); border-color: var(--accent); transform: none; }

.btn-sm { padding: var(--s-3) var(--s-5); font-size: var(--fs-xs); }
.btn-lg { padding: var(--s-5) var(--s-7); font-size: var(--fs-base); }
.btn .arrow { display: inline-block; transition: transform 160ms; }
.btn:hover .arrow { transform: translateX(2px); }

/* ---------- BADGES & TAGS ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface-c);
  color: var(--ink-2);
}
.badge-ink { background: var(--ink); color: var(--on-ink); }
.badge-accent { background: var(--accent-soft); color: var(--accent-deep); }
.badge-decorative { background: var(--decorative); color: var(--on-decorative); }
.badge-outline { background: transparent; border: 1px solid var(--rule-strong); color: var(--ink-2); }
.badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Square tag (matches source card-tag) */
.tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 0;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--decorative);
  color: var(--on-decorative);
  border: 0;
  font-family: var(--font-body);
}
.tag-mono { font-family: var(--font-mono); font-weight: 400; background: var(--surface-b); color: var(--ink-2); border: 1px solid var(--rule); text-transform: none; letter-spacing: 0; }

/* ---------- FORMS ---------- */
.input, .textarea, .select {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  background: var(--surface-a);
  font-size: var(--fs-base);
  color: var(--ink);
  transition: border-color 160ms, box-shadow 160ms;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(106, 31, 43, 0.15);
}
.textarea { min-height: 120px; resize: vertical; font-family: inherit; }
.label { display: block; font-size: var(--fs-sm); font-weight: 500; color: var(--ink); margin-bottom: var(--s-2); }
.help-text { font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--s-2); }
.field { margin-bottom: var(--s-5); }

/* ---------- NAV ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink);
  border-bottom: 0;
}
.nav-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  text-decoration: none;
  color: var(--on-ink);
  letter-spacing: -0.01em;
  transition: letter-spacing 300ms;
}
.nav-logo:hover { letter-spacing: 0.02em; }
.nav-links {
  display: none;
  gap: var(--s-6);
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: rgba(250, 245, 236, 0.7);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: color 160ms;
}
.nav-links a:hover { color: var(--on-ink); }
.nav-links a.active { color: var(--on-ink); }

/* Mobile hamburger button - visible <768px only */
.nav-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  background: transparent;
  border: 0;
  color: var(--on-ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-burger:focus-visible { outline: 2px solid var(--decorative); outline-offset: -4px; }
.nav-burger-icon {
  position: relative;
  width: 22px;
  height: 14px;
}
.nav-burger-icon::before,
.nav-burger-icon::after,
.nav-burger-icon span {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 220ms ease, top 180ms ease 60ms, opacity 100ms ease;
}
.nav-burger-icon::before { top: 0; }
.nav-burger-icon span { top: 6.25px; }
.nav-burger-icon::after { top: 12.5px; }
.navbar.is-open .nav-burger-icon::before { top: 6.25px; transform: rotate(45deg); transition: top 180ms ease, transform 220ms ease 80ms; }
.navbar.is-open .nav-burger-icon::after  { top: 6.25px; transform: rotate(-45deg); transition: top 180ms ease, transform 220ms ease 80ms; }
.navbar.is-open .nav-burger-icon span    { opacity: 0; }

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  inset: 56px 0 0 0;          /* below navbar height ≈56px */
  background: var(--ink);
  z-index: 49;
  padding: var(--s-6) var(--s-5) var(--s-7);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, transform 240ms ease, visibility 0s linear 240ms;
  overflow-y: auto;
}
.navbar.is-open .nav-drawer {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms ease, transform 260ms ease, visibility 0s;
}
.nav-drawer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav-drawer li {
  border-bottom: 1px solid rgba(250, 245, 236, 0.08);
}
.nav-drawer a {
  display: block;
  padding: var(--s-4) 0;
  text-decoration: none;
  color: rgba(250, 245, 236, 0.92);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  letter-spacing: -0.01em;
  min-height: 44px;
}
.nav-drawer a:hover,
.nav-drawer a:active { color: var(--decorative); }
.nav-drawer .nav-drawer-cta {
  margin-top: var(--s-6);
}

@media (min-width: 768px) {
  .nav-inner { padding: var(--s-4) var(--s-7); }
  .nav-links { display: flex; }
  .nav-burger { display: none; }
  .nav-drawer { display: none; }
}

/* Lock body scroll when drawer open (set via JS) */
body.nav-locked { overflow: hidden; }

/* Context label on right side of navbar (proposition page) - truncates on narrow */
.nav-context {
  color: rgba(250, 245, 236, 0.7);
  font-size: var(--fs-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
@media (max-width: 479px) {
  .nav-context { display: none; }
}

/* ---------- CARDS ---------- */
.card-grid { display: grid; gap: var(--s-5); }
.card-grid-2 { grid-template-columns: 1fr; }
.card-grid-3 { grid-template-columns: 1fr; }
.card-grid-4 { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .card-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  padding: var(--s-6);
  background: var(--card-bg, #fff);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
}
.card-elev { box-shadow: var(--shadow-sm); border-color: transparent; background: #fff; }
.card-bare { padding: 0; border: 0; background: transparent; }
.card-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 8px;
  margin-bottom: var(--s-3);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--decorative);
  color: var(--on-decorative);
}
.card-title { font-size: var(--fs-xl); line-height: 1.25; margin-bottom: var(--s-3); }
.card-num {
  display: inline-flex;
  font-family: var(--font-display);
  font-style: normal;
  font-size: var(--fs-2xl);
  color: var(--accent);
  margin-bottom: var(--s-3);
}

/* ---------- CARD VARIANTS (3-col content cards) ---------- */

/* Bordeaux tag - variant of .card-tag for diagnostic / weighted blocks */
.card-tag-bordeaux {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  margin-bottom: var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  border-radius: 2px;
}

/* ---------- OFFER CARD (level / pricing) ---------- */
.offer {
  display: flex;
  flex-direction: column;
  padding: var(--s-7);
  background: var(--surface-a);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  height: 100%;
}
.offer-featured {
  background: var(--surface-ink);
  color: var(--on-ink);
  border-color: var(--surface-ink);
  position: relative;
}
.offer-featured .offer-price,
.offer-featured .offer-title { color: var(--on-ink); }
.offer-featured .offer-feat { color: rgba(250,245,236,0.85); }
.offer-featured .offer-feat::before { color: var(--accent); }
.offer-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.offer-featured .offer-eyebrow { color: var(--accent-soft); }
.offer-title { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.25; margin-bottom: var(--s-3); }
.offer-pitch { color: var(--ink-2); font-size: var(--fs-base); margin-bottom: var(--s-5); min-height: 3em; }
.offer-featured .offer-pitch { color: rgba(250,245,236,0.78); }
.offer-price {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  line-height: 1;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-2);
}
.offer-price-suffix { font-size: var(--fs-base); color: var(--ink-3); font-family: var(--font-body); margin-left: 4px; }
.offer-featured .offer-price-suffix { color: rgba(250,245,236,0.6); }
.offer-price-note { font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: var(--s-5); }
.offer-featured .offer-price-note { color: rgba(250,245,236,0.6); }
.offer-feats { list-style: none; padding: 0; margin: 0 0 var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); }
.offer-feat {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--ink-2);
  padding-left: 22px;
  position: relative;
}
.offer-feat::before {
  content: '→';
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  color: var(--accent);
}
.offer .btn { margin-top: auto; justify-content: center; width: 100%; }
.offer-flag {
  position: absolute;
  top: var(--s-4); right: var(--s-4);
  background: var(--accent);
  color: var(--on-ink);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- TIMELINE ---------- */
.timeline {
  position: relative;
  padding-left: var(--s-7);
  display: flex;
  flex-direction: column;
  gap: var(--s-7);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 11px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--rule-strong);
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--s-7) + 4px);
  top: 6px;
  width: 14px; height: 14px;
  background: var(--surface-a);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.timeline-item.is-current::before { background: var(--accent); border-color: var(--accent); }
.timeline-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-bottom: var(--s-2);
}
.timeline-title { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.3; margin-bottom: var(--s-3); }
.timeline-body { color: var(--ink-2); font-size: var(--fs-base); line-height: 1.6; }

/* Horizontal timeline */
.timeline-h {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-5);
  position: relative;
}
.timeline-h::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 7px;
  height: 1px;
  background: var(--rule-strong);
}
.timeline-h-item { position: relative; padding-top: var(--s-5); }
.timeline-h-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 14px; height: 14px;
  background: var(--surface-a);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

/* ---------- STEPS (numbered) ---------- */
.steps {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
  counter-reset: stepc;
}
@media (min-width: 720px) { .steps-3 { grid-template-columns: repeat(3, 1fr); } .steps-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps-4 { grid-template-columns: repeat(4, 1fr); } }
.step {
  border-top: 1px solid var(--rule-strong);
  padding-top: var(--s-5);
  counter-increment: stepc;
}
.step::before {
  content: counter(stepc, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-size: var(--fs-xl);
  color: var(--accent);
  margin-bottom: var(--s-3);
}
.step-title { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.3; margin-bottom: var(--s-3); }
.step-body { font-size: var(--fs-sm); line-height: 1.6; color: var(--ink-2); }

/* ---------- PROBLEM / SOLUTION (Ça vous parle ?) ---------- */
.ps-block { padding-block: var(--s-7); border-top: 1px solid var(--rule); }
.ps-block:first-of-type { border-top: 0; }
.ps-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  margin-bottom: var(--s-3);
}
.ps-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, var(--fs-2xl));
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-5);
  max-width: 24ch;
}

/* ---------- STATS ---------- */
.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}
@media (min-width: 720px) { .stats-3 { grid-template-columns: repeat(3, 1fr); } .stats-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stats-4 { grid-template-columns: repeat(4, 1fr); } }
.stat { border-top: 1px solid var(--rule-strong); padding-top: var(--s-4); }
.stat-num { font-family: var(--font-display); font-size: clamp(40px, 5vw, var(--fs-4xl)); line-height: 1; letter-spacing: -0.02em; margin-bottom: var(--s-2); }
.stat-num em { font-style: normal; color: var(--accent); }
.stat-label { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.5; max-width: 28ch; }

/* ---------- TEAM ---------- */
.team-list { display: flex; flex-direction: column; gap: var(--s-6); }
.team-row { display: flex; gap: var(--s-5); align-items: flex-start; }
.team-photo-small { width: 96px; height: 96px; border-radius: var(--r-md); object-fit: cover; flex-shrink: 0; background: var(--surface-c); }
.team-photo-circle { border-radius: 50%; }
.team-name { font-size: var(--fs-md); }
.team-title { font-size: var(--fs-sm); color: var(--ink-3); }
.team-bio { margin-top: var(--s-3); }

/* Team grid card variant */
.team-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
.team-card { display: flex; flex-direction: column; gap: var(--s-3); }
.team-card .team-photo {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--r-md); background: var(--surface-c);
}

/* ---------- TESTIMONIALS ---------- */
.testimonials-list { display: flex; flex-direction: column; gap: var(--s-6); max-width: 60ch; margin: 0 auto; }
.testimonial { padding: 0; }
.testimonial-footer { font-size: var(--fs-sm); color: var(--ink-3); margin-top: var(--s-3); }

/* ---------- ACCORDION / FAQ ---------- */
.accordion { border-top: 1px solid var(--rule-strong); }
.accordion-item { border-bottom: 1px solid var(--rule); }
.accordion-summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s-5) 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-5);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  line-height: 1.35;
  color: var(--ink);
  transition: color 160ms;
}
.accordion-summary::-webkit-details-marker { display: none; }
.accordion-summary:hover { color: var(--accent); }
.accordion-icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  position: relative;
  margin-top: 6px;
}
.accordion-icon::before, .accordion-icon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 200ms;
}
.accordion-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
details[open] .accordion-icon::after { transform: translate(-50%, -50%) rotate(0); }
.accordion-body {
  padding-bottom: var(--s-5);
  color: var(--ink-2);
  font-size: var(--fs-base);
  line-height: 1.65;
  max-width: 70ch;
}

/* ---------- COMPARE TABLE (fit / not fit) ---------- */
.compare-grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .compare-grid { grid-template-columns: 1fr 1fr; gap: var(--s-7); } }
.compare-col { padding: var(--s-6); border-radius: var(--r-md); background: var(--surface-b); border: 1px solid var(--rule); }
.compare-col.is-yes { background: var(--surface-a); border-color: var(--rule-strong); }
.compare-title { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.25; margin-bottom: var(--s-5); }
.compare-list { list-style: none; display: flex; flex-direction: column; gap: var(--s-4); }
.compare-item { padding-left: 28px; position: relative; font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-2); }
.compare-item::before {
  position: absolute; left: 0; top: 1px;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.is-yes .compare-item::before { content: '+'; background: var(--accent-soft); color: var(--accent-deep); }
.is-no .compare-item::before  { content: '-'; background: var(--rule); color: var(--ink-3); }
.compare-item strong { color: var(--ink); }

/* ---------- CTA BLOCKS ---------- */
.cta-band {
  text-align: center;
  padding: var(--s-9) var(--s-5);
  background: var(--surface-ink);
  color: var(--on-ink);
  border-radius: var(--r-md);
}
.cta-band .cta-heading { color: var(--on-ink); margin-bottom: var(--s-3); }
.cta-band .cta-sub { color: rgba(250,245,236,0.7); max-width: 50ch; margin: 0 auto var(--s-6); }
.cta-band .btn-primary { background: var(--accent); }
.cta-band .btn-primary:hover { background: var(--accent-deep); }

.cta-inline {
  display: flex; flex-direction: column; gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-6); border-radius: var(--r-md);
  background: var(--surface-b);
  border: 1px solid var(--rule);
}
@media (min-width: 720px) {
  .cta-inline { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s-6); }
}
.cta-inline-text { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.3; }

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: var(--s-6) 0;
  background: var(--surface-a);
  color: var(--ink-3);
  font-size: var(--fs-sm);
}
.footer-content {
  display: flex; flex-direction: column; gap: var(--s-3);
  align-items: flex-start;
}
.footer-links { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--ink-3); transition: color 160ms; }
.footer-links a:hover { color: var(--ink); }
@media (min-width: 720px) {
  .footer-content { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ---------- DEVIS / PROPOSAL TABLE ---------- */
.devis-table-wrap {
  /* Horizontal scroll on narrow viewports - preserves table integrity */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-inline: calc(-1 * var(--s-5));      /* bleed to edge of mobile container */
  padding-inline: var(--s-5);
  scrollbar-width: thin;
}
@media (min-width: 768px) {
  .devis-table-wrap { margin-inline: 0; padding-inline: 0; overflow-x: visible; }
}
.devis-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 560px; }
@media (min-width: 768px) { .devis-table { min-width: 0; } }
.devis-table thead th {
  text-align: left;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--rule-strong);
}
.devis-table tbody td {
  padding: var(--s-4);
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.devis-table tbody tr:hover { background: var(--surface-b); }
.devis-table .col-num { width: 48px; font-family: var(--font-mono); color: var(--ink-3); }
.devis-table .col-amount { text-align: right; font-family: var(--font-display); font-size: var(--fs-md); white-space: nowrap; }
.devis-table .row-section td {
  padding-top: var(--s-5);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  border-bottom: 1px solid var(--accent-soft);
}
.devis-table tfoot td {
  padding: var(--s-4);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  border-top: 2px solid var(--ink);
  border-bottom: 0;
}
.devis-table tfoot td.col-amount { font-size: var(--fs-xl); }

.devis-line-detail { display: block; color: var(--ink-3); font-size: var(--fs-xs); margin-top: 4px; }

/* ---------- LOGOS BAR ---------- */
.logos-bar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--s-5) var(--s-7);
  justify-content: center;
}
.logo-text { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--ink-3); letter-spacing: -0.01em; }

/* ---------- SIGNATURE BLOCK ---------- */
.sig-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}
@media (min-width: 720px) { .sig-grid { grid-template-columns: 1fr 1fr; } }
.sig-box {
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-md);
  padding: var(--s-5);
  background: var(--surface-a);
}
.sig-line { border-bottom: 1px solid var(--rule-strong); height: 64px; margin-bottom: var(--s-3); }
.sig-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }

/* ---------- PHASE CARD (3 variants) ---------- */
/* Common - header zone + body zone + logistics zone */
.phase-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.phase-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, var(--fs-2xl));
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-top: var(--s-2);
}
.phase-lede {
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--ink-2);
  margin-top: var(--s-3);
  max-width: 56ch;
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 400;
}
.phase-detail-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s-3);
}
.phase-detail, .phase-detail ul { list-style: none; padding: 0; margin: 0; }
.phase-detail li {
  position: relative;
  padding-left: var(--s-5);
  margin-top: var(--s-3);
  line-height: 1.55;
}
.phase-detail li:first-child { margin-top: 0; }
.phase-detail li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.65em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.phase-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.phase-meta-cell {
  background: var(--surface-a);
  padding: var(--s-4) var(--s-5);
}
.phase-meta-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.phase-meta-val {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  line-height: 1.3;
  color: var(--ink);
}

/* Phase section - editorial 2-col layout (number left, content right) */
.phase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  align-items: start;
}
@media (min-width: 768px) {
  .phase-grid { grid-template-columns: 200px 1fr; gap: var(--s-7); }
}
.phase-grid .section-heading {
  font-size: clamp(26px, 3.2vw, var(--fs-2xl));
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin-bottom: 0;
}

.phase-num {
  font-family: var(--font-display);
  font-size: clamp(72px, 10vw, 140px);
  line-height: 0.85;
  color: var(--accent);
  letter-spacing: -0.04em;
  font-weight: 400;
}

.phase-period {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-top: var(--s-3);
}

.phase-lede-block {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-2);
  line-height: 1.55;
  margin-top: var(--s-3);
  margin-bottom: var(--s-6);
  max-width: 56ch;
}

.phase-note {
  font-size: var(--fs-sm);
  font-style: italic;
  color: var(--ink-3);
  line-height: 1.55;
  margin-top: var(--s-5);
  max-width: 60ch;
}

/* V1 - Fiche encadrée (border + 3 zones séparées par filets) */
.phase-card-bordered {
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  background: var(--surface-a);
  overflow: hidden;
}
.phase-card-bordered .phase-zone {
  padding: var(--s-6) var(--s-6);
}
.phase-card-bordered .phase-zone + .phase-zone { border-top: 1px solid var(--rule); }
.phase-card-bordered .phase-zone-head { padding-bottom: var(--s-5); }
.phase-card-bordered .phase-zone-meta { background: var(--surface-b); }

/* V2 - Bandeau bordeaux en tête */
.phase-card-banner {
  background: var(--surface-a);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.phase-card-banner .phase-zone-head {
  background: var(--accent);
  color: var(--on-ink);
  padding: var(--s-6);
}
.phase-card-banner .phase-zone-head .phase-eyebrow { color: var(--accent-soft); }
.phase-card-banner .phase-zone-head .phase-title { color: var(--on-ink); }
.phase-card-banner .phase-zone-head .phase-lede { color: rgba(250,245,236,0.9); }
.phase-card-banner .phase-zone-body { padding: var(--s-6); }
.phase-card-banner .phase-zone-meta { padding: 0 var(--s-6) var(--s-6); }

/* V3 - Inline éditorial (filet épais en haut, sans card) */
.phase-card-inline {
  border-top: 3px solid var(--ink);
  padding-top: var(--s-5);
}
.phase-card-inline .phase-zone + .phase-zone { margin-top: var(--s-6); }

/* Phase card - multi-options layout */
.phase-options {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .phase-options { grid-template-columns: repeat(2, 1fr); } }
.phase-option {
  background: var(--surface-b);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.phase-option-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.phase-option-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  line-height: 1.25;
  margin-bottom: var(--s-2);
}
.phase-option-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule);
  font-size: var(--fs-sm);
}
.phase-option-meta dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline;
}
.phase-option-meta dd {
  display: inline;
  margin-left: var(--s-2);
  color: var(--ink);
}
.phase-option-meta div { display: flex; justify-content: space-between; gap: var(--s-3); }

/* ---------- COL LAYOUTS ---------- */
.cols-2 { display: grid; gap: var(--s-7); grid-template-columns: 1fr; }
.cols-3 { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .cols-2 { grid-template-columns: 1fr 1fr; }
  .cols-3 { grid-template-columns: repeat(3, 1fr); }
  .cols-2-aside { grid-template-columns: 1fr 2fr; }
}

/* ---------- DROPDOWN (custom select / menu) ---------- */
.dropdown { position: relative; display: inline-block; }
.dropdown-trigger {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  background: var(--surface-a);
  font-size: var(--fs-sm);
  color: var(--ink);
}
.dropdown-trigger:hover { border-color: var(--ink); }
.dropdown-caret { transition: transform 160ms; }
.dropdown.is-open .dropdown-caret { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: var(--s-2);
  display: none;
  z-index: 20;
}
.dropdown.is-open .dropdown-menu { display: block; }
.dropdown-item {
  display: block; width: 100%;
  padding: var(--s-3) var(--s-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  text-align: left;
  text-decoration: none;
  color: var(--ink-2);
}
.dropdown-item:hover { background: var(--surface-b); color: var(--ink); }
.dropdown-divider { height: 1px; background: var(--rule); margin: var(--s-2) 0; }

/* ---------- TABS ---------- */
.tabs { border-bottom: 1px solid var(--rule); display: flex; gap: var(--s-5); margin-bottom: var(--s-5); }
.tab {
  padding: var(--s-3) 0;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 160ms, border-color 160ms;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ---------- UTILITY ---------- */
.text-muted { color: var(--ink-3); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.flow > * + * { margin-top: var(--s-4); }
.stack-sm > * + * { margin-top: var(--s-3); }
.stack-lg > * + * { margin-top: var(--s-6); }
.hr-soft { border: 0; border-top: 1px solid var(--rule); margin: var(--s-7) 0; }

/* Placeholder image */
.img-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(
    135deg,
    var(--surface-b),
    var(--surface-b) 8px,
    var(--surface-c) 8px,
    var(--surface-c) 16px
  );
  border: 1px solid var(--rule);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  border-radius: var(--r-md);
  aspect-ratio: 4 / 3;
}

/* Print-friendly for proposals */
@media print {
  .navbar, .footer, .ds-toc, .no-print { display: none !important; }
  body { background: #fff; }
  .section-content, .section-content-lg { padding-block: var(--s-5); }
  .section-hero { padding-block: var(--s-6); }
  .card, .offer { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
