:root {
    --blue: #353089;
    --blue-dark: #251f6b;
    --blue-light: #eceaf8;
    --red: #db2922;
    --red-light: #fde8e7;
    --white: #ffffff;
    --gray-50: #f8f9fc;
    --gray-100: #f1f3f8;
    --gray-200: #e2e6f0;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --dark: #1a1a2e;
    --shadow-sm: 0 2px 8px rgba(53,48,137,0.10);
    --shadow-md: 0 8px 32px rgba(53,48,137,0.16);
    --radius: 12px;
    --header-h: 68px;
    --filters-h: 52px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body, html {
    height: 100%; width: 100%;
    font-family: 'Montserrat', sans-serif;
    overflow: hidden;
}

/* ── MAP ── */
#map {
    position: fixed;
    inset: 0;
    z-index: 1;
}

/* ── HEADER ── */
.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--blue);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    z-index: 500;
    box-shadow: 0 2px 16px rgba(53,48,137,0.25);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 4px 8px;
}

.header-titles {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.3px;
}

.header-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-search {
    flex: 1;
    max-width: 420px;
    position: relative;
    display: flex;
    align-items: center;
}

.header-search i.fa-search {
    position: absolute;
    left: 14px;
    color: var(--gray-400);
    font-size: 14px;
    pointer-events: none;
}

.header-search input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 40px;
    border: 2px solid transparent;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: background 0.2s, border-color 0.2s;
}

.header-search input::placeholder { color: rgba(255,255,255,0.6); }

.header-search input:focus {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.4);
}

.btn-clear-search {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 50%;
    display: none;
    font-size: 13px;
    transition: color 0.2s;
}
.btn-clear-search:hover { color: var(--white); }
.btn-clear-search.visible { display: flex; }

.header-count {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.header-count span {
    font-weight: 800;
    color: var(--white);
}

/* ── FILTERS BAR ── */
.filters-bar {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    height: var(--filters-h);
    background: var(--white);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    z-index: 400;
    box-shadow: 0 2px 12px rgba(53,48,137,0.08);
    overflow-x: auto;
    scrollbar-width: none;
}
.filters-bar::-webkit-scrollbar { display: none; }

.dept-chips {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.chip {
    height: 32px;
    padding: 0 14px;
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    background: var(--white);
    color: var(--gray-600);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.chip:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.chip.active {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
}

.filter-divider {
    width: 1px;
    height: 24px;
    background: var(--gray-200);
    flex-shrink: 0;
}

.filter-select {
    height: 32px;
    padding: 0 12px;
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    background: var(--white);
    color: var(--gray-600);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
    flex-shrink: 0;
}

.filter-select:focus,
.filter-select:not([value=""]) {
    border-color: var(--blue);
    color: var(--blue);
}

/* ── CLUB PANEL ── */
.club-panel {
    position: fixed;
    top: 0; right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100%;
    background: var(--white);
    z-index: 600;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -4px 0 32px rgba(53,48,137,0.15);
}

.club-panel.open {
    transform: translateX(0);
}

.panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,26,46,0.45);
    z-index: 590;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.panel-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.panel-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 10;
    transition: background 0.2s;
}
.panel-close:hover { background: var(--gray-200); }

/* Panel header */
.panel-hero {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    padding: 32px 24px 24px;
    position: relative;
}

.panel-logo-wrap {
    width: 72px;
    height: 72px;
    background: var(--white);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.panel-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.panel-club-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: -0.3px;
}

.panel-club-city {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
}

.panel-label-badge {
    display: inline-block;
    margin-top: 10px;
}

.panel-label-badge img {
    height: 28px;
}

/* Panel body */
.panel-body {
    padding: 24px;
}

.panel-section {
    margin-bottom: 24px;
}

.panel-section-title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    margin-bottom: 12px;
}

/* Contact items */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    transition: background 0.15s, border-color 0.15s;
}

a.contact-item:hover {
    background: var(--blue-light);
    border-color: var(--blue);
    color: var(--blue);
}

.contact-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--blue-light);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

a.contact-item:hover .contact-icon {
    background: var(--blue);
    color: var(--white);
}

.contact-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Pratiques tags */
.pratiques-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pratique-tag {
    padding: 6px 12px;
    background: var(--blue-light);
    color: var(--blue);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* Barre genre */
.gender-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gender-bar {
    flex: 1;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
}

.gender-bar-f { background: #ec4899; }
.gender-bar-m { background: #353089; }

.gender-label {
    font-size: 16px;
    flex-shrink: 0;
}
.gender-f { color: #ec4899; }
.gender-m { color: #353089; }

/* Badges diplômes */
.diplomes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.diplome-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1.5px solid;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.diplome-count {
    font-weight: 800;
    opacity: 0.85;
}

/* Bouton satellite */
.btn-satellite {
    position: fixed;
    bottom: 100px;
    right: 16px;
    z-index: 450;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 20px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-600);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}
.btn-satellite:hover,
.btn-satellite.active {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
}
.btn-satellite i { font-size: 13px; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    :root {
        --header-h: 60px;
    }

    .header-brand .header-titles { display: none; }
    .header-count { display: none; }

    .header-search {
        max-width: none;
    }

    .club-panel {
        width: 100%;
        top: auto;
        bottom: 0;
        height: 85vh;
        transform: translateY(100%);
        border-radius: 20px 20px 0 0;
    }

    .club-panel.open {
        transform: translateY(0);
    }
}
