/* ============================================================
   Municipio — Design system « Solaire » (pages citoyennes)
   Bento vif · corail solaire · Sora + Inter · ton chaleureux
   Mêmes noms de variables/classes que styles.css : les blocs
   extra_css des templates se rethèment automatiquement.
   NE PAS charger sur les pages admin (elles gardent styles.css).
   ============================================================ */

:root {
  /* --- Surfaces & fond --- */
  --bg:          #FAFAF7;
  --bg-2:        #FFF6F2;
  --surface:     #FFFFFF;
  --surface-2:   #F6F5F1;
  --glass:       rgba(255,255,255,0.85);
  --glass-strong:#FFFFFF;

  /* --- Encre / texte --- */
  --ink:         #141414;
  --ink-soft:    #4A4742;
  --muted:       #6E6A63;

  /* --- Couleur primaire : corail --- */
  --primary:     #FF4D26;
  --primary-700: #D63A17;
  --primary-600: #FF4D26;
  --primary-50:  #FFE8E1;
  --primary-100: #FFD9CE;

  /* --- Accents par service --- */
  --accent:      #1D6FBF;   /* bleu (carte) */
  --accent-50:   #E3F1FF;
  --green:       #10B981;   /* menthe (RDV) */
  --green-50:    #E9FBF0;
  --yellow:      #F59E0B;   /* ambre (idées) */
  --yellow-50:   #FFF4D6;
  --violet:      #7C3AED;   /* violet (consultations) */
  --violet-50:   #F0EBFF;
  --coral:       #FF4D26;
  --red:         #C81E1E;   /* erreurs : rouge distinct du corail */
  --red-50:      #FDE8E8;

  /* --- Lignes & rayons --- */
  --line:        #ECEAE4;
  --line-soft:   #F3F1EC;
  --radius:      22px;
  --radius-sm:   14px;
  --radius-lg:   28px;

  /* --- Ombres douces --- */
  --shadow-sm:   0 2px 8px rgba(20,20,20,0.05);
  --shadow:      0 4px 16px rgba(20,20,20,0.06), 0 14px 34px -16px rgba(20,20,20,0.14);
  --shadow-lg:   0 24px 60px -20px rgba(20,20,20,0.22);
  --ring:        0 0 0 4px rgba(255,77,38,0.20);

  /* --- Dégradés signature --- */
  --grad-primary: linear-gradient(160deg, #FF7A59 0%, #FF4D26 100%);
  --grad-text:    linear-gradient(90deg, #FF5C39 0%, #7C3AED 100%);
  --grad-cyan:    linear-gradient(135deg, #4D96D9 0%, #1D6FBF 100%);
  --grad-emerald: linear-gradient(135deg, #34D399 0%, #0B5C36 100%);
  --grad-amber:   linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  --grad-violet:  linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%);

  /* Alias rétro-compat (anciens noms encore utilisés par des templates) */
  --navy: var(--ink);
  --navy2: var(--ink-soft);
  --accent2: var(--primary);
  --text: var(--ink);
  --text-muted: var(--muted);
  --orange: var(--coral);
  --purple: var(--violet);
  --teal: var(--accent);
  --card: var(--surface);
  --card-border: var(--line);

  --font-display: 'Sora', 'Trebuchet MS', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
}

a { color: var(--primary-700); text-decoration: none; }
::selection { background: var(--primary-100); color: var(--ink); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.wrap-narrow { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 22px; }
.stack > * + * { margin-top: 16px; }
.center { text-align: center; }

/* Texte en dégradé (mot accentué des h1) */
.grad-text, .hl {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Top bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,247,0.85);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .25s ease;
}
.appbar.scrolled { box-shadow: 0 4px 20px rgba(20,20,20,0.07); }
.appbar-inner { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--grad-primary);
  color: #fff; font-size: 20px;
  box-shadow: 0 10px 22px rgba(255,77,38,0.35);
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -0.03em; color: var(--ink); }
.brand-name b { color: var(--primary); }

/* ---------- Pills / badges ---------- */
.pill, .commune-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.pill.is-green  { color: #0B5C36; }
.pill.is-violet { color: #4C1D95; }
.pill.is-yellow { color: #7A4D00; }
.pill.is-cyan   { color: #143E66; }
.pill-dot, .commune-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--primary);
}
@keyframes pulse { 0%,100%{opacity:1; transform: scale(1)} 50%{opacity:.5; transform: scale(.82)} }

/* Sonar du point de commune (recoloré corail) */
.commune-dot { position: relative; }
.commune-dot::before, .commune-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255,77,38,0.45);
  animation: sonar 2.2s cubic-bezier(.16,1,.3,1) infinite;
}
.commune-dot::after { animation-delay: 1.1s; }
@keyframes sonar { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.6); opacity: 0; } }

