/* ============================================================
   PORMENAZ — Design principal
   Aesthetic : Editorial culturel — pierre, parchemin, or
   Fonts : Cormorant Garant (titres) + Nunito Sans (corps)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garant:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Nunito+Sans:wght@300;400;600&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  /* Couleurs mode clair */
  --bg:          #F7F3ED;
  --bg-card:     #FFFFFF;
  --bg-subtle:   #EEE8DE;
  --text:        #2A2018;
  --text-muted:  #7A6A58;
  --accent:      #8B5E2A;
  --accent-hover:#6B4520;
  --gold:        #C4902A;
  --border:      #DDD5C8;
  --shadow:      rgba(60,40,10,.10);
  --shadow-lg:   rgba(60,40,10,.18);

  /* Typographie */
  --font-display: 'Cormorant Garant', Georgia, serif;
  --font-body:    'Nunito Sans', system-ui, sans-serif;

  /* Espacements */
  --radius:  6px;
  --radius-lg: 12px;
  --max-w:   1200px;
  --nav-h:   64px;

  /* Transitions */
  --transition: .2s ease;
}

[data-theme="dark"] {
  --bg:          #1A1714;
  --bg-card:     #252018;
  --bg-subtle:   #302820;
  --text:        #EAE0D0;
  --text-muted:  #9A8C7A;
  --accent:      #D4A055;
  --accent-hover:#E8B86D;
  --gold:        #D4A055;
  --border:      #3A3028;
  --shadow:      rgba(0,0,0,.30);
  --shadow-lg:   rgba(0,0,0,.50);
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

/* ── Navigation ────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px var(--shadow);
  display: flex; align-items: center;
  transition: background var(--transition), border-color var(--transition);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  display: flex; align-items: center; gap: 1.5rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.nav__logo span { color: var(--gold); }
.nav__logo:hover { color: var(--text); }

.nav__links {
  display: flex; gap: .25rem;
  list-style: none;
  flex: 1;
}

.nav__links a {
  padding: .4rem .85rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.nav__links a:hover,
.nav__links a.active { color: var(--accent); background: var(--bg-subtle); }

.nav__right { display: flex; align-items: center; gap: .75rem; margin-left: auto; }

/* Barre de recherche */
.search-form {
  display: flex; align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .3rem .3rem .3rem .9rem;
  transition: border-color var(--transition);
}
.search-form:focus-within { border-color: var(--accent); }
.search-form input {
  background: none; border: none; outline: none;
  font-family: var(--font-body); font-size: .875rem;
  color: var(--text); width: 180px;
}
.search-form button {
  background: var(--accent); color: #fff;
  border: none; border-radius: 999px;
  width: 30px; height: 30px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.search-form button:hover { background: var(--accent-hover); }

/* Toggle dark mode */
.theme-toggle {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 52px; height: 28px;
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}
.theme-toggle__thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold);
  transition: transform .25s ease, background var(--transition);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
[data-theme="dark"] .theme-toggle__thumb { transform: translateX(24px); }

/* Menu hamburger mobile */
.nav__burger {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: .4rem;
  color: var(--text);
}
.nav__burger svg { display: block; }

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: .75rem 1.5rem;
  font-size: .8125rem;
  color: var(--text-muted);
  display: flex; align-items: center; flex-wrap: wrap; gap: .3rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { opacity: .5; }
.breadcrumb__current { color: var(--text); font-weight: 600; }

/* ── Hero (page d'accueil) ──────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c4902a' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: .5;
}
.hero__inner { position: relative; max-width: 700px; margin: 0 auto; }
.hero__eyebrow {
  font-size: .75rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: .75rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}
.hero__subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.hero__cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ── Boutons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform .1s;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn-outline {
  background: transparent; color: var(--accent); border-color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

.btn-sm { padding: .4rem .9rem; font-size: .8125rem; }

/* ── Cards de sections ──────────────────────────────────── */
.sections-grid {
  max-width: var(--max-w);
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  display: flex; flex-direction: column;
}
.section-card:hover {
  box-shadow: 0 8px 24px var(--shadow-lg);
  transform: translateY(-2px);
}
.section-card__img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-subtle);
}
.section-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.section-card:hover .section-card__img img { transform: scale(1.04); }
.section-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.section-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 700;
  margin-bottom: .5rem; color: var(--text);
}
.section-card__desc { color: var(--text-muted); font-size: .9rem; flex: 1; }
.section-card__footer {
  margin-top: 1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.section-card__count {
  font-size: .8rem; color: var(--text-muted);
  background: var(--bg-subtle);
  padding: .25rem .65rem; border-radius: 999px;
}

/* ── Grille départements ────────────────────────────────── */
.page-header {
  max-width: var(--max-w); margin: 0 auto;
  padding: 2.5rem 1.5rem 1rem;
}
.page-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700; color: var(--text);
}
.page-header__subtitle { color: var(--text-muted); margin-top: .4rem; }

