/* Les marchés de France — design maison (pas de maquette) : vert marché + crème, sobre et lisible. */

:root {
	--vert: #1e5631;
	--vert-fonce: #143d22;
	--creme: #faf6ee;
	--creme-fonce: #f0e8d8;
	--tomate: #c9452c;
	--encre: #24281f;
	--gris: #6b7263;
	--rayon: 10px;
}

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

/* header */
.site-header { background: var(--vert); 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(--tomate); 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(--vert-fonce); margin: 0 0 6px; }
.sous-titre { color: var(--gris); margin-top: 0; }
h2 { font-size: 1.3rem; color: var(--vert-fonce); margin-top: 36px; }

.badge-jour { display: inline-block; background: var(--vert); color: #fff; border-radius: 999px; padding: 4px 14px; font-weight: 600; margin: 2px 6px 2px 0; }
/* Jours/pages sous la gate anti-thin : affichés mais non cliquables (audit 06/08 et 07/08).
   La classe était posée sans style depuis le 06/08 — le badge restait vert, donc lisible comme un lien. */
.badge-jour-inactif { background: var(--creme-fonce); color: var(--gris); font-weight: 500; }
.lien-inactif { color: var(--gris); }
.badge-prochain { display: inline-block; background: var(--tomate); color: #fff; border-radius: 999px; padding: 4px 14px; font-weight: 600; }
.badge-source { color: var(--gris); font-size: .85rem; }

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

/* 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(--creme-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; }

/* tableau département */
table.jours { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--rayon); overflow: hidden; margin: 16px 0; }
table.jours th { background: var(--vert); color: #fff; text-align: left; padding: 10px 14px; }
table.jours td { padding: 9px 14px; border-top: 1px solid var(--creme-fonce); vertical-align: top; }
table.jours tr td:first-child { font-weight: 600; white-space: nowrap; width: 1%; }

/* 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(--creme-fonce); border-radius: var(--rayon); padding: 10px 16px; margin: 8px 0; }
.faq summary { font-weight: 600; cursor: pointer; }

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

.note { color: var(--gris); font-size: .9rem; }

/* CTA « autour de moi » (home) */
.cta-autour { margin: 14px 0 6px; }
.cta-autour a { display: inline-block; background: var(--tomate); color: #fff; text-decoration: none; font-weight: 700; border-radius: var(--rayon); padding: 11px 20px; }

/* prochaines dates (fiche marché, R2) */
.dates-liste { margin: 10px 0; }
.badge-date { display: inline-block; background: var(--creme-fonce); color: var(--vert-fonce); border-radius: 999px; padding: 4px 14px; font-weight: 600; margin: 2px 6px 2px 0; }

/* maillage interne (fiche marché, R2) */
.maillage { line-height: 2; }

/* liens thématiques (home, R3/R4) */
.themes { margin: 4px 0 8px; color: var(--gris); }
.themes a { font-weight: 600; }

/* navigation de rubriques dans le footer (maillage sitewide, R1-R4) */
.footer-nav { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.15); display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { font-weight: 600; }
.intro { font-size: 1.05rem; }

/* Guides pratiques (section éditoriale) */
.guide-article { max-width: 760px; }
.guide-article .chapo { font-size: 1.1rem; color: var(--vert-fonce); font-weight: 500; }
.guide-article h2 { margin-top: 32px; }
.guide-article p, .guide-article li { line-height: 1.65; }
.guide-article ul { padding-left: 22px; }
.guide-article li { margin-bottom: 6px; }
.guide-article .note { background: #fff; border: 1px solid var(--creme-fonce); border-radius: var(--rayon); padding: 10px 14px; }
