/* ============================================
   GRANGES-AUMONTZEY AUTREMENT — STYLE PRINCIPAL
   ============================================ */

:root {
  --blue: #1a3c6e;
  --blue-dark: #12294d;
  --orange: #f2932e;
  --green: #4caf50;
  --green-dark: #3d8b40;
  --green-light: #eaf4e3;
  --green-tres-clair: #f4faf0;
  --gray-light: #f4f5f7;
  --gray-medium: #e0e0e0;
  --text-dark: #222;
  --text-light: #666;
  --white: #ffffff;
  --radius: 8px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue);
  transition: color 0.2s ease;
}

h1, h2, h3, h4 {
  color: var(--blue);
  line-height: 1.3;
  margin-bottom: 15px;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; margin-top: 30px; }
h3 { font-size: 1.2rem; }

p { margin-bottom: 15px; color: var(--text-dark); }

ul { padding-left: 0; }

/* ============================================
   HEADER
   ============================================ */

.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo {
  height: 110px;
  width: auto;
}

.main-nav ul {
  display: flex;
  gap: 25px;
  list-style: none;
}

.main-nav a {
  text-decoration: none;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 4px;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  border-bottom-color: var(--green);
  color: var(--green-dark);
}

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--blue);
  cursor: pointer;
}

/* ============================================
   HERO (ACCUEIL)
   ============================================ */

.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--green);
  opacity: 0.15;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  font-size: 2.6rem;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #e6ecf5;
  margin-bottom: 30px;
}

/* ============================================
   BOUTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}

.btn-primary:hover {
  background: #d97e1f;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--green);
  color: var(--white);
  margin-left: 10px;
}

.btn-secondary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ============================================
   SECTIONS GÉNÉRALES
   ============================================ */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 20px;
}

.section h1 {
  border-bottom: 4px solid var(--green);
  display: inline-block;
  padding-bottom: 10px;
  margin-bottom: 25px;
}

.section-title {
  color: var(--blue);
  border-left: 5px solid var(--green);
  padding-left: 12px;
  margin-bottom: 20px;
}

.empty-state {
  color: var(--text-light);
  font-style: italic;
  background: var(--green-tres-clair);
  padding: 15px;
  border-radius: var(--radius);
}

/* ============================================
   CARTES ACTUALITÉS (accueil / blog)
   ============================================ */

.actu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.actu-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.actu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.actu-card img {
  height: 180px;
  width: 100%;
  object-fit: cover;
}

.actu-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.actu-date {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.read-more {
  margin-top: auto;
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.read-more:hover {
  text-decoration: underline;
}

.see-more {
  display: inline-block;
  margin-top: 25px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

/* ============================================
   PAGE À PROPOS
   ============================================ */

.elus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 20px 0 30px;
}

.elu-card {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 25px;
  text-align: center;
  border-top: 4px solid var(--green);
}

.objectives-list {
  list-style: none;
  margin-top: 15px;
}

.objectives-list li {
  background: var(--gray-light);
  border-left: 4px solid var(--blue);
  padding: 15px 20px;
  margin-bottom: 12px;
  border-radius: 4px;
}

/* ============================================
   CONSEIL MUNICIPAL
   ============================================ */

.conseils-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 25px;
}

.conseil-card {
  display: flex;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-top: 4px solid var(--green);
}

.conseil-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.conseil-card.conseil-passe {
  border-top-color: var(--blue);
}

.conseil-card .conseil-date {
  background: var(--green);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 15px;
  min-width: 90px;
  text-align: center;
  border-radius: 0;
  margin-bottom: 0;
}

.conseil-card.conseil-passe .conseil-date {
  background: var(--blue);
}

.conseil-card .conseil-date .jour {
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
}

.conseil-card .conseil-date .mois {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-top: 4px;
}

.conseil-card .conseil-date .annee {
  font-size: 0.8rem;
  opacity: 0.85;
}

.conseil-infos {
  padding: 18px 20px;
  flex: 1;
}

.conseil-infos h3 {
  margin-top: 0;
  color: var(--blue);
}

.conseil-heure, .conseil-salle {
  margin: 4px 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.conseil-infos details {
  margin: 12px 0;
  background: var(--green-tres-clair);
  border: 1px solid var(--green-light);
  border-radius: 6px;
  padding: 12px 18px;
}

.conseil-infos details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--green-dark);
  outline: none;
}

.conseil-infos details p {
  margin: 10px 0 0;
  line-height: 1.6;
}

.conseil-infos a {
  display: inline-block;
  margin-top: 15px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

/* Ancien style .conseil-item conservé pour compatibilité si utilisé ailleurs */
.conseil-item {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 20px;
  border-left: 5px solid var(--blue);
}

.conseil-item details {
  margin-top: 15px;
  background: var(--white);
  border-radius: 6px;
  padding: 12px 18px;
}

.conseil-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--orange);
}

.conseil-item a {
  display: inline-block;
  margin-top: 15px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

/* ============================================
   PROJETS
   ============================================ */

.projets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.projet-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-dark);
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.projet-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.projet-card img {
  height: 170px;
  width: 100%;
  object-fit: cover;
}

.projet-card h3,
.projet-card p {
  padding: 0 18px;
}

