/* @import url('https://use.typekit.net/dbu4odp.css');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script&display=swap'); */


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

          body {
              font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
              background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
              color: #2d3748;
              line-height: 1.6;
              min-height: 100vh;
          }

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

          h1 {
              font-size: 32px;
              font-weight: 800;
              margin-bottom: 48px;
              color: #1a202c;
              text-align: center;
          } */

          .refresh-btn {
              background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
              color: white;
              border: none;
              padding: 16px 32px;
              font-size: 16px;
              font-weight: 600;
              cursor: pointer;
              margin: 0 auto 48px;
              display: block;
              box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
              transition: all 0.3s ease;
          }

          .refresh-btn:hover {
              transform: translateY(-2px);
              box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
          }

          #content {
    /* display: grid
; */
    /* grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); */
    /* gap: 32px; */
}

#eventListContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
     gap: 32px;
}



          .event-card {
              background: white;
              display: flex;
              flex-direction: column;
              overflow: hidden;
              box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
              transition: all 0.3s ease;
          }

          .event-card:hover {
              transform: translateY(-8px);
              box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
          }

          .event-image {
              width: 100%;
              height: 220px;
              overflow: hidden;
              position: relative;
          }

          .event-image::after {
              content: '';
              position: absolute;
              top: 0;
              left: 0;
              right: 0;
              bottom: 0;
              background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
          }

          .event-image img {
              width: 100%;
              height: 100%;
              object-fit: cover;
              transition: transform 0.3s ease;
          }

          .event-card:hover .event-image img {
              transform: scale(1.05);
          }

          .event-content {
              padding: 0 28px;
              flex: 1;
              display: flex;
              flex-direction: column;
          }

          .event-title {
              font-weight: 700;
              font-size: 20px;
              margin-bottom: 16px;
              color: #1a202c;
              line-height: 1.3;
          }

          .event-date {
              font-size: 16px;
              font-weight: 600;
              margin-bottom: 12px;
              color: #667eea;
              display: flex;
              align-items: center;
          }

          .event-date::before {
              content: '📅';
              margin-right: 8px;
          }

          .event-location,.event-city {
              font-size: 15px;
              margin-bottom: 16px;
              color: #718096;
              display: flex;
              align-items: center;
          }

          .event-location::before,.event-city::before {
              content: '📍';
              margin-right: 8px;
          }

          .event-description {
              font-size: 15px;
              line-height: 1.6;
              color: #4a5568;
              margin-bottom: 20px;
              flex: 1;
          }

          .event-info {
              font-size: 14px;
              color: #a0aec0;
              padding-top: 16px;
              border-top: 1px solid #e2e8f0;
              display: flex;
              align-items: center;
          }

          .event-info::before {
              content: '🔗';
              margin-right: 8px;
          }

          /* Responsive */
          @media (max-width: 768px) {
              /* .container {
                  padding: 40px 16px;
              } */

              h1 {
                  font-size: 28px;
                  margin-bottom: 36px;
              }

              #content {
                  /* grid-template-columns: 1fr;
                  gap: 24px; */
              }

              .event-card {
                  flex-direction: row;
                  min-height: 160px;
              }

              .event-image {
                  width: 100%;
                  height: 140px;
              }

              .event-content {
                  padding: 20px;
                  flex: 1;
              }

              .event-description {
                  display: none;
              }

              .event-title {
                  font-size: 17px;
                  margin-bottom: 12px;
              }

              .event-date,
              .event-location,.event-city {
                  font-size: 14px;
                  margin-bottom: 8px;
              }

              .event-info {
                  font-size: 13px;
                  padding-top: 12px;
              }
          }



          .event-card:nth-child(1) { animation-delay: 0.1s; }
          .event-card:nth-child(2) { animation-delay: 0.2s; }
          .event-card:nth-child(3) { animation-delay: 0.3s; }
          .event-card:nth-child(4) { animation-delay: 0.4s; }

          @keyframes slideUp {
              to {
                  opacity: 1;
                  transform: translateY(0);
              }
          }

      /* Cacher les divs de contenu */
      .panel-data {
          display: none;
      }

      /* Panel container */
      .panel {
          position: fixed;
          top: 0;
          right: -100%;
          width: 40%;
          height: 100vh;
          background: white;
          box-shadow: -2px 0 10px rgba(0,0,0,0.1);
          transition: right 0.3s ease;
          z-index: 999999999;
          overflow-y: auto;
      }

      .panel.active {
          right: 0;
      }

      .panel-header {
          padding: 20px;
          background: #f8f9fa;
          border-bottom: 1px solid #dee2e6;
          display: flex;
          justify-content: space-between;
          align-items: center;
      }
      .panel-header {
      position: sticky;
      top: 0;
      z-index: 10;
      background-color: #fff; /* Important pour éviter que le fond soit transparent */
      padding: 10px;
      border-bottom: 1px solid #ddd;
     }

      .panel-title {
          font-size: 18px;
          font-weight: bold;
          color: #333;
      }

      .close-btn {
          background: none;
          border: none;
          font-size: 24px;
          cursor: pointer;
          color: #666;
          padding: 5px;
      }

      .close-btn:hover {
          color: #000;
      }

      .panel-content {
          padding: 20px;
      }

      /* Overlay pour desktop */
      .overlay {
          position: fixed;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          background: rgba(0,0,0,0.5);
          z-index: 999;
          opacity: 0;
          visibility: hidden;
          transition: all 0.3s ease;
      }

      .overlay.active {
          opacity: 1;
          visibility: visible;
      }

      /* Responsive - Mobile */
      @media (max-width: 768px) {
          .panel {
              width: 100%;
              right: -100%;
          }

          .overlay {
              display: none;
          }
      }

