

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,300;0,400;0,600;0,700;1,400;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

:root {
  --foret:      #1e3d1a;
  --foret-md:   #2d5a27;
  --foret-lt:   #3d7832;
  --feuille:    #e8ede5;
  --ivoire:     #f5f1ea;
  --ivoire-md:  #ede8df;
  --papier:     #faf8f4;
  --or:         #b5852a;
  --or-lt:      #d4a84b;
  --or-pale:    #f5e9cc;
  --brun:       #2c1f0e;
  --brun-md:    #4a3728;
  --gris:       #7a7265;
  --gris-lt:    #bbb5ab;
  --rouge:      #9b2c2c;
  --rouge-lt:   #c0392b;
  --blanc:      #ffffff;
  --border:     #ddd8ce;

  --shadow-sm:  0 1px 4px rgba(30,61,26,.07);
  --shadow-md:  0 3px 14px rgba(30,61,26,.10);
  --shadow-lg:  0 8px 32px rgba(30,61,26,.13);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

img { max-width: 100%; display: block; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--papier);
  color: var(--brun);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.screen       { display: none; min-height: 100vh; }
.screen.active{ display: block; }

.site-header {
  background: var(--foret);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  max-width: 860px;
  margin: 0 auto;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.header-logo img {
  height: 52px;
  width: auto;
  border-radius: 6px;
}

.header-village {
  font-family: 'Spectral', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
  letter-spacing: .01em;
}
.header-village small {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-top: 1px;
}

.header-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.badge-admin { background: var(--or); color: var(--brun); }

.header-search-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.header-search-btn svg { width: 18px; height: 18px; }
.header-search-btn:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); }
.header-search-btn:active { transform: scale(.94); }

.gsearch-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,25,15,.55);
  backdrop-filter: blur(2px);
  z-index: 550;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 16px 16px;
  animation: fadeIn .16s ease;
}
.gsearch-overlay.open { display: flex; }
.gsearch-panel {
  background: #fff;
  width: 100%;
  max-width: 560px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 96px);
  animation: scaleIn .18s cubic-bezier(.32,1.4,.55,1);
}
.gsearch-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.gsearch-icon { font-size: 17px; flex-shrink: 0; opacity: .6; }
.gsearch-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--brun);
}
.gsearch-input:focus { outline: none; }
.gsearch-input::-webkit-search-cancel-button { display: none; }
.gsearch-close {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--ivoire-md);
  color: var(--gris);
  cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.gsearch-close:hover { background: var(--feuille); color: var(--foret-md); }
.gsearch-results {
  overflow-y: auto;
  padding: 8px;
}
.gsearch-hint, .gsearch-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--gris);
  font-size: 13.5px;
}
.gsearch-hint .gh-icon, .gsearch-empty .gh-icon { font-size: 30px; display: block; margin-bottom: 8px; opacity: .5; }
.gsearch-group-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gris);
  padding: 10px 10px 4px;
}
.gsearch-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: var(--r-sm);
  background: none;
  cursor: pointer;
  text-align: left;
  transition: background .13s;
}
.gsearch-item:hover, .gsearch-item:focus-visible { background: var(--feuille); }
.gsearch-item-icon {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--feuille);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.gsearch-item-title {
  font-family: 'Spectral', Georgia, serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--brun);
  line-height: 1.3;
}
.gsearch-item-snippet {
  font-size: 12px;
  color: var(--gris);
  margin-top: 2px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gsearch-item mark {
  background: var(--or-pale);
  color: var(--brun);
  border-radius: 2px;
  padding: 0 1px;
}
@media (max-width: 480px) {
  .gsearch-overlay { padding: 0; }
  .gsearch-panel { max-width: none; height: 100%; max-height: 100%; border-radius: 0; }
  .gsearch-input-wrap { padding-top: max(14px, env(safe-area-inset-top)); }
}

.nav-tabs {
  display: flex;
  background: rgba(0,0,0,.18);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  flex: none;
  padding: 10px 16px;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255,255,255,.58);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.nav-tab.active {
  color: #fff;
  border-bottom-color: var(--or-lt);
}

.nav-item {
  flex: none;
  position: relative;
  display: flex;
}
.nav-item .nav-tab { flex: none; }

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 270px;
  max-width: 340px;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--blanc);
  border-radius: var(--r-md);
  border-top: 3px solid var(--or-lt);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 500;
  animation: navDropdownIn .16s ease;
}
@keyframes navDropdownIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-item::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 14px;
}

