/* =============================================================================
   calcul-marge-restaurant.fr — main.css (refonte design 2026-05-04)
   Direction : Linear (typo + structure) × Stripe (chiffres + cards) × Pennylane/Qonto (sobriété pro)
   - CSS pur, polices système
   - Tabular-nums sur tous les chiffres
   - Graisses tranchées : 400 (regular) / 600 (semibold) / 700 (bold) / 800 (black, chiffres)
   - Couleurs fonctionnelles uniquement : ambré = signature, vert/orange/rouge = seuils marge
   - Vide intentionnel, calculatrice = instrument métier
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. Variables
   ----------------------------------------------------------------------------- */

:root {
  /* Couleurs */
  --c-ink:        #0C0A09;  /* texte fort */
  --c-ink-soft:   #1C1917;  /* corps */
  --c-mute:       #44403C;  /* secondaire */
  --c-mute-2:     #78716C;  /* tertiaire / labels */
  --c-line:       #E7E5E4;  /* bordures */
  --c-line-soft:  #F5F5F4;  /* bordures discrètes */
  --c-paper:      #FFFFFF;  /* fond carte */
  --c-bg:         #FAFAF9;  /* fond page */

  --c-primary:      #1E3A8A;  /* bleu profond — réservé aux liens et focus */
  --c-primary-dark: #172554;
  --c-accent:       #F59E0B;  /* ambré — SIGNATURE, pas couleur de CTA */
  --c-accent-soft:  #FEF3C7;

  /* Sémantique seuils marge */
  --c-green:       #047857;
  --c-green-soft:  #ECFDF5;
  --c-orange:      #C2410C;
  --c-orange-soft: #FFF7ED;
  --c-red:         #B91C1C;
  --c-red-soft:    #FEF2F2;

  /* Typo */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Échelle 8pt — espacement rythmé */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  96px;
  --sp-10: 128px;

  /* Container */
  --container: 1080px;
  --container-sm: 720px;

  /* Radius (sobre) */
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;
  --r-4: 14px;

  /* Ombres Stripe-style (quasi-invisibles mais présentes) */
  --shadow-1: 0 1px 2px rgba(12, 10, 9, 0.04), 0 1px 3px rgba(12, 10, 9, 0.04);
  --shadow-2: 0 1px 2px rgba(12, 10, 9, 0.05), 0 4px 12px rgba(12, 10, 9, 0.06);
}

/* -----------------------------------------------------------------------------
   2. Reset
   ----------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--c-ink-soft);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--c-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--c-line);
  transition: text-decoration-color 0.12s ease, color 0.12s ease;
}
a:hover {
  text-decoration-color: var(--c-ink);
}

/* Liens dans le contenu d'article — un poil plus marqués */
.article-body a, .page-wrap a:not(.btn) {
  text-decoration-color: rgba(245, 158, 11, 0.5); /* fin trait ambré */
}
.article-body a:hover, .page-wrap a:not(.btn):hover {
  text-decoration-color: var(--c-accent);
  color: var(--c-ink);
}

button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
table { border-collapse: collapse; }

ul, ol { padding-left: 1.4rem; margin: var(--sp-4) 0; }
li { margin: var(--sp-1) 0; }

p { margin: 0 0 var(--sp-4); }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--c-ink);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-ink); color: #fff;
  padding: var(--sp-2) var(--sp-3);
  font-weight: 600; font-size: 14px;
  z-index: 100; text-decoration: none; border-radius: var(--r-1);
}
.skip-link:focus { left: var(--sp-2); top: var(--sp-2); }

/* -----------------------------------------------------------------------------
   3. Container
   ----------------------------------------------------------------------------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
  width: 100%;
}
.container-sm {
  max-width: var(--container-sm);
  margin-inline: auto;
  padding-inline: var(--sp-5);
  width: 100%;
}

/* -----------------------------------------------------------------------------
   4. Typographie tranchée
   ----------------------------------------------------------------------------- */

/* H1 hero — Linear-style, immense, kerning serré */
h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--c-ink);
}

