/* ==========================================================================
   STYLE.CSS — feuille de style commune aux 3 pages du site
   ==========================================================================
   Ce fichier est découpé en grandes sections repérables avec des bandeaux
   ======. Pour changer les couleurs du site (le noir / rose fluo), tout se
   passe dans la section "VARIABLES DE COULEUR" juste en dessous : change les
   codes couleur ici et TOUT le site sera mis à jour automatiquement.
   ========================================================================== */

/* ---- VARIABLES DE COULEUR --------------------------------------------- */
:root {
  --bg: #0b0b0d;              /* fond général du site (noir) */
  --bg-alt: #17141a;          /* fond des cartes / blocs (noir un peu plus clair) */
  --bg-alt-2: #201c24;        /* fond au survol des blocs */
  --pink: #ff2ee0;            /* rose fluo, couleur principale du site */
  --pink-dark: #c400a5;       /* rose plus foncé, utilisé au survol des boutons */
  --pink-glow: rgba(255, 46, 224, 0.55); /* rose transparent, pour les ombres lumineuses */
  --text: #f4f2f5;            /* couleur du texte principal (blanc cassé) */
  --text-muted: #b3aab5;      /* couleur du texte secondaire (gris rosé) */
  --border: #322a35;          /* couleur des bordures discrètes */
  --star-empty: #3a3340;      /* couleur d'une étoile vide */
  --radius: 14px;             /* arrondi utilisé un peu partout */
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* ajoutée sur <body> par js/clubs.js pendant qu'une fiche est ouverte,
   pour empêcher la page de défiler derrière la fenêtre modale */
body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ---- BARRE DE NAVIGATION (en haut de chaque page) ---------------------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6vw;
  background: rgba(11, 11, 13, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar .logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--pink);
  text-shadow: 0 0 12px var(--pink-glow);
}

.navbar .nav-links {
  display: flex;
  gap: 32px;
}

.navbar .nav-links a {
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s ease;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

/* menu "burger" pour mobile (caché sur grand écran) */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}
.burger span {
  width: 26px;
  height: 2px;
  background: var(--pink);
}

/* ---- BOUTONS génériques ------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  border: 2px solid var(--pink);
  color: var(--pink);
  font-weight: 600;
  transition: all .2s ease;
  cursor: pointer;
  background: transparent;
}
.btn:hover {
  background: var(--pink);
  color: #0b0b0d;
  box-shadow: 0 0 22px var(--pink-glow);
}
.btn.filled {
  background: var(--pink);
  color: #0b0b0d;
}

/* ==========================================================================
   PAGE D'ACCUEIL (index.html)
   ========================================================================== */
.hero {
  padding: 100px 6vw 80px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, var(--pink-glow), transparent 60%);
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--pink);
  text-shadow: 0 0 30px var(--pink-glow);
  margin-bottom: 18px;
}
.hero p {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.section {
  padding: 70px 6vw;
  max-width: 1000px;
  margin: 0 auto;
}
.section h2 {
  color: var(--pink);
  font-size: 1.8rem;
  margin-bottom: 20px;
}
.section p { color: var(--text-muted); margin-bottom: 14px; }

.philo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 28px;
}
.philo-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.philo-card h3 {
  color: var(--pink);
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.philo-card p { color: var(--text-muted); font-size: .95rem; margin: 0; }

.cta-box {
  text-align: center;
  padding: 60px 6vw;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   PAGE FOOTER (commun à toutes les pages)
   ========================================================================== */
footer {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: .85rem;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   PAGE "NOS CLUBS" (clubs.html) — carte + recherche + liste + fiche
   ========================================================================== */
.clubs-header {
  padding: 40px 6vw 20px;
  text-align: center;
}
.clubs-header h1 { color: var(--pink); font-size: 2.2rem; margin-bottom: 10px; }
.clubs-header p { color: var(--text-muted); }

/* barre de recherche */
.search-wrap {
  max-width: 480px;
  margin: 26px auto 0;
  padding: 0 6vw;
}
#search-input {
  width: 100%;
  padding: 14px 20px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s ease;
}
#search-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 18px var(--pink-glow);
}
#search-input::placeholder { color: var(--text-muted); }

/* mise en page : carte à gauche, liste à droite (empilés sur mobile) */
.clubs-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  padding: 30px 6vw 80px;
  align-items: start;
}

