/* =========================================================
   Mairie de Néfiach — Feuille de style principale (refonte 2026)
   Charte : Navy #032432 | Gold #FED400 | Sky #17C6FF | Red #DA121A
   Display : Fraunces · Corps : Inter
   ========================================================= */
@import url('fonts.css');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --navy:       #032432;
  --navy-dark:  #011820;
  --navy-light: #0a3a52;
  --gold:       #FED400;
  --gold-dark:  #e0bb00;
  --red:        #DA121A;
  --sky:        #17C6FF;
  --white:      #ffffff;
  --sand:       #F5F3EE;
  --sand-2:     #ECE8DE;
  --border:     #E2DDD0;
  --gray-100:   #F5F3EE;
  --gray-200:   #E8E4DA;
  --gray-400:   #9ca3af;
  --gray-600:   #5A5A6A;
  --gray-800:   #374151;
  --text:       #1a2332;
  --muted:      #5A5A6A;

  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-head:    'Fraunces', 'Playfair Display', Georgia, serif;
  --font-display: var(--font-head);

  --radius:     10px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --pill:       99px;
  --shadow:     0 2px 14px rgba(3,36,50,.08);
  --shadow-lg:  0 18px 44px rgba(3,36,50,.16);

  --header-h:   74px;
  --container:  1240px;
  --transition: 0.25s ease;
  --ease:       cubic-bezier(.22,.61,.36,1);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* ── Utilitaires ───────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* Grille 2 colonnes avec repli mobile */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; gap: 2rem; } }

/* Icône SVG générique (via <use>) */
.ic {
  width: 1.25em; height: 1.25em; flex-shrink: 0;
  stroke: currentColor; stroke-width: 1.75; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -.18em;
}

/* Sur-titre (kicker) */
/* Lien d'évitement (RGAA 12.7) — masqué jusqu'au focus clavier */
.skip-link {
  position: absolute; left: 8px; top: -80px; z-index: 3000;
  background: var(--navy); color: #fff; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius) var(--radius); font-weight: 600;
  text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 0; outline: 3px solid var(--gold); outline-offset: 2px; }

.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-body);
  font-size: .72rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--navy); margin-bottom: 1rem;
}
.kicker::before { content: ''; width: 28px; height: 2px; background: var(--gold); }
.kicker.light { color: var(--gold); }
.kicker.is-center { justify-content: center; }

/* Titres de section */
.section-title,
.h-display {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08; letter-spacing: -.02em; color: var(--navy);
  margin-bottom: 0.5rem;
}
.section-subtitle { color: var(--muted); font-size: 1.05rem; margin-bottom: 2rem; }
.section-header { margin-bottom: 2.8rem; }
.section-header.center { text-align: center; }
.section-header .sep,
.sep {
  display: inline-block; width: 44px; height: 3px;
  background: var(--gold); border-radius: 2px; margin-top: 0.85rem;
}
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap;
}

/* En-tête de section sombre */
.section-navy .section-title,
.section-navy .h-display { color: var(--white); }
.section-navy .section-subtitle { color: rgba(255,255,255,.7); }
.section-navy .kicker { color: var(--gold); }

/* ── Accents bleu ciel (Têt) ───────────────────────────── */
.tag-sky {
  display: inline-flex; align-items: center;
  background: rgba(23,198,255,.12); color: #0a6080;
  border: 1px solid rgba(23,198,255,.35); border-radius: var(--pill);
  padding: .2rem .7rem; font-size: .78rem; font-weight: 600;
}
.icon-sky { color: var(--sky); }
.stat-accent { color: var(--sky); }

