/* Mon Cauris — feuille de style unique, sans dépendance externe */
:root {
  --bg: #fbf8f1;
  --surface: #ffffff;
  --ink: #14231d;
  --muted: #55625c;
  --line: #e4ddcc;
  --brand: #0f3d2e;
  --brand-2: #17624a;
  --gold: #c8932b;
  --gold-soft: #fbefd0;
  --danger: #a12b1f;
  --ok: #17624a;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(20 35 29 / 6%), 0 8px 24px rgb(20 35 29 / 6%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1613;
    --surface: #15201c;
    --ink: #eef3ef;
    --muted: #a7b5ae;
    --line: #26352f;
    --brand: #8fd3b5;
    --brand-2: #b6e6d0;
    --gold: #e9c46a;
    --gold-soft: #2a2414;
    --danger: #ff8a7a;
    --ok: #8fd3b5;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand-2); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin: 2.2rem 0 .8rem; }
h3 { font-size: 1.15rem; margin: 1.4rem 0 .4rem; }
p { margin: 0 0 1rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }

/* En-tête */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span b { color: var(--gold); }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { padding: .5rem .7rem; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav a[aria-current="page"], .nav a:hover { background: var(--gold-soft); color: var(--ink); }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: .5rem .8rem; font: inherit; font-weight: 700; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--line); padding: .5rem 16px 1rem; flex-direction: column; }
  .nav.open { display: flex; }
  .nav a { padding: .8rem; font-size: 1.05rem; }
}

/* Héros */
.hero { padding: 3.2rem 0 2.4rem; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; padding: 0; list-style: none; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .9rem; font-weight: 600; color: var(--muted); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.2rem; border-radius: 12px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #0e1613; } }
.btn-gold { background: var(--gold); color: #1d1606; }
.btn-gold:hover { filter: brightness(1.05); color: #1d1606; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand-2); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }

/* Cartes */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.card h3 { margin-top: .2rem; }
.card p { color: var(--muted); }
a.card { display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: border-color .15s; }
a.card:hover { border-color: var(--gold); }
.card .icon { font-size: 1.8rem; line-height: 1; }
/* « Utiliser l'outil » / « Voir l'offre » toujours alignés en bas des cartes */
.card .more { font-weight: 700; color: var(--brand-2); margin-top: auto; padding-top: .4rem; }

/* Formulaires et calculateurs */
.tool { display: grid; gap: 1.2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .tool { grid-template-columns: 360px 1fr; } }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; }
.field .hint { display: block; font-size: .88rem; color: var(--muted); margin-top: .3rem; }
.input-wrap { display: flex; align-items: stretch; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.input-wrap:focus-within { border-color: var(--brand-2); }
.input-wrap input, .input-wrap select { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; padding: .7rem .8rem; }
.input-wrap input:focus, .input-wrap select:focus { outline: none; }
.input-wrap .unit { display: flex; align-items: center; padding: 0 .8rem; background: var(--gold-soft); color: var(--ink); font-weight: 700; font-size: .95rem; white-space: nowrap; }
.currency { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 1rem; }
.currency button { font: inherit; font-weight: 700; padding: .5rem 1rem; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; min-height: 44px; }
.currency button[aria-pressed="true"] { background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .currency button[aria-pressed="true"] { color: #0e1613; } }

.results { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.stat .label { font-size: .9rem; color: var(--muted); font-weight: 600; }
.stat .value { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 800; color: var(--ink); word-break: break-word; }
.stat.main { background: var(--brand); border-color: var(--brand); }
.stat.main .label, .stat.main .value { color: #fff; }
@media (prefers-color-scheme: dark) { .stat.main .label, .stat.main .value { color: #0e1613; } }
.message { background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 10px; padding: .9rem 1rem; margin: 0 0 1rem; }

.chart { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .9rem; color: var(--muted); margin: .4rem 0 1rem; padding: 0; list-style: none; }
.legend li::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .4rem; vertical-align: -1px; background: var(--c); }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: right; padding: .5rem .4rem; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
.table-scroll { overflow-x: auto; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; margin: .8rem 0; }
details summary { cursor: pointer; font-weight: 700; }

.bar { height: 14px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--c, var(--brand-2)); border-radius: 999px; }
.split-row { margin-bottom: 1rem; }
.split-row .top { display: flex; justify-content: space-between; gap: 1rem; font-weight: 700; margin-bottom: .3rem; flex-wrap: wrap; }
.split-row .top small { color: var(--muted); font-weight: 600; }

/* Test */
.quiz fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; }
.quiz legend { font-weight: 800; font-size: 1.1rem; margin-bottom: .6rem; }
.option { display: flex; align-items: flex-start; gap: .7rem; padding: .8rem 1rem; border: 2px solid var(--line); border-radius: 12px; margin-bottom: .5rem; cursor: pointer; background: var(--surface); }
.option:has(input:checked) { border-color: var(--brand-2); background: var(--gold-soft); }
.option input { margin-top: .3rem; width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; }
.progress { position: sticky; top: 64px; background: var(--bg); padding: .6rem 0; z-index: 2; }
.progress p { margin: 0 0 .3rem; font-size: .9rem; color: var(--muted); font-weight: 600; }

/* Bons plans */
.offer { display: flex; flex-direction: column; gap: .3rem; }
.offer .tag { display: inline-block; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--gold); }
.offer .partner { align-self: flex-start; font-size: .78rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; }
/* Boutons des cartes alignés sur la même ligne, en bas */
.offer .btn-row { margin-top: auto; padding-top: 1rem; }
.offer .btn-row .btn { width: 100%; }
.convert { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .convert { grid-template-columns: 1fr 1fr; } }
.offer dl { margin: .4rem 0 0; }
.offer dt { font-weight: 800; margin-top: .7rem; }
.offer dd { margin: .2rem 0 0; color: var(--muted); }
.disclosure { font-size: .92rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; padding: .8rem 1rem; }

/* Bandeau d'appel */
.cta-band { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 1.6rem; margin: 2.5rem 0; }
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: rgb(255 255 255 / 85%); }
@media (prefers-color-scheme: dark) { .cta-band { background: #1d2c26; } }

/* Contenu éditorial */
.prose { margin-top: 2.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.faq h3 { margin-top: 1.4rem; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin: 1.2rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; }
.breadcrumb li + li::before { content: "›"; margin-right: .3rem; }
.page-head { padding: 1.4rem 0 1rem; }
.page-head p { color: var(--muted); font-size: 1.08rem; max-width: 680px; }

/* Pied de page */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); background: var(--surface); padding: 2rem 0; font-size: .95rem; color: var(--muted); }
.site-footer .cols { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.site-footer h2 { font-size: 1rem; margin: 0 0 .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer .small { margin-top: 1.5rem; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .btn-row, .currency { display: none; } }