/* ---------- Panels (carte blanche, plus de glassmorphism) ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius); padding: 34px;
}
.panel-soft { box-shadow: var(--shadow-sm); }
.panel-header { margin-bottom: 24px; }
.panel h1 { font-size: 30px; margin-bottom: 6px; }
.card-subtitle { font-size: 14.5px; color: var(--muted); }

/* ---------- Boutons (pilules) ---------- */
.cbtn, .submit-btn, .btn-signaler {
  --btn-grad: var(--grad-primary); --btn-fg: #fff; --btn-glow: rgba(255,77,38,0.38);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  line-height: 1; cursor: pointer; border: none; border-radius: 999px; padding: 16px 28px;
  background: var(--btn-grad); color: var(--btn-fg);
  box-shadow: 0 12px 26px -8px var(--btn-glow);
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s ease, filter .2s ease;
  text-decoration: none;
}
.cbtn:hover, .submit-btn:hover, .btn-signaler:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -8px var(--btn-glow); filter: saturate(1.06); }
.cbtn:active, .submit-btn:active, .btn-signaler:active { transform: translateY(0); }
.cbtn-block, .submit-btn { width: 100%; }
.cbtn-lg { padding: 19px 36px; font-size: 17px; }
.cbtn-green  { --btn-grad: var(--grad-emerald); --btn-glow: rgba(16,185,129,0.38); }
.cbtn-violet { --btn-grad: var(--grad-violet);  --btn-glow: rgba(124,58,237,0.38); }
.cbtn-cyan   { --btn-grad: var(--grad-cyan);    --btn-glow: rgba(29,111,191,0.38); }
.cbtn-dark   { --btn-grad: linear-gradient(135deg, #2A2A28, #141414); --btn-glow: rgba(20,20,20,0.30); }
.cbtn-ghost  { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.cbtn-ghost:hover { background: var(--surface-2); box-shadow: var(--shadow-sm); }
.cbtn-soft   { background: var(--primary-50); color: var(--primary-700); border: 1px solid var(--primary-100); box-shadow: none; }
.cbtn-soft:hover { background: var(--primary-100); box-shadow: none; }

/* Lien « Espace mairie » (pilule noire) */
.admin-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff;
  border-radius: 999px; padding: 10px 18px;
  font-size: 13px; font-weight: 600; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.admin-link:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 10px 22px -8px rgba(20,20,20,0.40); }

/* ---------- Formulaires ---------- */
.form-group, .input-group { margin-bottom: 18px; }
.form-label, .input-label {
  display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft);
  letter-spacing: 0.01em; margin-bottom: 8px;
}
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--muted); transition: color .18s; }
.has-icon:focus-within .input-icon { color: var(--primary); }
.form-input, textarea.form-input, select.form-input {
  width: 100%; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 15px 16px; color: var(--ink);
  font-family: var(--font-body); font-size: 15px; outline: none; resize: none;
  transition: border-color .18s, box-shadow .18s;
}
.has-icon .form-input { padding-left: 46px; }
.form-input::placeholder { color: var(--muted); opacity: .8; }
.form-input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.form-input.password { letter-spacing: 3px; }
.form-input.password::placeholder { letter-spacing: 0; }

