/* Section Outils / calculateurs — pages statiques autonomes.
   Reprend la palette et les fontes de la landing Webflow sans dépendre de
   ses classes générées (qui changent à chaque republication). */

:root {
    --o-bg: #030416;
    --o-bg-soft: #090b22;
    --o-card: rgba(255, 255, 255, 0.035);
    --o-border: rgba(255, 255, 255, 0.1);
    --o-text: #ffffff;
    --o-muted: rgba(255, 255, 255, 0.58);
    --o-faint: rgba(255, 255, 255, 0.38);
    --o-blue: #3b4ee0;
    --o-blue-soft: rgba(59, 78, 224, 0.14);
    --o-green: #34d399;
    --o-red: #f87171;
    --o-radius: 16px;
    --o-max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Conteneur des pages outils, à l'intérieur du .main-wrapper Webflow. */
.o-page {
    max-width: var(--o-max);
    margin: 0 auto;
    padding: 90px 20px 40px;
    color: var(--o-text);
    font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}
@media (max-width: 767px) { .o-page { padding-top: 70px; } }

.o-page a { color: inherit; }

/* ── Fil d'Ariane + hero ────────────────────────────────────────────── */

.o-crumb { padding: 22px 0 0; font-size: 13px; color: var(--o-faint); }
.o-crumb a { text-decoration: none; color: var(--o-faint); }
.o-crumb a:hover { color: var(--o-text); }
.o-crumb span { margin: 0 6px; opacity: .5; }

.o-hero { position: relative; padding: 30px 0 40px; }
.o-hero::before {
    content: ''; position: absolute; top: -140px; left: -80px; width: 620px; height: 320px;
    background: radial-gradient(60% 60% at 30% 50%, rgba(59,78,224,.22), transparent 70%);
    filter: blur(20px); pointer-events: none; z-index: -1;
}
.o-hero h1 {
    font-size: clamp(2.05rem, 4.6vw, 3.15rem);
    line-height: 1.08; margin: 0 0 16px; letter-spacing: -0.035em; font-weight: 700;
    background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.72));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.o-hero p { color: var(--o-muted); font-size: 1.08rem; line-height: 1.62; margin: 0; max-width: 66ch; }
.o-badge {
    display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px;
    background: var(--o-blue-soft); border: 1px solid rgba(59, 78, 224, .3);
    color: #a5b0ff; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}

/* ── Calculateur ────────────────────────────────────────────────────── */

.o-calc {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
    border: 1px solid var(--o-border); border-radius: 26px; padding: 28px;
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; margin-bottom: 54px;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.o-calc::before {
    content: ''; position: absolute; inset: 0 0 auto; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
}
@media (max-width: 820px) { .o-calc { grid-template-columns: 1fr; padding: 20px; gap: 22px; } }

.o-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-content: start; }
.o-field.o-field--full { grid-column: 1 / -1; }
.o-field label { display: block; font-size: 12px; font-weight: 600; color: var(--o-muted); margin-bottom: 6px; }
.o-field label { letter-spacing: .01em; }
.o-field input, .o-field select {
    width: 100%; height: 46px; padding: 0 14px;
    background: rgba(0, 0, 0, .35); border: 1px solid var(--o-border); border-radius: 10px;
    color: #fff; font-size: 15px; font-family: inherit; font-variant-numeric: tabular-nums;
    outline: none; transition: border-color .18s, box-shadow .18s;
}
.o-field input:focus, .o-field select:focus { border-color: rgba(59,78,224,.7); box-shadow: 0 0 0 3px rgba(59,78,224,.18); }
.o-field small { display: block; margin-top: 5px; font-size: 11px; color: var(--o-faint); }

.o-legs { grid-column: 1 / -1; display: grid; gap: 10px; }
.o-leg { display: flex; gap: 10px; align-items: center; }
.o-leg input { flex: 1; }
.o-btn-ghost {
    height: 38px; padding: 0 14px; border-radius: 10px; cursor: pointer;
    background: rgba(255,255,255,.05); border: 1px solid var(--o-border); color: var(--o-muted);
    font-family: inherit; font-size: 13px; font-weight: 600; transition: all .18s;
}
.o-btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,.28); }

.o-results {
    background: linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.24));
    border: 1px solid var(--o-border);
    border-radius: 20px; padding: 20px; align-self: start;
}
.o-results h2 { margin: 0 0 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .2em; color: var(--o-faint); font-weight: 700; }

/* Résultat principal mis en vedette */
.o-res-hero {
    display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; padding: 16px 18px;
    border-radius: 15px; background: rgba(59,78,224,.1); border: 1px solid rgba(59,78,224,.24);
}
.o-res-hero span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.5); font-weight: 600; }
.o-res-hero strong {
    font-size: clamp(1.75rem, 3.4vw, 2.3rem); font-weight: 700; line-height: 1.05;
    letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.o-res-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.08); }
.o-res-row:last-of-type { border-bottom: 0; }
.o-res-row span { font-size: 13px; color: var(--o-muted); }
.o-res-row strong { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.o-pos { color: var(--o-green); }
.o-neg { color: var(--o-red); }
.o-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12px; line-height: 1.55; color: var(--o-faint); }

/* ── Contenu éditorial ──────────────────────────────────────────────── */