/* H1 article — un cran en dessous */
.article-h1 {
  font-size: clamp(32px, 4.5vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h2 {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: var(--sp-7) 0 var(--sp-4);
}

h3 {
  font-size: clamp(18px, 2.2vw, 20px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: var(--sp-6) 0 var(--sp-3);
}

/* Eyebrow / surtitre uppercase (signature de section) */
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-mute-2);
  margin-bottom: var(--sp-3);
}
.eyebrow.eyebrow-accent { color: var(--c-accent); }

.lead {
  font-size: clamp(17px, 1.8vw, 19px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--c-mute);
  letter-spacing: -0.005em;
  max-width: 38em;
}

.muted { color: var(--c-mute); }
.dim   { color: var(--c-mute-2); }
.small { font-size: 13px; }
.tiny  { font-size: 12px; }
.numeric { font-variant-numeric: tabular-nums; }

/* -----------------------------------------------------------------------------
   5. Boutons (sobres, précis, pas blockbuster)
   ----------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 20px;
  border-radius: var(--r-2);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--c-ink);
  color: #fff;
  border-color: var(--c-ink);
}
.btn-primary:hover {
  background: #000;
  color: #fff;
  text-decoration: none;
}

.btn-accent {
  background: var(--c-accent);
  color: var(--c-ink);
  border-color: var(--c-accent);
}
.btn-accent:hover {
  background: #D97706;
  border-color: #D97706;
  color: var(--c-ink);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-line);
}
.btn-ghost:hover {
  border-color: var(--c-ink);
  text-decoration: none;
}

.btn-block { width: 100%; }

.btn-link {
  background: transparent;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-mute-2);
  text-decoration: underline;
  text-decoration-color: var(--c-line);
}
.btn-link:hover { color: var(--c-ink); text-decoration-color: var(--c-mute-2); }

/* -----------------------------------------------------------------------------
   6. Header / Navigation
   ----------------------------------------------------------------------------- */

.site-header {
  background: var(--c-paper);
  border-bottom: 1px solid var(--c-line);
  padding: var(--sp-4) 0;
  position: relative;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: 16px;
  color: var(--c-ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.site-logo:hover { color: var(--c-ink); text-decoration: none; }
.site-logo::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  flex-shrink: 0;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}
.site-nav a {
  color: var(--c-mute);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.site-nav a:hover { color: var(--c-ink); text-decoration: none; }

/* Burger : caché en desktop, visible en mobile */
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin-right: -8px;
  border-radius: var(--r-2);
  color: var(--c-ink);
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-burger:hover { background: var(--c-line-soft); }
.nav-burger:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

.burger-icon,
.burger-icon::before,
.burger-icon::after {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.18s ease, top 0.18s ease, opacity 0.12s ease, background-color 0.12s ease;
}
.burger-icon { position: relative; }
.burger-icon::before,
.burger-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
}
.burger-icon::before { top: -6px; }
.burger-icon::after  { top:  6px; }

.nav-burger[aria-expanded="true"] .burger-icon { background: transparent; }
.nav-burger[aria-expanded="true"] .burger-icon::before { top: 0; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] .burger-icon::after  { top: 0; transform: rotate(-45deg); }

/* Mobile : nav cachée par défaut, panneau qui descend du header */
@media (max-width: 720px) {
  .nav-burger { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-paper);
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow-2);
    padding: var(--sp-3) 0 var(--sp-4);
  }
  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 var(--sp-5);
  }
  .site-nav li {
    margin: 0;
    border-top: 1px solid var(--c-line-soft);
  }
  .site-nav li:first-child { border-top: none; }
  .site-nav a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    color: var(--c-ink);
    font-weight: 500;
  }
  .site-nav a:hover,
  .site-nav a:focus-visible { color: var(--c-ink); }
}

/* -----------------------------------------------------------------------------
   7. Footer (sobre, blanc, pas de bloc sombre)
   ----------------------------------------------------------------------------- */

