/* =====================================================================
   YC GYM — bloc "salle privée" sur la home (teaser → yc-gym.html)
   DA noir/rouge profond, reprise des 3 briques du gym :
   formules · abonnements · planning Sportigo en direct.
   Accents en ROUGE partout, SAUF le tier "YC Gold" qui reste OR.
   ===================================================================== */
.gym-home {
    /* Palette YC Gym (scopée au bloc, ne pollue pas le reste de la home) */
    --gym-bordeaux: #8a0e26;        /* rouge bordeaux profond */
    --gym-bordeaux-light: #b01030;  /* rouge dense (accent) */
    --gym-bordeaux-dark: #4a0418;   /* pourpre / bordeaux sombre */
    --gym-pourpre: #5c0a2a;         /* pourpre intermédiaire */
    --gym-black: #0a0a0a;
    --gym-dark-1: #111111;
    --gym-dark-2: #1a1a1a;
    --gym-white: #ffffff;
    /* Accent générique = ROUGE (ex-"or" du gym, repassé en rouge) */
    --gym-gold: #b01030;
    --gym-gold-light: #d6294b;
    /* Argent (YC Silver) */
    --gym-silver: #c2c6cc;
    --gym-silver-light: #e4e7eb;
    /* Vrai OR — réservé au seul tier YC Gold */
    --yc-gold: #c9a24b;
    --yc-gold-light: #e6cd86;

    background: var(--gym-black);
    color: var(--gym-white);
    overflow-x: hidden;
}

/* ---- Reveal au scroll ------------------------------------------------ */
.gym-home .gym-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.gym-home .gym-reveal.is-visible { opacity: 1; transform: translateY(0); }
.gym-home .gym-reveal-delay-1 { transition-delay: 0.15s; }
.gym-home .gym-reveal-delay-2 { transition-delay: 0.3s; }
.gym-home .gym-reveal-delay-3 { transition-delay: 0.45s; }

/* ---- Lead-in : label minimal "YC Gym — Albi" ----------------------- */
.gym-home-lead {
    text-align: center;
    padding: 2.5rem 1.5rem 0;
    background: var(--gym-black);
    position: relative;
}
.gym-home-lead::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 700px; height: 280px;
    background: radial-gradient(ellipse at top, rgba(138,14,38,0.22) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}
/* Label "YC Gym — Albi" — style .gym-hero-eyebrow de la page YC Gym
   (pastille bordée + flou), décliné dans le rouge du bloc home. */
.gym-home-eyebrow {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--yc-gold-light);
    margin: 0;
    /* padding gym (0.5rem 1.5rem) + compensation de l'espace de fin du letter-spacing */
    padding: 0.5rem 1.5rem 0.5rem calc(1.5rem + 0.4em);
    border: 1px solid rgba(201,162,75,0.5);
    border-radius: 100px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    background: rgba(201,162,75,0.06);
}
.gym-home-eyebrow span { color: var(--yc-gold-light); }

/* ---- Titres de section (h3, compacts) ------------------------------ */
.gym-home .gym-block-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 0.85rem;
    color: var(--gym-white);
}
.gym-home .gym-block-title span { color: var(--gym-gold); }
/* Titre "centré sur la cassure" : la jonction blanc/rouge tombe pile au milieu.
   Grille 2 colonnes égales — partie blanche alignée à droite, accent rouge à gauche. */
.gym-home .gym-block-title.gym-title-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 0.28em;
    width: 100%;
    align-items: baseline;
}
.gym-home .gym-title-split > span:first-child {
    text-align: right;
    color: var(--gym-white);
}
.gym-home .gym-title-split > .gym-title-accent {
    text-align: left;
    color: var(--gym-gold);
}
@media (max-width: 600px) {
    /* repli : titre inline centré classique (évite tout débordement sur mobile) */
    .gym-home .gym-block-title.gym-title-split { display: block; }
    .gym-home .gym-title-split > span { display: inline; text-align: center; }
}
.gym-home .gym-section-intro {
    font-size: 1.02rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255,255,255,0.68);
    max-width: 560px;
    margin: 0 auto;
}

