:root {
  --ink: #17202a;
  --muted: #52616d;
  --line: #dbe6ee;
  --soft: #f5f9fc;
  --blue: #176fae;
  --blue-dark: #0b4f7c;
  --focus: #ffbf47;
  --success: #16794b;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus) !important;
  outline-offset: 3px;
}

.site-nav {
  width: min(92%, 747px);
  margin: 12px auto 0;
  padding: 7px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 65, 95, 0.07);
}

.site-nav a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: #eaf5fd;
  color: #073d60;
}

.editorial-note,
.answer-first,
.source-panel {
  width: min(92%, 747px);
  margin: 10px auto 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.55;
}

.editorial-note {
  background: #fbfdff;
  color: #344b59;
}

.editorial-note strong { color: var(--blue-dark); }

.answer-first {
  border-left: 4px solid var(--blue);
  background: #f3f9fe;
  color: #173e57;
}

.answer-first strong { color: #082f4b; }

.source-panel {
  background: #fbfcfd;
  color: #344b59;
}

.source-panel h2 {
  margin: 0 0 5px !important;
  color: var(--ink) !important;
  font-size: 14px !important;
}

.source-panel p { margin: 5px 0; }

.source-panel ul { margin: 5px 0 0 18px; padding: 0; }

.source-panel a,
.editorial-note a { color: var(--blue-dark); }

.screenOut,
[id^="out"],
[id*="Result"],
[id*="result"] { overflow-wrap: anywhere; }

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea,
button,
input[type="button"],
input[type="submit"] {
  min-height: 40px;
}

.content table,
.tableWrap,
.amortWrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.content a { text-underline-offset: 2px; }

.consent-banner {
  position: fixed;
  z-index: 9998;
  right: 14px;
  bottom: 14px;
  left: 14px;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px;
  border: 1px solid #cbd9e3;
  border-radius: 14px;
  background: #fff;
  color: #263844;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  font-size: 13px;
}

.consent-banner p { margin: 0 0 10px; }

.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.consent-actions button {
  min-width: 120px;
  padding: 8px 12px;
  border: 1px solid #aebfca;
  border-radius: 9px;
  background: #fff;
  color: #183548;
  cursor: pointer;
  font-weight: 700;
}

.consent-actions .consent-accept {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  color: #fff;
}

.privacy-settings {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.home-shell {
  width: min(94%, 980px);
  margin: 0 auto;
  padding: 14px 0 28px;
}

.site-header,
.site-footer,
.page-shell {
  width: min(94%, 980px);
  margin-right: auto;
  margin-left: auto;
}

.site-header { padding-top: 12px; text-align: center; }
.site-header__inner { display: flex; justify-content: center; }
.site-logo { display: inline-flex; }

.page-shell { padding: 18px 0 30px; }

.content-card {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 65, 95, 0.08);
}

.content-card h1 { margin-top: 0; color: var(--ink); }
.content-card h2 { margin-top: 24px; color: var(--blue-dark); }
.eyebrow { color: var(--blue-dark); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.button-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 9px 14px;
  border-radius: 9px;
  background: var(--blue-dark);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.link-grid {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  list-style: none;
}

.link-grid a { color: var(--blue-dark); }

.site-footer {
  padding: 16px 0 28px;
  display: flex;
  justify-content: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer a { color: var(--blue-dark); }

.home-brand { text-align: center; }

.home-lead {
  max-width: 760px;
  margin: 12px auto 0;
  color: var(--muted);
  text-align: center;
}

.home-calculator {
  max-width: 560px;
  margin: 18px auto 0;
  padding: 16px;
  border: 1px solid #26333b;
  border-radius: 20px;
  background: linear-gradient(150deg, #505a61, #20272c);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.23);
}

.home-display {
  min-height: 78px;
  padding: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid #a6b1b8;
  border-radius: 13px;
  background: linear-gradient(#fff, #e8edf0);
  color: #101820;
  font: 700 clamp(26px, 7vw, 40px)/1.15 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.calculator-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.calculator-grid button {
  min-height: 50px;
  border: 1px solid #aeb5ba;
  border-radius: 11px;
  background: linear-gradient(#fff, #d8dde0);
  color: #172027;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.24);
}

.calculator-grid button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.24); }
.calculator-grid .operator { background: linear-gradient(#d7f0ff, #8bc9ee); color: #073d60; }
.calculator-grid .primary { background: linear-gradient(#39a7ff, #0f73bf); color: #fff; border-color: #0f5f9b; }
.calculator-grid .span-two { grid-column: span 2; }

.home-content,
.category-grid {
  max-width: 820px;
  margin: 18px auto 0;
}

.home-content {
  color: #273b48;
  font-size: 14px;
}

.home-content h2 { margin: 22px 0 8px; font-size: 20px; color: var(--ink); }
.home-content h3 { margin: 16px 0 6px; font-size: 16px; color: var(--blue-dark); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #233d4d;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(15, 65, 95, 0.07);
}

.category-card strong { display: block; margin-bottom: 4px; color: var(--blue-dark); font-size: 15px; }
.category-card:hover { border-color: #97bed8; background: #f7fbfe; }

.home-footer {
  max-width: 820px;
  margin: 24px auto 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: #60717c;
  font-size: 12px;
  text-align: center;
}

.home-footer a { color: var(--blue-dark); }

@media (max-width: 760px) {
  .site-nav {
    width: 94%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .site-nav a { white-space: nowrap; }
  .category-grid { grid-template-columns: 1fr; }
  .link-grid { grid-template-columns: 1fr; }
  .editorial-note, .answer-first, .source-panel { width: 94%; }
}

@media (max-width: 430px) {
  .home-calculator { padding: 11px; }
  .calculator-grid { gap: 7px; }
  .calculator-grid button { min-height: 46px; font-size: 16px; }
}

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

@media print {
  .site-nav, .skip-link, .consent-banner, .ad728, .adsbygoogle { display: none !important; }
  body { color: #000; background: #fff; }
}

/* Deuxième passe 2026 : lecture plus confortable et vraie largeur desktop. */
body {
  margin: 0;
  background: #fff;
  color: #17202a;
  font-size: 16px;
}

.wrap {
  width: min(94%, 1180px) !important;
  max-width: 1180px !important;
  padding: 18px 0 34px !important;
}

.top { padding: 2px 0 4px; }
.top img { width: min(333px, 74vw); }

.site-nav {
  width: min(94%, 1080px);
  padding: 9px;
  gap: 7px;
}

.site-nav a {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 14px;
}

.breadcrumb,
.summary,
.trust,
.quickAnswer,
.answer-first,
.editorial-note,
.source-panel,
.method-panel,
.faqWrap,
.more,
.ad,
.footer {
  width: min(92%, 940px) !important;
  max-width: 940px !important;
}

.breadcrumb {
  margin-top: 14px !important;
  color: #647682 !important;
  font-size: 13px !important;
  text-align: left !important;
}

.wrap > main > h1,
.wrap > h1,
main > h1 {
  max-width: 980px !important;
  margin-top: 18px !important;
  color: #132f43 !important;
  font-size: clamp(28px, 4vw, 40px) !important;
  line-height: 1.14 !important;
  letter-spacing: -.025em;
}

.summary {
  margin-top: 16px !important;
  gap: 22px !important;
  color: #405665 !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
}

.trust,
.quickAnswer,
.answer-first,
.editorial-note,
.source-panel,
.method-panel {
  margin-top: 14px !important;
  padding: 15px 18px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
}

.answer-first {
  border: 1px solid #b9dbf2;
  border-left: 5px solid var(--blue);
  background: linear-gradient(135deg, #f0f8fe, #fbfdff);
  box-shadow: 0 8px 24px rgba(15, 85, 128, .06);
}

.method-panel {
  background: #f8fafb;
  border: 1px solid #dce5ea;
  color: #314957;
}

.method-panel h2,
.method-panel h3 {
  margin: 0 0 7px !important;
  color: #173d57 !important;
  font-size: 17px !important;
}

.method-panel p { margin: 5px 0; }
.method-panel a { color: var(--blue-dark); }

.grid,
.blocks {
  width: min(94%, 1060px) !important;
  max-width: 1060px !important;
  gap: 18px !important;
  margin-top: 20px !important;
}

.card,
.calc {
  border-radius: 18px !important;
  box-shadow: 0 12px 32px rgba(20, 54, 77, .12) !important;
}

.cardHead { padding: 17px 18px 14px !important; }
.cardKicker { font-size: 12px !important; letter-spacing: .05em !important; }
.cardTitle { font-size: 18px !important; line-height: 1.3 !important; }
.cardBody { padding: 15px 18px 18px !important; font-size: 14px !important; line-height: 1.65 !important; }

.calcBezel { padding: 13px !important; }
.calcInner { padding: 13px !important; }
.screen { padding: 12px 14px !important; }
.screenTitle { font-size: 14px !important; }
.screenHint { font-size: 12px !important; line-height: 1.5 !important; }
.screenOut { min-height: 42px; font-size: 15px !important; line-height: 1.45 !important; }
.keys { padding: 13px !important; }
.label { margin-bottom: 6px !important; font-size: 13px !important; }
.input { height: 42px !important; font-size: 16px !important; }
.suffix { font-size: 14px !important; }
.btn { min-height: 42px !important; height: auto !important; padding: 9px 10px; font-size: 14px !important; }
.formula { margin-top: 10px !important; font-size: 12px !important; line-height: 1.5 !important; }

.content {
  width: min(92%, 900px) !important;
  max-width: 900px !important;
  margin-top: 26px !important;
  color: #243743 !important;
  font-size: 16px !important;
  line-height: 1.75 !important;
}

.content h2 {
  margin: 30px 0 10px !important;
  color: #163d57 !important;
  font-size: clamp(22px, 2.6vw, 28px) !important;
  line-height: 1.25 !important;
  letter-spacing: -.015em;
}

.content h3 {
  margin: 22px 0 8px !important;
  color: #0b4f7c !important;
  font-size: 19px !important;
  line-height: 1.35 !important;
}

.content p { margin: 10px 0 !important; }
.content li { margin: 7px 0 !important; }
.content code { font-size: .94em !important; padding: 2px 6px !important; }

.miniTable th,
.miniTable td {
  padding: 11px 12px !important;
  font-size: 14px !important;
}

.faqWrap { margin-top: 28px !important; }
.faqTitle { font-size: 22px !important; color: #163d57 !important; }
.faqItem { margin: 9px 0 !important; border-bottom: 1px solid #e5edf2; padding-bottom: 9px; }
.faqItem summary { font-size: 15px !important; line-height: 1.5 !important; }
.faqA { padding: 8px 0 0 20px !important; font-size: 14px !important; line-height: 1.65 !important; }

.chip { padding: 9px 13px !important; font-size: 14px !important; }
.footer { margin-top: 24px !important; padding-top: 18px; border-top: 1px solid #e2e9ed; font-size: 12px !important; }

.home-shell { width: min(94%, 1180px); }
.category-grid,
.home-content,
.home-footer { max-width: 1000px; }
.home-content { font-size: 16px; line-height: 1.75; }
.home-content h2 { font-size: 28px; }
.home-content h3 { font-size: 20px; }
.category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.category-card { padding: 20px; }
.category-card strong { font-size: 18px; }

@media (max-width: 760px) {
  .wrap { width: 94% !important; padding-top: 10px !important; }
  .site-nav { width: 94%; }
  .breadcrumb { text-align: left !important; }
  .summary { grid-template-columns: 1fr !important; gap: 8px !important; }
  .grid, .blocks { width: 100% !important; grid-template-columns: 1fr !important; }
  .content,
  .breadcrumb,
  .summary,
  .trust,
  .quickAnswer,
  .answer-first,
  .editorial-note,
  .source-panel,
  .method-panel,
  .faqWrap,
  .more,
  .footer { width: 100% !important; }
  .category-grid { grid-template-columns: 1fr; }
}

/* V4 — preuves et maintenance éditoriale des pages de référence */
.reference-evidence {
  border-left: 4px solid #1b7aa8 !important;
  background: linear-gradient(135deg, #f5fbfe 0%, #ffffff 72%) !important;
}

.reference-evidence h2 {
  margin-top: 0 !important;
}

.reference-list {
  margin: 14px 0 !important;
  padding-left: 22px !important;
}

.reference-list li {
  margin: 10px 0 !important;
  line-height: 1.6 !important;
}

.reference-cases {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid #d9e8f0;
  border-radius: 8px;
  background: #fff;
}

.reference-cases h3 {
  margin: 0 0 8px !important;
  color: #163d57 !important;
  font-size: 18px !important;
}

.reference-limit,
.reference-next-step {
  margin: 12px 0 0 !important;
  padding: 12px 14px;
  border-radius: 7px;
}

.reference-limit {
  background: #fff8e8;
  border: 1px solid #f0dfae;
}

.reference-next-step {
  background: #eef8f3;
  border: 1px solid #cfe7db;
}

.next-review {
  display: block;
  margin-top: 6px;
}

/* V6 — alignement et couleurs du bloc de contrôle, sur tout le site */
.source-panel,
.method-panel {
  width: min(92%, 900px) !important;
  max-width: 900px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

.method-panel {
  display: block !important;
  padding: 18px 20px !important;
  border: 1px solid #d7e3ea !important;
  border-left: 4px solid #1b7aa8 !important;
  border-radius: 12px !important;
  background: #f8fafb !important;
  color: #314957 !important;
  box-shadow: none !important;
}

.method-panel h2,
.method-panel h3 {
  margin: 0 0 8px !important;
  color: #173d57 !important;
  font-size: 17px !important;
  line-height: 1.35 !important;
}

.method-panel p {
  margin: 6px 0 !important;
}

.method-panel a,
.method-panel a:link,
.method-panel a:visited {
  color: #0b4f7c !important;
  text-decoration: underline !important;
  text-decoration-color: #8aafc5 !important;
  text-underline-offset: 2px !important;
}

.method-panel a:hover,
.method-panel a:focus-visible {
  color: #073d60 !important;
  text-decoration-color: currentColor !important;
}

@media (max-width: 760px) {
  .source-panel,
  .method-panel {
    width: 100% !important;
    max-width: 100% !important;
  }

  .method-panel {
    padding: 15px 16px !important;
  }
}

/* V8 — les emplacements publicitaires ne doivent jamais élargir la page. */
.ad,
.ad728 {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.adsbygoogle {
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 760px) {
  .adsbygoogle {
    min-width: 0 !important;
  }
}