.site-footer {
  background: var(--c-paper);
  border-top: 1px solid var(--c-line);
  padding: var(--sp-7) 0 var(--sp-6);
  margin-top: var(--sp-9);
  color: var(--c-mute);
  font-size: 14px;
}
.site-footer h3 {
  color: var(--c-ink);
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 var(--sp-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: var(--sp-2) 0; }
.site-footer a {
  color: var(--c-mute);
  text-decoration: none;
}
.site-footer a:hover { color: var(--c-ink); text-decoration: none; }
.footer-grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1.4fr 1fr 1fr;
  margin-bottom: var(--sp-6);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); } }

.footer-bottom {
  border-top: 1px solid var(--c-line);
  padding-top: var(--sp-5);
  font-size: 12px;
  color: var(--c-mute-2);
  line-height: 1.6;
}
.footer-bottom p { margin: 0 0 var(--sp-2); }

/* -----------------------------------------------------------------------------
   8. Hero (généreux, H1 immense, ambré comme signature)
   ----------------------------------------------------------------------------- */

.hero {
  background: var(--c-bg);
  padding: var(--sp-9) 0 var(--sp-7);
  position: relative;
}
.hero .container { max-width: var(--container); }

.hero h1 {
  max-width: 22ch;
  margin-bottom: var(--sp-4);
}
/* Signature ambrée — un trait précis sous un mot du H1, pas une couleur de fond */
.hero h1 .accent {
  background-image: linear-gradient(180deg, transparent 78%, var(--c-accent) 78%, var(--c-accent) 92%, transparent 92%);
  padding: 0 0.05em;
}
.hero .lead { margin-bottom: var(--sp-6); }

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-mute-2);
}
.hero-meta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-green); display: inline-block;
}

.hero-trust {
  display: flex; flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-5);
  font-size: 13px;
  color: var(--c-mute-2);
}
.hero-trust span {
  display: inline-flex; align-items: center; gap: var(--sp-1);
}
.hero-trust span::before {
  content: '';
  width: 14px; height: 14px;
  background: var(--c-green); mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M16 5L7.5 13.5 4 10' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M16 5L7.5 13.5 4 10' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
  flex-shrink: 0;
}

/* -----------------------------------------------------------------------------
   9. Sections génériques
   ----------------------------------------------------------------------------- */

.section {
  padding: var(--sp-8) 0;
}
@media (min-width: 768px) {
  .section { padding: var(--sp-9) 0; }
}
.section-tight { padding: var(--sp-7) 0; }
.section-divider-top { border-top: 1px solid var(--c-line); }
.section-bg-paper { background: var(--c-paper); }

/* En-tête de section : eyebrow + h2 + lead optionnel */
.section-header { margin-bottom: var(--sp-6); }
.section-header h2 { margin-top: 0; max-width: 28ch; }
.section-header .lead { margin-top: var(--sp-3); }

/* -----------------------------------------------------------------------------
   10. Cartes (Stripe-style, ombre quasi invisible)
   ----------------------------------------------------------------------------- */

.card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r-3);
  padding: var(--sp-5);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card-link:hover {
  border-color: var(--c-ink);
  box-shadow: var(--shadow-2);
  color: inherit;
  text-decoration: none;
}
.card-link h3 { transition: color 0.12s ease; }
.card-link:hover h3 { color: var(--c-ink); }

.card .card-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-mute-2);
  margin-bottom: var(--sp-2);
}
.card h3 { font-size: 17px; font-weight: 700; margin: 0 0 var(--sp-2); }
.card p { margin: 0; color: var(--c-mute); font-size: 14px; line-height: 1.6; }
.card .card-cta {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  margin-top: var(--sp-3);
  color: var(--c-ink);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.card-link:hover .card-cta { color: var(--c-ink); }

.row-3 {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .row-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .row-3 { grid-template-columns: repeat(3, 1fr); } }

/* -----------------------------------------------------------------------------
   11. Calculatrice (instrument métier — gravitas)
   ----------------------------------------------------------------------------- */

.calculator {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r-4);
  padding: var(--sp-6);
  box-shadow: var(--shadow-1);
  /* Signature : trait ambré subtil sur le bord supérieur */
  position: relative;
  overflow: hidden;
}
.calculator::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-accent) 0%, var(--c-accent) 60px, transparent 60px);
}
@media (min-width: 768px) {
  .calculator { padding: var(--sp-7) var(--sp-7); }
}

