@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/bricolage-grotesque-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/instrument-sans-latin.woff2') format('woff2');
}

:root {
  --fond: #F3F5F4;
  --surface: #FFFFFF;
  --encre: #0E1A2B;
  --texte-2: #4B5563;
  --texte-3: #6B7280;
  --primaire: #0B6E5B;
  --primaire-fonce: #08574A;
  --primaire-clair: #E2F0EB;
  --ambre: #8A5A00;
  --ambre-clair: #FDF3DC;
  --rouge: #B3382A;
  --rouge-clair: #FBE9E6;
  --menthe: #7FD6B6;
  --bord: rgba(14, 26, 43, 0.08);
  --bord-fort: rgba(14, 26, 43, 0.16);
  --piste: #EEF1F4;
  --gris-barre: #CBD2D9;
  --rayon: 16px;
  --rayon-grand: 24px;
  --ombre: 0 1px 2px rgba(14, 26, 43, 0.05), 0 18px 40px rgba(14, 26, 43, 0.12);
  --titre: 'Bricolage Grotesque', system-ui, sans-serif;
  --texte: 'Instrument Sans', system-ui, sans-serif;
  --largeur: 1200px;
  --gouttiere: 16px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body[data-vue="question"] { background: var(--surface); }

h1, h2, h3 { font-family: var(--titre); letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
h1 { font-size: clamp(32px, 6vw, 60px); font-weight: 700; }
h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primaire); outline-offset: 2px; border-radius: 6px; }
h1:focus { outline: none; }

.visuellement-cache {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.evitement {
  position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--encre); color: #fff; padding: 10px 14px; border-radius: 10px;
}
.evitement:focus { left: 8px; }

.intro { font-size: 17px; color: var(--texte-2); line-height: 1.55; }
.aide { font-size: 14px; color: var(--texte-2); line-height: 1.5; }
.petit { font-size: 13.5px; color: var(--texte-2); }
.discret { color: var(--texte-3); }
.erreur { color: var(--rouge); font-weight: 600; font-size: 14.5px; }
.surtitre { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primaire); }
.chargement { padding: 80px var(--gouttiere); text-align: center; color: var(--texte-2); }

/* ---------- En-tête et pied ---------- */

#entete { background: var(--surface); border-bottom: 1px solid var(--bord); }
.entete-interne, .pied-interne {
  max-width: var(--largeur); margin: 0 auto; padding: 14px var(--gouttiere);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--titre); font-weight: 700; font-size: 20px; }
.logo-marque { width: 34px; height: 34px; border-radius: 10px; background: var(--encre); color: #fff; display: grid; place-items: center; }
.entete-actions { display: flex; align-items: center; gap: 6px; }
.lien-nav {
  background: none; border: none; cursor: pointer; text-decoration: none; color: var(--texte-2); font-weight: 600; font-size: 15px;
  padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center;
}
.lien-nav:hover { color: var(--encre); background: var(--fond); }
@media (max-width: 560px) {
  .entete-actions a.lien-nav { display: none; }
}

#app { flex: 1; width: 100%; }
#pied { border-top: 1px solid var(--bord); background: var(--surface); }
.pied-interne { font-size: 13.5px; color: var(--texte-3); flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.pied-interne a { color: var(--texte-2); }
body[data-vue="question"] #pied { display: none; }

/* ---------- Boutons ---------- */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
}
.bouton.principal { background: var(--primaire); color: #fff; }
.bouton.principal:hover { background: var(--primaire-fonce); }
.bouton.secondaire { background: var(--surface); border-color: var(--bord-fort); }
.bouton.secondaire:hover { border-color: var(--encre); }
.bouton.danger { background: var(--rouge); color: #fff; }
.bouton.grand { min-height: 58px; padding: 16px 28px; font-size: 17px; border-radius: 14px; }
.bouton.petit { min-height: 44px; padding: 10px 16px; font-size: 15px; }
.bouton.large { width: 100%; min-height: 56px; border-radius: 16px; font-size: 17px; }
.lien, .lien-fort {
  background: none; border: none; padding: 8px 0; cursor: pointer; font-weight: 600; color: var(--primaire);
  text-decoration: underline; text-underline-offset: 3px; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center;
}
.lien-fort { text-decoration: none; }
.lien-fort::after { content: ' →'; white-space: pre; }
.bouton-icone {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--bord-fort); background: var(--surface);
  display: grid; place-items: center; color: var(--encre); text-decoration: none;
}
.bouton-icone.discret { border-color: transparent; color: var(--texte-2); }

/* ---------- Puces et choix ---------- */

.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--bord-fort); background: var(--surface); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
}
.puce:hover { border-color: var(--encre); }
.puce[aria-pressed="true"] { border: 2px solid var(--primaire); background: var(--primaire-clair); padding: 7px 15px; color: var(--primaire-fonce); }
.puce svg { width: 16px; height: 16px; }
.puce.desactivee { cursor: default; color: var(--texte-3); background: var(--fond); border-color: transparent; font-weight: 500; min-height: 36px; padding: 6px 12px; font-size: 14px; }
.bientot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 14px; color: var(--texte-3); }
.bientot > span:first-child { margin-right: 4px; font-weight: 600; }

