/* ================================================================
   Mairie de Navacelles — Styles propres à la page d'accueil
   (anciennement dans une balise <style> de index.php)
   Chargé AVANT tailwind.css, à la même place qu'avant : l'ordre de priorité
   des styles est inchangé.
================================================================ */

/* ================================================================
   BARRE TRICOLORE
================================================================ */

/* ================================================================
   NAVIGATION
================================================================ */
/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px;
  min-width: 220px;
  background: transparent;
  z-index: 200;
}
.dropdown-menu-inner {
  background: #fff;
  border: 1px solid #D5E4F4;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(8,43,80,.13);
  overflow: hidden;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: .65rem 1.1rem;
  font-size: .875rem;
  color: #1a2535;
  text-decoration: none;
  transition: background .15s;
}
.dropdown-menu a:hover,
.dropdown-menu a:focus { background: #EEF4FB; color: var(--rep-600); }

/* ================================================================
   HERO
================================================================ */
.hero-bg {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
}
/* Overlay gradient sur toutes les slides */
.hero-bg::before {
  content: '';
  position: absolute; inset: 0; z-index: 2;
  /* Voile LÉGER sur toute la photo (le village reste lumineux) ; le contraste du texte
     est assuré par le halo derrière le titre (#h-accueil::before), pas par ce voile. */
  background:
    linear-gradient(90deg, rgba(4,26,51,.34) 0%, rgba(4,26,51,.20) 50%, rgba(4,26,51,.05) 85%),
    linear-gradient(to bottom, rgba(0,0,0,0) 55%, rgba(0,0,0,.22) 100%);
  pointer-events: none;
}
/* Halo sombre et flou, sans bord visible, juste derrière le titre.
   Mesuré : contraste ≥ 4,5:1 pour toutes les lignes du titre, sur les photos du site
   ET sur une photo presque blanche (pire cas : ciel clair derrière le texte).
   Ne pas l'alléger sans refaire la mesure (accessibilité, critère RGAA 3.2).
   Le titre ne prend que la largeur de son texte (fit-content) : le halo ne s'étale plus
   sur toute la largeur. Débord horizontal = 2 × le flou, pour que le bout des lignes
   reste aussi sombre que le milieu (même contraste que lors de la mesure). */
#h-accueil { position: relative; isolation: isolate; width: fit-content; max-width: 100%; }
#h-accueil::before {
  content: ''; position: absolute; inset: -28px -68px -44px; z-index: -1; pointer-events: none;
  background: rgba(4,26,51,.64); filter: blur(34px); border-radius: 48px;
}
@media (max-width: 767px) {
  .hero-bg::before { background: linear-gradient(to bottom, rgba(4,26,51,.16) 0%, rgba(4,26,51,.26) 60%, rgba(4,26,51,.42) 100%); }
  #h-accueil::before { inset: -26px -52px -46px; background: rgba(4,26,51,.70); filter: blur(26px); border-radius: 36px; }
}
#accueil h1, #accueil h1 span { text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 2px 14px rgba(0,0,0,.45); }
.hero-pattern {
  position: absolute; inset: 0; z-index: 1;
}
/* Slides Ken Burns */
/* Fallback : dégradé République si les images sont absentes */
.hero-bg {
  background: linear-gradient(135deg, #0E3C6D 0%, #1A63A8 60%, #144F8A 100%);
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-color: transparent;
  opacity: 0;
  animation: kenburns 10s ease-in-out infinite;
}
.hero-slide:nth-child(1) {
  background-image: url('/assets/img/accueil/centre-village-navacelles-1140.webp');
  animation-delay: 0s;
}
.hero-slide:nth-child(2) {
  background-image: url('/assets/img/accueil/navacelles-mairie-1600.webp');
  animation-delay: 5s;
}
/* Téléphones : photos allégées */
@media (max-width: 900px) {
  .hero-slide:nth-child(1) { background-image: url('/assets/img/accueil/centre-village-navacelles-900.webp'); }
  .hero-slide:nth-child(2) { background-image: url('/assets/img/accueil/navacelles-mairie-900.webp'); }
}
/* « Réduire les animations » : une seule photo, fixe */
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; }
  .hero-slide:nth-child(1) { opacity: 1; }
  .hero-slide:nth-child(2) { display: none; }
}
/* Le zoom ne descend jamais sous 1,04 : avec le léger déplacement (±1 %), la photo
   couvre toujours tout le cadre (sinon une bande du fond bleu apparaissait sur le côté). */