.projet-card h3 {
  margin-top: 12px;
}

.projet-card p {
  padding-bottom: 18px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  margin: 12px 18px 0;
}

.badge-a_venir {
  background: #fdecd2;
  color: #b56a12;
}

.badge-en_cours {
  background: var(--green-light);
  color: var(--green-dark);
}

.badge-termine {
  background: #d7f0d7;
  color: var(--green-dark);
}

.badge-avenir {
  background: var(--green-light);
  color: var(--green-dark);
}

.badge-passe {
  background: #e3ecf5;
  color: var(--blue);
}

.projet-header {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.projet-header h1 {
  margin: 0;
  border-bottom: none;
}

.projet-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 25px;
}

.projet-detail .projet-image {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.projet-info {
  flex: 2;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.projet-bloc {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-left: 4px solid var(--green);
}

.projet-bloc h2 {
  margin-top: 0;
  color: var(--blue);
  font-size: 1.2rem;
}

.avis-box {
  background: var(--green-tres-clair);
  border-left: 4px solid var(--orange);
  padding: 18px 22px;
  margin-top: 15px;
  border-radius: 4px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  color: var(--green-dark);
}

/* ============================================
   FORMULAIRES (contact / newsletter)
   ============================================ */

.contact-form,
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 650px;
  margin-top: 20px;
}

.contact-form label,
.newsletter-form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  gap: 6px;
  color: var(--blue);
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.newsletter-form input {
  padding: 11px 14px;
  border: 1px solid var(--gray-medium);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus,
.newsletter-form input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.contact-form textarea {
  resize: vertical;
}

.rgpd-label {
  flex-direction: row !important;
  align-items: flex-start;
  font-weight: normal !important;
  font-size: 0.85rem;
  gap: 10px !important;
  color: var(--text-dark) !important;
}

.rgpd-label input {
  width: auto;
  margin-top: 3px;
}

.rgpd-label a {
  color: var(--orange);
  font-weight: 600;
}

/* ============================================
   ALERTES
   ============================================ */

.alert {
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid var(--green);
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #c0392b;
}

/* ============================================
   ÉVÉNEMENTS
   ============================================ */

.event-list {
  margin-top: 15px;
  padding-left: 20px;
}

.event-list li {
  margin-bottom: 12px;
  list-style: disc;
  color: var(--text-dark);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--blue-dark);
  color: var(--white);
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-logo {
  height: 100px;
  margin-bottom: 15px;
  filter: brightness(0) invert(1);
}

.footer-col h4 {
  color: var(--green);
  margin-bottom: 15px;
  font-size: 1.05rem;
}

.footer-col p {
  color: #cdd7e6;
  font-size: 0.9rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--green);
}

.footer-col .newsletter-form label {
  color: var(--white);
  font-size: 0.9rem;
}

.footer-col .rgpd-label {
  color: #cdd7e6 !important;
}

.footer-col .rgpd-label a {
  color: var(--orange);
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.8rem;
  color: #cdd7e6;
}

/* ============================================
   BACK-OFFICE (ADMIN)
   ============================================ */

.admin-section {
  max-width: 1100px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-medium);
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
}

.admin-table tr:hover {
  background: var(--gray-light);
}

.admin-table a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

.delete-link {
  color: #c0392b !important;
}

/* ============================================
   ARTICLE
   ============================================ */

.retour {
  margin-bottom: 20px;
}
.retour a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}
.retour a:hover {
  text-decoration: underline;
}

/* ============================================
   HEADER ADMIN
   ============================================ */

.admin-header {
  background-color: #1e293b;
  color: #fff;
  padding: 12px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.admin-header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.admin-logo a {
  color: #fff;
  font-weight: bold;
  font-size: 1.2em;
  text-decoration: none;
}

.admin-nav {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.admin-nav-link {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.95em;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s;
  white-space: nowrap;
}

.admin-nav-link:hover {
  background-color: #334155;
}

.btn-logout {
  background-color: #dc2626;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95em;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-logout:hover {
  background-color: #b91c1c;
}


/* ============================================
   BARRE RECHERCHE
   ============================================ */

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f7f7f7;
    border-radius: 10px;
}

.search-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--blue);
}

.search-form select {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    cursor: pointer;
}

.search-form button {
    padding: 10px 22px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-form button:hover {
    background: var(--orange);
}

.search-form .reset-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.search-form .reset-link:hover {
    text-decoration: underline;
    color: var(--orange);
}

@media (max-width: 600px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .burger {
    display: block;
  }

  .main-nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    background: var(--white);
    position: absolute;
    top: 100%;
    left: 0;
    box-shadow: var(--shadow);
  }

  .main-nav ul.open {
    display: flex;
  }

  .main-nav a {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-medium);
    width: 100%;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero {
    padding: 60px 20px;
  }

  .projet-detail {
    flex-direction: column;
  }

  .admin-table {
    font-size: 0.8rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 10px;
  }

  .admin-header-container {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-nav {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 30px 15px;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }

  .logo {
    height: 110px;
  }
}

@media (min-width: 700px) {
  .projet-detail {
    flex-direction: row;
    align-items: flex-start;
  }
}