/* ============================================================================
   Styles communs à toutes les pages (chargé AVANT tailwind.css, comme sur le site d'origine
   où les styles maison précédaient ceux de Tailwind).
   Les couleurs du club sont des variables : elles sont remplacées par le thème du club
   (Espace Club → Identité & apparence) via une balise <style id="club-theme">.
   ============================================================================ */

/* Police des titres : Barlow Condensed (auto-hébergée, sans appel à Google) */
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/barlow-condensed-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/barlow-condensed-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/barlow-condensed-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/barlow-condensed-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/barlow-condensed-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/barlow-condensed-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 800; src: url(../fonts/barlow-condensed-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 800; src: url(../fonts/barlow-condensed-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 900; src: url(../fonts/barlow-condensed-latin-ext-900-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 900; src: url(../fonts/barlow-condensed-latin-900-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Couleurs par défaut (rose / violet du Bad Évian) — remplacées par le thème du club */
:root {
  --pal-primary-50: 253 242 248;
  --pal-primary-100: 252 231 243;
  --pal-primary-200: 251 207 232;
  --pal-primary-300: 249 168 212;
  --pal-primary-400: 244 114 182;
  --pal-primary-500: 236 72 153;
  --pal-primary-600: 219 39 119;
  --pal-primary-700: 190 24 93;
  --pal-primary-800: 157 23 77;
  --pal-primary-900: 131 24 67;
  --pal-primary-950: 80 7 36;
  --pal-accent-50: 250 245 255;
  --pal-accent-100: 243 232 255;
  --pal-accent-200: 233 213 255;
  --pal-accent-300: 216 180 254;
  --pal-accent-400: 192 132 252;
  --pal-accent-500: 168 85 247;
  --pal-accent-600: 147 51 234;
  --pal-accent-700: 126 34 206;
  --pal-accent-800: 107 33 168;
  --pal-accent-900: 88 28 135;
  --pal-accent-950: 59 7 100;
  --club-navy: 15 23 42;
  --club-navy-light: 30 41 59;
  --club-primary-hex: #ec4899;
  --gold: #f5c842;
  --gold-dim: #b8941f;
  --emerald: #10b981;
}

html, body {
    overflow-x: hidden;
    overflow-x: clip; /* pas de défilement horizontal, sans casser les éléments « collants » (position: sticky) */
    width: 100%;
    margin: 0;
    padding: 0;
}

/* --- FIX DU SCROLL POUR LA NAVBAR FIXE --- */
/* Cela assure que l'ancre arrive "au bon niveau" (au-dessus du titre) */
html {
    scroll-padding-top: calc(var(--nav-h, 140px) + 12px);
}
@media (min-width: 1280px) {
    html { scroll-padding-top: calc(var(--nav-h, 88px) + 12px); }
}

/* Ajustements pour la barre de défilement */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #0f172a; /* Bleu marine */
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgb(var(--pal-primary-500)); /* Rose au survol */
}
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
/* Modal Styles */
.modal {
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    pointer-events: none;
}
.modal.open {
    opacity: 1;
    pointer-events: auto;
}

/* --- BOUTON CALENDRIER (entête) : mini-calendrier qui affiche la date du jour --- */
.be-cal-btn {
    position: relative; display: inline-flex; flex-direction: column; align-items: stretch;
    width: 42px; height: 46px; border-radius: 12px; overflow: hidden; flex: none;
    background: #fff; text-decoration: none;
    box-shadow: 0 0 0 2px rgb(var(--pal-primary-500)), 0 8px 18px -6px rgb(var(--pal-primary-500) / .75);
    transition: transform .25s ease, box-shadow .25s ease;
}
.be-cal-btn:hover, .group:hover > .be-cal-btn {
    transform: translateY(-2px) rotate(-4deg);
    box-shadow: 0 0 0 2px rgb(var(--pal-primary-500)), 0 14px 26px -8px rgb(var(--pal-primary-500) / .95);
}
.be-cal-btn__top {
    background: linear-gradient(135deg, rgb(var(--pal-primary-500)), rgb(var(--pal-accent-600))); color: #fff;
    font: 800 9px/1 'Barlow Condensed', system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
    text-align: center; padding: 5px 0 4px;
}
.be-cal-btn__day {
    flex: 1; display: grid; place-items: center; color: #0f172a;
    font: 900 22px/1 'Barlow Condensed', system-ui, sans-serif;
}
.be-cal-btn::before, .be-cal-btn::after {
    content: ""; position: absolute; top: 2px; width: 4px; height: 4px; border-radius: 50%;
    background: rgba(15, 23, 42, .55); z-index: 1;
}
.be-cal-btn::before { left: 9px; } .be-cal-btn::after { right: 9px; }
.be-cal-btn:focus-visible { outline: 3px solid rgb(var(--pal-primary-300)); outline-offset: 3px; }
/* Très petits écrans / badge LIVE affiché : on garde la barre d'origine (le lien reste dans le menu) */
@media (max-width: 339px) { .be-cal-btn--m { display: none; } }
@media (max-width: 419px) { #nav-live-mobile-mini:not(.hidden) + .be-cal-btn--m { display: none; } }

/* ============================================================================
   Nouveaux composants
   ============================================================================ */

/* Mosaïque « justifiée » (La Vie du Club / L'Esprit Fun) : proportions conservées, ordre respecté */
.gallery-justified { display: flex; flex-wrap: wrap; gap: .75rem; --row-h: 210px; }
.gallery-justified::after { content: ''; flex-grow: 1000000; }
.gallery-justified > .gallery-item { position: relative; flex-grow: var(--r, 1.333); flex-basis: calc(var(--r, 1.333) * var(--row-h)); aspect-ratio: var(--r, 1.333); min-width: 0; margin: 0; }
.gallery-justified > .gallery-item[hidden] { display: none; }
.gallery-justified > .gallery-item img { position: absolute; inset: 0; }
.gallery-justified.is-justified::after { display: none; }
.gallery-justified > .gallery-item:focus-visible { outline: 3px solid rgb(var(--pal-primary-500)); outline-offset: 3px; }
@media (min-width: 768px) { .gallery-justified { gap: 1rem; --row-h: 240px; } }
@media (min-width: 1024px) { .gallery-justified { gap: 1.5rem; --row-h: 290px; } }
/* Écrans tactiles : légende toujours visible (pas de survol possible) */
@media (hover: none) {
  .gallery-justified .modern-overlay { opacity: 1; transform: none; padding: 1.75rem .5rem .5rem; background: linear-gradient(to top, rgba(15, 23, 42, .85), rgba(15, 23, 42, 0)); backdrop-filter: none; }
  .gallery-justified .modern-name { font-size: .72rem; letter-spacing: .08em; }
}

/* Pied de page : lien « offre club » (style d'origine, animé) */
.creds-cta { position: relative; display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1rem; border-radius: 9999px; color: #fff; overflow: hidden; background: linear-gradient(90deg, #ec4899 0%, #a855f7 100%); box-shadow: 0 6px 18px -6px rgba(236,72,153,.6); transition: transform .2s ease, box-shadow .2s ease; animation: credsGlow 3.2s ease-out infinite; }
.creds-cta::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); animation: credsShine 4.5s ease-in-out infinite; pointer-events: none; }
.creds-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -6px rgba(236,72,153,.85); }
.creds-cta-go { display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; padding-left: .55rem; border-left: 1px solid rgba(255,255,255,.35); }
.creds-cta .creds-arrow { transition: transform .2s ease; }
.creds-cta:hover .creds-arrow { transform: translateX(3px); }
@keyframes credsGlow { 0% { box-shadow: 0 6px 18px -6px rgba(236,72,153,.6), 0 0 0 0 rgba(236,72,153,.45); } 70%, 100% { box-shadow: 0 6px 18px -6px rgba(236,72,153,.6), 0 0 0 10px rgba(236,72,153,0); } }
@keyframes credsShine { 0%, 55% { left: -60%; } 80%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .creds-cta, .creds-cta::after { animation: none; } }

/* Espace Club : éléments d'édition visibles seulement en « mode édition » */
[data-edit-btn] { display: none; }
body.is-editing [data-edit-btn] { display: inline-flex; }
body.is-editing [data-section] { position: relative; }
body.is-editing [data-section]:hover { outline: 2px dashed rgb(var(--pal-primary-500) / .45); outline-offset: -6px; }

/* Modules non inclus dans l'offre : grisés et floutés */
.module-locked { position: relative; }
.module-locked > .module-card-inner { filter: grayscale(1) blur(1.5px); opacity: .55; }

/* Accessibilité : lien d'évitement */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; }
.skip-link:focus { left: 1rem; top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Mode édition : le bouton de la bannière (et des pages dont le haut passe sous la barre) reste visible */
body.is-editing [data-section="hero"] > [data-edit-btn],
body.is-editing [data-section][data-below-nav] > [data-edit-btn] { top: calc(var(--nav-h, 100px) + 12px); }

/* Barre de navigation sur les écrans « juste assez larges » : tout reste sur une ligne (classe posée par ui/navbar.js) */
#navbar [data-action="logo-modal"], #navbar [data-action="logo-modal"] img { flex-shrink: 0; }
#navbar.nav-tight .container > div:first-child { flex-shrink: 0; margin-right: .75rem; }
#navbar.nav-tight #nav-title { white-space: nowrap; font-size: 1.125rem; }
#navbar.nav-tight #desktop-menu { font-size: .78rem; min-width: 0; }
#navbar.nav-tight #desktop-menu > :not([hidden]) ~ :not([hidden]) { margin-left: .45rem !important; }
#navbar.nav-tight #desktop-menu a, #navbar.nav-tight #desktop-menu button { white-space: nowrap; }
#navbar.nav-tight #desktop-menu [data-action="trial"] > span, #navbar.nav-tight #desktop-menu a > span.relative { padding-left: .7rem; padding-right: .7rem; }

/* Pages intérieures : le contenu commence sous la barre de navigation (hauteur réelle mesurée) */
.page-offset { padding-top: calc(var(--nav-h, 128px) + 1.5rem); }