/* ── Boutons (pill) ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .82rem 1.55rem; border-radius: var(--pill);
  font-weight: 600; font-size: .95rem;
  transition: .25s var(--ease); border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn .ic { width: 1.1em; height: 1.1em; transition: transform .25s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-2px); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: var(--sand); transform: translateY(-2px); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); transform: translateY(-2px); }
.btn-ghost {
  border-color: rgba(255,255,255,.4); color: #fff;
  background: rgba(255,255,255,.06); backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255,255,255,.16); border-color: #fff; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: #b80e14; transform: translateY(-2px); }

/* Lien fléché */
.btn-line { color: var(--navy); font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
.btn-line .ic { width: 1.1em; height: 1.1em; color: var(--sky); transition: transform .25s var(--ease); }
.btn-line:hover .ic { transform: translateX(4px); }
.section-navy .btn-line { color: #fff; }

/* ── Header (fixe, verre dépoli) ───────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(3,36,50,.34);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), height .3s var(--ease);
  height: var(--header-h);
}
.site-header.scrolled {
  background: rgba(3,36,50,.92);
  box-shadow: 0 1px 0 rgba(255,255,255,.08), 0 6px 24px rgba(0,0,0,.25);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; gap: 1rem;
}
.header-logo { display: flex; align-items: center; gap: .8rem; flex-shrink: 0; }
.header-logo img {
  height: 46px; width: auto;
  filter: brightness(0) invert(1);
  transition: filter var(--transition);
}
.header-logo:hover img { filter: brightness(0) invert(1) sepia(1) saturate(4) hue-rotate(175deg); }
.header-logo-text { line-height: 1.15; }
.header-logo-text .city { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; color: var(--white); }
.header-logo-text .tagline { font-size: .66rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .12em; }

/* Nav principale (méga-menu) */
.main-nav { display: flex; align-items: center; gap: 1.4rem; }
.nav-list { display: flex; align-items: center; gap: .1rem; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem .72rem; border-radius: var(--pill);
  color: rgba(255,255,255,.85); font-size: .9rem; font-weight: 500; font-family: inherit;
  background: none; border: none; cursor: pointer; white-space: nowrap; transition: var(--transition);
}
.nav-link:hover,
.nav-item.is-open > .nav-link,
.nav-link.active,
.nav-link:has(> .nav-link-text.active) { color: #fff; background: rgba(255,255,255,.14); }
.nav-chevron { width: .85em; height: .85em; opacity: .65; transition: transform .25s var(--ease); }
.nav-item.is-open .nav-chevron { transform: rotate(180deg); }

/* Déclencheur scindé (ex. « Vie pratique ») : le texte est un vrai lien,
   la flèche un bouton distinct qui déplie le panneau — nécessaire sur mobile
   où il n'y a pas de survol pour atteindre les liens du sous-menu. */
.nav-link-text { color: inherit; }
.nav-chevron-btn { display: inline-flex; align-items: center; background: none; border: none; padding: 0; color: inherit; cursor: pointer; line-height: 0; }

/* Panneau déroulant */
.nav-panel {
  position: absolute; top: calc(100% + .55rem); left: 0; z-index: 50;
  min-width: 290px; padding: .55rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: .1rem;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
/* pont invisible : garde le survol entre le déclencheur et le panneau */
.nav-item.has-panel > .nav-panel::before {
  content: ''; position: absolute; top: -.6rem; left: 0; right: 0; height: .6rem;
}
.nav-item.has-panel:hover > .nav-panel,
.nav-item.has-panel:focus-within > .nav-panel,
.nav-item.is-open > .nav-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-panel a { display: flex; flex-direction: column; gap: .12rem; padding: .7rem .85rem; border-radius: var(--radius); transition: background .15s; }
.nav-panel a:hover { background: var(--sand); }
.nav-panel .np-t { font-weight: 600; color: var(--navy); font-size: .95rem; }
.nav-panel .np-d { font-size: .8rem; color: var(--muted); line-height: 1.35; }

.nav-actions { display: flex; align-items: center; gap: .6rem; }
.nav-search-m { display: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: #fff; background: rgba(255,255,255,.1); transition: var(--transition);
}
.icon-btn:hover { background: rgba(255,255,255,.22); }
.nav-cta {
  background: var(--gold); color: var(--navy);
  padding: .5rem 1.1rem; border-radius: var(--pill);
  font-weight: 700; white-space: nowrap; transition: var(--transition);
}
.nav-cta:hover { background: var(--gold-dark); }

/* Burger */
.burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; background: none; border: none; padding: 8px;
}
.burger span { display: block; height: 2px; background: var(--white); border-radius: 1px; transition: var(--transition); }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero (image cinématique) ──────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  height: 100svh; min-height: 600px;
  background: var(--navy-dark);
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 26s var(--ease) infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12); } }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(3,36,50,.92) 0%, rgba(3,36,50,.6) 42%, rgba(3,36,50,.15) 75%, transparent 100%),
    linear-gradient(to top, rgba(1,24,32,.85), transparent 38%);
}
.hero-wrap {
  position: relative; z-index: 2; max-width: var(--container);
  margin: 0 auto; padding: 0 1.6rem; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-content { max-width: 700px; animation: rise 1s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.hero-title {
  font-family: var(--font-head); font-weight: 600; color: #fff;
  letter-spacing: -.03em; line-height: .95;
  font-size: clamp(3rem, 7.5vw, 6.4rem); margin-bottom: .4rem;
}
.hero-title em {
  font-style: italic; font-weight: 400; color: var(--gold);
  display: block; font-size: .4em; letter-spacing: 0; margin-top: .7rem;
}
.hero-sub, .hero-lede {
  color: rgba(255,255,255,.85); font-size: clamp(1.05rem,1.6vw,1.3rem);
  max-width: 520px; margin: 1.4rem 0 2.2rem;
}
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; }

/* Barre pratique "glass" en bas du hero */
.hero-bar { position: absolute; bottom: 0; left: 0; right: 0; z-index: 3; background: linear-gradient(to top, rgba(1,24,32,.92), transparent); }
.hero-bar-inner { max-width: var(--container); margin: 0 auto; padding: 1.25rem 1.6rem; display: flex; align-items: center; gap: 2.4rem; flex-wrap: wrap; }
.hero-bar .item { display: flex; align-items: center; gap: .7rem; color: rgba(255,255,255,.9); font-size: .92rem; }
.hero-bar .item .ic { color: var(--sky); width: 1.4em; height: 1.4em; }
.hero-bar .item b { color: #fff; font-weight: 600; }
.hero-bar .alert {
  margin-left: auto; display: flex; align-items: center; gap: .6rem;
  background: rgba(218,18,26,.18); border: 1px solid rgba(218,18,26,.5);
  color: #ffd9da; padding: .5rem 1rem; border-radius: var(--pill);
  font-size: .85rem; font-weight: 600;
}
.hero-bar .alert .ic { color: #ff6b70; width: 1.1em; height: 1.1em; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 0 rgba(23,198,255,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(23,198,255,0); } 100% { box-shadow: 0 0 0 0 rgba(23,198,255,0); } }

/* ── Sections ──────────────────────────────────────────── */
section { padding: 5.5rem 0; }
.section-light,
.section-sand { background: var(--sand); }
.section-navy { background: var(--navy); color: var(--white); }
@media (max-width: 768px) { section { padding: 3.5rem 0; } }

/* ── Reveal au scroll ──────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(32px); transition: .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg img { animation: none; }
  .hero-content { animation: none; }
}

/* ── Bento (accès rapides) ─────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 168px; gap: 1.1rem; }
.tile {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--white); border: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.4rem; transition: .3s var(--ease);
}
.tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.tile .tile-ic {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: var(--gold);
}
.tile .tile-ic .ic { width: 1.5em; height: 1.5em; }
.tile .tile-label {
  font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--navy);
  display: flex; align-items: center; justify-content: space-between;
}
.tile .tile-label .ic { color: var(--sky); width: 1.05em; height: 1.05em; transition: transform .25s var(--ease); }
.tile:hover .tile-label .ic { transform: translateX(5px); }
.tile-gold { background: var(--gold); border-color: var(--gold); }
.tile-gold .tile-ic { background: var(--navy); color: var(--gold); }
.tile-gold .tile-label,
.tile-gold .tile-label .ic { color: var(--navy); }
.tile-photo { grid-column: span 2; grid-row: span 2; padding: 0; border: none; }
.tile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: .6s var(--ease); }
.tile-photo:hover img { transform: scale(1.06); }
.tile-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(3,36,50,.9), transparent 60%); }
.tile-photo .cap { position: relative; z-index: 2; margin-top: auto; padding: 1.8rem; }
.tile-photo .cap .pin {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: .5rem;
}
.tile-photo .cap h3 { font-family: var(--font-head); font-weight: 600; color: #fff; font-size: 1.8rem; line-height: 1.1; }
.tile-photo .cap p { color: rgba(255,255,255,.8); font-size: .95rem; margin-top: .4rem; max-width: 340px; }

/* ── Cards (actualités) ────────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.8rem; }
.card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); transition: .3s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); border-color: var(--navy); box-shadow: var(--shadow-lg); }
.card-img { aspect-ratio: 3/2; overflow: hidden; background: var(--gray-200); position: relative; display: block; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: .6s var(--ease); }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-category {
  display: inline-flex; align-self: flex-start; align-items: center;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--navy); background: rgba(23,198,255,.14);
  padding: .28rem .7rem; border-radius: var(--pill); margin-bottom: .8rem;
}
.card-title { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; color: var(--navy); margin-bottom: .55rem; line-height: 1.22; }
.card-title a { color: inherit; }
.card-title a:hover { color: var(--navy-light); }
.card-excerpt { color: var(--muted); font-size: .92rem; margin-bottom: 1.1rem; flex: 1; }
.card-meta { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .82rem; }
.card-meta .ic { color: var(--sky); width: 1em; height: 1em; }
.card-link { color: var(--navy); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .35rem; }
.card-link .ic { color: var(--sky); width: 1em; height: 1em; transition: transform .25s var(--ease); }
.card-link:hover { color: var(--navy-light); }
.card-link:hover .ic { transform: translateX(4px); }

/* ── Agenda (événements) ───────────────────────────────── */
.agenda-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3.5rem; align-items: center; }
.agenda-intro p { color: rgba(255,255,255,.7); font-size: 1.05rem; margin: 1.1rem 0 2rem; max-width: 380px; }
@media (max-width: 900px) { .agenda-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
.events-list { display: flex; flex-direction: column; gap: 1rem; }
.event-item {
  display: grid; grid-template-columns: 72px 1fr;
  align-items: center; gap: 1.4rem;
  background: var(--white); border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem; border: 1px solid var(--border);
  transition: .3s var(--ease);
}
.event-item:hover { transform: translateX(5px); border-color: var(--navy); box-shadow: var(--shadow); }
.event-date-box { text-align: center; background: var(--gold); color: var(--navy); border-radius: 12px; padding: .55rem 0; }
.event-date-box .day { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; line-height: .9; }
.event-date-box .month { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: .25rem; }
.event-title { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; color: var(--navy); margin-bottom: .3rem; }
.event-meta { display: flex; align-items: center; gap: 1.1rem; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.event-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.event-meta .ic { color: var(--sky); width: 1em; height: 1em; }

/* Variante sombre (agenda sur fond navy) */
.section-navy .event-item { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
.section-navy .event-item:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); }
.section-navy .event-title { color: #fff; }
.section-navy .event-meta { color: rgba(255,255,255,.62); }

/* ── Stats / chiffres ──────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2.5rem; text-align: center; }
.stat .num { font-family: var(--font-head); font-weight: 600; font-size: clamp(2.6rem, 5vw, 3.8rem); color: var(--navy); line-height: 1; }
.stat .num span { color: var(--gold); }
.stat .lbl { color: var(--muted); font-size: .92rem; margin-top: .5rem; }
.stat .rule { width: 34px; height: 3px; background: var(--gold); margin: 1rem auto 0; border-radius: 2px; }

/* ── Split (photo + panneau) ───────────────────────────── */
.split { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 540px; }
.split-img { position: relative; overflow: hidden; }
.split-img img { width: 100%; height: 100%; object-fit: cover; }
.split-img .float {
  position: absolute; bottom: 2rem; left: 2rem;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-radius: 16px; padding: 1.1rem 1.4rem;
  display: flex; align-items: center; gap: .9rem; max-width: 290px;
}
.split-img .float .ic { color: var(--red); width: 2em; height: 2em; }
.split-img .float b { display: block; font-family: var(--font-head); color: var(--navy); font-size: 1.05rem; }
.split-img .float small { color: var(--muted); font-size: .82rem; }
.split-txt { background: var(--navy); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: clamp(2.5rem, 5vw, 4.5rem); }
.split-txt .h-display, .split-txt .section-title { color: #fff; }
.split-txt p { color: rgba(255,255,255,.78); font-size: 1.05rem; margin: 1rem 0 2rem; }

/* ── Quick links (legacy, fond navy) ───────────────────── */
.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.quick-link {
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  padding: 1.6rem 1rem; background: rgba(255,255,255,.06);
  border-radius: var(--radius-lg); text-align: center; color: var(--white);
  transition: var(--transition); border: 1px solid rgba(255,255,255,.12);
}
.quick-link:hover { background: rgba(255,255,255,.13); transform: translateY(-3px); border-color: var(--sky); }
.quick-link .ic { width: 1.8rem; height: 1.8rem; color: var(--sky); }
.quick-link span:last-child { font-size: .9rem; font-weight: 500; }

/* ── Contact ───────────────────────────────────────────── */
.contact-info-box { background: var(--navy); color: var(--white); border-radius: var(--radius-lg); padding: 2rem; }
.contact-info-box h2,
.contact-info-box h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.4rem; margin-bottom: 1.25rem; color: var(--gold); }
.contact-row { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1rem; font-size: .95rem; }
.contact-row .ico, .contact-row .ic { font-size: 1.1rem; color: var(--sky); flex-shrink: 0; margin-top: .1rem; width: 1.2em; height: 1.2em; }

/* ── Formulaires ───────────────────────────────────────── */
.contact-form { max-width: 640px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; color: var(--navy); font-size: .9rem; }
.form-control {
  width: 100%; padding: .8rem 1rem;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  font-family: var(--font-body); font-size: .95rem; color: var(--text);
  background: var(--white); transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(3,36,50,.35); }
textarea.form-control { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ── Footer ────────────────────────────────────────────── */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.74); padding: 4.5rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-col h4,
.footer-col .footer-title { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--white); margin-bottom: 1.1rem; }
.footer-col ul li { margin-bottom: .6rem; }
.footer-col ul li a { color: rgba(255,255,255,.72); font-size: .9rem; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--gold); }
.footer-col p { font-size: .9rem; line-height: 1.8; }
.footer-col p .ic { color: var(--sky); width: 1.1em; height: 1.1em; }
.footer-col .logo-text { font-family: var(--font-head); font-weight: 600; font-size: 1.5rem; color: var(--white); margin-bottom: .5rem; }
.footer-col .social-links { display: flex; gap: .7rem; margin-top: 1.3rem; }
.footer-col .social-links a {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center;
  color: var(--white); transition: .25s var(--ease);
}
.footer-col .social-links a .ic { width: 1.15em; height: 1.15em; }
.footer-col .social-links a:hover { background: var(--gold); color: var(--navy); transform: translateY(-3px); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.5rem 0; font-size: .82rem; color: rgba(255,255,255,.45); }
.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: var(--gold); }

/* ── Cookie banner ─────────────────────────────────────── */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; background: var(--navy-dark); color: var(--white); padding: 1rem 0; box-shadow: 0 -4px 20px rgba(0,0,0,.3); display: none; }
.cookie-banner.visible { display: block; }
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cookie-text { font-size: .88rem; flex: 1; min-width: 200px; }
.cookie-text a { color: var(--gold); }
.cookie-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.btn-cookie-accept { background: var(--gold); color: var(--navy); font-weight: 700; padding: .6rem 1.2rem; border-radius: var(--pill); border: none; }
.btn-cookie-refuse { background: transparent; color: rgba(255,255,255,.7); padding: .6rem 1rem; border-radius: var(--pill); border: 1px solid rgba(255,255,255,.25); }

