/* ============================================
   LABÈGE CLASSIC — STYLES GLOBAUX
   Club automobile premium · Patrimoine roulant
   Esprit : Passion · Convivialité · Excellence
   ============================================ */

/* ============================================
   VARIABLES ADDITIONNELLES
   ============================================ */
:root {
    /* Espacements système 8px */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 48px;
    --space-xl: 80px;
    --space-xxl: 120px;

    /* Container */
    --container-max: 1400px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-elegant: 0.6s cubic-bezier(0.22, 1, 0.36, 1);

    /* Racing stripe */
    --stripe-height: 4px;
    --stripe-gradient: linear-gradient(90deg, rgb(var(--racing-red)) 0%, rgb(var(--gold-champagne)) 100%);
}

/* ============================================
   TYPOGRAPHIE
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600&family=Montserrat:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#globalnav .menuicon-bread-crust {
    background-color: rgb(var(--blanc-nacre));
    color: rgb(var(--blanc-nacre));
    fill: rgb(var(--blanc-nacre));
}

#page-le_club,
#page-accueil,
#page-actualites,
#page-evenements,
#page-contact,
#page-adhesion,
#page-galerie {
    & main {
        margin: 0;
        padding: 0;
    }
}

h1, h2, h3, h4, h5, h6,
.heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: rgb(var(--text-primary));
}

.nav-link,
.btn,
.label,
.uppercase {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* ============================================
   EFFETS TEXTE PREMIUM
   ============================================ */
.text-gold {
    color: rgb(var(--gold-champagne));
}

.text-racing {
    color: rgb(var(--racing-red));
}

.text-italic-accent {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
}

.text-gradient-gold {
    background: linear-gradient(135deg, rgb(var(--gold-champagne)), rgb(var(--beige-cuir)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   BOUTONS
   ============================================ */
.btn-racing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgb(var(--racing-red));
    color: rgb(var(--blanc-nacre));
    padding: 16px 36px;
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
        transition: left 0.5s ease;
    }

    &:hover {
        background: rgba(var(--racing-red), 0.9);
        color: rgb(var(--blanc-nacre));
        transform: translateY(-3px);
        box-shadow: 0 12px 28px rgba(var(--racing-red), 0.35);

        &::before {
            left: 100%;
        }
    }

    &:active {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(var(--racing-red), 0.3);
    }
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: rgb(var(--gold-champagne));
    padding: 14px 34px;
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    border: 2px solid rgb(var(--gold-champagne));
    cursor: pointer;
    transition: all var(--transition-base);

    &:hover {
        background: rgb(var(--gold-champagne));
        color: rgb(var(--noir-carbone));
        transform: translateY(-3px);
        box-shadow: 0 12px 28px rgba(var(--gold-champagne), 0.25);
    }

    &:active {
        transform: translateY(-1px);
    }
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: rgb(var(--text-primary));
    padding: 14px 34px;
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    border: 2px solid rgba(var(--text-primary), 0.25);
    cursor: pointer;
    transition: all var(--transition-base);

    &:hover {
        border-color: rgb(var(--text-primary));
        color: rgb(var(--text-primary));
        transform: translateY(-2px);
    }
}

/* ============================================
   CARTES
   ============================================ */
.card-classic {
    background: rgba(var(--background-secondary), 0.98);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 1px solid rgba(var(--text-primary), 0.04);

    &:hover {
        transform: translateY(-8px);
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    }
}

.card-dark {
    background: rgb(var(--noir-carbone));
    color: rgb(var(--blanc-nacre));
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--space-xl) 0;

    @media (max-width: 768px) {
        padding: var(--space-lg) 0;
    }
}

.section-dark {
    background: linear-gradient(160deg, rgb(var(--section-dark-bg)) 0%, rgba(var(--section-dark-bg), 0.97) 50%, rgb(var(--section-dark-bg)) 100%);
    color: rgb(var(--blanc-nacre));
    position: relative;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: var(--stripe-height);
        background: var(--stripe-gradient);
    }
}

.section-light {
    background: rgb(var(--background-secondary));
    color: rgb(var(--text-primary));
}

/* Racing stripe separator */
.racing-stripe {
    height: var(--stripe-height);
    background: var(--stripe-gradient);
    border: none;
    margin: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-elegant), transform var(--transition-elegant);

    &.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transition: opacity var(--transition-elegant);

    &.visible {
        opacity: 1;
    }
}

