/* Mille Outils — feuille de style unique.
   Polices du système et aucune ressource externe (politique de sécurité stricte) : les petites icônes
   d'interface sont des SVG en data: URI, autorisés par img-src.
   Thème clair et sombre (prefers-color-scheme). Chaque section a sa couleur : classes theme-<section>. */

/* ---------- Couleurs et réglages ---------- */
:root {
  color-scheme: light dark;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;

  /* Marque */
  --marque: #e8590c;          /* orange Mille Outils : logo, touches de couleur */
  --accent: #c4450c;          /* fond des boutons : texte blanc lisible (contraste 5:1) */
  --accent-survol: #a63a0a;
  --accent-texte: #b8440a;    /* liens */
  --accent-pale: #fff2e9;
  --accent-trait: #ffd3b8;
  --anneau: rgba(232, 89, 12, .28);

  /* Neutres */
  --fond: #faf8f5;
  --fond-2: #f2efea;
  --carte: #ffffff;
  --champ: #ffffff;
  --texte: #1a2033;
  --doux: #5a6272;
  --trait: #e8e4dd;
  --trait-fort: #d6d1c8;
  --trait-champ: #8e897f;
  --desactive-fond: #e9e6e0;
  --desactive-texte: #767168;
  --entete-fond: rgba(255, 255, 255, .9);

  /* États */
  --ok: #157a3c;
  --ok-pale: #e9f7ef;
  --ok-trait: #b6e3c7;
  --erreur: #b42318;
  --erreur-pale: #fdedeb;
  --erreur-trait: #f6c5bf;
  --info: #1c5fb0;
  --info-pale: #ebf3fd;
  --info-trait: #bfd6f6;

  /* Pied de page (toujours sombre) */
  --pied-fond: #151a26;
  --pied-texte: #c3c9d6;
  --pied-lien: #e8ebf2;
  --pied-trait: #2a3142;

  /* Volumes */
  --rayon: 16px;
  --ombre-1: 0 1px 2px rgba(23, 28, 45, .06), 0 1px 3px rgba(23, 28, 45, .04);
  --ombre-2: 0 1px 2px rgba(23, 28, 45, .05), 0 8px 24px -8px rgba(23, 28, 45, .14);
  --ombre-3: 0 2px 6px rgba(23, 28, 45, .06), 0 18px 40px -14px rgba(23, 28, 45, .26);

  /* Couleur de la section (par défaut : la marque) */
  --sc: var(--marque);
  --sc-fort: var(--accent);
  --sc-texte: var(--accent-texte);
  --sc-pale: var(--accent-pale);
  --sc-trait: var(--accent-trait);
}