/* ── Flash ─────────────────────────────────────────────── */
.flash { padding: .9rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-weight: 500; }
.flash-success { background: #d1fae5; color: #065f46; }
.flash-error   { background: #fee2e2; color: #991b1b; }
.flash-info    { background: #dbeafe; color: #1e40af; }
.flash-warning { background: #fef3c7; color: #92400e; }

/* ── Page intérieure (bandeau) ─────────────────────────── */
.page-hero { background: var(--navy); padding: calc(var(--header-h) + 2.8rem) 0 2.6rem; color: var(--white); }
.page-hero h1 { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.9rem,4vw,3rem); letter-spacing: -.02em; margin-bottom: .5rem; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.6); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: rgba(255,255,255,.6); }
.breadcrumb a:hover { color: var(--gold); }

/* ── Prose ─────────────────────────────────────────────── */
.prose h2 { font-family: var(--font-head); font-weight: 600; font-size: 1.6rem; color: var(--navy); margin: 1.9rem 0 .75rem; letter-spacing: -.01em; }
.prose h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--navy); margin: 1.5rem 0 .6rem; }
.prose p { margin-bottom: 1rem; line-height: 1.78; }
.prose ul, .prose ol { margin: 1rem 0 1rem 1.5rem; }
.prose ul li, .prose ol li { margin-bottom: .35rem; }
.prose a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--navy-light); }