.o-prose { max-width: 76ch; }
.o-prose h2 { font-size: 1.55rem; margin: 42px 0 12px; letter-spacing: -0.02em; }
.o-prose h3 { font-size: 1.12rem; margin: 26px 0 8px; }
.o-prose p, .o-prose li { color: rgba(255,255,255,.72); }
.o-prose ul, .o-prose ol { padding-left: 20px; }
.o-prose li { margin-bottom: 7px; }
.o-prose a { color: #97a3ff; text-decoration: underline; text-underline-offset: 3px; }
.o-prose code {
    padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.07);
    font-size: .92em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.o-formula {
    margin: 14px 0; padding: 14px 16px; border-radius: 12px;
    background: rgba(255,255,255,.04); border-left: 3px solid var(--o-blue);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; color: #dfe3ff;
}
.o-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.o-table th, .o-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--o-border); }
.o-table th { color: var(--o-faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.o-table td { color: rgba(255,255,255,.78); font-variant-numeric: tabular-nums; }

.o-callout {
    margin: 22px 0; padding: 16px 18px; border-radius: 14px;
    background: var(--o-blue-soft); border: 1px solid rgba(59,78,224,.28);
}
.o-callout p { margin: 0; color: rgba(255,255,255,.8); font-size: 14px; }

/* Encadré produit contextuel, inséré dans le corps des articles. */
.o-pitch {
    position: relative; margin: 26px 0; padding: 20px 22px; border-radius: 16px;
    background: linear-gradient(135deg, rgba(59,78,224,.16), rgba(59,78,224,.05));
    border: 1px solid rgba(59,78,224,.3);
}
.o-pitch::before {
    content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
    border-radius: 3px; background: var(--o-blue);
}
.o-pitch p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,.86); }
.o-pitch a { color: #b3bdff; }
.o-pitch__cta {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px;
    background: var(--o-blue); color: #fff !important; text-decoration: none !important;
    font-size: 13.5px; font-weight: 600; transition: transform .18s, box-shadow .18s;
}
.o-pitch__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(59,78,224,.42); }

.o-faq details {
    border: 1px solid var(--o-border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px;
    background: rgba(255,255,255,.02);
}
.o-faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.o-faq summary::-webkit-details-marker { display: none; }
.o-faq summary::after { content: '+'; float: right; color: var(--o-faint); font-weight: 400; }
.o-faq details[open] summary::after { content: '−'; }
.o-faq p { margin: 10px 0 0; font-size: 14.5px; color: rgba(255,255,255,.7); }

/* ── Grille du hub ──────────────────────────────────────────────────── */

.o-family { margin-bottom: 40px; }
.o-family__head { margin-bottom: 16px; }
.o-family__head h2 { margin: 0 0 4px; font-size: 1.18rem; letter-spacing: -0.02em; }
.o-family__head p { margin: 0; font-size: .92rem; color: var(--o-faint); }

.o-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(264px, 1fr)); gap: 14px; }
.o-card {
    position: relative; display: block; padding: 22px; border-radius: 18px; text-decoration: none;
    background: var(--o-card); border: 1px solid var(--o-border); overflow: hidden;
    transition: transform .22s cubic-bezier(.2,.7,.3,1), border-color .22s, background .22s;
}
.o-card::after {
    content: ''; position: absolute; inset: -40% 40% auto -40%; height: 130%;
    background: radial-gradient(50% 50% at 50% 50%, rgba(59,78,224,.16), transparent 70%);
    opacity: 0; transition: opacity .25s; pointer-events: none;
}
.o-card:hover { transform: translateY(-3px); border-color: rgba(59,78,224,.4); background: rgba(255,255,255,.055); }
.o-card:hover::after { opacity: 1; }
.o-card h3 { margin: 0 0 7px; font-size: 1.02rem; letter-spacing: -0.01em; }
.o-card p { margin: 0; font-size: 13.5px; color: var(--o-muted); line-height: 1.5; }
.o-card__icon {
    display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px;
    border-radius: 13px; background: rgba(59,78,224,.12); border: 1px solid rgba(59,78,224,.22);
    color: #8a9bff; transition: background .18s, border-color .18s, color .18s;
}
.o-card__icon svg { width: 21px; height: 21px; }
.o-card:hover .o-card__icon { background: rgba(59,78,224,.22); border-color: rgba(59,78,224,.45); color: #b3bdff; }

.o-card__tag { display: block; margin-bottom: 10px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--o-faint); }

.o-related { border-top: 1px solid var(--o-border); margin-top: 52px; padding-top: 26px; }
.o-related h2 { font-size: 1.1rem; margin: 0 0 14px; }
.o-related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.o-related a {
    display: inline-block; padding: 7px 13px; border-radius: 999px; text-decoration: none;
    border: 1px solid var(--o-border); background: rgba(255,255,255,.03);
    font-size: 13px; color: var(--o-muted); transition: all .18s;
}
.o-related a:hover { color: #fff; border-color: rgba(255,255,255,.28); }

/* ── Bandeau CTA + footer ───────────────────────────────────────────── */

.o-promo {
    margin: 52px 0 0; padding: 32px; border-radius: 22px; text-align: center;
    background: linear-gradient(135deg, rgba(59,78,224,.18), rgba(59,78,224,.04));
    border: 1px solid rgba(59,78,224,.28);
}
.o-promo h2 { margin: 0 0 8px; font-size: 1.5rem; letter-spacing: -0.02em; }
.o-promo p { margin: 0 auto 20px; max-width: 56ch; color: var(--o-muted); }

.o-legalnote { margin: 46px 0 0; font-size: 11.5px; color: rgba(255,255,255,.3); line-height: 1.5; max-width: 80ch; }

/* Bouton du bandeau promo (l'ancien .o-cta du header maison). */
.o-cta {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 12px 22px; border-radius: 999px;
    background: var(--o-blue); color: #fff !important; text-decoration: none;
    font-size: 15px; font-weight: 600;
    transition: transform .18s, box-shadow .18s;
}
.o-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(59, 78, 224, .4); }