@media (hover: hover) and (pointer: fine) {
  .nav-item:hover .nav-dropdown,
  .nav-item:focus-within .nav-dropdown {
    display: block;
  }
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: var(--r-sm);
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: 'Spectral', Georgia, serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--brun-md);
  white-space: normal;
  text-transform: none;
  letter-spacing: normal;
  transition: background .15s, color .15s, padding-left .15s;
}
.nav-dropdown-item + .nav-dropdown-item { margin-top: 2px; }
.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible {
  background: var(--feuille);
  color: var(--foret-md);
  padding-left: 14px;
}
.nav-dropdown-icon {
  flex: none;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14.5px;
  border-radius: 50%;
  background: var(--feuille);
  transition: background .15s;
}
.nav-dropdown-item:hover .nav-dropdown-icon,
.nav-dropdown-item:focus-visible .nav-dropdown-icon {
  background: var(--or-pale);
}
.nav-dropdown-label { flex: 1; line-height: 1.32; }
.nav-dropdown-empty {
  padding: 14px 12px;
  font-family: 'Spectral', Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: var(--gris);
  text-align: center;
}

@keyframes navHighlightFlash {
  0%, 100% { box-shadow: none; }
  25%, 75% { box-shadow: 0 0 0 3px var(--or-lt, #e0b04c); }
}
.nav-highlight-flash {
  animation: navHighlightFlash 1.6s ease;
}

.content {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 100px;
}

.tab-section         { display: none; }
.tab-section.active  { display: block; }

.hero-banner {
  background-image: url('images/village/photo_bienvenue.jpg');
  background-size: cover;
  background-position: center;
  border-radius: var(--r-lg);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
}
.hero-carousel {
  position: absolute;
  inset: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-arrows {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 14px 0;
  pointer-events: none;
}
.hero-arrow {
  pointer-events: auto;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 50%;
  background: rgba(20,20,15,.2);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: background .18s, transform .18s, box-shadow .18s, border-color .18s;
}
.hero-arrow svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}
.hero-arrow:hover {
  background: rgba(20,20,15,.55);
  border-color: rgba(255,255,255,.6);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  transform: scale(1.08);
}
.hero-arrow:active { transform: scale(.92); }
.hero-overlay {
  position: absolute;
  inset: 0;
  
  background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(10,25,8,.18) 55%, rgba(10,25,8,.42) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 28px 24px;
  color: #fff;
  width: 100%;
}
.hero-banner h1 {
  font-family: 'Spectral', Georgia, serif;
  font-size: clamp(21px, 5vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0,0,0,.4);
  margin-bottom: 6px;
}
.hero-banner p {
  font-size: 13.5px;
  color: rgba(255,255,255,.88);
  line-height: 1.5;
  text-shadow: 0 1px 5px rgba(0,0,0,.35);
}
.hero-stats {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.actus-carousel-wrap {
  position: relative;
}
.actus-carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.actus-carousel-track::-webkit-scrollbar { display: none; }
.actus-carousel-track > .card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  margin: 0; 
}
@media (min-width: 700px) {
  .actus-carousel-track > .card { flex: 0 0 calc(50% - 8px); }
}
@media (min-width: 1000px) {
  .actus-carousel-track > .card { flex: 0 0 calc(33.333% - 11px); }
}

/* Grille fixe "Informations pratiques" (accueil) : 3 par ligne, taille
   identique, autant de lignes que nécessaire — pas de carrousel. */
.infos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.infos-grid > .card {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.actus-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--blanc);
  color: var(--foret-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 3;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.actus-carousel-arrow svg { width: 18px; height: 18px; }
.actus-carousel-arrow:hover { background: var(--feuille); box-shadow: var(--shadow-lg); }
.actus-carousel-arrow:active { transform: translateY(-50%) scale(.92); }
.actus-carousel-arrow[disabled] { opacity: .35; pointer-events: none; }
.actus-carousel-arrow-left  { left: -14px; }
.actus-carousel-arrow-right { right: -14px; }
@media (max-width: 640px) {
  .actus-carousel-arrow-left  { left: -8px; }
  .actus-carousel-arrow-right { right: -8px; }
}

.actus-carousel-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.actus-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--gris-lt);
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.actus-carousel-dot:hover { background: var(--foret-lt); }
.actus-carousel-dot.active { background: var(--foret-md); transform: scale(1.3); }
.stat-pill {
  background: rgba(255,255,255,.17);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 12px;
  color: #fff;
}

.meteo-widget {
  background: linear-gradient(135deg, #1a4a8a, #1d3a6e);
  border-radius: var(--r-md);
  padding: 18px 20px;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.meteo-main    { display: flex; align-items: center; gap: 12px; }
.meteo-icon    { font-size: 44px; line-height: 1; }
.meteo-temp    { font-size: 34px; font-weight: 300; font-family: 'Spectral', serif; line-height: 1; }
.meteo-desc    { font-size: 12.5px; color: rgba(255,255,255,.75); margin-top: 2px; }
.meteo-loc     { font-size: 10.5px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .1em; margin-top: 1px; }
.meteo-details { text-align: right; font-size: 11.5px; color: rgba(255,255,255,.7); line-height: 1.9; }

.section-title {
  font-family: 'Spectral', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--brun);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--or-lt), transparent);
}

.card {
  background: #fff;
  border-radius: var(--r-md);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform .18s, box-shadow .18s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.icon-vert  { background: var(--feuille); }
.icon-or    { background: var(--or-pale); }
.icon-bleu  { background: #dbeafe; }
.icon-rouge { background: #fde8e8; }

.card-title {
  font-family: 'Spectral', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--brun);
  flex: 1;
  line-height: 1.3;
}
.card-date {
  font-size: 11px;
  color: var(--gris);
  white-space: nowrap;
  margin-top: 2px;
}
.card p {
  font-size: 13.5px;
  color: var(--brun-md);
  line-height: 1.65;
  white-space: pre-line;
}

.actu-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}
.actu-page-img {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 210 / 297;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.demarche-photos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.demarche-photo-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .15s;
}
.demarche-photo-thumb:hover { transform: scale(1.04); }
.card-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.tag-event   { background: #dcfce7; color: #145a32; }
.tag-info    { background: #dbeafe; color: #1e3a8a; }
.tag-urgence { background: #fde8e8; color: #7b1c1c; }
.tag-travaux { background: #fef3c7; color: #78350f; }

.agenda-item {
  display: flex;
  gap: 14px;
  background: #fff;
  border-radius: var(--r-md);
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--foret-md);
  border: 1px solid var(--border);
  border-left: 3px solid var(--foret-md);
  transition: transform .15s;
}
.agenda-item:hover { transform: translateX(3px); }
.agenda-date-block {
  text-align: center;
  min-width: 48px;
  background: var(--feuille);
  border-radius: var(--r-sm);
  padding: 8px 5px;
}
.agenda-day   { font-size: 21px; font-weight: 700; color: var(--foret-md); line-height: 1; }
.agenda-month { font-size: 10.5px; text-transform: uppercase; color: var(--foret-lt); letter-spacing: .05em; margin-top: 2px; }
.agenda-info  { flex: 1; }
.agenda-info h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.agenda-info p  { font-size: 12.5px; color: var(--gris); }

.horaires-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: #fff;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}
.horaires-table th {
  background: var(--foret);
  color: #fff;
  padding: 11px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .05em;
}
.horaires-table td {
  padding: 9px 16px;
  border-bottom: 1px solid var(--ivoire-md);
  color: var(--brun-md);
}
.horaires-table tr:last-child td { border-bottom: none; }
.horaires-table tr:nth-child(even) td { background: var(--papier); }

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
}
.photo-item {
  background: var(--feuille);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}
.photo-item:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.photo-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
.photo-label {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.62));
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 18px 10px 8px;
  text-align: center;
}

.photo-item-add {
  background: var(--feuille);
  border-radius: var(--r-md);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px dashed var(--gris-lt);
  gap: 6px;
  transition: border-color .2s, background .2s;
}
.photo-item-add:hover { border-color: var(--foret-md); background: #e8ede5; }
.photo-item-add span  { font-size: 28px; opacity: .5; }
.photo-item-add p     { font-size: 11px; color: var(--gris); font-weight: 500; }

.urgence-banner {
  background: linear-gradient(135deg, #8b1a1a, var(--rouge-lt));
  border-radius: var(--r-md);
  padding: 20px;
  color: #fff;
  margin-bottom: 16px;
  text-align: center;
}
.urgence-banner h2 { font-size: 17px; margin-bottom: 6px; }
.urgence-num { font-family: 'Spectral', serif; font-size: 36px; font-weight: 300; }
.urgence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.urgence-btn {
  display: flex; flex-direction: column; align-items: center;
  background: #fff;
  border-radius: var(--r-md);
  padding: 14px 10px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform .15s;
  cursor: pointer;
}
.urgence-btn:hover { transform: translateY(-2px); }
.urgence-btn span:first-child { font-size: 24px; margin-bottom: 5px; }
.urgence-btn .u-label { font-size: 11.5px; font-weight: 600; color: var(--brun); }
.urgence-btn .u-num   { font-size: 15px; font-weight: 700; color: var(--rouge); }

.article-card {
  background: #fff;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform .18s, box-shadow .18s;
  scroll-margin-top: 128px;
}
.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.article-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--feuille);
}
.article-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .3s ease;
}
.article-card:hover .article-img { transform: scale(1.03); }
.article-body { padding: 15px 17px 18px; }
.article-date {
  font-size: 11px; color: var(--gris); margin-bottom: 5px;
  font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
}
.article-titre {
  font-family: 'Spectral', Georgia, serif;
  font-size: 17px; font-weight: 600; color: var(--brun);
  margin-bottom: 9px; line-height: 1.3;
}
.article-desc { font-size: 13.5px; color: var(--brun-md); line-height: 1.7; }

.article-block-img {
  
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 420px;
  border-radius: var(--r-md);
  display: block;
  margin: 4px auto 12px;
}
.article-desc + .article-block-img,
.article-block-img + .article-desc { margin-top: 4px; }

.liens-utiles-grid { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.lien-utile-btn {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 15px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--foret-md);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .13s;
}
.lien-utile-btn:hover { background: var(--feuille); border-color: var(--foret-lt); transform: translateX(3px); }
.lien-utile-btn span  { font-size: 17px; flex-shrink: 0; }
.lien-emoji { font-size: 52px; flex-shrink: 0; line-height: 1; }
.lien-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  background: transparent;
}

