/* --- GÉNÉRAL --- */
:root {
  --primary-color: #ffffff;
  --secondary-color: #f1f5f9;
  --text-color: #ffffff;
  --light-text-color: #ffffff;
  --border-color: #e2e8f0;
  --background-color: #0000006e;
  --card-hover-color: #982a2aa0;
  --font-family: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-family); color: var(--text-color); background-color: #000; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
#hero { height: 100vh; background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url(/media/a.jpg); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 5%; position: relative; }
.hero-content h1 { color: white; font-size: 4rem; font-weight: 700; max-width: 650px; line-height: 1.2; text-shadow: 0 2px 4px rgba(0,0,0,0.5); font-family: 'Erotique', sans-serif; margin-bottom: 30px; }
.hero-enter-btn { background-color: var(--primary-color); color: #9d5600; border: 2px solid var(--primary-color); padding: 15px 35px; font-size: 1.2rem; font-weight: 700; border-radius: 50px; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 1px; }
.hero-enter-btn:hover { background-color: transparent; color: var(--primary-color); }

/* --- NAVBAR --- */
header.site-nav {
  background: var(--background-color);
  padding: 0 24px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
header.site-nav .logo-img { height: 60px; cursor: pointer; }
header.site-nav .logo-img img { max-height: 100%; width: auto; }
.desktop-nav a { color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.3); font-family: 'erotique', sans-serif; text-decoration: none; margin-left: 1rem; }
.desktop-nav a:hover { color: var(--primary-color); }

/* --- PAGE CONTENT --- */
#page-content { display: none; position: relative; z-index: 1; }

/* --- MAIN VIEW & MAP --- */
#main-view { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; display: block; }
#map { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.leaflet-container { width: 100%; height: 100%; }

/* --- FLOATING UI --- */
.floating-ui-container {
  position: absolute;
  top: 85px;
  left: 20px;
  bottom: 40px;
  width: 380px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 20px;
  pointer-events: none;
}
.search-filters-box, .results-list-box {
  background-color: rgba(19, 0, 68, 0.95);
  backdrop-filter: blur(5px);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  pointer-events: auto;
  flex-shrink: 0;
}
.search-filters-box h4 { font-size: 1.2rem; font-weight: 600; margin-bottom: 15px; color: #fefefe; }
.search-filters-box .filter-inputs { display: flex; flex-direction: column; gap: 12px; }
.search-filters-box input,
.search-filters-box select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-family);
  background-color: #f9fafb;
  color: #333;
}
#search-btn { width: 100%; margin-top: 20px; padding: 12px; border: none; border-radius: 8px; background-color: #e53e3e; color: white; font-weight: 700; font-size: 1rem; cursor: pointer; transition: background-color 0.2s; }
#search-btn:hover { background-color: #c53030; }

.results-list-box {
  padding: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  flex-grow: 1;
}

