/* Bassinea : feuille de style unique, sans dépendance.
   Pensée d'abord pour le téléphone, en plein soleil : fort contraste, gros textes, grandes zones à toucher. */

@font-face {
  font-family: 'Atkinson Next';
  src: url('/assets/fonts/atkinson-hyperlegible-next-latin-wght.18b2a1a39a.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-latin-wght.8f704806db.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0d2230;
  --ink-2: #3d5664;
  --bg: #ffffff;
  --bg-alt: #edf4f6;
  --bg-tint: #f5fafb;
  --card: #ffffff;
  --line: #c9d9df;
  --water: #0b5f78;
  --water-2: #0e7c99;
  --water-deep: #073f51;
  --water-ink: #ffffff;
  --water-soft: #d6eef4;
  --link: #0a5c74;
  --sun: #ffc933;
  --sun-ink: #2b2100;
  --warn-bg: #fff3cf;
  --warn-line: #e3b52c;
  --warn-ink: #3d2e00;
  --ok: #2f7d4f;
  --danger: #b0251b;
  --todo-bg: #ffd9d4;
  --todo-ink: #7a0f06;
  --focus: #ffc933;
  --shadow: 0 1px 2px rgba(13, 34, 48, 0.06), 0 6px 18px rgba(13, 34, 48, 0.07);

  --font-body: 'Atkinson Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Archivo', 'Arial Narrow', system-ui, sans-serif;

  --wrap: 72rem;
  --measure: 42rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 12px;
  --radius-s: 8px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8f1f4;
    --ink-2: #a9bec7;
    --bg: #0b1a22;
    --bg-alt: #11252f;
    --bg-tint: #0f212a;
    --card: #10232c;
    --line: #2a4552;
    --water: #0e6d89;
    --water-2: #12809f;
    --water-deep: #06303e;
    --water-soft: #12394a;
    --link: #8fd8ec;
    --warn-bg: #2e2507;
    --warn-line: #a88413;
    --warn-ink: #fbe7ad;
    --ok: #7fd3a0;
    --danger: #ff8a7f;
    --todo-bg: #5a120c;
    --todo-ink: #ffd9d4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.1rem); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.95rem); font-weight: 600; margin-top: 2em; }
h3 { font-size: 1.2rem; font-weight: 600; margin-top: 1.5em; }
p, ul, ol { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--ink);
  border-radius: 3px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: 0.5rem; top: -10rem; z-index: 50;
  background: var(--sun); color: var(--sun-ink); padding: 0.75rem 1rem; font-weight: 600; border-radius: var(--radius-s);
}
.skip:focus { top: 0.5rem; }
.note { color: var(--ink-2); font-size: 0.98rem; }
.lead { font-size: clamp(1.12rem, 1.05rem + 0.4vw, 1.3rem); color: var(--ink-2); max-width: var(--measure); }

/* ---------- En-tête et menu ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: 1.2rem;
  min-height: 48px; white-space: nowrap;
}
.logo-mark { width: 2.25rem; height: 2.25rem; flex: none; }
.main-nav ul { display: flex; gap: 0.1rem; list-style: none; margin: 0; padding: 0; }
.main-nav a, .mobile-nav a {
  display: flex; align-items: center; min-height: 48px; padding: 0 0.75rem;
  color: var(--ink); text-decoration: none; font-weight: 600; border-radius: var(--radius-s); white-space: nowrap;
}
.main-nav a:hover { background: var(--bg-alt); }
.main-nav a[aria-current='page'] { box-shadow: inset 0 -3px 0 var(--water); border-radius: 0; }

.mobile-nav { display: none; position: relative; }
.mobile-nav summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1rem; border-radius: var(--radius-s);
  font-weight: 600; border: 2px solid var(--ink);
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.burger { position: relative; }
.burger::before, .burger::after { content: ''; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.mobile-nav[open] .burger { background: transparent; }
.mobile-nav[open] .burger::before { top: 0; transform: rotate(45deg); }
.mobile-nav[open] .burger::after { top: 0; transform: rotate(-45deg); }
.mobile-nav nav {
  position: absolute; right: 0; top: calc(100% + 0.5rem);
  width: min(20rem, calc(100vw - 2rem));
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 0.5rem;
}
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li + li { border-top: 1px solid var(--line); }
.mobile-nav a { font-size: 1.15rem; min-height: 52px; }
.mobile-nav a[aria-current='page'] { color: var(--water); }
@media (prefers-color-scheme: dark) { .mobile-nav a[aria-current='page'] { color: var(--link); } }

@media (max-width: 60rem) {
  .main-nav { display: none; }
  .mobile-nav { display: block; }
}
@media (max-width: 26rem) {
  .brand { font-size: 1.05rem; gap: 0.5rem; }
  .brand .logo-mark { width: 2rem; height: 2rem; }
}

/* ---------- Fil d'Ariane et date ---------- */
.fil ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; list-style: none;
  margin: 0.75rem 0 0; padding: 0; font-size: 0.95rem; color: var(--ink-2);
}
.fil li + li::before { content: '›'; margin-right: 0.5rem; }
/* Zone à toucher d'au moins 24 px de haut (accessibilité), sans changer l'aspect. */
.fil a { color: var(--ink-2); display: inline-block; padding-block: 0.25rem; }
.maj { color: var(--ink-2); font-size: 0.95rem; margin: 0 0 1.25rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.25rem; border-radius: var(--radius-s);
  background: var(--sun); color: var(--sun-ink); border: 0;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(0.95); }