.dept-grid {
  max-width: var(--max-w); margin: 1.5rem auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.dept-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: .75rem;
  transition: box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
}
.dept-card:hover { box-shadow: 0 4px 12px var(--shadow); border-color: var(--accent); }
.dept-card__num {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 700;
  color: var(--gold); min-width: 2.5rem;
  text-align: center;
}
.dept-card__info { flex: 1; min-width: 0; }
.dept-card__name { font-weight: 600; font-size: .9rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dept-card__region { font-size: .75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dept-card__count { font-size: .75rem; color: var(--text-muted); background: var(--bg-subtle); padding: .2rem .5rem; border-radius: 999px; white-space: nowrap; }

/* ── Liste communes ─────────────────────────────────────── */
.commune-grid {
  max-width: var(--max-w); margin: 1.5rem auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}
.commune-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.commune-card:hover { box-shadow: 0 4px 16px var(--shadow-lg); transform: translateY(-1px); }
.commune-card__thumb {
  aspect-ratio: 4/3;
  background: var(--bg-subtle);
  overflow: hidden;
}
.commune-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.commune-card__thumb .placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 1.5rem; opacity: .4;
}
.commune-card__name {
  padding: .65rem .85rem;
  font-size: .875rem; font-weight: 600; color: var(--text);
}

/* ── Page article (commune) ─────────────────────────────── */
.article-layout {
  max-width: var(--max-w); margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
}

.article__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: .5rem;
}
.article__meta {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  margin-bottom: 1.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.article__meta-tag {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: .78rem; font-weight: 600;
  padding: .25rem .65rem; border-radius: 999px;
  letter-spacing: .03em;
}
.article__content {
  font-size: 1rem; line-height: 1.8;
  color: var(--text);
}
.article__content h1,
.article__content h2,
.article__content h3 {
  font-family: var(--font-display);
  font-weight: 600; color: var(--text);
  margin: 1.5rem 0 .5rem;
}
.article__content h1 { font-size: 1.5rem; }
.article__content h2 { font-size: 1.3rem; }
.article__content p  { margin-bottom: .85rem; }

/* ── Galerie photos ─────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .5rem;
  margin-top: 1.5rem;
}
.gallery__item {
  aspect-ratio: 1;
  overflow: hidden; border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg-subtle);
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery__item:hover img { transform: scale(1.06); }

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.96);
  align-items: center; justify-content: center;
  padding: 0;
}
.lightbox.open { display: flex !important; }
.lightbox img {
  max-width: 92vw !important;
  max-height: 88vh !important;
  width: auto !important;
  height: auto !important;
  border-radius: 4px;
  object-fit: contain !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.8);
  display: block;
}
.lightbox__close {
  position: fixed; top: 1rem; right: 1rem;
  background: rgba(255,255,255,.2); color: #fff;
  border: none; border-radius: 50%; width: 46px; height: 46px;
  cursor: pointer; font-size: 1.4rem; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox__close:hover { background: rgba(255,255,255,.35); }
.lightbox__nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.2); color: #fff;
  border: none; border-radius: 50%; width: 54px; height: 54px;
  cursor: pointer; font-size: 2rem; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox__nav:hover { background: rgba(255,255,255,.35); }
.lightbox__prev { left: .75rem; }
.lightbox__next { right: .75rem; }
.lightbox__caption {
  position: fixed; bottom: 1.25rem; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.9); font-size: .9rem;
  background: rgba(0,0,0,.6); padding: .5rem 1.25rem;
  border-radius: 999px; white-space: nowrap;
  max-width: 80vw; overflow: hidden; text-overflow: ellipsis;
  z-index: 10000;
}

/* Légende sous les thumbnails */
.gallery__item {
  position: relative;
}
.gallery__caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff; font-size: .72rem; padding: .75rem .5rem .35rem;
  text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ── Sidebar (infos département) ────────────────────────── */
.article-sidebar {
  position: sticky; top: calc(var(--nav-h) + 1rem);
}
.sidebar-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.sidebar-box__title {
  font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 700;
  color: var(--text-muted); margin-bottom: .75rem;
}
.sidebar-box__value {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 600;
  color: var(--text);
}

/* ── Admin : barre d'édition inline ─────────────────────── */
.edit-bar {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
  display: flex; flex-direction: column; align-items: flex-end; gap: .5rem;
}
.edit-btn {
  background: var(--accent);
  color: #fff; border: none; border-radius: 999px;
  padding: .6rem 1.1rem;
  font-size: .85rem; font-weight: 600;
  cursor: pointer; box-shadow: 0 4px 14px var(--shadow-lg);
  display: flex; align-items: center; gap: .4rem;
  transition: background var(--transition), transform .1s;
}
.edit-btn:hover { background: var(--accent-hover); transform: scale(1.02); }
.edit-btn:active { transform: scale(.97); }

/* Indicateurs d'édition sur les éléments */
[data-editable] {
  position: relative;
  outline: 2px solid transparent;
  transition: outline var(--transition);
  cursor: default;
}
body.edit-mode [data-editable]:hover {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
  cursor: pointer;
}
body.edit-mode [data-editable]::after {
  content: '✏️';
  position: absolute; top: 4px; right: 4px;
  font-size: .75rem; opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
body.edit-mode [data-editable]:hover::after { opacity: 1; }

/* Toast notifications */
.toast {
  position: fixed; bottom: 5rem; right: 1.5rem; z-index: 300;
  background: #1a2e1a; color: #a8f0a8;
  border-radius: var(--radius); padding: .75rem 1.2rem;
  font-size: .875rem; font-weight: 600;
  transform: translateY(10px); opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #2e1a1a; color: #f0a8a8; }

/* ── Admin : vues ───────────────────────────────────────── */
.admin-layout {
  display: flex; min-height: 100vh;
}
.admin-sidebar {
  width: 240px; background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}
.admin-sidebar__logo {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  color: var(--text); margin-bottom: 1.5rem;
  padding: .5rem;
}
.admin-sidebar__logo span { color: var(--gold); }
.admin-nav { list-style: none; }
.admin-nav li + li { margin-top: .2rem; }
.admin-nav a {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .85rem;
  border-radius: var(--radius);
  font-size: .875rem; font-weight: 600;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.admin-nav a:hover,
.admin-nav a.active { background: var(--bg-subtle); color: var(--accent); }
.admin-nav__icon { font-size: 1rem; width: 1.2rem; text-align: center; }

.admin-main { flex: 1; overflow-x: hidden; }
.admin-topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-topbar__title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.admin-content { padding: 2rem; }

/* Table admin */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left; padding: .75rem 1rem;
  font-size: .78rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.admin-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .875rem; color: var(--text);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--bg-subtle); }

/* Badges statut */
.badge {
  display: inline-block;
  padding: .2rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.badge-publie  { background: #d1fae5; color: #065f46; }
.badge-brouillon { background: #fef3c7; color: #92400e; }
.badge-archive { background: var(--bg-subtle); color: var(--text-muted); }
[data-theme="dark"] .badge-publie  { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .badge-brouillon { background: #451a03; color: #fcd34d; }

/* ── Stats dashboard ────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: 2.4rem; font-weight: 700;
  color: var(--gold); line-height: 1;
  margin-bottom: .4rem;
}
.stat-card__label { font-size: .85rem; color: var(--text-muted); font-weight: 600; }

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.chart-container h3 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--text); margin-bottom: 1.25rem;
}

/* Mini bar chart CSS */
.bar-chart { display: flex; gap: 3px; align-items: flex-end; height: 100px; }
.bar-chart__bar {
  flex: 1; background: var(--accent);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  opacity: .8; transition: opacity .2s;
  position: relative;
}
.bar-chart__bar:hover { opacity: 1; }
.bar-chart__bar::after {
  content: attr(data-val);
  position: absolute; top: -1.4rem; left: 50%;
  transform: translateX(-50%);
  font-size: .65rem; color: var(--text-muted);
  white-space: nowrap; display: none;
}
.bar-chart__bar:hover::after { display: block; }

/* Source list */
.source-list { list-style: none; }
.source-list li {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
}
.source-list li:last-child { border: none; }
.source-list__bar {
  height: 6px; border-radius: 3px;
  background: var(--accent); opacity: .7;
  min-width: 4px;
}
.source-list__count { margin-left: auto; color: var(--text-muted); font-size: .8rem; font-weight: 600; }

/* ── Pied de page ────────────────────────────────────────── */
.footer {
  margin-top: auto;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: .8125rem;
  color: var(--text-muted);
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent); }

/* ── Formulaires ────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: .8125rem; font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .4rem;
  letter-spacing: .03em;
}
.form-control {
  width: 100%;
  padding: .6rem .85rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body); font-size: .9rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--accent); background: var(--bg-card); }

/* ── Utilitaires ────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex { display: flex; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: 0 8px 20px var(--shadow);
    z-index: 99;
  }
  .nav__burger { display: flex; }
  .search-form input { width: 120px; }
  .dept-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .commune-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .admin-sidebar { display: none; }
  .admin-sidebar.open { display: block; position: fixed; inset: 0; z-index: 150; width: 280px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: 2.5rem 1rem 2rem; }
  .dept-grid { grid-template-columns: 1fr 1fr; }
  .commune-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .search-form { display: none; }
}