/* --- CLUB LIST & CARDS --- */
.club-list { overflow-y: auto; padding: 8px; background-color: #140042; }
.club-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; margin: 0 8px 8px 8px; cursor: pointer; transition: background-color 0.2s ease; position: relative; }
.club-card:hover, .club-card.active { background-color: #002455; }
.club-card-image { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.club-card-info { flex-grow: 1; }
.club-card-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; color: var(--text-color); white-space: nowrap; overflow: hidden;text-overflow: ellipsis;}
.club-card-info p { color: var(--light-text-color); font-size: 0.85rem; margin: 0; }
.club-card-price { position: absolute; top: 12px; right: 12px; font-size: 0.9rem; font-weight: 700; color: #ffffff; }

.star-rating { margin-bottom: 6px; }
.star { font-size: 1.1rem; color: #e2e8f0; }
.star.filled { color: #f59e0b; }

.pagination { padding: 16px; background: transparent; border-top: 1px solid #4a5568; text-align: center; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.pagination button { padding: 8px 16px; border: 1px solid var(--border-color); border-radius: 8px; background: white; cursor: pointer; color: #1a202c; }
.pagination button:hover:not(:disabled) { background-color: var(--secondary-color); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
#page-info { font-size: 0.9rem; color: var(--light-text-color); }

/* --- DETAIL VIEW --- */
#detail-view { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow-y: auto; z-index: 1100; padding: 97px 32px 32px; background-color: #1a202c; color: #e2e8f0; }
#back-btn { background: none; border: none; color: #f59e0b; cursor: pointer; margin-bottom: 24px; font-size: 1rem; font-weight: 500; display: flex; align-items: center; }
#back-btn:hover { text-decoration: underline; }
.club-tabs { display: flex; border-bottom: 1px solid #4a5568; margin-bottom: 24px; }
.club-tabs button { flex-grow: 1; padding: 14px; border: none; background: none; cursor: pointer; font-size: 1rem; font-family: var(--font-family); color: #a0aec0; font-weight: 500; border-bottom: 3px solid transparent; transition: all 0.3s ease; }
.club-tabs button.active { border-bottom-color: #f59e0b; color: #ffffff; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.overview-columns { display: grid; grid-template-columns: 1fr 320px; gap: 32px; }
#club-name { font-size: 2.5rem; font-weight: 700; margin-bottom: 8px; color: #ffffff; }
p.address { font-size: 1.1rem; color: #a0aec0; margin-bottom: 24px; }
.overview-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.overview-photos img { width: 100%; height: auto; border-radius: 12px; object-fit: cover; aspect-ratio: 4/3; background-color: #2d3748; }
.overview-right h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.overview-map { width: 100%; height: 250px; border: 1px solid #4a5568; border-radius: 12px; cursor: pointer; overflow: hidden; }
.detail-section { padding-top: 24px; border-top: 1px solid #4a5568; }
#overview .detail-section { margin-top: 24px; }
#overview .detail-section:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.detail-section h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 16px; color: #ffffff; }
.detail-section p, .detail-section li { font-size: 1rem; line-height: 1.6; color: #cbd5e0; white-space: pre-line; }
.detail-section ul { list-style-position: inside; padding-left: 0; }
.detail-section ul li { margin-bottom: 8px; }
.comment { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #4a5568; }
.comment:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.comment-author { font-weight: 600; color: #ffffff; margin-bottom: 4px; }

/* --- MODALS & POPUPS --- */
.map-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.5); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 40px; backdrop-filter: blur(4px); }
.map-modal.active { display: flex; }
.map-modal .leaflet-container { width: 100%; height: 100%; border-radius: 16px; border: 2px solid white; }
.info-box { position: absolute; top: 60px; right: 20px; background: rgba(255, 255, 255, 0.95); padding: 12px 18px; border-radius: 12px; cursor: pointer; font-size: 1rem; z-index: 2001; box-shadow: 0 4px 12px rgba(0,0,0,0.15); color: #1a202c; }
.leaflet-popup-content-wrapper { border-radius: 8px; padding: 1px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.leaflet-popup-content { margin: 0 !important; width: 260px !important; }
.map-popup { cursor: pointer; display: flex; flex-direction: column; }
.popup-image { width: 100%; height: 120px; object-fit: cover; border-top-left-radius: 8px; border-top-right-radius: 8px; display: block; }
.popup-info { padding: 12px; color: #333; }
.popup-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 5px 0; color: #1a202c; }
.popup-address { font-size: 0.85rem; color: #555; margin: 5px 0 0 0; }
.map-popup .star { font-size: 1rem; color: #ccc; }
.map-popup .star.filled { color: #f59e0b; }

/* --- STYLES POUR LE BOUTON MOBILE DE VUE CARTE --- */
.mobile-view-toggle {
  display: none;
  padding: 0 10px 10px 10px;
}
#toggle-map-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background-color: #2b6cb0;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
#toggle-map-btn:hover {
  background-color: #2c5282;
}

/* --- STYLES POUR LE MENU HAMBURGER --- */
.hamburger-btn {
  display: none;
  width: 30px;
  height: 25px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1501;
}
.hamburger-btn span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}
.hamburger-btn span:nth-child(1) { top: 0px; }
.hamburger-btn span:nth-child(2) { top: 10px; }
.hamburger-btn span:nth-child(3) { top: 20px; }
.hamburger-btn.open span:nth-child(1) { top: 10px; transform: rotate(135deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; left: -60px; }
.hamburger-btn.open span:nth-child(3) { top: 10px; transform: rotate(-135deg); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: #1a202c;
  box-shadow: -5px 0 15px rgba(0,0,0,0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1500;
}
.mobile-nav.open {
  transform: translateX(0);
}
.mobile-nav a {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-family: 'erotique', sans-serif;
  text-decoration: none;
  padding: 10px 20px;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 1024px) {
  .floating-ui-container { width: 320px; }
  .overview-columns { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
  /* Navigation */
  .desktop-nav { display: none; }
  .hamburger-btn { display: block; }
  
  /* Layout principal mobile */
  #main-view {
    position: static;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 65px);
    margin-top: 65px;
  }
  
  /* MODIFIÉ : Le conteneur de la liste est masqué par défaut */
  .floating-ui-container {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding: 10px;
    gap: 10px;
    z-index: 10;
    bottom: auto;
    flex-direction: column;
  }
  .results-list-box {
    max-height: none;
    min-height: 0;
    flex-grow: 1;
    overflow: hidden;
  }

  /* MODIFIÉ : La carte est affichée par défaut */
  #map {
    display: block;
    position: relative;
    height: 100%;
    z-index: 5;
  }
  .mobile-view-toggle {
    display: block;
  }

  /* MODIFIÉ : Classe pour afficher la liste (et masquer la carte) */
  #main-view.show-list-mobile .floating-ui-container {
    display: flex;
  }
  #main-view.show-list-mobile #map {
    display: none;
  }

  /* Autres ajustements mobiles */
  #detail-view { padding: 89px 24px 24px; height: 100vh; position: fixed; }
  .club-tabs { flex-wrap: wrap; }
  .club-tabs button { font-size: 0.9rem; padding: 12px 8px; flex-basis: 50%; }
}