/* ============================================================
   1. PLANNING SPORTIGO EN DIRECT
   ============================================================ */
.gym-home .gym-sportigo {
    position: relative;
    background: var(--gym-dark-1);
    padding: 4.5rem 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.gym-home .gym-sportigo::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 700px; height: 300px;
    background: radial-gradient(ellipse at top, rgba(138,14,38,0.18) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}
.gym-home .gym-sportigo-inner { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }
.gym-home .gym-sportigo-head { text-align: center; margin-bottom: 2.5rem; }
.gym-home .gym-sportigo-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
    color: var(--gym-white);
}
.gym-home .gym-sportigo-title span {
    background: linear-gradient(135deg, var(--gym-gold-light) 0%, var(--gym-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.gym-home .gym-sportigo-sub {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 300;
    color: rgba(255,255,255,0.75);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}
.gym-home .gym-sportigo-live {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gym-gold);
    margin-bottom: 1.25rem;
}
.gym-home .gym-sportigo-live::before {
    content: '';
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--gym-gold);
    box-shadow: 0 0 0 0 rgba(176,16,48,0.6);
    animation: gymPulse 2s infinite;
}
@keyframes gymPulse {
    0% { box-shadow: 0 0 0 0 rgba(176,16,48,0.6); }
    70% { box-shadow: 0 0 0 12px rgba(176,16,48,0); }
    100% { box-shadow: 0 0 0 0 rgba(176,16,48,0); }
}
.gym-home .gym-sportigo-embed {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: var(--gym-dark-2);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    min-height: 640px;
}
.gym-home .gym-sportigo-embed iframe { width: 100%; min-height: 640px; border: 0; display: block; }
.gym-home #sportigo-appointment-container:empty {
    position: relative;
    display: block;
    min-height: 560px;
}
.gym-home #sportigo-appointment-container:empty::before {
    content: '';
    position: absolute;
    top: calc(50% - 2rem); left: 50%;
    transform: translateX(-50%);
    width: 38px; height: 38px;
    border: 3px solid rgba(255,255,255,0.12);
    border-top-color: var(--gym-bordeaux-light);
    border-radius: 50%;
    animation: gymSpinX 0.8s linear infinite;
}
.gym-home #sportigo-appointment-container:empty::after {
    content: 'Chargement du planning…';
    position: absolute;
    top: calc(50% + 1.6rem); left: 0; right: 0;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}
@keyframes gymSpinX { to { transform: translateX(-50%) rotate(360deg); } }
.gym-home .gym-sportigo-actions { text-align: center; margin-top: 2rem; }
.gym-home .gym-sportigo-note { margin-top: 1rem; font-size: 0.8rem; color: rgba(255,255,255,0.45); }

/* ============================================================
   2. LES FORMULES YC
   ============================================================ */
.gym-home .gym-formules { padding: 2.5rem 1.5rem 0; background: var(--gym-dark-1); }
.gym-home .gym-formules-header { max-width: 800px; margin: 0 auto 2.5rem; text-align: center; }
.gym-home .gym-formules-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}
.gym-home .gym-formule-card {
    display: flex;
    flex-direction: column;
    padding: 2.5rem 2rem;
    background: var(--gym-dark-2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    transition: transform 0.4s ease, border-color 0.4s ease;
}
.gym-home .gym-formule-card:hover { transform: translateY(-6px); border-color: rgba(176,16,48,0.5); }
.gym-home .gym-formule-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    color: var(--gym-white);
}
.gym-home .gym-formule-card h3 span { color: var(--gym-gold-light); }
.gym-home .gym-formule-desc {
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.65;
    color: rgba(255,255,255,0.72);
    margin: 0 0 1.75rem;
    flex-grow: 1;
}
.gym-home .gym-formule-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-top: auto;
}
.gym-home .gym-formule-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 76px;
    padding: 0.85rem 0.4rem;
    border: 1px solid rgba(176,16,48,0.3);
    border-radius: 10px;
    background: rgba(176,16,48,0.06);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--gym-gold-light);
    text-transform: uppercase;
    line-height: 1.3;
}
.gym-home .gym-formule-option strong { display: block; font-size: 0.95rem; color: var(--gym-white); font-weight: 800; }

