/* 🎨 STYLES GLOBAUX - CSS VANILLA POUR LE SITE MAIRIE */

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

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #fafafa;
  scroll-behavior: smooth;
}

/* Transitions pour navigation fluide */
* {
  transition: color 0.15s ease, background-color 0.15s ease;
}

main {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #1a1a1a;
  line-height: 1.6;
}

main {
  flex: 1;
}

/* ==============================================
   🧭 HEADER & NAVIGATION
   ============================================== */

.header {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #e2e8f0;
}

.nav {
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.logo {
  height: 70px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
  justify-content: center;
}

.nav-item {
  margin: 0;
}

.nav-link {
  text-decoration: none;
  color: #2d3748;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  font-size: 0.95rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #62AD2B, #4a8520);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover {
  color: #62AD2B;
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link.active {
  color: #62AD2B;
}

.nav-link.active::after {
  width: 80%;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  color: #2d3748;
  font-size: 1.5rem;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
  background-color: #f8fafc;
  color: #62AD2B;
}

.mobile-menu-toggle:active {
  background-color: #e2e8f0;
  transform: scale(0.95);
}

/* ==============================================
   🦶 FOOTER
   ============================================== */

.footer {
  background: #f8fafc;
  color: #4a5568;
  padding: 3rem 0 1rem 0;
  border-top: 1px solid #e2e8f0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: #62AD2B;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.footer-section p {
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.footer-contact {
  margin-top: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: #212B79;
}

.footer-social {
  display: block !important;
  visibility: visible !important;
}

.footer-social p {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: block !important;
}

.footer .social-links {
  display: flex !important;
  gap: 1rem;
  flex-wrap: wrap;
  visibility: visible !important;
}

.footer .social-link {
  background: #62AD2B;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block !important;
  visibility: visible !important;
  transition: all 0.3s ease;
}

.footer .social-link:hover {
  background: #4a8520;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
  text-align: center;
}

.footer-bottom p {
  color: #9ca3af;
  font-size: 0.9rem;
  margin: 0;
}

/* ==============================================
   📦 LAYOUT & CONTAINERS
   ============================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

/* ==============================================
   🎨 TYPOGRAPHY
   ============================================== */

h1 {
  color: #212B79;
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  color: #212B79;
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h3 {
  color: #212B79;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

p {
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: #4a5568;
}

/* ==============================================
   🔘 BUTTONS
   ============================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #62AD2B 0%, #4a8520 100%);
  color: white;
  padding: 0.875rem 1.75rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(98, 173, 43, 0.1);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(98, 173, 43, 0.2);
}

.btn-secondary {
  background: linear-gradient(135deg, #212B79 0%, #1a2261 100%);
  box-shadow: 0 4px 6px -1px rgba(33, 43, 121, 0.1);
}

.btn-secondary:hover {
  box-shadow: 0 8px 15px -3px rgba(33, 43, 121, 0.2);
}

.btn-outline {
  background: transparent;
  border: 2px solid #62AD2B;
  color: #62AD2B;
  box-shadow: none;
}

.btn-outline:hover {
  background: #62AD2B;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(98, 173, 43, 0.2);
}

/* ==============================================
   🎭 ANIMATIONS
   ============================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* Styles spécifiques à chaque page dans leurs propres fichiers CSS */

/* ==============================================
   🔧 FORCE DISPLAY SOCIAL LINKS
   ============================================== */

.footer-section:nth-child(3),
.footer-section:nth-child(3) .footer-social,
.footer-section:nth-child(3) .footer-social p,
.footer-section:nth-child(3) .social-links,
.footer-section:nth-child(3) .social-link {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.footer-section:nth-child(3) .social-links {
  display: flex !important;
}

.footer-section:nth-child(3) .social-link {
  display: inline-block !important;
}

/* ==============================================
   📱 RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
  }
  
  .logo {
    height: 60px;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    justify-content: flex-start;
    border-top: 1px solid #e2e8f0;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-item {
    border-bottom: 1px solid #f7fafc;
  }
  
  .nav-item:last-child {
    border-bottom: none;
  }
  
  .nav-link {
    display: block;
    padding: 1.25rem 2rem;
    margin: 0;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #2d3748;
    text-align: left;
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
  }
  
  .nav-link:hover {
    background-color: #f8fafc;
    color: #62AD2B;
    padding-left: 2.5rem;
  }
  
  .nav-link:active {
    background-color: #e2e8f0;
  }
  
  .nav-link::after {
    display: none;
  }

  .container {
    padding: 0 1rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .footer-container {
    padding: 0 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-section {
    text-align: center;
  }
  
  .footer .social-links {
    justify-content: center;
  }

}

/* Media queries spécifiques dans les fichiers CSS individuels */

/* ==============================================
   🏛️ HERO BANNIÈRE – RÔLE DU MAIRE
   ============================================== */
/* BANNIÈRE COMMUNE À TOUTES LES PAGES INTERNES */
.hero-page {
  position: relative;
  background: none;
  color: #fff;
}
.hero-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-image: var(--hero-bg);
  filter: brightness(0.9);
}
.hero-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.4) 100%);
}
.hero-page .container { position: relative; z-index: 1; }
.hero-page .hero-logo { display: none; }
.hero-page h1 { color: var(--hero-title-color, #fff); text-shadow: 0 3px 10px rgba(0,0,0,0.6); }
.hero-page .hero-banner { background: rgba(0,0,0,0.2); padding: 2rem 2.5rem; border-radius: 12px; }
@media (max-width: 768px) {
  .hero-page h1 { font-size: 2.25rem; }
  .hero-page .hero-banner { padding: 1.25rem 1.5rem; }
}

/* Image Marianne intégrée dans le texte en quinconce */
.role-float-right {
  float: right;
  width: 34%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  margin: 0 0 1.1rem 1.25rem;
  shape-outside: inset(0 round 12px);
  shape-margin: 10px;
}

@media (max-width: 768px) {
  .role-float-right { float: none; width: 100%; margin: 0 0 1rem 0; }
}
