/* L'eau de ma commune — design maison (pas de maquette) : bleu eau + gris clair, sobre et lisible. */

:root {
	--bleu: #1266a4;
	--bleu-fonce: #0b4470;
	--fond: #f4f7fa;
	--fond-fonce: #dfe8f0;
	--accent: #d97706;
	--encre: #212830;
	--gris: #64707c;
	--rayon: 10px;
	--vert-ok: #2f7d4f;
	--rouge-alerte: #b4232a;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--encre); background: var(--fond); line-height: 1.6; }
a { color: var(--bleu); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { background: var(--bleu); color: #fff; padding: 14px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo { color: #fff; text-decoration: none; font-size: 1.35rem; font-weight: 700; letter-spacing: .2px; }
.logo em { font-style: normal; font-weight: 400; opacity: .85; }
.logo-icon { margin-right: 2px; }
.recherche { display: flex; gap: 8px; }
.recherche input { border: none; border-radius: var(--rayon); padding: 9px 14px; min-width: 220px; font-size: 1rem; }
.recherche button { border: none; border-radius: var(--rayon); background: var(--accent); color: #fff; padding: 9px 16px; font-size: 1rem; cursor: pointer; }

/* contenus */
main.wrap { padding: 28px 20px 48px; }
h1 { font-size: 1.9rem; line-height: 1.25; color: var(--bleu-fonce); margin: 0 0 6px; }
.sous-titre { color: var(--gris); margin-top: 0; }
h2 { font-size: 1.3rem; color: var(--bleu-fonce); margin-top: 36px; }

.carte-info { background: #fff; border: 1px solid var(--fond-fonce); border-radius: var(--rayon); padding: 18px 22px; margin: 18px 0; }
.carte-info p { margin: 6px 0; }

/* badge dureté — 5 catégories */
.badge-durete { display: inline-block; border-radius: 999px; padding: 6px 18px; font-weight: 700; font-size: 1.05rem; color: #fff; }
.badge-durete.douce { background: #2e86ab; }
.badge-durete.moyenne { background: #2f7d4f; }
.badge-durete.dure { background: #d97706; }
.badge-durete.tres-dure { background: #b4232a; }
.jauge { height: 10px; background: linear-gradient(90deg, #2e86ab 0 30%, #2f7d4f 30% 50%, #d97706 50% 70%, #b4232a 70% 100%); border-radius: 999px; position: relative; margin: 10px 0 4px; }
.jauge .curseur { position: absolute; top: -5px; width: 4px; height: 20px; background: var(--encre); border-radius: 2px; }
.jauge-legende { display: flex; justify-content: space-between; color: var(--gris); font-size: .8rem; }

/* badges conformité */
.badge-ok { display: inline-block; background: #e4f2e9; color: var(--vert-ok); border-radius: 999px; padding: 4px 14px; font-weight: 700; }
.badge-non { display: inline-block; background: #f9e4e5; color: var(--rouge-alerte); border-radius: 999px; padding: 4px 14px; font-weight: 700; }

/* tableau des paramètres */
.tbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--fond-fonce); border-radius: var(--rayon); overflow: hidden; margin: 16px 0; }
.tbl th, .tbl td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--fond-fonce); }
.tbl th { background: var(--fond-fonce); color: var(--bleu-fonce); font-size: .9rem; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .val { font-weight: 700; white-space: nowrap; }
.tbl-scroll { overflow-x: auto; }

/* grilles de cartes */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 0; margin: 16px 0; list-style: none; }
.grille li { background: #fff; border: 1px solid var(--fond-fonce); border-radius: var(--rayon); padding: 14px 16px; }
.grille li a { font-weight: 600; text-decoration: none; }
.grille li .meta { color: var(--gris); font-size: .9rem; margin-top: 2px; }
.grille li .th { display: inline-block; background: var(--fond-fonce); color: var(--bleu-fonce); border-radius: 999px; padding: 2px 10px; font-size: .82rem; font-weight: 600; float: right; }

/* listes de départements */
.liste-depts { columns: 3; gap: 24px; padding: 0; margin: 16px 0; list-style: none; }
.liste-depts li { margin: 4px 0; break-inside: avoid; }
@media (max-width: 720px) { .liste-depts { columns: 2; } }
@media (max-width: 480px) { .liste-depts { columns: 1; } }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--fond-fonce); border-radius: var(--rayon); padding: 10px 16px; margin: 8px 0; }
.faq summary { font-weight: 600; cursor: pointer; }

/* footer */
.site-footer { background: var(--bleu-fonce); color: #d3e0ec; padding: 26px 0; margin-top: 40px; font-size: .92rem; }
.site-footer a { color: #fff; }
.attribution { opacity: .8; }

.note { color: var(--gris); font-size: .9rem; }
.intro { font-size: 1.05rem; }
.maillage { line-height: 2; }

.cta-hub { margin: 14px 0 6px; }
.cta-hub a { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; border-radius: var(--rayon); padding: 11px 20px; }

/* géolocalisation */
.geo-btn { border: none; border-radius: var(--rayon); background: var(--accent); color: #fff; padding: 11px 20px; font-size: 1rem; font-weight: 700; cursor: pointer; }
.geo-btn:disabled { opacity: .6; cursor: default; }