.calc-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-mute-2);
  margin: 0 0 var(--sp-4);
}

.calc-form > * + * { margin-top: var(--sp-6); }

.calc-divider {
  border-top: 1px solid var(--c-line-soft);
  padding-top: var(--sp-6);
}

/* Inputs : underline subtil au lieu de border partout */
.calc-input,
.calc-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-2);
  background: var(--c-paper);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.calc-input:focus,
.calc-select:focus {
  outline: none;
  border-color: var(--c-ink);
  box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.06);
}
.calc-input::placeholder { color: var(--c-mute-2); font-weight: 400; }

.calc-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-mute-2);
  margin-bottom: 6px;
}

/* Grille ingrédients */
.ingredient-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-2) var(--sp-3);
  align-items: end;
}
.ingredient-row .col-name       { grid-column: span 12; }
.ingredient-row .col-gram       { grid-column: span 5; }
.ingredient-row .col-gram-unit  { grid-column: span 3; }
.ingredient-row .col-price      { grid-column: span 5; }
.ingredient-row .col-price-unit { grid-column: span 4; }
.ingredient-row .col-loss       { grid-column: span 2; }
.ingredient-row .col-remove     { grid-column: span 1; display: flex; align-items: end; justify-content: flex-end; }
@media (min-width: 768px) {
  .ingredient-row .col-name       { grid-column: span 4; }
  .ingredient-row .col-gram       { grid-column: span 2; }
  .ingredient-row .col-gram-unit  { grid-column: span 1; }
  .ingredient-row .col-price      { grid-column: span 2; }
  .ingredient-row .col-price-unit { grid-column: span 1; }
  .ingredient-row .col-loss       { grid-column: span 1; }
  .ingredient-row .col-remove     { grid-column: span 1; }
}

.btn-add-ing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-4);
  color: var(--c-ink);
  font-weight: 600;
  font-size: 13px;
  background: none;
  padding: 6px 10px 6px 8px;
  border-radius: var(--r-2);
  border: 1px solid var(--c-line);
}
.btn-add-ing:hover { border-color: var(--c-ink); }
.btn-add-ing svg { width: 16px; height: 16px; }

.btn-remove-ing {
  color: var(--c-mute-2);
  padding: 6px;
  border-radius: var(--r-2);
  transition: background 0.12s ease, color 0.12s ease;
}
.btn-remove-ing:hover { color: var(--c-red); background: var(--c-red-soft); }
.btn-remove-ing svg { width: 16px; height: 16px; }

.calc-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}
@media (min-width: 720px) {
  .calc-grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
}

/* === Zone résultats (le cœur métier) === */

.result-empty {
  border-top: 1px dashed var(--c-line);
  padding: var(--sp-6) 0 0;
  text-align: center;
  color: var(--c-mute-2);
  font-size: 14px;
}
.result-empty p { margin: 0; }

/* Résultat principal — Stripe-style, grand chiffre tabular-nums, point coloré */
.result-main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-2) 0 var(--sp-4);
  border-bottom: 1px solid var(--c-line-soft);
}
.result-main .result-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-mute-2);
}
.result-main .result-label .verdict-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.result-main .result-value {
  margin: 0;
  font-size: clamp(56px, 9vw, 88px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--c-ink);
}
.result-main .result-verdict {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-mute);
}

.result-main.result-green   { }
.result-main.result-orange  { }
.result-main.result-red     { }
.result-green  .verdict-dot { background: var(--c-green); }
.result-green  .result-verdict { color: var(--c-green); font-weight: 600; }
.result-orange .verdict-dot { background: var(--c-orange); }
.result-orange .result-verdict { color: var(--c-orange); font-weight: 600; }
.result-red    .verdict-dot { background: var(--c-red); }
.result-red    .result-verdict { color: var(--c-red); font-weight: 600; }