.elu-card {
  background: #fff;
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}
.elu-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--feuille);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.elu-avatar-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--foret-md);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.elu-nom     { font-family: 'Spectral', serif; font-size: 15px; font-weight: 600; color: var(--brun); }
.elu-fonction{ font-size: 12px; color: var(--gris); margin-top: 2px; line-height: 1.4; }
.elu-tel     { font-size: 12.5px; color: var(--foret-md); margin-top: 5px; font-weight: 500; }

.admin-banner {
  background: linear-gradient(135deg, #122810 0%, var(--foret-md) 100%);
  border-radius: var(--r-md);
  padding: 18px;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-avatar {
  width: 50px; height: 50px;
  background: var(--or);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.admin-banner h2 { font-family: 'Spectral', serif; font-size: 17px; margin-bottom: 3px; }
.admin-banner p  { font-size: 12.5px; color: rgba(255,255,255,.65); }

.wave-emoji {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: wave-anim 2.4s infinite;
}
@keyframes wave-anim {
  0%   { transform: rotate(0deg); }
  8%   { transform: rotate(16deg); }
  16%  { transform: rotate(-8deg); }
  24%  { transform: rotate(14deg); }
  32%  { transform: rotate(-4deg); }
  40%  { transform: rotate(10deg); }
  48%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.admin-action-card {
  background: #fff;
  border-radius: var(--r-md);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color .18s, transform .15s, box-shadow .15s;
}
.admin-action-card:hover { border-color: var(--foret-md); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.admin-action-card .aa-icon  { font-size: 26px; margin-bottom: 7px; }
.admin-action-card .aa-label { font-size: 12px; font-weight: 600; color: var(--brun); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.admin-list-item {
  background: #fff;
  border-radius: var(--r-sm);
  padding: 13px 15px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.admin-list-item .item-content { flex: 1; min-width: 0; }
.admin-list-item .item-title { font-size: 13.5px; font-weight: 600; color: var(--brun); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-list-item .item-sub   { font-size: 11.5px; color: var(--gris); margin-top: 2px; }
.item-actions { display: flex; gap: 5px; padding-top: 1px; flex-shrink: 0; }

.btn-edit, .btn-delete {
  width: 30px; height: 30px;
  border: none; border-radius: 7px;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background .13s;
}
.btn-edit           { background: var(--feuille); }
.btn-edit:hover     { background: #c8ddc0; }
.btn-delete         { background: #fde8e8; }
.btn-delete:hover   { background: #fbc8c8; }

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  align-items: flex-end;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }

.modal {
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 22px 18px 44px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  animation: slideUp .32s cubic-bezier(.32,2,.55,.89);
}
.modal-handle {
  width: 36px; height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 0 auto 18px;
}
.modal-title {
  font-family: 'Spectral', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--brun);
}

.modal-actions {
  position: sticky;
  bottom: -44px;
  margin: 16px -18px -44px;
  padding: 14px 18px calc(44px + 10px);
  background: #fff;
  border-top: 1px solid var(--border);
}
.modal-actions .btn-secondary { margin-top: 9px; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--gris);
  margin-bottom: 5px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  color: var(--brun);
  background: var(--papier);
  transition: border-color .18s, background .18s;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--foret-md);
  background: #fff;
}
.form-group textarea { min-height: 400px; line-height: 1.6; resize: vertical; }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s;
  background: var(--papier);
  user-select: none;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--foret-md);
  background: var(--feuille);
}
.upload-icon { font-size: 32px; margin-bottom: 8px; opacity: .6; }
.upload-text { font-size: 13px; color: var(--gris); line-height: 1.5; }
.upload-text strong { color: var(--foret-md); }
.upload-preview {
  margin-top: 12px;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  display: none;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--foret-md);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, transform .1s;
  letter-spacing: .04em;
}
.btn-primary:hover  { background: var(--foret-lt); }
.btn-primary:active { transform: scale(.98); }

.btn-secondary {
  width: 100%;
  padding: 12px;
  background: none;
  color: var(--gris);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  cursor: pointer;
  margin-top: 9px;
  transition: border-color .18s, color .18s;
}
.btn-secondary:hover { border-color: var(--gris); color: var(--brun); }

.btn-danger {
  background: var(--rouge);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .15s;
}
.btn-danger:hover { background: var(--rouge-lt); }

.login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
  animation: fadeIn .22s ease;
}
.login-overlay.open { display: flex; }
.login-box {
  background: #fff;
  border-radius: 22px;
  padding: 30px 22px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-icon  { font-size: 38px; text-align: center; margin-bottom: 8px; }
.login-title {
  font-family: 'Spectral', Georgia, serif;
  font-size: 21px;
  text-align: center;
  margin-bottom: 5px;
  color: var(--brun);
}
.login-sub { font-size: 12.5px; color: var(--gris); text-align: center; margin-bottom: 22px; }
.login-error {
  background: #fde8e8;
  color: #7b1c1c;
  border-radius: var(--r-sm);
  padding: 9px 13px;
  font-size: 12.5px;
  margin-bottom: 14px;
  display: none;
}

.lightbox-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.93);
  z-index: 400;
  align-items: center;
  justify-content: center;
  animation: fadeIn .18s ease;
}
.lightbox-overlay.open { display: flex; }
.lightbox-box {
  background: #111;
  width: 100vw; height: 100vh;
  position: relative;
  animation: scaleIn .2s cubic-bezier(.32,2,.55,.89);
}
@media (min-width: 600px) {
  .lightbox-box { border-radius: 18px; width: 95vw; height: 90vh; }
}
.lightbox-close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%; border: none;
  background: rgba(0,0,0,.55);
  color: #fff; font-size: 17px;
  cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .18s;
}
.lightbox-close:hover { background: rgba(0,0,0,.85); }
.lightbox-inner { display: flex; flex-direction: column; height: 100%; }
@media (min-width: 600px) { .lightbox-inner { flex-direction: row; } }
.lightbox-img-wrap { flex: 1; overflow: hidden; min-height: 55vh; }
@media (min-width: 600px) { .lightbox-img-wrap { min-height: unset; width: 72%; flex: none; height: 100%; } }
.lightbox-img-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.lightbox-info {
  padding: 22px 20px;
  background: #fff;
  flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
}
@media (min-width: 600px) { .lightbox-info { width: 28%; padding: 36px 26px; height: 100%; overflow-y: auto; } }
.lightbox-label { font-family: 'Spectral', serif; font-size: 20px; font-weight: 600; color: var(--brun); line-height: 1.2; }
.lightbox-desc  { font-size: 13.5px; color: #555; line-height: 1.75; }

.lightbox-actions {
  display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap;
}

#emoji-picker-overlay .modal { max-height: 85vh; display: flex; flex-direction: column; }
#emoji-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }

#toast {
  position: fixed;
  bottom: 88px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--brun);
  color: #fff;
  padding: 11px 20px;
  border-radius: 30px;
  font-size: 13.5px;
  opacity: 0;
  transition: all .28s;
  z-index: 300;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.site-footer {
  text-align: center;
  padding: 22px 16px 28px;
  border-top: 1px solid var(--border);
}
.site-footer p {
  font-size: 11.5px;
  color: var(--gris);
  letter-spacing: .02em;
}
.site-footer a {
  color: var(--foret-md);
  font-weight: 500;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

.empty-state { text-align: center; padding: 36px 20px; color: var(--gris); }
.empty-state .es-icon { font-size: 44px; margin-bottom: 10px; opacity: .45; }
.empty-state p { font-size: 13.5px; }

.btn-logout {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  cursor: pointer;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.22); }

.divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

.upload-progress {
  margin-top: 10px;
  background: var(--ivoire-md);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
  display: none;
}
.upload-progress-bar {
  height: 100%;
  background: var(--foret-md);
  border-radius: 4px;
  transition: width .3s;
  width: 0%;
}

@keyframes fadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { transform: translateY(100%) } to { transform: translateY(0) } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.95) } to { opacity: 1; transform: scale(1) } }

