/* Thème « jauge » : fond gris-bleu clair, cartes blanches arrondies, turquoise (net) et orange (cotisations). */
:root {
  --ink: #0f172a;
  --paper: #f1f5f9;
  --card: #ffffff;
  --rule: #cbd5e1;
  --hair: #e2e8f0;
  --muted: #64748b;
  --accent: #0f766e;
  --fill: #0ea5a4;
  --tint: #ccfbf1;
  --amber: #f59e0b;
  --serif: 'Inter', system-ui, 'Segoe UI', sans-serif;
}

body, body.bg-slate-50 { background: var(--paper); color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; }
.num { font-family: var(--serif) !important; font-variant-numeric: lining-nums tabular-nums; }

.text-rose-600 { color: #b45309 !important; }
.text-slate-400 { color: #8494a9; }

input[type="range"] { accent-color: var(--fill); }
.bg-brand-500 { background-color: var(--ink) !important; }
.hover\:bg-brand-600:hover { background-color: #1e293b !important; }
.btn-feedback { background: #fff; border: 1px solid var(--rule) !important; border-radius: 8px; color: var(--ink); }
.btn-feedback:hover { background: var(--paper); }
#btn-copy { background: var(--ink); color: #fff; border-color: var(--ink) !important; }
#btn-copy:hover { background: #1e293b; }

/* ---------- Cadres des pages calculateurs secondaires ---------- */
section.border-2.border-slate-900 {
  border: 1px solid var(--hair); border-radius: 16px; background: var(--card); overflow: hidden;
}
div.border-2.border-slate-900 { border: 1px solid var(--hair); border-radius: 12px; background: transparent; overflow: hidden; }
.bg-slate-900 { background: #f0fdfa !important; color: var(--ink); border: 1px solid #99f6e4; border-radius: 12px; }
.bg-slate-900.text-white, .bg-slate-900 .text-white { color: var(--ink); }
.bg-slate-900 .text-slate-300 { color: var(--muted); }
.bg-slate-900 .text-brand-400 { color: var(--accent); }
.bg-slate-900 .num.text-2xl, .bg-slate-900 .text-2xl.num { font-size: 2.3rem; line-height: 1; font-weight: 600; letter-spacing: -0.02em; color: var(--accent); }
.bg-slate-900.inline-flex { border-color: #99f6e4; }
.bg-slate-900.py-2\.5:not(.inline-flex) {
  background: transparent !important; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; color: var(--muted);
  font-family: 'Inter', sans-serif; letter-spacing: 0.1em; text-transform: uppercase;
}
.bg-slate-900.py-2\.5:not(.inline-flex) .text-white, .bg-slate-900.py-2\.5:not(.inline-flex) .text-slate-300 { color: var(--muted); }
.bg-slate-900.py-2\.5:not(.inline-flex) .text-brand-400 { color: var(--accent); }
.bg-slate-900.py-2\.5:not(.inline-flex) .num { font-family: 'Inter', sans-serif !important; font-size: 0.7rem; }

#chart-bar { height: 12px; border-radius: 999px; background: var(--hair); }

/* ---------- Photos et schémas des articles ---------- */
figure.hero-photo, figure.hero-diagram { margin: 0 0 1.75rem; border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; background: var(--card); }
figure.hero-photo img, figure.hero-diagram img { display: block; width: 100%; height: auto; }
figure.hero-diagram { margin-top: 1.25rem; }
figure.hero-photo figcaption, figure.hero-diagram figcaption {
  font-size: 0.72rem; color: var(--muted); padding: 0.5rem 0.85rem; border-top: 1px solid var(--hair); line-height: 1.4;
}
figure.hero-photo figcaption a { text-decoration: underline; }

/* AdSense : emplacements publicitaires vides masqués tant que le site n'est pas approuvé.
   Après approbation, supprimer ce bloc pour réafficher les encarts. */
.ad-slot { display: none !important; }
aside:has(.ad-slot) { display: none !important; }
div:has(> .ad-slot:only-child) { display: none !important; }

/* ================= Navigation commune (en-tête + pied de page) ================= */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--hair); }
.site-header__in { max-width: 1120px; margin: 0 auto; padding: 0.65rem 1rem; display: flex; align-items: center; gap: 1.25rem; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); flex-shrink: 0; }
.brand span { color: var(--fill); }
.main-nav { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.main-nav > a, .dd-btn {
  font: 500 0.9rem Inter, sans-serif; padding: 0.45rem 0.85rem; color: var(--ink); background: none; border: 0;
  border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.main-nav > a:hover, .dd-btn:hover { background: var(--paper); }
.main-nav > a[aria-current], .dd-btn[aria-current] { background: var(--tint); color: #115e59; }
.dd { position: relative; }
.dd-btn::after { content: "▾"; margin-left: 0.35rem; font-size: 0.75rem; color: var(--muted); }
.dd-panel {
  display: none; position: absolute; right: 0; top: calc(100% + 0.6rem); width: min(600px, 92vw); z-index: 50;
  background: #fff; border: 1px solid var(--hair); border-radius: 16px; padding: 0.5rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14); grid-template-columns: 1fr 1fr; gap: 0.15rem;
}
.dd.open .dd-panel { display: grid; }
.dd-panel a { display: block; padding: 0.65rem 0.8rem; color: var(--ink); border-radius: 10px; }
.dd-panel a:hover { background: var(--paper); }
.dd-panel a[aria-current] { background: var(--tint); }
.dd-panel strong { display: block; font-size: 0.92rem; font-weight: 600; }
.dd-panel small { display: block; margin-top: 0.1rem; color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
.burger { display: none; margin-left: auto; font: 500 0.9rem Inter, sans-serif; padding: 0.4rem 0.9rem; border: 1px solid var(--rule); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
@media (max-width: 767px) {
  .burger { display: inline-flex; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--hair); padding: 0.25rem 1rem 1rem; max-height: calc(100vh - 3.5rem); overflow-y: auto; }
  .site-header.menu-open .main-nav { display: flex; }
  .main-nav > a, .dd-btn { text-align: left; padding: 0.75rem 0.5rem; border-radius: 8px; }
  .dd-btn { cursor: default; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; pointer-events: none; background: none !important; }
  .dd-btn::after { content: ""; }
  .dd-panel { display: grid; position: static; width: auto; border: 0; box-shadow: none; padding: 0; grid-template-columns: 1fr; }
}

.site-footer { background: var(--ink); color: #cbd5e1; margin-top: 3rem; }
.site-footer__in { max-width: 1120px; margin: 0 auto; padding: 2.25rem 1rem 1.75rem; }
.fcols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1.5rem; }
@media (min-width: 768px) { .fcols { grid-template-columns: 1.1fr 1.3fr 1.1fr 1fr; } }
.fcols h3 { font: 600 0.7rem Inter, sans-serif; text-transform: uppercase; letter-spacing: 0.12em; color: #94a3b8; margin: 0 0 0.6rem; }
.fcols a, .fcols button { display: block; font: 400 0.9rem Inter, sans-serif; padding: 0.22rem 0; color: #e2e8f0; background: none; border: 0; cursor: pointer; text-align: left; }
.fcols a:hover, .fcols button:hover { color: #5eead4; text-decoration: underline; }
.fnote { border-top: 1px solid #1e293b; margin-top: 1.75rem; padding-top: 1rem; font-size: 0.78rem; color: #94a3b8; line-height: 1.55; }
.fnote p + p { margin-top: 0.5rem; }
.fnote strong { color: #e2e8f0; font-weight: 600; }

/* ================= Calculateur : formulaire + résultat côte à côte ================= */
.page-wrap { max-width: 1120px; margin: 0 auto; padding: 0 1rem; }
.hero-compact { padding: 1.75rem 0 1.1rem; }
.hero-compact h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.12; }
.hero-compact h1 span { color: #0d9488; }
.hero-compact p { margin-top: 0.5rem; color: var(--muted); max-width: 40rem; }

.calc-tabs { display: inline-flex !important; width: auto; gap: 0; margin-bottom: 1rem; background: var(--hair) !important; padding: 3px !important; border-radius: 10px !important; border: 0 !important; }
.calc-tabs .toggle-btn { padding: 0.45rem 1.2rem; border: 0; border-radius: 8px; font-size: 0.9rem; background: transparent !important; color: var(--muted); box-shadow: none !important; }
.calc-tabs .toggle-btn.bg-white { background: #fff !important; color: var(--ink) !important; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12) !important; }

.calc-grid { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 1024px) {
  .calc-grid:has(#panel-resultats:not(.hidden)) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}
.calc-card { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; }
.calc-card__head { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem 0; font: 500 0.7rem Inter, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.calc-card__body { padding: 0.9rem 1.25rem 1.25rem; }
@media (min-width: 640px) { .calc-card__head { padding: 1.2rem 1.5rem 0; } .calc-card__body { padding: 1rem 1.5rem 1.5rem; } }

.fld-label { display: block; font-size: 0.85rem; font-weight: 500; color: #475569; margin-bottom: 0.4rem; }
.fld-hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.4rem; line-height: 1.45; }
.amount-main input { font-size: 2rem !important; padding: 0.1rem 1.6rem 0.2rem 0 !important; font-weight: 500; border-width: 0 0 2px 0 !important; border-color: var(--ink) !important; border-radius: 0 !important; background: transparent; }
.amount-main input:focus { outline: none; box-shadow: none !important; border-color: var(--fill) !important; }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chips label { position: relative; flex: 0 0 auto; padding: 0.4rem 0.95rem !important; font-size: 0.85rem !important; border-radius: 999px !important; color: #475569; background: #fff; }
.chips input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.chips label:has(:checked) { background: var(--tint) !important; border-color: var(--fill) !important; color: #115e59 !important; }
.chips label:has(:focus-visible) { outline: 2px solid var(--fill); outline-offset: 2px; }

.more { border-top: 1px solid var(--hair); margin-top: 1.25rem; padding-top: 0.2rem; }
.more > summary { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 0; font-weight: 500; font-size: 0.92rem; cursor: pointer; }
.more > summary small { font-weight: 400; color: var(--muted); font-size: 0.78rem; margin-left: 0.5rem; }
.more[open] > summary .chevron { transform: rotate(180deg); }
.more-body > * + * { margin-top: 1.1rem; }
.more-body h4 { font: 600 0.7rem Inter, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem; }

.res-label { font: 500 0.72rem Inter, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.res-big { font-size: 1.55rem; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.res-extra { margin-top: 0.7rem; font-size: 0.85rem; color: var(--accent); font-weight: 500; }
.gauge-wrap { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-top: 0.4rem; }
.gauge { width: 152px; height: 152px; border-radius: 50%; background: conic-gradient(#0ea5a4 0 78%, #f59e0b 78% 100%); display: flex; align-items: center; justify-content: center; flex: none; }
.gauge-in { width: 114px; height: 114px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 0.25rem; }
.gauge-in .res-label { margin-top: 0.2rem; font-size: 0.66rem; letter-spacing: 0.04em; text-transform: none; }
.gauge-legend { flex: 1; min-width: 210px; font-size: 0.88rem; }
.gauge-legend p { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.45rem; }
.gauge-legend .gp { margin-left: auto; color: var(--muted); font-size: 0.78rem; }
.gauge-legend b { margin-left: 0.6rem; font-weight: 600; min-width: 4.6rem; text-align: right; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-net { background: #0ea5a4; }
.dot-cot { background: #f59e0b; }
.res-pair { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin: 1.1rem 0 0.4rem; }
.res-pair > div { padding: 0.7rem 0; }
.res-pair > div + div { padding-left: 1rem; border-left: 1px solid var(--hair); }
.res-pair .num { font-size: 1.15rem; font-weight: 600; display: block; margin-top: 0.1rem; }
.res-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.res-actions button { font-size: 0.82rem; font-weight: 500; padding: 0.45rem 0.95rem; }
.res-links { display: grid; gap: 0.35rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--hair); font-size: 0.88rem; }
.res-links a { color: var(--accent); font-weight: 500; }
.res-links a:hover { text-decoration: underline; }

#mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: none; justify-content: space-between; align-items: center; padding: 0.7rem 1rem; background: var(--ink); color: #fff; }
#mobile-bar.show { display: flex; }
#mobile-bar .num { font-size: 1.35rem; font-weight: 600; }
@media (min-width: 1024px) { #mobile-bar.show { display: none; } }
#panel-resultats, #calculateur, [id^="h-"] { scroll-margin-top: 4.5rem; }

/* ================= Sections de la page d'accueil ================= */
.sec { padding-top: 2.5rem; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.9rem; }
.sec-head h2 { font-size: 1.25rem; }
.sec-head a { font-size: 0.88rem; color: var(--accent); font-weight: 500; white-space: nowrap; }
.sec-head a:hover { text-decoration: underline; }
.cards { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards.c3 { grid-template-columns: repeat(3, 1fr); } .cards.c4 { grid-template-columns: repeat(4, 1fr); } }
.card { display: block; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; color: var(--ink); overflow: hidden; transition: border-color .15s, transform .15s; }
.card:hover { border-color: #5eead4; transform: translateY(-1px); }
.card--calc { padding: 1rem 1.1rem; }
.card--calc .ic { width: 24px; height: 24px; color: var(--fill); display: block; margin-bottom: 0.45rem; }
.card--calc strong { display: block; font-size: 1rem; font-weight: 600; }
.card--calc span { display: block; margin-top: 0.2rem; font-size: 0.85rem; color: var(--muted); line-height: 1.4; }
.card--calc em { display: inline-block; margin-top: 0.55rem; font-style: normal; font-size: 0.82rem; color: var(--accent); font-weight: 500; }
.card--guide img { display: block; width: 100%; height: auto; aspect-ratio: 16/7; object-fit: cover; }
.card--guide div { padding: 0.8rem 1rem 1rem; }
.card--guide strong { display: block; font-size: 1rem; font-weight: 600; line-height: 1.25; }
.card--guide span { display: block; margin-top: 0.3rem; font-size: 0.82rem; color: var(--muted); line-height: 1.4; }

/* « Affiner le calcul » : barre d'action bien visible */
.more--cta { border: 0; margin-top: 1.5rem; padding: 0; }
.more--cta > summary { background: #f0fdfa; border: 1.5px solid var(--fill); border-radius: 12px; padding: 0.8rem 1rem; color: #115e59; gap: 0.75rem; }
.more--cta > summary:hover { background: var(--tint); }
.more--cta[open] > summary { border-radius: 12px 12px 0 0; }
.more--cta .cta-l { display: flex; align-items: center; gap: 0.75rem; text-align: left; }
.more--cta .cta-l svg { flex: none; color: var(--fill); }
.more--cta .cta-l b { display: block; font-size: 1rem; font-weight: 600; }
.more--cta .cta-l small { display: block; margin: 0.1rem 0 0; color: #0f766e; font-weight: 400; font-size: 0.8rem; line-height: 1.35; }
.cta-pill { flex: none; background: var(--fill); color: #fff; font-size: 0.8rem; font-weight: 600; padding: 0.35rem 0.8rem; border-radius: 999px; white-space: nowrap; }
.cta-pill::after { content: "Ouvrir +"; }
.more--cta[open] .cta-pill::after { content: "Fermer −"; }
.more--cta .more-body { border: 1.5px solid var(--fill); border-top: 0; border-radius: 0 0 12px 12px; padding: 1.1rem 1rem 1.25rem; }

/* Mention « paramètres vérifiés » sous les calculateurs */
.verif { max-width: 1120px; margin: 1.25rem auto 1.25rem; padding: 0 1rem; }
.verif--narrow { max-width: 792px; }
.verif-in { background: #fff; border: 1px solid var(--hair); border-radius: 14px; }
.verif-in > summary { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; cursor: pointer; list-style: none; }
.verif-in > summary::-webkit-details-marker { display: none; }
.verif-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--tint); color: #0f766e; display: flex; align-items: center; justify-content: center; }
.verif-txt { flex: 1; min-width: 0; }
.verif-txt b { display: block; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.verif-txt small { display: block; margin-top: 0.1rem; font-size: 0.78rem; color: var(--muted); }
.verif-more { flex: none; font-size: 0.8rem; font-weight: 500; color: var(--accent); white-space: nowrap; }
.verif-more::after { content: " ▾"; }
.verif-in[open] .verif-more::after { content: " ▴"; }
.verif-in > summary:hover .verif-more { text-decoration: underline; }
.verif-body { padding: 0 1rem 1rem 3.4rem; font-size: 0.82rem; line-height: 1.55; color: var(--muted); }
.verif-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.7rem; padding: 0; list-style: none; }
.verif-chips li { background: var(--paper); border: 1px solid var(--hair); border-radius: 999px; padding: 0.25rem 0.7rem; font-size: 0.78rem; color: #334155; }
.verif-body p { margin: 0 0 0.35rem; }
.verif-links a { color: var(--accent); text-decoration: underline; }
.verif-links span { margin: 0 0.4rem; color: #94a3b8; }
@media (max-width: 560px) {
  .verif-more { font-size: 0; }
  .verif-more::after { font-size: 0.95rem; }
  .verif-body { padding-left: 1rem; }
}
