/* =========================================================
   Mairie de Castelmar — maquette IDEA (v2)
   Moderne, humain, touche provençale : fond calanques très
   éclairci, photos d'illustration plutôt que pictogrammes,
   titres en serif doux, accents terre cuite / ocre.
   Surcharge base.css. Fond clair uniquement.
   ========================================================= */
:root {
  --font-heading: 'Petrona', Georgia, serif;
  --font-body: 'Mulish', system-ui, sans-serif;

  --color-bg: #FBF9F4;
  --color-bg-alt: rgba(255, 255, 255, 0.82);
  --color-surface: #FFFFFF;
  --color-border: rgba(26, 42, 60, 0.12);

  --color-text: #1A2A3C;
  --color-text-muted: #55657A;

  --color-accent: #11497A;        /* bleu profond des calanques */
  --color-accent-dark: #0C3659;
  --color-accent-2: #1C8C9E;      /* turquoise */
  --color-accent-2-soft: #E4F3F5;
  --color-terra: #C4632E;         /* terre cuite provençale */
  --color-terra-soft: #FBEADF;
  --color-ochre: #D9A441;         /* ocre / soleil */
  --color-ochre-soft: #FFF3D9;
  --color-olive: #6F7F4F;
  --color-accent-contrast: #FFFFFF;
  --color-ok: #1F7A45;
  --color-ko: #B42318;
  --color-alert: #9A4A12;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 2px 12px rgba(26, 42, 60, 0.06);
  --shadow-md: 0 18px 40px rgba(26, 42, 60, 0.13);
  --shadow-glow: 0 0 0 1px rgba(17, 73, 122, 0.12), 0 18px 40px rgba(17, 73, 122, 0.18);
  --hero-overlay: linear-gradient(90deg, rgba(8, 28, 48, 0.72) 0%, rgba(8, 28, 48, 0.45) 55%, rgba(8, 28, 48, 0.25) 100%);
  --ease: cubic-bezier(.2,.7,.2,1);
}

html { font-size: 106.25%; }
html[data-fontsize="large"] { font-size: 122%; }
html[data-fontsize="xl"] { font-size: 140%; }

body { background: var(--color-bg); position: relative; }
/* Fond calanques très éclairci, fixe, à peine visible */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url('https://images.pexels.com/photos/28376228/pexels-photo-28376228.jpeg?auto=compress&cs=tinysrgb&w=1920') center / cover no-repeat;
  opacity: 0.07;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(251,249,244,0.2) 0%, rgba(251,249,244,0.75) 100%);
}

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; }
h2.section-title { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem); font-weight: 600; }
.section-subtitle { font-size: 1.05rem; }
.eyebrow { color: var(--color-terra); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.8rem; display: inline-flex; align-items: center; gap: 0.6rem; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--color-ochre); border-radius: 2px; }
.section-head.center .eyebrow::after { content: ""; width: 22px; height: 2px; background: var(--color-ochre); border-radius: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--color-ochre); outline-offset: 3px; }
.btn { min-height: 48px; }
.arrow { display: inline-block; transition: transform 0.3s var(--ease); }
a:hover .arrow { transform: translateX(4px); }

