:root {
  --primary: #2B5BA8;
  --secondary: #FFD700;

  --vie-locale: #FFB84D;
  --ecologie: #4A7C59;
  --education: #2B5BA8;
  --securite: #D84315;
  --economie: #E65100;
  --urbanisme: #546E7A;

  --text-dark: #1A1A1A;
  --text-light: #FFFFFF;
  --bg-light: #F8F9FA;
  --shadow: 0 10px 40px rgba(0,0,0,0.10);
  --shadow-hover: 0 15px 50px rgba(0,0,0,0.15);

  --nav-height: 76px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-dark);
  line-height: 1.65;
  overflow-x: hidden;
  font-size: 18px;
}

h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; font-weight: 800; }

a { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 3px solid rgba(43, 91, 168, 0.35); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 10px;
  background: white; color: #000;
  padding: 10px 14px; border-radius: 12px;
  z-index: 9999; box-shadow: var(--shadow);
}
.skip-link:focus { left: 10px; }

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 100px 20px; }

.section-title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 60px;
  color: var(--primary);
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 4px;
  background: var(--secondary);
  border-radius: 2px;
}

/* ✅ Justification (demandé) */
.text-justify {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.text-justify p { margin-bottom: 14px; }
.text-justify p:last-child { margin-bottom: 0; }

/* NAV */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  min-height: var(--nav-height);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(18px);
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.navbar.scrolled { box-shadow: 0 6px 30px rgba(0,0,0,0.12); }

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: var(--nav-height);
}

.logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 26px;
  align-items: center;
}

.nav-links a {
  color: var(--text-dark);
  font-weight: 800;
  position: relative;
  transition: color 0.3s ease, background 0.2s ease;
  font-size: 1.05rem;

  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 7px;
  left: 12px;
  right: 12px;
  height: 3px;
  background: var(--secondary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover {
  color: var(--primary);
  background: rgba(0,0,0,0.04);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* Burger */
.nav-toggle { display: none; }

.nav-burger {
  display: none;
  width: 52px; height: 52px;
  border-radius: 14px;
  align-items: center; justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.95);
}

.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: #1f1f1f;
  margin: 3px 0;
  border-radius: 2px;
}

/* HERO */
.hero {
  margin-top: var(--nav-height);
  padding: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #0f0f0f;

  height: min(calc(100vw * 0.5634), calc(100vh - var(--nav-height)));
  min-height: 320px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -60px;

  background-image: url("images/mairieface.png"), url("images/mairieface.PNG");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;

  filter: blur(22px) saturate(1.1);
  transform: scale(1.1);
  opacity: 0.55;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;

  background-image:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,0.10), rgba(0,0,0,0.35)),
    url("images/mairieface.png"),
    url("images/mairieface.PNG");

  background-size: cover, contain, contain;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;

  z-index: 1;
  pointer-events: none;
}

/* Présentation */
.presentation { background: var(--bg-light); }

.intro-text {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 2;
  text-align: center;
}

.intro-text p {
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.intro-text p:nth-child(2) { animation-delay: 0.2s; }

/* Projets */
.projets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.theme-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.35s ease;
  position: relative;
}
.theme-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }

.card-header {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--card-color) 0%, var(--card-color-dark) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%);
}

.card-header h3 {
  position: relative;
  z-index: 2;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  padding: 0 20px;
}

.card-body { padding: 40px 30px 30px; }
.card-body ul { list-style: none; }

.card-body li {
  margin-bottom: 15px;
  padding-left: 30px;
  position: relative;
  font-size: 1rem;
  line-height: 1.7;
}
.card-body li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--card-color);
  font-weight: bold;
  font-size: 1.3rem;
}

.vie-locale { --card-color: #FFB84D; --card-color-dark: #FF9800; }
.ecologie { --card-color: #4A7C59; --card-color-dark: #2E5940; }
.education { --card-color: #2B5BA8; --card-color-dark: #1A3F7A; }
.securite { --card-color: #D84315; --card-color-dark: #BF360C; }
.economie { --card-color: #E65100; --card-color-dark: #D84315; }
.urbanisme { --card-color: #546E7A; --card-color-dark: #37474F; }

/* Candidats */
.candidats { background: var(--bg-light); }

.tete-liste {
  max-width: 1000px;
  margin: 0 auto 80px;
  background: white;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 50px;
}

.tete-liste-img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 8px solid var(--secondary);
  flex-shrink: 0;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.tete-liste-info h3 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.tete-liste-role {
  font-size: 1.1rem;
  color: var(--secondary);
  font-weight: 800;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ✅ Bio tête de liste : rendu plus propre */
.tete-liste-desc {
  font-size: 1rem;
  line-height: 1.9;
  color: #555;
}

/* Grille candidats */
.candidats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.candidat-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.candidat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.candidat-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.candidat-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 3px solid var(--bg-light);
}

.candidat-header h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--primary);
}

.candidat-age { font-size: 0.95rem; color: #888; }

.candidat-role {
  display: inline-block;
  background: var(--bg-light);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

/* ✅ Texte colistiers : plus lisible + justifié via .text-justify */
.candidat-desc {
  font-size: 0.98rem;
  line-height: 1.85;
  color: #666;
}
.candidat-desc p { margin-bottom: 12px; }
.candidat-desc p:last-child { margin-bottom: 0; }

/* Footer */
footer {
  background: linear-gradient(135deg, #1A1A1A 0%, #2C2C2C 100%);
  color: white;
  padding: 80px 20px 30px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 60px;
  margin-bottom: 50px;
}

footer h3 {
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--secondary);
}

.footer-link {
  color: var(--secondary);
  font-weight: 700;
  transition: opacity 0.3s ease;
}

.footer-link:hover { opacity: 0.85; }

.footer-bottom {
  text-align: center;
  border-top: 1px solid #444;
  padding-top: 30px;
  color: #999;
}

.footer-engagements {
  font-size: 1.1rem;
  line-height: 2;
}

.footer-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-form-row label {
  display: block;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 6px;
}

.footer-form-row input,
.footer-form-row textarea {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.footer-form-row textarea {
  resize: vertical;
  min-height: 92px;
}

.footer-form-row input:focus,
.footer-form-row textarea:focus {
  border-color: rgba(255, 215, 0, 0.75);
  background: rgba(255,255,255,0.10);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.footer-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 900;
  letter-spacing: 0.4px;
  cursor: pointer;
  background: var(--secondary);
  color: #1A1A1A;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.footer-btn:hover { transform: translateY(-1px); }
.footer-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.footer-status {
  min-height: 22px;
  margin-top: -4px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
}

.footer-status.ok { color: #9BE29B; }
.footer-status.err { color: #FF9A9A; }

.footer-privacy {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .nav-burger { display: inline-flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(var(--nav-height) + 8px);
    left: 12px;
    right: 12px;
    flex-direction: column;
    gap: 8px;
    backgrou