/* ============================================
   LIENS ÉLÉGANTS
   ============================================ */
.link-gold {
    position: relative;
    color: rgb(var(--gold-champagne));
    text-decoration: none;
    transition: color var(--transition-fast);

    &::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background: rgb(var(--gold-champagne));
        transition: width var(--transition-base);
    }

    &:hover {
        color: rgb(var(--gold-champagne));

        &::after {
            width: 100%;
        }
    }
}

.link-racing {
    position: relative;
    color: rgb(var(--racing-red));
    text-decoration: none;
    transition: color var(--transition-fast);

    &::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background: rgb(var(--racing-red));
        transition: width var(--transition-base);
    }

    &:hover {
        color: rgb(var(--racing-red));

        &::after {
            width: 100%;
        }
    }
}

/* ============================================
   DIVIDERS
   ============================================ */
.divider-gold {
    width: 60px;
    height: 3px;
    background: var(--stripe-gradient);
    margin: var(--space-sm) 0;
    border-radius: 2px;
}

.divider-gold-center {
    width: 60px;
    height: 3px;
    background: var(--stripe-gradient);
    margin: var(--space-sm) auto;
    border-radius: 2px;
}

/* ============================================
   TITRES AVEC STYLE
   ============================================ */
.title-section {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.03em;

    @media (max-width: 768px) {
        font-size: 1.875rem;
    }
}

.subtitle-section {
    font-family: 'Inter', sans-serif;
    font-size: 1.0625rem;
    font-weight: 400;
    color: rgba(var(--text-primary), 0.65);
    max-width: 580px;
    line-height: 1.75;

    @media (max-width: 768px) {
        font-size: 0.9375rem;
    }
}

/* ============================================
   BADGES
   ============================================ */
.badge-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(var(--gold-champagne), 0.12);
    color: rgb(var(--gold-champagne));
    border: 1px solid rgba(var(--gold-champagne), 0.25);
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.badge-racing {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(var(--racing-red), 0.1);
    color: rgb(var(--racing-red));
    border: 1px solid rgba(var(--racing-red), 0.2);
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ============================================
   ICÔNES
   ============================================ */
.icon-gold {
    color: rgb(var(--gold-champagne));
}

.icon-racing {
    color: rgb(var(--racing-red));
}

/* ============================================
   GRILLE D'IMAGES
   ============================================ */
.image-hover {
    overflow: hidden;
    border-radius: 4px;
    position: relative;

    & img {
        transition: transform var(--transition-slow);
    }

    &:hover img {
        transform: scale(1.08);
    }

    &::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, transparent 50%, rgba(var(--noir-carbone), 0.4) 100%);
        opacity: 0;
        transition: opacity var(--transition-base);
        pointer-events: none;
    }

    &:hover::after {
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
.container-classic {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);

    @media (max-width: 768px) {
        padding: 0 var(--space-sm);
    }
}

/* ============================================
   FORMULAIRES STYLISÉS
   ============================================ */
.form-classic {
    & .form-control {
        background: rgba(var(--background-tertiary), 0.6);
        border: 1px solid rgba(var(--text-primary), 0.08);
        border-radius: 2px;
        padding: 0.9375rem 1.125rem;
        color: rgb(var(--text-primary));
        font-family: 'Inter', sans-serif;
        font-size: 0.9375rem;
        transition: border-color var(--transition-fast), box-shadow var(--transition-fast);

        &:focus {
            border-color: rgb(var(--gold-champagne));
            box-shadow: 0 0 0 3px rgba(var(--gold-champagne), 0.08);
            outline: none;
        }

        &::placeholder {
            color: rgba(var(--text-primary), 0.35);
        }
    }

    & label {
        font-family: 'Montserrat', sans-serif;
        font-size: 0.6875rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: rgba(var(--text-primary), 0.6);
        margin-bottom: 0.5rem;
        display: block;
    }

    & textarea.form-control {
        min-height: 150px;
        resize: vertical;
    }
}

/* ============================================
   OVERLAY GRADIENT
   ============================================ */
.overlay-dark {
    background: linear-gradient(0deg, rgba(var(--section-dark-bg), 0.9) 0%, transparent 100%);
}

