/* Design tokens */
:root {
    --color-gold: #b38e50;
    --color-gold-text: #8a6a35; /* AA-compliant on white (5:1) and as white-on-fill button bg */
    --color-champagne: #e9dcc3;
    --color-green: #2e5a36;
    --color-green-dark: #16301c;
    --color-graphite: #23262b;
    --color-graphite-dark: #101214;
    --color-bg: #f7f6f2;
    --color-text: #333;
    --color-text-muted: #666;
    --color-whatsapp: #128c7e;
    --color-red: #d9534f;
    --color-open: #2e7d4f;
    --color-closed: #b3413c;
    --color-surface-muted: #f1f1ee;
    --radius-card: 24px;
    --radius-btn: 30px;
    --radius-pill: 999px;
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.03);
    --shadow-elevated: 0 10px 30px rgba(0, 0, 0, 0.08);
    --mobile-bar-height: 64px;
}

/* Réinitialisation de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* L'attribut natif "hidden" doit toujours l'emporter, quelle que soit la
   spécificité d'une classe appliquée au même élément (voir historique du
   bug de bascule d'onglets — ne pas réintroduire une règle qui l'annule). */
[hidden] {
    display: none !important;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-bottom: calc(var(--mobile-bar-height) + env(safe-area-inset-bottom));
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

svg.icon:not(.play-icon) {
    display: block;
    width: 1em;
    height: 1em;
    max-width: 24px;
    max-height: 24px;
    flex: 0 0 auto;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--color-gold-text);
    outline-offset: 2px;
}

/* Section Hero */
.hero-section {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 50vh;
    min-height: 380px;
    background: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?q=80&w=1000') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: max(20px, env(safe-area-inset-top)) 20px 20px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.35) 0%, rgba(10, 10, 10, 0.55) 55%, rgba(10, 10, 10, 0.8) 100%);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    color: #fff;
}

.badge {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(179, 142, 80, 0.6);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    display: inline-block;
    margin-bottom: 16px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.main-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 1.4;
    opacity: 0.95;
    margin-bottom: 6px;
}

.hero-cities {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--color-champagne);
    opacity: 0.9;
    margin-bottom: 24px;
}

/* Boutons d'action */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 0 20px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: var(--radius-btn);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
    background-color: var(--color-gold-text);
    color: #fff;
    box-shadow: 0 8px 20px rgba(138, 106, 53, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.4;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background-color: rgba(255, 255, 255, 0.28);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--color-gold-text);
    color: var(--color-gold-text);
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background-color: var(--color-gold-text);
    color: #fff;
}

.btn-outline:active {
    transform: scale(0.97);
}

.btn-map {
    margin-top: 4px;
    align-self: flex-start;
}

/* Conteneur principal */
main {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    margin-top: -24px;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    color: var(--color-green);
    font-weight: 700;
    margin-bottom: 4px;
}

.section-title .icon {
    color: var(--color-red);
}