/* Floating labels (repris de Civic 2025, recolorés par les variables) */
.float-group { position: relative; margin-bottom: 22px; }
.float-group .form-input { padding-top: 22px; padding-bottom: 8px; }
.float-group .form-label, .float-group .input-label {
  position: absolute; left: 16px; top: 16px; margin: 0;
  font-size: 15px; font-weight: 500; color: var(--muted); pointer-events: none;
  transform-origin: left top;
  transition: transform .18s cubic-bezier(.16,1,.3,1), color .18s ease;
}
.float-group.has-icon .form-label, .float-group.has-icon .input-label { left: 46px; }
.float-group .form-input:focus ~ .form-label,
.float-group .form-input:not(:placeholder-shown) ~ .form-label,
.float-group .form-input:focus ~ .input-label,
.float-group .form-input:not(:placeholder-shown) ~ .input-label {
  transform: translateY(-11px) scale(0.78);
  color: var(--primary); font-weight: 700;
}
.float-group textarea.form-input { padding-top: 26px; }
.float-group textarea.form-input ~ .form-label { top: 18px; }

/* ---------- Notices / erreurs ---------- */
.notice, .erreur, .acces-refuse {
  display: flex; align-items: center; gap: 10px; border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 14px; font-weight: 500; margin-bottom: 18px;
}
.notice-error, .erreur, .acces-refuse { background: var(--red-50); border: 1px solid #F5C2C2; color: var(--red); }
.notice-success { background: var(--green-50); border: 1px solid #A7F3D0; color: #0B5C36; }
.notice-info { background: var(--accent-50); border: 1px solid #BFDCF5; color: #143E66; }

/* ---------- Bento (accueil commune) ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .bento { grid-template-columns: 1fr; } }
.bt {
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  font-weight: 700; font-size: 15.5px; line-height: 1.3;
  text-decoration: none; color: inherit;
  transition: transform .18s cubic-bezier(.16,1,.3,1), box-shadow .18s ease;
}
.bt:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bt small { font-weight: 400; font-size: 12.5px; opacity: .82; }
.bt .ic {
  width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 12px;
}
.bt-signal { background: var(--grad-primary); color: #fff; }
.bt-signal .ic { background: rgba(255,255,255,0.22); color: #fff; }
.bt-rdv { background: var(--green-50); color: #0B5C36; }
.bt-rdv .ic { background: #0B5C36; color: #fff; }
.bt-carte { background: var(--accent-50); color: #143E66; }
.bt-carte .ic { background: var(--accent); color: #fff; }
.bt-consult { background: var(--violet-50); color: #4C1D95; }
.bt-consult .ic { background: var(--violet); color: #fff; }
.bt-idees { background: var(--yellow-50); color: #7A4D00; }
.bt-idees .ic { background: var(--yellow); color: #fff; }
.bt-neutre { background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.bt-neutre .ic { background: var(--primary-50); color: var(--primary-700); }

/* ---------- Tuiles génériques (autres pages : restylées à plat) ---------- */
.tiles { display: grid; gap: 16px; }
@media (min-width: 720px) { .tiles-3 { grid-template-columns: repeat(3, 1fr); } .tiles-2 { grid-template-columns: repeat(2, 1fr); } }
.tile {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink);
  transition: transform .18s cubic-bezier(.16,1,.3,1), box-shadow .18s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 20px; color: #fff;
}
.tile h3 { font-size: 18px; font-weight: 800; }
.tile p { font-size: 14px; color: var(--muted); }
.tile .go { margin-top: auto; font-weight: 700; font-size: 14px; color: var(--primary-700); display: inline-flex; gap: 4px; }
.tile:hover .go { transform: translateX(3px); }
.tile-blue   .tile-ico { background: var(--grad-primary); }
.tile-green  .tile-ico { background: var(--grad-emerald); }
.tile-violet .tile-ico { background: var(--grad-violet); }
.tile-yellow .tile-ico { background: var(--grad-amber); }
.tile-cyan   .tile-ico { background: var(--grad-cyan); }

/* ---------- Hero ---------- */
.hero { padding: 50px 0 30px; position: relative; }
.hero h1 { font-size: clamp(36px, 6.4vw, 56px); }
.hero .lead, .hero .subtitle { font-size: 17px; color: var(--muted); margin-top: 14px; max-width: 540px; }
/* Plus de blobs flottants dans Solaire */
.hero-blob { display: none; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 30px 0; margin-top: 36px; font-size: 13px; color: var(--muted); }
.footer strong { color: var(--primary); }

/* ---------- Auth layout (fond ivoire, halos corail très doux) ---------- */
.auth-body {
  display: flex; align-items: center; justify-content: center; padding: 32px 0;
  position: relative; overflow-x: hidden;
}
.auth-body::before {
  content: ''; position: fixed; inset: -20%; z-index: -1;
  background:
    radial-gradient(closest-side at 80% 15%, rgba(255,122,89,0.16), transparent),
    radial-gradient(closest-side at 15% 85%, rgba(124,58,237,0.10), transparent);
  filter: blur(40px);
}
.auth-wrap { width: 100%; max-width: 460px; padding: 0 22px; animation: fadeUp .55s cubic-bezier(.16,1,.3,1) both; }
.auth-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.lien-retour-haut, .retour { font-size: 13.5px; color: var(--muted); text-decoration: none; font-weight: 600; transition: color .15s; }
.retour { display: block; text-align: center; margin-top: 18px; }
.lien-retour-haut:hover, .retour:hover { color: var(--primary-700); }

/* ---------- Tables (au cas où une page citoyenne en garde une) ---------- */
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; padding: 15px 16px; background: var(--surface-2); color: var(--ink-soft); font-weight: 700; font-size: 12.5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 15px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--primary-50); }

