/* =========================================================
   SPORESTO — site groupe
   Identité neutre : le blanc, le sable et l'anthracite laissent
   la couleur aux photos et aux marques filles (Le Pesage grenat,
   Le Clubhouse vert fairway).
   ========================================================= */

:root {
  --blanc:        #FFFFFF;
  --sable:        #EDE7DE;
  --sable-fonce:  #DCD3C6;
  --encre:        #24262A;
  --encre-clair:  #3C4147;
  --texte:        #55595F;
  --texte-clair:  #8A8D92;
  --laiton:       #A98B5D;   /* accent discret : liens, états actifs */

  --display: "Bebas Neue", "Haettenschweiler", Impact, sans-serif;
  --sans:    "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, sans-serif;

  --max:    1240px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --header-h: 76px;

  --shadow: 0 20px 55px -28px rgba(36, 38, 42, .55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--texte);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { -webkit-tap-highlight-color: transparent; }
ul { margin: 0; padding: 0; list-style: none; }
a:focus, button:focus { outline: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--laiton); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display); font-weight: 400; margin: 0;
  line-height: 1; letter-spacing: .02em; color: var(--encre);
}

/* ---------- Utilitaires ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.center { text-align: center; }

.eyebrow {
  font-family: var(--display); font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  letter-spacing: .08em; color: var(--encre); line-height: 1;
}
.lead { font-size: 1.05rem; color: var(--texte); max-width: 68ch; margin-inline: auto; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; font-family: var(--display);
  font-size: 1.05rem; letter-spacing: .1em;
  padding: .75em 1.9em; border: 1px solid var(--encre);
  color: var(--encre); background: transparent; cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: var(--encre); color: var(--blanc); }
.btn.on-dark { border-color: rgba(255,255,255,.7); color: #fff; }
.btn.on-dark:hover { background: #fff; color: var(--encre); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  min-height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
  transition: background .3s ease, box-shadow .3s ease;
}
/* Transparent au-dessus du héros, opaque dès qu'on défile. */
.site-header.solid {
  background: rgba(255,255,255,.96);
  box-shadow: 0 1px 0 rgba(36,38,42,.1);
}
.nav-left  { justify-self: start; }
.nav-right { justify-self: end; }
.nav-left, .nav-right { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.9rem); }

.nav-link {
  font-family: var(--display); font-size: 1.02rem; letter-spacing: .09em;
  color: #fff; white-space: nowrap; transition: color .2s ease;
}
.site-header.solid .nav-link { color: var(--encre); }
.nav-link:hover { color: var(--laiton); }

/* Marque typographique : aucun logo Sporesto n'existe à ce jour. */
.brand { justify-self: center; text-align: center; line-height: 1; }
.brand .mark {
  font-family: var(--display); font-size: clamp(1.6rem, 3.6vw, 2.1rem);
  letter-spacing: .2em; color: #fff; display: block;
  transition: color .3s ease;
}
.brand .sub {
  font-size: .58rem; letter-spacing: .34em; text-transform: uppercase;
  color: rgba(255,255,255,.75); display: block; margin-top: .25em;
  transition: color .3s ease;
}
.site-header.solid .brand .mark { color: var(--encre); }
.site-header.solid .brand .sub  { color: var(--texte-clair); }

/* Sélecteur de langue */
.lang-switch { display: flex; gap: .1rem; }
.lang-switch a {
  font-family: var(--display); font-size: .95rem; letter-spacing: .08em;
  padding: .25rem .45rem; color: rgba(255,255,255,.72); transition: color .2s, background .2s;
}
.site-header.solid .lang-switch a { color: var(--texte-clair); }
.lang-switch a:hover { color: var(--laiton); }
.lang-switch a.is-active { color: #fff; }
.site-header.solid .lang-switch a.is-active { color: var(--encre); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .6rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: background .3s ease; }
.site-header.solid .nav-toggle span { background: var(--encre); }

/* ---------- Hero carrousel ---------- */
.hero { position: relative; height: 100svh; min-height: 520px; overflow: hidden; background: var(--encre); }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .9s ease;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; }
/* Voile : lisibilité du logo et du texte blancs quelle que soit la photo.
   Le creux au centre doit rester assez dense — le logo du Pesage y tombe sur
   un ciel clair et devenait illisible avec un voile trop léger. */
.hero-slide::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(58% 44% at 50% 46%, rgba(16,18,21,.5) 0%, transparent 100%),
    linear-gradient(180deg, rgba(20,22,25,.55) 0%, rgba(20,22,25,.34) 40%, rgba(20,22,25,.82) 100%);
}
/* Une légende par slide : elle se fond avec sa propre photo. */
.hero-caption {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-content: center; justify-items: center;
  text-align: center; padding: var(--header-h) var(--gutter) 5rem;
}
/* Logos agrandis ×3 à la demande du client. La largeur maximale a dû suivre :
   laissée à 460px, elle aurait bridé les logos larges (Le Pesage, ratio 1,6)
   et annulé l'agrandissement en silence. */
.hero-logo {
  width: auto; height: clamp(234px, 33vw, 450px);
  max-width: min(88vw, 900px); object-fit: contain;
  filter: drop-shadow(0 4px 22px rgba(0,0,0,.55));
}
/* Logo fourni en noir : conversion en blanc, plutôt qu'un fichier de plus. */
.hero-logo.est-noir { filter: brightness(0) invert(1) drop-shadow(0 4px 22px rgba(0,0,0,.55)); }

