/* ==========================================================================
   Infos Déchetterie — feuille de style du site
   Inspiration : la signalétique des quais de déchetterie (bennes colorées,
   panneaux lisibles de loin). Se charge après bootstrap.min.css (Sandstone).
   ========================================================================== */

:root {
    --asphalte: #1F2A2E;      /* texte, pied de page */
    --quai: #EEF1EC;          /* fond général */
    --beton: #FFFFFF;         /* surfaces */
    --benne: #1E6B4F;         /* couleur principale */
    --benne-fonce: #154D39;
    --signal: #F2C230;        /* jaune de signalisation : action principale */
    --signal-fonce: #D9A912;
    --gris: #5E6B70;
    --trait: #D3D9D2;
    --danger: #B3261E;

    --police-texte: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
    --police-titre: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;

    --bs-body-font-family: var(--police-texte);
    --bs-body-color: var(--asphalte);
    --bs-body-bg: var(--quai);
    --bs-link-color: var(--benne);
    --bs-link-color-rgb: 30, 107, 79;
    --bs-link-hover-color: var(--benne-fonce);
    --bs-link-hover-color-rgb: 21, 77, 57;
    --bs-primary: var(--benne);
    --bs-primary-rgb: 30, 107, 79;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    font-family: var(--police-texte);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--asphalte);
    background: var(--quai);
}

h1, h2, h3, h4, .titre {
    font-family: var(--police-titre);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: none;
    color: var(--asphalte);
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.25rem); margin-bottom: .75rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 2.5rem 0 1rem; }
h3 { font-size: 1.4rem; margin: 1.5rem 0 .6rem; }
h4 { font-size: 1.2rem; }

a { color: var(--benne); text-underline-offset: .18em; }
a:hover { color: var(--benne-fonce); }

:focus-visible {
    outline: 3px solid var(--signal);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--asphalte);
}

.texte-court { max-width: 68ch; }
.muted { color: var(--gris); }

