:root {
  --navy: #0f2747;
  --navy-2: #173b67;
  --gold: #c8a96a;
  --gold-dark: #98733b;
  --cream: #fdfbf7;
  --paper: #fff;
  --ink: #17263a;
  --muted: #64748b;
  --line: #dce3ea;
  --green: #247054;
  --amber: #9a681c;
  --shadow: 0 22px 60px rgba(15, 39, 71, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--cream); color: var(--ink); font-family: "DM Sans", sans-serif; }
button, input, select { font: inherit; }
button, a { color: inherit; }
a { text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.topbar { height: 74px; padding: 0 clamp(20px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; background: rgba(253, 251, 247, .94); border-bottom: 1px solid rgba(15, 39, 71, .11); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 40; }
.brand { display: flex; align-items: baseline; gap: 11px; }
.brand-k { font: 700 26px "Cormorant Garamond", serif; letter-spacing: .08em; color: var(--navy); }
.brand-n { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-dark); border-left: 1px solid var(--gold); padding-left: 11px; }
.library-link { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; color: var(--navy); }
.library-link svg { width: 18px; }

.hero { min-height: 610px; background: var(--navy); color: #fff; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr); align-items: center; gap: 6vw; padding: 76px clamp(24px, 7vw, 110px); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; border: 1px solid rgba(200, 169, 106, .2); border-radius: 50%; right: -170px; top: -180px; box-shadow: 0 0 0 80px rgba(200, 169, 106, .035), 0 0 0 160px rgba(200, 169, 106, .025); }
.eyebrow { text-transform: uppercase; letter-spacing: .17em; font-size: 11px; font-weight: 700; color: var(--gold); margin: 0 0 12px; }
.hero h1, .section-heading h2, .methodology h2 { font-family: "Cormorant Garamond", serif; }
.hero h1 { font-size: clamp(48px, 6vw, 82px); line-height: .96; margin: 0 0 28px; font-weight: 600; }
.hero h1 em { color: var(--gold); font-weight: 600; }
.hero-lead { font-size: 18px; line-height: 1.75; color: #dce7f2; max-width: 660px; }
.hero-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero-pills span { border: 1px solid rgba(255, 255, 255, .2); border-radius: 100px; padding: 8px 13px; font-size: 12px; }
.hero-visual { position: relative; z-index: 2; padding: 30px; display: grid; }
.price-node { background: #fff; color: var(--navy); border-radius: 16px; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow); transform: translateX(-30px); }
.price-node.central { transform: translateX(20px); }
.price-node.gold { background: var(--gold); transform: translateX(-5px); }
.price-node small { text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 700; }
.price-node strong { font: 500 24px "DM Mono", monospace; }
.flow { height: 38px; width: 58%; color: rgba(255, 255, 255, .28); justify-self: center; }
.flow.reverse { transform: scaleX(-1); }

main { min-height: 100vh; }
.vat-strip { margin: -1px auto 0; padding: 32px clamp(20px, 5vw, 56px); max-width: 1450px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); display: grid; grid-template-columns: minmax(210px, .7fr) minmax(540px, 1.7fr); gap: 22px 38px; align-items: center; }
.vat-strip h2 { font-size: 20px; margin: 0; color: var(--navy); }
.segmented, .price-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented label, .price-choice label { cursor: pointer; }
.segmented input, .price-choice input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span, .price-choice span { display: flex; min-height: 48px; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; font-size: 13px; font-weight: 600; background: #fff; transition: .2s; }
.segmented input:checked + span, .price-choice input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 5px 16px rgba(15, 39, 71, .16); }
.vat-numbers { grid-column: 2; display: flex; gap: 20px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.vat-numbers[hidden] { display: none; }

.section-nav { max-width: 1450px; margin: 42px auto 0; padding: 0 clamp(20px, 4vw, 40px); display: flex; gap: 8px; overflow: auto; scrollbar-width: thin; }
.section-nav button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 13px 16px; white-space: nowrap; font-weight: 700; color: var(--muted); cursor: pointer; }
.section-nav button.active { color: var(--navy); border-color: var(--gold); }
.tool-section { display: none; max-width: 1450px; margin: 0 auto; padding: 56px clamp(20px, 4vw, 40px) 90px; }
.tool-section.active { display: block; animation: reveal .4s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .62fr); gap: 50px; align-items: end; margin-bottom: 30px; }
.section-heading > div { position: relative; padding-left: 62px; }
.section-heading .step { position: absolute; left: 0; top: 2px; font: 500 12px "DM Mono"; color: var(--gold-dark); border-top: 1px solid var(--gold); padding-top: 8px; }
.section-heading h2 { font-size: clamp(34px, 4vw, 52px); line-height: 1; margin: 0; color: var(--navy); }
.section-heading > p { line-height: 1.7; color: var(--muted); margin: 0; }
.section-heading.compact { margin-top: 76px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 38px rgba(15, 39, 71, .055); }
.calculator-grid { display: grid; grid-template-columns: minmax(300px, .7fr) minmax(500px, 1.3fr); gap: 22px; }
.input-panel { padding: 28px; }
.field, .amount-field { display: grid; gap: 9px; margin-bottom: 24px; }
.field > span, .amount-field > span:first-child, .known-field legend { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
select, input[type=number] { width: 100%; background: #fff; border: 1px solid #cfd8e2; border-radius: 9px; padding: 13px; color: var(--ink); outline: none; }
select:focus, input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 169, 106, .16); }
.known-field { border: 0; padding: 0; margin: 0 0 24px; }
.known-field legend { margin-bottom: 9px; }
.amount-box { display: flex; align-items: center; border: 1px solid #cfd8e2; border-radius: 9px; overflow: hidden; }
.amount-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 169, 106, .16); }
.amount-box input { font: 500 22px "DM Mono"; border: 0; box-shadow: none !important; }
.amount-box b { padding: 0 16px; color: var(--gold-dark); }
.channel-note { background: #f3f6f8; border-left: 3px solid var(--gold); padding: 13px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.result-panel { overflow: hidden; }
.result-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.reliability { border-radius: 100px; padding: 5px 9px; background: #eef7f3; color: var(--green); font-size: 10px; }
.reliability.medium { background: #fff6e8; color: var(--amber); }
.reliability.low { background: #f6eff0; color: #8d4550; }
.result-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.result-cards article { background: #fff; padding: 26px 22px; }
.result-cards article.featured { background: var(--navy); color: #fff; }
.result-cards small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.result-cards .featured small { color: #bdcada; }
.result-cards strong { font: 500 clamp(20px, 2.5vw, 31px) "DM Mono"; }
.breakdown { margin: 0; padding: 18px 24px; }
.breakdown div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-bottom: 1px dashed #e5e9ed; font-size: 13px; }
.breakdown dd { font-family: "DM Mono"; margin: 0; }
.breakdown .total { font-weight: 700; border-bottom: 0; color: var(--navy); }
.vat-note { font-size: 11px; color: var(--muted); padding: 0 24px 20px; margin: 0; }

.promo-panel, .table-panel { padding: 20px; }
.promo-options { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.promo-option { display: grid; grid-template-columns: auto 1fr 74px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; }
.promo-option input[type=number] { padding: 7px; font-family: "DM Mono"; }
.empty-state { color: var(--muted); font-size: 13px; }
.table-controls { position: relative; }
.columns-button, .rows-button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.columns-menu, .rows-menu { display: none; position: absolute; z-index: 15; right: 0; top: calc(100% + 6px); min-width: 230px; max-height: 320px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px; box-shadow: var(--shadow); }
.columns-menu.open, .rows-menu.open { display: grid; }
.columns-menu label, .rows-menu label { padding: 7px 8px; font-size: 12px; border-radius: 6px; }
.columns-menu label:hover, .rows-menu label:hover { background: #f4f6f8; }
.table-controls[data-table=promo-table] { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.table-scroll { overflow: auto; max-width: 100%; scrollbar-width: thin; scrollbar-color: var(--gold) #edf0f2; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th { text-align: left; background: #f2f5f7; color: var(--navy); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 12px; white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid #e8ecef; font-size: 12px; vertical-align: top; }
td.money { font-family: "DM Mono"; white-space: nowrap; }
td.owner { font-weight: 700; color: var(--navy); background: rgba(200, 169, 106, .1); }
tr.hidden-row { display: none; }
[data-hidden-col=true] { display: none !important; }
.table-warning { font-size: 12px; color: var(--amber); margin: 12px 0 0; }
.market-controls { padding: 22px; display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.price-choice.wide { min-width: 650px; }
.amount-field.inline { min-width: 190px; margin: 0; }
.table-toolbar { display: flex; justify-content: space-between; position: relative; margin-bottom: 10px; }
.table-toolbar > div { position: relative; }
.confidence { display: inline-block; border-radius: 100px; padding: 4px 8px; font-size: 10px; background: #edf6f2; color: var(--green); }
.confidence.faible { background: #f7eded; color: #91444e; }
.confidence.moyenne { background: #fff5e4; color: #94611b; }
.info-card { display: flex; gap: 14px; align-items: start; background: #edf3f8; border-left: 3px solid var(--navy); padding: 18px; margin-bottom: 18px; border-radius: 0 10px 10px 0; }
.info-card svg { width: 21px; flex: 0 0 auto; color: var(--gold-dark); }
.info-card p { margin: 0; font-size: 13px; line-height: 1.65; }
.methodology { max-width: 1370px; margin: 0 auto 70px; background: #eee8dd; border-radius: 18px; padding: 38px 44px; display: grid; grid-template-columns: .75fr 1.25fr; gap: 35px; }
.methodology h2 { font-size: 34px; line-height: 1.05; color: var(--navy); margin: 0; }
.methodology > p { line-height: 1.75; margin: 0; }
.methodology > span { grid-column: 2; font: 500 11px "DM Mono"; color: var(--gold-dark); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 8px; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
footer { background: #0a1c33; color: #aebdcd; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 30px clamp(20px, 6vw, 90px); font-size: 11px; }
footer span { font: 600 17px "Cormorant Garamond"; color: #fff; letter-spacing: .09em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; padding-top: 58px; }
  .hero-visual { max-width: 660px; width: 100%; padding-left: 30px; padding-right: 30px; }
  .vat-strip, .section-heading, .calculator-grid, .methodology { grid-template-columns: 1fr; }
  .vat-numbers, .methodology > span { grid-column: 1; }
  .section-heading { gap: 16px; }
  .market-controls { align-items: stretch; flex-direction: column; }
  .price-choice.wide { min-width: 0; }
  .result-cards { grid-template-columns: 1fr; }
  .result-cards article { display: flex; align-items: center; justify-content: space-between; }
  .result-cards small { margin: 0; }
}

@media (max-width: 620px) {
  .topbar { height: 62px; padding: 0 16px; }
  .brand-k { font-size: 22px; }
  .library-link { font-size: 0; }
  .library-link svg { width: 21px; }
  .hero { min-height: auto; padding: 48px 20px 58px; }
  .hero h1 { font-size: 48px; }
  .hero-lead { font-size: 15px; }
  .hero-visual { padding: 10px 0; }
  .price-node { transform: none !important; }
  .vat-strip { padding: 24px 18px; }
  .segmented, .price-choice, .price-choice.wide { grid-template-columns: 1fr; }
  .section-nav { margin-top: 22px; }
  .tool-section { padding: 38px 16px 70px; }
  .section-heading > div { padding-left: 46px; }
  .section-heading h2 { font-size: 36px; }
  .result-head { align-items: start; gap: 10px; }
  .promo-option { width: 100%; }
  .market-controls { padding: 16px; }
  .methodology { margin: 0 16px 50px; padding: 28px 22px; }
  footer { align-items: start; flex-direction: column; }
  .rows-menu { left: 0; right: auto; }
}

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