/* Zone de téléchargement de documents (décisions municipales…) */
.doc-dl { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: var(--radius-lg); padding: 1rem 1.25rem; margin-bottom: .75rem; text-decoration: none; transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease); }
a.doc-dl:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-left-color: var(--navy); }
a.doc-dl:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.doc-dl--nofile { opacity: .7; }
.doc-dl-ic { position: relative; flex-shrink: 0; width: 42px; height: 50px; display: flex; align-items: center; justify-content: center; }
.doc-dl-ic .ic { width: 2.3rem; height: 2.3rem; color: var(--navy); }
.doc-dl-tag { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); font-size: .5rem; line-height: 1; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--red); border-radius: 2px; padding: 2px 3px; }
.doc-dl-body { flex: 1; min-width: 0; }
.doc-dl-title { display: block; font-weight: 600; color: var(--navy); }
.doc-dl-meta { display: block; font-size: .84rem; color: var(--muted); margin-top: .15rem; }
.doc-dl-arrow { flex-shrink: 0; }
.doc-dl-arrow .ic { width: 1.4rem; height: 1.4rem; color: var(--sky); }
a.doc-dl:hover .doc-dl-arrow .ic { color: var(--navy); }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }

/* ── Séances en accordéon (décisions / comptes-rendus) ─── */
.seance { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 1rem; overflow: hidden; box-shadow: var(--shadow-sm); }
.seance[open] { box-shadow: var(--shadow-md); }
.seance > .seance-head { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .9rem; padding: 1rem 1.25rem; background: var(--navy); color: #fff; transition: background .15s var(--ease); }
.seance > .seance-head::-webkit-details-marker { display: none; }
.seance > .seance-head:hover { background: var(--navy-light); }
.seance > .seance-head:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.seance-head-ic { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; }
.seance-head-ic .ic { width: 1.4rem; height: 1.4rem; color: var(--gold); }
.seance-head-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.seance-head-title { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.seance-head-sub { font-size: .82rem; color: rgba(255,255,255,.72); margin-top: .15rem; }
.seance-chevron { flex-shrink: 0; width: 1.15rem; height: 1.15rem; color: var(--gold); transition: transform .2s var(--ease); }
.seance[open] .seance-chevron { transform: rotate(90deg); }
.seance-body { padding: 1rem 1.25rem 1.1rem; }
/* Compte-rendu mis en avant */
.doc-dl-cr { border-left: 4px solid var(--navy); background: #faf7ee; }
.doc-dl-cr .doc-dl-tag { background: var(--navy); }
.doc-dl-cr .doc-dl-title { color: var(--navy); }
a.doc-dl-cr:hover { border-left-color: var(--gold-dark); }
/* Délibérations indentées sous le compte-rendu */
.seance-delibs { margin: .7rem 0 0 .5rem; padding-left: 1.1rem; border-left: 2px solid var(--sand-2); }
@media (max-width: 600px) { .seance-delibs { padding-left: .6rem; margin-left: .2rem; } .seance-head-ic { width: 34px; height: 34px; } }

/* ── Pagination ────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 2.8rem; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--pill);
  font-weight: 600; font-size: .9rem;
  border: 1.5px solid var(--border); color: var(--navy); transition: var(--transition);
}
.pagination a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pagination .current { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ── Bannière info ─────────────────────────────────────── */
.info-banner { background: var(--gold); color: var(--navy); padding: .75rem 0; text-align: center; font-weight: 600; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-photo { grid-column: span 2; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 1240px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.8rem; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
  .hero-bar-inner { gap: 1.2rem; }
  .hero-bar .alert { margin-left: 0; }
}
/* Hero mobile : la barre pratique (horaires/tél/alerte) passe dans le flux
   au lieu d'être en position absolue, pour ne plus chevaucher les boutons
   quand le contenu est haut (titre + accroche + texte horaires rallongé). */
@media (max-width: 768px) {
  .hero { height: auto; min-height: 100svh; display: flex; flex-direction: column; }
  .hero-wrap { height: auto; flex: 1 1 auto; padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .hero-bar { position: static; }
}

/* ── Nav mobile / tablette : burger + méga-menu en accordéon ── */
@media (max-width: 1024px) {
  .burger { display: flex; }
  /* Header solide : sans backdrop-filter (sinon il devient le bloc conteneur
     du menu position:fixed et le piège dans la barre). */
  .site-header,
  .site-header.scrolled {
    background: var(--navy);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    z-index: 10000;
  }
  .main-nav {
    position: fixed; top: var(--header-h); right: 0; bottom: 0; left: 0;
    background: var(--navy-dark);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: .75rem 1.25rem 2.5rem; gap: 0;
    transform: translateX(100%); transition: transform .32s var(--ease);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .main-nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav-item { position: static; }
  .nav-link {
    width: 100%; justify-content: space-between;
    padding: 1.05rem .25rem; font-size: 1.1rem; color: #fff;
    border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.09);
  }
  .nav-link:hover,
  .nav-item.is-open > .nav-link,
  .nav-link.active,
  .nav-link:has(> .nav-link-text.active) { background: transparent; color: var(--gold); }
  .nav-chevron { width: 1.1em; height: 1.1em; opacity: .9; }
  .nav-link-text { flex: 1; }
  .nav-chevron-btn { padding: .8rem .25rem; margin: -.8rem -.25rem -.8rem .5rem; }

  /* Accordéon : panneau inline replié, ouvert seulement via .is-open (clic).
     On NE remet PAS max-height:0 sur :hover/:focus-within : ces sélecteurs ont
     une spécificité (0,4,0) supérieure à .is-open (0,3,0), donc au tap le bouton
     prend le focus → :focus-within forçait le panneau à rester fermé. */
  .nav-panel {
    position: static; min-width: 0; display: block;
    background: transparent; border: none; border-radius: 0; box-shadow: none; padding: 0 0 .4rem;
    opacity: 1; visibility: visible; transform: none;
    max-height: 0; overflow: hidden; transition: max-height .32s var(--ease);
  }
  .nav-item.is-open > .nav-panel { max-height: 520px; }
  .nav-panel a { padding: .7rem .75rem; border-radius: 0; }
  .nav-panel a:hover { background: rgba(255,255,255,.05); }
  .nav-panel .np-t { color: #fff; font-weight: 500; font-size: .98rem; }
  .nav-panel .np-d { color: rgba(255,255,255,.5); }

  .nav-actions { flex-direction: column; align-items: stretch; gap: 0; margin-top: .4rem; }
  .icon-btn { display: none; }
  .nav-search-m {
    display: block; padding: 1.05rem .25rem; font-size: 1.1rem; color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.09);
  }
  .nav-search-m:hover { color: var(--gold); }
  .nav-cta {
    margin-top: 1.4rem; padding: 1rem; text-align: center;
    font-size: 1.05rem; color: var(--navy);
  }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; }
  .event-item { grid-template-columns: 60px 1fr; }
}

/* ── Édition in-place (admin) ───────────────────────────── */
body:has(#nf-adminbar) { padding-bottom: 60px; }
.nf-adminbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 12000;
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding: .55rem 1rem; background: var(--navy-dark); color: #fff;
  box-shadow: 0 -4px 20px rgba(0,0,0,.35); font-size: .9rem;
}
.nf-ab-brand { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--gold); }
.nf-ab-brand .ic { width: 1.1em; height: 1.1em; }
.nf-ab-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .9rem; border-radius: var(--pill);
  border: 1px solid rgba(255,255,255,.22); color: #fff; background: rgba(255,255,255,.06);
  font-size: .85rem; font-weight: 500; transition: var(--transition); cursor: pointer;
}
.nf-ab-btn .ic { width: 1em; height: 1em; }
.nf-ab-btn:hover { background: rgba(255,255,255,.16); }
.nf-ab-primary { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 700; }
.nf-ab-primary:hover { background: var(--gold-dark); }
body.nf-edit .nf-ab-primary { background: var(--success); border-color: var(--success); color: #fff; }
.nf-ab-hint { color: rgba(255,255,255,.7); font-size: .82rem; margin-left: .25rem; }

/* Surbrillance des éléments éditables en mode édition */
body.nf-edit .nf-editable {
  outline: 2px dashed rgba(254,212,0,.8); outline-offset: 3px;
  border-radius: 3px; cursor: text; transition: background .15s;
}
body.nf-edit .nf-editable:hover { background: rgba(254,212,0,.10); }
body.nf-edit .nf-editable:focus { outline: 2px solid var(--gold); background: rgba(254,212,0,.06); }
body.nf-edit .nf-editable-img {
  outline: 3px dashed var(--sky); outline-offset: -3px; cursor: pointer;
}
body.nf-edit .nf-editable-img:hover { filter: brightness(.8); }
/* Petit badge "remplacer" au survol des images en mode édition */
body.nf-edit .nf-img-wrap { position: relative; }

/* Boutons affichables / masquables en mode édition front */
.nf-btn-hidden { display: none !important; }                 /* masqué : invisible (public ET admin hors édition) */
body.nf-edit .nf-btn-hidden {                                 /* en édition : visible mais grisé pour pouvoir le réafficher */
  display: inline-flex !important; opacity: .45;
  outline: 2px dashed var(--red); outline-offset: 3px;
}
.nf-btnvis {                                                  /* pastille de bascule ajoutée en édition */
  display: inline-flex; align-items: center; gap: .25rem; vertical-align: middle; margin-left: .45rem;
  border: 1px solid #b7e0c4; border-radius: 999px; padding: .2rem .6rem;
  font-size: .72rem; font-weight: 700; line-height: 1;
  background: #e7f6ec; color: #1a7f42; cursor: pointer; white-space: nowrap;
}
.nf-btnvis.is-off { background: #fde8e8; color: #b3261e; border-color: #f3b4b4; }

.nf-toast {
  position: fixed; bottom: 72px; left: 50%; transform: translateX(-50%);
  z-index: 12001; background: var(--navy); color: #fff;
  padding: .7rem 1.2rem; border-radius: var(--pill); font-size: .9rem; font-weight: 500;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.15);
}
.nf-toast.err { background: var(--error); }
.nf-toast.ok  { background: var(--success); }

/* ── Barre de mise en forme (WYSIWYG in-place) ─────────── */
.nf-wz {
  position: fixed; z-index: 12500;
  display: flex; align-items: center; gap: .25rem;
  padding: .3rem .4rem; background: var(--navy-dark);
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--pill);
  box-shadow: var(--shadow-lg);
}
.nf-wz[hidden] { display: none; }
.nf-wz-b, .nf-wz-c {
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: .95rem; line-height: 1; transition: .15s; padding: 0;
}
.nf-wz-b { background: rgba(255,255,255,.08); font-family: var(--font-head); }
.nf-wz-b:hover { background: rgba(255,255,255,.22); }
.nf-wz-b.is-active { background: var(--gold); color: var(--navy); }
.nf-wz-b .ic { width: 1.05em; height: 1.05em; }
.nf-wz-sep { width: 1px; height: 20px; background: rgba(255,255,255,.2); margin: 0 .15rem; }
.nf-wz-c { border: 2px solid rgba(255,255,255,.45); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.nf-wz-c:hover { transform: scale(1.14); }

/* Listes à puces créées via l'éditeur (le reset global masque les puces) */
.nf-list { list-style: disc outside; padding-left: 1.3rem; margin: .5rem 0 .8rem; }
ol.nf-list { list-style: decimal outside; }
.nf-list li { margin-bottom: .3rem; }

/* ── Informations & alertes de la commune ─────────────────
   Annonces PanneauPocket extraites côté serveur et rendues nativement
   (voir app/services/panneaupocket.php) : pleine largeur, charte du site. */
.section-pp { background: var(--white); }

/* ── Carrousel d'annonces (diaporama) ─────────────────────
   1 bandeau plein-largeur visible, défilement auto 6 s, pause au
   survol/focus + bouton lecture/pause, respecte prefers-reduced-motion. */
.pp-carousel { position: relative; }
.pp-viewport {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--white);
}
.pp-track { display: flex; align-items: stretch; }
.pp-carousel.is-ready .pp-track { transition: transform .7s var(--ease); }

.pp-banner {
  flex: 0 0 100%; min-width: 0;
  display: grid; grid-template-columns: 42% 1fr; align-items: stretch;
  background: var(--white);
}
.pp-banner.no-img { grid-template-columns: 1fr; }
.pp-banner.is-alert { box-shadow: inset 5px 0 0 var(--red); }

.pp-banner-media { position: relative; min-height: 300px; overflow: hidden; background: var(--sand-2); }
.pp-banner-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Ken Burns lent sur la diapo active */
.pp-carousel.is-ready .pp-banner-media img { transform: scale(1.001); transition: transform 7s var(--ease); }
.pp-carousel.is-ready .pp-banner.is-active .pp-banner-media img { transform: scale(1.09); }

.pp-banner-body {
  padding: 2.2rem 2.6rem; display: flex; flex-direction: column; justify-content: center;
}
.pp-banner.no-img .pp-banner-body { max-width: 860px; margin: 0 auto; width: 100%; }

.pp-card-meta {
  display: flex; align-items: center; gap: .9rem; margin-bottom: .9rem;
}
.pp-type {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--navy); background: rgba(23,198,255,.14);
  padding: .26rem .7rem; border-radius: var(--pill);
}
.pp-banner.is-alert .pp-type { background: rgba(218,18,26,.12); color: var(--red); }
.pp-card-meta time { font-size: .82rem; color: var(--muted); white-space: nowrap; }

.pp-banner-title {
  font-family: var(--font-head); font-weight: 600; font-size: 1.5rem;
  line-height: 1.2; color: var(--navy); margin-bottom: .7rem; overflow-wrap: anywhere;
}
.pp-card-body {
  font-size: .95rem; line-height: 1.75; color: var(--text); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden;
}
.pp-card-body p { margin-bottom: .6rem; }
.pp-card-body p:last-child { margin-bottom: 0; }
.pp-card-body a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }

/* Entrée animée du contenu de la diapo active (stagger) */
.pp-carousel.is-ready .pp-banner-body > * { opacity: 0; transform: translateY(16px); }
.pp-carousel.is-ready .pp-banner.is-active .pp-banner-body > * {
  opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.pp-carousel.is-ready .pp-banner.is-active .pp-banner-body > *:nth-child(1) { transition-delay: .12s; }
.pp-carousel.is-ready .pp-banner.is-active .pp-banner-body > *:nth-child(2) { transition-delay: .22s; }
.pp-carousel.is-ready .pp-banner.is-active .pp-banner-body > *:nth-child(3) { transition-delay: .32s; }

/* Flèches */
.pp-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 1px solid var(--border); color: var(--navy);
  box-shadow: var(--shadow); transition: var(--transition);
}
.pp-arrow:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pp-arrow:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.pp-arrow .ic { width: 1.2em; height: 1.2em; }
.pp-prev { left: -14px; }
.pp-next { right: -14px; }

/* Barre de progression (bas du cadre, en retrait des coins arrondis) */
.pp-bar {
  position: absolute; left: 1.2rem; right: 1.2rem; bottom: .85rem; height: 4px; z-index: 5;
  background: rgba(3,36,50,.16); border-radius: var(--pill); overflow: hidden;
}
.pp-bar-fill {
  display: block; height: 100%; width: 100%; background: var(--gold);
  border-radius: var(--pill); transform: scaleX(0); transform-origin: left;
}
@keyframes pp-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Contrôles bas : puces + lecture/pause */
.pp-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.4rem; }
.pp-dots { display: flex; align-items: center; gap: .5rem; }
.pp-dots button {
  width: 9px; height: 9px; border-radius: 50%; padding: 0; border: none;
  background: var(--border); transition: var(--transition);
}
.pp-dots button:hover { background: var(--muted); }
.pp-dots button.active { background: var(--navy); width: 26px; border-radius: 5px; }
.pp-dots button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.pp-toggle {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--white); color: var(--navy); display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.pp-toggle:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pp-toggle:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.pp-toggle .ic { width: 1em; height: 1em; }
.pp-toggle .pp-ic-play { display: none; }
.pp-carousel.is-paused .pp-toggle .pp-ic-pause { display: none; }
.pp-carousel.is-paused .pp-toggle .pp-ic-play { display: block; }