.cartes-choix { display: flex; flex-direction: column; gap: 10px; }
.carte-choix {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; text-align: left;
  padding: 15px 18px; border-radius: var(--rayon); border: 1px solid var(--bord-fort); background: var(--surface); cursor: pointer;
}
.carte-choix:hover { border-color: var(--encre); }
.carte-choix[aria-pressed="true"] { border: 2px solid var(--primaire); background: var(--primaire-clair); padding: 14px 17px; }
.carte-choix-texte { display: flex; flex-direction: column; gap: 2px; }
.carte-choix-texte strong { font-size: 17px; }
.carte-choix-texte small { font-size: 14px; color: var(--texte-2); }
.radio { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bord-fort); }
.carte-choix[aria-pressed="true"] .radio { border: 7px solid var(--primaire); }
.carte-choix.passer { background: var(--fond); border-color: transparent; }
.carte-choix.passer:hover { border-color: var(--bord-fort); }

/* ---------- Champs ---------- */

.label-champ { display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.saisie {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--bord-fort); border-radius: 14px; background: var(--surface);
  padding: 0 14px; min-height: 52px;
}
.saisie:focus-within { border-color: var(--primaire); box-shadow: 0 0 0 4px var(--primaire-clair); }
.saisie input { flex: 1; width: 0; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 17px; padding: 12px 0; color: var(--encre); }
.saisie svg { color: var(--texte-3); flex-shrink: 0; }
.saisie .unite { color: var(--texte-2); font-weight: 600; font-size: 15px; white-space: nowrap; }
input::placeholder { color: var(--texte-3); opacity: 1; }
.en-erreur .saisie, .grand-nombre.en-erreur { border-color: var(--rouge); }

.grand-nombre {
  display: flex; align-items: center; gap: 10px; border: 2px solid var(--bord-fort); border-radius: 18px; padding: 8px 18px; background: var(--surface);
}
.grand-nombre:focus-within { border-color: var(--primaire); box-shadow: 0 0 0 4px var(--primaire-clair); }
.grand-nombre input {
  flex: 1; width: 0; min-width: 0; border: none; outline: none; background: transparent; font-family: var(--titre); font-weight: 700;
  font-size: clamp(32px, 9vw, 44px); color: var(--encre); padding: 4px 0;
}
.grand-nombre .unite { font-weight: 600; font-size: 16px; color: var(--texte-2); white-space: nowrap; }

.petit-nombre label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.grille-nombres { display: grid; gap: 14px; }

select.liste {
  width: 100%; min-height: 52px; padding: 12px 40px 12px 14px; border: 1px solid var(--bord-fort); border-radius: 14px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  font: inherit; font-size: 17px; color: var(--encre); appearance: none; cursor: pointer;
}
select.liste:focus { outline: none; border-color: var(--primaire); box-shadow: 0 0 0 4px var(--primaire-clair); }

.champ-ville { position: relative; }
.suggestions {
  list-style: none; margin: 6px 0 0; padding: 6px; border: 1px solid var(--bord-fort); border-radius: 14px; background: var(--surface); box-shadow: var(--ombre);
}
.suggestions li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 12px; border-radius: 10px; cursor: pointer; min-height: 44px; }
.suggestions li:hover, .suggestions li[aria-selected="true"] { background: var(--primaire-clair); }
.suggestions small { color: var(--texte-3); }
.lieu-choisi {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--primaire-clair); color: var(--primaire-fonce);
}
.lieu-choisi strong { font-size: 17px; color: var(--encre); }
.lieu-choisi small { color: var(--texte-2); }

