/*
 Theme Name:   Divi Enfant
 Theme URI:    https://www.elegantthemes.com/gallery/divi/
 Description:  Thème enfant de Divi pour la Mairie de Francheleins
 Author:       Mairie de Francheleins
 Author URI:   https://www.francheleins.fr
 Template:     Divi
 Version:      1.0
*/

/* =========================================================
   STYLES PERSONNALISÉS - MAIRIE DE FRANCHELEINS
========================================================= */


/* =========================================================
   PUBLICATIONS
========================================================= */
.fm-publications-title {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 1.6rem;
  color: #3182b5;
  margin-top: 30px;
  margin-bottom: 15px;
}

.fm-publications-section h3 {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 1.2rem;
  color: #b2c95b;
  margin-top: 20px;
  margin-bottom: 10px;
}

.fm-publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.fm-publication-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: 0.3s ease;
}
.fm-publication-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.fm-publication-thumb {
  width: 100%;
  height: 250px;
  background-color: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.fm-publication-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fm-publication-body { padding: 15px; }

.fm-publication-title {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 1.1rem;
  color: #b2c95b;
  margin-bottom: 8px;
}

.fm-publication-meta {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 8px;
}

.fm-publication-btn {
  display: inline-block;
  background: #0b6b3a;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.fm-publication-btn:hover { background: #0e8044; }

/* =========================================================
   BUDGETS (CORRIGÉ - 2 COLONNES)
========================================================= */
.fm-budgets-section {
    margin: 60px auto;
    max-width: 1100px;
}

.fm-budget-year {
    color: #3182b5;
    font-family: Verdana, sans-serif;
    font-size: 1.8em;
    margin-top: 40px;
    border-bottom: 2px solid #b2c95b;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.fm-budget-grid {
    display: grid;
    /* On passe à 2 colonnes maximum en augmentant la taille minimale à 450px */
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.fm-budget-card {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fm-budget-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.fm-budget-title {
    font-family: Verdana, sans-serif;
    color: #b2c95b;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
}

.fm-budget-btn {
    display: inline-block;
    background-color: #3182b5;
    color: #ffffff !important;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.9em;
    transition: background 0.3s;
    align-self: flex-start;
}

.fm-budget-btn:hover {
    background-color: #b2c95b;
}

/* Ajustement pour les petits écrans (tablettes/mobiles) */
@media (max-width: 980px) {
    .fm-budget-grid {
        grid-template-columns: 1fr; /* Repasse en 1 colonne sur mobile */
    }
}

/* =========================================================
   ANNUAIRE DES ASSOCIATIONS — NOUVELLE VERSION
========================================================= */

/* ---- Zone recherche + index alphabétique ---- */
.annuaire-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
  font-family: Verdana, sans-serif;
  color: #3182b5;
}

#annuaire-search {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #c6d6e2;
  font-size: 1rem;
}

.annuaire-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.annuaire-letter {
  color: #3182b5;
  font-weight: bold;
  text-decoration: none;
}
.annuaire-letter:hover { color: #b2c95b; }

/* ---- Layout une colonne ---- */
.annuaire-associations-grid {
  display: block !important;
}

.association-card {
  background: #ffffff;
  border: 1px solid #e2eaf2;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: 0.3s ease;
}
.association-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* ---- Logo ---- */
.assoc-logo img {
  max-width: 150px;
  display: block;
  margin: 0 auto 15px auto;
}

/* ---- Titre ---- */
.assoc-title {
  font-family: Verdana, sans-serif;
  font-weight: bold;
  color: #b2c95b !important;
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 4px;
}

/* ---- Date création ---- */
.assoc-creation {
  text-align: center;
  font-size: 0.95rem;
  color: #3182b5;
  margin-bottom: 14px;
}

/* ---- Bureau (Président/Trésorier/Secrétaire) ---- */
.assoc-board {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 14px;
}
.assoc-board-item {
  padding: 6px 12px;
  background: rgba(49,130,181,0.08);
  color: #3182b5;
  border-radius: 12px;
  font-size: 0.95rem;
}

/* ---- Description ---- */
.assoc-description {
  margin: 12px 0;
  font-size: 0.96rem;
  line-height: 1.45;
  color: #3182b5;
  text-align: center;
}

/* ---- Dates à retenir / Horaires ---- */
.assoc-dates {
  font-size: 0.95rem;
  color: #3182b5;
  text-align: center;
  margin-bottom: 14px;
}
.assoc-dates strong {
  color: #3182b5;
}

/* ---- Boutons d’action ---- */
.assoc-buttons {
  margin: 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.assoc-btn {
  min-width: 120px;
  text-align: center;
  background: #3182b5;
  color: #fff !important;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
}
.assoc-btn:hover { background: #1d5f8e; }

/* ---- Galerie photos ---- */
.assoc-photos {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.assoc-photos img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e6eef6;
  cursor: pointer;
  transition: 0.3s;
}
.assoc-photos img:hover {
  transform: scale(1.04);
  box-shadow: 0px 4px 12px rgba(0,0,0,0.2);
}

/* ---- Lightbox ---- */
#assoc-lightbox {
  position: fixed;
  display: none;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 99999;
}
#assoc-lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .assoc-board-item { width: 100%; text-align: center; }
  .assoc-btn { min-width: 100%; }
  .annuaire-top { flex-direction: column; gap: 10px; }
}

/* =========================================================
   OFFRES D’EMPLOI ET RGPD
========================================================= */

/* Texte RGPD */
.rgpd-texte {
    text-align: justify;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Liste des offres */
.liste-offres-emploi {
    margin-bottom: 30px;
}

/* Chaque offre */
.offre-item {
    border-bottom: 1px solid #e6e6e6;
    padding: 18px 0;
}

/* Container flex image + texte */
.offre-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

/* Colonne image */
.offre-thumb {
    flex: 0 0 150px;
    height: 150px;
    overflow: hidden;
}
.offre-thumb img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
}

/* Colonne texte */
.offre-content {
    flex: 1;
}

/* Titre de l'offre – H2, Verdana, bleu */
.offre-title {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 20px;
    color: #3182b5;
    margin-bottom: 8px;
}

/* Meta infos (Type, Temps, Service, Date limite) */
.offre-meta {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    color: #3182b5;
    margin-bottom: 10px;
}

/* Extrait de l'annonce */
.offre-excerpt {
    color: #3182b5;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    margin-top: 12px;
}

/* Bouton PDF */
.btn-fiche {
    display: inline-block;
    padding: 8px 12px;
    background: #3182b5;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.btn-fiche:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .offre-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .offre-thumb {
        width: 100%;
        height: auto;
    }
    .offre-thumb img {
        width: 100%;
        height: auto;
    }
}