@media (max-width: 400px) {
  .contact-grid { grid-template-columns: 1fr; }
  .urgence-grid { grid-template-columns: 1fr 1fr; }
}

.mairie-card {
  background: #fff;
  border-radius: var(--r-md);
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.mairie-photo-wrap {
  position: relative;
  width: calc(100% + 36px);
  margin: -18px -18px 14px;
  height: clamp(160px, 32vw, 260px);
  overflow: hidden;
  background: #fff;
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.mairie-photo-bg { display: none; }
.mairie-photo {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}
.mairie-card .info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ivoire-md);
  font-size: 13.5px;
  color: var(--brun-md);
}
.mairie-card .info-row:last-child { border-bottom: none; }
.mairie-card .info-row span:first-child { font-size: 17px; flex-shrink: 0; margin-top: 1px; }

.stat-card {
  background: #fff;
  border-radius: var(--r-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.stat-card .stat-num { font-family: 'Spectral', serif; font-size: 28px; font-weight: 600; line-height: 1; }
.stat-card .stat-lbl { font-size: 11.5px; color: var(--gris); margin-top: 4px; }

.visits-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 130px;
  padding-top: 6px;
}
.visit-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
}
.visit-bar-track {
  width: 100%;
  max-width: 22px;
  height: 100px;
  background: #f2efe7;
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.visit-bar-fill {
  width: 100%;
  min-height: 2px;
  background: var(--foret-md);
  border-radius: 4px 4px 0 0;
  transition: height .2s ease;
}
.visit-bar-label {
  font-size: 9.5px;
  color: var(--gris);
  white-space: nowrap;
}

.actus-toolbar {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.actus-search-wrap {
  position: relative;
}
.actus-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  pointer-events: none;
}
.actus-search {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--brun);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s, box-shadow .18s;
  box-sizing: border-box;
}
.actus-search:focus {
  outline: none;
  border-color: var(--foret-md);
  box-shadow: 0 0 0 3px rgba(45,90,39,.12);
}
.actus-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 6px 13px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--gris);
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--foret-md); color: var(--foret-md); }
.filter-btn.active {
  background: var(--foret-md);
  border-color: var(--foret-md);
  color: #fff;
  font-weight: 600;
}

