/* ============================================================
   AURVALD — Design system
   Palette : encre marine, papier chaud, or
   ============================================================ */

:root  {
  --ink: #0e1a2b;
  --ink-2: #17263c;
  --ink-3: #23374f;

  --bg: #f6f4ef;
  --bg-2: #efeadf;
  --paper: #ffffff;
  --line: #e4ded1;
  --line-2: #d6cebd;

  --text: #1b2433;
  --muted: #5f6a7b;
  --muted-2: #60687a;

  --gold: #c08a2e;
  --gold-ink: #8a5e12;
  --gold-bright: #e0a83f;
  --gold-soft: #f7ecd7;

  --green: #1f7a5c;
  --green-soft: #e3f2ec;
  --red: #b3453c;
  --red-soft: #fbeae7;
  --blue: #3e6fa8;
  --blue-soft: #e7eef7;
  --teal: #2e8b8b;
  --plum: #7a5c8e;
  --sand: #c9b896;

  --c1: #c08a2e;
  --c2: #0e1a2b;
  --c3: #1f7a5c;
  --c4: #3e6fa8;
  --c5: #b3453c;
  --c6: #2e8b8b;
  --c7: #7a5c8e;
  --c8: #c9b896;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;

  --shadow-sm: 0 1px 2px rgba(14, 26, 43, 0.05);
  --shadow: 0 1px 3px rgba(14, 26, 43, 0.06), 0 14px 34px -18px rgba(14, 26, 43, 0.28);
  --shadow-lg: 0 2px 6px rgba(14, 26, 43, 0.06), 0 30px 60px -30px rgba(14, 26, 43, 0.35);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --container: 72.5rem;
  --header-h: 68px;
}

/* ---------- Reset ---------- */

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

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

body {
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Sections full-width : fond toujours étendu, jamais au-delà du viewport */
.site-header,
.hero,
.strip,
.cta-band,
.site-footer {
  width: 100%;
  max-width: 100%;
}

/* filet de sécurité pour navigateurs sans overflow-x: clip */
@supports not (overflow-x: clip) {
  html, body { overflow-x: hidden; }
}

img, svg  { max-width: 100%; }

a  { color: inherit; text-decoration: none; }

button, input, select, textarea  { font: inherit; color: inherit; }

[hidden]  { display: none !important; }

h1, h2, h3, h4  { margin: 0; font-weight: 600; line-height: 1.2; }

p  { margin: 0; }

ul, ol  { margin: 0; padding: 0; }

:focus-visible  {
  outline: 2px solid var(--gold-ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
  border-radius: 4px;
}

::selection  { background: var(--gold-soft); color: var(--ink); }

/* ---------- Typographie ---------- */

h1, h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1  { font-size: clamp(2rem, 4vw, 2.85rem); font-weight: 600; }

h2  { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; }

h3  { font-size: 1.075rem; font-weight: 600; color: var(--ink); }

.lead  {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--muted);
  line-height: 1.65;
  max-width: 62ch;
}

.eyebrow  {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

/* ---------- Layout ---------- */

.container  {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 24px);
}

.section  { padding: 64px 0; }

/* Séparation Outils → Blog (accueil) : nuance chaude pleine largeur + filet doré discret */
#blog  {
  background: var(--bg-2);
  border-top: 1px solid rgba(197, 160, 89, 0.2);
}