/* Tablette : image un peu plus étroite */
@media (max-width: 900px) {
  .pp-banner { grid-template-columns: 38% 1fr; }
  .pp-banner-body { padding: 1.8rem 1.9rem; }
  .pp-banner-title { font-size: 1.3rem; }
  .pp-prev { left: 8px; } .pp-next { right: 8px; }
}
/* Mobile : image au-dessus, texte dessous */
@media (max-width: 640px) {
  .pp-banner, .pp-banner.no-img { grid-template-columns: 1fr; }
  .pp-banner-media { min-height: 200px; }
  .pp-banner-body { padding: 1.5rem 1.4rem; }
  .pp-card-body { -webkit-line-clamp: 4; }
}

/* Accessibilité : pas de mouvement automatique */
@media (prefers-reduced-motion: reduce) {
  .pp-carousel.is-ready .pp-track { transition: none; }
  .pp-carousel.is-ready .pp-banner-body > * { opacity: 1; transform: none; }
  .pp-carousel.is-ready .pp-banner-media img,
  .pp-carousel.is-ready .pp-banner.is-active .pp-banner-media img { transition: none; transform: none; }
  .pp-bar { display: none; }
}

/* Repli (widget officiel) si l'extraction est indisponible */
.pp-embed { display: flex; justify-content: center; }
.pp-embed iframe { display: block; width: 340px; max-width: 100%; height: 600px; border: 0; }

