/* Reset et styles de base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #3e3e3e;
    --secondary-color: #222;
    --accent-color: #ffc933;
    --gold-hover: #b48f1f;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Variables responsives pour mobile - CORRIGÉES */
    --mobile-menu-width: min(320px, 85vw);
    --mobile-padding-base: clamp(20px, 5vw, 25px);
    --mobile-padding-submenu: clamp(100px, 25vw, 120px);
    --mobile-padding-hover-offset: 8px;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    margin-top: 80px;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header principal */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(62, 62, 62, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    height: 80px;
}

/* Section Logo */
.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1001;
}

.logo-section img {
    height: 50px;
    border-radius: 4px;
    transition: var(--transition);
}

.logo-section img:hover {
    transform: scale(1.05) rotate(2deg);
    filter: brightness(1.1);
}

.club-name {
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.club-name::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.club-name:hover::after {
    width: 100%;
}

.club-name:hover {
    color: var(--accent-color);
    transform: translateY(-1px);
}

/* Menu hamburger moderne */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    background: transparent;
    border: none;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
    background: var(--accent-color);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
    background: var(--accent-color);
}

/* Navigation */
.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
}

.nav-links > a,
.dropdown > a {
    text-transform: uppercase;
    font-size: 0.95rem;
    font-weight: 200;
    letter-spacing: 0.05em;
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-links > a::before,
.dropdown > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 201, 51, 0.1);
    border-radius: var(--border-radius);
    opacity: 0;
    transition: var(--transition);
}

.nav-links > a:hover::before,
.dropdown > a:hover::before {
    opacity: 1;
}

.nav-links > a:hover,
.dropdown > a:hover {
    color: var(--accent-color);
    font-weight: bold;
    transform: translateY(-2px);
}

/* Dropdown moderne avec zone de tolérance */
.dropdown {
    position: relative;
}

/* Zone de tolérance invisible pour éviter que le menu disparaisse */
.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
    z-index: 998;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    border-radius: var(--border-radius);
    min-width: 250px;
    width: max-content;
    max-width: 400px;
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-5px);
    transition: var(--transition);
    z-index: 999;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--accent-color);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gold-hover);
    transition: var(--transition);
    z-index: -1;
}

.dropdown-menu a:hover::before {
    left: 0;
}

.dropdown-menu a:hover {
    background-color: var(--gold-hover);
    color: #ffffff;
    transform: translateX(5px);
}

.dropdown:hover .dropdown-menu,
.dropdown:hover::after {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown:hover > a {
    color: var(--accent-color);
    font-weight: bold;
}

.dropdown i.fa-chevron-down {
    transition: var(--transition);
    font-size: 0.8rem;
}

.dropdown:hover i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Réseaux sociaux modernisés */
.social-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 201, 51, 0.3);
    color: var(--text-primary);
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-color);
    opacity: 0;
    transition: var(--transition);
    transform: scale(0);
}

.social-icon:hover::before {
    opacity: 1;
    transform: scale(1);
}

.social-icon i {
    position: relative;
    z-index: 1;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(255, 201, 51, 0.3);
    border-color: var(--accent-color);
}

/* Ancienne icône Facebook pour compatibilité */
.social-icons a img[alt="Facebook"] {
    height: 22px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(1.5);
}

.social-icons a:hover img[alt="Facebook"] {
    transform: scale(1.15);
    filter: brightness(2);
}

/* Overlay pour mobile */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-links {
        gap: 25px;
    }
    
    header {
        padding: 15px 30px;
    }

    .nav-links > a,
    .dropdown > a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .nav-links {
        gap: 20px;
    }
    
    header {
        padding: 15px 25px;
    }

    .nav-links > a,
    .dropdown > a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Point de rupture pour mobile avec système adaptatif - SECTION CORRIGÉE */