/* Sélecteur "Trouver ma salle" */
.finder-section {
    background: #ffffff;
    border-radius: var(--radius-card);
    padding: 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.finder-step-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.finder-options {
    display: flex;
    gap: 10px;
}

.finder-option {
    flex: 1;
    padding: 14px 8px;
    border-radius: 16px;
    border: 1.5px solid #ececea;
    background: #fff;
    color: var(--color-text);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.finder-option.is-selected {
    background: var(--color-green);
    border-color: var(--color-green);
    color: #fff;
}

.finder-go {
    width: 100%;
}

/* "2 villes · 4 expériences" */
.experience-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.experience-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border-radius: 18px;
    text-decoration: none;
    color: #fff;
    position: relative;
    min-height: 140px;
    box-shadow: var(--shadow-elevated);
}

.experience-card--women {
    background: linear-gradient(160deg, #2b2620 0%, #0f0d0b 100%);
    border: 1px solid rgba(233, 220, 195, 0.25);
}

.experience-card--mixed {
    background: linear-gradient(160deg, var(--color-graphite) 0%, var(--color-graphite-dark) 100%);
    border: 1px solid rgba(179, 142, 80, 0.25);
}

.experience-card-badge {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.15);
    margin-bottom: 6px;
}

.experience-card-badge.is-open { background: rgba(46, 125, 79, 0.35); color: #d6ffe6; }
.experience-card-badge.is-closed { background: rgba(179, 65, 60, 0.35); color: #ffdcd9; }
.experience-card-badge.is-unknown { background: rgba(255, 255, 255, 0.12); color: #ddd; }

.experience-card-city {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.75;
}

.experience-card-type {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-champagne);
}

.experience-card-hours {
    font-size: 0.72rem;
    opacity: 0.8;
    margin-top: 2px;
}

.experience-card-cta {
    margin-top: auto;
    padding-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.experience-card-cta::after {
    content: '→';
}

.experience-card:hover .experience-card-cta,
.experience-card:focus-visible .experience-card-cta {
    text-decoration: underline;
}

/* Panneaux d'expérience */
.experience-panel {
    border-radius: var(--radius-card);
    padding: 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-margin-top: 16px;
}

.experience-panel--women {
    background: linear-gradient(180deg, #fdfbf6 0%, #f3ece0 100%);
    border: 1px solid rgba(179, 142, 80, 0.2);
}

.experience-panel--mixed {
    background: linear-gradient(180deg, #1c1e22 0%, #101214 100%);
    color: #f2f2f0;
    border: 1px solid rgba(179, 142, 80, 0.25);
}

.experience-panel--mixed .card-link {
    color: #9fd2ff;
}

.experience-panel--mixed .hours-title,
.experience-panel--mixed .reels-header h4 {
    color: #f2f2f0;
}

.experience-panel--mixed .location-info-card,
.experience-panel--mixed .hours-card {
    background: rgba(255, 255, 255, 0.06);
}

.experience-panel--mixed .experience-message,
.experience-panel--mixed .reels-count,
.experience-panel--mixed .hours-list li span:first-child {
    color: rgba(242, 242, 240, 0.7);
}

.experience-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.experience-panel-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-green);
}

.experience-panel--mixed .experience-panel-header h3 {
    color: #fff;
}

.experience-message {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin-top: -8px;
}

.open-badge {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.open-badge.is-open {
    background: rgba(46, 125, 79, 0.12);
    color: var(--color-open);
}

.open-badge.is-closed {
    background: rgba(179, 65, 60, 0.12);
    color: var(--color-closed);
}

.open-badge.is-unknown {
    background: var(--color-surface-muted);
    color: #888;
}

/* Fiche localisation */
.location-info-card {
    background: var(--color-bg);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
}

.location-info-row .icon {
    color: var(--color-gold-text);
    flex-shrink: 0;
}

.card-link {
    color: #004b93;
    text-decoration: none;
    font-weight: 600;
}

.badge-soon {
    display: inline-block;
    background: var(--color-surface-muted);
    color: #999;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Horaires */
.hours-card {
    background: var(--color-bg);
    border-radius: 18px;
    padding: 16px;
}

.hours-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-green);
    margin-bottom: 10px;
}

.hours-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.hours-tbd {
    color: #999;
    font-style: italic;
    font-size: 0.85rem;
}

/* Prochain cours */
.next-class-card {
    background: linear-gradient(135deg, var(--color-gold-text), #6b501f);
    color: #fff;
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.next-class-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
}

.next-class-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.next-class-time {
    font-size: 0.85rem;
    opacity: 0.9;
}

.next-class-empty {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Planning collectif Women */
.schedule-widget {
    background: var(--color-bg);
    border-radius: 18px;
    padding: 16px;
}

.experience-panel--mixed .schedule-widget {
    background: rgba(255, 255, 255, 0.06);
}

.schedule-placeholder {
    font-size: 0.88rem;
    color: #999;
    font-style: italic;
}

.schedule-day-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-bottom: 12px;
    scrollbar-width: none;
}

.schedule-day-tabs::-webkit-scrollbar {
    display: none;
}

.schedule-day-tab {
    flex: 1;
    min-width: 44px;
    padding: 8px 4px;
    border-radius: 12px;
    border: 1.5px solid #ececea;
    background: #fff;
    color: var(--color-text);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.schedule-day-tab.is-active {
    background: var(--color-gold-text);
    border-color: var(--color-gold-text);
    color: #fff;
}

.schedule-day-heading {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-green);
    margin-bottom: 8px;
}

.schedule-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule-slot {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 10px 14px;
}

.experience-panel--mixed .schedule-slot {
    background: rgba(255, 255, 255, 0.08);
}

.schedule-slot-time {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-gold-text);
    min-width: 48px;
}

.schedule-slot-name {
    font-size: 0.88rem;
    font-weight: 600;
}

.schedule-slot--empty .schedule-slot-name {
    color: #999;
    font-weight: 400;
    font-style: italic;
}

/* Slider vidéo horizontal type Reels */
.reels-slider {
    position: relative;
}

.reels-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reels-header h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.reels-count {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.reels-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 2px 2px 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-radius: 16px;
}

.reels-track::-webkit-scrollbar {
    display: none;
}

.reel-slide {
    flex: 0 0 78%;
    scroll-snap-align: center;
}

@media (min-width: 400px) {
    .reel-slide {
        flex-basis: 260px;
    }
}

.video-wrapper {
    background: linear-gradient(160deg, var(--color-green) 0%, var(--color-green-dark) 100%);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 9 / 16;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-poster-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.video-poster-overlay .play-icon {
    width: 48px;
    height: 48px;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    padding: 14px;
    box-sizing: content-box;
}

.video-wrapper.is-playing .video-poster-overlay {
    opacity: 0;
    pointer-events: none;
}

.video-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 500;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.video-wrapper.is-playing .video-label {
    display: none;
}

.reel-nav-btn {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    color: var(--color-green);
    font-size: 1.1rem;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.reel-nav-prev { left: 6px; }
.reel-nav-next { right: 6px; }

.reel-nav-btn:hover,
.reel-nav-btn:focus-visible {
    transform: translateY(-50%) scale(1.06);
}

.reel-nav-btn:disabled {
    opacity: 0;
    pointer-events: none;
}

.reel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.reel-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    transition: background-color 0.2s ease, width 0.2s ease;
}

.reel-dot.is-active {
    background: var(--color-gold-text);
    width: 18px;
}

.reels-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 44px 20px;
    background: linear-gradient(160deg, var(--color-surface-muted) 0%, #e7e7e2 100%);
    border-radius: 16px;
    text-align: center;
    color: var(--color-text-muted);
}

.experience-panel--mixed .reels-empty-state {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(242, 242, 240, 0.7);
}

.reels-empty-state svg {
    width: 34px;
    height: 34px;
    color: var(--color-gold-text);
}

.reels-empty-state p {
    font-size: 0.9rem;
    max-width: 260px;
}

/* Bouton Voir Plus Instagram */
.btn-instagram-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    border-radius: 15px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: filter 0.2s ease;
}

.btn-instagram-more:hover,
.btn-instagram-more:focus-visible {
    filter: brightness(1.08);
}

/* Votre entraînement */
.fitness-content {
    background: #ffffff;
    border-radius: var(--radius-card);
    padding: 20px;
    box-shadow: var(--shadow-card);
}

.fitness-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 6px;
}

.fitness-card {
    background: var(--color-bg);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fitness-icon {
    width: 32px;
    height: 32px;
    color: var(--color-gold-text);
}

.fitness-icon svg {
    width: 100%;
    height: 100%;
}

.fitness-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-green);
}

.fitness-sub {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* Barre d'actions mobile persistante */
.mobile-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    align-items: stretch;
    gap: 6px;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}

.bar-city {
    display: none;
}

.bar-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.72rem;
    font-weight: 600;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.bar-btn:active {
    transform: scale(0.95);
    background: var(--color-surface-muted);
}

.bar-btn .icon {
    font-size: 1.2rem;
}

/* Footer */
.site-footer {
    width: 100%;
    max-width: 480px;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.site-footer .footer-title {
    color: var(--color-green);
    font-weight: 600;
    margin-bottom: 4px;
}

.site-footer a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
