/* Solde Santé – style épuré : une couleur d'accent, beaucoup d'air, des filets fins. */
:root {
  --bg: #ffffff;
  --text: #16181b;
  --muted: #6b7078;
  --line: #e7e8ea;
  --soft: #f5f6f7;
  --accent: #1f5f4a;
  --accent-ink: #ffffff;
  --danger: #b42318;
  --radius: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416;
    --text: #e9eaec;
    --muted: #9aa0a8;
    --line: #2a2e33;
    --soft: #1a1d20;
    --accent: #6cc5a3;
    --accent-ink: #0d1f19;
    --danger: #ff8a80;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1 { font-size: clamp(28px, 4.5vw, 40px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; margin: 0 0 16px; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 12px; }
p { margin: 0 0 12px; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 40px; padding-bottom: 64px; min-height: 70vh; }
.narrow { max-width: 560px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 60ch; }
.eyebrow { font-size: 14px; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.figure { font-size: 36px; font-weight: 650; letter-spacing: -0.02em; margin: 0 0 4px; font-variant-numeric: tabular-nums; }

/* En-tête et pied de page */
.site-header { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; flex-wrap: wrap; }
.brand { font-weight: 650; text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav .is-current { color: var(--text); }
.nav .btn { color: var(--accent-ink); }
.footer { border-top: 1px solid var(--line); padding-top: 24px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.footer a { color: var(--muted); }

/* Boutons et liens-boutons */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: var(--radius);
       padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-sm { padding: 6px 12px; font-size: 14px; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.inline { display: inline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sections */
.hero { padding: 24px 0 48px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.section { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section-head, .page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.empty { text-align: left; }
.steps { padding-left: 20px; max-width: 60ch; }
.steps li { margin-bottom: 8px; }

/* Formulaires */
.form { display: grid; gap: 20px; margin-top: 24px; }
.field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, legend { font-size: 14px; font-weight: 600; }
legend { margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
input[type="email"], input[type="password"], input[type="date"], input:not([type]), input[type="text"], select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--text); font: inherit; min-height: 44px;
}
input[type="file"] { font: inherit; }
.choice { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 400; margin-bottom: 6px; }
.choice input { margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.notice { background: var(--soft); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; }
.notice p { margin: 4px 0 0; }

/* Messages */
.flash { padding: 12px 16px; border-radius: var(--radius); background: var(--soft); border-left: 3px solid var(--accent); margin-bottom: 24px; }
.flash.err { border-left-color: var(--danger); }

/* Tableaux */
.scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 12px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .is-off td { color: var(--muted); }
.note { display: block; font-size: 13px; color: var(--muted); }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-form select, .row-form input { width: auto; min-height: 36px; padding: 6px 8px; font-size: 14px; }
.row-form input { width: 96px; }
@media (max-width: 639px) {
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 2px 0; }
  .table td:nth-child(2) { grid-column: 1 / -1; order: 3; }
}

/* Pages de contenu */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 36px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0 20px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font-size: 13px; color: var(--muted); font-weight: 600; }
.prose .todo { background: var(--soft); padding: 0 4px; border-radius: 4px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 0 0 32px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* Mention LAMal, calculateur, listes simples */
.figure .muted { font-size: 16px; font-weight: 400; letter-spacing: 0; }
.scope-note { margin-top: 20px; font-size: 14px; color: var(--muted); max-width: 60ch; padding-left: 12px; border-left: 2px solid var(--line); }
.calc-form { display: grid; gap: 16px; }
@media (min-width: 640px) { .calc-age { max-width: calc(50% - 8px); } }
select:disabled { opacity: 0.55; }
.plain-list { list-style: none; padding: 0; margin: 16px 0 24px; border-top: 1px solid var(--line); }
.plain-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }

/* Administration */
.wrap-wide { max-width: 1180px; }
.admin h2 { margin-top: 40px; }
.admin h3 { font-size: 15px; margin: 20px 0 8px; }
.admin-login { margin-top: 40px; }
.alerts { border: 1px solid var(--danger); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 8px; }
.alerts ul { margin: 6px 0 0; padding-left: 20px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 2px; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 13px; color: var(--muted); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.chart { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 10px; }
.chart-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.bars { display: block; fill: var(--accent); }
.cols { display: grid; grid-template-columns: 1fr; gap: 0 40px; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.admin .table td:first-child { width: 55%; }

/* Onglets des personnes */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin: 0 0 28px; scrollbar-width: thin; border-bottom: 1px solid var(--line); }
.tab { flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 14px; text-decoration: none; color: var(--muted);
       border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 15px; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab-meta { font-size: 13px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.tab-add { color: var(--accent); }
.links { display: flex; gap: 16px; flex-wrap: wrap; }
.danger-zone { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin: 8px 0 24px; }
.table.family td a { text-decoration: none; }

/* Comparaison */
.notice-strong { border-left: 3px solid var(--accent); margin-bottom: 28px; }
.compare-form { margin-top: 8px; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; margin: 8px 0 24px; border-top: 1px solid var(--line); }
.compare-grid > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.compare-col-head { font-size: 13px; font-weight: 600; color: var(--muted); }
.compare-label { font-weight: 600; }
.compare-value { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.delta { display: inline-block; font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 6px; }
@media (max-width: 639px) {
  .compare-grid { grid-template-columns: 1fr 1fr; }
  .compare-grid > div:first-child { display: none; }
  .compare-label { grid-column: 1 / -1; border-bottom: 0 !important; padding-bottom: 0 !important; }
  .compare-value { font-size: 18px; }
}

/* Ancien modèle */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500;
         line-height: 1.6; color: var(--muted); background: var(--soft); border: 1px solid var(--line); vertical-align: middle; white-space: nowrap; cursor: help; }

/* Années, cumul, « assuré depuis » */
.years { display: flex; gap: 4px; }
.years a { padding: 3px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); border: 1px solid transparent; }
.years a.is-active { color: var(--text); border-color: var(--line); background: var(--soft); font-weight: 600; }
.note.carried { color: var(--accent); }
.li-main { display: grid; gap: 6px; min-width: 0; }
.since-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.since-form select { width: auto; min-height: 34px; padding: 4px 8px; font-size: 14px; }

/* Texte réservé aux lecteurs d'écran */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.carry { color: var(--accent); }

.since-field select { max-width: 200px; }

/* Accueil : en-tête en deux colonnes, exemple chiffré, cartes de prestations */
.hero-split { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
@media (min-width: 860px) { .hero-split { grid-template-columns: 1.25fr 1fr; gap: 48px; } }
.hero-split h1 { max-width: 16ch; }
.example-card { margin: 0; border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: var(--bg);
                box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .06); }
.example-kicker { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.example-total { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; color: var(--accent); margin: 0 0 18px; font-variant-numeric: tabular-nums; }
.example-total span { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.example-rows { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 14px; }
.example-rows li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 15px; }
.example-amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.example-bar { grid-column: 1 / -1; width: 100%; height: 6px; display: block; }
.bar-bg { fill: var(--soft); }
.bar-fg { fill: var(--accent); }
.example-note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.narrow-lead { max-width: 68ch; }
.benefit-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 24px 0 14px; }
.benefit-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 4px; align-content: start; }
.benefit-card h3 { font-size: 15px; font-weight: 600; margin: 10px 0 0; }
.benefit-amount { font-size: 20px; font-weight: 650; letter-spacing: -0.01em; margin: 0; }
.benefit-src { font-size: 13px; color: var(--muted); margin: 0; }
.benefit-card .ico { color: var(--accent); }
.benefit-card-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.benefit-card-accent .ico, .benefit-card-accent .benefit-src { color: var(--accent-ink); opacity: .85; }
.steps-cards { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 12px; max-width: none; }
@media (min-width: 760px) { .steps-cards { grid-template-columns: repeat(3, 1fr); } }
.steps-cards li { counter-increment: step; border-top: 2px solid var(--accent); padding-top: 12px; margin: 0; }
.steps-cards li::before { content: counter(step); display: block; font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.steps-cards li strong { display: block; }

/* Bandeau de confiance */
.trust { display: grid; grid-template-columns: 1fr; gap: 12px; margin: -8px 0 40px; }
@media (min-width: 760px) { .trust { grid-template-columns: repeat(3, 1fr); } }
.trust-item { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--soft); }
.trust-item .ico { flex: 0 0 auto; color: var(--accent); }
.trust-item strong { display: block; font-size: 15px; }
.trust-item p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.trust-item-accent { background: transparent; border: 1px solid var(--accent); }
.footer-note { font-size: 12px; }

textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
           color: var(--text); font: inherit; resize: vertical; min-height: 140px; }
.msg-list { display: grid; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.msg-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: 13px; color: var(--muted); }
.msg-body { white-space: pre-wrap; margin: 8px 0; font-size: 15px; }
.msg.is-done { opacity: .6; }

/* Personnes : boutons qui passent à la ligne (plus de barre de défilement) */
.tabs { flex-wrap: wrap; overflow: visible; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.tab { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; margin: 0; font-size: 15px; line-height: 1.3;
       color: var(--text); background: var(--bg); transition: border-color .15s, background .15s; }
.tab:hover { border-color: var(--muted); }
.tab.is-active { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }
.tab.is-active .tab-meta { color: var(--bg); opacity: .75; }
.tab-family { gap: 6px; align-items: center; background: var(--soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.tab-family.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tab-family.is-active .tab-meta { color: var(--accent-ink); }
.tab-family svg { flex: 0 0 auto; }
.tabs-sep { width: 1px; align-self: stretch; background: var(--line); margin: 4px 2px; }
.tab-add { border-style: dashed; color: var(--accent); background: transparent; }
.tab-add:hover { border-color: var(--accent); }

/* Sélecteur de langue (en haut à droite) */
.lang-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.lang-switch .lang { padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.lang-switch .lang.is-current { background: var(--text); color: var(--bg); }
.lang-switch .lang:hover { color: var(--text); }
.lang-switch .lang.is-current:hover { color: var(--bg); }

/* Tarifs */
.pricing-head { max-width: 720px; margin-bottom: 28px; }
.plans { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 36px; }
@media (min-width: 820px) { .plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.plan { border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.plan h2 { margin: 0; font-size: 22px; }
.plan-idea { color: var(--muted); margin: 0; min-height: 3em; }
.plan-price { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.plan-price span { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-price-soon { font-size: 20px; color: var(--muted); }
.plan-note { font-size: 13px; color: var(--muted); margin: 0 0 14px; min-height: 1.5em; }
.plan .btn { margin-top: auto; text-align: center; }
.plan-featured { border: 2px solid var(--accent); box-shadow: 0 12px 32px rgba(16, 24, 40, .08); }
.plan-flag { position: absolute; top: -12px; left: 20px; margin: 0; padding: 2px 10px; border-radius: 999px; background: var(--accent);
             color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.plan-soon { background: var(--soft); border-style: dashed; }
.btn.is-static { cursor: default; opacity: .75; }
.btn.is-static:hover { filter: none; }
.compare-plans td:not(:first-child), .compare-plans th:not(:first-child) { text-align: center; }
.compare-plans .col-featured { background: var(--soft); font-weight: 600; }
.compare-plans .ok { color: var(--accent); font-weight: 700; }
.tester-box { border: 1px solid var(--accent); border-radius: 16px; padding: 20px 24px; }
.pricing-notes { padding-left: 20px; color: var(--muted); }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }

.admin-search input { width: min(420px, 100%); min-height: 38px; }