.overlay-full {
    background: rgba(var(--section-dark-bg), 0.7);
}

/* ============================================
   SCROLL ANIMATIONS (via JS)
   ============================================ */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   NAVBAR LABÈGE CLASSIC
   ============================================ */
.navbar-labege {
    & .navbar {
        background: rgba(var(--section-dark-bg), 0.95);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-bottom: none;
        transition: all var(--transition-base);
        position: relative;

        &::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--stripe-gradient);
            opacity: 0.6;
        }
    }

    & .logo-link {
        display: flex;
        align-items: center;
        text-decoration: none;
    }

    & .img-logo-nav {
        height: 42px;
        width: auto;
    }

    & .main-title {
        display: flex;
        gap: 0.4rem;
    }

    & .title-labege {
        font-family: 'Playfair Display', serif;
        font-size: 1.3rem;
        font-weight: 700;
        color: rgb(var(--blanc-nacre));
        letter-spacing: -0.01em;
    }

    & .title-classic {
        font-family: 'Playfair Display', serif;
        font-size: 1.3rem;
        font-weight: 700;
        color: rgb(var(--gold-champagne));
        letter-spacing: -0.01em;
    }

    & .navbar-nav {
        gap: 0.25rem;
    }

    & .nav-link {
        font-family: 'Montserrat', sans-serif;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: rgba(var(--blanc-nacre), 0.75);
        padding: 0.625rem 1rem;
        border-radius: 2px;
        transition: all var(--transition-fast);
        position: relative;

        &:hover {
            color: rgb(var(--gold-champagne));
        }

        &.active {
            color: rgb(var(--gold-champagne));
            background: rgba(var(--gold-champagne), 0.08);
        }

        &.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 20px;
            height: 2px;
            background: rgb(var(--gold-champagne));
            border-radius: 1px;
        }
    }

    & .nav-social-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: rgba(var(--blanc-nacre), 0.06);
        border-radius: 50%;
        color: rgba(var(--blanc-nacre), 0.6);
        transition: all var(--transition-base);
        border: 1px solid rgba(var(--blanc-nacre), 0.08);

        &:hover {
            background: #1877F2;
            color: #fff;
            border-color: #1877F2;
            transform: translateY(-2px);
        }
    }

    & .menuicon-bread-crust {
        background: rgb(var(--blanc-nacre));
    }
}

/* ============================================
   FOOTER LABÈGE CLASSIC
   ============================================ */
.footer-labege {
    background: rgb(var(--section-dark-bg));
    color: rgb(var(--blanc-nacre));
    padding: var(--space-xl) 0 0;
    position: relative;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: var(--stripe-height);
        background: var(--stripe-gradient);
    }

    & .footer-brand {
        display: flex;
        gap: 0.4rem;
        margin-bottom: 1.25rem;
    }

    & .footer-title-labege {
        font-family: 'Playfair Display', serif;
        font-size: 1.75rem;
        font-weight: 700;
        color: rgb(var(--blanc-nacre));
    }

    & .footer-title-classic {
        font-family: 'Playfair Display', serif;
        font-size: 1.75rem;
        font-weight: 700;
        color: rgb(var(--gold-champagne));
    }

    & .footer-about {
        color: rgba(var(--blanc-nacre), 0.6);
        font-size: 0.9375rem;
        line-height: 1.75;
        margin-bottom: 1.5rem;
        max-width: 320px;
    }

    & .footer-social {
        display: flex;
        gap: 0.75rem;
    }

    & .footer-social-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(var(--blanc-nacre), 0.04);
        border: 1px solid rgba(var(--blanc-nacre), 0.08);
        border-radius: 50%;
        color: rgba(var(--blanc-nacre), 0.6);
        transition: all var(--transition-base);

        &:hover {
            background: #1877F2;
            color: #fff;
            border-color: #1877F2;
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(24, 119, 242, 0.3);
        }
    }

    & .footer-heading {
        font-family: 'Montserrat', sans-serif;
        font-size: 0.6875rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.15em;
        color: rgb(var(--gold-champagne));
        margin-bottom: 1.5rem;
        position: relative;
        padding-bottom: 0.75rem;

        &::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 24px;
            height: 2px;
            background: rgb(var(--racing-red));
        }
    }

    & .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;

        & li {
            margin-bottom: 0.875rem;
        }

        & a {
            color: rgba(var(--blanc-nacre), 0.6);
            text-decoration: none;
            font-size: 0.9375rem;
            transition: all var(--transition-fast);
            position: relative;
            padding-left: 0;

            &:hover {
                color: rgb(var(--gold-champagne));
                padding-left: 6px;
            }
        }
    }

    & .footer-contact {
        list-style: none;
        padding: 0;
        margin: 0;

        & li {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            margin-bottom: 1rem;
            color: rgba(var(--blanc-nacre), 0.6);
            font-size: 0.9375rem;

            & svg {
                color: rgb(var(--gold-champagne));
                flex-shrink: 0;
                margin-top: 3px;
            }

            & a {
                color: rgba(var(--blanc-nacre), 0.6);
                text-decoration: none;
                transition: color var(--transition-fast);

                &:hover {
                    color: rgb(var(--gold-champagne));
                }
            }
        }
    }

    & .footer-bottom {
        margin-top: var(--space-lg);
        padding: 1.5rem 0;
        border-top: 1px solid rgba(var(--blanc-nacre), 0.06);
    }

    & .footer-copyright {
        color: rgba(var(--blanc-nacre), 0.4);
        font-size: 0.8125rem;
        margin: 0;
        font-family: 'Inter', sans-serif;
    }

    & .footer-legal {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        gap: 1.5rem;

        & a {
            color: rgba(var(--blanc-nacre), 0.4);
            text-decoration: none;
            font-size: 0.8125rem;
            transition: color var(--transition-fast);

            &:hover {
                color: rgb(var(--gold-champagne));
            }
        }
    }
}