/* ── Composants pages intérieures ──────────────────────── */
/* Hero image (intérieur) */
.subhero { position: relative; min-height: 54vh; display: flex; align-items: flex-end; overflow: hidden; background: var(--navy-dark); }
.subhero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.subhero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(1,24,32,.92), rgba(3,36,50,.3) 55%, rgba(3,36,50,.5)); }
.subhero .inner { position: relative; z-index: 2; width: 100%; max-width: var(--container); margin: 0 auto; padding: calc(var(--header-h) + 2rem) 1.6rem 2.8rem; color: #fff; }
.subhero h1 { font-family: var(--font-head); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.02em; line-height: 1.05; margin: .35rem 0 .5rem; }
.subhero .lede { color: rgba(255,255,255,.88); font-size: clamp(1rem,1.4vw,1.2rem); max-width: 580px; }
.subhero .breadcrumb { margin-top: 1rem; }

/* Bloc 2 colonnes texte + image */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.feature .feature-img { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.feature .feature-img img { width: 100%; height: 100%; object-fit: cover; }
.feature.reverse .feature-text { order: 2; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 2rem; } .feature.reverse .feature-text { order: 0; } }

/* ── Fête à la une (traditions) ────────────────────────── */
.tradition-feature {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  min-height: 360px; display: flex; align-items: center;
  margin-bottom: 2.6rem; box-shadow: var(--shadow-lg); background: var(--navy-dark);
}
.tradition-feature > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tradition-feature::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(95deg, rgba(3,36,50,.95) 0%, rgba(3,36,50,.82) 42%, rgba(3,36,50,.35) 100%);
}
.tf-inner { position: relative; z-index: 2; padding: 2.6rem clamp(1.6rem, 4vw, 3.4rem); max-width: 620px; }
.tf-inner h3 { font-family: var(--font-head); font-weight: 600; color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.1; margin: .35rem 0 .7rem; }
.tf-inner p { color: rgba(255,255,255,.9); font-size: 1.05rem; line-height: 1.65; margin-bottom: 1.5rem; }
@media (max-width: 640px) {
  .tradition-feature::after { background: linear-gradient(to top, rgba(1,24,32,.95) 10%, rgba(3,36,50,.6)); }
  .tf-inner { padding: 2rem 1.5rem; }
}

/* ── Fiches patrimoine (cartes image + texte) ──────────── */
.heritage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.8rem; }
@media (max-width: 760px) { .heritage-grid { grid-template-columns: 1fr; } }
.heritage-grid .card-img { aspect-ratio: 16/10; }
.heritage-grid .card-title { margin-bottom: .6rem; }
.heritage-grid .card-body .prose p { font-size: .93rem; line-height: 1.7; margin-bottom: 0; }