/* ============================================================
   3. ABONNEMENTS YC (Silver / Gold / Platinium)
   ============================================================ */
.gym-home .gym-subs { padding: 4.5rem 1.5rem 0; background: var(--gym-black); }
.gym-home .gym-subs-header { max-width: 800px; margin: 0 auto 2.5rem; text-align: center; }
.gym-home .gym-subs-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}
.gym-home .gym-sub-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 2.75rem 2rem;
    background: var(--gym-dark-2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    transition: transform 0.4s ease, border-color 0.4s ease;
}
.gym-home .gym-sub-card:hover { transform: translateY(-6px); }
.gym-home .gym-sub-tier { font-size: 1.6rem; font-weight: 900; letter-spacing: 0.02em; margin: 0 0 0.75rem; }
/* Silver = argent */
.gym-home .gym-sub-card--silver { border-color: rgba(194,198,204,0.35); }
.gym-home .gym-sub-card--silver:hover { border-color: rgba(194,198,204,0.7); }
.gym-home .gym-sub-card--silver .gym-sub-tier {
    background: linear-gradient(135deg, var(--gym-silver-light) 0%, var(--gym-silver) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* Gold = OR (seule exception qui reste dorée) */
.gym-home .gym-sub-card--gold { border-color: rgba(201,162,75,0.4); }
.gym-home .gym-sub-card--gold:hover { border-color: rgba(201,162,75,0.8); }
.gym-home .gym-sub-card--gold .gym-sub-tier {
    background: linear-gradient(135deg, var(--yc-gold-light) 0%, var(--yc-gold) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* Platinium = rouge bordeaux */
.gym-home .gym-sub-card--platinium { border-color: rgba(138,14,38,0.5); }
.gym-home .gym-sub-card--platinium:hover { border-color: rgba(176,16,48,0.8); }
.gym-home .gym-sub-card--platinium .gym-sub-tier {
    background: linear-gradient(135deg, var(--gym-bordeaux-light) 0%, var(--gym-pourpre) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.gym-home .gym-sub-access {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255,255,255,0.75);
    margin: 0 0 1.75rem;
    flex-grow: 1;
}
.gym-home .gym-sub-access strong { color: var(--gym-white); font-weight: 700; }
.gym-home .gym-sub-formule {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.95rem 1.25rem;
    border-radius: 100px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--gym-black);
    /* Bouton par défaut = celui du tier Gold → reste OR */
    background: linear-gradient(135deg, var(--yc-gold-light) 0%, var(--yc-gold) 100%);
}
.gym-home .gym-sub-card--silver .gym-sub-formule {
    background: linear-gradient(135deg, var(--gym-silver-light) 0%, var(--gym-silver) 100%);
    color: var(--gym-black);
}
.gym-home .gym-sub-card--platinium .gym-sub-formule {
    background: linear-gradient(135deg, var(--gym-bordeaux-light) 0%, var(--gym-bordeaux) 100%);
    color: var(--gym-white);
}

/* ---- Boîtes cliquables → ouverture popup Sportigo ------------------ */
.gym-home .gym-formule-option,
.gym-home .gym-sub-formule {
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.gym-home .gym-formule-option:hover {
    border-color: rgba(176,16,48,0.7);
    background: rgba(176,16,48,0.14);
    transform: translateY(-2px);
}
.gym-home .gym-sub-formule:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -12px rgba(201,162,75,0.6);
    filter: brightness(1.05);
}
.gym-home .gym-sub-card--silver .gym-sub-formule:hover { box-shadow: 0 12px 30px -12px rgba(194,198,204,0.6); }
.gym-home .gym-sub-card--platinium .gym-sub-formule:hover { box-shadow: 0 12px 30px -12px rgba(176,16,48,0.7); }
.gym-home .gym-formule-option:focus-visible,
.gym-home .gym-sub-formule:focus-visible { outline: 2px solid var(--gym-gold); outline-offset: 3px; }

/* ---- CTA de fin de bloc (vers la page YC Gym) ---------------------- */
.gym-home-cta {
    text-align: center;
    padding: 3.5rem 1.5rem 4.5rem;
    background: var(--gym-black);
}
.gym-home-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.05rem 2.5rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--gym-white);
    background: linear-gradient(135deg, var(--gym-bordeaux-light) 0%, var(--gym-bordeaux) 100%);
    box-shadow: 0 18px 40px -18px rgba(176,16,48,0.8);
    transition: transform 0.25s ease, filter 0.25s ease;
}
.gym-home-cta-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* ============================================================
   Popup / modale d'offres Sportigo
   ============================================================ */
.gym-home .gym-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 5vh 1.25rem;
    overflow-y: auto;
}
.gym-home .gym-modal.is-open { display: flex; }
.gym-home .gym-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5,5,5,0.82);
    backdrop-filter: blur(6px);
}
.gym-home .gym-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 820px;
    margin: auto;
    background: linear-gradient(180deg, var(--gym-dark-2) 0%, var(--gym-dark-1) 100%);
    border: 1px solid rgba(176,16,48,0.3);
    border-radius: 20px;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
    padding: 2.5rem 2rem 2rem;
    overflow: hidden;
    animation: gymModalIn 0.35s cubic-bezier(.22,1,.36,1) both;
}
@keyframes gymModalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.gym-home .gym-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    color: var(--gym-white);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
}
.gym-home .gym-modal-close:hover { background: rgba(176,16,48,0.18); border-color: var(--gym-bordeaux-light); }
.gym-home .gym-modal-title {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--gym-white);
}
.gym-home .gym-modal-title span {
    background: linear-gradient(135deg, var(--gym-gold-light) 0%, var(--gym-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.gym-home .gym-modal-sub {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 300;
    color: rgba(255,255,255,0.65);
    margin: 0 0 1.75rem;
}
.gym-home #sportigo-modal-list-container:empty { min-height: 220px; position: relative; }
.gym-home #sportigo-modal-list-container:empty::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 34px; height: 34px;
    margin: -17px 0 0 -17px;
    border: 3px solid rgba(176,16,48,0.25);
    border-top-color: var(--gym-bordeaux-light);
    border-radius: 50%;
    animation: gymSpinM 0.9s linear infinite;
}
@keyframes gymSpinM { to { transform: rotate(360deg); } }
.gym-home #sportigo-modal-list-container { width: 100%; overflow-x: hidden; text-align: center; }
.gym-home #sportigo-modal-list-container > * {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.gym-home #sportigo-modal-list-container [class*="grid-cols"],
.gym-home #sportigo-modal-list-container [style*="grid-template-columns"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
}
.gym-home #sportigo-modal-list-container .text-right.font-extrabold,
.gym-home #sportigo-modal-list-container .text-right.text-xs,
.gym-home #sportigo-modal-list-container h1,
.gym-home #sportigo-modal-list-container h2,
.gym-home #sportigo-modal-list-container h3,
.gym-home #sportigo-modal-list-container h4,
.gym-home #sportigo-modal-list-container [class*="itle"] { text-align: center !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .gym-home .gym-formules-grid { grid-template-columns: 1fr; max-width: 480px; }
    .gym-home .gym-subs-grid { grid-template-columns: 1fr; max-width: 440px; }
    .gym-home .gym-formules,
    .gym-home .gym-subs,
    .gym-home .gym-sportigo { padding: 4rem 1.5rem 0; }
}
@media (max-width: 600px) {
    .gym-home .gym-formule-options { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .gym-home .gym-reveal { opacity: 1; transform: none; transition: none; }
    .gym-home .gym-sportigo-live::before { animation: none; }
    .gym-home #sportigo-appointment-container:empty::before { animation: none; }
}