#map {
  height: 620px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt); /* visible tant que les tuiles de la carte chargent */

  /* Leaflet donne des z-index élevés (jusqu'à 700) à ses propres éléments
     internes (marqueurs, popups...). Sans "position" + "z-index" ici, ces
     z-index se comparent à ceux de TOUTE la page et passaient donc par-dessus
     la fiche modale (.modal-overlay). En fixant position+z-index sur #map,
     on enferme ces z-index élevés à l'intérieur de la carte uniquement. */
  position: relative;
  z-index: 0;
}

/* liste des clubs, à droite de la carte */
.clubs-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 620px;
  overflow-y: auto;
  padding-right: 4px;
}
.club-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: all .2s ease;
}
.club-card:hover,
.club-card.active {
  border-color: var(--pink);
  background: var(--bg-alt-2);
  box-shadow: 0 0 16px var(--pink-glow);
}
.club-card h3 { color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }
.club-card .adresse { color: var(--text-muted); font-size: .85rem; margin-bottom: 8px; }

.no-result {
  text-align: center;
  color: var(--text-muted);
  padding: 30px 10px;
}

/* ---- étoiles de notation ------------------------------------------------ */
.stars { display: inline-flex; gap: 2px; }
.stars .star {
  font-size: 1.05rem;
  color: var(--star-empty);
}
.stars .star.filled {
  color: var(--pink);
  text-shadow: 0 0 8px var(--pink-glow);
}
.stars.small .star { font-size: .85rem; }

.criteres-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- fiche détaillée d'un club (fenêtre modale) ------------------------- */
.modal-overlay {
  display: none; /* passe à "flex" en JS quand on ouvre la fiche */
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-alt);
  border: 1px solid var(--pink);
  box-shadow: 0 0 40px var(--pink-glow);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 34px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--pink); }

.modal h2 { color: var(--pink); font-size: 1.5rem; margin-bottom: 6px; }
.modal .adresse { color: var(--text-muted); margin-bottom: 18px; }
.modal .note-globale { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.modal .note-globale .chiffre { color: var(--pink); font-weight: 700; }

.modal .criteres-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 22px;
  padding: 18px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.modal .critere-item .label {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
/* affiché à la place des étoiles quand un critère ne s'applique pas
   (ex: pas de restauration dans le club) — voir "null" dans data.js */
.modal .non-applicable {
  font-size: .82rem;
  font-style: italic;
  color: var(--text-muted);
}

.modal .impression h4 {
  color: var(--pink);
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.modal .impression p { color: var(--text); white-space: pre-line; }
.modal .date-visite {
  margin-top: 18px;
  font-size: .8rem;
  color: var(--text-muted);
  text-align: right;
}

/* ==========================================================================
   PAGE "CONSEILS DÉBUTANTS" (conseils.html)
   ========================================================================== */
.tips-grid {
  display: grid;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 6vw 80px;
}
.tip-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pink);
  border-radius: var(--radius);
  padding: 26px 30px;
}
.tip-card h3 {
  color: var(--pink);
  margin-bottom: 10px;
  font-size: 1.15rem;
}
.tip-card p, .tip-card li { color: var(--text-muted); }
.tip-card ul { margin-top: 8px; padding-left: 18px; list-style: disc; }
.tip-card li { margin-bottom: 6px; }

/* ==========================================================================
   RESPONSIVE — écrans étroits (mobile / tablette)
   ========================================================================== */
@media (max-width: 860px) {
  .clubs-layout { grid-template-columns: 1fr; }
  #map { height: 380px; }
  .clubs-list { max-height: none; }
}

@media (max-width: 700px) {
  .navbar .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    display: none;
  }
  .navbar .nav-links.open { display: flex; }
  .navbar .nav-links a { padding: 16px 6vw; border-bottom: 1px solid var(--border); }
  .burger { display: flex; }
}