/* ---------- Chips / statuts ---------- */
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-pulse::before { animation: pulse 1.8s infinite; }
.chip-blue { background: var(--primary-50); color: var(--primary-700); }
.chip-cyan { background: var(--accent-50); color: #143E66; }
.chip-green { background: var(--green-50); color: #0B5C36; }
.chip-yellow { background: var(--yellow-50); color: #7A4D00; }
.chip-red { background: var(--red-50); color: var(--red); }
.chip-violet { background: var(--violet-50); color: #4C1D95; }
.chip-gray { background: #EFEDE8; color: var(--muted); }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity:0; transform: translateY(18px);} to { opacity:1; transform: translateY(0);} }
.reveal { animation: fadeUp .55s cubic-bezier(.16,1,.3,1) both; }
.reveal-2 { animation-delay: .08s; }
.reveal-3 { animation-delay: .16s; }
.reveal-4 { animation-delay: .24s; }
.reveal-5 { animation-delay: .32s; }

/* ---------- View Transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 220ms ease both vt-fade-out; }
::view-transition-new(root) { animation: 280ms ease both vt-slide-in-from-bottom; }
@keyframes vt-slide-in-from-bottom { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vt-fade-out { to { opacity: 0; } }

/* ---------- Scroll reveal (IntersectionObserver, JS de base_citoyen) ---------- */
.reveal-scroll {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.55s cubic-bezier(.16,1,.3,1), transform 0.55s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.reveal-scroll.in-view { opacity: 1; transform: none; }
.reveal-scroll:nth-child(1) { transition-delay: 0ms; }
.reveal-scroll:nth-child(2) { transition-delay: 60ms; }
.reveal-scroll:nth-child(3) { transition-delay: 120ms; }
.reveal-scroll:nth-child(4) { transition-delay: 180ms; }
.reveal-scroll:nth-child(5) { transition-delay: 240ms; }
.reveal-scroll:nth-child(6) { transition-delay: 300ms; }
.reveal-scroll:nth-child(7) { transition-delay: 360ms; }
.reveal-scroll:nth-child(8) { transition-delay: 420ms; }

/* ---------- Ripple ---------- */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: ripple-expand 0.55s linear;
  pointer-events: none; z-index: 2;
}
@keyframes ripple-expand { to { transform: scale(4); opacity: 0; } }
.cbtn-ghost .ripple, .cbtn-soft .ripple { background: rgba(255,77,38,0.16); }

/* ---------- Skeleton (carte) ---------- */
.skeleton {
  position: relative; overflow: hidden; background: var(--surface-2);
  background-image: linear-gradient(100deg, rgba(236,234,228,0) 30%, rgba(255,255,255,0.75) 50%, rgba(236,234,228,0) 70%);
  background-size: 200% 100%; background-repeat: no-repeat;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
#carte-skeleton {
  height: 70vh; min-height: 360px;
  border-radius: 16px; border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--muted); font-size: 14px; gap: 10px; text-align: center;
}
#carte-skeleton .sk-pin { font-size: 30px; opacity: .5; animation: float 2.4s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-12px);} }

/* ---------- Barre de progression de page ---------- */
#nprogress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-primary);
  z-index: 9999; transform-origin: left;
  box-shadow: 0 0 10px rgba(255,77,38,0.5);
  animation: progress-bar 0.8s cubic-bezier(.16,1,.3,1) forwards;
}
#nprogress.done { animation: progress-done .35s ease forwards; }
@keyframes progress-bar { 0% { transform: scaleX(0); } 60% { transform: scaleX(0.7); } 100% { transform: scaleX(0.92); } }
@keyframes progress-done { from { transform: scaleX(0.92); opacity: 1; } to { transform: scaleX(1); opacity: 0; } }

/* ---------- Toasts ---------- */
.toast-stack {
  position: fixed; bottom: 22px; right: 22px;
  display: flex; flex-direction: column; gap: 12px;
  z-index: 10000; max-width: 360px; width: calc(100% - 44px);
  pointer-events: none;
}
.toast {
  pointer-events: auto; position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 14px; padding: 14px 16px 16px;
  box-shadow: var(--shadow);
  color: var(--ink-soft); font-size: 14px; line-height: 1.45;
  animation: toast-in .45s cubic-bezier(.16,1,.3,1) both;
}
.toast.leaving { animation: toast-out .35s ease forwards; }
.toast-ico { flex: 0 0 auto; font-size: 17px; margin-top: 1px; color: var(--primary); }
.toast-msg { flex: 1 1 auto; font-weight: 500; }
.toast-close {
  flex: 0 0 auto; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 14px; padding: 2px 4px; line-height: 1;
  border-radius: 6px; transition: color .15s, background .15s;
}
.toast-close:hover { color: var(--ink); background: var(--surface-2); }
.toast-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--primary); transform-origin: left;
  animation: toast-bar 4s linear forwards;
}
.toast.is-success { border-left-color: var(--green); }
.toast.is-success .toast-ico { color: var(--green); }
.toast.is-success .toast-bar { background: var(--green); }
.toast.is-error { border-left-color: var(--red); }
.toast.is-error .toast-ico { color: var(--red); }
.toast.is-error .toast-bar { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateX(120%) scale(.96); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(120%) scale(.96); } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- Popups Leaflet (carte publique) ---------- */
.leaflet-popup-content-wrapper {
  border-radius: 14px; box-shadow: var(--shadow);
  font-family: var(--font-body); color: var(--ink);
}
.leaflet-popup-content { font-size: 13.5px; line-height: 1.5; }
.leaflet-container { font-family: var(--font-body); }

/* ---------- Overrides Bootstrap (pages admin uniquement) ----------
   Les pages citoyennes ne chargent pas Bootstrap : sans effet chez elles. */
.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-700);
  --bs-btn-hover-border-color: var(--primary-700);
  --bs-btn-active-bg: var(--primary-700);
  --bs-btn-active-border-color: var(--primary-700);
  --bs-btn-focus-shadow-rgb: 255,77,38;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(255,77,38,0.18);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal-scroll { opacity: 1 !important; transform: none !important; }
  #nprogress, .toast-bar { display: none; }
  .commune-dot::before, .commune-dot::after { display: none; }
}