/* Bootstrap Sandstone met les boutons en majuscules : on revient à une casse normale */
.btn, .nav-link, .navbar, .badge, .page-link { text-transform: none; letter-spacing: 0; font-family: var(--police-texte); }
.btn { font-weight: 700; border-radius: 6px; font-size: 1rem; padding: .55rem 1rem; }
.btn-sm { font-size: .9rem; padding: .35rem .75rem; }
.btn-lg { font-size: 1.1rem; padding: .75rem 1.4rem; }
.btn-benne { background: var(--benne); color: #fff; border: 2px solid var(--benne); }
.btn-benne:hover, .btn-benne:focus { background: var(--benne-fonce); border-color: var(--benne-fonce); color: #fff; }
.btn-signal { background: var(--signal); color: var(--asphalte); border: 2px solid var(--signal); }
.btn-signal:hover, .btn-signal:focus { background: var(--signal-fonce); border-color: var(--signal-fonce); color: var(--asphalte); }
.btn-contour { background: transparent; color: var(--benne); border: 2px solid var(--benne); }
.btn-contour:hover { background: var(--benne); color: #fff; }

.lien-evitement {
    position: absolute; left: -999px; top: 0; z-index: 1000;
    background: var(--signal); color: var(--asphalte); padding: .5rem 1rem; font-weight: 700;
}
.lien-evitement:focus { left: 1rem; top: 1rem; }

/* ── En-tête ──────────────────────────────────────────────────────────── */
.entete {
    background: var(--beton);
    border-top: 6px solid var(--benne);
    border-bottom: 1px solid var(--trait);
}
.entete__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .75rem; padding-bottom: .75rem; }
.entete__logo img { display: block; height: 52px; width: auto; }
.entete__nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.entete__nav a {
    display: block; padding: .5rem .85rem; border-radius: 6px;
    color: var(--asphalte); font-weight: 700; text-decoration: none;
}
.entete__nav a:hover { background: var(--quai); color: var(--benne-fonce); }
.entete__nav a[aria-current="page"] { color: var(--benne); box-shadow: inset 0 -3px 0 var(--signal); border-radius: 0; }
.entete__menu {
    display: none; align-items: center; gap: .5rem;
    background: none; border: 2px solid var(--asphalte); border-radius: 6px;
    padding: .4rem .75rem; font-weight: 700; color: var(--asphalte);
}
.entete__menu-barres, .entete__menu-barres::before, .entete__menu-barres::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative;
}
.entete__menu-barres::before, .entete__menu-barres::after { content: ""; position: absolute; left: 0; }
.entete__menu-barres::before { top: -6px; }
.entete__menu-barres::after { top: 6px; }

@media (max-width: 767.98px) {
    .entete__inner { flex-wrap: wrap; }
    .entete__logo img { height: 42px; }
    .entete__menu { display: inline-flex; }
    .entete__nav { display: none; width: 100%; }
    .menu-ouvert .entete__nav { display: block; }
    .entete__nav ul { flex-direction: column; padding-bottom: .5rem; }
    .entete__nav a { padding: .75rem .5rem; border-bottom: 1px solid var(--trait); border-radius: 0; }
}

.contenu { padding-bottom: 3rem; min-height: 60vh; }

/* ── Fil d'Ariane ─────────────────────────────────────────────────────── */
.fil-ariane ol {
    display: flex; flex-wrap: wrap; gap: .25rem .5rem; list-style: none;
    padding: 1rem 0 0; margin: 0 0 1rem; font-size: .9rem; color: var(--gris);
}
.fil-ariane li + li::before { content: "/"; margin-right: .5rem; color: var(--trait); }
.fil-ariane a { color: var(--gris); }

/* ── Bloc d'accueil ───────────────────────────────────────────────────── */
.accueil-hero {
    background: var(--benne);
    color: #fff;
    padding: 3rem 0 3.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
/* bande « quai » rayée jaune / vert sous le bloc, comme un bord de quai */
.accueil-hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
    background: repeating-linear-gradient(-45deg, var(--signal) 0 18px, var(--benne-fonce) 18px 36px);
}
.accueil-hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: 20ch; margin-bottom: 1rem; }
.accueil-hero p { font-size: 1.15rem; max-width: 52ch; color: #E3EFE9; }
.accueil-hero .chiffres { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 1.5rem; color: #E3EFE9; font-size: .95rem; }
.accueil-hero .chiffres strong { font-family: var(--police-titre); font-size: 1.6rem; color: #fff; margin-right: .3rem; }

.recherche { display: flex; gap: .5rem; max-width: 640px; margin-top: 1.5rem; }
.recherche input {
    flex: 1; min-width: 0; font-size: 1.1rem; padding: .85rem 1rem;
    border: 2px solid var(--asphalte); border-radius: 6px; background: #fff; color: var(--asphalte);
}
.recherche button { font-size: 1.1rem; padding: .85rem 1.4rem; white-space: nowrap; }
.recherche--clair input { border-color: var(--trait); }
@media (max-width: 575.98px) {
    .recherche { flex-direction: column; }
}

/* ── Départements par région ──────────────────────────────────────────── */
.regions { columns: 3 280px; column-gap: 2.5rem; }
.region { break-inside: avoid; margin-bottom: 1.75rem; }
.region h3 { font-size: 1.3rem; margin: 0 0 .5rem; padding-bottom: .3rem; border-bottom: 3px solid var(--benne); }
.region ul { list-style: none; padding: 0; margin: 0; }
.region li a { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; text-decoration: none; color: var(--asphalte); }
.region li a:hover { color: var(--benne); text-decoration: underline; }
.region .code { color: var(--gris); font-variant-numeric: tabular-nums; }

/* ── Listes de déchetteries ───────────────────────────────────────────── */
.filtre { max-width: 420px; margin: 1rem 0 1.5rem; }
.filtre label { font-weight: 700; display: block; margin-bottom: .3rem; }
.filtre input { width: 100%; padding: .65rem .9rem; border: 2px solid var(--trait); border-radius: 6px; font-size: 1rem; }
.filtre input:focus { border-color: var(--benne); }
.filtre__compte { font-size: .9rem; color: var(--gris); min-height: 1.4em; display: block; margin-top: .25rem; }

.communes { columns: 2 340px; column-gap: 2.5rem; }
.commune { break-inside: avoid; margin-bottom: 1.25rem; }
.commune h3 { font-size: 1.15rem; margin: 0 0 .3rem; color: var(--gris); }
.commune ul { list-style: none; padding: 0; margin: 0; }
.commune li { padding: .4rem 0 .4rem .9rem; border-left: 3px solid var(--trait); }
.commune li:hover { border-left-color: var(--benne); }
.commune li a { font-weight: 700; }
.commune li small { display: block; color: var(--gris); }

.liste-simple { list-style: none; padding: 0; columns: 2 300px; column-gap: 2rem; }
.liste-simple li { break-inside: avoid; padding: .45rem 0; border-bottom: 1px solid var(--trait); }
.liste-simple small { color: var(--gris); margin-left: .35rem; }

/* ── Fiche déchetterie ────────────────────────────────────────────────── */
.fiche { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; align-items: start; }
@media (max-width: 991.98px) { .fiche { grid-template-columns: 1fr; } }

.fiche__entete p { font-size: 1.1rem; }
.fiche__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }

.panneau {
    background: var(--beton); border: 1px solid var(--trait); border-radius: 8px; padding: 1.25rem 1.4rem; margin-bottom: 1.5rem;
}
.panneau h2 { margin-top: 0; font-size: 1.5rem; }
.panneau dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
.panneau dt { color: var(--gris); font-weight: 400; }
.panneau dd { margin: 0; font-weight: 700; }

/* Le panneau horaires imite une plaque d'entrée de déchetterie */
.panneau-horaires {
    background: var(--benne); color: #fff; border-radius: 8px; padding: 1.4rem 1.5rem; margin-bottom: 1.5rem;
    border: 4px solid #fff; outline: 2px solid var(--benne);
}
.panneau-horaires h2 { color: #fff; margin: 0 0 .75rem; font-size: 1.7rem; }
.panneau-horaires h3 { color: #fff; font-size: 1.15rem; margin: 1rem 0 .3rem; }
.panneau-horaires p { margin: 0; font-size: 1.05rem; white-space: pre-line; }
.panneau-horaires .avertissement { margin-top: 1rem; font-size: .9rem; color: #D4E8DE; white-space: normal; }

.carte-statique { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--trait); }
.carte-statique img { display: block; width: 100%; height: auto; }

/* Grille des déchets acceptés : une plaque par benne */
.bennes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; list-style: none; padding: 0; margin: 0; }
.benne {
    --couleur: var(--gris);
    background: var(--beton); border: 1px solid var(--trait); border-radius: 6px;
    border-top: 10px solid var(--couleur); padding: .7rem .85rem .8rem;
}
.benne__nom { font-family: var(--police-titre); font-size: 1.2rem; font-weight: 700; line-height: 1.15; display: block; }
.benne__etat { display: inline-flex; align-items: center; gap: .35rem; font-size: .92rem; margin-top: .35rem; font-weight: 700; }
.benne__etat::before { font-size: 1rem; line-height: 1; }
.benne--oui .benne__etat { color: var(--benne); }
.benne--oui .benne__etat::before { content: "✓"; }
.benne--non { background: #F6F7F5; }
.benne--non .benne__nom { color: var(--gris); }
.benne--non .benne__etat { color: var(--danger); }
.benne--non .benne__etat::before { content: "✕"; }
.benne--nc .benne__etat { color: var(--gris); font-weight: 400; }
.benne--nc .benne__etat::before { content: "?"; }
.benne__detail { display: block; font-size: .85rem; color: var(--gris); margin-top: .2rem; }

.benne[data-type="dechets_verts"] { --couleur: #3C8D3F; }
.benne[data-type="cartons"], .benne[data-type="papiers_graphiques"] { --couleur: #F2C230; }
.benne[data-type="dechets_non_dangereux"] { --couleur: #5E6B70; }
.benne[data-type="ferrailles"] { --couleur: #3E5C76; }
.benne[data-type="bois"] { --couleur: #8B5E3C; }
.benne[data-type="dechets_d_equipements_electriques_et_electroniques"] { --couleur: #6A4C93; }
.benne[data-type="dechets_dangereux"], .benne[data-type="amiante"], .benne[data-type="dechets_d_activites_de_soin_a_risques_infectieux"] { --couleur: #B3261E; }
.benne[data-type="textiles"] { --couleur: #B8577E; }
.benne[data-type="pneus"] { --couleur: #2E3438; }
.benne[data-type="piles_et_accumulateurs_et_batteries"] { --couleur: #E07B00; }
.benne[data-type="huiles"] { --couleur: #8A7A20; }
.benne[data-type="dechets_inertes"] { --couleur: #A39B8B; }

.legende { font-size: .9rem; color: var(--gris); margin-top: .75rem; }

/* Proximité */
.proches { list-style: none; padding: 0; margin: 0; }
.proches li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--trait); }
.proches .distance { color: var(--gris); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--trait); padding: .75rem 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style-position: outside; }
.faq details p { margin: .6rem 0 0; }

/* ── Bloc enlèvement d'encombrants ────────────────────────────────────── */
.encombrants { margin: 2.5rem 0; border-radius: 8px; background: var(--asphalte); color: #fff; }
.encombrants > summary {
    list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
    padding: 1.25rem 1.5rem;
}
.encombrants > summary::-webkit-details-marker { display: none; }
.encombrants h2 { color: #fff; margin: 0; font-size: 1.6rem; }
.encombrants summary p { margin: .25rem 0 0; color: #C9D3D0; }
.encombrants summary .btn { pointer-events: none; }
.encombrants[open] summary .btn-ouvrir { display: none; }
.encombrants__corps { background: var(--beton); color: var(--asphalte); padding: 1.5rem; border-radius: 0 0 8px 8px; }
.encombrants__corps .form-label { font-weight: 700; }
.champ-piege { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ── Blog ─────────────────────────────────────────────────────────────── */
.categories-blog { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 2rem; }
.categories-blog a {
    display: inline-block; padding: .4rem .9rem; border-radius: 999px; border: 2px solid var(--benne);
    text-decoration: none; font-weight: 700; color: var(--benne); background: var(--beton);
}
.categories-blog a:hover, .categories-blog a[aria-current="page"] { background: var(--benne); color: #fff; }

.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem 1.75rem; list-style: none; padding: 0; margin: 0; }
.article-vignette { display: flex; flex-direction: column; }
.article-vignette img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--trait); }
.article-vignette__cat { font-size: .9rem; color: var(--benne); font-weight: 700; margin-top: .75rem; }
.article-vignette h2, .article-vignette h3 { font-size: 1.35rem; margin: .2rem 0 .4rem; }
.article-vignette :is(h2, h3) a { color: var(--asphalte); text-decoration: none; }
.article-vignette :is(h2, h3) a:hover { color: var(--benne); text-decoration: underline; }
.article-vignette p { color: var(--gris); font-size: .97rem; margin: 0; }
.article-vignette--une { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.75rem; align-items: center; }
.article-vignette.article-vignette--une h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
@media (max-width: 767.98px) { .article-vignette--une { grid-template-columns: 1fr; } }

.article { max-width: 760px; }
.article__meta { color: var(--gris); font-size: .95rem; margin-bottom: 1.5rem; }
.article__image { margin: 0 0 2rem; }
.article__image img { width: 100%; height: auto; border-radius: 8px; }
.article__corps { font-size: 1.1rem; line-height: 1.7; }
.article__corps h2 { margin-top: 2.25rem; scroll-margin-top: 1rem; }
.article__corps img { max-width: 100%; height: auto; border-radius: 6px; }
.article__corps blockquote { border-left: 4px solid var(--signal); padding: .25rem 0 .25rem 1rem; margin: 1.5rem 0; color: var(--gris); }
.article__corps table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .97rem; }
.article__corps th, .article__corps td { border: 1px solid var(--trait); padding: .5rem .7rem; text-align: left; }
.article__corps th { background: var(--quai); }
.sommaire { background: var(--beton); border-left: 4px solid var(--benne); padding: 1rem 1.25rem; margin: 0 0 2rem; border-radius: 0 6px 6px 0; }
.sommaire h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
.sommaire ol { margin: 0; padding-left: 1.2rem; }
.sommaire li { padding: .15rem 0; }
.apercu-admin { background: var(--signal); color: var(--asphalte); padding: .6rem 1rem; border-radius: 6px; font-weight: 700; margin: 1rem 0; }

.pagination { margin-top: 2.5rem; }
.page-link { color: var(--benne); }
.page-item.active .page-link { background: var(--benne); border-color: var(--benne); }

/* ── Résultats de recherche ───────────────────────────────────────────── */
.resultats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .75rem 1.5rem; }
.resultats li { padding: .75rem 0; border-bottom: 1px solid var(--trait); }
.resultats a { font-weight: 700; font-size: 1.05rem; }
.resultats small { display: block; color: var(--gris); }

/* ── Formulaires simples ──────────────────────────────────────────────── */
.formulaire { max-width: 640px; }
.formulaire .form-label { font-weight: 700; margin-top: 1rem; }
.formulaire .invalid-feedback { display: block; }

/* ── Pied de page ─────────────────────────────────────────────────────── */
.pied { background: var(--asphalte); color: #D5DDDA; padding: 2.5rem 0 1rem; border-top: 6px solid var(--signal); }
.pied__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 767.98px) { .pied__inner { grid-template-columns: 1fr; } }
.pied__marque { display: flex; gap: 1.25rem; align-items: flex-start; }
.pied__marque p { margin: 0; max-width: 38ch; }
.pied__liens ul { list-style: none; padding: 0; margin: 0; }
.pied__liens a, .pied__cookies { color: #fff; display: inline-block; padding: .3rem 0; }
.pied__cookies { background: none; border: 0; text-decoration: underline; text-underline-offset: .18em; font: inherit; cursor: pointer; }
.pied__copyright { font-size: .85rem; color: #9FAEAA; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #34434A; }

/* ── Page 404 ─────────────────────────────────────────────────────────── */
.page-erreur { padding: 3rem 0; }
.page-erreur .code-erreur { font-family: var(--police-titre); font-size: 6rem; line-height: 1; color: var(--benne); }

/* ── Derniers articles (bas de toutes les pages) ──────────────────────── */
.derniers-articles { background: var(--beton); border-top: 1px solid var(--trait); padding: 2.5rem 0 2rem; margin-top: 3rem; }
.derniers-articles h2 { margin-top: 0; }
.derniers-articles .article-vignette p { font-size: .9rem; }