@media (max-width: 768px) {
    :root {
        /* Variables corrigées pour un meilleur alignement */
        --mobile-padding-base: clamp(20px, 5vw, 25px);
        --mobile-padding-submenu: clamp(100px, 25vw, 120px);
        --mobile-padding-hover-offset: 8px;
    }

    header {
        padding: 13px 20px;
        height: 70px;
    }
    
    body {
        margin-top: 70px;
    }
    
    /* Menu mobile en volet roulant avec largeur adaptative */
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        max-width: var(--mobile-menu-width);
        height: calc(100vh - 70px);
        background: var(--secondary-color);
        flex-direction: column;
        padding: 15px 0;
        gap: 0;
        z-index: 999;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links > a,
    .dropdown {
        width: 100%;
        margin: 0;
    }

    /* CORRECTION PRINCIPALE : Alignement avec padding consistant */
    .nav-links > a,
    .dropdown > a {
        padding: 16px var(--mobile-padding-base);
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: flex-start;
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        font-weight: 500;
        transition: all 0.3s ease;
        /* Assurer l'alignement du texte */
        display: flex;
        align-items: center;
        box-sizing: border-box;
    }

    /* Hover avec décalage cohérent */
    .nav-links > a:hover,
    .dropdown > a:hover {
        background: rgba(255, 201, 51, 0.1);
        color: var(--accent-color);
        padding-left: calc(var(--mobile-padding-base) + var(--mobile-padding-hover-offset));
        transform: none;
    }

    /* CORRECTION : Dropdowns mobiles avec alignement parfait */
    .dropdown-menu {
        position: static;
        transform: none;
        background-color: #333;
        border: none;
        border-radius: 0;
        box-shadow: none;
        min-width: auto;
        width: 100%;
        max-width: 100%;
        margin-left: 150px;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 300px;
    }

    /* CORRECTION CRITIQUE : Sous-menus avec indentation parfaitement alignée */
    .dropdown-menu a {
        color: var(--text-secondary);
        padding: 12px 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: clamp(0.8rem, 2.2vw, 0.9rem);
        font-weight: 400;
        justify-content: flex-start;
        background: transparent;
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
        /* Assurer que le texte est toujours visible */
        min-height: 44px;
        text-align: left;
        /* Texte aligné à gauche de la boîte */
        padding-left: 10px !important;
    }

    .dropdown-menu a:hover {
        background-color: var(--accent-color);
        color: #222;
        padding-left: 15px !important;
    }

    .dropdown-menu a::before {
        display: none;
    }

    /* CORRECTION : Chevron aligné à droite */
    .dropdown i.fa-chevron-down {
        margin-left: auto;
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }

    .dropdown.active i.fa-chevron-down {
        transform: rotate(180deg);
    }

    /* Réseaux sociaux avec alignement centré */
    .social-icons {
        margin-top: 15px;
        padding: 15px var(--mobile-padding-base) 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    .social-icon {
        width: 45px;
        height: 45px;
    }

    .menu-toggle {
        display: flex;
    }

    .club-name {
        font-size: clamp(1rem, 3vw, 1.2rem);
    }

    .logo-section img {
        height: clamp(35px, 8vw, 40px);
    }
}

/* Très petits écrans avec ajustements automatiques - SECTION CORRIGÉE */
@media (max-width: 480px) {
    :root {
        /* Ajustement pour très petits écrans */
        --mobile-padding-base: clamp(15px, 4vw, 20px);
        --mobile-padding-submenu: clamp(80px, 20vw, 100px);
        --mobile-menu-width: min(280px, 95vw);
    }

    header {
        padding: 10px 15px;
        height: 60px;
    }
    
    body {
        margin-top: 60px;
    }

    .nav-links {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .club-name {
        font-size: clamp(0.9rem, 3.5vw, 1rem);
    }
    
    .logo-section {
        gap: 8px;
    }
    
    .logo-section img {
        height: clamp(30px, 7vw, 35px);
    }

    /* Ajustement des tailles de police pour très petits écrans */
    .nav-links > a,
    .dropdown > a {
        font-size: clamp(0.85rem, 3vw, 0.95rem);
        padding: 14px var(--mobile-padding-base);
    }

    .dropdown-menu a {
        font-size: clamp(0.75rem, 2.8vw, 0.85rem);
        padding: 10px var(--mobile-padding-submenu);
    }
}

/* Très grands écrans (au-delà de 1400px) */
@media (min-width: 1400px) {
    .nav-links {
        gap: 35px;
    }
    
    .nav-links > a,
    .dropdown > a {
        padding: 12px 22px;
        font-size: 1rem;
    }
}

/* Animation d'entrée */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-links.active > * {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

.nav-links.active > *:nth-child(1) { animation-delay: 0.1s; }
.nav-links.active > *:nth-child(2) { animation-delay: 0.15s; }
.nav-links.active > *:nth-child(3) { animation-delay: 0.2s; }
.nav-links.active > *:nth-child(4) { animation-delay: 0.25s; }
.nav-links.active > *:nth-child(5) { animation-delay: 0.3s; }

/* Version desktop */
@media (min-width: 769px) {
    .nav-links > * {
        animation: fadeInUp 0.6s ease-out forwards;
        opacity: 0;
    }

    .nav-links > *:nth-child(1) { animation-delay: 0.1s; }
    .nav-links > *:nth-child(2) { animation-delay: 0.2s; }
    .nav-links > *:nth-child(3) { animation-delay: 0.3s; }
    .nav-links > *:nth-child(4) { animation-delay: 0.4s; }
    .nav-links > *:nth-child(5) { animation-delay: 0.5s; }
}