/* ==========================================================================
   ACADÉMIE TAÏ-KIH - JUDO CLUB DAMPREMY
   Style Moderne, Athlétique & Épuré (Noir, Rouge, Blanc)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Oswald:wght@500;600;700&display=swap');

:root {
    --bg-page: #08090c;
    --bg-surface: #101117;
    --bg-surface-elevated: #161822;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(220, 38, 38, 0.4);
    --accent-red: #e50914;
    --accent-red-hover: #b91c1c;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

h1, h2, h3, .font-heading {
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Navigation principale toujours sur une ligne */
header nav,
header nav a {
    white-space: nowrap;
}

/* Section Accueil Plein Écran */
#accueil.hero-ambient {
    min-height: calc(100vh - 3.5rem);
    min-height: calc(100dvh - 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
@media (min-width: 640px) {
    #accueil.hero-ambient {
        min-height: calc(100vh - 4rem);
        min-height: calc(100dvh - 4rem);
    }
}

/* Ambiance d'éclairage moderne pour casser le noir plat */
.hero-ambient {
    position: relative;
    background: radial-gradient(circle at 50% 15%, rgba(229, 9, 20, 0.1) 0%, rgba(8, 9, 12, 0) 60%),
                #08090c;
}

.section-ambient {
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.02) 0%, transparent 70%),
                #0b0c10;
}

/* Fondu parfait du logo sur le fond du site */
.banner-blend {
    mix-blend-mode: screen;
    filter: contrast(1.1) brightness(1.06);
    transition: transform 0.3s ease, filter 0.3s ease;
}
.banner-blend:hover {
    filter: contrast(1.15) brightness(1.1);
}

/* Cartes Premium avec reflet subtil */
.premium-card {
    background: linear-gradient(180deg, rgba(22, 24, 34, 0.75) 0%, rgba(16, 17, 23, 0.95) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Boutons Modernes */
.btn-primary {
    background: #dc2626;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Cotisation Compacte (1 Vue) */
.cotisation-compact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 11px;
    border-radius: 10px;
    background: rgba(22, 24, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: all 0.15s ease;
}

.cotisation-compact-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(28, 30, 42, 0.95);
}

.cotisation-compact-item.is-unpaid {
    border-color: rgba(229, 9, 20, 0.35);
    background: rgba(229, 9, 20, 0.06);
}

.btn-toggle-compact {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-toggle-compact:active {
    transform: scale(0.95);
}

.belt-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.belt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    white-space: nowrap;
}

/* Calendrier Mensuel Haute Définition */
.cal-day-cell {
    min-height: 85px;
    background: rgba(18, 20, 28, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.15s ease;
}

.cal-day-cell:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(24, 26, 36, 0.85);
}

.cal-event-pill {
    margin-top: 3px;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.cal-event-pill:hover {
    transform: scale(1.02);
    filter: brightness(1.15);
}

/* Tables Admin */
.admin-table th {
    background: #11131a;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #08090c;
}
::-webkit-scrollbar-thumb {
    background: #252834;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

/* ==============================================================
   OPTIMISATIONS SMARTPHONE (Responsive mobile raffiné)
   ============================================================== */
@media (max-width: 640px) {
    /* Calendrier adapté aux écrans étroits */
    .cal-day-cell {
        min-height: 48px;
        padding: 2px 3px;
        border-radius: 6px;
    }
    .cal-event-pill {
        font-size: 0.55rem;
        padding: 1px 3px;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Cotisations confortables sur mobile */
    .cotisation-compact-item {
        padding: 8px 10px;
    }

    /* Modale de documents sur Smartphone */
    #document-modal {
        padding: 8px !important;
    }
    #document-modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: auto !important;
    }
    #printable-modal {
        padding: 12px !important;
        max-height: 94vh !important;
    }

    /* Évite le zoom automatique indésirable de Safari iOS lors du focus sur les champs */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Tableaux administratifs déroulables horizontalement avec aisance */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
    table {
        min-width: 580px;
    }

    /* Espacements d'ancres pour ne pas être masqué par le header sticky */
    section {
        scroll-margin-top: 60px;
    }
}

/* ==============================================================
   STYLE D'IMPRESSION PROPRE POUR LES ATTESTATIONS MUTUELLE
   ============================================================== */
@media print {
    body * {
        visibility: hidden !important;
    }
    #document-modal,
    #document-modal * {
        visibility: visible !important;
    }
    #document-modal {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    #document-modal-content {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    #printable-modal {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    .no-print {
        display: none !important;
    }
}