/* ── Histoire ──────────────────────────────────────────── */
.prose-lead p { font-size: 1.15rem; line-height: 1.75; color: var(--text); }
/* Encart « clin d'œil » historique */
.hist-note {
  display: flex; gap: .9rem; align-items: flex-start;
  background: rgba(254,212,0,.12); border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1.6rem 0 0;
  font-style: italic; color: var(--text);
}
.hist-note > .ic { color: var(--red); flex-shrink: 0; width: 1.4em; height: 1.4em; margin-top: .15rem; }
.hist-note p { margin: 0; }
/* Frise chronologique */
.timeline { max-width: 760px; margin: 0 auto; position: relative; }
.timeline::before { content: ''; position: absolute; top: .5rem; bottom: .5rem; left: 118px; width: 2px; background: rgba(255,255,255,.18); }
.tl-item { position: relative; display: grid; grid-template-columns: 104px 1fr; gap: 2rem; padding: .55rem 0; align-items: baseline; }
.tl-year { font-family: var(--font-head); font-weight: 700; color: var(--gold); text-align: right; font-size: 1.02rem; white-space: nowrap; }
.tl-dot { position: absolute; left: 112px; top: .95rem; width: 13px; height: 13px; border-radius: 50%; background: var(--gold); border: 3px solid var(--navy); box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.tl-event { color: rgba(255,255,255,.86); line-height: 1.5; }
@media (max-width: 560px) {
  .timeline::before { left: 7px; }
  .tl-item { grid-template-columns: 1fr; gap: .1rem; padding-left: 1.8rem; }
  .tl-year { text-align: left; }
  .tl-dot { left: 1px; top: .55rem; }
}

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.gallery .g-item { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; background: var(--gray-200); }
.gallery .g-item img { width: 100%; height: 100%; object-fit: cover; transition: .5s var(--ease); }
.gallery .g-item:hover img { transform: scale(1.05); }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; } }

/* ── Vie pratique ──────────────────────────────────────── */
/* Sommaire d'ancres (pastilles) */
.anchor-nav { display: flex; flex-wrap: wrap; gap: .6rem; }
.anchor-nav a {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.05rem; border-radius: var(--pill);
  background: var(--white); border: 1.5px solid var(--border);
  color: var(--navy); font-weight: 600; font-size: .88rem; transition: var(--transition);
}
.anchor-nav a .ic { color: var(--sky); width: 1.1em; height: 1.1em; }
.anchor-nav a:hover { border-color: var(--navy); background: var(--navy); color: var(--white); }
.anchor-nav a:hover .ic { color: var(--gold); }

/* Grille de numéros (urgences) */
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.num-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1rem 1.2rem; transition: var(--transition);
}
a.num-card:hover { border-color: var(--navy); box-shadow: var(--shadow); transform: translateY(-2px); }
.num-card .num-badge {
  flex-shrink: 0; min-width: 58px; height: 46px; padding: 0 .6rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: var(--gold); border-radius: 12px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
}
.num-card.urgent .num-badge { background: var(--red); color: var(--white); }
.num-card b { display: block; color: var(--navy); font-size: .93rem; line-height: 1.3; }
.num-card small { color: var(--muted); font-size: .8rem; line-height: 1.4; }

/* ── Recherche ─────────────────────────────────────────── */
.main-nav .nav-search-mobile { display: none; }
.search-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.search-form input { flex: 1; min-width: 220px; }
.search-hit {
  display: block; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: .75rem;
  transition: var(--transition);
}
.search-hit:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.search-hit:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* Fiches démarches dépliables (page Mairie) */
.dem-item {
  background: var(--sand); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition);
}
.dem-item[open] { border-color: var(--navy); background: var(--white); }
.dem-item summary {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem; cursor: pointer; list-style: none;
}
.dem-item summary::-webkit-details-marker { display: none; }
.dem-item summary:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; border-radius: var(--radius); }
.dem-item .dem-ic {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
}
.dem-item .dem-head { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dem-item .dem-title { font-weight: 600; color: var(--navy); }
.dem-item .dem-desc { font-size: .88rem; color: var(--muted); }
.dem-item .dem-chevron {
  flex-shrink: 0; color: var(--sky); width: 1.1em; height: 1.1em;
  transform: rotate(90deg); transition: transform .25s var(--ease);
}
.dem-item[open] .dem-chevron { transform: rotate(-90deg); }
.dem-item .dem-fiche { padding: 1rem 1.15rem 1.2rem; border-top: 1px dashed var(--border); }
.dem-item .dem-fiche .prose p { font-size: .92rem; margin-bottom: .6rem; }
.dem-item .dem-fiche .prose p:last-child { margin-bottom: 0; }

/* Encart « information à faire valider par la mairie » */
.note-valider {
  display: flex; gap: .85rem; align-items: flex-start;
  background: rgba(254,212,0,.10); border: 1.5px dashed var(--gold-dark);
  border-radius: var(--radius); padding: .9rem 1.1rem; margin-top: 1.25rem;
  font-size: .92rem; color: var(--text);
}
.note-valider > .ic { color: var(--gold-dark); flex-shrink: 0; margin-top: .15rem; width: 1.35em; height: 1.35em; }
.note-valider .tag {
  display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--navy); background: var(--gold);
  border-radius: var(--pill); padding: .12rem .6rem; margin-bottom: .3rem;
}

/* ── Conseil municipal (élus groupés) ──────────────────── */
.elus-group { margin-top: 2.6rem; }
.elus-group:first-of-type { margin-top: 0; }
.elus-group-title {
  font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--navy);
  text-align: center; margin-bottom: 1.4rem; padding-bottom: .6rem; position: relative;
}
.elus-group-title::after {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 44px; height: 3px; background: var(--gold); border-radius: 2px;
}
.elus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.4rem; }
/* Le maire, seul, centré et un peu plus large */
.elus-grid.is-solo { grid-template-columns: minmax(240px, 300px); justify-content: center; }

.elu-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.6rem 1.2rem; text-align: center; transition: var(--transition);
}
.elu-card:hover { border-color: var(--navy); box-shadow: var(--shadow); transform: translateY(-3px); }
.elu-photo {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  margin: 0 auto .9rem; display: block; border: 3px solid var(--navy);
}
.elu-photo-ph {
  background: var(--navy); display: flex; align-items: center; justify-content: center; border: none;
}
.elu-photo-ph .ic { width: 2.3rem; height: 2.3rem; color: var(--gold); }
.elu-role {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: .3rem;
}
.elu-name { font-weight: 700; color: var(--navy); font-size: 1.02rem; line-height: 1.25; }
.elu-deleg { font-size: .85rem; color: var(--muted); margin-top: .4rem; line-height: 1.45; }
.is-solo .elu-name { font-size: 1.15rem; }
