/* Reset et styles globaux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    padding-top: 80px; /* Hauteur du header */
    transition: all 0.3s ease;
}

/* État du body quand le menu mobile est ouvert */
body.menu-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    body.menu-open {
        position: fixed;
        width: 100%;
        height: 100%;
    }
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--menu-bg-color, rgba(0, 0, 0, 0.95));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: var(--menu-bg-color, rgba(0, 0, 0, 1));
    padding: 0.5rem 0;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Logo styles */
.logo {
    color: var(--logo-color, var(--menu-text-color, #fff));
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.logo:hover {
    color: var(--logo-color, var(--menu-hover-color, #e50914));
    transform: scale(1.05);
}

.logo-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.site-logo {
    max-height: 50px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Ajustement quand le header est scrollé */
.header.scrolled .site-logo {
    max-height: 40px;
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .site-logo {
        max-height: 40px;
    }
    
    .header.scrolled .site-logo {
        max-height: 35px;
    }
}

/* Menu Burger */
.burger-menu {
    display: none; /* Caché par défaut sur desktop */
    color: var(--menu-text-color, #fff);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 6px;
    position: relative;
    z-index: 1001;
}

.burger-menu:hover {
    color: var(--menu-hover-color, #e50914);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.burger-menu.active {
    color: var(--menu-hover-color, #e50914);
}

/* Navigation principale */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.nav-menu a {
    color: var(--menu-text-color, #fff);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--menu-hover-color, #e50914);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover {
    color: var(--menu-hover-color, #e50914);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-menu a:hover::before {
    width: 80%;
}

/* Styles pour mobile */
@media (max-width: 768px) {
    .burger-menu {
        display: block; /* Affiché sur mobile */
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--menu-bg-color, rgba(0, 0, 0, 0.98));
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        padding: 1rem 0;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        transform: translateY(-20px);
        opacity: 0;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        animation: slideDown 0.3s ease;
    }

    .nav-menu a {
        padding: 1rem 2rem;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        font-size: 1.1rem;
        transition: all 0.3s ease;
    }

    .nav-menu a:hover {
        background: rgba(255, 255, 255, 0.1);
        padding-left: 2.5rem;
        transform: translateY(0);
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    .nav-menu a::before {
        display: none;
    }

    /* Afficher les boutons de connexion mobile uniquement sur mobile */
    .nav-menu .mobile-login-btn,
    .nav-menu .mobile-register-btn {
        display: block !important;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Indicateur de menu actif */
.nav-menu a.active {
    color: var(--menu-hover-color, #e50914) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.nav-menu a.active::before {
    width: 80% !important;
}

/* Animation des éléments du menu mobile */
@media (max-width: 768px) {
    .nav-menu.active a {
        animation: slideInFromLeft 0.3s ease forwards;
    }
    
    .nav-menu.active a:nth-child(1) { animation-delay: 0.1s; }
    .nav-menu.active a:nth-child(2) { animation-delay: 0.2s; }
    .nav-menu.active a:nth-child(3) { animation-delay: 0.3s; }
    .nav-menu.active a:nth-child(4) { animation-delay: 0.4s; }
    .nav-menu.active a:nth-child(5) { animation-delay: 0.5s; }
    .nav-menu.active a:nth-child(6) { animation-delay: 0.6s; }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Style pour le burger menu animé */
.burger-menu i {
    transition: all 0.3s ease;
}

.burger-menu.active i {
    transform: rotate(90deg);
}

/* Amélioration de l'accessibilité */
.burger-menu:focus,
.nav-menu a:focus {
    outline: 2px solid var(--menu-hover-color, #e50914);
    outline-offset: 2px;
}

/* Indicateur visuel pour le menu burger */
.burger-menu::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--menu-hover-color, #e50914);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.burger-menu:hover::after {
    width: 100%;
}

/* Optimisation pour les écrans haute résolution */
@media (min-width: 1200px) {
    .header-content {
        max-width: 1400px;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-menu a {
        padding: 0.75rem 1.5rem;
    }
}

/* Styles pour assurer la cohérence avec le système de couleurs personnalisées */
:root {
    --header-height: 80px;
    --menu-transition: all 0.3s ease;
    --menu-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    --menu-mobile-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Préchargement des animations pour éviter les saccades */
.header,
.nav-menu,
.nav-menu a,
.burger-menu,
.user-link,
.user-dropdown {
    will-change: transform, opacity, background-color;
}

/* Styles pour la compatibilité avec les thèmes personnalisés */
.header[data-theme="custom"] {
    background: var(--menu-bg-color, rgba(0, 0, 0, 0.95));
}

.header[data-theme="custom"] .nav-menu a {
    color: var(--menu-text-color, #fff);
}

.header[data-theme="custom"] .nav-menu a:hover {
    color: var(--menu-hover-color, #e50914);
}

.header[data-theme="custom"] .burger-menu {
    color: var(--menu-text-color, #fff);
}

.header[data-theme="custom"] .burger-menu:hover {
    color: var(--menu-hover-color, #e50914);
}

/* Styles pour le menu utilisateur avec thème personnalisé */
.header[data-theme="custom"] .user-toggle {
    color: var(--menu-text-color, #fff);
}

.header[data-theme="custom"] .user-toggle:hover {
    color: var(--menu-hover-color, #e50914);
}

.header[data-theme="custom"] .user-dropdown {
    background: var(--menu-bg-color, rgba(0, 0, 0, 0.95));
}

.header[data-theme="custom"] .dropdown-item {
    color: var(--menu-text-color, #fff);
}

.header[data-theme="custom"] .dropdown-item:hover {
    color: var(--menu-hover-color, #e50914);
    background: var(--menu-hover-bg, rgba(229, 9, 20, 0.1));
}

.header[data-theme="custom"] .login-btn {
    color: var(--login-button-text-color, #fff);
}

.header[data-theme="custom"] .login-btn:hover {
    color: var(--login-button-text-color, #fff);
}

/* Styles pour le menu mobile utilisateur avec thème personnalisé */
.header[data-theme="custom"] .mobile-user-name {
    color: var(--menu-text-color, #fff);
}

.header[data-theme="custom"] .mobile-dropdown-item {
    color: var(--menu-text-color, #fff);
}

.header[data-theme="custom"] .mobile-dropdown-item:hover {
    color: var(--menu-hover-color, #e50914);
    background: var(--menu-hover-bg, rgba(229, 9, 20, 0.1));
}

/* Amélioration des performances sur mobile */
@media (max-width: 768px) {
    .nav-menu {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    .nav-menu.active {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

/* Styles pour l'état de focus amélioré */
.nav-menu a:focus-visible,
.user-link:focus-visible,
.burger-menu:focus-visible {
    outline: 2px solid var(--menu-hover-color, #e50914);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.1);
}

/* Hero Banner */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                var(--banner-image, url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7'));
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 1rem;
    margin-top: -80px;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: #e50914;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.cta-button:hover {
    background: #b2070f;
}

/* Media Queries pour desktop */
@media (min-width: 769px) {
    .burger-menu {
        display: none !important;
    }

    .nav-menu {
        position: static !important;
        display: flex !important;
        width: auto;
        background: none !important;
        padding: 0 !important;
        opacity: 1 !important;
        transform: none !important;
        box-shadow: none !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
    }

    .nav-menu a {
        display: inline-block !important;
        padding: 0.75rem 1.25rem !important;
        margin: 0;
        border-bottom: none !important;
        text-align: center !important;
        font-size: 1rem !important;
        border-radius: 6px !important;
        transition: all 0.3s ease !important;
    }

    /* Cacher les boutons de connexion mobile sur desktop */
    .nav-menu .mobile-login-btn,
    .nav-menu .mobile-register-btn {
        display: none !important;
    }

    .nav-menu a:hover {
        padding-left: 1.25rem !important;
        background: rgba(255, 255, 255, 0.1) !important;
        transform: translateY(-2px) !important;
    }

    .nav-menu a::before {
        display: block !important;
    }

    .hero h1 {
        font-size: 3.5rem;
    }
}

/* Footer Styles */
.footer {
    background-color: #1a1a1a;
    color: var(--footer-text-color, #ffffff);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    color: var(--footer-text-color, #ffffff);
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--footer-text-color, #ffffff);
}

.contact-info li i {
    margin-right: 1rem;
    color: var(--primary-color);
}

.contact-info li a {
    color: var(--footer-text-color, #ffffff);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.contact-info li a:hover {
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--footer-text-color, #ffffff);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.opening-hours {
    line-height: 1.6;
    color: var(--footer-text-color, #ffffff);
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--footer-text-color, rgba(255, 255, 255, 0.6));
    font-size: 0.9rem;
}

/* Pour la partie admin */
.admin-body {
    padding-top: 0; /* Pas besoin de padding pour l'admin car layout différent */
}

/* Menu utilisateur dans la navigation - styles améliorés */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    position: relative;
    display: inline-block;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--menu-text-color, #fff);
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.user-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--menu-hover-color, #e50914);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-name {
    font-weight: 500;
    color: var(--menu-text-color, #fff);
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.8rem;
    color: var(--menu-text-color, #fff);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.user-menu.active .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1001;
    backdrop-filter: blur(10px);
}

.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(var(--primary-rgb, 229, 9, 20), 0.1);
    color: var(--primary-color, #e50914);
}

.dropdown-item.logout:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.dropdown-item i {
    width: 16px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.dropdown-item:hover i {
    color: inherit;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: var(--menu-hover-color, #e50914);
    color: var(--login-button-text-color, white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
}

.login-btn:hover {
    background: rgba(var(--primary-rgb, 229, 9, 20), 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: var(--login-button-text-color, white);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Menu utilisateur mobile intégré dans le burger */
.mobile-user-menu {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    padding-top: 1rem;
}

/* Masquer le menu mobile utilisateur sur desktop */
@media (min-width: 769px) {
    .mobile-user-menu {
        display: none !important;
    }
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--menu-hover-color, #e50914);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mobile-user-name {
    font-weight: 600;
    color: var(--menu-text-color, #fff);
    font-size: 1.1rem;
}

.mobile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.mobile-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--menu-hover-color, #e50914);
    padding-left: 2.5rem;
    border-left-color: var(--menu-hover-color, #e50914);
}

.mobile-dropdown-item.logout {
    color: #ff6b6b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
}

.mobile-dropdown-item.logout:hover {
    color: #ff4757;
    background: rgba(255, 107, 107, 0.1);
}

.mobile-dropdown-item i {
    width: 20px;
    font-size: 0.9rem;
    text-align: center;
}

/* Adaptation pour mobile */
@media (max-width: 768px) {
    .header-right {
        gap: 1rem;
    }

    .header-actions {
        display: none;
    }

    .mobile-user-menu {
        display: block;
        animation: slideInFromLeft 0.3s ease forwards;
        animation-delay: 0.4s;
        opacity: 0;
    }

    .nav-menu.active .mobile-user-menu {
        animation: slideInFromLeft 0.3s ease forwards;
        animation-delay: 0.4s;
    }

    .mobile-user-menu a {
        animation: slideInFromLeft 0.3s ease forwards;
        opacity: 0;
    }

    .nav-menu.active .mobile-user-menu a:nth-child(2) { animation-delay: 0.5s; }
    .nav-menu.active .mobile-user-menu a:nth-child(3) { animation-delay: 0.6s; }
    .nav-menu.active .mobile-user-menu a:nth-child(4) { animation-delay: 0.7s; }
    .nav-menu.active .mobile-user-menu a:nth-child(5) { animation-delay: 0.8s; }
}

/* Styles pour les messages flash */
.alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    animation: fadeIn 0.5s;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