@keyframes kenburns {
  0%   { opacity: 0; transform: scale(1.10) translate(1%, 1%); }
  8%   { opacity: 1; }
  50%  { opacity: 1; transform: scale(1.04) translate(-1%, -1%); }
  58%  { opacity: 0; }
  100% { opacity: 0; transform: scale(1.10) translate(1%, 1%); }
}

/* Carte "dernière actualité" mise en avant dans le hero */
@keyframes slide-in-up {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
.hero-featured-card {
  opacity: 0;
  animation: slide-in-up .7s cubic-bezier(.22,1,.36,1) .4s forwards;
}
@media (prefers-reduced-motion: reduce) {
  .hero-featured-card { animation: none; opacity: 1; }
}

/* ================================================================
   SECTION TITLES
================================================================ */
.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rep-500, #1A63A8);
}
.section-bar {
  display: inline-block;
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--rep-600), var(--gold-500));
  border-radius: 2px;
  margin-top: .5rem;
}

/* ================================================================
   CARDS
================================================================ */
.card {
  background: #fff;
  border: 1px solid #D5E4F4;
  border-radius: 10px;
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.card:hover {
  border-color: var(--rep-500);
  box-shadow: 0 10px 30px rgba(20,79,138,.12);
  transform: translateY(-3px);
}
.card:focus-within {
  border-color: var(--rep-500);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1A63A8;
}

/* Variante discrète pour les cards "Services & démarches" */
.card-subtle {
  background: #fff;
  border: 1px solid #E7E9EC;
  border-radius: 10px;
  transition: box-shadow .2s, border-color .2s;
}
.card-subtle:hover {
  border-color: #D3D7DC;
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
}
.card-subtle:focus-within {
  border-color: #B9C2CE;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #D3D7DC;
}
.card-subtle-cta {
  background: #F7F8FA;
  border: 1px solid #E7E9EC;
  border-radius: 10px;
  transition: box-shadow .2s, border-color .2s;
}
.card-subtle-cta:hover { border-color: #D3D7DC; box-shadow: 0 6px 18px rgba(15,23,42,.06); }

/* Cards rectangulaires compactes (services & démarches) */
.card-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #E7E9EC;
  border-radius: 9px;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.card-row:hover { border-color: #D3D7DC; background: #FAFBFC; box-shadow: 0 4px 12px rgba(15,23,42,.05); }
.card-row:focus-visible { outline: none; border-color: #B9C2CE; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #D3D7DC; }
.card-row-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: #F4F6F8;
  color: #475569;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.card-row-icon-green  { background: #ECFDF5; color: #16A34A; }
.card-row-icon-orange { background: #FFF7ED; color: #EA580C; }
.card-row-icon-blue   { background: #EFF6FF; color: #2563EB; }
.card-row-icon-amber  { background: #FFFBEB; color: #B45309; }
.card-row-icon-purple { background: #FAF5FF; color: #9333EA; }
.card-row-icon-indigo { background: #EEF2FF; color: #4F46E5; }
.card-row-icon-rose   { background: #FFF1F2; color: #E11D48; }
.card-row-text { flex: 1 1 0%; min-width: 0; max-width: 100%; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.card-row-title { font-family: 'Spectral', Georgia, serif; font-weight: 600; font-size: .95rem; color: #1E293B; min-width: 0; overflow: hidden; line-height: 1.3;
                  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }   /* jusqu'à 2 lignes, plus de titre coupé */
.card-row-desc { font-size: .875rem; color: #475569; min-width: 0; overflow: hidden; line-height: 1.4;
                 display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-row-arrow { flex-shrink: 0; color: #64748B; font-size: .8rem; transition: color .2s, transform .2s; }
.card-row:hover .card-row-arrow { color: #334155; transform: translateX(2px); }

/* ================================================================
   ORGANIGRAMME (équipe municipale)
================================================================ */
.org-chart { display: flex; flex-direction: column; align-items: center; }
.org-node {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
  line-height: 1.25;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.org-node-mayor { border-color: var(--rep-300, #93C5FD); background: #F5F9FF; padding: 10px 20px; }
.org-node .org-role { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #64748B; }
.org-node-mayor .org-role { color: var(--rep-600); }
.org-node .org-name { display: block; font-family: 'Spectral', Georgia, serif; font-weight: 600; font-size: .9rem; color: #1E293B; margin-top: 2px; white-space: nowrap; }
.org-node-mayor .org-name { font-size: 1.05rem; }
.org-node-sm { padding: 7px 12px; min-width: 118px; }
.org-node-sm .org-name { font-size: .82rem; white-space: normal; }

.org-level {
  display: flex;
  justify-content: center;
  gap: 14px;
  position: relative;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid #D8DEE6;
  flex-wrap: nowrap;
  max-width: 100%;
  list-style: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}
.org-level::before {
  content: ''; position: absolute; top: -18px; left: 50%;
  width: 1px; height: 18px; background: #D8DEE6;
}
.org-node-wrap { position: relative; flex-shrink: 0; list-style: none; }
.org-node-wrap::before {
  content: ''; position: absolute; top: -18px; left: 50%;
  width: 1px; height: 18px; background: #D8DEE6;
}
.org-level-conseillers {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}
.org-level-conseillers .org-node-sm { min-width: 112px; }

@media (max-width: 760px) {
  .org-level { flex-direction: column; align-items: center; border-top: none; padding-top: 0; margin-top: 14px; gap: 8px; overflow: visible; }
  .org-level::before { display: none; }
  .org-node-wrap::before { display: none; }
  .org-node-sm { width: 200px; }
  /* Adjoints et conseillers sur deux colonnes : la liste est deux fois moins longue */
  .org-level { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }
  .org-level .org-node-wrap { min-width: 0; }
  .org-level .org-node-sm { width: 100%; min-width: 0; height: 100%; }
  .org-level .org-node-wrap:last-child:nth-child(odd) { grid-column: span 2; justify-self: center; width: calc(50% - 4px); }
}

/* ================================================================
   REVEAL ANIMATION
================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ================================================================
   TABLEAU HORAIRES
================================================================ */
.horaires-table tr:nth-child(even) td { background: #F4F8FD; }
.horaires-table tr td:first-child { font-weight: 600; color: var(--rep-700); }

/* ================================================================
   PDF BADGE
================================================================ */
.pdf-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #FFF5F5;
  color: #C0392B;
  border: 1px solid #FACACA;
  border-radius: 4px;
  font-size: .75rem; font-weight: 700;
  padding: .15rem .5rem;
}

/* ================================================================
   URGENCES
================================================================ */
.urgence-card {
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.urgence-card:hover { border-color: currentColor; box-shadow: 0 4px 16px rgba(0,0,0,.12); }

/* ================================================================
   ORGANIGRAMME
================================================================ */
.org-maire {
  background: linear-gradient(135deg, var(--rep-700), var(--rep-600));
  color: #fff;
  border-radius: 10px;
}
.org-adjoint {
  background: linear-gradient(135deg, #EEF4FB, #D5E4F4);
  border: 2px solid #A9C8EA;
  color: var(--rep-800);
  border-radius: 8px;
}
.org-conseiller {
  background: #fff;
  border: 1px solid #D5E4F4;
  color: #1a2535;
  border-radius: 8px;
}

/* ================================================================
   FORMULAIRE
================================================================ */
.form-field {
  width: 100%;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: .5rem .75rem;
  font-size: .875rem;
  font-family: 'Noto Sans', sans-serif;
  color: #1a2535;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-field:focus {
  border-color: var(--rep-500);
  box-shadow: 0 0 0 3px rgba(26,99,168,.18);
  outline: none;
}
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #1a2535;
  margin-bottom: .3rem;
}
.form-required { color: #C0392B; margin-left: 2px; }
.form-hint { font-size: .72rem; color: #64748B; margin-top: .2rem; }
.form-error { font-size: .72rem; color: #C0392B; font-weight: 600; margin-top: .2rem; display: none; }

/* ================================================================
   NOTIFICATION TOAST
================================================================ */
.toast {
  position: fixed; top: 5rem; right: 1rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  padding: .9rem 1.2rem;
  display: flex; align-items: flex-start; gap: .75rem;
  max-width: 360px; z-index: 600;
  border-left: 5px solid;
  opacity: 0; transform: translateX(20px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
.toast.success { border-color: #1E7E34; background: #f0faf2; }
.toast.error   { border-color: #C0392B; background: #fdf2f2; }

/* ================================================================
   RESPONSIVE UTILITIES
================================================================ */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 1024px) {
  .show-mobile-only { display: none !important; }
}

/* ================================================================
   PRINT
================================================================ */
@media print {
  nav, footer, #back-top, .no-print { display: none !important; }
  main { padding: 0 !important; }
}

/* ================================================================
   LETTRE D'INFORMATION — encart d'inscription dans le hero
================================================================ */
.hero-nl {
  justify-self: end;
  width: 100%;
  max-width: 440px;
  padding: 26px 26px 20px;
  border-radius: 16px;
  color: #fff;
  /* Fond sombre presque opaque : petits textes lisibles (≥ 4,5:1 mesuré) quelle que soit
     la photo, même très claire. Ne pas l'éclaircir sans refaire la mesure. */
  background: rgba(4, 26, 51, .80);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .18);
  border-top: 3px solid #D4A520;
  box-shadow: 0 18px 48px rgba(4, 26, 51, .35);
  opacity: 0;
  animation: slide-in-up .7s cubic-bezier(.22,1,.36,1) .5s forwards;
}
@media (prefers-reduced-motion: reduce) {
  .hero-nl { animation: none; opacity: 1; }
}
@media (max-width: 1023px) {
  .hero-nl { justify-self: start; }
}

.hero-nl-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.hero-nl-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(212, 165, 32, .18);
  color: #F2C94C;
  font-size: 1.2rem;
}
.hero-nl-kicker {
  margin: 0;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: #F2C94C;
}
.hero-nl-title {
  margin: 2px 0 0;
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.35rem; font-weight: 700; line-height: 1.25;
  color: #fff;
}
.hero-nl-text {
  margin: 0 0 16px;
  font-size: .92rem; line-height: 1.55;
  color: #D5E4F4;
}

.hero-nl-field {
  position: relative;
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25);
  transition: box-shadow .2s;
}
.hero-nl-field:focus-within { box-shadow: 0 0 0 3px #D4A520; }
.hero-nl-field input[type="email"] {
  flex: 1; min-width: 0;
  padding: 13px 14px;
  border: 0; outline: none;
  font-family: inherit; font-size: .95rem;
  color: #1a2535; background: transparent;
}
.hero-nl-field input[type="email"]::placeholder { color: #64748B; }
.hero-nl-field button {
  flex-shrink: 0;
  padding: 0 18px;
  border: 0;
  background: #86630F;   /* or foncé : contraste 5,5:1 avec le texte blanc */
  color: #fff;
  font-family: inherit; font-size: .9rem; font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s;
}
.hero-nl-field button:hover { background: #6F510F; }
.hero-nl-field button:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.hero-nl-field button:disabled { opacity: .7; cursor: wait; }

.hero-nl-status { margin: 8px 0 0; min-height: 1.1rem; font-size: .82rem; color: #D5E4F4; }
.hero-nl-status.is-ok    { color: #86EFAC; }
.hero-nl-status.is-error { color: #FCA5A5; }

.hero-nl-note {
  margin: 6px 0 0;
  font-size: .75rem; line-height: 1.5;
  color: #A9C8EA;
}
.hero-nl-note i { margin-right: 4px; color: #F2C94C; }
.hero-nl-note button {
  padding: 0; border: 0; background: none;
  font: inherit; color: #fff;
  text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer;
}

/* Mobile : encart compact (moins haut, le titre du village reste visible) */
@media (max-width: 639px) {
  .hero-nl { max-width: none; padding: 14px 14px 12px; border-radius: 12px; }
  .hero-nl-head { gap: 10px; margin-bottom: 6px; }
  .hero-nl-icon { width: 34px; height: 34px; border-radius: 9px; font-size: .95rem; }
  .hero-nl-kicker { font-size: .7rem; }
  .hero-nl-title { font-size: 1.05rem; }
  .hero-nl-text { display: none; } /* le titre suffit sur petit écran */
  .hero-nl-field { border-radius: 8px; }
  .hero-nl-field input[type="email"] { padding: 10px 11px; font-size: 16px; } /* 16px : évite le zoom auto sur iPhone */
  .hero-nl-field button { padding: 0 13px; font-size: .85rem; }
  .hero-nl-status { margin-top: 4px; min-height: 0; font-size: .78rem; }
  .hero-nl-status:empty { display: none; }
  .hero-nl-note { margin-top: 6px; font-size: .7rem; }
}

/* Très petits écrans : bouton sous le champ */
@media (max-width: 340px) {
  .hero-nl-field { flex-direction: column; background: transparent; box-shadow: none; gap: 6px; overflow: visible; }
  .hero-nl-field input[type="email"] { background: #fff; border-radius: 8px; }
  .hero-nl-field button { padding: 10px; border-radius: 8px; }
}

/* ================================================================
   LETTRE D'INFORMATION — bandeau sous le diaporama (remplace l'encart
   posé sur la photo ; les règles .hero-nl ci-dessus restent pour les
   anciennes versions de index.php)
================================================================ */
/* Le diaporama laisse un peu de place pour que le bandeau soit visible dès l'arrivée */
@media (min-width: 1024px) {
  .hero-bg { min-height: max(480px, calc(100vh - 64px - 72px)); min-height: max(480px, calc(100svh - 64px - 72px)); }
}
@media (max-width: 1023px) {
  .hero-bg { min-height: 72vh; min-height: 72svh; }
}

.nl-bandeau {
  position: relative;
  color: #fff;
  /* Fond uni foncé : contraste mesuré ≥ 4,5:1 pour tous les textes, sans dépendre de la photo */
  background: #072240;
  border-top: 3px solid #D4A520;
}
/* Ordinateur : une seule bande — titre + mention à gauche, champ à droite */
.nl-bandeau-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  grid-template-areas: "titre form" "note form";
  align-items: center;
  column-gap: 40px;
  row-gap: 2px;
  padding-top: 11px;
  padding-bottom: 10px;
}
.nl-bandeau-titre {
  grid-area: titre; align-self: end;
  margin: 0;
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.15rem; font-weight: 700; line-height: 1.3;
  color: #fff;
}
.nl-bandeau-titre i { margin-right: 6px; color: #F2C94C; font-size: .95em; }
.nl-bandeau-form { grid-area: form; min-width: 0; }
.nl-bandeau-note { grid-area: note; align-self: start; }
.nl-bandeau .hero-nl-note { margin: 0; font-size: .74rem; }
.nl-bandeau .hero-nl-field input[type="email"] { padding-top: 11px; padding-bottom: 11px; }
.nl-bandeau .hero-nl-status { margin-top: 4px; min-height: 0; }
.nl-bandeau .hero-nl-status:empty { display: none; }

/* Mobile : titre, champ, mention les uns sous les autres */
@media (max-width: 767px) {
  .nl-bandeau-in {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "titre" "form" "note";
    row-gap: 8px;
    padding-top: 12px; padding-bottom: 11px;
  }
  .nl-bandeau-titre { font-size: 1.02rem; }
}

/* ================================================================
   CARTE GOOGLE MAPS — chargée seulement au clic (RGPD)
================================================================ */
.map-consent {
  position: relative;
  min-height: 320px;
  display: flex; align-items: center; justify-content: center;
  /* Fond « plan » dessiné en CSS : aucune image ni tuile chargée chez Google */
  background-color: #EEF4FB;
  background-image:
    linear-gradient(rgba(20,79,138,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,79,138,.07) 1px, transparent 1px),
    radial-gradient(circle at 30% 40%, rgba(212,165,32,.10), transparent 45%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}
.map-consent.is-loaded { display: block; background: none; }
.map-consent-inner { max-width: 340px; padding: 24px; text-align: center; }
.map-consent-pin {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff; color: #1A63A8; font-size: 1.4rem;
  box-shadow: 0 6px 18px rgba(8,43,80,.15);
  margin-bottom: 10px;
}
.map-consent-title { margin: 0; font-family: 'Spectral', Georgia, serif; font-weight: 700; font-size: 1.15rem; color: #082B50; }
.map-consent-addr  { margin: 2px 0 14px; font-size: .9rem; color: #4a5a72; }
.map-consent-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: 0; border-radius: 9px;
  background: #1A63A8; color: #fff;
  font-family: inherit; font-size: .92rem; font-weight: 600;
  cursor: pointer; transition: background .2s, transform .15s;
}
.map-consent-btn:hover { background: #144F8A; transform: translateY(-1px); }
.map-consent-btn:focus-visible { outline: 3px solid #D4A520; outline-offset: 2px; }
.map-consent-note { margin: 12px 0 0; font-size: .74rem; line-height: 1.5; color: #4a5a72; }

/* Formulaire de contact : zone de message plus haute sur ordinateur, compacte sur mobile */
@media (max-width: 639px) {
  #f-message { min-height: 0; height: 7.5rem; }
}

/* ================================================================
   SECTION CONTACT : formulaire + horaires + coordonnées + urgences
================================================================ */
.ancre-relais { display: block; position: relative; top: -90px; height: 0; }
.contact-grid { display: grid; gap: 1.5rem; }
.contact-aside { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
  .contact-main  { grid-column: 1; grid-row: 1; }
  .contact-aside { grid-column: 2; grid-row: 1; }
}
.contact-card-title {
  display: flex; align-items: center; gap: .5rem;
  margin: 0 0 .85rem; font-family: 'Spectral', Georgia, serif;
  font-size: 1.2rem; font-weight: 700; color: #041A33;
}
.contact-form .contact-card-title { margin-bottom: .25rem; }
.horaires-table td { vertical-align: top; }
.horaires-table td:last-child { white-space: nowrap; }
.horaires-table tr.is-today td { background: #FBF3DC !important; }
.horaires-table tr.is-today td.text-gray-500 { color: #4B5563; }   /* « Fermé » lisible sur le fond doré du jour */
.today-badge {
  display: block; width: fit-content; margin-top: 2px;
  padding: 1px 7px; border-radius: 999px;
  background: #86630F; color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.contact-itineraire {
  display: inline-flex; align-items: center; gap: 6px; margin-top: .75rem;
  font-size: .85rem; font-weight: 600; color: #144F8A; text-decoration: underline; text-underline-offset: 3px;
}
.contact-itineraire:hover { color: #082B50; }

/* Carte en version compacte : un bouton, la carte s'ouvre dans la fiche */
.map-consent--compact {
  min-height: 0; display: block; background: #F4F8FD; background-image: none;
  border: 1px solid #D5E4F4; border-radius: 12px; padding: 14px; text-align: center;
}
.map-consent--compact .map-consent-note { margin: 8px 0 0; font-size: .72rem; line-height: 1.45; color: #5b6b80; }
.map-consent--compact.is-loaded { padding: 0; overflow: hidden; }

/* Bandeau des numéros d'urgence */
.urg-band {
  margin-top: 2.5rem; padding: 1rem 1.25rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
  border: 1px solid #FECACA; background: #FFF8F8; border-radius: 14px;
}
.urg-band-title {
  display: flex; align-items: center; gap: .5rem; margin: 0;
  font-family: 'Spectral', Georgia, serif; font-size: 1.1rem; font-weight: 700; color: #991B1B; white-space: nowrap;
}
.urg-list { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; flex: 1; }
.urg {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem .8rem .35rem .45rem; border-radius: 999px;
  background: #fff; border: 1.5px solid currentColor; text-decoration: none;
  font-size: .82rem; font-weight: 600; line-height: 1.2; transition: box-shadow .15s, transform .15s;
}
.urg:hover, .urg:focus-visible { box-shadow: 0 3px 10px rgba(0,0,0,.12); transform: translateY(-1px); }
.urg-n {
  flex-shrink: 0; min-width: 2.1rem; padding: .1rem .45rem; border-radius: 999px; text-align: center;
  color: #fff; font-family: 'Spectral', Georgia, serif; font-weight: 700; font-size: 1rem;
}
.urg-l { color: #1f2937; }
.urg--red    { color: #DC2626; } .urg--red    .urg-n { background: #DC2626; }
.urg--blue   { color: #2563EB; } .urg--blue   .urg-n { background: #2563EB; }
.urg--orange { color: #EA580C; } .urg--orange .urg-n { background: #C2410C; }
.urg--purple { color: #9333EA; } .urg--purple .urg-n { background: #9333EA; }
.urg--teal   { color: #0D9488; } .urg--teal   .urg-n { background: #0F766E; }
@media (max-width: 639px) {
  .urg-band { flex-direction: column; align-items: stretch; }
  .urg-list { display: grid; grid-template-columns: 1fr 1fr; }
  .urg { width: 100%; font-size: .8rem; }
  .urg-list li:last-child { grid-column: span 2; }
}

/* Cartes vers un autre site : source indiquée en clair */
.card-row-src { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: .75rem; font-weight: 600; color: #144F8A; }
.card-row-src i { font-size: .65rem; }

/* Démarches : bloc « Besoin d'aide » */
.aide-jour { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 12px; border-radius: 999px;
             background: #fff; border: 1px solid #D5E4F4; color: #475569; font-size: .9rem; font-weight: 600; }
.aide-jour i { color: #64748B; }
.aide-jour.is-ouvert { border-color: #86EFAC; color: #166534; background: #F0FDF4; }
.aide-jour.is-ouvert i { color: #16A34A; }
.aide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.aide-lien { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .92rem; font-weight: 600; color: #144F8A;
             text-decoration: underline; text-underline-offset: 3px; }
.aide-lien:hover { color: #082B50; }
@media (max-width: 639px) { .aide-actions .aide-tel { width: 100%; justify-content: center; } }

/* ================================================================
   LE VILLAGE EN BREF — chiffres à gauche, situation à droite
================================================================ */
.village { padding: 56px 0 44px; background: #fff; }
.village-grille {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.village-intro { margin: 14px 0 0; max-width: 36rem; font-size: .98rem; line-height: 1.6; color: #334155; }

/* Chiffres « posés » sur la page : pas de cadre, un petit trait doré au-dessus,
   de fins séparateurs verticaux entre eux */
/* Par défaut 2 × 2 (séparateur entre les deux colonnes) ; 4 en ligne quand la place le permet */
.village-chiffres {
  margin: 30px 0 0; padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 22px;
}
.village-chiffres li {
  position: relative;
  padding: 14px 18px 0;
  border-left: 1px solid #E2E8F0;
}
.village-chiffres li::before {
  content: ''; position: absolute; top: 0; left: 18px;
  width: 24px; height: 3px; border-radius: 2px;
  background: #D4A520;
}
.village-chiffres li:nth-child(odd) { padding-left: 0; border-left: 0; }
.village-chiffres li:nth-child(odd)::before { left: 0; }
@media (min-width: 1280px), (min-width: 768px) and (max-width: 1023px) {
  .village-chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .village-chiffres .village-nb { font-size: 1.85rem; }
  .village-chiffres li:nth-child(odd) { padding-left: 18px; border-left: 1px solid #E2E8F0; }
  .village-chiffres li:nth-child(odd)::before { left: 18px; }
  .village-chiffres li:first-child { padding-left: 0; border-left: 0; }
  .village-chiffres li:first-child::before { left: 0; }
}
.village-nb {
  display: block;
  font-family: 'Spectral', Georgia, serif;
  font-size: 2.1rem; font-weight: 700; line-height: 1.1;
  color: #0E3C6D;
  white-space: nowrap;
}
.village-tiret { margin: 0 .08em; font-weight: 400; color: #144F8A; }
.village-lib { display: block; margin-top: 4px; font-size: .84rem; line-height: 1.4; color: #475569; }

.village-carte { margin: 0; text-align: center; }
.village-carte img { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto;
  /* Ombre douce qui suit le contour du département (fond transparent), teintée du bleu marine du contour */
  filter: drop-shadow(0 10px 14px rgba(15, 35, 80, .16)) drop-shadow(0 2px 3px rgba(15, 35, 80, .10)); }
@media (max-width: 1023px) {
  .village-carte img { filter: drop-shadow(0 6px 9px rgba(15, 35, 80, .14)) drop-shadow(0 1px 2px rgba(15, 35, 80, .08)); }
}
.village-carte figcaption { margin-top: 4px; font-size: .78rem; color: #475569; }

.village-sources { margin: 24px 0 0; max-width: 60rem; font-size: .72rem; line-height: 1.5; color: #64748B; }

@media (max-width: 1023px) {
  .village-grille { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 639px) {
  .village { padding: 40px 0 32px; }
  .village-chiffres { row-gap: 20px; margin-top: 22px; }
  .village-nb { font-size: 1.75rem; }
  .village-lib { font-size: .8rem; }
}