/* Cartes secondaires : 3 chiffres alignés, séparateurs verticaux subtils */
.result-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: var(--sp-5);
}
.result-card {
  padding: var(--sp-1) var(--sp-3);
  border-left: 1px solid var(--c-line-soft);
  text-align: left;
}
.result-card:first-child {
  border-left: none;
  padding-left: 0;
}
.result-card .result-card-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-mute-2);
  white-space: nowrap;
}
.result-card .result-card-value {
  margin: 4px 0 0;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--c-ink);
}

.result-marque-note {
  margin: var(--sp-4) 0 0;
  font-size: 12px;
  color: var(--c-mute-2);
  font-variant-numeric: tabular-nums;
}

.result-warning {
  background: var(--c-red-soft);
  border: 1px solid var(--c-red);
  border-radius: var(--r-2);
  padding: var(--sp-3) var(--sp-4);
  font-size: 13px;
  color: var(--c-red);
  margin-bottom: var(--sp-5);
}

/* Détail accordion : très discret, monospace-feeling sur les chiffres */
.detail-toggle {
  margin-top: var(--sp-5);
  border-top: 1px solid var(--c-line-soft);
}
.detail-toggle > summary {
  cursor: pointer;
  padding: var(--sp-3) 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-mute);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.detail-toggle > summary::-webkit-details-marker { display: none; }
.detail-toggle > summary::after {
  content: '↓';
  font-size: 12px;
  color: var(--c-mute-2);
  transition: transform 0.15s ease;
}
.detail-toggle[open] > summary::after { transform: rotate(180deg); }
.detail-toggle > summary:hover { color: var(--c-ink); }
.detail-toggle .detail-content { padding: 0 0 var(--sp-4); }
.detail-toggle table {
  width: 100%;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--c-mute);
}
.detail-toggle td { padding: 8px 0; vertical-align: top; }
.detail-toggle tr { border-top: 1px solid var(--c-line-soft); }
.detail-toggle tr:first-child { border-top: none; }
.detail-toggle tr.total td {
  border-top: 1px solid var(--c-line);
  font-weight: 700;
  color: var(--c-ink);
  padding-top: 12px;
}

.calc-actions {
  margin-top: var(--sp-6);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--sp-3);
}
@media (min-width: 600px) {
  .calc-actions { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--sp-4); }
}

/* Skeleton chargement */
.skeleton {
  background: linear-gradient(90deg, var(--c-line-soft) 0%, var(--c-line) 50%, var(--c-line-soft) 100%);
  background-size: 200% 100%;
  border-radius: var(--r-1);
  animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.noscript-warning {
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent);
  border-radius: var(--r-2);
  padding: var(--sp-4);
  font-size: 14px;
  color: var(--c-ink);
}

/* -----------------------------------------------------------------------------
   12. Form de capture email
   ----------------------------------------------------------------------------- */

.email-capture {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r-4);
  padding: var(--sp-6);
  margin-top: var(--sp-5);
  display: none;
  box-shadow: var(--shadow-1);
}
.email-capture.is-visible { display: block; }
@media (min-width: 768px) { .email-capture { padding: var(--sp-7); } }

.email-capture h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-1);
}

/* Bullets de la capture email — point bleu primary, retrait subtil */
.capture-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--c-mute); /* #44403C, équivalent stone-700 */
}
.capture-bullets li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  line-height: 1.5;
}
.capture-bullets li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary);
}

.form-field { display: block; margin-bottom: var(--sp-4); }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--c-ink);
  margin-bottom: 6px;
}
.form-input, .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-2);
  background: var(--c-paper);
  font-size: 15px;
  line-height: 1.3;
  color: var(--c-ink);
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--c-ink);
  box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.06);
}
.form-help {
  font-size: 13px;
  color: var(--c-mute-2);
  margin: 6px 0 0;
}
.form-error {
  font-size: 13px;
  color: var(--c-red);
  margin: 6px 0 0;
  display: none;
}
.form-error.is-visible { display: block; }

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
  margin-bottom: var(--sp-4);
}
.form-checkbox input[type="checkbox"] {
  margin-top: 2px;
  width: 16px; height: 16px;
  flex-shrink: 0;
  accent-color: var(--c-ink);
}
.form-checkbox-text {
  font-size: 13px;
  color: var(--c-mute);
  line-height: 1.55;
}