.hero-tagline {
  font-family: var(--display); color: #fff;
  font-size: clamp(1.15rem, 2.6vw, 1.85rem); letter-spacing: .12em;
  text-shadow: 0 2px 24px rgba(0,0,0,.55); max-width: 26ch;
  margin: 1.6rem 0 0;
}

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 52px; height: 52px; border: 0; background: none; cursor: pointer;
  color: #fff; opacity: .75; transition: opacity .2s ease;
}
.hero-arrow:hover { opacity: 1; }
.hero-arrow svg { width: 28px; height: 28px; margin-inline: auto; }
.hero-arrow.prev { left: clamp(.25rem, 2vw, 1.5rem); }
.hero-arrow.next { right: clamp(.25rem, 2vw, 1.5rem); }

.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 1.7rem; z-index: 4;
  display: flex; justify-content: center; gap: .55rem;
}
.hero-dots button {
  width: 34px; height: 3px; border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.4); transition: background .25s ease;
}
.hero-dots button.is-active { background: #fff; }

/* ---------- Le groupe ---------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.8rem, 4vw, 3.2rem); margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
/* Texte à gauche dans les colonnes : un paragraphe centré sur 3 colonnes
   devient vite pénible à lire. Seuls les titres de section restent centrés. */
.cat { text-align: left; }
.cat h3 {
  font-size: 1.45rem; letter-spacing: .06em; margin-bottom: .7rem;
  padding-bottom: .7rem; border-bottom: 1px solid var(--sable-fonce);
}
.cat p { margin: 0; font-size: .97rem; }

/* ---------- Nos établissements ---------- */
.band-sable { background: var(--sable); }
/* auto-fit plutôt qu'un nombre fixe de colonnes : le groupe va s'agrandir,
   la grille absorbera les nouveaux établissements sans retoucher le CSS.
   240px permet aux 4 fiches actuelles de tenir sur une seule rangée. */
.lieux-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem); margin-top: clamp(2.2rem, 4vw, 3rem);
}
.lieu {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 3 / 4; background: var(--encre-clair);
  transition: transform .35s ease, box-shadow .35s ease;
}
.lieu:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.lieu img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .6s ease;
}
.lieu:hover img { transform: scale(1.05); }
.lieu::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,22,25,.62) 0%, rgba(20,22,25,.15) 42%, rgba(20,22,25,.88) 100%);
}
.lieu-inner {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.5rem 1.4rem;
}
.lieu-desc { color: rgba(255,255,255,.92); font-size: .93rem; line-height: 1.55; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.lieu-foot { color: #fff; }
.lieu-name {
  font-family: var(--display); font-size: clamp(1.6rem, 2.6vw, 2rem);
  letter-spacing: .06em; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.6);
}
.lieu-meta {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.82); margin-top: .3rem;
}
/* Établissement pas encore ouvert : pas de lien, traitement graphique à part. */
.lieu.bientot { background: linear-gradient(150deg, #2E3238 0%, #43484F 55%, #23262A 100%); cursor: default; }
.lieu.bientot:hover { transform: none; box-shadow: none; }
.lieu.bientot::after { background: linear-gradient(180deg, rgba(20,22,25,.2) 0%, rgba(20,22,25,.75) 100%); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1.6rem, 4vw, 3rem); margin-top: clamp(2rem, 4vw, 2.8rem);
}
.contact-block h4 {
  font-family: var(--display); font-size: 1.2rem; letter-spacing: .12em;
  color: var(--encre); margin: 0 0 .5rem;
}
.contact-block p { margin: 0; font-size: .97rem; }
.contact-block a:hover { color: var(--laiton); }

/* ---------- Footer ---------- */
.site-footer { background: var(--encre); color: rgba(255,255,255,.72); padding-block: clamp(3rem, 6vw, 4.5rem); text-align: center; }
.site-footer .mark { font-family: var(--display); font-size: 2rem; letter-spacing: .22em; color: #fff; }
.site-footer .sub { font-size: .58rem; letter-spacing: .34em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-top: .3rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem; margin-top: 2rem; }
.footer-links a { font-family: var(--display); font-size: 1rem; letter-spacing: .1em; color: rgba(255,255,255,.8); }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 2.4rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .8rem; color: rgba(255,255,255,.45); }

/* ---------- Apparition au scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .hero-slide { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 860px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  .nav-toggle { display: block; justify-self: start; }
  .brand { justify-self: center; }
  .nav-right { justify-self: end; }
  /* Les libellés passent dans le panneau déroulant ; seule la langue reste visible.
     `grid-column: 1 / -1` est indispensable : un élément en position absolue dans
     une grille est calé sur SA cellule, pas sur le conteneur. Sans cette ligne,
     `left:0; right:0` ne couvre que la première colonne de l'en-tête. */
  .nav-left {
    grid-column: 1 / -1;
    /* `justify-self: start` vient de la règle de bureau : sur un élément absolu
       il déclenche un ajustement au contenu, le panneau ne faisait alors que la
       largeur du plus long libellé. */
    justify-self: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--blanc); padding: .5rem var(--gutter) 1.4rem;
    box-shadow: var(--shadow);
    transform: translateY(-125%); transition: transform .35s ease;
  }
  .nav-left.open { transform: translateY(0); }
  .nav-left .nav-link {
    color: var(--encre); width: 100%; padding: .85rem 0;
    border-bottom: 1px solid rgba(36,38,42,.08); font-size: 1.25rem;
  }
  .hero-arrow { width: 42px; }
}
@media (max-width: 560px) {
  .hero-caption { padding-bottom: 6rem; }
  .lieux-grid { grid-template-columns: 1fr; }
  .lieu { aspect-ratio: 4 / 3; }
}