/* ---------- Écran de question ---------- */

.ecran-question { max-width: 640px; margin: 0 auto; min-height: calc(100vh - 64px); display: flex; flex-direction: column; }
.barre-question { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px var(--gouttiere) 10px; }
.compteur { font-size: 14px; font-weight: 600; color: var(--texte-2); text-align: center; }
.progression { margin: 0 var(--gouttiere); height: 6px; border-radius: 999px; background: var(--piste); overflow: hidden; }
.progression span { display: block; height: 100%; border-radius: 999px; background: var(--primaire); transition: width 0.25s ease; }
.corps-question { flex: 1; padding: 28px 20px 24px; display: flex; flex-direction: column; gap: 20px; }
.corps-question h1 { font-size: clamp(28px, 7vw, 36px); }
.corps-question .intro { font-size: 16px; margin-top: -8px; }
.sous-question { display: flex; flex-direction: column; gap: 10px; }
.jauge-completude { padding: 14px 16px; border-radius: 16px; background: var(--fond); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.jauge-completude > div:first-child { display: flex; justify-content: space-between; color: var(--texte-2); }
.jauge-completude strong { color: var(--encre); }
.jauge { height: 6px; border-radius: 999px; background: #DDE3E8; overflow: hidden; }
.jauge span { display: block; height: 100%; background: var(--primaire); border-radius: 999px; }
.barre-bas {
  position: sticky; bottom: 0; padding: 14px var(--gouttiere) 20px; border-top: 1px solid var(--bord); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}

/* ---------- Accueil ---------- */

.accueil { display: flex; flex-direction: column; }
.heros {
  max-width: var(--largeur); margin: 0 auto; width: 100%; padding: 40px var(--gouttiere) 32px;
  display: grid; gap: 40px; align-items: center;
}
.heros-texte { display: flex; flex-direction: column; gap: 22px; }
.etiquette { align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--primaire); background: var(--primaire-clair); padding: 8px 14px; border-radius: 999px; }
.heros .intro { font-size: 19px; max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.garanties { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14.5px; font-weight: 500; color: var(--texte-2); }
.garanties li { display: flex; align-items: center; gap: 8px; }
.garanties svg { color: var(--primaire); }
.heros-visuel { position: relative; }
.photo-heros { margin: 0; position: relative; border-radius: 28px; overflow: hidden; }
.photo-heros img { width: 100%; height: 320px; object-fit: cover; }
figcaption {
  position: absolute; right: 10px; bottom: 10px; font-size: 11px; color: #fff; background: rgba(14, 26, 43, 0.6); padding: 3px 8px; border-radius: 6px;
}
.carte-exemple {
  position: relative; margin: -60px 12px 0; background: var(--surface); border-radius: 22px; padding: 20px; box-shadow: var(--ombre);
  display: flex; flex-direction: column; gap: 12px;
}
.trajet { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 600; }
.trajet svg { width: 16px; height: 16px; color: var(--texte-3); }
.trajet.clair { color: rgba(255, 255, 255, 0.85); }
.trajet.clair svg { color: rgba(255, 255, 255, 0.7); }
.code-pays { font-size: 12px; font-weight: 700; background: var(--piste); color: var(--encre); padding: 3px 7px; border-radius: 6px; }
.trajet.clair .code-pays { background: rgba(255, 255, 255, 0.14); color: #fff; }
.montant-exemple { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.montant-exemple strong { font-family: var(--titre); font-size: 40px; letter-spacing: -0.02em; }
.montant-exemple > span:not(.pastille-ecart) { color: var(--texte-3); }
.mini-barres { display: flex; flex-direction: column; gap: 8px; }
.mini-barre { display: grid; grid-template-columns: 84px minmax(0, 1fr) 64px; align-items: center; gap: 10px; font-size: 13px; }
.mini-barre > span:first-child { color: var(--texte-2); }
.piste { height: 8px; border-radius: 999px; background: var(--piste); overflow: hidden; }
.piste span { display: block; height: 100%; border-radius: 999px; background: var(--primaire); }
.piste span.hausse { background: var(--rouge); }
.mini-barre strong { text-align: right; }
.mini-barre strong.hausse { color: var(--rouge); }

.bandeau-sources {
  max-width: var(--largeur); margin: 0 auto; width: 100%; padding: 8px var(--gouttiere) 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: var(--texte-3); font-weight: 600;
}
.bandeau-sources > span:first-child { font-weight: 500; margin-right: 4px; }
.etiquette-source { padding: 7px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--bord); }

.section { max-width: var(--largeur); margin: 0 auto; width: 100%; padding: 48px var(--gouttiere); display: flex; flex-direction: column; gap: 26px; }
.section.blanche { max-width: none; background: var(--surface); }
.section.blanche > * { max-width: calc(var(--largeur) - 2 * var(--gouttiere)); width: 100%; margin-left: auto; margin-right: auto; }
.entete-section { display: flex; flex-direction: column; gap: 10px; }
.entete-section .intro { max-width: 680px; }
.deux-sens { display: grid; gap: 12px; }
.sens { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 16px 18px; border-radius: var(--rayon); background: var(--primaire-clair); font-weight: 600; }
.sens svg { width: 16px; height: 16px; color: var(--primaire); }
.sens p { flex-basis: 100%; }
.pays-verifies { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pays-verifie { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--primaire-clair); font-weight: 600; }
.pays-verifies p { flex-basis: 100%; color: var(--texte-2); }
.grille-destinations { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.carte-destination { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; border: 1px solid var(--bord); background: var(--surface); text-decoration: none; }
.carte-destination:hover { box-shadow: var(--ombre); }
.carte-destination figure { margin: 0; position: relative; }
.carte-destination img { width: 100%; height: 170px; object-fit: cover; }
.badge-verifie {
  position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: #fff;
  background: var(--primaire); padding: 5px 10px; border-radius: 999px;
}
.badge-verifie svg { width: 14px; height: 14px; }
.carte-destination-texte { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; }
.carte-destination-texte strong { font-family: var(--titre); font-size: 21px; }
.carte-destination-texte span { color: var(--texte-3); font-size: 14px; }
.bientot.large { margin-top: 0; }

.grille-atouts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.atout { background: var(--surface); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--bord); }
.atout p { color: var(--texte-2); font-size: 15px; }
.pastille-icone { width: 44px; height: 44px; border-radius: 12px; background: var(--primaire-clair); color: var(--primaire); display: grid; place-items: center; flex-shrink: 0; }
.bandeau-cta {
  border-radius: 28px; background: var(--encre); color: #fff; padding: 36px 28px; display: flex; flex-direction: column; gap: 20px;
}
.bandeau-cta p { color: rgba(255, 255, 255, 0.78); margin-top: 10px; }

/* ---------- Résultat ---------- */

.resultat { max-width: 1040px; margin: 0 auto; padding: 24px var(--gouttiere) 56px; display: flex; flex-direction: column; gap: 22px; }
.heros-resultat { border-radius: 26px; overflow: hidden; background: var(--encre); color: #fff; display: grid; }
.heros-resultat-texte { padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.heros-resultat-texte > p { color: rgba(255, 255, 255, 0.75); font-size: 15px; }
.montants-heros { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.montants-heros s { font-family: var(--titre); font-size: 26px; font-weight: 600; color: rgba(255, 255, 255, 0.6); }
.montants-heros strong { font-family: var(--titre); font-size: clamp(40px, 9vw, 58px); letter-spacing: -0.03em; line-height: 1; }
.montants-heros span { color: rgba(255, 255, 255, 0.75); }
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; }
.pastille-completude { font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, 0.12); padding: 6px 12px; border-radius: 999px; }
.puce.claire { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.puce.claire[aria-pressed="true"] { background: #fff; color: var(--encre); border: 1px solid #fff; padding: 8px 16px; }
.heros-resultat-photo { margin: 0; position: relative; min-height: 200px; }
.heros-resultat-photo img { width: 100%; height: 100%; min-height: 200px; max-height: 260px; object-fit: cover; }

.pastille-ecart { display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pastille-ecart.baisse { color: var(--primaire-fonce); background: var(--primaire-clair); }
.pastille-ecart.hausse { color: var(--rouge); background: var(--rouge-clair); }
.pastille-ecart.neutre { color: var(--texte-2); background: var(--piste); }
.pastille-ecart.forte.baisse { color: var(--encre); background: var(--menthe); font-size: 14px; padding: 6px 12px; }
.pastille-ecart.forte.hausse { color: #fff; background: var(--rouge); font-size: 14px; padding: 6px 12px; }

.scenarios { display: grid; gap: 16px; }
.scenario { background: var(--surface); border-radius: var(--rayon-grand); padding: 24px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--bord); }
.scenario.principal { background: var(--primaire-clair); border-color: transparent; }
.tag { font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-3); }
.scenario.principal .tag { color: var(--primaire); }
.scenario h2 { font-size: 23px; }
.libelle { font-size: 15px; color: var(--texte-2); }
.gros-chiffre { font-family: var(--titre); font-size: clamp(36px, 8vw, 46px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.gros-chiffre small { font-size: 17px; font-weight: 600; color: var(--texte-2); letter-spacing: 0; }
.gros-chiffre.negatif { color: var(--rouge); }
.encart-fois { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border-radius: 14px; padding: 14px 16px; }
.encart-fois strong { font-size: 17px; color: var(--ambre); }
.encart-fois span { font-size: 13.5px; color: var(--texte-2); }
.comparaison { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; font-size: 14.5px; color: var(--texte-2); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; }
.note svg { flex-shrink: 0; margin-top: 2px; }
.note.ok { background: var(--surface); color: var(--primaire-fonce); }
.scenario:not(.principal) .note.ok { background: var(--primaire-clair); }
.note.ko { background: var(--rouge-clair); color: var(--rouge); }
.note.neutre { background: var(--piste); color: var(--texte-2); }

.bloc { background: var(--surface); border-radius: var(--rayon-grand); padding: 24px; border: 1px solid var(--bord); display: flex; flex-direction: column; gap: 16px; }
.entete-bloc { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; }
.entete-bloc h2 { font-size: 25px; }
.legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13.5px; color: var(--texte-2); }
.legende span { display: flex; align-items: center; gap: 6px; }
.legende i { width: 12px; height: 12px; border-radius: 4px; background: var(--gris-barre); }
.legende i.labas { background: var(--primaire); }
.liste-postes { display: flex; flex-direction: column; gap: 14px; }
.ligne-poste { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'nom montants' 'barres barres'; gap: 6px 14px; align-items: center; }
.poste-nom { grid-area: nom; display: flex; flex-direction: column; }
.poste-nom strong { font-size: 15.5px; }
.poste-nom small { font-size: 12.5px; color: var(--texte-3); }
.poste-barres { grid-area: barres; display: flex; flex-direction: column; gap: 4px; }
.barre { display: block; height: 9px; border-radius: 999px; background: var(--gris-barre); }
.barre.labas { background: var(--primaire); }
.barre.labas.hausse { background: var(--rouge); }
.poste-montants { grid-area: montants; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px 10px; font-size: 15px; }
.poste-montants .ici { color: var(--texte-3); display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.poste-montants .ici small { font-size: 11px; }
.poste-montants strong.hausse { color: var(--rouge); }
.autres-postes summary { cursor: pointer; font-weight: 600; color: var(--primaire); padding: 10px 0; min-height: 44px; }
.autres-postes .liste-postes { margin-top: 8px; }
.ligne-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 14px; padding-top: 14px; border-top: 1px solid var(--bord); font-size: 16px; }
.ligne-total > span:first-child { margin-right: auto; font-weight: 700; }
.ligne-total .ici { color: var(--texte-3); text-decoration: line-through; }
.ligne-total strong { font-family: var(--titre); font-size: 22px; }

.total-depart { font-family: var(--titre); font-size: 28px; }
.tuiles-depart { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tuile { background: var(--fond); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.tuile > span { font-size: 13px; color: var(--texte-2); }
.tuile strong { font-size: 18px; }
.tuile small { font-size: 12px; color: var(--texte-3); }
.tuile small.ok { color: var(--primaire); font-weight: 600; }

.grille-constats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.constat { background: var(--surface); border-radius: 20px; padding: 20px; border: 1px solid var(--bord); display: flex; flex-direction: column; gap: 8px; }
.constat h3 { font-size: 17px; }
.constat p { font-size: 14.5px; color: var(--texte-2); }
.tonalite { font-size: 13px; font-weight: 700; color: var(--texte-3); }
.constat.baisse .tonalite { color: var(--primaire); }
.constat.hausse .tonalite { color: var(--rouge); }

.plan { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.entete-plan { display: flex; flex-direction: column; gap: 8px; }
.carte-plan { background: var(--surface); border-radius: var(--rayon-grand); padding: 22px; border: 1px solid var(--bord); display: flex; flex-direction: column; gap: 14px; }
.carte-plan.mise-en-avant { border: 2px solid var(--primaire); }
.carte-plan-tete { display: flex; align-items: flex-start; gap: 14px; }
.carte-plan-tete > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.categorie { font-size: 13px; font-weight: 700; color: var(--primaire); }
.carte-plan h3 { font-size: 20px; }
.etiquette-lien { flex-shrink: 0; font-size: 11.5px; font-weight: 700; color: var(--texte-3); border: 1px solid var(--bord-fort); padding: 4px 8px; border-radius: 6px; }
.carte-plan-liens { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.carte-plan-liens:empty { display: none; }
.puces-info { display: flex; flex-wrap: wrap; gap: 8px; }
.puce-info { font-size: 13.5px; font-weight: 600; background: var(--fond); padding: 7px 12px; border-radius: 999px; }
.puce-info.forte { background: var(--ambre-clair); color: var(--ambre); }
.blocs-logement { display: grid; gap: 14px; }
.bloc-logement { background: var(--fond); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.montant-plan { font-family: var(--titre); font-size: 24px; font-weight: 700; }
.montant-plan small { font-family: var(--texte); font-size: 14px; color: var(--texte-2); font-weight: 600; }
.grille-plan { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.carte-plan.petite { padding: 20px; gap: 8px; }
.carte-plan.petite h3 { font-size: 18px; }

.actions-resultat { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.confirmation { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; }
.note-bas { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--texte-2); padding-top: 8px; }
.note-bas h2 { font-size: 20px; color: var(--encre); }
.note-bas a { color: var(--primaire); font-weight: 600; }
.sources { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sources a { color: var(--texte-2); }

/* ---------- Pages de texte ---------- */

.page-texte { max-width: 760px; margin: 0 auto; padding: 40px var(--gouttiere) 64px; display: flex; flex-direction: column; gap: 22px; }
.page-texte h1 { font-size: clamp(32px, 6vw, 48px); }
.page-texte section { display: flex; flex-direction: column; gap: 10px; }
.page-texte h2 { font-size: 23px; margin-top: 10px; }
.page-texte p { color: var(--texte-2); }
.page-texte .sources a { color: var(--primaire); }

/* ---------- Écrans plus larges ---------- */

@media (min-width: 720px) {
  :root { --gouttiere: 32px; }
  .grille-nombres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille-nombres .aide { grid-column: 1 / -1; }
  .deux-sens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scenarios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scenarios .scenario:only-child { grid-column: 1 / -1; }
  .heros-resultat.avec-photo { grid-template-columns: minmax(0, 1fr) 300px; }
  .heros-resultat-photo img { max-height: none; }
  .heros-resultat-texte { padding: 34px 36px; }
  .ligne-poste { grid-template-columns: 200px minmax(0, 1fr) 190px; grid-template-areas: 'nom barres montants'; }
  .blocs-logement { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  .bandeau-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 48px 56px; }
  .corps-question { padding-top: 40px; }
  .barre-bas { position: static; border-top: none; padding-bottom: 40px; }
}

@media (min-width: 960px) {
  .heros { grid-template-columns: minmax(0, 1fr) 520px; padding-top: 64px; padding-bottom: 48px; }
  .photo-heros img { height: 500px; }
  .carte-exemple { position: absolute; left: -48px; bottom: -24px; width: 360px; margin: 0; }
}

@media print {
  #entete, #pied, .plan, .actions-resultat, .heros-resultat .puces, .autres-postes summary { display: none !important; }
  body { background: #fff; }
  .autres-postes > .liste-postes { display: flex; }
  .heros-resultat { color: var(--encre); background: #fff; border: 1px solid var(--bord-fort); }
  .trajet.clair, .heros-resultat-texte > p, .montants-heros span, .montants-heros s { color: var(--texte-2); }
  .heros-resultat-photo { display: none; }
  .bloc, .scenario, .constat { break-inside: avoid; }
}

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