.form-required-mark { color: var(--c-red); }

.honeypot {
  position: absolute;
  left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

.form-feedback-success,
.form-feedback-error {
  display: none;
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-2);
  font-size: 14px;
}
.form-feedback-success.is-visible, .form-feedback-error.is-visible { display: block; }
.form-feedback-success {
  background: var(--c-green-soft);
  border: 1px solid var(--c-green);
  color: var(--c-green);
}
.form-feedback-error {
  background: var(--c-red-soft);
  border: 1px solid var(--c-red);
  color: var(--c-red);
}

.form-policy {
  font-size: 12px;
  color: var(--c-mute-2);
  text-align: center;
  margin: var(--sp-3) 0 0;
  line-height: 1.55;
}

/* -----------------------------------------------------------------------------
   13. FAQ
   ----------------------------------------------------------------------------- */

.faq { padding: var(--sp-7) 0 var(--sp-9); }
.faq h2 { margin: 0 0 var(--sp-5); }

.faq-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--c-line); }

.faq-item {
  border-bottom: 1px solid var(--c-line);
}
.faq-item > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  color: var(--c-ink);
  list-style: none;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: '';
  width: 14px; height: 14px;
  flex-shrink: 0;
  margin-top: 6px;
  background: currentColor;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 5v14M5 12h14' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 5v14M5 12h14' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/></svg>") center/contain no-repeat;
  transition: transform 0.15s ease;
  color: var(--c-mute-2);
}
.faq-item[open] > summary::after {
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12h14' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12h14' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/></svg>") center/contain no-repeat;
}
.faq-content {
  padding: 0 0 var(--sp-5);
  color: var(--c-mute);
  font-size: 15px;
  line-height: 1.7;
  max-width: 65ch;
}
.faq-content p { margin: 0 0 var(--sp-3); }
.faq-content p:last-child { margin-bottom: 0; }
.faq-content ul { margin: var(--sp-3) 0; }
.faq-content a { color: var(--c-ink); text-decoration: underline; text-decoration-color: rgba(245, 158, 11, 0.5); }
.faq-content a:hover { text-decoration-color: var(--c-accent); }

/* -----------------------------------------------------------------------------
   14. Article (pages support SEO)
   ----------------------------------------------------------------------------- */

.article-wrap {
  max-width: var(--container-sm);
  margin: 0 auto;
  padding: var(--sp-7) var(--sp-5);
}
@media (min-width: 768px) { .article-wrap { padding: var(--sp-9) var(--sp-5); } }

.breadcrumb {
  margin-bottom: var(--sp-4);
  font-size: 13px;
  color: var(--c-mute-2);
}
.breadcrumb ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumb a { color: var(--c-mute-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-ink); }
.breadcrumb-sep { color: var(--c-line); }
.breadcrumb-current { color: var(--c-ink); font-weight: 500; }

.author-box {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  margin: var(--sp-5) 0 0;
}
.author-avatar {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-ink);
  color: #fff;
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.02em;
}
.author-info { flex: 1; }
.author-name { font-weight: 600; font-size: 14px; color: var(--c-ink); margin: 0; }
.author-name a { color: inherit; text-decoration: none; }
.author-name a:hover { color: var(--c-ink); }
.author-bio { font-size: 13px; color: var(--c-mute-2); margin: 2px 0 0; line-height: 1.5; }
.author-dates { font-size: 12px; color: var(--c-mute-2); margin: 6px 0 0; font-variant-numeric: tabular-nums; }

