:root {
  --encre: #15232b;
  --encre-douce: #46575f;
  --fond: #f4f7f8;
  --papier: #ffffff;
  --trait: #dde4e7;
  --marque: #0d6e6e;
  --marque-fonce: #0a5252;
  --alerte: #8a3b00;
  --alerte-fond: #fff3e6;
  --rayon: 14px;
  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--police); font-size: 17px; line-height: 1.55; color: var(--encre); background: var(--fond); }
a { color: var(--marque-fonce); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--marque); }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0.4rem 0 0.3rem; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; margin: 0 0 0.6rem; }
h3 { font-size: 1.02rem; margin: 1rem 0 0.4rem; }
p { margin: 0.4rem 0; }
small { color: var(--encre-douce); font-size: 0.85em; }

.entete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 16px; background: var(--papier); border-bottom: 1px solid var(--trait); flex-wrap: wrap; }
.marque { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.15rem; color: var(--encre); text-decoration: none; }
.nav { display: flex; gap: 0.2rem 0.9rem; flex-wrap: wrap; font-size: 0.92rem; }
.nav a { text-decoration: none; color: var(--encre-douce); }
.nav a:hover { color: var(--marque); text-decoration: underline; }

.page { max-width: 960px; margin: 0 auto; padding: 1rem 16px 2.5rem; }
.fil { font-size: 0.9rem; color: var(--encre-douce); margin-top: 0.3rem; }
.fil a { color: inherit; }
.sous-titre { color: var(--encre-douce); margin: 0 0 1rem; }

.carte { background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 1rem 1.1rem; margin: 1rem 0; }
.resume { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .resume { grid-template-columns: 1fr 1fr; } }
.resume-bloc h2 { margin-bottom: 0.3rem; }
.grand { margin: 0.2rem 0 0.5rem; }
.grand .pastille { font-size: 1.25rem; padding: 0.35rem 0.9rem; }

.pastille { display: inline-block; border-radius: 999px; padding: 0.15rem 0.6rem; font-weight: 650; line-height: 1.3; white-space: nowrap; }
.pastille.petit { font-size: 0.86rem; padding: 0.1rem 0.5rem; }
.pastille.clair { color: #0b1f2a; }
.pastille.fonce { color: #ffffff; }
.pastille.vide { background: #e6ebee; color: var(--encre-douce); font-weight: 500; }

.avertissement { background: var(--alerte-fond); color: var(--alerte); border: 1px solid #f3cfae; border-radius: var(--rayon); padding: 0.7rem 1rem; }
.avertissement.fort { background: #fde8e8; color: #8a1c1c; border-color: #f2b8b8; }
.alerte { color: #8a1c1c; font-weight: 600; }
.note { color: var(--encre-douce); font-size: 0.92rem; }

.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.45rem 0.5rem; border-top: 1px solid var(--trait); vertical-align: top; }
thead th { border-top: 0; color: var(--encre-douce); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
tbody th { font-weight: 600; }
td small { display: block; margin-top: 0.15rem; }
tr.total th, tr.total td { border-top: 2px solid var(--encre); }
table.communes td, table.communes th { white-space: nowrap; }

.liste-simple { padding-left: 1.1rem; margin: 0.3rem 0; }
.voisins { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 0.45rem; }
@media (min-width: 640px) { .voisins { grid-template-columns: 1fr 1fr; } }
.voisins li { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

.comprendre p { font-size: 0.97rem; }

.hero { padding: 1.4rem 0 0.4rem; }
.hero h1 { font-size: 2rem; }
@media (min-width: 640px) { .hero h1 { font-size: 2.4rem; } }
.recherche { position: relative; max-width: 560px; margin: 0.8rem 0 0.4rem; }
.recherche input { width: 100%; font: inherit; font-size: 1.05rem; padding: 0.75rem 1rem; border: 2px solid var(--trait); border-radius: 999px; background: var(--papier); color: var(--encre); }
.recherche input:focus { outline: none; border-color: var(--marque); box-shadow: 0 0 0 4px rgba(13, 110, 110, 0.15); }
.resultats { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); list-style: none; margin: 0; padding: 0.3rem; z-index: 5; box-shadow: 0 10px 30px rgba(21, 35, 43, 0.12); }
.resultats li a { display: block; padding: 0.5rem 0.8rem; border-radius: 8px; text-decoration: none; color: var(--encre); }
.resultats li a:hover, .resultats li a:focus { background: var(--fond); }
.resultats li a small { margin-left: 0.4rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.grille { display: grid; grid-template-columns: 1fr; gap: 0.8rem; }
@media (min-width: 640px) { .grille { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grille { grid-template-columns: 1fr 1fr 1fr; } }
.tuile { border: 1px solid var(--trait); border-radius: 10px; padding: 0.8rem 0.9rem; }
.tuile h3 { margin: 0 0 0.3rem; }
.tuile p { font-size: 0.92rem; margin: 0.2rem 0; color: var(--encre-douce); }

.pied { max-width: 960px; margin: 0 auto; padding: 1rem 16px 2rem; color: var(--encre-douce); font-size: 0.88rem; border-top: 1px solid var(--trait); }