/* Grille responsive pour la liste */
 #eventListContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 32px;
  justify-content: center;
  width: 95%;
  margin: 0 auto;
  padding: 16px 0;
  align-items: stretch;
}

/* Carte de la liste */
.event-list-item {
  display: flex;
  align-items: stretch;
  max-width: 450px;
  /* min-width: 520px; supprimé pour éviter le chevauchement */
  width: 100%;
  background: #fff;
  /* border-radius: 14px; */
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  margin: 0 auto;
  transition: box-shadow 0.2s, transform 0.2s;
}

          /* Animation d'entrée */
          .event-card {
            animation: slideUp 0.6s ease forwards;
            opacity: 0;
            transform: translateY(30px);
            max-width: 450px;
        }

.event-list-item:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  transform: translateY(-2px) scale(1.01);
}

/* Colonne photo */
.event-list-photo {
  flex: 0 0 120px;
  background: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.event-list-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Colonne centrale */
.event-list-content {
  flex: 1 1 0;
  min-width: 0;
  padding: 18px 20px 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.event-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 2px;
  line-height: 1.2;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-date {
  font-size: 0.98rem;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 2px;
}
.event-location,.event-city {
  font-size: 0.97rem;
  color: #718096;
  margin-bottom: 2px;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-description {
  font-size: 0.97rem;
  color: #4a5568;
  line-height: 1.5;
  margin-top: 4px;
  /* max-height: 3.8em; */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Colonne bouton */
.event-list-action {
  /* flex: 0 0 110px;
  display: flex; */
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: #f8f9fa;
}
.event-list-action .refresh-btn {
  width: 100%;
  min-width: 90px;
  padding: 11px 0;
  font-size: 15px;
  /* border-radius: 7px; */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.10);
}


/* Responsive mobile */
@media (max-width: 600px) {
  .content-list, #eventListContainer {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 8px 0;
  }
  .event-list-item {
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    /* border-radius: 10px; */
  }
  .event-list-photo {
    width: 100%;
    min-height: 140px;
    /* border-radius: 10px 10px 0 0; */
  }
  .event-list-content {
    padding: 14px 10px;
  }
  .event-list-action {
    width: 100%;
    padding: 10px 0 14px 0;
    /* border-radius: 0 0 10px 10px; */
    background: none;
  }
}

@media (max-width: 540px) {
  .content-list, #eventListContainer {
    grid-template-columns: 1fr;
  }
}
/* .aurignac .event-city{background-color:#80a971;}
.cardeilhac .event-city{background-color:#ff8b4d;}
.montmaurin .event-city{background-color:#97155a;} */
/* .aurignac .event-city{color:#80a971;}
.cardeilhac .event-city{color:#ff8b4d;}
.montmaurin .event-city{color:#97155a;} */


.cardeilhac .event-city{color:#075f5c;}
.cassagnabere-tournas .event-city{color:#190c62;}
.boulogne-sur-gesse .event-city{color:#680863;}
.montmaurin .event-city{color:#36131f;}
.blajan .event-city{color:#216f6c;}
.peguilhan .event-city{color:#113e78;}
.aurignac .event-city{color:#6f462f;}
.saint-gaudens .event-city{color:#785373;}
.montrejeau .event-city{color:#0b0b74;}
.l-isle-en-dodon .event-city{color:#437229;}
.terrebasse .event-city{color:#3e2a1a;}
.latoue .event-city{color:#72547a;}
.lieoux .event-city{color:#091050;}
.villeneuve-de-riviere .event-city{color:#282f6c;}
.saint-frajou .event-city{color:#023e02;}
.riolas .event-city{color:#334d27;}
.boussan .event-city{color:#740308;}
.boudrac .event-city{color:#3b357e;}
.saint-andre .event-city{color:#772e4a;}
.montesquieu-guittaut .event-city{color:#705d36;}
.saint-laurent .event-city{color:#3d5b1f;}
.bachas .event-city{color:#0d147c;}
.alan .event-city{color:#351519;}
.cazac .event-city{color:#3e107e;}
.labastide-paumes .event-city{color:#6d0115;}
.coueilles .event-city{color:#422b57;}
.pointis-inard .event-city{color:#770b57;}
.balesta .event-city{color:#450757;}
.labarthe-inard .event-city{color:#331312;}

.event-list-action.cardeilhac, .cardeilhac .refresh-btn{background:#075f5c;}
.event-list-action.cassagnabere-tournas, .cassagnabere-tournas .refresh-btn{background:#190c62;}
.event-list-action.boulogne-sur-gesse, .boulogne-sur-gesse .refresh-btn{background:#680863;}
.event-list-action.montmaurin, .montmaurin .refresh-btn{background:#36131f;}
.event-list-action.blajan, .blajan .refresh-btn{background:#216f6c;}
.event-list-action.peguilhan, .peguilhan .refresh-btn{background:#113e78;}
.event-list-action.aurignac, .aurignac .refresh-btn{background:#6f462f;}
.event-list-action.saint-gaudens, .saint-gaudens .refresh-btn{background:#785373;}
.event-list-action.montrejeau, .montrejeau .refresh-btn{background:#0b0b74;}
.event-list-action.l-isle-en-dodon, .l-isle-en-dodon .refresh-btn{background:#437229;}
.event-list-action.terrebasse, .terrebasse .refresh-btn{background:#3e2a1a;}
.event-list-action.latoue, .latoue .refresh-btn{background:#72547a;}
.event-list-action.lieoux, .lieoux .refresh-btn{background:#091050;}
.event-list-action.villeneuve-de-riviere, .villeneuve-de-riviere .refresh-btn{background:#282f6c;}
.event-list-action.saint-frajou, .saint-frajou .refresh-btn{background:#023e02;}
.event-list-action.riolas, .riolas .refresh-btn{background:#334d27;}
.event-list-action.boussan, .boussan .refresh-btn{background:#740308;}
.event-list-action.boudrac, .boudrac .refresh-btn{background:#3b357e;}
.event-list-action.saint-andre, .saint-andre .refresh-btn{background:#772e4a;}
.event-list-action.montesquieu-guittaut, .montesquieu-guittaut .refresh-btn{background:#705d36;}
.event-list-action.saint-laurent, .saint-laurent .refresh-btn{background:#3d5b1f;}
.event-list-action.bachas, .bachas .refresh-btn{background:#0d147c;}
.event-list-action.alan, .alan .refresh-btn{background:#351519;}
.event-list-action.cazac, .cazac .refresh-btn{background:#3e107e;}
.event-list-action.labastide-paumes, .labastide-paumes .refresh-btn{background:#6d0115;}
.event-list-action.coueilles, .coueilles .refresh-btn{background:#422b57;}
.event-list-action.pointis-inard, .pointis-inard .refresh-btn{background:#770b57;}
.event-list-action.balesta, .balesta .refresh-btn{background:#450757;}
.event-list-action.labarthe-inard, .labarthe-inard .refresh-btn{background:#331312;}

.biganos .event-city{color:#7b636a;}
.lanton .event-city{color:#71306c;}
.marcheprime .event-city{color:#625144;}
.audenge .event-city{color:#614a72;}
.mios .event-city{color:#124a13;}

.biganos .refresh-btn{background:#7b636a;}
.lanton .refresh-btn{background:#71306c;}
.marcheprime .refresh-btn{background:#625144;}
.audenge .refresh-btn{background:#614a72;}
.mios .refresh-btn{background:#124a13;}




.event-city {
    font-family: 'Dancing Script', cursive;
    margin-bottom: 4px;
    font-size: 130%;
    color: #939393;
    display: inline-block;
}
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 95%;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-right: auto;
    margin-left: auto;
  }

  .filter-controls input,
  .filter-controls select {
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
  }

  @media (max-width: 600px) {
    .filter-controls {
      flex-direction: column;
      align-items: stretch;
    }
  }
  .filter-controls {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #fff; /* Important pour éviter que le fond soit transparent */
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

#searchInput, input#dateFilter, input#endDateFilter,input.form-control.input.active,input.form-control.input,button#resetFiltersBtn,button#searchBtn {
  flex: 1; /* Prend l'espace restant */
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}

#cityFilter,#typeHebergementFilter {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}



















/* Définissez des transitions fluides pour les éléments concernés */
body.panel-open #content,
body.panel-open .overlay,
body.panel-open .panel {
  transition: transform 0.5s ease-in-out, margin-right 0.5s ease-in-out;
}

/* Par défaut, le panneau est caché sur la droite */
.panel {
  transform: translateX(100%);
}

/* Lorsqu'on a la classe 'panel-open', le contenu principal est décalé et le panneau est visible */
body.panel-open #content {
  margin-right: 40%; /* Ou la largeur de votre panneau */
}


body.panel-open .panel {
  transform: translateX(0); /* Fait apparaître le panneau */
}














/* ========================================= */
/* Version mobile (par défaut)               */
/* ========================================= */

/* Cache le bouton "Masquer/Afficher les filtres" par défaut sur les écrans larges */
.toggle-btn {
  display: block; /* Visible sur mobile */
  cursor: pointer;
  text-align: center;
  padding: 10px;
  background-color: #007bff;
  color: white;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* Cache les options de filtres par défaut sur les écrans mobiles */
.filter-options {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  flex-wrap: wrap; /* Assure le bon alignement */
  gap: 10px;
  align-items: center;
}

/* Affiche les options de filtres lorsque la classe 'active' est ajoutée par le JavaScript */
.filter-controls.active .filter-options {
  max-height: 500px; /* Valeur généreuse pour un effet de déploiement fluide */
  transition: max-height 0.5s ease-in;
}

/* ========================================= */
/* Version desktop (au-delà de 768px)       */
/* ========================================= */

@media (min-width: 768px) {
  /* Masque le bouton de bascule sur les écrans larges */
  .toggle-btn {
      display: none;
  }

  /* Affiche toujours les options de filtres sur les écrans larges */
  .filter-options {
      display: flex;
      max-height: none; /* Supprime la limite de hauteur */
      overflow: visible; /* Rends le contenu visible */
  }

  /* Ajuste la disposition des filtres sur le bureau */
  .filter-controls {
      flex-direction: row;
      gap: 10px;
      align-items: center;
  }
}