.article-body {
  margin-top: var(--sp-7);
  font-size: 17px;
  line-height: 1.75;
  color: var(--c-ink-soft);
}
.article-body h2 { font-size: clamp(22px, 2.8vw, 28px); margin: var(--sp-7) 0 var(--sp-3); }
.article-body h3 { font-size: clamp(17px, 2vw, 19px); margin: var(--sp-5) 0 var(--sp-2); }
.article-body p { margin: var(--sp-3) 0; }
.article-body ul, .article-body ol { margin: var(--sp-3) 0; padding-left: 1.4rem; }
.article-body li { margin: 6px 0; }
.article-body strong { font-weight: 600; color: var(--c-ink); }
.article-body em { font-style: italic; }
.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  background: var(--c-line-soft);
  padding: 1px 5px;
  border-radius: 3px;
}
/* Lead du début d'article */
.article-body .lead {
  font-size: clamp(18px, 2.1vw, 21px);
  font-weight: 400;
  color: var(--c-ink);
  letter-spacing: -0.01em;
  line-height: 1.55;
  margin-bottom: var(--sp-6);
  max-width: none;
}

/* -----------------------------------------------------------------------------
   15. Tableaux dans articles (tabular-nums + zebra)
   ----------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  margin: var(--sp-5) 0;
  border: 1px solid var(--c-line);
  border-radius: var(--r-3);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.table thead { background: var(--c-bg); }
.table th {
  text-align: left;
  padding: 10px var(--sp-3);
  border-bottom: 1px solid var(--c-line);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-mute-2);
  white-space: nowrap;
}
.table td {
  padding: 10px var(--sp-3);
  border-top: 1px solid var(--c-line-soft);
  vertical-align: top;
  color: var(--c-ink-soft);
}
.table tbody tr:first-child td { border-top: none; }
.table tr.row-highlight { background: var(--c-accent-soft); }
.color-green  { color: var(--c-green);  font-weight: 600; }
.color-orange { color: var(--c-orange); font-weight: 600; }
.color-red    { color: var(--c-red);    font-weight: 600; }

/* -----------------------------------------------------------------------------
   16. Page À propos / Contact / Légales
   ----------------------------------------------------------------------------- */

.page-wrap {
  max-width: var(--container-sm);
  margin: 0 auto;
  padding: var(--sp-7) var(--sp-5);
}
@media (min-width: 768px) { .page-wrap { padding: var(--sp-9) var(--sp-5); } }

.page-wrap h2 { font-size: clamp(22px, 2.8vw, 26px); margin: var(--sp-7) 0 var(--sp-3); }

.author-card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r-3);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  margin: var(--sp-5) 0;
}
.author-card .avatar-lg {
  width: 56px; height: 56px;
  flex-shrink: 0;
  background: var(--c-ink); color: #fff;
  border-radius: 50%;
  font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}

/* -----------------------------------------------------------------------------
   17. Section CTA Restopilot (discrète, signature ambrée)
   ----------------------------------------------------------------------------- */

.cta-restopilot {
  background: var(--c-paper);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  padding: var(--sp-7) 0;
}
.cta-restopilot .container-sm { max-width: 640px; text-align: left; }
.cta-restopilot .eyebrow { color: var(--c-accent); margin-bottom: var(--sp-2); }
.cta-restopilot h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.02em;
}
.cta-restopilot p {
  color: var(--c-mute);
  line-height: 1.65;
  margin: 0 0 var(--sp-2);
  max-width: 56ch;
}
.cta-restopilot .signature {
  display: block;
  margin-top: var(--sp-3);
  font-size: 12px;
  color: var(--c-mute-2);
}

/* -----------------------------------------------------------------------------
   18. Page 404
   ----------------------------------------------------------------------------- */

.page-404 {
  max-width: 480px;
  margin: 0 auto;
  padding: var(--sp-9) var(--sp-5);
  text-align: center;
}
.page-404 .code-404 {
  font-size: 96px;
  font-weight: 800;
  color: var(--c-ink);
  line-height: 1;
  margin: 0 0 var(--sp-4);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .page-404 .code-404 { font-size: 128px; } }
.page-404 h1 { font-size: 24px; margin: 0 0 var(--sp-3); }

/* -----------------------------------------------------------------------------
   19. Utilitaires
   ----------------------------------------------------------------------------- */

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