.section-head  {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.section-head p  { max-width: 58ch; }

.section-title  { display: grid; gap: 8px; }

/* ---------- Header ---------- */

.site-header  {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 244, 239, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-header.is-stuck  {
  border-bottom-color: var(--line);
  background: rgba(246, 244, 239, 0.95);
}

.header-inner  {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand  {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.brand-mark  {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--ink-3), var(--ink));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  flex: none;
}

.brand-name  {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav  { display: flex; align-items: center; gap: 4px; }

.nav-link  {
  padding: 8px 13px;
  border-radius: var(--radius-xs);
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover  { color: var(--ink); background: rgba(14, 26, 43, 0.05); }

.nav-link.is-active  { color: var(--ink); background: var(--paper); box-shadow: var(--shadow-sm); }

.nav-cta  {
  margin-left: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-cta:hover  { background: var(--ink-3); transform: translateY(-1px); }

.nav-toggle  {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--paper);
  cursor: pointer;
  place-items: center;
}

.nav-toggle span  {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: background 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after  {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.nav-toggle span::before  { top: -6px; }

.nav-toggle span::after  { top: 6px; }

.nav-toggle[aria-expanded="true"] span  { background: transparent; }

.nav-toggle[aria-expanded="true"] span::before  { transform: translateY(6px) rotate(45deg); }

.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero (accueil) ---------- */

.hero  {
  position: relative;
  overflow: hidden;
  padding: 76px 0 60px;
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(192, 138, 46, 0.16), transparent 65%),
    radial-gradient(700px 400px at 6% 0%, rgba(23, 38, 60, 0.1), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid  {
  display: block;
}

.hero-copy  { max-width: 680px; }

.hero h1  {
  margin: 16px 0 18px;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.06;
}

.hero h1 em  {
  font-style: normal;
  color: var(--gold-ink);
  position: relative;
  z-index: 0;
  white-space: nowrap;
}

.hero h1 em::after  {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.3em;

  background: var(--gold-soft);
  z-index: -1;
  border-radius: 3px;
}

.hero-actions  { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- Boutons ---------- */

.btn  {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover  { transform: translateY(-1px); }

.btn:active  { transform: translateY(0); }

.btn-gold  { background: linear-gradient(160deg, var(--gold-bright), var(--gold)); color: #2a1c05; box-shadow: var(--shadow); }

.btn-gold:hover  { filter: brightness(1.04); }

.btn-ghost  { background: var(--paper); color: var(--ink); border-color: var(--line-2); }

.btn-ghost:hover  { border-color: var(--ink); }

.btn-sm  { padding: 9px 16px; font-size: 0.875rem; }

/* ---------- Cartes d'outils ---------- */

.tool-grid  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.tool-card  {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}

.tool-card::after  {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.tool-card:hover  {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-2);
}

.tool-card:hover::after  { transform: scaleX(1); }

.tool-card.is-hidden  { display: none; }

.tool-icon  {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  flex: none;
}

.tool-icon svg  { width: 22px; height: 22px; }

.tool-icon--lg  { width: 58px; height: 58px; border-radius: 16px; }

.tool-icon--lg svg  { width: 28px; height: 28px; }

.tool-icon--blue  { background: var(--blue-soft); color: var(--blue); }

.tool-icon--green  { background: var(--green-soft); color: var(--green); }

.tool-icon--ink  { background: #e9edf3; color: var(--ink-2); }

.tool-title  { font-size: 1.05rem; font-weight: 600; }

.tool-desc  { font-size: 0.9rem; color: var(--muted); line-height: 1.55; flex: 1; }

.tool-cta  {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold-ink);
}

.tool-cta svg  { width: 15px; height: 15px; transition: transform 0.18s ease; }

.tool-card:hover .tool-cta svg  { transform: translateX(4px); }

/* ---------- Recherche ---------- */

.search  {
  position: relative;
  max-width: 480px;
  width: 100%;
}

.search svg  {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted-2);
  pointer-events: none;
}

.search input  {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search input::placeholder  { color: var(--muted-2); }

.search input:focus  {
  outline: none;
  border-color: var(--gold-ink);
  box-shadow: 0 0 0 4px rgba(138, 94, 18, 0.18);
}

/* ---------- Bandeau confiance ---------- */

.strip  {
  background: var(--ink);
  color: #cdd6e2;
  padding: 52px 0;
}

.strip .section-title h2  { color: #fff; }

.strip .eyebrow  { color: var(--gold-bright); }

.strip-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 30px; }

.strip-item  { display: grid; gap: 8px; padding-left: 18px; border-left: 2px solid rgba(224, 168, 63, 0.5); }

.strip-item h3  { color: #fff; font-size: 1rem; }

.strip-item p  { font-size: 0.9rem; color: #97a3b4; line-height: 1.6; }

/* ---------- Fil d'ariane ---------- */

.breadcrumb  {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 22px 0 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb a:hover  { color: var(--gold-ink); text-decoration: underline; }

.breadcrumb span[aria-current]  { color: var(--ink); font-weight: 500; }

.breadcrumb .sep  { color: var(--line-2); }

/* ---------- En-tête d'outil ---------- */

.tool-head  {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 24px 0 34px;
}

.tool-head .tool-icon  { margin-top: 4px; }

.tool-head-copy  { display: grid; gap: 10px; }

/* ---------- Calculateur ---------- */

.calc  {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.calc > *  { min-width: 0; }

.panel  {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px;
}

.panel-title  {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-title::before  {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

/* Appel à l'action « installer l'application » — site web uniquement
   (jamais dans la PWA, où la persistance est déjà active). Affiché entre
   le dernier tableau et le bouton d'export des résultats. Question en
   noir gras, lien « Installez l'application » en doré souligné épais.
   overflow-wrap + inline-block : retour à la ligne propre, sans
   débordement, du très grand écran au mobile étroit. */
.install-cta  {
  margin: 30px 0 18px;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: break-word;
}

.install-cta-link  {
  display: inline-block;
  max-width: 100%;
  color: var(--gold-ink);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.install-cta-link:hover,
.install-cta-link:focus-visible  {
  color: var(--gold);
  text-decoration-color: var(--gold-ink);
}

/* Bouton natif « Installer » (offert par le navigateur quand il le peut) :
   pilule sobre, lisible sur le fond papier, posée après le lien. */
.install-cta .ab-btn  {
  margin-left: 12px;
  padding: 6px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--paper);
  color: var(--gold-ink);
  font-size: 0.875rem;
}

.install-cta .ab-btn:hover,
.install-cta .ab-btn:focus-visible  { border-color: var(--gold); }

.calc-results  { position: sticky; top: calc(var(--header-h) + 18px); }

.field  { display: grid; gap: 9px; margin-bottom: 20px; }

.field:last-child  { margin-bottom: 0; }

.field-top  {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.field-label  {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.field-hint  { font-size: 0.78rem; color: var(--muted-2); text-align: right; }

.control  {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.control:focus-within  {
  border-color: var(--gold-ink);
  box-shadow: 0 0 0 4px rgba(138, 94, 18, 0.15);
}

.control-prefix,
.control-suffix  {
  display: grid;
  place-items: center;
  padding: 0 14px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  border-right: 1px solid var(--line);
}

.control-suffix  {
  border-right: 0;
  border-left: 1px solid var(--line);
  min-width: 52px;
}

.input  {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.input:focus  { outline: none; }

.input::placeholder  { color: var(--muted-2); font-weight: 400; }

select.input  {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%235f6a7b' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

textarea.input  { min-height: 96px; resize: vertical; font-weight: 400; line-height: 1.5; }

/* Segmenté */

.segmented  {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 100%;
}

.seg  { flex: 1; position: relative; }

.seg input  { position: absolute; opacity: 0; inset: 0; cursor: pointer; }

.seg span  {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.seg input:checked + span  {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.seg input:focus-visible + span  { outline: 2px solid var(--gold-ink); outline-offset: 1px; }

/* Case à cocher */

.check  {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.check:hover  { border-color: var(--line-2); }

.check input  {
  width: 17px;
  height: 17px;
  accent-color: var(--gold);
  cursor: pointer;
  flex: none;
}

/* Lignes répétables (budget) */

.rows  { display: grid; gap: 10px; }

.row-line  {
  display: grid;
  grid-template-columns: 1fr 130px 36px;
  gap: 10px;
  align-items: center;
}

.row-line .control  { border-radius: var(--radius-xs); }

.row-line .input  { padding: 9px 12px; font-size: 0.95rem; }

.row-line input[type="text"].row-name  {
  font-weight: 500;
  color: var(--muted);
}

/* Pastille de couleur (lignes de dépense, liées au donut) */
.row-dot  {
  flex: none;
  align-self: center;
  width: 9px;
  height: 9px;
  margin: 0 8px 0 11px;
  border-radius: 999px;
  background: var(--line-2);
}

/* Bouton de suppression d'une ligne */
.row-del  {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--red);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.row-del:hover  { background: var(--red-soft); border-color: var(--red); }

.row-del:focus-visible  { outline: 2px solid var(--red); outline-offset: 1px; }

/* Bouton d'ajout de ligne */
.row-add  { margin-top: 16px; }

.btn:disabled  { opacity: 0.45; cursor: not-allowed; }

/* Saisie intelligente : signal d'expression invalide (sur le wrapper .control) */
@keyframes num-shake  {
  25%  { transform: translateX(-2px); }
  50%  { transform: translateX(2px); }
  75%  { transform: translateX(-2px); }
}

.control.num-error  {
  border-color: var(--red);
  background: var(--red-soft);
  animation: num-shake 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  .control.num-error  { animation: none; }
}

/* Clavier mobile : barre d'opérateurs tactile au focus */
.control.has-num-pad  { position: relative; overflow: visible; }

.num-pad  {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 30;
  gap: 5px;
  padding: 5px 6px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(23, 38, 60, 0.12);
}

.has-num-pad.pad-open .num-pad  { display: inline-flex; }

.num-pad-btn  {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.num-pad-btn:active  { background: var(--gold-soft); color: var(--gold-ink); }

.subhead  {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 26px 0 12px;
}

.subhead:first-of-type  { margin-top: 4px; }

/* ---------- Résultats ---------- */

.result-hero  {
  padding: 20px;
  border-radius: var(--radius-sm);
  background: linear-gradient(155deg, var(--ink) 0%, var(--ink-2) 60%, var(--ink-3) 100%);
  color: #fff;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.result-hero::after  {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 168, 63, 0.34), transparent 70%);
}

.result-label  {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9fb0c4;
  margin-bottom: 6px;
}

.result-value  {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}

.result-sub  { font-size: 0.875rem; color: #a9b7c8; margin-top: 8px; position: relative; z-index: 1; }

.result-sub b  { color: var(--gold-bright); font-weight: 600; }

.stat-grid  {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.stat  {
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.stat-label  { font-size: 0.76rem; color: var(--muted); font-weight: 500; }

.stat-value  {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-value.pos  { color: var(--green); }

.stat-value.neg  { color: var(--red); }

.stat--wide  { grid-column: 1 / -1; }

.result-block  {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.block-title  {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}

.insight  {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  border: 1px solid #eddcbb;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #5b4415;
  margin-bottom: 18px;
}

.insight svg  { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--gold-ink); }

.insight--green  { background: var(--green-soft); border-color: #cbe6db; color: #175643; }

.insight--green svg  { color: var(--green); }

.insight--red  { background: var(--red-soft); border-color: #f2d5d1; color: #7d2e27; }

.insight--red svg  { color: var(--red); }

/* ---------- Graphiques ---------- */

.chart  { width: 100%; position: relative; }

.chart svg  { display: block; width: 100%; height: auto; overflow: visible; }

/* ---------- Barres interactives ---------- */

.br-seg  { transition: opacity 0.18s ease; }

.br-active .br-seg:not(.is-hot)  { opacity: 0.4; }

.ch-capture, .br-cap  { cursor: crosshair; }

.chart-empty  {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: var(--muted-2);
  font-size: 0.875rem;
  background: var(--bg);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
}

.legend  { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; list-style: none; }

.legend li  { display: inline-flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--muted); }

.legend i  { width: 11px; height: 11px; border-radius: 3px; flex: none; }

.chart-tip  {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 0.78rem;
  line-height: 1.5;
  box-shadow: var(--shadow);
  top: 6px;
  max-width: calc(100% - 8px);
  opacity: 0;
  transform: translate(-50%, 0);
  transition: opacity 0.12s ease;
  white-space: nowrap;
  z-index: 5;
}

.chart-tip.is-visible  { opacity: 1; }

.chart-tip b  { color: var(--gold-bright); font-weight: 600; }

.chart-tip .tip-title  { display: block; color: #9fb0c4; font-weight: 600; margin-bottom: 2px; }

/* ---------- Donut interactif ---------- */

.dn-seg  { transition: opacity 0.15s ease, stroke-width 0.15s ease; cursor: pointer; }

.dn-svg.dn-active .dn-seg:not(.is-hot)  { opacity: 0.32; }

.dn-seg.is-hot  { stroke-width: 36; }

.legend li  { transition: color 0.15s ease; }

.legend li.is-hot  { color: var(--ink); font-weight: 600; }

/* ---------- Tableaux ---------- */

.table-wrap  { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }

.table  { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }

.table th, .table td  { padding: 11px 14px; text-align: right; white-space: nowrap; }

.table th:first-child, .table td:first-child  { text-align: left; }

.table thead th  {
  background: var(--bg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
}

.table tbody tr  { border-bottom: 1px solid var(--line); }

.table tbody tr:last-child  { border-bottom: 0; }

.table tbody tr:nth-child(even)  { background: #fbfaf7; }

.table tbody tr:hover  { background: var(--gold-soft); }

.table tfoot td  {
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
  border-top: 2px solid var(--line-2);
}

.table-fonds th, .table-fonds td  { padding-left: 10px; padding-right: 10px; }

.table .pos  { color: var(--green); font-weight: 600; }

.table .neg  { color: var(--red); font-weight: 600; }

.table-scroll  { max-height: 420px; overflow-y: auto; }

/* ---------- Contenu éditorial ---------- */

.content  {
  padding: 32px 0 72px;
  background: var(--bg-2);
  border-top: 1px solid rgba(197, 160, 89, 0.2);
}

.content-grid  {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 24px);
}

.prose  { display: grid; gap: 22px; max-width: 74ch; }

.prose h2  { font-size: clamp(1.35rem, 2.2vw, 1.7rem); margin-top: 14px; }

/* Titre explicatif collé au filet : la marge du titre n'existe que pour les h2 suivants */
.prose h2:first-child  { margin-top: 0; padding-top: 0; }

.prose h3  { font-size: 1.05rem; margin-top: 8px; }

.prose p  { color: var(--muted); line-height: 1.7; }

.prose strong  { color: var(--text); font-weight: 600; }

.prose ul, .prose ol  { display: grid; gap: 9px; padding-left: 20px; color: var(--muted); line-height: 1.65; }

.prose li::marker  { color: var(--gold-ink); }

.prose a  { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 3px; }

.formula  {
  display: block;
  padding: 16px 18px;
  background: var(--ink);
  color: #dfe7f0;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
  overflow-x: auto;
}

.formula em  { color: var(--gold-bright); font-style: normal; }

.callout  {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
}

.callout h3  { font-size: 0.95rem; }

.callout p  { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

.aside-box  {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  display: grid;
  gap: 16px;
}

.aside-card  {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.aside-card h3  { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; }

.aside-list  { display: grid; gap: 11px; list-style: none; }

.aside-list a  {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  padding: 9px 11px;
  margin: 0 -11px;
  border-radius: var(--radius-xs);
  transition: background 0.14s ease, color 0.14s ease;
}

.aside-list a:hover  { background: var(--gold-soft); color: var(--gold-ink); }

.aside-list a svg  { width: 14px; height: 14px; color: var(--muted-2); flex: none; }

.aside-list a:hover svg  { color: var(--gold-ink); }

.disclaimer  {
  padding: 16px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.disclaimer b  { color: var(--text); }

/* ---------- Bandeau CTA ---------- */

.cta-band  {
  background:
    radial-gradient(700px 300px at 85% 20%, rgba(224, 168, 63, 0.2), transparent 60%),
    var(--ink);
  color: #cdd6e2;
  padding: 56px 0;
}

.cta-inner  {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.cta-band h2  { color: #fff; margin-bottom: 8px; }

.cta-band p  { max-width: 54ch; font-size: 0.95rem; color: #97a3b4; }

/* ---------- Footer ---------- */

.site-footer  {
  background: var(--ink);
  color: #93a0b2;
  padding: 56px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-grid  {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 36px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-brand .brand-name  { color: #fff; }

.footer-brand p  { margin-top: 14px; font-size: 0.88rem; line-height: 1.65; max-width: 34ch; color: #8593a6; }

.footer-bottom  {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: #7a879a;
}

.footer-bottom .domains  { display: flex; gap: 16px; }

.footer-bottom .domains b  { color: var(--gold-bright); font-weight: 600; }

/* ---------- Footer simple (accueil) ---------- */

.footer-grid--simple  {
  grid-template-columns: 1.2fr 1fr;
  gap: 44px;
  align-items: center;
  padding-bottom: 32px;
}

.footer-anon  {
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #b8c4d4;
}

.footer-warn  {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  line-height: 1.65;
  color: #93a0b2;
}

.footer-warn b  { color: #fff; font-weight: 600; }

.footer-warn strong  { color: var(--gold-bright); font-weight: 600; }

@media (max-width: 940px) {
.footer-grid--simple  { grid-template-columns: 1fr; gap: 24px; align-items: start; }
}

/* ---------- Page légale ---------- */

.legal  { padding: 46px clamp(1rem, 4vw, 20px) 76px; }

/* Évite le double padding : la grille centrale est déjà dans le bloc .legal */
.legal .content-grid  { padding-inline: 0; }

.legal .prose  { max-width: 78ch; }

.legal h1  { margin-bottom: 10px; }

/* ---------- Divers ---------- */

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
.tool-grid  { grid-template-columns: repeat(3, 1fr); }
.content-grid  { grid-template-columns: minmax(0, 1fr); }
.aside-box  { position: static; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 940px) {
.calc  { grid-template-columns: minmax(0, 1fr); }
.calc-results  { position: static; }
.strip-grid  { grid-template-columns: 1fr; gap: 22px; }
.footer-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
.nav  {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
.nav.is-open  { display: flex; }
.nav-link  { padding: 12px 14px; font-size: 1rem; }
.nav-cta  { margin: 8px 0 0; text-align: center; }
.nav-toggle  { display: grid; }
.tool-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
.section  { padding: 46px 0; }
.hero  { padding: 54px 0 44px; }
.tool-grid { grid-template-columns: 1fr; }
.panel  { padding: 20px 18px; }
.tool-head  { flex-direction: column; gap: 16px; }
.stat-grid  { grid-template-columns: 1fr; }
.aside-box  { grid-template-columns: 1fr; }
.footer-grid  { grid-template-columns: 1fr; gap: 28px; }
.row-line  { grid-template-columns: 1fr 36px; gap: 6px; }
.row-line .control:nth-child(2)  { grid-column: 1; }
.row-line .row-del  { align-self: center; }
.cta-inner  { flex-direction: column; align-items: flex-start; }
.segmented  { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
*  { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
html  { scroll-behavior: auto; }
}

/* ---------- Sous-menus du menu principal ---------- */

.nav-item  { position: relative; }

.nav-cat  {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  background: none;
  border: 0;
  border-radius: var(--radius-xs);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-cat:hover  { color: var(--ink); background: rgba(14, 26, 43, 0.05); }

.nav-cat.has-active,
.nav-cat[aria-expanded="true"]  { color: var(--ink); }

.nav-caret  { flex: none; transition: transform 0.18s ease; }

.nav-item.is-open .nav-caret  { transform: rotate(180deg); }

.nav-sub  {
  position: absolute;
  top: calc(100% + 10px);
  left: -8px;
  min-width: 240px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: none;
  z-index: 80;
}

.nav-item.is-open .nav-sub  { display: block; }

.nav-sub .nav-link  {
  display: block;
  padding: 9px 11px;
  font-size: 0.92rem;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

.nav-sub .nav-link:hover  { background: var(--bg-2); color: var(--ink); }

.nav-sub .nav-link.is-active  { background: var(--bg-2); color: var(--ink); box-shadow: none; }

.nav-sub .nav-link.nav-sub-overview  {
  margin-bottom: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.nav-sub .nav-link.nav-sub-overview:hover  { background: transparent; color: var(--ink); }

@media (hover: hover) and (min-width: 821px) {
.nav-item:hover .nav-sub  { display: block; }
.nav-item:hover .nav-caret  { transform: rotate(180deg); }
.nav-item:hover .nav-cat  { color: var(--ink); }
}

@media (max-width: 820px) {
.nav-item  { display: block; width: 100%; }
.nav-cat  {
    width: 100%;
    justify-content: space-between;
    padding: 13px 14px;
    font-size: 1rem;
    text-align: left;
  }
.nav-sub  {
    position: static;
    min-width: 0;
    padding: 2px 4px 6px 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
  }
.nav-sub .nav-link  { padding: 10px 13px; font-size: 0.96rem; white-space: normal; }
.nav-sub .nav-link.nav-sub-overview  {
    margin: 0 4px 3px;
    padding: 0 9px 11px;
    color: var(--muted-2);
  }
}

/* ---------- Blog & articles ---------- */

.post-date  { font-size: 0.78rem; color: var(--muted-2); }

.post-meta  {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  margin-top: 16px;
  font-size: 0.83rem;
  color: var(--muted-2);
}

.post-meta .sep  { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); flex: none; }

.post-meta b  { color: var(--ink); font-weight: 600; }

.prose .pullquote  {
  margin: 4px 0;
  padding: 20px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.prose .pullquote cite  {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  font-style: normal;
  color: var(--muted-2);
}

.prose .sources  {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--muted-2);
}

.prose .sources h3  {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0;
}

.prose .sources ul  { gap: 7px; font-size: 0.82rem; }

.prose .sources a  { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

.prose .sources a:hover  { color: var(--gold-ink); }

.prose .figure-note  { font-size: 0.8rem; color: var(--muted-2); margin-top: -12px; }

/* ---------- Blog : recherche & pagination ---------- */

.blog-tools  {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 44px;
}

.blog-search  {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 340px;
  max-width: 560px;
}

.blog-search input  {
  width: 100%;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.94rem;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-search input::placeholder  { color: var(--muted-2); }

.blog-search input:focus  {
  outline: none;
  border-color: var(--gold-ink);
  box-shadow: 0 0 0 3px rgba(138, 94, 18, 0.18);
}

.blog-count  {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}

.blog-empty  {
  margin-top: 30px;
  padding: 34px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}

.pagination  {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 34px;
}

.pagination[hidden]  { display: none; }

.page-btn  {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xs);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.page-btn svg  { width: 16px; height: 16px; }

.page-btn:hover  { border-color: var(--gold); color: var(--gold-ink); }

.page-btn.is-current  {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  cursor: default;
}

.page-btn.page-arrow  { min-width: auto; padding: 0 16px; }

.page-btn.is-disabled,
.page-btn:disabled  {
  opacity: 0.45;
  cursor: not-allowed;
  color: var(--muted);
  border-color: var(--line);
}

.page-btn.is-disabled:hover,
.page-btn:disabled:hover  { border-color: var(--line); color: var(--muted); }

.page-ellipsis  {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 42px;
  color: var(--muted-2);
}

@media (max-width: 620px) {
.page-btn.page-arrow span  { display: none; }
.page-btn.page-arrow  { padding: 0 12px; }
}

/* ============================================================
   ACCUEIL — simulations, catalogue en bandes, carrousel blog
   ============================================================ */

/* ---------- Cartes de simulation ---------- */

.sim-grid  {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.sim-card  {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 20px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.sim-card:hover  {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-2);
}

.sim-head  {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sim-title  {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.sim-sub  { margin-top: 4px; font-size: 0.82rem; color: var(--muted); }

.sim-chart  {
  position: relative;
  min-height: 252px;
  max-width: 100%;
}

.sim-chart svg  { max-width: 100%; }

.sim-chart:not(.sim-chart--donut) svg  {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.sim-chart--donut  { display: grid; place-items: start center; }

.sim-card .stat-grid  { margin-bottom: 0; }

.sim-card .tool-cta  { padding-top: 4px; }

.sim-card .sim-cta  { margin-top: auto; }

/* ---------- Catalogue en bandes ---------- */

.tool-grid--rows  {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tool-card--row  {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.tool-card--row .tool-icon  { width: 40px; height: 40px; border-radius: 10px; }

.tool-card--row .tool-icon svg  { width: 20px; height: 20px; }

.row-copy  {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.row-top  {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tool-card--row .tool-title  { font-size: 0.98rem; }

.tool-card--row .tool-desc  {
  font-size: 0.82rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-arrow  {
  flex: none;
  color: var(--muted-2);
  transition: transform 0.18s ease, color 0.18s ease;
}

.row-arrow svg  { width: 16px; height: 16px; display: block; }

.tool-card--row:hover .row-arrow  { transform: translateX(3px); color: var(--gold-ink); }

/* ---------- Carrousel du blog ---------- */

.slider-tools  {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.slider-arrows  { display: flex; gap: 8px; }

.slider-btn  {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.slider-btn svg  { width: 17px; height: 17px; }

.slider-btn:hover  { border-color: var(--gold); color: var(--gold-ink); }

.slider-btn:disabled  { opacity: 0.35; cursor: not-allowed; }

.slider-btn:disabled:hover  { border-color: var(--line-2); color: var(--ink); }

.slider  {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}

.slider::-webkit-scrollbar  { display: none; }

.slider.is-dragging  {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.slider:focus-visible  {
  outline: 2px solid var(--gold-ink);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.slider-track  {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 4px 4px 10px;
  width: max-content;
  box-sizing: border-box;
}

.slide  {
  flex: 0 0 auto;
  width: min(400px, 84vw);
  max-width: 100%;
  scroll-snap-align: start;
  display: flex;
  box-sizing: border-box;
}

.blog-card  {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 22px 20px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.blog-card::after  {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.blog-card:hover  {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-2);
}

.blog-card:hover::after  { transform: scaleX(1); }

.blog-card-title  {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.blog-card-desc  {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.blog-card .tool-cta  { margin-top: 4px; }

.slider-status  {
  margin-top: 14px;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted-2);
}

/* ---------- Responsive ---------- */

@media (max-width: 1060px) {
.sim-grid  { grid-template-columns: minmax(0, 1fr); }
.sim-chart--donut  { place-items: center; }
}

@media (max-width: 940px) {
.slider-tools  { width: 100%; justify-content: space-between; }
}

@media (max-width: 820px) {
.tool-grid--rows  { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
.sim-card  { padding: 18px 16px 16px; }
.slide  { width: min(340px, 88vw); }
.slider-track  { gap: 14px; }
.slider-arrows  { display: none; }
.slider  { cursor: auto; }
}

/* ---------- Catalogue en accordéon (accueil) ---------- */

.acc-list  {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 4px;
}

.acc  {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.acc[open]  {
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}

.acc summary  { list-style: none; cursor: pointer; }

.acc summary::-webkit-details-marker  { display: none; }

.acc summary:focus-visible  { outline: 2px solid var(--gold-ink); outline-offset: -2px; }

.acc-head  {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  transition: background 0.15s ease;
}

.acc summary:hover .acc-head  { background: rgba(14, 26, 43, 0.02); }

.acc-num  {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 0.8rem;
  font-weight: 700;
  flex: none;
}

.acc-title-wrap  {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.acc-title  {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
}

.acc-sub  { font-size: 0.85rem; color: var(--muted); }

.acc-count  {
  margin-left: auto;
  flex: none;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.acc-caret  {
  flex: none;
  color: var(--muted-2);
  transition: transform 0.2s ease;
}

.acc-caret svg  { width: 16px; height: 16px; display: block; }

.acc[open] .acc-caret  { transform: rotate(180deg); }

.acc-body  {
  padding: 6px 22px 22px;
  border-top: 1px dashed var(--line);
}

@media (max-width: 620px) {
.acc-head  { gap: 12px; padding: 14px 16px; }
.acc-sub, .acc-count  { display: none; }
.acc-body  { padding: 4px 14px 16px; }
}

/* Écran très étroit : on autorise la césure, impossible de rogner le titre */
@media (max-width: 480px) {
  .hero h1 em { white-space: normal; }
}

/* Chip « barème en vigueur » (tête des nouveaux outils fiscalité / crédit) */
.bareme-chip {
  display: block;
  width: fit-content;
  margin: 6px 0 24px;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.75rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--muted);
}

/* ============================================================
   Correctifs audit sécurité/qualité (v13) : remplacement des
   attributs style="" par des classes (CSP style-src sans
   'unsafe-inline'), et focus clavier pour l'a11y des graphiques.
   ============================================================ */
.link-underline   { text-decoration: underline; }
.eyebrow--gap     { margin-bottom: 18px; }
.flush-top        { margin-top: 0; }
.mt-12            { margin-top: 12px; }
.mt-14            { margin-top: 14px; }
.mt-22            { margin-top: 22px; }
.mt-26            { margin-top: 26px; }
.table-wrap--tall { max-height: 320px; }

/* Outil fiscalité des gains : le comparatif est pleine largeur
   sous la grille calcul/résultats */
.calc-comparatif  { margin-top: 24px; margin-bottom: 24px; }

.calc-comparatif .result-block  { padding-top: 0; margin-top: 0; border-top: 0; }

/* Les enveloppes en 1re colonne restent des libellés à retrait possible */
#tbl-comparatif tbody th  { white-space: normal; font-weight: 500; }
.field-hint--left { text-align: left; }
.prose--narrow    { max-width: 74ch; }
.seg-soft         { white-space: normal; }
.dn-wrap          { display: grid; place-items: center; gap: 6px; }

.dn-seg:focus-visible,
.legend li:focus-visible {
  outline: 2px solid var(--gold-ink);
  outline-offset: 2px;
  border-radius: 2px;
  cursor: pointer;
}
