/* =================================
   SALLES DE RECEPTION - Styles
   ================================= */

/* Panel des filtres */
.filters-panel {
  background: linear-gradient(135deg, #fdfbf7 0%, #f8f4eb 100%);
  border: 2px solid #7f6f4b;
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 40px rgba(127, 111, 75, 0.1);
}

.filters-title {
  font-family: 'Dancing Script', cursive;
  color: #7f6f4b;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.filter-group select {
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-group select:hover,
.filter-group select:focus {
  border-color: #7f6f4b;
  box-shadow: 0 0 0 3px rgba(127, 111, 75, 0.1);
  outline: none;
}

/* Tags type d'événement */
.filter-tags-section {
  padding-top: 1rem;
}

.filter-tags-label {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.filter-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-tag {
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  background: rgba(127, 111, 75, 0.08);
  color: #333;
  border: 1px solid rgba(127, 111, 75, 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.filter-tag:hover {
  background: rgba(127, 111, 75, 0.15);
  border-color: rgba(127, 111, 75, 0.4);
}

.filter-tag.active {
  background: #7f6f4b;
  color: #fff;
  border-color: #7f6f4b;
}

.filters-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(127, 111, 75, 0.2);
}

.btn-reset {
  background: transparent;
  border: 2px solid #7f6f4b;
  color: #7f6f4b;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-reset:hover {
  background: #7f6f4b;
  color: white;
}

.results-count {
  font-weight: 600;
  color: #666;
  font-size: 0.95rem;
}

/* Carte interactive */
.map-container {
  margin-bottom: 2rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 2px solid #7f6f4b;
}

#map-salles {
  height: 500px;
  width: 100%;
  background: #f5f5f5;
}

/* Marqueur personnalisé doré */
.custom-marker {
  background: transparent;
  border: none;
}

.marker-pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, #7f6f4b 0%, #b8922a 100%);
  position: relative;
  transform: rotate(-45deg);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.marker-pin::after {
  content: '';
  width: 14px;
  height: 14px;
  background: white;
  position: absolute;
  top: 8px;
  left: 8px;
  border-radius: 50%;
}

/* Popup Leaflet personnalisé */
.leaflet-popup-content-wrapper {
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  padding: 0;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0;
  min-width: 200px;
  max-width: 280px;
}

.popup-content {
  padding: 0;
}

.popup-image {
  width: 100%;
  height: 150px;
  overflow: hidden;
}

.popup-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup-content h3 {
  font-family: 'Dancing Script', cursive;
  padding: 0.75rem 1rem 0;
  color: #7f6f4b;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.popup-content p {
  margin: 0.3rem 0;
  padding: 0 1rem;
  font-size: 0.9rem;
  color: #555;
}

.popup-content p:last-child {
  padding-bottom: 1rem;
}

.popup-content a {
  color: #7f6f4b;
  font-weight: 600;
}

.popup-address {
  font-style: italic;
  color: #777 !important;
}

/* Liste des salles */
.salles-list-container {
  margin-top: 2rem;
}

.salles-list-title {
  font-family: 'Dancing Script', cursive;
  color: #7f6f4b;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.salles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

/* Carte de salle */
.salle-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #eee;
}

.salle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(127, 111, 75, 0.15);
}

.salle-card-image {
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f4eb 0%, #e8e4db 100%);
}

.salle-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.salle-card-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.salle-card-no-image span {
  color: #999;
  font-style: italic;
}

.salle-card-content {
  padding: 1.5rem;
}

.salle-card-title {
  font-family: 'Dancing Script', cursive;
  color: #7f6f4b;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

/* Badges */
.salle-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  padding: 0.3rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-capacite {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-province {
  background: #e3f2fd;
  color: #1565c0;
}

.badge-hebergement {
  background: #fff3e0;
  color: #ef6c00;
}

.badge-pmr {
  background: #f3e5f5;
  color: #7b1fa2;
}

.badge-parking {
  background: #fce4ec;
  color: #c2185b;
}

.salle-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Contact salle */
.salle-contact {
  margin-bottom: 1rem;
}

.salle-contact p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #555;
  font-size: 0.9rem;
  margin: 0.4rem 0;
}

.salle-contact svg {
  color: #7f6f4b;
  flex-shrink: 0;
}

.salle-website-btn {
  display: inline-block;
  background: linear-gradient(135deg, #7f6f4b 0%, #b8922a 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.salle-website-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(127, 111, 75, 0.4);
}

/* Loading spinner */
.loading-spinner {
  text-align: center;
  padding: 3rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #7f6f4b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Messages */
.no-results,
.error-message {
  text-align: center;
  padding: 3rem;
  color: #666;
  grid-column: 1 / -1;
}

.error-message {
  color: #d32f2f;
}

/* Responsive */
@media (max-width: 768px) {
  .filters-panel {
    padding: 1.5rem;
  }

  .filters-title {
    font-size: 1.6rem;
  }

  .filters-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .filters-actions {
    flex-direction: column;
    text-align: center;
  }

  #map-salles {
    height: 350px;
  }

  .salles-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .salles-list-title {
    font-size: 2rem;
  }

  .salle-card-image {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .filters-panel {
    padding: 1rem;
    border-radius: 15px;
  }

  .map-container {
    border-radius: 15px;
  }

  .salle-card {
    border-radius: 15px;
  }

  .salle-badges {
    gap: 0.3rem;
  }

  .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
}

/* =================================
   POPUP MODAL SALLE
   ================================= */

/* Bouton "Voir les détails" sur les cartes */
.salle-details-btn {
  display: inline-block;
  color: #7f6f4b;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  transition: color 0.3s ease;
}

.salle-card:hover .salle-details-btn {
  color: #b8922a;
}

/* Overlay du popup */
.salle-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.salle-popup-overlay.active {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

/* Modal */
.salle-popup-modal {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.salle-popup-overlay.active .salle-popup-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Bouton fermer */
.popup-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.popup-close-btn:hover {
  background: #7f6f4b;
  transform: scale(1.1);
}

.popup-close-btn:hover svg {
  fill: white;
}

.popup-close-btn svg {
  fill: #333;
  transition: fill 0.2s ease;
}

/* Contenu scrollable */
.popup-salle-content {
  overflow-y: auto;
  max-height: 90vh;
}

/* Carousel d'images */
.popup-carousel {
  position: relative;
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #f8f4eb 0%, #e8e4db 100%);
}

.carousel-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

/* Boutons navigation carousel */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  z-index: 20;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.carousel-btn:hover {
  background: #7f6f4b;
}

.carousel-btn:hover svg {
  fill: white;
}

.carousel-btn svg {
  fill: #333;
  transition: fill 0.2s ease;
}

.carousel-prev {
  left: 15px;
}

.carousel-next {
  right: 15px;
}

/* Points indicateurs carousel */
.carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.carousel-dot.active {
  background: #7f6f4b;
  transform: scale(1.2);
}

/* Pas d'image */
.popup-no-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #f8f4eb 0%, #e8e4db 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-style: italic;
}

/* Section détails */
.popup-details {
  padding: 1.5rem 2rem 2rem;
}

.popup-title {
  font-family: 'Dancing Script', cursive;
  color: #7f6f4b;
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Badges popup */
.popup-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* Badge supplémentaires */
.badge-terrasse {
  background: #e0f7fa;
  color: #00838f;
}

.badge-wifi {
  background: #e8eaf6;
  color: #3949ab;
}

.badge-ambiance {
  background: #fef3e2;
  color: #e65100;
}

.badge-type-event {
  background: #f3e5f5;
  color: #8e24aa;
}

/* Infos complémentaires popup */
.popup-infos-complementaires {
  background: #f9f9f9;
  border-left: 3px solid #7f6f4b;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0 8px 8px 0;
}

.popup-infos-complementaires p {
  margin: 0.4rem 0;
  color: #555;
  font-size: 0.95rem;
}

.popup-infos-complementaires p:first-child {
  margin-top: 0;
}

.popup-infos-complementaires p:last-child {
  margin-bottom: 0;
}

.popup-infos-complementaires strong {
  color: #333;
}

/* Description */
.popup-description {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Section contact */
.popup-contact-section {
  background: #fdfbf7;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.popup-contact-section h4 {
  color: #7f6f4b;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.popup-contact-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.popup-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #555;
  font-size: 0.95rem;
}

.popup-contact-item svg {
  color: #7f6f4b;
  flex-shrink: 0;
  margin-top: 2px;
}

.popup-contact-item a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s ease;
}

.popup-contact-item a:hover {
  color: #7f6f4b;
}

/* Bouton site web */
.popup-website-btn {
  display: inline-block;
  background: linear-gradient(135deg, #7f6f4b 0%, #b8922a 100%);
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.popup-website-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(127, 111, 75, 0.4);
}

/* Responsive popup */
@media (max-width: 768px) {
  .salle-popup-modal {
    width: 95%;
    max-height: 85vh;
    border-radius: 15px;
  }

  .popup-carousel {
    height: 220px;
  }

  .popup-details {
    padding: 1.25rem 1.5rem 1.5rem;
  }

  .popup-title {
    font-size: 1.6rem;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
  }

  .popup-close-btn {
    width: 36px;
    height: 36px;
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .salle-popup-modal {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .popup-carousel {
    height: 200px;
  }

  .popup-details {
    padding: 1rem 1.25rem 1.5rem;
  }

  .popup-title {
    font-size: 1.4rem;
  }

  .popup-badges {
    gap: 0.4rem;
  }

  .popup-contact-section {
    padding: 1rem;
  }
}