.share-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--ivoire-md);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--gris);
  cursor: pointer;
  transition: all .16s;
  text-decoration: none;
}
.share-btn:hover { border-color: var(--foret-md); color: var(--foret-md); background: var(--feuille); }
.share-btn.whatsapp:hover { border-color: #25d366; color: #25d366; background: #f0fdf4; }
.share-btn.copied { border-color: var(--foret-md); color: var(--foret-md); background: var(--feuille); }

.agenda-calendar-wrap {
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--foret);
  color: #fff;
}
.cal-month-label {
  font-family: 'Spectral', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: capitalize;
}
.cal-nav {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  line-height: 1;
}
.cal-nav:hover { background: rgba(255,255,255,.28); }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 0;
}
.cal-day-name {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--gris);
  padding: 9px 2px 7px;
  background: var(--ivoire);
}
.cal-cell {
  text-align: center;
  padding: 7px 2px;
  font-size: 13px;
  color: var(--brun-md);
  cursor: default;
  border-top: 1px solid var(--ivoire-md);
  position: relative;
  min-height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.cal-cell.other-month { color: var(--gris-lt); }
.cal-cell.today .cal-num {
  background: var(--foret-md);
  color: #fff;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.cal-cell.has-event { cursor: pointer; }
.cal-cell.has-event:hover { background: var(--feuille); }
.cal-cell.selected { background: var(--or-pale); }
.cal-cell.selected .cal-num { color: var(--or); font-weight: 700; }
.cal-num { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.cal-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--foret-md);
  flex-shrink: 0;
}
.cal-dot.urgence { background: var(--rouge); }
.cal-dot.event   { background: #16a34a; }
.cal-dot.travaux { background: var(--or); }
.cal-events-list {
  border-top: 1px solid var(--border);
}
.cal-event-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--ivoire-md);
  animation: fadeIn .18s ease;
}
.cal-event-row:last-child { border-bottom: none; }
.cal-event-dot-lg {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--foret-md);
  flex-shrink: 0;
  margin-top: 5px;
}
.cal-event-title { font-size: 13.5px; font-weight: 600; color: var(--brun); }
.cal-event-sub   { font-size: 12px; color: var(--gris); margin-top: 2px; }
.cal-event-body  { flex: 1; min-width: 0; }

