:root {
  --encre: #12293D; --gris: #3F5568; --fond: #F5FAFE; --bleu: #1773B8; --rouge: #C8361F;
  --ciel-1: #62BFEF; --ciel-2: #A6DCF7; --pale: #E3F1FA; --jaune: #FFC83D;
  --ombre: 0 12px 32px rgba(18, 41, 61, .10);
  --titres: 'Space Grotesk', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 Inter, system-ui, sans-serif; color: var(--encre); background: var(--fond); }
a { color: var(--bleu); text-underline-offset: 3px; }
a:hover { color: var(--encre); }
h1, h2, h3 { font-family: var(--titres); letter-spacing: -.02em; line-height: 1.1; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 18px; }
h3 { font-size: 20px; margin-bottom: 6px; }
p { margin: 0 0 12px; text-wrap: pretty; }
small { font-size: .5em; font-weight: 500; color: var(--gris); }
.invisible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.conteneur { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.bloc { margin-top: 64px; }
.etroit > * { max-width: 760px; }
.source { font-size: 13px; color: var(--gris); margin: 12px 0 0; }

/* En-tête */
.entete { background: #fff; }
.entete__barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 24px var(--titres); letter-spacing: -.02em; color: var(--encre); text-decoration: none; }
.entete nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.entete nav a { color: var(--encre); font-weight: 600; text-decoration: none; padding: 12px 0; }
.entete__recherche { display: flex; gap: 6px; }
.entete__recherche input { height: 44px; width: 150px; border: 2px solid var(--pale); border-radius: 999px; padding: 0 16px; font: inherit; color: inherit; }
button, .bouton { height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--encre); color: #fff; font: 600 16px Inter, system-ui, sans-serif; cursor: pointer; }
button:hover { background: var(--bleu); }

/* Bandeau ciel */
.ciel { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--ciel-1), var(--ciel-2)); }
.ciel__contenu { position: relative; z-index: 1; padding-top: 28px; padding-bottom: 92px; }
.ciel--court .ciel__contenu { padding-bottom: 48px; }
.nuage { position: absolute; z-index: 0; opacity: .45; }
.nuage--a { width: 250px; left: -90px; top: 36px; }
.nuage--b { width: 280px; right: -70px; bottom: 24px; opacity: .4; }
.soleil { position: absolute; right: 24%; top: 28px; width: 190px; height: 190px; border-radius: 50%; background: var(--jaune); box-shadow: 0 0 0 24px rgba(255, 200, 61, .3); }
.fil { font-size: 14px; font-weight: 500; margin-bottom: 20px; }
.fil a { color: var(--encre); }
.etiquette { display: inline-block; background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.ciel h1 { font-size: clamp(40px, 5.4vw, 72px); letter-spacing: -.03em; line-height: 1.02; }
mark { color: inherit; background: linear-gradient(transparent 66%, var(--jaune) 66%, var(--jaune) 92%, transparent 92%); }
.chapo { font-size: 19px; max-width: 560px; margin-top: 16px; }
.titre-fiche { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; }
.titre-fiche h1 { font-size: clamp(64px, 10vw, 136px); line-height: .92; letter-spacing: -.04em; }
.titre-fiche .chapo { flex: 1 1 340px; max-width: 480px; margin: 0; }
.navigation-annees { display: flex; gap: 20px; font-weight: 600; margin: 16px 0 0; }
.navigation-annees a { color: var(--encre); }

/* Accueil */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 56px; }
.hero__texte { flex: 1 1 520px; min-width: 0; }
.hero__chiffres { flex: 1 1 360px; box-shadow: 0 18px 44px rgba(18, 41, 61, .16); }
.hero__chiffres h2 { font-size: 20px; }
.hero__chiffres strong { display: block; font: 700 38px/1 var(--titres); letter-spacing: -.02em; }
.hero__chiffres .grand strong { font-size: 64px; }
.hero__chiffres .grand { padding-bottom: 16px; border-bottom: 2px solid var(--pale); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bleu { color: var(--bleu); } .rouge { color: var(--rouge); }
.fait { background: #BFEBD8; border-radius: 14px; padding: 14px 16px; font-weight: 500; font-size: 15px; }
.recherche { margin-top: 26px; max-width: 580px; }
.recherche label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.recherche__champ { display: flex; flex-wrap: wrap; gap: 8px; background: #fff; padding: 8px; border-radius: 34px; box-shadow: 0 14px 36px rgba(18, 41, 61, .16); }
.recherche__champ input { flex: 1 1 200px; min-width: 0; height: 52px; border: 0; padding: 0 18px; font: 500 17px Inter, system-ui, sans-serif; color: inherit; background: transparent; border-radius: 999px; }
.recherche__champ button { height: 52px; }
.theme { text-decoration: none; color: var(--encre); display: block; }
.machine { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.machine > * { flex: 1 1 360px; min-width: 0; }
.machine form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; align-items: end; }
.machine label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.machine input[type=text], .machine input[type=number] { width: 100%; height: 48px; border: 2px solid var(--encre); border-radius: 12px; padding: 0 14px; font: 500 17px Inter, system-ui, sans-serif; color: inherit; background: #fff; }

/* Cartes */
.carte { background: #fff; border-radius: 24px; box-shadow: var(--ombre); padding: 28px; min-width: 0; }
.carte--ciel { background: #A8D5FF; }
.grille { display: grid; gap: 22px; }
.grille--3 { grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); }
.grille--4 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.bientot { display: inline-block; background: #fff; border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.grille--2 { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.chiffres { position: relative; z-index: 2; margin-top: -44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 18px; }
.chiffre { padding: 20px; border-radius: 18px; display: flex; flex-direction: column; gap: 6px; }
.chiffre span { font-size: 14px; color: var(--gris); }
.chiffre strong { font: 700 clamp(30px, 3.2vw, 42px)/1 var(--titres); letter-spacing: -.02em; }
.insolite { display: flex; flex-direction: column; gap: 8px; min-height: 180px; }
.insolite__sur { font-size: 14px; font-weight: 600; }
.insolite strong { font: 700 clamp(32px, 3.6vw, 48px)/1.05 var(--titres); letter-spacing: -.03em; overflow-wrap: anywhere; }
.insolite strong a { color: inherit; }
.insolite p { font-size: 15px; margin: 0; }
.insolite--0 { background: var(--jaune); } .insolite--1 { background: #FFD3E2; } .insolite--2 { background: #BFEBD8; } .insolite--3 { background: #A8D5FF; }
.colonnes { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.colonnes > .carte { flex: 1 1 320px; }
.colonnes > .carte--large { flex: 2 1 420px; }

/* Courbe et curseurs */
.courbe { display: block; width: 100%; height: auto; }
.courbe text { font: 13px Inter, system-ui, sans-serif; fill: var(--gris); }
.legende { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.trait { display: inline-block; width: 26px; height: 0; border-top: 3px solid var(--bleu); }
.trait--2 { border-top: 3px dashed var(--rouge); margin-left: 12px; }
.curseur { margin-top: 14px; }
.curseur label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.curseur output { display: block; margin-top: 8px; font: 600 20px var(--titres); }
.curseurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 8px 32px; }
input[type=range] { width: 100%; height: 44px; margin: 0; accent-color: var(--encre); cursor: pointer; }
.resultat { font: 600 clamp(20px, 2.4vw, 28px)/1.25 var(--titres); margin: 18px 0 0; }
details { margin-top: 16px; }
summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
table { border-collapse: collapse; width: 100%; max-width: 420px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--pale); font-variant-numeric: tabular-nums; }
td { text-align: right; }
.faq { background: #fff; border-radius: 16px; padding: 6px 20px; box-shadow: var(--ombre); margin-top: 12px; }
.faq p { margin-bottom: 12px; }

/* Listes */
.barres, .classement, .liste-rang, .liste-colonnes, .pastilles { list-style: none; margin: 0; padding: 0; }
.barres li { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr 64px; align-items: center; gap: 12px; padding: 5px 0; }
.barres--rang li { grid-template-columns: minmax(110px, 1fr) 2fr 64px; }
.barres li > span:first-child { font-weight: 600; overflow-wrap: anywhere; }
.barres a, .classement a, .liste-rang a, .liste-colonnes a { color: var(--encre); }
.barre { display: block; height: 22px; background: var(--pale); border-radius: 999px; overflow: hidden; }
.barre i { display: block; height: 100%; background: var(--bleu); border-radius: 999px; }
.barres b { text-align: right; font-family: var(--titres); font-variant-numeric: tabular-nums; }
.classement li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 2px solid var(--pale); font-variant-numeric: tabular-nums; }
.classement li:last-child { border-bottom: 0; }
.classement .moi { background: var(--jaune); border-radius: 12px; border-bottom: 0; font-weight: 600; }
.liste-rang { counter-reset: rang; columns: 2; column-gap: 28px; }
.liste-rang li { counter-increment: rang; display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--pale); break-inside: avoid; }
.liste-rang li::before { content: counter(rang) "."; color: var(--gris); min-width: 2.2em; font-variant-numeric: tabular-nums; }
.liste-rang span, .liste-colonnes span { margin-left: auto; color: var(--gris); font-variant-numeric: tabular-nums; }
.liste-colonnes { columns: 240px; column-gap: 32px; }
.liste-colonnes li { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--pale); break-inside: avoid; }
.pastilles { display: flex; flex-wrap: wrap; gap: 10px; }
.pastilles a { display: block; background: var(--pale); color: var(--encre); font-weight: 500; text-decoration: none; border-radius: 999px; padding: 10px 18px; }
.pastilles a:hover, .pastilles a[aria-current] { background: var(--encre); color: #fff; }
.pastilles--lettres a { min-width: 46px; text-align: center; font-weight: 700; }
.carte .pastilles { margin-top: 10px; }

/* Publicité : hauteurs réservées pour que la page ne saute pas au chargement */
.pub { max-width: 1200px; margin: 56px auto 0; padding: 0 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pub__mention { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
.pub ins, .pub__demo { width: 100%; }
.pub--banniere ins, .pub--banniere .pub__demo { max-width: 760px; min-height: 100px; }
.pub--bloc ins, .pub--bloc .pub__demo { max-width: 970px; min-height: 250px; }
.pub--colonne { flex: 0 1 300px; margin: 0; padding: 0; }
.pub--colonne ins, .pub--colonne .pub__demo { min-height: 600px; }
.pub__demo { background: #EAF2F8; border: 1px dashed #6B8296; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--gris); font-size: 14px; font-weight: 600; }

/* Pied de page */
.pied { margin-top: 80px; background: var(--pale); }
.pied__barre { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.pied__barre > div { flex: 1 1 320px; max-width: 460px; font-size: 15px; }
.pied__nom { font: 700 20px var(--titres); }
.pied nav { display: flex; flex-wrap: wrap; gap: 4px 24px; align-content: flex-start; }
.pied nav a { color: var(--encre); font-weight: 500; padding: 12px 0; }

@media (max-width: 640px) {
  .liste-rang { columns: 1; }
  .entete__recherche { width: 100%; }
  .entete__recherche input { flex: 1; }
  .pub--colonne ins, .pub--colonne .pub__demo { min-height: 250px; }
  .pub--colonne { flex-basis: 100%; }
  .soleil { right: -40px; width: 130px; height: 130px; }
}

/* Immobilier */
.titre-fiche--ville h1 { font-size: clamp(40px, 6.5vw, 92px); line-height: .98; letter-spacing: -.03em; overflow-wrap: anywhere; }
.defilant { overflow-x: auto; }
table.large { max-width: none; min-width: 520px; }
table.large td { text-align: left; }
table.large td span { display: block; font-size: 13px; color: var(--gris); }
.resultat + .resultat { margin-top: 10px; }

/* Lieux-dits */
.insolite strong.moyen { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.15; }
.pastilles small { font-size: .8em; color: var(--gris); margin-left: 4px; }
.pastilles a:hover small { color: #fff; }
.pastille-inerte { display: block; border: 1px solid var(--pale); border-radius: 999px; padding: 9px 18px; color: var(--gris); }

/* Origine du prénom */
.histoire { border-left: 0; background: #FFF6DA; }
.histoire p { max-width: 760px; font-size: 17px; }
.histoire p:last-child { margin-bottom: 0; }
.loupe { margin: 0; padding-left: 20px; }
.loupe li { margin-bottom: 12px; }

/* Textes longs (immobilier) */
.texte-long > p { max-width: 820px; font-size: 17px; }
.texte-long h3 { margin-top: 22px; }
.texte-long .grille { margin-top: 8px; }
.jauge { position: relative; display: flex; height: 18px; margin-top: 18px; background: #fff; border-radius: 999px; overflow: visible; }
.jauge span { display: block; height: 100%; }
.jauge span:nth-child(2) { background: var(--encre); border-radius: 999px; opacity: .85; }
.jauge i { position: absolute; top: -6px; width: 6px; height: 30px; margin-left: -3px; background: var(--jaune); border: 2px solid var(--encre); border-radius: 4px; transition: left .15s; }

/* Décès */
.barres--double li { grid-template-columns: minmax(120px, 1fr) 2.4fr 76px; align-items: center; }
.paire { display: flex; flex-direction: column; gap: 3px; }
.paire .barre { height: 12px; }
.barre--f i { background: #D9822B; }
.trait--f { border-top: 3px solid #D9822B; margin-left: 12px; }
.barres--double b { font-size: 13px; line-height: 1.25; }
.outil { margin-top: 24px; padding: 20px; background: var(--pale); border-radius: 16px; }
.outil h3 { margin-bottom: 8px; }
.outil .resultat { font-size: clamp(17px, 2vw, 22px); }