/* ============================================
   HERO PAGE - STYLES RÉUTILISABLES
   ============================================ */
.hero-page {
    position: relative;
    padding: 180px 0 110px;
    overflow: hidden;

    & .hero-page-background {
        position: absolute;
        inset: 0;
        background: linear-gradient(160deg, rgb(var(--section-dark-bg)) 0%, rgba(var(--section-dark-bg), 0.92) 100%);
        background-size: cover;
        background-position: center;
        z-index: 0;

        &::after {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(var(--section-dark-bg), 0.75);
        }
    }

    &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--stripe-height);
        background: var(--stripe-gradient);
        z-index: 2;
    }

    & .hero-page-content {
        position: relative;
        z-index: 1;
    }

    & .hero-page-title {
        font-size: 3.75rem;
        font-weight: 700;
        color: rgb(var(--blanc-nacre));
        margin-bottom: 0.75rem;
        letter-spacing: -0.03em;

        @media (max-width: 768px) {
            font-size: 2.5rem;
        }
    }

    & .hero-page-subtitle {
        font-size: 1.125rem;
        color: rgba(var(--blanc-nacre), 0.7);
        max-width: 580px;
        line-height: 1.75;
    }
}

/* ============================================
   RESPONSIVE FIXES
   ============================================ */
@media (max-width: 1199px) {
    .navbar-labege {
        & .navbar-collapse {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            background: rgb(var(--section-dark-bg));
            padding: 80px 2rem 2rem;
            z-index: 1050;
        }

        & .navbar-nav {
            flex-direction: column;
            gap: 0;
        }

        & .nav-link {
            font-size: 1.25rem;
            padding: 1rem;
            border-bottom: 1px solid rgba(var(--blanc-nacre), 0.05);
        }
    }
}

@media (max-width: 768px) {
    .footer-labege .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ============================================
   FORMULAIRE DE CONTACT - ÉTATS
   ============================================ */
#contact-form .alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
}

#contact-form .alert-success {
    background: rgba(var(--or-champagne), 0.1);
    border: 1px solid rgba(var(--or-champagne), 0.3);
    color: rgb(var(--noir-carbone));
}

#contact-form .alert-danger {
    background: rgba(var(--rouge-racing), 0.08);
    border: 1px solid rgba(var(--rouge-racing), 0.2);
    color: rgb(var(--rouge-racing));
}

#contact-form .alert ul {
    padding-left: 1.25rem;
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#contact-submit-btn .spinner {
    animation: spin 1s linear infinite;
}

#contact-submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

#contact-submit-btn .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.d-none {
    display: none !important;
}
