/* passion-moto.fr : home « le compteur kilométrique ».
   Couleurs, polices et rayons du thème (src/styles/global.css) ; aucune autre teinte. */
.tn-home {
  --tn-ink: var(--color-ink, #32251f);
  --tn-muted: var(--color-muted, #725a4f);
  --tn-paper: var(--color-paper, #f9f7f5);
  --tn-moss: var(--color-moss, #925b45);
  --tn-moss-dark: var(--color-moss-dark, #6f412f);
  --tn-coral: var(--color-coral, #e8795f);
  --tn-line: var(--color-line, #ddd4d0);
  --tn-soft: var(--color-soft, #efe7e2);
  --tn-band: var(--color-band, #f3ede9);
  --tn-titre: 'Alexandria Variable', 'IBM Plex Sans Arabic', sans-serif;
  --tn-texte: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;
  --tn-ombre: 0 1px 2px rgb(50 37 31 / 0.05), 0 12px 32px -18px rgb(50 37 31 / 0.18);
  color: var(--tn-ink);
  font-family: var(--tn-texte);
  width: 100%;
}
.tn-home *, .tn-home *::before, .tn-home *::after { box-sizing: border-box; }
.tn-home h1, .tn-home h2, .tn-home h3 { font-family: var(--tn-titre); color: var(--tn-ink); margin: 0; font-weight: 700; }
.tn-home p { margin: 0; }
.tn-home ol, .tn-home ul { list-style: none; margin: 0; padding: 0; }
.tn-home a { color: inherit; }
.tn-home svg { display: inline-block; flex-shrink: 0; vertical-align: middle; }

.tn-wrap { width: min(100% - clamp(2rem, 6vw, 3rem), 80rem); margin-inline: auto; }
.tn-muted { color: var(--tn-muted); }
.tn-petit { font-size: 0.9rem; line-height: 1.6; }
.tn-centre { text-align: center; }

/* ---------- grammaire commune ---------- */
.tn-kicker {
  display: inline-flex; align-items: center; gap: 0.55rem;
  border: 1px solid var(--tn-line); border-radius: 999px; background: #fff;
  padding: 0.4rem 0.95rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--tn-moss); line-height: 1.2;
}
.tn-kicker-point { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--tn-coral); box-shadow: 0 0 0 3px var(--tn-soft); }
.tn-h2 {
  margin-top: 1.1rem !important; font-size: clamp(1.9rem, 3.4vw, 2.85rem); font-weight: 700;
  line-height: 1.12 !important; letter-spacing: -0.02em; text-wrap: balance;
}
.tn-h2 em, .tn-h1 em { font-style: normal; color: var(--tn-moss); }
.tn-tete { text-align: center; max-width: 48rem; margin: 0 auto clamp(2.5rem, 4vw, 3.5rem); }
.tn-tete-chapo { margin-top: 1rem !important; color: var(--tn-muted); font-size: 1.075rem; }
.tn-section { padding-block: clamp(4.5rem, 8vw, 7rem); }
.tn-fond-bande { background: var(--tn-band); border-block: 1px solid var(--tn-line); }
.tn-carte {
  background: #fff; border: 1px solid var(--tn-line); border-radius: 1rem;
  padding: clamp(1.25rem, 2vw, 1.75rem); box-shadow: var(--tn-ombre);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
@media (hover: hover) {
  .tn-carte:hover { transform: translateY(-3px); border-color: rgb(146 91 69 / 0.45); box-shadow: 0 2px 4px rgb(50 37 31 / 0.05), 0 22px 44px -22px rgb(146 91 69 / 0.35); }
}
.tn-ico {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 0.85rem;
  background: var(--tn-soft); color: var(--tn-moss);
}
.tn-num { font-family: var(--tn-titre); font-weight: 700; font-size: 0.95rem; color: var(--tn-coral); letter-spacing: 0.04em; }
.tn-lien {
  display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; color: var(--tn-moss) !important;
  text-decoration: underline; text-decoration-color: var(--tn-coral); text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.tn-lien:hover { color: var(--tn-moss-dark) !important; }
.tn-jauge { display: flex; align-items: center; gap: 0.85rem; margin-top: 1.1rem; }
.tn-jauge-barre { flex: 1; height: 0.5rem; border-radius: 999px; background: var(--tn-soft); overflow: hidden; }
.tn-jauge-plein { display: block; height: 100%; border-radius: inherit; background: var(--tn-moss); transform-origin: left center; }
.tn-jauge-valeur { font-size: 0.9rem; color: var(--tn-muted); white-space: nowrap; }
.tn-jauge-valeur strong { font-family: var(--tn-titre); font-size: 1.15rem; color: var(--tn-ink); }

/* ---------- HERO ---------- */
.tn-hero {
  position: relative; display: grid; align-items: center;
  min-height: calc(100svh - var(--tn-entete, 10rem));
  padding-block: clamp(1.5rem, 3.5vw, 2.75rem);
  background: var(--tn-paper);
  border-bottom: 1px solid var(--tn-line);
}
.tn-hero-grille { display: grid; grid-template-columns: minmax(0, 0.76fr) minmax(0, 1.24fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.tn-hero-texte { min-width: 0; }
.tn-h1 {
  margin-top: 1.25rem !important; font-family: var(--tn-titre) !important; font-weight: 700;
  font-size: clamp(2.35rem, 3.9vw, 3.5rem); line-height: 1.06 !important; letter-spacing: -0.035em;
  padding-block: 0.04em 0.1em; text-wrap: balance;
}
.tn-chapo { margin-top: 1.35rem !important; max-width: 34rem; font-size: 1.125rem; line-height: 1.65; color: var(--tn-muted); }
.tn-hero-boutons { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.tn-hero-reperes { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 clamp(1.5rem, 3vw, 2.75rem); margin: 2.25rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--tn-line); }
.tn-hero-reperes div { display: flex; flex-direction: column-reverse; }
.tn-hero-reperes dd { margin: 0; font-family: var(--tn-titre); font-weight: 700; font-size: 2.1rem; line-height: 1.1; color: var(--tn-ink); }
.tn-hero-reperes dt { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; color: var(--tn-muted); }
.tn-hero-reperes dt svg { color: var(--tn-moss); }

/* scène : la vraie photo du compteur de la moto, nette et entière ; l'afficheur se pose sur son bord bas, le carnet à côté */
.tn-scene { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(1.25rem, 2vw, 1.75rem); align-items: center; }
.tn-scene-photo {
  position: relative; margin: 0 0 2.6rem; min-width: 0; width: 100%; justify-self: end;
  max-width: calc((100svh - var(--tn-entete, 10rem) - 6rem) * 0.8);
}
.tn-scene-photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 50%;
  border-radius: 1.5rem; border: 1px solid var(--tn-line); background: var(--tn-ink); box-shadow: var(--tn-ombre);
}
/* afficheur du compteur : cases de hauteur fixe, chiffres sur une même ligne de base */
.tn-odo {
  position: absolute; left: 50%; bottom: -2.6rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem; width: max-content; max-width: 94%;
  border-radius: 1rem; background: var(--tn-ink); color: #fff; padding: 0.75rem 1rem 0.8rem;
  border: 3px solid var(--tn-paper); box-shadow: 0 16px 34px -14px rgb(50 37 31 / 0.6);
}
.tn-odo-titre { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tn-soft); }
.tn-odo-titre svg { color: var(--tn-coral); }
.tn-odo-chiffres { display: flex; align-items: center; gap: 0.2rem; direction: ltr; font-family: var(--tn-titre); font-weight: 700; font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.odo-case {
  display: block; width: 1.05em; height: 1.4em; line-height: 1.4em; overflow: hidden; text-align: center;
  border-radius: 0.3rem; background: rgb(255 255 255 / 0.1); transition: background-color 0.25s ease, color 0.25s ease;
}
.odo-case:nth-last-child(2) { background: var(--tn-moss); }
.odo-case.vient-de-tourner { background: rgb(232 121 95 / 0.35); }
.odo-case:nth-last-child(2).vient-de-tourner { background: var(--tn-moss); }
.tn-odo-unite { margin-inline-start: 0.35rem; font-size: 0.9rem; color: var(--tn-soft); }
.tn-odo-geste { font-size: 0.86rem; font-weight: 700; color: #fff; border-top: 1px solid rgb(255 255 255 / 0.16); padding-top: 0.4rem; width: 100%; text-align: center; white-space: nowrap; }

.tn-carnet { min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; border: 1px solid var(--tn-line); border-radius: 1.25rem; background: #fff; padding: 1rem 0.75rem 0.6rem; box-shadow: var(--tn-ombre); }
.tn-carnet-titre { display: flex; align-items: center; gap: 0.45rem; padding-inline: 0.5rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tn-moss); }
.tn-jalons { position: relative; display: flex; flex-direction: column; }
/* rail vertical : se remplit à mesure que le compteur avance */
.tn-jalons::before, .tn-jalons::after { content: ''; position: absolute; left: 1.05rem; top: 1.4rem; bottom: 1.4rem; width: 2px; border-radius: 2px; background: var(--tn-line); }
.tn-jalons::after { background: var(--tn-coral); bottom: auto; height: calc((100% - 2.8rem) * var(--avance-n, 1)); transition: height 0.5s ease; }
.tn-jalon a { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.55rem 0.5rem; border-radius: 0.8rem; text-decoration: none; transition: background-color 0.3s ease; }
.tn-jalon-point { width: 0.75rem; height: 0.75rem; margin-inline: auto; border-radius: 50%; background: #fff; border: 2px solid var(--tn-line); transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease; }
.tn-jalon.est-passe .tn-jalon-point { border-color: var(--tn-coral); background: var(--tn-coral); }
.tn-jalon-corps { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.tn-jalon-km { font-family: var(--tn-titre); font-weight: 700; font-size: 0.78rem; color: var(--tn-muted); white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.tn-jalon-corps strong { font-size: 0.92rem; color: var(--tn-ink); }
.tn-jalon-corps > span:last-child { font-size: 0.8rem; color: var(--tn-muted); }
.tn-jalon svg { color: var(--tn-line); transition: color 0.3s ease, transform 0.3s ease; }
.tn-jalon.est-actif a { background: var(--tn-soft); }
.tn-jalon.est-actif .tn-jalon-point { transform: scale(1.35); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--tn-coral); }
.tn-jalon.est-actif .tn-jalon-km { color: var(--tn-moss); }
.tn-jalon.est-actif svg { color: var(--tn-moss); transform: translateX(2px); }
.tn-jalon a:hover .tn-jalon-corps strong { color: var(--tn-moss); }

/* ---------- RUBRIQUES ---------- */
.tn-tableau { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); gap: 1.25rem; }
.tn-rubrique { display: flex; flex-direction: column; }
.tn-rubrique-haut { display: flex; align-items: center; justify-content: space-between; }
.tn-rubrique h3 { margin-top: 1.1rem; font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.tn-rubrique h3 a:hover { color: var(--tn-moss); }
.tn-rubrique > .tn-muted { margin-top: 0.55rem; font-size: 0.95rem; line-height: 1.6; }
.tn-rubrique-dernier { margin-top: 1rem !important; padding-top: 0.9rem; border-top: 1px dashed var(--tn-line); font-size: 0.92rem; line-height: 1.5; }
.tn-rubrique-dernier span { color: var(--tn-muted); }
.tn-rubrique-dernier a { font-weight: 700; color: var(--tn-ink); }
.tn-rubrique-dernier a:hover { color: var(--tn-moss); }
.tn-rubrique .tn-lien { margin-top: auto; padding-top: 1.1rem; }
.tn-rubrique-outils { background: var(--tn-paper); border-style: dashed; }
.tn-outils-liste { display: grid; gap: 0.5rem; margin-top: 1rem !important; }
.tn-outils-liste a { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.75rem; border-radius: 0.75rem; background: #fff; border: 1px solid var(--tn-line); font-weight: 700; font-size: 0.95rem; }
.tn-outils-liste a svg { color: var(--tn-moss); }
.tn-outils-liste a:hover { border-color: var(--tn-moss); }

/* ---------- À LA UNE : relevés ---------- */
.tn-releve-liste { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; counter-reset: releve; }
.tn-releve { position: relative; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.tn-releve-photo { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tn-soft); }
.tn-releve-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.tn-releve:hover .tn-releve-photo img { transform: scale(1.04); }
.tn-releve-num { position: absolute; top: 0.75rem; left: 0.75rem; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #fff; color: var(--tn-moss); font-family: var(--tn-titre); font-weight: 700; font-size: 0.85rem; box-shadow: var(--tn-ombre); }
/* plaque de compteur : le chiffre clé du guide, chiffre par chiffre, à cheval sur la photo */
.tn-plaque { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; align-self: flex-start; margin: -2.4rem 0 0 1rem !important; border-radius: 0.85rem; background: var(--tn-ink); color: #fff; padding: 0.55rem 0.75rem 0.65rem; box-shadow: 0 12px 24px -12px rgb(50 37 31 / 0.6); max-width: calc(100% - 2rem); }
.tn-plaque-titre { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tn-soft); }
.tn-plaque-valeur { display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem; font-family: var(--tn-titre); font-weight: 700; font-size: 1.3rem; line-height: 1; font-variant-numeric: tabular-nums; direction: ltr; }
.tn-plaque-case { display: grid; place-items: center; width: 0.95em; height: 1.3em; border-radius: 0.25rem; background: rgb(255 255 255 / 0.1); }
.tn-plaque-case:last-of-type { background: var(--tn-moss); }
.tn-plaque-virgule { margin-inline: -0.05em; }
.tn-plaque-unite { margin-inline-start: 0.3rem; font-size: 0.9rem; color: var(--tn-soft); }
.tn-releve-corps { display: flex; flex-direction: column; gap: 0.55rem; padding: 0.9rem 1.15rem 1.2rem; flex: 1; }
.tn-releve-rub { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tn-moss) !important; text-decoration: none; }
.tn-releve h3 { font-size: 1.08rem; line-height: 1.3; }
.tn-releve h3 a:hover { color: var(--tn-moss); }
.tn-releve-pied { margin-top: auto !important; display: flex; flex-wrap: wrap; gap: 0.25rem 0.8rem; font-size: 0.82rem; color: var(--tn-muted); padding-top: 0.6rem; border-top: 1px dashed var(--tn-line); }
.tn-releve-pied > * + *::before { content: '·'; margin-inline-end: 0.8rem; color: var(--tn-line); }
.tn-suite { margin-top: 2.25rem !important; }
.tn-liens-duo { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem 2rem; }

/* ---------- ATELIER : jauges ---------- */
.tn-jauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.25rem; }
.tn-jauge-carte { display: flex; flex-direction: column; gap: 0.85rem; }
.tn-jauge-tete { display: flex; align-items: center; gap: 0.85rem; }
.tn-jauge-tete h3 { font-size: 1.25rem; font-weight: 700; }
.tn-jauge-mesure { font-size: 0.95rem; color: var(--tn-muted); }
.tn-jauge-mesure output { font-family: var(--tn-titre); font-weight: 700; font-size: 1.35rem; color: var(--tn-ink); }
.tn-reglette { position: relative; padding-top: 1.35rem; }
.tn-reglette-piste { position: absolute; inset-inline: 0; top: 1.35rem; height: 0.75rem; border-radius: 999px; background: var(--tn-soft); pointer-events: none; }
.tn-reglette-plein { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p); border-radius: inherit; background: var(--tn-moss); opacity: 0.85; }
.tn-reglette-seuil { position: absolute; top: -0.35rem; bottom: -0.35rem; inset-inline-start: var(--s); width: 2px; background: var(--tn-coral); z-index: 1; }
.tn-reglette-seuil span { position: absolute; bottom: calc(100% + 0.1rem); left: 50%; transform: translateX(-50%); font-size: 0.75rem; font-weight: 700; color: var(--tn-coral); white-space: nowrap; }
.tn-reglette input[type='range'] { position: relative; z-index: 2; display: block; width: 100%; height: 0.75rem; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.tn-reglette input[type='range']::-webkit-slider-runnable-track { height: 0.75rem; background: transparent; }
.tn-reglette input[type='range']::-moz-range-track { height: 0.75rem; background: transparent; }
.tn-reglette input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 1.35rem; height: 1.35rem; margin-top: -0.3rem; border-radius: 50%; background: #fff; border: 3px solid var(--tn-moss); box-shadow: 0 2px 6px rgb(50 37 31 / 0.25); }
.tn-reglette input[type='range']::-moz-range-thumb { width: 1rem; height: 1rem; border-radius: 50%; background: #fff; border: 3px solid var(--tn-moss); }
.tn-verdict { display: inline-flex; align-items: center; gap: 0.45rem; align-self: flex-start; margin-top: 0.35rem !important; border-radius: 999px; padding: 0.35rem 0.85rem; font-weight: 700; font-size: 0.92rem; background: var(--tn-soft); color: var(--tn-moss-dark); transition: background-color 0.3s ease, color 0.3s ease; }
[data-niveau='1'] .tn-verdict { background: var(--tn-band); color: var(--tn-ink); box-shadow: inset 0 0 0 1px var(--tn-coral); }
[data-niveau='2'] .tn-verdict { background: var(--tn-moss); color: #fff; }
.tn-jauge-carte .tn-lien { margin-top: auto; font-size: 0.95rem; }

/* ---------- BUDGET ---------- */
.tn-budget-grille { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.tn-budget-legende { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.25rem; }
.tn-bascule { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.6rem; border: 1px solid var(--tn-line); border-radius: 999px; background: var(--tn-paper); padding: 0.4rem 1rem; font: inherit; font-size: 0.92rem; font-weight: 700; color: var(--tn-ink); cursor: pointer; transition: border-color 0.2s ease, background-color 0.2s ease; }
.tn-bascule[aria-pressed='true'] { border-color: var(--tn-moss); background: var(--tn-soft); }
.tn-pastille-occ, .tn-pastille-neuve { width: 0.75rem; height: 0.75rem; border-radius: 0.2rem; }
.tn-pastille-occ { background: var(--tn-moss); }
.tn-pastille-neuve { background: var(--tn-coral); }
.tn-postes { margin: 0; display: grid; gap: 0.2rem; }
.tn-poste { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); gap: 1rem; align-items: center; padding-block: 0.7rem; border-top: 1px solid var(--tn-line); }
.tn-poste:first-child { border-top: 0; }
.tn-poste dt { font-size: 0.95rem; font-weight: 600; color: var(--tn-ink); }
.tn-poste dd { margin: 0; display: grid; gap: 0.3rem; }
.tn-barre { position: relative; display: flex; align-items: center; height: 1.35rem; }
.tn-barre::before { content: ''; display: block; height: 100%; width: max(var(--p), 0.35rem); max-width: calc(100% - 6.5rem); border-radius: 0.35rem; background: var(--tn-moss); transition: opacity 0.3s ease; }
.tn-barre-neuve::before { background: var(--tn-coral); }
.tn-barre span { margin-inline-start: 0.6rem; font-size: 0.85rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; transition: opacity 0.3s ease; }
.tn-postes[data-met='occasion'] .tn-barre-neuve::before, .tn-postes[data-met='occasion'] .tn-barre-neuve span,
.tn-postes[data-met='neuve'] .tn-barre-occ::before, .tn-postes[data-met='neuve'] .tn-barre-occ span { opacity: 0.35; }
.tn-budget-total { display: grid; gap: 1rem; }
.tn-total { padding-block: 1.1rem; }
.tn-total-titre { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tn-muted); }
.tn-total-valeur { font-family: var(--tn-titre); font-weight: 700; font-size: clamp(2rem, 3vw, 2.5rem); line-height: 1.15; color: var(--tn-moss); font-variant-numeric: tabular-nums; }
.tn-total-neuve .tn-total-valeur { color: var(--tn-ink); }
.tn-total-occ { border-inline-start: 4px solid var(--tn-moss); }
.tn-total-neuve { border-inline-start: 4px solid var(--tn-coral); }
.tn-ecart { font-size: 0.98rem; color: var(--tn-muted); }
.tn-ecart strong { color: var(--tn-ink); font-family: var(--tn-titre); }
.tn-budget-liens { display: grid; gap: 0.6rem; }
.tn-budget-liens .tn-lien { font-size: 0.95rem; }

/* ---------- OUTIL ---------- */
.tn-calcul-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(1.25rem, 2.5vw, 2rem); align-items: start; }
.tn-champs { display: grid; gap: 0.7rem; }
.tn-champs label { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; align-items: center; gap: 0.75rem; font-size: 0.92rem; font-weight: 600; color: var(--tn-ink); }
.tn-champs input { width: 100%; min-height: 2.6rem; border: 1px solid var(--tn-line); border-radius: 0.75rem; background: var(--tn-paper); padding: 0.4rem 0.7rem; font: inherit; font-weight: 700; color: var(--tn-ink); text-align: end; }
.tn-champs input:focus { border-color: var(--tn-moss); outline: none; box-shadow: 0 0 0 3px var(--tn-soft); }
.tn-resultats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.tn-resultats div { border-radius: 0.85rem; background: var(--tn-soft); padding: 0.9rem 1rem; }
.tn-resultats dt { font-size: 0.82rem; font-weight: 700; color: var(--tn-muted); }
.tn-resultats dd { margin: 0.2rem 0 0; font-family: var(--tn-titre); font-weight: 700; font-size: 1.15rem; color: var(--tn-ink); }
.tn-resultats output { font-size: 1.85rem; color: var(--tn-moss); font-variant-numeric: tabular-nums; }
.tn-outil-photo { margin: 0; border-radius: 1rem; overflow: hidden; aspect-ratio: 4 / 3; max-height: 20rem; background: var(--tn-soft); }
.tn-outil-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tn-route { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; margin-block: 2rem 1.25rem; padding: 1.25rem 1rem; border-radius: 0.85rem; background: var(--tn-paper); border: 1px solid var(--tn-line); }
.tn-route-ligne { position: absolute; inset-inline: 6.5rem; top: 50%; height: 0.35rem; margin-top: -0.175rem; border-radius: 999px; background: var(--tn-line); overflow: hidden; }
.tn-route-trace { display: block; height: 100%; width: 100%; background: repeating-linear-gradient(90deg, var(--tn-moss) 0 1.1rem, transparent 1.1rem 1.6rem); transform-origin: left center; }
.tn-route-borne { position: relative; z-index: 1; font-size: 0.8rem; font-weight: 700; color: var(--tn-ink); line-height: 1.3; }
.tn-route-borne span { color: var(--tn-muted); font-weight: 600; }
.tn-route-arrivee { text-align: end; }
.tn-route-pleins { position: relative; height: 3.6rem; }
.tn-route-pleins li { position: absolute; top: 50%; left: var(--x); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.tn-route-pleins li svg { box-sizing: content-box; padding: 0.4rem; border-radius: 50%; background: var(--tn-moss); color: #fff; box-shadow: 0 0 0 4px var(--tn-paper); }
.tn-route-pleins li span { position: absolute; top: calc(100% + 0.15rem); font-size: 0.75rem; font-weight: 700; color: var(--tn-moss-dark); white-space: nowrap; }
.tn-route-pleins.tn-serre li span { display: none; }
.tn-calcul > .tn-petit { max-width: 52rem; margin-inline: auto; }

/* ---------- RÉDACTION : plaques à initiales ---------- */
.tn-signataires { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.tn-signataire { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.35rem; align-items: start; }
.tn-mono {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
  aspect-ratio: 4 / 5; border-radius: 0.85rem; background: var(--tn-moss-dark); color: var(--tn-paper); text-decoration: none; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}
.tn-mono::before { content: ''; position: absolute; inset: 0.45rem; border: 1px solid rgb(249 247 245 / 0.22); border-radius: 0.6rem; pointer-events: none; }
.tn-mono-ico { position: absolute; top: 0.85rem; inset-inline-start: 0.85rem; color: var(--tn-coral); }
.tn-mono-lettres { font-family: var(--tn-titre); font-weight: 700; font-size: 3.1rem; line-height: 1; letter-spacing: -0.03em; }
.tn-mono-plaque {
  display: inline-flex; align-items: stretch; overflow: hidden; border-radius: 0.3rem; background: #fff; color: var(--tn-ink);
  border: 2px solid var(--tn-ink); font-family: var(--tn-titre); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.06em; line-height: 1;
  padding-inline-end: 0.4rem; gap: 0.35rem; white-space: nowrap; direction: ltr;
}
.tn-mono-plaque > * { display: grid; place-items: center; }
.tn-mono-plaque { align-items: center; }
.tn-mono-f { align-self: stretch; background: var(--tn-moss); color: #fff; padding: 0.3rem 0.28rem; font-size: 0.62rem; }
.tn-signataire:hover .tn-mono-lettres { color: #fff; }
.tn-signataire-corps { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.tn-signataire h3 { font-size: 1.25rem; font-weight: 700; }
.tn-signataire h3 a:hover { color: var(--tn-moss); }
.tn-signataire-role { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--tn-moss); }
.tn-signataire-fiche { margin: 0.65rem 0 0; display: grid; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px dashed var(--tn-line); }
.tn-signataire-fiche > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; align-items: center; }
.tn-signataire-fiche dt { font-size: 0.78rem; font-weight: 700; color: var(--tn-muted); }
.tn-signataire-fiche dd { margin: 0; font-size: 0.88rem; line-height: 1.4; min-width: 0; }
.tn-signataire-fiche dd a { font-weight: 700; }
.tn-signataire-fiche dd a:hover { color: var(--tn-moss); }
.tn-signataire-fiche .tn-jauge { margin: 0; }
.tn-jauge-auteur .tn-jauge-barre { height: 0.6rem; background: var(--tn-soft); box-shadow: inset 0 0 0 1px var(--tn-line); }
.tn-signataire-rubs { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tn-signataire-rubs span { border-radius: 999px; background: var(--tn-soft); color: var(--tn-moss-dark); padding: 0.15rem 0.6rem; font-size: 0.76rem; font-weight: 700; }

/* bandeau d'annonce affiné sur la home : fin, clair, accordé au menu */
html:has(.tn-home) .bandeau-haut { background: var(--tn-band, #f3ede9); color: var(--color-ink, #32251f); border-bottom: 1px solid var(--color-line, #ddd4d0); font-size: 0.8125rem; }
html:has(.tn-home) .bandeau-haut > .container { min-height: 2.1rem; padding-block: 0.1rem; justify-content: center; position: relative; }
html:has(.tn-home) .bandeau-haut svg { color: var(--color-moss, #925b45); }
html:has(.tn-home) .bandeau-haut [data-mois-texte] { font-size: 0.8125rem; font-weight: 600; }
html:has(.tn-home) .bandeau-haut [data-fermer] { position: absolute; inset-inline-end: 0.5rem; top: 50%; transform: translateY(-50%); width: 1.9rem; height: 1.9rem; color: var(--color-muted, #725a4f); }
html:has(.tn-home) .bandeau-haut [data-fermer]:hover { background: var(--color-soft, #efe7e2); }

/* ---------- FAQ ---------- */
.tn-faq-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem 1.25rem; align-items: start; }
.tn-question { padding: 0; }
.tn-question summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.35rem; cursor: pointer; list-style: none; font-family: var(--tn-titre); font-weight: 700; font-size: 1.05rem; color: var(--tn-ink); }
.tn-question summary::-webkit-details-marker { display: none; }
.tn-question summary svg { color: var(--tn-moss); transition: transform 0.3s ease; }
.tn-question[open] summary svg { transform: rotate(45deg); }
.tn-question p { padding: 0 1.35rem 1.2rem; color: var(--tn-muted); line-height: 1.7; }
.tn-question .tn-lien { font-size: 0.95rem; }

/* ---------- CONTACT : fiche à cocher ---------- */
.tn-fiche-contact { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; padding: clamp(1.25rem, 2.5vw, 2rem); }
.tn-fiche-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.tn-fiche-points label { display: flex; align-items: center; gap: 0.75rem; min-height: 3.4rem; border-radius: 0.85rem; border: 1px solid var(--tn-line); background: var(--tn-paper); padding: 0.6rem 0.9rem; font-weight: 600; font-size: 0.95rem; line-height: 1.4; cursor: pointer; transition: border-color 0.25s ease, background-color 0.25s ease; }
.tn-fiche-points input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tn-case { flex: 0 0 auto; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 0.4rem; border: 2px solid var(--tn-line); background: #fff; color: transparent; transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease; }
.tn-fiche-points input:checked + .tn-case { background: var(--tn-moss); border-color: var(--tn-moss); color: #fff; }
.tn-fiche-points input:focus-visible + .tn-case { outline: 3px solid var(--tn-coral); outline-offset: 2px; }
.tn-fiche-points label:has(input:checked) { border-color: rgb(146 91 69 / 0.45); background: #fff; }
.tn-contact-num { flex: 0 0 auto; font-family: var(--tn-titre); font-weight: 700; color: var(--tn-coral); }
.tn-fiche-bilan { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; border-radius: 1rem; background: var(--tn-band); padding: 1.5rem; }
.tn-fiche-compte { font-family: var(--tn-titre); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--tn-ink); }
.tn-fiche-compte output { color: var(--tn-moss); }
.tn-fiche-compte span { display: block; margin-top: 0.4rem; font-family: var(--tn-texte); font-size: 0.9rem; font-weight: 600; color: var(--tn-muted); }
.tn-fiche-bilan .tn-jauge-barre { display: block; width: 100%; flex: none; }
.tn-fiche-plein { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--tn-moss); transition: width 0.4s ease; }

/* le bloc « Dans les coulisses » posé avant le pied redit la rédaction : la home le remplace (liens repris plus haut) */
html:has(.tn-home) .uf-block[data-avant-footer] { display: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .tn-hero-grille { grid-template-columns: minmax(0, 1fr); }
  .tn-hero-texte { max-width: 44rem; }
  .tn-scene { max-width: 52rem; }
  .tn-scene-photo { max-width: 26rem; }
  .tn-releve-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-calcul-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tn-outil-photo { grid-column: 1 / -1; aspect-ratio: 16 / 9; max-height: 22rem; }
}
@media (max-width: 960px) {
  .tn-budget-grille, .tn-signataires, .tn-faq-liste, .tn-fiche-contact { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  [data-bandeau], .announcement-bar { display: none !important; }
  .tn-hero { min-height: 0; padding-block: 1.25rem 2.5rem; }
  .tn-h1 { margin-top: 0.9rem !important; font-size: clamp(2.1rem, 9.4vw, 2.6rem); }
  .tn-kicker { font-size: 0.7rem; padding: 0.35rem 0.8rem; }
  .tn-chapo { margin-top: 0.9rem !important; font-size: 1.02rem; line-height: 1.55; }
  .tn-chapo-suite { display: none; }
  .tn-hero-boutons { margin-top: 1.25rem; gap: 0.65rem; }
  .tn-hero-boutons > a { flex: 1 1 100%; }
  .tn-hero-reperes { margin-top: 1.4rem; padding-top: 1rem; gap: 0 1.25rem; }
  .tn-hero-reperes dd { font-size: 1.7rem; }
  .tn-hero-reperes dt { font-size: 0.8rem; }
  .tn-hero-reperes dt svg { display: none; }
  .tn-scene { grid-template-columns: minmax(0, 1fr); }
  .tn-releve-liste, .tn-fiche-points { grid-template-columns: minmax(0, 1fr); }
  .tn-signataire { grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; }
  .tn-mono-lettres { font-size: 2.2rem; }
  .tn-mono-plaque { font-size: 0.6rem; }
  .tn-mono-ico { top: 0.6rem; inset-inline-start: 0.6rem; }
  .tn-scene-photo { justify-self: center; max-width: 100%; }
  .tn-odo-chiffres { font-size: 1.45rem; }
  .tn-signataire-fiche > div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .tn-poste { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .tn-calcul-grille { grid-template-columns: minmax(0, 1fr); }
  .tn-champs label { grid-template-columns: minmax(0, 1fr) 6rem; }
  .tn-route { grid-template-columns: minmax(0, 1fr); padding: 1rem; }
  .tn-route-ligne { inset-inline: 1rem; top: auto; bottom: 3.1rem; }
  .tn-route-borne { display: none; }
  .tn-route-pleins { height: 3.8rem; }
}

/* sans animation : rendu statique complet */
@media (prefers-reduced-motion: reduce) {
  .tn-home *, .tn-home *::before, .tn-home *::after { transition: none !important; animation: none !important; }
}

/* liens longs : la flèche suit le dernier mot au lieu de partir seule à la ligne */
.tn-budget-liens .tn-lien, .tn-question .tn-lien, .tn-calcul .tn-lien { display: inline; }
.tn-budget-liens .tn-lien svg, .tn-question .tn-lien svg, .tn-calcul .tn-lien svg { margin-inline-start: 0.3rem; vertical-align: -0.15em; }