.btn-big { min-height: 56px; font-size: 1.15rem; width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }

/* ---------- Accueil : grand visuel ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--water); color: #fff;
  padding: clamp(3.25rem, 9vw, 6rem) 0 clamp(2.25rem, 6vw, 3.5rem);
}
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-inner { max-width: var(--wrap); }
@media (max-width: 48rem) { .hero-art .bouee, .hero-art .echelle { display: none; } }
.hero h1 { color: #fff; max-width: 15ch; }
.hero-lead { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); max-width: 34rem; margin-bottom: 1.5rem; }
.hero .maj { color: #fff; margin: 1rem 0 0; }

/* Recherche */
.search { max-width: 40rem; position: relative; }
.search-label { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; margin-bottom: 0.5rem; }
.search-row {
  display: flex; gap: 0.5rem; background: #fff; border-radius: 14px; padding: 0.25rem;
  box-shadow: 0 2px 8px rgba(3, 35, 46, 0.25);
}
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: #0d2230;
  font: inherit; font-size: 1.15rem; padding: 0 0.75rem; min-height: 52px; border-radius: 10px;
}
.search input::placeholder { color: #5a7280; }
.search input:focus-visible { outline: 3px solid var(--water); box-shadow: none; }
.search .btn { min-height: 52px; }
.search-help { font-size: 0.95rem; margin: 0.5rem 0 0; color: #fff; }
.search-results {
  list-style: none; margin: 0.5rem 0 0; padding: 0.25rem; background: #fff; color: #0d2230;
  border-radius: 12px; box-shadow: 0 2px 8px rgba(3, 35, 46, 0.25);
}
.search-results a { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.75rem 0.75rem; color: #0d2230; text-decoration: none; border-radius: 8px; }
.search-results a:hover, .search-results a:focus-visible { background: #edf4f6; }
.sr-kind { flex: none; font-size: 0.875rem; font-weight: 600; color: #0b5f78; min-width: 4.5rem; }
.sr-title { font-weight: 600; }
.search-empty { margin: 0.5rem 0 0; background: #fff; color: #0d2230; padding: 0.75rem 1rem; border-radius: 12px; }

/* Urgences */
.urgences { padding-top: 0.5rem; }
.urgences h2 { margin-top: 1.6em; }
/* ---------- Grilles sans trou (voir grid() dans src/components.mjs) ---------- */
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
.wrap.grid { padding-inline: var(--gutter); margin-inline: auto; }
@media (min-width: 40rem) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .grid > * { grid-column: span 12; }
  .grid > .t-12 { grid-column: span 12; }
  .grid > .t-6 { grid-column: span 6; }
  .grid > .t-4 { grid-column: span 4; }
  .grid > .solo { grid-column: 3 / span 8; }
}
@media (min-width: 64rem) {
  .grid > .d-12 { grid-column: span 12; }
  .grid > .d-6 { grid-column: span 6; }
  .grid > .d-4 { grid-column: span 4; }
  .grid > .d-3 { grid-column: span 3; }
  .grid > .solo { grid-column: 4 / span 6; }
}
.grid.urgent { gap: 0.75rem; }
.urgent a {
  display: flex; align-items: center; gap: 1rem;
  min-height: 72px; padding: 0.75rem 1rem;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; line-height: 1.2;
}
.urgent a:hover { border-color: var(--water); }
.urgent a::after { content: '→'; margin-left: auto; font-family: var(--font-body); color: var(--water); }
@media (prefers-color-scheme: dark) { .urgent a::after { color: var(--link); } }
.swatch { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid rgba(13, 34, 48, 0.25); }
.swatch-verte { background: #5c9a3f; }
.swatch-trouble { background: #dce7ea; }
.swatch-chlore { background: #f0c93a; }
.swatch-volume { background: #2596b4; }

/* Calculateur sur l'accueil */
.home-calc { background: var(--bg-tint); border-block: 1px solid var(--line); margin-top: 3rem; padding: 2.5rem 0; }
.home-calc-inner { display: grid; gap: 1.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }
.home-calc-text h2 { margin-top: 0; }
@media (min-width: 64rem) { .home-calc-text { position: sticky; top: 6rem; } }

/* En ce moment */
.season { margin-top: 3rem; }
.season-item {
  border-radius: var(--radius); padding: 1.5rem 1.5rem 0.75rem; color: var(--ink);
  background: var(--bg-alt); border: 1px solid var(--line);
}
.season-item h2 { margin-top: 0; }
.season-hiver { background: #e6eef8; border-color: #c3d3ea; }
.season-printemps { background: #e8f5e8; border-color: #c4e0c4; }
.season-ete { background: #fff4d1; border-color: #f0d98c; }
.season-automne { background: #fbebdc; border-color: #ecc9a6; }
@media (prefers-color-scheme: dark) {
  .season-hiver, .season-printemps, .season-ete, .season-automne { background: var(--bg-alt); border-color: var(--line); }
}
.season-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.season-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
  background: var(--bg); border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 600;
}

/* Cartes des rubriques */
.rub-cards a {
  display: flex; flex-direction: column; height: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  color: var(--ink); text-decoration: none;
}
.rub-cards a:hover { border-color: var(--water); }
.rub-cards a:hover .rub-name { text-decoration: underline; }
.rub-art svg { width: 100%; height: auto; aspect-ratio: 5 / 3; }
.rub-body { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 1rem 1.25rem; }
.rub-name { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; }
.rub-desc { color: var(--ink-2); }
.rub-count { font-size: 0.92rem; font-weight: 600; color: var(--water); margin-top: auto; padding-top: 0.25rem; }
@media (prefers-color-scheme: dark) { .rub-count { color: var(--link); } }

/* Cartes des guides */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 0.5rem; }
.more { font-weight: 600; }
.guide-cards a {
  display: flex; flex-direction: column; gap: 0.5rem; height: 100%;
  padding: 1.25rem 1.25rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; border-top: 5px solid var(--water);
}
.guide-cards a:hover { border-color: var(--water); }
.guide-cards a:hover .gc-title { text-decoration: underline; }
.gc-cat { font-size: 0.85rem; font-weight: 600; color: var(--water); }
@media (prefers-color-scheme: dark) { .gc-cat { color: var(--link); } }
.gc-title { font-family: var(--font-head); font-weight: 600; font-size: 1.22rem; line-height: 1.2; }
.gc-desc { color: var(--ink-2); font-size: 1rem; }
.gc-date { margin-top: auto; font-size: 0.88rem; color: var(--ink-2); padding-top: 0.5rem; }

/* Confiance */
.trust { margin-top: 3rem; padding: 1.5rem 1.5rem 0.5rem; background: var(--water-deep); color: #e3f2f6; border-radius: var(--radius); }
.trust h2 { margin-top: 0; color: #fff; }
.trust .grid { gap: 1rem 1.5rem; margin-bottom: 1rem; }
.trust-t { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: #fff; margin-bottom: 0.25rem; }
.trust-t::before { content: '✓'; color: var(--sun); margin-right: 0.5rem; }
.trust a { color: #fff; font-weight: 600; }

.section { padding-block: 0.5rem 0.5rem; }

/* ---------- Lignes d'outils ---------- */
.tool-rows { list-style: none; margin: 0 0 1rem; padding: 0; border-top: 2px solid var(--ink); }
.tool-rows li { border-bottom: 1px solid var(--line); }
.tool-rows a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.25rem 1rem; padding: 1rem 0.25rem; color: var(--ink); text-decoration: none; }
.tool-rows a:hover .tool-name { text-decoration: underline; }
.tool-name { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; line-height: 1.2; }
.tool-desc { grid-column: 1; color: var(--ink-2); }
.tool-go {
  grid-column: 2; grid-row: 1 / span 2; display: inline-grid; place-items: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--sun); color: var(--sun-ink); font-weight: 600; font-size: 1.3rem;
}

.upcoming { margin-top: 2.5rem; }
.grid.upcoming-list { gap: 0 1.5rem; }
.upcoming-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.up-name { display: block; font-weight: 600; color: var(--ink-2); }
.up-desc { display: block; font-size: 0.95rem; color: var(--ink-2); }

/* ---------- En-têtes de rubriques ---------- */
.rub-head { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: center; margin: 1.5rem 0 1rem; }
.rub-head-art svg { width: 100%; max-width: 22rem; height: auto; border-radius: var(--radius); }
.rub-head h1 { margin-bottom: 0.25rem; }
@media (min-width: 48rem) { .rub-head { grid-template-columns: 1fr 1.6fr; } .rub-head-art { order: 2; } }
.cat-nav ul, .season-nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.cat-nav a, .season-nav a {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 1rem;
  border: 2px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--ink);
}
.cat-nav .count { background: var(--bg-alt); border-radius: 999px; padding: 0 0.5rem; font-size: 0.9rem; }
.cat-head { margin: 1.5rem 0 1.5rem; }
.kicker { font-weight: 600; margin: 0 0 0.25rem; }
.kicker a { color: var(--water); }
@media (prefers-color-scheme: dark) { .kicker a { color: var(--link); } }
.cat-tool { margin-top: 1.5rem; }
.season-sec { scroll-margin-top: 5rem; }

/* ---------- Pages d'outils ---------- */
.tool-page { max-width: 52rem; }
.tool-head { margin: 1.25rem 0 1.25rem; }
.tool-head h1 { margin-bottom: 0.5rem; }

.tool {
  background: var(--card); border: 2px solid var(--water); border-radius: var(--radius);
  padding: 1.25rem 1rem 1.25rem; box-shadow: var(--shadow);
}
.tool-title { font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; margin: 0 0 0.75rem; }
.tool fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.tool legend { font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
.choices { display: grid; gap: 0.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 40rem) { .choices.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span, .choice svg { pointer-events: none; }
.choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem;
  min-height: 56px; padding: 0.5rem; border: 2px solid var(--line); border-radius: var(--radius-s);
  font-weight: 600; text-align: center; line-height: 1.2; background: var(--bg);
}
.choice-text { flex-direction: row; }
.choice svg { width: 2.6rem; height: auto; fill: var(--water-soft); stroke: var(--water); stroke-width: 2.2; }
.choice:has(input:checked) { border-color: var(--water); background: var(--water-soft); box-shadow: inset 0 0 0 1px var(--water); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { .choice svg { fill: transparent; stroke: var(--link); } .choice:has(input:checked) { border-color: var(--link); } }

.fields { display: grid; gap: 0.25rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); margin-bottom: 0.5rem; }
.field[hidden] { display: none; }
.field label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.input-unit { display: flex; align-items: stretch; border: 2px solid var(--ink-2); border-radius: var(--radius-s); background: var(--bg); overflow: hidden; }
.input-unit:focus-within { border-color: var(--water); outline: 3px solid var(--focus); outline-offset: 1px; }
.input-unit input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.3rem; font-weight: 600; padding: 0 0.75rem; min-height: 54px; }
.input-unit input:focus-visible { outline: none; box-shadow: none; }
.input-unit input[aria-invalid='true'] { background: var(--todo-bg); }
.unit { display: grid; place-items: center; padding: 0 1rem; background: var(--bg-alt); color: var(--ink-2); font-weight: 600; }
.hint { font-size: 0.92rem; color: var(--ink-2); margin: 0.25rem 0 0.75rem; }
.err { color: var(--danger); font-weight: 600; font-size: 0.98rem; margin: -0.25rem 0 0.75rem; }
.form-status { margin: 0.5rem 0 0; font-weight: 600; color: var(--ink-2); }
.form-status:empty { display: none; }

.checks { display: grid; gap: 0.5rem; }
.check {
  display: flex; align-items: flex-start; gap: 0.75rem; min-height: 52px; padding: 0.75rem 1rem;
  border: 2px solid var(--line); border-radius: var(--radius-s); cursor: pointer; background: var(--bg); line-height: 1.35;
}
.check input { width: 1.4rem; height: 1.4rem; margin: 0.05rem 0 0; flex: none; accent-color: var(--water); }
.check:has(input:checked) { border-color: var(--water); background: var(--water-soft); }

.result {
  margin-top: 1.25rem; padding: 1.25rem 1rem; border-radius: var(--radius);
  background: var(--water); color: #fff;
}
.result:focus { outline: none; }
.result:focus-visible { outline: 3px solid var(--focus); }
.result-label { margin: 0 0 0.25rem; font-weight: 600; color: #d6eef4; }
.result-main { font-family: var(--font-head); font-weight: 600; font-size: clamp(2.6rem, 2rem + 4vw, 3.8rem); line-height: 1; margin: 0.25rem 0 0.5rem; font-variant-numeric: tabular-nums; }
.result-sub { font-size: 1.25rem; margin-bottom: 0.5rem; }
.result-calc { font-size: 0.98rem; color: #e3f2f6; overflow-wrap: anywhere; }
.result-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.result .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.result .note { color: #e3f2f6; margin: 0.5rem 0 0; }
.result .note:empty { display: none; }
.result a { color: var(--water-ink); text-decoration-thickness: 1px; }

/* Bandeau « volume mémorisé » en haut du calculateur, avec le bouton « Oublier ». */
.memo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
  margin: 0 0 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-s);
  background: var(--water-soft); color: var(--ink);
}
.memo[hidden] { display: none; }
.memo-text { margin: 0; flex: 1 1 16rem; }
.memo .btn-ghost { border-color: currentColor; min-height: 44px; }

.diag-result { background: var(--bg-alt); color: var(--ink); border: 2px solid var(--water); }
.diag-result .result-label { color: var(--ink-2); }
.diag-result .note { color: var(--ink-2); }
.diag-result a { color: var(--link); }
.diag-result .btn-ghost { color: var(--ink); border-color: var(--line); }
.diag-cause { background: var(--bg); border-radius: var(--radius-s); padding: 1rem 1rem 0.5rem; margin: 0.75rem 0; border: 1px solid var(--line); }
.diag-rank { display: inline-block; font-size: 0.875rem; font-weight: 600; background: var(--sun); color: var(--sun-ink); padding: 0.1rem 0.5rem; border-radius: 6px; margin: 0 0 0.5rem; }
.diag-cause + .diag-cause .diag-rank { background: var(--bg-alt); color: var(--ink); }
.diag-title { margin: 0.25rem 0 0.5rem; font-size: 1.3rem; }
.diag-sub { font-weight: 600; margin-bottom: 0.25rem; }
.diag-steps li { margin-bottom: 0.25rem; }
.diag-links { padding-left: 1.25rem; }

/* ---------- Article (guide) ---------- */
.article-wrap { display: grid; gap: 0 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .article-wrap { grid-template-columns: minmax(0, 46rem) minmax(0, 1fr); } .article-side { padding-top: 7rem; } .article-side .related { position: sticky; top: 6rem; } }
.article { min-width: 0; padding-bottom: 1rem; }
.article-head { margin: 1.25rem 0 1rem; }
.article-head h1 { margin-bottom: 0.5rem; }
.answer {
  background: var(--water-soft); border-radius: var(--radius); padding: 1rem 1.25rem 0.25rem; margin-bottom: 1.5rem;
  font-size: 1.15rem; border: 1px solid color-mix(in srgb, var(--water) 25%, transparent);
}
.toc { background: var(--bg-alt); border-radius: var(--radius); padding: 1rem 1.25rem 0.5rem; margin-bottom: 1rem; }
.toc-title { font-family: var(--font-head); font-weight: 600; margin: 0 0 0.5rem; }
.toc ol { padding-left: 1.25rem; columns: 2 16rem; column-gap: 2rem; }
.toc li { margin-bottom: 0.25rem; break-inside: avoid; }
.article section { scroll-margin-top: 5rem; }
.article ul, .article ol, .prose ul, .prose ol { padding-left: 1.25rem; }
.article li, .prose li { margin-bottom: 0.25rem; }
.steps { counter-reset: none; }
.steps li { padding-left: 0.25rem; margin-bottom: 0.5rem; }
.steps li::marker { font-family: var(--font-head); font-weight: 600; color: var(--water); }
.cite { font-size: 0.72em; line-height: 0; }
.cite a { text-decoration: none; font-weight: 600; padding: 0 0.1rem; }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-s); }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
@media (max-width: 40rem) { table { font-size: 0.95rem; } th, td { padding: 0.5rem 0.5rem; } caption { padding: 0.5rem; } }
caption { text-align: left; font-weight: 600; padding: 0.75rem 1rem; background: var(--bg-alt); }
th, td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-top: 1px solid var(--line); }
thead th { background: var(--bg-tint); font-family: var(--font-head); font-weight: 600; }

.tool-callout { text-align: left; }
.tc-kicker { font-weight: 600; color: var(--ink-2); margin: 0 0 0.25rem; }
.tc-title { font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; margin: 0 0 0.25rem; }

.faq { margin-top: 2.5rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 2px solid var(--ink); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 0.25rem; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; min-height: 56px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font-size: 1.6rem; line-height: 1; color: var(--water); }
.faq details[open] summary::after { content: '−'; }
.faq-a { padding: 0 0.25rem 0.5rem; max-width: var(--measure); }

.sources { margin-top: 2.5rem; font-size: 1rem; }
.sources ol { padding-left: 1.5rem; }
.sources li { margin-bottom: 0.5rem; overflow-wrap: anywhere; }
.sources li:target { background: var(--warn-bg); }

.related { margin-top: 2.5rem; }
.related h2 { font-size: 1.35rem; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { border-bottom: 1px solid var(--line); }
.related a { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.75rem 0.25rem; text-decoration: none; font-weight: 600; color: var(--ink); }
.related a:hover { color: var(--link); text-decoration: underline; }
.rel-kind { font-size: 0.875rem; font-weight: 600; color: var(--water); }
@media (prefers-color-scheme: dark) { .rel-kind { color: var(--link); } }

/* ---------- Encadré sécurité ---------- */
.safety {
  background: var(--warn-bg); color: var(--warn-ink); border: 2px solid var(--warn-line);
  border-radius: var(--radius); padding: 1rem 1.25rem 0.5rem; margin: 2rem 0; max-width: 48rem;
}
.safety h2, .safety h3 { margin-top: 0; color: inherit; font-size: 1.25rem; display: flex; align-items: center; gap: 0.5rem; }
.safety svg { width: 1.6rem; height: 1.6rem; flex: none; }
.safety ul { padding-left: 1.25rem; }
.safety li { margin-bottom: 0.25rem; }
.safety a { color: inherit; }
.safety .source { font-size: 0.9rem; }

/* ---------- Pages de texte ---------- */
.prose { max-width: var(--measure); padding-bottom: 1rem; }
.prose.wide { max-width: 48rem; }
.prose h1 { margin-top: 1rem; }
.prose dl { margin: 0 0 1.25rem; }
.prose dt { font-weight: 600; margin-top: 0.75rem; }
.prose dd { margin: 0.1rem 0 0; }
article.prose { padding-bottom: 2.5rem; }

mark.a-remplir { background: var(--todo-bg); color: var(--todo-ink); font-weight: 600; padding: 0 0.25rem; border-radius: 3px; }

/* ---------- Emplacements publicitaires ----------
   Vides de tout script. Hauteur réservée dès maintenant pour que la page
   ne « saute » pas quand les annonces arriveront (février). */
.ad-slot {
  min-height: 280px; margin: 2rem 0; display: grid; place-items: center;
  background: var(--bg-alt); border-radius: var(--radius); padding: 1.25rem; text-align: center;
}
.ad-slot > * { max-width: 34rem; width: 100%; }
.ad-slot p { margin-bottom: 0.5rem; }
.house-title { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; }
.ad-slot .guide-cards { text-align: left; }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: 3.5rem; background: var(--water-deep); color: #e3f2f6; padding: 2.5rem 0 1.5rem; font-size: 1rem; }
.site-footer a { color: #fff; }
.grid.footer-grid { gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: #fff; margin-bottom: 0.5rem; }
.footer-title { font-family: var(--font-head); font-weight: 600; color: #fff; margin: 0 0 0.25rem; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.grid > .footer-copy { grid-column: 1 / -1; }
@media (max-width: 39.99rem) { .grid > .footer-copy { grid-column: auto; } }
.footer-copy { border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 1rem; margin: 0; color: #bcd9e2; font-size: 0.95rem; }

.notfound { padding-block: 2rem 1rem; max-width: var(--measure); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

@media print {
  .site-header, .site-footer, .ad-slot, .skip, .hero-art, .search { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { color: #000; }
}

/* Outil filtration */
.tool-more { margin: 0 0 1rem; border: 2px solid var(--line); border-radius: var(--radius-s); padding: 0 1rem; }
.tool-more summary { cursor: pointer; font-weight: 600; min-height: 52px; display: flex; align-items: center; }
.tool-more[open] { padding-bottom: 0.5rem; }
.tool-more .hint a { color: var(--link); }
.result-list { margin: 0.5rem 0 0; padding-left: 1.25rem; color: #e3f2f6; }
.result-list li { margin-bottom: 0.25rem; }
.result-list:empty { display: none; }