.theme-pdf { --sc: #e03131; --sc-fort: #b02525; --sc-texte: #c92a2a; --sc-pale: #fff3f3; --sc-trait: #ffcfcf; }
.theme-images { --sc: #ae3ec9; --sc-fort: #862e9c; --sc-texte: #9c36b5; --sc-pale: #fbf2fd; --sc-trait: #eec6f7; }
.theme-logement { --sc: #2f9e44; --sc-fort: #237a35; --sc-texte: #1e7b34; --sc-pale: #effaf1; --sc-trait: #bde7c6; }
.theme-entreprise { --sc: #4263eb; --sc-fort: #2f48c2; --sc-texte: #3b5bdb; --sc-pale: #f0f4ff; --sc-trait: #c8d4ff; }
.theme-pratique { --sc: #1098ad; --sc-fort: #0b7285; --sc-texte: #0b7285; --sc-pale: #ebfafc; --sc-trait: #afe7ef; }

@media (prefers-color-scheme: dark) {
  :root {
    --marque: #ff7a2e;
    --accent-texte: #ff9e63;
    --accent-pale: #2a1b12;
    --accent-trait: #5a3420;
    --anneau: rgba(255, 122, 46, .35);

    --fond: #0e1117;
    --fond-2: #151922;
    --carte: #181c25;
    --champ: #11141b;
    --texte: #eceef4;
    --doux: #a3aaba;
    --trait: #272c37;
    --trait-fort: #363c49;
    --trait-champ: #6b7183;
    --desactive-fond: #272c37;
    --desactive-texte: #8d94a3;
    --entete-fond: rgba(14, 17, 23, .88);

    --ok: #5cd68b;
    --ok-pale: #10241a;
    --ok-trait: #23513a;
    --erreur: #ff8a80;
    --erreur-pale: #2c1514;
    --erreur-trait: #5c2a27;
    --info: #8db9ff;
    --info-pale: #131e33;
    --info-trait: #273f6b;

    --pied-fond: #0a0c11;
    --pied-trait: #222835;

    --ombre-1: 0 1px 2px rgba(0, 0, 0, .4);
    --ombre-2: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -10px rgba(0, 0, 0, .6);
    --ombre-3: 0 2px 6px rgba(0, 0, 0, .4), 0 20px 44px -14px rgba(0, 0, 0, .75);
  }
  .theme-pdf { --sc-texte: #ff8f8f; --sc-pale: #261618; --sc-trait: #57292c; }
  .theme-images { --sc-texte: #e7a3f5; --sc-pale: #23172a; --sc-trait: #4f2f58; }
  .theme-logement { --sc-texte: #7ddc8d; --sc-pale: #12221a; --sc-trait: #264d37; }
  .theme-entreprise { --sc-texte: #9db1ff; --sc-pale: #161c31; --sc-trait: #2e3b69; }
  .theme-pratique { --sc-texte: #6fd8e8; --sc-pale: #0f2228; --sc-trait: #1e4b55; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--fond); color: var(--texte);
  font: 16px/1.6 var(--police);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
main { flex: 1 0 auto; padding-bottom: 8px; }
a { color: var(--accent-texte); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.25rem + 2.2vw, 2.55rem); font-weight: 800; margin: .3em 0 .35em; }
h2 { font-size: clamp(1.25rem, 1.12rem + .6vw, 1.5rem); font-weight: 750; margin: 1.8em 0 .6em; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 1.4em 0 .4em; letter-spacing: -.01em; }
img, svg { max-width: 100%; }
canvas { max-width: 100%; }
strong, b { font-weight: 700; }
code, kbd { font-size: .92em; background: var(--fond-2); border: 1px solid var(--trait); border-radius: 6px; padding: .05em .35em; }
.conteneur { width: min(1120px, 100% - 32px); margin-inline: auto; }
.doux { color: var(--doux); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.evitement { position: absolute; left: -9999px; top: 8px; z-index: 50; }
.evitement:focus { left: 16px; background: var(--carte); color: var(--texte); padding: 10px 14px; border-radius: 10px; box-shadow: var(--ombre-3); }
:focus-visible { outline: 3px solid var(--marque); outline-offset: 2px; }

/* ---------- Pastilles d'icône (couleur de la section) ---------- */
.pastille, .carte-icone {
  flex: none; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: #fff;
  background: linear-gradient(140deg, var(--sc) 0%, var(--sc-fort) 100%);
  box-shadow: 0 6px 14px -7px var(--sc), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.pastille svg, .carte-icone svg { width: 24px; height: 24px; }
.pastille-grande { width: 60px; height: 60px; border-radius: 17px; }
.pastille-grande svg { width: 30px; height: 30px; }

/* ---------- Logo ---------- */
.logo-badge {
  flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(145deg, #ff8f3f 0%, #e8590c 52%, #c9440c 100%);
  box-shadow: 0 4px 10px -4px rgba(232, 89, 12, .7), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.logo-badge svg { width: 100%; height: 100%; }
.logo-nom { font-weight: 800; letter-spacing: -.025em; }
.logo-nom span { color: var(--marque); }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 20; background: var(--entete-fond); border-bottom: 1px solid var(--trait);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
}
.entete-ligne { display: flex; align-items: center; gap: 16px; min-height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--texte); text-decoration: none; font-size: 1.2rem; white-space: nowrap; flex: none; }
.nav-sections { display: flex; gap: 2px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-sections::-webkit-scrollbar { display: none; }
.nav-sections a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border-radius: 999px;
  color: var(--doux); text-decoration: none; white-space: nowrap; font-size: .93rem; font-weight: 600;
}
.nav-point { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); flex: none; }
.nav-sections a:hover { background: var(--fond-2); color: var(--texte); }
.nav-sections a[aria-current] { background: var(--sc-pale); color: var(--sc-texte); box-shadow: inset 0 0 0 1px var(--sc-trait); }
.entete-recherche {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; min-width: 42px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--trait-fort); background: var(--carte); color: var(--texte);
  text-decoration: none; font-weight: 600; font-size: .93rem; box-shadow: var(--ombre-1);
}
.entete-recherche:hover { border-color: var(--marque); color: var(--accent-texte); }
.entete-recherche svg { width: 18px; height: 18px; }
@media (max-width: 1180px) {
  .entete-recherche { padding: 0; }
  .entete-recherche span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 16px; }
  .entete { position: static; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--carte); }
  .entete-ligne { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-top: 10px; }
  .logo { min-height: 44px; font-size: 1.15rem; }
  .entete-recherche { margin-left: auto; }
  .nav-sections {
    order: 3; flex: 0 0 calc(100% + 32px); margin: 4px -16px 0; padding: 0 16px 10px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .nav-sections a { min-height: 38px; padding: 7px 12px; background: var(--fond-2); }
}

/* ---------- Fil d'Ariane ---------- */
.ariane ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 0; margin: 20px 0 0; font-size: .875rem; color: var(--doux); }
.ariane li { display: inline-flex; align-items: center; gap: 8px; }
.ariane li + li::before { content: ""; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .55; }
.ariane a { color: var(--doux); text-decoration: none; }
.ariane a:hover { color: var(--texte); text-decoration: underline; }
.ariane [aria-current] { color: var(--texte); font-weight: 600; }
@media (max-width: 760px) { .ariane ol { margin-top: 14px; } .ariane li[aria-current] { display: none; } }

/* ---------- Accueil ---------- */
body.page-accueil {
  background:
    radial-gradient(52% 340px at 50% 0, rgba(232, 89, 12, .13), transparent 72%) top center / 100% 760px no-repeat,
    radial-gradient(30% 300px at 12% 120px, rgba(66, 99, 235, .07), transparent 70%) top center / 100% 760px no-repeat,
    radial-gradient(30% 300px at 88% 160px, rgba(47, 158, 68, .07), transparent 70%) top center / 100% 760px no-repeat,
    var(--fond);
}
.hero { position: relative; text-align: center; padding: 52px 0 26px; }
.hero-contenu { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hero-surtitre {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin: 0 0 18px; padding: 6px 14px 6px 8px;
  border-radius: 999px; background: var(--carte); border: 1px solid var(--trait); box-shadow: var(--ombre-1);
  color: var(--doux); font-size: .9rem; font-weight: 600; text-decoration: none; line-height: 1.35; text-align: left;
}
a.hero-surtitre { color: var(--texte); }
a.hero-surtitre:hover { border-color: var(--accent-trait); box-shadow: var(--ombre-2); }
.hero-surtitre .etiquette {
  flex: none; background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 9px;
  font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.point-vivant { flex: none; width: 10px; height: 10px; margin-left: 4px; border-radius: 50%; background: #2fb35a; box-shadow: 0 0 0 4px rgba(47, 179, 90, .18); }
.hero h1 { font-size: clamp(2.3rem, 1.3rem + 4.4vw, 4rem); font-weight: 850; letter-spacing: -.04em; line-height: 1.04; margin: 0 0 .3em; }
.surligne {
  color: var(--marque); white-space: nowrap; padding-bottom: .06em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 10.5C52 4 128 2.5 197 6.5' fill='none' stroke='%23e8590c' stroke-opacity='.4' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 100% .3em no-repeat;
}
.hero-texte { font-size: clamp(1.05rem, .98rem + .4vw, 1.2rem); color: var(--doux); max-width: 640px; margin: 0 auto 26px; line-height: 1.55; }
.recherche { position: relative; max-width: 660px; margin: 0 auto; }
.recherche-icone { position: absolute; left: 20px; top: 50%; width: 22px; height: 22px; margin-top: -11px; color: var(--doux); pointer-events: none; }
.recherche input[type=search] {
  width: 100%; height: 62px; padding: 0 20px 0 54px; font: inherit; font-size: 1.08rem; color: var(--texte);
  border-radius: 18px; border: 2px solid var(--trait-fort); background: var(--carte);
  box-shadow: 0 2px 6px rgba(23, 28, 45, .05), 0 14px 34px -16px rgba(23, 28, 45, .3);
  -webkit-appearance: none; appearance: none;
}
.recherche input[type=search]::placeholder { color: var(--doux); opacity: 1; }
.recherche input[type=search]:focus { border-color: var(--marque); outline: 2px solid transparent; box-shadow: 0 0 0 5px var(--anneau), 0 14px 34px -16px rgba(23, 28, 45, .3); }
.resultats-recherche { margin: 12px 0 0; font-size: .93rem; font-weight: 600; color: var(--doux); }
.resultats-recherche:empty { margin: 0; }
.populaires { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 10px; margin-top: 20px; }
.populaires-titre { margin: 0; font-size: .88rem; font-weight: 650; color: var(--doux); }
.populaires ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.raccourci {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 5px 14px 5px 6px; border-radius: 999px;
  background: var(--carte); border: 1px solid var(--trait); box-shadow: var(--ombre-1);
  color: var(--texte); text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.raccourci:hover { border-color: var(--sc-trait); box-shadow: var(--ombre-2); transform: translateY(-1px); }
.raccourci .pastille { width: 28px; height: 28px; border-radius: 50%; box-shadow: none; }
.raccourci .pastille svg { width: 16px; height: 16px; }
.hero-decor { position: absolute; inset: 0; pointer-events: none; }
.hero-decor .pastille { position: absolute; width: 58px; height: 58px; border-radius: 17px; opacity: .95; box-shadow: 0 16px 30px -14px var(--sc); }
.hero-decor .pastille svg { width: 28px; height: 28px; }
.hero-decor .pastille:nth-child(1) { left: 2%; top: 64px; transform: rotate(-10deg); }
.hero-decor .pastille:nth-child(2) { right: 4%; top: 42px; transform: rotate(8deg); }
.hero-decor .pastille:nth-child(3) { left: 7%; top: 250px; transform: rotate(7deg) scale(.86); }
.hero-decor .pastille:nth-child(4) { right: 1%; top: 230px; transform: rotate(-7deg) scale(.9); }
.hero-decor .pastille:nth-child(5) { left: 16%; top: 10px; transform: rotate(4deg) scale(.7); }
@media (max-width: 1060px) { .hero-decor { display: none; } }
@media (max-width: 760px) {
  .hero { padding: 26px 0 16px; }
  .hero-surtitre { font-size: .84rem; margin-bottom: 14px; }
  .hero-texte { margin-bottom: 20px; }
  .recherche input[type=search] { height: 56px; padding-left: 48px; font-size: 1rem; border-radius: 16px; }
  .recherche-icone { left: 17px; }
  .populaires { justify-content: flex-start; margin-top: 16px; }
  .populaires-titre { flex-basis: 100%; text-align: left; }
  .populaires ul { justify-content: flex-start; }
  .raccourci { font-size: .86rem; padding-right: 12px; }
}

/* Bandeau de confiance */
.confiance {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 26px 0 8px; padding: 10px;
  background: var(--carte); border: 1px solid var(--trait); border-radius: 22px; box-shadow: var(--ombre-2);
}
.confiance li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; }
.confiance li + li { box-shadow: -1px 0 0 var(--trait); }
.confiance-icone { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ok-pale); color: var(--ok); }
.confiance li:nth-child(2) .confiance-icone { background: var(--info-pale); color: var(--info); }
.confiance li:nth-child(3) .confiance-icone { background: var(--accent-pale); color: var(--accent-texte); }
.confiance-icone svg { width: 22px; height: 22px; }
.confiance strong { display: block; font-size: 1rem; line-height: 1.3; }
.confiance span span { display: block; color: var(--doux); font-size: .88rem; line-height: 1.4; }
@media (max-width: 860px) {
  .confiance { grid-template-columns: 1fr; padding: 6px; margin-top: 18px; }
  .confiance li { padding: 10px 12px; }
  .confiance li + li { box-shadow: 0 -1px 0 var(--trait); border-radius: 0; }
  .confiance-icone { width: 38px; height: 38px; }
}
body.recherche-active .confiance, body.recherche-active .etapes, body.recherche-active .populaires { display: none; }
.aucun-resultat { text-align: center; color: var(--doux); padding: 28px 16px; margin: 20px 0 0; border: 1px dashed var(--trait-fort); border-radius: var(--rayon); background: var(--carte); }

/* Sections de l'accueil */
.bloc-section { margin-top: 30px; padding: 22px; border-radius: 26px; background: var(--sc-pale); border: 1px solid var(--sc-trait); }
.bloc-entete { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.bloc-titres { flex: 1; min-width: 0; }
.bloc-entete h2 { margin: 0; }
.bloc-intro { margin: 2px 0 0; color: var(--doux); font-size: .93rem; line-height: 1.45; max-width: 640px; }
.voir-tout {
  flex: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .93rem; font-weight: 650;
  color: var(--sc-texte); text-decoration: none; padding: 8px 12px; border-radius: 999px;
}
.voir-tout svg { width: 16px; height: 16px; transition: transform .15s ease; }
.voir-tout:hover { background: var(--carte); text-decoration: underline; }
.voir-tout:hover svg { transform: translateX(3px); }
@media (max-width: 760px) {
  .bloc-section { margin-top: 20px; padding: 14px; border-radius: 20px; }
  .bloc-entete { flex-wrap: wrap; gap: 4px 12px; margin-bottom: 14px; }
  .bloc-entete .pastille { width: 42px; height: 42px; }
  .bloc-intro { display: none; }
  .bloc-titres { flex: 1 1 calc(100% - 60px); }
  .voir-tout { padding: 6px 0; margin-left: 54px; }
}

/* Comment ça marche */
.etapes { margin-top: 48px; text-align: center; }
.etapes h2 { margin: 0 0 6px; }
.etapes > p { margin: 0 auto 22px; color: var(--doux); max-width: 600px; }
.etapes ol { list-style: none; counter-reset: etape; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0; margin: 0; text-align: left; }
.etapes li { counter-increment: etape; position: relative; padding: 20px 20px 20px 72px; background: var(--carte); border: 1px solid var(--trait); border-radius: 20px; box-shadow: var(--ombre-1); }
.etapes li::before {
  content: counter(etape); position: absolute; left: 20px; top: 20px; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 12px; background: var(--accent-pale); color: var(--accent-texte); font-weight: 800; font-size: 1.1rem; box-shadow: inset 0 0 0 1px var(--accent-trait);
}
.etapes strong { display: block; line-height: 1.3; margin-bottom: 4px; }
.etapes li span { color: var(--doux); font-size: .93rem; line-height: 1.45; }
@media (max-width: 860px) { .etapes { margin-top: 36px; } .etapes ol { grid-template-columns: 1fr; gap: 10px; } .etapes li { padding: 16px 16px 16px 66px; } .etapes li::before { left: 16px; top: 16px; } }

/* ---------- Cartes d'outils ---------- */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 14px; }
.carte {
  position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px 38px 16px 16px; border-radius: var(--rayon);
  background: var(--carte); border: 1px solid var(--trait); color: var(--texte); text-decoration: none; box-shadow: var(--ombre-1);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.carte:hover { transform: translateY(-3px); box-shadow: var(--ombre-3); border-color: var(--sc-trait); }
.carte:active { transform: translateY(-1px); }
.carte-texte { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.carte-texte strong { font-size: 1.02rem; line-height: 1.3; letter-spacing: -.01em; }
.carte-texte > span { color: var(--doux); font-size: .9rem; line-height: 1.45; }
.carte:hover .carte-texte strong { color: var(--sc-texte); }
.carte-fleche { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--trait-fort); transition: transform .16s ease, color .16s ease; }
.carte:hover .carte-fleche { color: var(--sc-texte); transform: translateX(3px); }
.badge {
  display: inline-block; background: #ffd43b; color: #3d2a00 !important; font-size: .7rem; font-weight: 800; letter-spacing: .06em;
  padding: 2px 9px; border-radius: 999px; text-transform: uppercase; line-height: 1.6;
  box-shadow: 0 3px 8px -3px rgba(180, 120, 0, .55);
}
.carte .badge { position: absolute; top: -9px; right: 14px; }
@media (max-width: 760px) {
  .grille { gap: 10px; }
  .carte { padding: 14px 36px 14px 14px; gap: 12px; }
  .carte-icone { width: 42px; height: 42px; border-radius: 12px; }
  .carte-icone svg { width: 22px; height: 22px; }
}

/* ---------- Page de section ---------- */
body.page-section { background: linear-gradient(180deg, var(--sc-pale) 0, var(--fond) 460px) top / 100% 460px no-repeat, var(--fond); }
.tete-section { display: flex; align-items: flex-start; gap: 18px; margin: 18px 0 26px; }
.tete-section h1 { margin: 0 0 .2em; }
.tete-section .chapeau { margin-bottom: 10px; }
.tete-compte { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--carte); border: 1px solid var(--sc-trait); color: var(--sc-texte); font-weight: 650; font-size: .88rem; }
.vide { padding: 28px; border-radius: 22px; background: var(--carte); border: 1px dashed var(--sc-trait); text-align: center; }
.vide p { margin: 0 auto 6px; max-width: 520px; }
.vide strong { font-size: 1.1rem; }
.autres-sections { margin-top: 44px; }
.autres-sections h2 { margin: 0 0 14px; font-size: 1.15rem; }
.liste-raccourcis { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 760px) {
  .tete-section { gap: 14px; margin: 12px 0 20px; }
  .tete-section .pastille-grande { width: 48px; height: 48px; border-radius: 14px; }
  .tete-section .pastille-grande svg { width: 25px; height: 25px; }
}

/* ---------- Page d'outil ---------- */
body.page-outil-corps { background: linear-gradient(180deg, var(--sc-pale) 0, var(--fond) 520px) top / 100% 520px no-repeat, var(--fond); }
.page-outil-corps main.conteneur { width: min(900px, 100% - 32px); }
.tete-outil { display: flex; align-items: center; gap: 16px; margin: 14px 0 0; }
.tete-outil h1 { margin: 0; }
.chapeau { font-size: 1.08rem; color: var(--doux); max-width: 760px; margin: 12px 0 0; line-height: 1.55; }
.outil {
  position: relative; background: var(--carte); border: 1px solid var(--trait); border-radius: 24px; padding: 28px;
  margin: 24px 0 10px; box-shadow: inset 0 4px 0 var(--sc), var(--ombre-2);
}
.outil > :first-child { margin-top: 0; }
.outil > :last-child { margin-bottom: 0; }
.texte { max-width: 760px; margin-top: 8px; }
.texte > h2::before { content: ""; display: block; width: 34px; height: 4px; border-radius: 4px; background: var(--sc); margin-bottom: 12px; }
.texte > ol { list-style: none; counter-reset: etape; padding: 0; margin: 16px 0; }
.texte > ol > li { counter-increment: etape; position: relative; padding: 3px 0 3px 46px; margin: 12px 0; min-height: 32px; }
.texte > ol > li::before {
  content: counter(etape); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 10px; background: var(--sc-pale); color: var(--sc-texte); font-weight: 800; box-shadow: inset 0 0 0 1px var(--sc-trait);
}
.texte > ul { padding-left: 1.3em; }
.texte > ul > li { margin: 6px 0; }
.texte > ul > li::marker { color: var(--sc); }
.texte details { border: 1px solid var(--trait); border-radius: 14px; margin: 10px 0; background: var(--carte); box-shadow: var(--ombre-1); transition: border-color .15s ease; }
.texte details[open] { border-color: var(--sc-trait); }
.texte summary { cursor: pointer; list-style: none; position: relative; padding: 14px 48px 14px 18px; font-weight: 650; border-radius: 14px; }
.texte summary::-webkit-details-marker { display: none; }
.texte summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--sc-texte); border-bottom: 2px solid var(--sc-texte); transform: rotate(45deg); transition: transform .2s ease;
}
.texte details[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.texte summary:hover { color: var(--sc-texte); }
.texte details > :not(summary) { margin: 0 18px 14px; }
.texte details > p:first-of-type { margin-top: -2px; }
.texte .source, .source { font-size: .9rem; color: var(--doux); }
.texte .source { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--trait); }
.autres { margin-top: 48px; }
.autres-entete { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 16px; }
.autres-entete h2 { margin: 0; display: flex; align-items: center; gap: 12px; }
.autres-entete .pastille { width: 36px; height: 36px; border-radius: 11px; }
.autres-entete .pastille svg { width: 20px; height: 20px; }
.decouvrir { margin-top: 34px; }
.decouvrir h2 { margin: 0 0 12px; font-size: 1.05rem; }
.page-texte { max-width: 760px; padding-bottom: 32px; }
.page-texte h1 { margin-top: .6em; }
@media (max-width: 760px) {
  .tete-outil { gap: 12px; margin-top: 10px; }
  .tete-outil .pastille { width: 42px; height: 42px; border-radius: 12px; }
  .tete-outil .pastille svg { width: 22px; height: 22px; }
  .chapeau { font-size: 1rem; margin-top: 10px; }
  .outil { padding: 18px 16px; margin: 18px -6px 10px; border-radius: 20px; }
  .texte summary { padding: 13px 44px 13px 14px; }
  .texte details > :not(summary) { margin: 0 14px 12px; }
}

/* ---------- Formulaires et contrôles des outils ---------- */
.zone-depot {
  position: relative; display: block; text-align: center; cursor: pointer; padding: 34px 20px 30px;
  border: 2px dashed var(--sc-trait); border-radius: 20px; background: var(--sc-pale);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.zone-depot::before {
  content: ""; display: block; width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5V4.5M7.5 9 12 4.5 16.5 9'/%3E%3Cpath d='M4.5 14.5v3a2.5 2.5 0 0 0 2.5 2.5h10a2.5 2.5 0 0 0 2.5-2.5v-3'/%3E%3C/svg%3E") center / 28px no-repeat,
    linear-gradient(140deg, var(--sc), var(--sc-fort));
  box-shadow: 0 10px 22px -10px var(--sc); transition: transform .2s ease;
}
.zone-depot:hover, .zone-depot.survol { border-color: var(--sc); border-style: solid; box-shadow: 0 0 0 4px var(--sc-pale); }
.zone-depot:hover::before, .zone-depot.survol::before { transform: translateY(-3px); }
.zone-depot strong { display: block; font-size: 1.18rem; line-height: 1.3; margin-bottom: 4px; }
.zone-depot .aide { display: block; }
.zone-depot input[type=file] { display: none; }
@media (max-width: 760px) { .zone-depot { padding: 24px 14px 22px; } .zone-depot::before { width: 52px; height: 52px; margin-bottom: 10px; } }

.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 18px; margin: 18px 0; }
.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ label, .legende { font-weight: 650; font-size: .95rem; line-height: 1.35; }
.champ small, .aide { color: var(--doux); font-size: .875rem; line-height: 1.45; }
input[type=text], input[type=number], input[type=date], input[type=month], input[type=week], input[type=time],
input[type=datetime-local], input[type=email], input[type=tel], input[type=url], input[type=search], input[type=password],
input:not([type]), select, textarea {
  font: inherit; font-size: 1rem; color: var(--texte); background: var(--champ); width: 100%; min-height: 46px;
  padding: 10px 13px; border: 1px solid var(--trait-champ); border-radius: 11px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 80px; line-height: 1.5; resize: vertical; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background: var(--champ) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6272' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
}
@media (prefers-color-scheme: dark) {
  select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3aaba' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
}
input::placeholder, textarea::placeholder { color: var(--doux); opacity: .85; }
input:hover, select:hover, textarea:hover { border-color: var(--texte); }
input:focus, select:focus, textarea:focus { border-color: var(--marque); outline: 2px solid transparent; box-shadow: 0 0 0 4px var(--anneau); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; cursor: pointer; }
input[type=range], progress { accent-color: var(--accent); }
input[type=range] { width: 100%; }
input[type=color] { min-height: 46px; padding: 4px; border: 1px solid var(--trait-champ); border-radius: 11px; background: var(--champ); cursor: pointer; }
fieldset { border: 1px solid var(--trait); border-radius: 18px; padding: 14px 20px 18px; margin: 18px 0; background: var(--fond); min-width: 0; }
legend { font-weight: 750; padding: 0 8px; margin-left: -6px; font-size: 1rem; }
fieldset > .champs:first-of-type { margin-top: 6px; }
fieldset > .champs:last-child { margin-bottom: 0; }
.choix { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.champ .choix { margin: 0; }
.choix label {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 9px 14px; font-weight: 550; line-height: 1.35;
  border: 1px solid var(--trait-fort); border-radius: 12px; background: var(--champ); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.choix label:hover { border-color: var(--trait-champ); }
.choix label:has(input:checked) { border-color: var(--accent); background: var(--accent-pale); box-shadow: inset 0 0 0 1px var(--accent); }
.choix label:has(input:focus-visible) { outline: 3px solid var(--marque); outline-offset: 2px; }
.choix label input[type=text], .choix label input:not([type]) { min-height: 34px; padding: 4px 8px; }
.choix.colonne { flex-direction: column; align-items: stretch; gap: 10px; }
.choix.colonne label { align-items: flex-start; padding: 12px 14px; }
.choix.colonne input { margin-top: 2px; }
.court { max-width: 220px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; align-items: center; }
.bouton {
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.25; min-height: 50px; padding: 13px 24px; border: 0; border-radius: 13px; cursor: pointer;
  background: var(--accent); color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 18px -8px rgba(196, 69, 12, .75), inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.bouton:hover { background: var(--accent-survol); color: #fff; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 12px 22px -10px rgba(196, 69, 12, .8); }
.bouton:active { transform: translateY(0); }
.bouton:disabled { background: var(--desactive-fond); color: var(--desactive-texte); box-shadow: none; transform: none; cursor: not-allowed; }
.bouton.secondaire { background: var(--carte); color: var(--texte); border: 1px solid var(--trait-fort); box-shadow: var(--ombre-1); }
.bouton.secondaire:hover { border-color: var(--texte); background: var(--carte); color: var(--texte); box-shadow: var(--ombre-2); }
.bouton.secondaire:disabled { background: var(--desactive-fond); color: var(--desactive-texte); }
@media (max-width: 760px) { .actions .bouton { flex: 1 1 100%; } }
.liste-fichiers { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; }
.liste-fichiers:empty { display: none; }
.liste-fichiers li {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px 10px 48px; position: relative; min-height: 56px;
  border: 1px solid var(--trait); border-radius: 14px; background: var(--carte); box-shadow: var(--ombre-1);
}
.liste-fichiers li::before {
  content: ""; position: absolute; left: 12px; top: 50%; width: 24px; height: 24px; margin-top: -12px; background: var(--sc);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.liste-fichiers .nom { flex: 1 1 160px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.35; }
.liste-fichiers .info { color: var(--doux); font-size: .875rem; white-space: nowrap; }
.mini {
  font: inherit; font-size: .9rem; font-weight: 600; min-width: 36px; min-height: 36px; padding: 4px 10px; cursor: pointer;
  border: 1px solid var(--trait-fort); background: var(--carte); color: var(--texte); border-radius: 10px;
  transition: border-color .15s ease, background-color .15s ease;
}
.mini:hover { border-color: var(--texte); background: var(--fond-2); }
.mini:disabled { opacity: .4; cursor: not-allowed; }
.mini:disabled:hover { border-color: var(--trait-fort); background: var(--carte); }
.message {
  position: relative; margin: 16px 0 0; padding: 12px 14px 12px 44px; border-radius: 13px; border: 1px solid; line-height: 1.5;
  background: var(--info-pale); color: var(--info); border-color: var(--info-trait);
}
.message::before {
  content: ""; position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 11v5.5M12 7.6v.1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 11v5.5M12 7.6v.1'/%3E%3C/svg%3E") center / contain no-repeat;
}
.message.ok { background: var(--ok-pale); color: var(--ok); border-color: var(--ok-trait); }
.message.ok::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m7.8 12.3 2.8 2.8 5.6-5.8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m7.8 12.3 2.8 2.8 5.6-5.8'/%3E%3C/svg%3E");
}
.message.erreur { background: var(--erreur-pale); color: var(--erreur); border-color: var(--erreur-trait); }
.message.erreur::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.2 2.6 17.5A2 2 0 0 0 4.3 20.5h15.4a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.5v4.5M12 17.2v.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.2 2.6 17.5A2 2 0 0 0 4.3 20.5h15.4a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.5v4.5M12 17.2v.1'/%3E%3C/svg%3E");
}
.message.info { background: var(--info-pale); color: var(--info); border-color: var(--info-trait); }
.message a { color: inherit; font-weight: 650; }
.resultat {
  margin-top: 22px; padding: 22px; border-radius: 20px; background: var(--sc-pale); border: 1px solid var(--sc-trait);
  animation: apparition .28s ease-out;
}
.resultat > :first-child { margin-top: 0; }
.resultat > :last-child { margin-bottom: 0; }
.resultat h3 { margin-top: 1.3em; }
.resultat-principal { font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2.15rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 0; font-variant-numeric: tabular-nums; }
.resultat > .doux:first-child { margin-bottom: 2px; font-weight: 600; font-size: .93rem; }
@keyframes apparition { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .resultat { padding: 16px; border-radius: 16px; } }
.tableau { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .97rem; }
.tableau th, .tableau td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau thead th { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); border-bottom-width: 2px; }
.resultat .tableau th, .resultat .tableau td { border-bottom-color: var(--sc-trait); }
.tableau td.nombre, .tableau th.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau.leger tbody th, .tableau.leger > tr > th { font-weight: 500; }
.tableau tr.total th, .tableau tr.total td { font-weight: 800; border-top: 2px solid var(--trait-fort); }
.vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 18px; }
.vignettes:empty { display: none; }
.vignettes figure { margin: 0; border: 1px solid var(--trait); border-radius: 14px; padding: 10px; background: var(--carte); text-align: center; box-shadow: var(--ombre-1); }
.vignettes img { display: block; margin: 0 auto 8px; max-height: 180px; border: 1px solid var(--trait); border-radius: 4px; background: #fff; }
.vignettes figcaption { font-size: .875rem; }
.courrier {
  white-space: pre-wrap; font-family: inherit; font-size: .97rem; line-height: 1.6; background: var(--carte); color: var(--texte);
  border: 1px solid var(--trait); border-radius: 14px; padding: 18px 20px; margin: 14px 0; box-shadow: var(--ombre-1); overflow-wrap: anywhere;
}
.etiquettes { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; }
.barre-ligne { display: grid; grid-template-columns: 36px 1fr 96px; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.barre-ligne .lettre { font-weight: 800; font-size: 1.2rem; line-height: 1.35; text-align: center; border-radius: 7px; color: #fff; padding: 1px 0; }
.barre { height: 14px; border-radius: 7px; background: var(--trait); overflow: hidden; }
.barre > span { display: block; height: 100%; border-radius: 7px; background: var(--doux); }
.barre-ligne.vous .barre > span { background: var(--accent); }
.barre-ligne .part { text-align: right; color: var(--doux); font-size: .9rem; white-space: nowrap; }
.barre-ligne.vous .part { color: var(--texte); font-weight: 750; }
.barre-ligne.vous .lettre { box-shadow: 0 0 0 3px var(--carte), 0 0 0 5px var(--texte); }
/* Couleurs officielles du DPE ; lettres foncées là où le blanc manque de contraste. */
.lettre-A { background: #009c6d; } .lettre-B { background: #52b153; color: #13202a !important; } .lettre-C { background: #78bd76; color: #13202a !important; }
.lettre-D { background: #f4e70f; color: #13202a !important; } .lettre-E { background: #f0b40f; color: #13202a !important; }
.lettre-F { background: #eb8235; color: #13202a !important; } .lettre-G { background: #d7221f; }

/* Petits calculs (pourcentages, HT/TTC) */
.calculs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.calcul { border: 1px solid var(--trait); border-radius: 18px; padding: 16px 18px; background: var(--fond); transition: border-color .15s ease; }
.calcul:focus-within { border-color: var(--sc-trait); background: var(--sc-pale); }
.calcul-titre { font-size: 1.02rem; margin: 0 0 12px; }
.ligne-calcul { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ligne-calcul input, .ligne-calcul select { width: auto; }
input.petit { width: 92px; }
.calcul-resultat { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; margin: 12px 0 0; min-height: 1.6em; overflow-wrap: anywhere; color: var(--sc-texte); font-variant-numeric: tabular-nums; }
.calcul-detail { color: var(--doux); font-size: .9rem; margin: 2px 0 0; }
.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chiffres > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--carte); border: 1px solid var(--sc-trait); }
.chiffres > div:last-child { background: var(--sc); border-color: transparent; color: #fff; }
.chiffres > div:last-child .doux { color: rgba(255, 255, 255, .88); }
.chiffres strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; letter-spacing: -.01em; }
@media (max-width: 560px) { .chiffres { grid-template-columns: 1fr; } .calculs { grid-template-columns: 1fr; } }
.saisie td { vertical-align: middle; }
.saisie th { vertical-align: middle; }
.saisie input { max-width: 180px; min-width: 104px; }
@media (max-width: 600px) { fieldset { padding: 10px 12px 14px; } .saisie th, .saisie td { padding: 8px 4px; } }
.frise { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.frise li { position: relative; border-left: 3px solid var(--trait-fort); padding: 6px 0 6px 18px; }
.frise li::before { content: ""; position: absolute; left: -8px; top: 12px; width: 13px; height: 13px; border-radius: 50%; background: var(--carte); border: 3px solid var(--trait-fort); }
.frise li.actif { border-left-color: var(--ok); }
.frise li.actif::before { border-color: var(--ok); background: var(--ok); }
.frise li.a-venir { border-left-color: var(--marque); }
.frise li.a-venir::before { border-color: var(--marque); }
.frise .quand { display: block; font-weight: 800; }
.etat { display: inline-block; font-size: .76rem; font-weight: 750; padding: 1px 9px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.etat.en-vigueur { background: var(--ok-pale); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-trait); }
.etat.bientot { background: var(--accent-pale); color: var(--accent-texte); box-shadow: inset 0 0 0 1px var(--accent-trait); }

/* ---------- Pages simples : plan du site, page introuvable ---------- */
.plan-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.plan-section { padding: 18px 20px; border-radius: 18px; background: var(--carte); border: 1px solid var(--trait); }
.plan-section h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 1.1rem; }
.plan-section h2 .pastille { width: 34px; height: 34px; border-radius: 10px; }
.plan-section h2 .pastille svg { width: 18px; height: 18px; }
.plan-section ul { margin: 0; padding-left: 1.2em; }
.plan-section li { margin: 4px 0; }
.page-erreur { text-align: center; padding: 40px 0 16px; }
.erreur-code {
  margin: 0; font-size: clamp(4.5rem, 3rem + 8vw, 8rem); font-weight: 900; line-height: 1; letter-spacing: -.05em;
  background: linear-gradient(140deg, #ff8f3f, #e8590c 55%, #b02525); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-erreur h1 { margin: .2em 0 .3em; }
.page-erreur > p { color: var(--doux); max-width: 520px; margin: 0 auto 22px; }
.page-erreur .liste-raccourcis { justify-content: center; margin-top: 28px; }

/* ---------- Pied de page ---------- */
.pied { margin-top: 64px; background: var(--pied-fond); color: var(--pied-texte); padding: 44px 0 0; font-size: .95rem; }
.pied-grille { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; }
.pied ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pied a { color: var(--pied-lien); text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.pied-nom { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin: 0; color: #fff; }
.pied-nom .logo-nom span { color: #ff8f4d; }
.pied-slogan { margin: 12px 0 6px; font-weight: 700; color: #fff; }
.pied .doux { color: var(--pied-texte); max-width: 380px; }
.pied-titre { font-size: .8rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin: 4px 0 14px; }
.pied-bas { margin-top: 36px; padding: 18px 0 26px; border-top: 1px solid var(--pied-trait); font-size: .875rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }
.pied-bas p { margin: 0; }
@media (max-width: 760px) {
  .pied { margin-top: 48px; padding-top: 34px; }
  .pied-grille { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .pied-grille > :first-child { grid-column: 1 / -1; }
}

/* ---------- Confort ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .entete, .pied, .ariane, .autres, .decouvrir, .evitement { display: none !important; }
  body, body.page-outil-corps { background: #fff; color: #000; }
  .outil, .resultat, .carte { box-shadow: none; }
}

/* Signer un PDF : cadre où l'on dessine la signature (le doigt dessine au lieu de faire défiler la page).
   Fond blanc même en mode sombre, pour que l'encre reste visible. */
.signature { display: block; width: 100%; max-width: 600px; height: auto; margin: 8px 0; background: #fff; border: 2px dashed var(--trait); border-radius: 12px; touch-action: none; cursor: crosshair; }
.signature.apercu { cursor: default; }

/* Tableaux larges (tableau d’amortissement) : défilent dans leur cadre sur téléphone. */
.defilement { overflow-x: auto; }