/* ---------- Contraste renforcé (fond clair conservé) ---------- */
html[data-contrast="high"] { --color-bg: #FFFFFF; --color-bg-alt: #FFFFFF; --color-border: #1A2A3C; --color-text: #000; --color-text-muted: #1F2933; --color-accent: #00305F; --color-accent-2: #005A6B; --color-terra: #7A3A12; --shadow-sm: none; --shadow-md: none; }
html[data-contrast="high"] body::before, html[data-contrast="high"] body::after { display: none; }
html[data-contrast="high"] .card, html[data-contrast="high"] .tile, html[data-contrast="high"] .quick-item, html[data-contrast="high"] .news-card, html[data-contrast="high"] .weather { border: 2px solid #1A2A3C; }
html[data-contrast="high"] .hero-photo::before { background: rgba(0, 0, 0, 0.74); }

/* ---------- Bandeau maquette ---------- */
.demo-ribbon { position: relative; background: #0C3659; }
.demo-ribbon strong { color: var(--color-ochre); }

/* ---------- Barre d'accessibilité ---------- */
.a11y-bar { background: rgba(255,255,255,0.9); border-bottom: 1px solid var(--color-border); font-size: 0.88rem; backdrop-filter: blur(6px); }
.a11y-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.45rem 0; }
.a11y-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.a11y-links a { color: var(--color-text-muted); font-weight: 500; position: relative; }
.a11y-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--color-terra); transition: right 0.3s var(--ease); }
.a11y-links a:hover { color: var(--color-text); }
.a11y-links a:hover::after { right: 0; }
.a11y-tools { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.a11y-tools .label { color: var(--color-text-muted); margin-right: 0.3rem; }
.a11y-btn { border: 1px solid var(--color-border); background: #fff; color: var(--color-text); border-radius: 8px; padding: 0.3rem 0.85rem; font-weight: 600; font-size: 0.85rem; min-height: 36px; display: inline-flex; align-items: center; transition: background .25s, border-color .25s, color .25s; }
.a11y-btn:hover { background: var(--color-ochre-soft); border-color: var(--color-ochre); }
.a11y-btn[aria-pressed="true"] { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
@media (max-width: 640px) { .a11y-links { display: none; } .a11y-inner { justify-content: center; } }

/* ---------- En-tête ---------- */
.site-header { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); }
.logo { font-size: 1.3rem; gap: 0.75rem; align-items: center; font-family: var(--font-heading); font-weight: 600; }
.logo > span:last-child { white-space: nowrap; line-height: 1.1; }
.logo small { display: block; font-family: var(--font-body); font-size: 0.8rem; font-weight: 500; color: var(--color-text-muted); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 0.2rem; }
.emblem { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--color-ochre); }
.emblem img { width: 100%; height: 100%; object-fit: cover; }
.nav { gap: 1.7rem; }
.nav a { font-weight: 600; white-space: nowrap; font-size: 0.98rem; position: relative; padding-bottom: 2px; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px; background: var(--color-terra); transition: right 0.3s var(--ease); }
.nav a:hover::after, .nav a.active::after { right: 0; }
.nav a.active, .nav a:hover { color: var(--color-accent); }
.nav a.btn::after { display: none; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); }
.nav a.btn-primary { color: #fff; }
.btn-secondary { border-color: var(--color-accent); color: var(--color-accent); }
.btn-secondary:hover { background: var(--color-accent-2-soft); }
.btn-terra { background: var(--color-terra); color: #fff; box-shadow: var(--shadow-md); }
.btn-terra:hover { background: #A94F1F; transform: translateY(-2px); }
.btn-outline-light { border: 2px solid rgba(255,255,255,0.85); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.14); }
.btn-sm { min-height: 40px; padding: 0.5rem 0.95rem; font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero-mairie { min-height: 620px; display: flex; align-items: center; padding: 4rem 0 5rem; }
.hero-mairie::before { background: var(--hero-overlay); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 3rem; align-items: center; }
.hero-mairie h1 { font-size: clamp(2.3rem, 1.5rem + 3.2vw, 3.9rem); margin-bottom: 0.7rem; font-weight: 600; line-height: 1.05; }
.hero-mairie h1 em { font-style: italic; color: var(--color-ochre); font-weight: 500; }
.hero-mairie .lede { font-size: clamp(1.05rem, 1rem + 0.5vw, 1.25rem); max-width: 560px; margin: 0 0 1.6rem; }
.hero-tag { display: inline-flex; align-items: center; gap: 0.7rem; color: #fff; font-size: 0.9rem; margin-bottom: 1.2rem; font-weight: 500; letter-spacing: 0.02em; }
.hero-tag .emblem { width: 40px; height: 40px; }
.status-pill { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.94); color: var(--color-text); border-radius: 8px; padding: 0.4rem 0.95rem; font-weight: 600; font-size: 0.9rem; margin-bottom: 1rem; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #9AA5B1; flex-shrink: 0; }
.status-pill[data-state="open"] .status-dot { background: var(--color-ok); box-shadow: 0 0 0 4px rgba(31,122,69,0.2); }
.status-pill[data-state="closed"] .status-dot { background: var(--color-ko); }

.search-box { position: relative; max-width: 640px; }
.search-box form { display: flex; background: #fff; border-radius: 8px; padding: 0.4rem 0.4rem 0.4rem 1.3rem; box-shadow: var(--shadow-md); align-items: center; gap: 0.5rem; }
.search-box form > svg { width: 22px; height: 22px; color: var(--color-text-muted); flex-shrink: 0; }
.search-box input { flex: 1; border: 0; background: transparent; font-size: 1.05rem; min-height: 48px; color: var(--color-text); min-width: 0; }
.search-box input:focus { outline: none; }
.search-box button { border-radius: 8px; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 0.5rem); background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-md); text-align: left; z-index: 20; overflow: hidden; display: none; }
.search-results.is-open { display: block; }
.search-results a { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--color-border); color: var(--color-text); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a:focus { background: var(--color-ochre-soft); }
.search-results a .arrow { color: var(--color-terra); font-weight: 700; }
.search-results a small { display: block; color: var(--color-text-muted); font-size: 0.85rem; }
.search-results .empty { padding: 0.9rem 1.1rem; color: var(--color-text-muted); }
.search-hints { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.search-hints span { color: rgba(255,255,255,0.85); font-size: 0.88rem; align-self: center; }
.search-hints button { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.4); color: #fff; border-radius: 8px; padding: 0.35rem 0.85rem; font-size: 0.86rem; font-weight: 500; min-height: 36px; transition: background .25s; }
.search-hints button:hover { background: rgba(255,255,255,0.3); }

/* Encart météo */
.weather { background: rgba(255,255,255,0.94); border-radius: var(--radius-lg); padding: 1.5rem 1.6rem; color: var(--color-text); box-shadow: var(--shadow-md); backdrop-filter: blur(8px); position: relative; overflow: hidden; }
.weather::before { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(217,164,65,0.35), rgba(217,164,65,0) 70%); }
.weather-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.weather-head h2 { font-size: 1.05rem; margin: 0; }
.weather-head time { font-size: 0.8rem; color: var(--color-text-muted); }
.weather-main { display: flex; align-items: center; gap: 1rem; margin: 0.8rem 0 0.6rem; }
.weather-temp { font-family: var(--font-heading); font-size: 3.6rem; line-height: 1; font-weight: 500; }
.weather-temp sup { font-size: 1.4rem; vertical-align: top; margin-left: 0.1rem; }
.weather-desc { font-weight: 600; font-size: 1.05rem; }
.weather-desc small { display: block; font-weight: 400; color: var(--color-text-muted); font-size: 0.85rem; }
.weather-sky { width: 64px; height: 64px; margin-left: auto; flex-shrink: 0; }
.weather-row { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: 0.88rem; color: var(--color-text-muted); border-top: 1px solid var(--color-border); padding-top: 0.8rem; }
.weather-row strong { color: var(--color-text); display: block; font-size: 1rem; }
.weather-foot { font-size: 0.8rem; color: var(--color-text-muted); margin: 0.9rem 0 0; }
.weather.is-loading .weather-temp { opacity: 0.35; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } .weather { max-width: 440px; } }

/* ---------- Accès rapide ---------- */
.quick-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: -2.6rem; position: relative; z-index: 2; }
.quick-item { position: relative; overflow: hidden; display: block; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.1rem 1.25rem 1.2rem; box-shadow: var(--shadow-sm); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.quick-item::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--color-terra), var(--color-ochre)); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.quick-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.quick-item:hover::after { transform: scaleX(1); }
.quick-item small { display: block; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; font-weight: 700; color: var(--color-terra); margin-bottom: 0.3rem; }
.quick-item strong { display: block; font-family: var(--font-heading); font-size: 1.25rem; line-height: 1.2; font-weight: 600; }
.quick-item span { font-size: 0.85rem; color: var(--color-text-muted); }
.quick-item.is-urgent small { color: var(--color-ko); }
@media (max-width: 900px) { .quick-bar { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .quick-bar { grid-template-columns: 1fr; margin-top: 1.5rem; } }

/* ---------- Démarches : cartes photo ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.tile { display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.tile-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-accent-2-soft); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.tile:hover .tile-media img { transform: scale(1.08); }
.tile-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,28,48,0) 55%, rgba(8,28,48,0.35) 100%); opacity: 0; transition: opacity 0.4s; }
.tile:hover .tile-media::after { opacity: 1; }
.tile-body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.tile h3 { font-size: 1.15rem; margin: 0; }
.tile p { color: var(--color-text-muted); font-size: 0.92rem; margin: 0; flex: 1; }
.tile-cta { color: var(--color-accent); font-weight: 600; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.4rem; }
.tile-cta .arrow { color: var(--color-terra); }
.tile-cta { flex-wrap: wrap; }
.tile.is-ext .tile-cta::after { content: "lien externe"; white-space: nowrap; font-size: 0.8rem; font-weight: 600; color: #8A5A00; background: var(--color-ochre-soft); border-radius: 8px; padding: 0.1rem 0.5rem; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }

/* ---------- « Vous êtes… » ---------- */
.profiles { background: var(--color-bg-alt); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.tabs { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2.2rem; }
.tab { border: 2px solid var(--color-border); background: #fff; color: var(--color-text); border-radius: 8px; padding: 0.6rem 1.4rem; font-weight: 600; min-height: 48px; transition: background .3s, border-color .3s, color .3s, transform .3s var(--ease); }
.tab:hover { border-color: var(--color-ochre); transform: translateY(-2px); }
.tab[aria-selected="true"] { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.tabpanel[hidden] { display: none; }
.tabpanel { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; animation: fadeUp 0.5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tabpanel .media-frame { box-shadow: var(--shadow-md); border-radius: var(--radius-lg); }
.tabpanel h3 { font-size: 1.6rem; }
.link-list { display: grid; gap: 0.6rem; margin-top: 1.2rem; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.1rem 0.9rem 1.2rem; background: #fff; border: 1px solid var(--color-border); border-left: 4px solid var(--color-ochre); border-radius: var(--radius-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.link-list a:hover { transform: translateX(6px); box-shadow: var(--shadow-sm); border-left-color: var(--color-terra); }
.link-list a strong { display: block; font-size: 0.98rem; }
.link-list a span { font-size: 0.85rem; color: var(--color-text-muted); }
.link-list a .arrow { color: var(--color-terra); font-weight: 700; flex-shrink: 0; }
@media (max-width: 860px) { .tabpanel { grid-template-columns: 1fr; } .tabpanel .media-frame { order: -1; } }

/* ---------- Actualités & agenda ---------- */
.news-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: start; }
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.news-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.news-media { overflow: hidden; aspect-ratio: 16 / 9; }
.news-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.news-card:hover .news-media img { transform: scale(1.06); }
.news-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.news-card .badge { align-self: flex-start; background: var(--color-terra-soft); color: var(--color-terra); }
.news-card time { font-size: 0.82rem; color: var(--color-text-muted); }
.news-card h3 { font-size: 1.15rem; margin: 0; }
.news-card p { color: var(--color-text-muted); font-size: 0.92rem; margin: 0; flex: 1; }
.news-card.is-featured { grid-column: span 2; flex-direction: row; }
.news-card.is-featured .news-media { width: 50%; aspect-ratio: auto; flex-shrink: 0; }
.news-card.is-featured h3 { font-size: 1.6rem; }
.news-more { display: flex; justify-content: center; margin-top: 1.5rem; }

.agenda { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.4rem; box-shadow: var(--shadow-sm); position: sticky; top: 90px; }
.agenda h3 { font-size: 1.3rem; }
.agenda-item { display: flex; gap: 0.9rem; padding: 0.9rem 0; border-top: 1px solid var(--color-border); align-items: flex-start; transition: transform .3s var(--ease); }
.agenda-item:hover { transform: translateX(4px); }
.agenda-date { flex-shrink: 0; width: 60px; text-align: center; background: var(--color-ochre-soft); border-radius: var(--radius-sm); padding: 0.45rem 0.2rem; line-height: 1.1; }
.agenda-date strong { display: block; font-family: var(--font-heading); font-size: 1.5rem; color: var(--color-terra); font-weight: 600; }
.agenda-date span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); font-weight: 600; }
.agenda-item h4 { font-size: 1rem; margin: 0 0 0.15rem; font-family: var(--font-body); font-weight: 700; }
.agenda-item p { font-size: 0.85rem; color: var(--color-text-muted); margin: 0; }
.agenda-item.is-highlight .agenda-date { background: var(--color-terra); }
.agenda-item.is-highlight .agenda-date strong, .agenda-item.is-highlight .agenda-date span { color: #fff; }
@media (max-width: 960px) { .news-layout { grid-template-columns: 1fr; } .agenda { position: static; } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } .news-card.is-featured { grid-column: span 1; flex-direction: column; } .news-card.is-featured .news-media { width: 100%; aspect-ratio: 16/9; } }

/* ---------- Alerte ---------- */
.alert-band { background: #fff; border: 1px solid var(--color-border); border-left: 5px solid var(--color-terra); border-radius: var(--radius-md); padding: 1rem 1.3rem; margin-bottom: 2rem; box-shadow: var(--shadow-sm); }
.alert-band strong { color: var(--color-terra); }
.alert-band p { margin: 0; font-size: 0.95rem; }
.alert-band a { text-decoration: underline; font-weight: 600; }

/* ---------- Au quotidien : cartes photo ---------- */
.info-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.info-media { aspect-ratio: 16 / 8; overflow: hidden; }
.info-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.info-card:hover .info-media img { transform: scale(1.06); }
.info-body { padding: 1.3rem 1.5rem 1.5rem; }
.info-card h3 { font-size: 1.3rem; }
.info-card ul { display: grid; gap: 0.5rem; margin-top: 0.8rem; }
.info-card li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.95rem; }
.info-card li::before { content: "—"; color: var(--color-ochre); font-weight: 700; flex-shrink: 0; }
.info-card li a { text-decoration: underline; text-decoration-color: rgba(17,73,122,0.3); text-underline-offset: 3px; transition: color .2s; }
.info-card li a:hover { color: var(--color-accent); text-decoration-color: currentColor; }
.risk-level { display: inline-block; background: var(--color-ochre-soft); color: #7A4E0A; border-radius: 8px; padding: 0.25rem 0.8rem; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.3rem; }

/* ---------- La chèvre de Castelmar : bandeau provençal ---------- */
.goat-band { background: linear-gradient(135deg, #FFF6E6 0%, #FBEADF 100%); border: 1px solid rgba(196,99,46,0.18); border-radius: var(--radius-lg); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.goat-band .media { position: relative; min-height: 340px; }
.goat-band .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.goat-band .text { padding: 2.6rem 2.8rem; display: flex; flex-direction: column; justify-content: center; }
.goat-band h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin-bottom: 0.6rem; }
.goat-band h3 em { font-style: italic; color: var(--color-terra); font-weight: 500; }
.goat-band p { color: var(--color-text-muted); }
.goat-band .btn { align-self: flex-start; }
@media (max-width: 860px) { .goat-band { grid-template-columns: 1fr; } .goat-band .media { min-height: 240px; } .goat-band .text { padding: 1.8rem 1.5rem; } }

/* ---------- Découvrir ---------- */
.discover-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-top: 2rem; }
.discover-card { position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 3 / 4; display: flex; align-items: flex-end; color: #fff; box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.discover-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.discover-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.discover-card:hover img { transform: scale(1.08); }
.discover-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,28,48,0) 35%, rgba(8,28,48,0.85) 100%); }
.discover-card div { position: relative; z-index: 1; padding: 1.3rem; transform: translateY(8px); transition: transform .4s var(--ease); }
.discover-card:hover div { transform: none; }
.discover-card h3 { color: #fff; font-size: 1.35rem; margin: 0 0 0.25rem; }
.discover-card p { margin: 0; font-size: 0.88rem; color: rgba(255,255,255,0.88); }
@media (max-width: 900px) { .discover-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .discover-grid { grid-template-columns: 1fr; } .discover-card { aspect-ratio: 16 / 10; } }

/* ---------- Ma mairie ---------- */
.mayor-card { display: grid; grid-template-columns: 150px 1fr; gap: 1.6rem; align-items: center; }
.mayor-photo { width: 150px; aspect-ratio: 4 / 5; border-radius: var(--radius-md); overflow: hidden; background: linear-gradient(160deg, var(--color-accent-2-soft), #fff); border: 1px solid var(--color-border); display: grid; place-items: center; text-align: center; font-size: 0.8rem; color: var(--color-text-muted); padding: 0.6rem; }
.mayor-card h3 { margin: 0 0 0.2rem; font-size: 1.5rem; }
.mayor-card .role { color: var(--color-terra); font-weight: 600; margin-bottom: 0.6rem; }
.mayor-card blockquote { margin: 0; font-family: var(--font-heading); font-style: italic; font-size: 1.05rem; color: var(--color-text); line-height: 1.5; }
.council-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem 1.2rem; margin-top: 1rem; font-size: 0.92rem; }
.council-list li { display: flex; gap: 0.5rem; }
.council-list li span { color: var(--color-terra); min-width: 2.6rem; font-weight: 600; }
@media (max-width: 560px) { .mayor-card { grid-template-columns: 1fr; text-align: center; } .mayor-photo { margin: 0 auto; } .council-list { grid-template-columns: 1fr; } }

/* ---------- Contact & horaires ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.hours-table { width: 100%; border-collapse: collapse; margin-top: 0.8rem; font-size: 0.95rem; }
.hours-table th, .hours-table td { padding: 0.55rem 0.5rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.hours-table th { font-weight: 600; width: 32%; }
.hours-table tr.is-today th, .hours-table tr.is-today td { background: var(--color-ochre-soft); font-weight: 700; }
.hours-table tr.is-today th::after { content: " · aujourd'hui"; font-weight: 500; color: var(--color-terra); font-size: 0.82rem; }
.contact-detail { display: grid; grid-template-columns: 90px 1fr; gap: 0.6rem; margin-top: 0.6rem; align-items: baseline; }
.contact-detail small { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; font-weight: 700; color: var(--color-terra); }
.contact-detail a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.useful { display: grid; gap: 0.45rem; font-size: 0.93rem; margin-top: 0.6rem; }
.useful li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--color-border); padding-bottom: 0.35rem; }
.useful li a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; white-space: nowrap; }
.map-frame { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.map-frame iframe { width: 100%; height: 300px; border: 0; display: block; }
.map-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.9rem; }
.form-grid label { font-weight: 600; font-size: 0.95rem; }
.field { min-height: 48px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Pied de page ---------- */
.site-footer { background: #0C3659; color: rgba(255,255,255,0.85); position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--color-terra), var(--color-ochre), var(--color-accent-2)); }
.site-footer .logo, .site-footer h4 { color: #fff; }
.site-footer .logo small { color: rgba(255,255,255,0.7); }
.site-footer .text-muted { color: rgba(255,255,255,0.72); }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }
.footer-motto { font-family: var(--font-heading); font-style: italic; color: var(--color-ochre); margin-top: 0.8rem; }
.social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.social a { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.12); display: grid; place-items: center; color: #fff; transition: background .25s, transform .25s; }
.social a:hover { background: var(--color-terra); transform: translateY(-2px); }
.social svg { width: 20px; height: 20px; }
.footer-col ul { display: grid; gap: 0.45rem; }

/* ---------- Retour en haut ---------- */
.back-top { position: fixed; right: 1.1rem; bottom: 1.1rem; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--color-accent); color: #fff; box-shadow: var(--shadow-md); display: grid; place-items: center; font-size: 1.4rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 50; transform: translateY(8px); }
.back-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.cookie-banner { bottom: 5.2rem; }

/* ---------- Divers ---------- */
.section-head.center { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.section-alt { background: var(--color-bg-alt); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.placeholder-flag { font-family: var(--font-body); font-style: normal; }

/* =========================================================
   v3 — Version mobile « application »
   Barre de raccourcis fixe en bas, hero et accès rapides
   compactés, marges confortables, aucun débordement latéral.
   ========================================================= */
.hero-grid > * { min-width: 0; }
.appbar { display: none; }

@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .container { padding-left: 1.25rem; padding-right: 1.25rem; }
  .demo-ribbon { position: static; font-size: 0.8rem; }
  .a11y-bar { font-size: 0.8rem; }
  .a11y-inner { padding: 0.3rem 0; }
  .a11y-tools { flex-wrap: nowrap; gap: 0.3rem; }
  .a11y-tools .label { display: none; }
  .a11y-btn { padding: 0.3rem 0.6rem; min-width: 38px; }
  .site-header .header-inner { padding: 0.7rem 0; }
  .logo small { display: none; }

  .hero-mairie { padding: 2rem 0 2.25rem; }
  .hero-grid { gap: 1.5rem; }
  .hero-tag { font-size: 0.8rem; }
  .hero-mairie h1 { font-size: 2.2rem; }
  .hero-mairie .lede { font-size: 1rem; margin-bottom: 1.1rem; }
  .search-box form { padding: 0.3rem 0.3rem 0.3rem 1rem; }
  .search-box input { font-size: 1rem; min-height: 46px; }
  .search-box form .btn { padding: 0.7rem 1rem; font-size: 0.9rem; }
  .search-hints { display: flex; gap: 0.4rem; overflow-x: auto; flex-wrap: nowrap; margin: 0.75rem -1.25rem 0; padding: 0 1.25rem 0.4rem; scrollbar-width: none; }
  .search-hints::-webkit-scrollbar { display: none; }
  .search-hints > * { flex-shrink: 0; }
  .weather { max-width: none; padding: 1.1rem 1.2rem; }
  .weather-row { font-size: 0.82rem; }

  /* accès rapides : carrousel horizontal, les 4 numéros à portée de pouce */
  .quick-bar { display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory; margin: 1rem -1.25rem 0; padding: 0.25rem 1.25rem 0.75rem; scrollbar-width: none; }
  .quick-bar::-webkit-scrollbar { display: none; }
  .quick-item { flex: 0 0 72%; scroll-snap-align: start; }

  .section { padding: 2.5rem 0; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .tile { padding: 0; }
  .tile h3 { font-size: 0.98rem; }
  .tile p { font-size: 0.82rem; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; margin: 0 -1.25rem; padding: 0 1.25rem 0.5rem; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; }
  .news-card.is-featured .news-media { aspect-ratio: 16/10; }
  .discover-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .discover-card { aspect-ratio: 1; }
  .back-top { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .cookie-banner { bottom: calc(84px + env(safe-area-inset-bottom)); }

  /* la barre en bas et la marge pour qu'elle ne masque rien */
  body.has-appbar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .appbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--color-border); padding: 0.45rem 0.4rem calc(0.55rem + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(26, 42, 60, 0.10); }
  .appbar a, .appbar button { font: inherit; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.25rem; font-size: 0.8rem; font-weight: 600; color: var(--color-text-muted); padding: 0.3rem 0.2rem; min-height: 52px; border-radius: 12px; }
  .appbar a:active, .appbar button:active { background: var(--color-accent-2-soft); }
  .appbar .is-active { color: var(--color-accent); }
  .appbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .appbar-main { color: var(--color-accent); }
  .appbar-main-btn { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--color-accent-2), var(--color-accent)); color: #fff; display: grid; place-items: center; margin-top: -26px; box-shadow: 0 8px 20px rgba(17, 73, 122, 0.35), 0 0 0 5px var(--color-bg); }
  .appbar-main-btn svg { width: 26px; height: 26px; }
  .appbar-urgent { color: #B42318; }
  html[data-contrast="high"] .appbar { background: #fff; border-top: 2px solid #1A2A3C; }
}
@media (max-width: 400px) {
  .tiles { grid-template-columns: 1fr; }
  .discover-grid { grid-template-columns: 1fr; }
}

/* Finitions typographiques (passe « studio ») */
.btn { border-radius: 8px; }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }
.nav .btn-primary, .nav .btn-primary:hover { color: #fff; }

/* audit */
.nav a, .topbar a { padding: 0.5rem 0.1rem; }

/* --- Audit mobile 13/10/2026 : cibles tactiles >= 44 px, textes >= 12,8 px --- */

.quick-item small, .contact-detail small, .badge, .agenda-date span { font-size: max(.8rem, 12.8px); }
.a11y-btn { min-height:44px; min-width:44px; }