.cal-ics-btn {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--papier);
  color: var(--foret-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s, transform .15s;
}
.cal-ics-btn svg { width: 15px; height: 15px; }
.cal-ics-btn:hover { background: var(--feuille); border-color: var(--foret-md); }
.cal-ics-btn:active { transform: scale(.92); }
.cal-empty-msg {
  text-align: center;
  padding: 20px;
  color: var(--gris);
  font-size: 13px;
}

.pj-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 14px 8px 10px;
  background: var(--ivoire);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--brun);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, border-color .15s, transform .15s;
  max-width: 100%;
}
.pj-btn:hover {
  background: var(--feuille);
  border-color: var(--foret-md);
  transform: translateY(-1px);
}
.pj-btn-icon { font-size: 18px; flex-shrink: 0; }
.pj-btn-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--brun);
}
.pj-btn-dl {
  font-size: 11px;
  font-weight: 600;
  color: var(--foret-md);
  background: var(--feuille);
  border: 1px solid var(--foret-md);
  border-radius: 5px;
  padding: 2px 7px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.pj-btn:hover .pj-btn-dl {
  background: var(--foret-md);
  color: #fff;
}

.nav-tabs {
  flex-wrap: wrap;
  overflow-x: visible;
  justify-content: center;
}
.nav-tab {
  flex: 0 1 auto;
  text-align: center;
}
.nav-item { flex: 0 1 auto; }

@media (min-width: 700px) {
  .content { max-width: 920px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-actions { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .header-inner { max-width: 1100px; }
  .content { max-width: 1100px; padding-left: 32px; padding-right: 32px; }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 700px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { line-height: 1.55; }
  .content { padding-left: 14px; padding-right: 14px; padding-top: 18px; }

  
  .section-title { font-size: 18px; margin-bottom: 16px; }
  .card { padding: 16px; }
  .card-title { font-size: 15.5px; line-height: 1.35; }
  .card p, .article-desc { font-size: 14.5px; line-height: 1.62; }
  .card-date { font-size: 11.5px; }
  .article-titre { font-size: 17px; }

  
  .form-group input,
  .form-group textarea,
  .form-group select,
  .actus-search,
  .gsearch-input,
  input[type="search"],
  input[type="text"],
  input[type="email"],
  input[type="password"] {
    font-size: 16px;
  }
  .form-group textarea { min-height: 160px; }

  .header-inner { padding: 11px 14px; }

  
  .hero-content { padding: 46px 18px 20px; }
  .hero-banner { min-height: 300px; }
  .hero-banner h1 { line-height: 1.28; }
  .hero-banner p { line-height: 1.5; }

  .meteo-widget { padding: 15px 16px; flex-wrap: wrap; gap: 10px; }

  
  .filter-btn { font-size: 12.5px; padding: 7px 14px; }

  
  .cal-cell { font-size: 13.5px; min-height: 38px; }
  .cal-event-title { font-size: 14px; }
  .cal-event-sub { font-size: 12.5px; }

  .mairie-card .info-row { font-size: 14px; }
  .elu-nom { font-size: 15px; }
  .horaires-table { font-size: 13.5px; }

  .modal { padding: 20px 16px 40px; }
  .admin-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    padding: 6px 6px 8px;
  }
  .nav-item { width: 100%; }
  .nav-tab {
    width: 100%;
    flex: 1;
    font-size: 10.5px;
    line-height: 1.22;
    padding: 7px 3px;
    border-radius: 10px;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    border-bottom-color: transparent;
  }
  .nav-tab.active {
    background: rgba(255,255,255,.18);
    color: #fff;
    border-bottom-color: transparent;
  }
}

@media (max-width: 380px) {
  .nav-tab { font-size: 9.5px; padding: 6px 2px; }
  .header-village { font-size: 16.5px; }
  .header-logo img { height: 42px; }
}
