/* ========================================
   VARIABLES GLOBALES
   ======================================== */
:root {
    --gold: #D4AF37;
    --gold-dark: #B8941F;
    --header-height: 70px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
}

/* ========================================
   HEADER STICKY
   ======================================== */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    height: var(--header-height);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    height: 100%;
}

/* ========================================
   LOGO + TITRE + TAGLINE
   ======================================== */
.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-brand a:hover {
    transform: translateY(-2px);
}

.brand-logo {
    height: 45px;
    width: 45px;
    filter: brightness(0) invert(1); /* Rendre SVG blanc sur fond or */
    transition: all 0.3s;
}

.nav-brand a:hover .brand-logo {
    transform: scale(1.1) rotate(5deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.brand-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white; /* ← BLANC pour être visible sur fond or */
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.brand-tagline {
    font-size: 0.75rem;
    font-style: italic;
    color: rgba(255,255,255,0.9); /* ← BLANC translucide */
    line-height: 1;
}

/* ========================================
   NAVIGATION LINKS
   ======================================== */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ========================================
   BOUTONS ACTION
   ======================================== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-login, .btn-register {
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-login {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-login:hover {
    background: white;
    color: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.3);
}

.btn-register {
    background: white;
    color: var(--gold-dark);
    border: 2px solid white;
}

.btn-register:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.3);
}

/* ========================================
   DROPDOWN UTILISATEUR
   ======================================== */
.user-dropdown {
    position: relative;
}

.user-button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.user-button:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    min-width: 280px;
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

.user-menu-dropdown.active {
    display: block;
    animation: slideDown 0.2s ease-out;
}

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

.user-info {
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px 8px 0 0;
}

.user-info strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.user-email {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.user-role {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--gold);
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.user-menu-dropdown a:hover {
    background: #f8f9fa;
    padding-left: 1.5rem;
}

.menu-icon {
    font-size: 1.1rem;
    width: 1.5rem;
}

.admin-item {
    color: var(--gold-dark) !important;
    font-weight: 600 !important;
}

.admin-item:hover {
    background: rgba(212,175,55,0.1) !important;
}

.notification-badge {
    position: absolute;
    right: 1rem;
    background: #e74c3c;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.logout-item {
    color: #e74c3c !important;
}

.logout-item:hover {
    background: #fee !important;
}

.user-menu-dropdown hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* ========================================
   SÉLECTEUR LANGUE
   ======================================== */
.language-button {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
    padding: 0.6rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.language-button:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

/* ========================================
   HAMBURGER MENU MOBILE
   ======================================== */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - var(--header-height));
    background: white;
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav a {
    display: block;
    padding: 1.25rem 1.5rem;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.mobile-nav a:hover {
    background: #f8f9fa;
    padding-left: 2rem;
    color: var(--gold-dark);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* ========================================
   RESPONSIVE - TABLETTE
   ======================================== */
@media (max-width: 1024px) and (min-width: 769px) {
    :root {
        --header-height: 65px;
    }

    .main-nav {
        padding: 0.75rem 1.5rem;
    }

    .brand-title {
        font-size: 1.2rem;
    }

    .brand-logo {
        height: 40px;
        width: 40px;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .btn-login, .btn-register {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .main-nav {
        padding: 0.75rem 1rem;
    }

    .brand-title {
        font-size: 1rem;
    }

    .brand-tagline {
        font-size: 0.65rem;
    }

    .brand-logo {
        height: 36px;
        width: 36px;
    }

    .nav-links {
        display: none !important;
    }

    .hamburger-menu {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .btn-login, .btn-register {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .language-button {
        display: none;
    }

    .user-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .user-menu-dropdown {
        right: auto;
        left: 0;
        min-width: 260px;
    }
}

/* ========================================
   RESPONSIVE - PETIT MOBILE
   ======================================== */
@media (max-width: 480px) {
    .brand-title {
        font-size: 0.9rem;
    }

    .brand-tagline {
        display: none;
    }

    .brand-logo {
        height: 32px;
        width: 32px;
    }

    .btn-login, .btn-register {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .user-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}


/* Menu utilisateur - Icônes Lucide */
.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: var(--dark-grey);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

    .user-menu-dropdown a:hover {
        background-color: var(--beige-2);
    }

.user-menu-dropdown .menu-icon {
    display: flex;
    align-items: center;
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

    .user-menu-dropdown .menu-icon svg {
        stroke: currentColor;
        stroke-width: 2;
    }

/* Badge compteur (admin) */
.badge {
    margin-left: auto;
    background: var(--gold);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Lien déconnexion en rouge */
.logout-link {
    color: #e74c3c !important;
}

    .logout-link:hover {
        background-color: #fee !important;
    }
/* ========================================
   WIDGETS - TITRES GLOBAUX
   ======================================== */

/* Titre de widget avec icône alignée */
.widget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-grey, #2c3e50);
    margin-bottom: 1rem;
}

/* Widget header avec action à droite */
.widget-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.widget-header-with-action .widget-title {
    margin-bottom: 0;
}

.site-footer a {
    color: #D4AF37; /* Gold */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

    .site-footer a:hover {
        color: #F5E6D3; /* Gold clair */
    }

    /* Soulignement animé */
    .site-footer a::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background: #D4AF37;
        transition: width 0.3s ease;
    }

    .site-footer a:hover::after {
        width: 100%;
    }