/* ============================================
   HEADER STYLES - Version sans conflits
   Styles spécifiques au header uniquement
   ============================================ */

/* Conteneur principal du header */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    flex-wrap: nowrap;
    width: 100%;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
}

/* ========== LOGO ========== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
    min-width: 0;
    overflow: hidden;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    white-space: nowrap;
}

.logo-main {
    font-weight: 700;
    font-size: 1.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-slogan {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 300;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== RECHERCHE ========== */
.search-container {
    position: relative;
}

.desktop-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.desktop-search input {
    width: 300px;
    padding: 10px 15px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.desktop-search input:focus {
    outline: none;
    border-color: var(--primary-color, #E50914);
    width: 350px;
    background: rgba(255,255,255,0.15);
}

.desktop-search button {
    background: var(--primary-color, #E50914);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.desktop-search button:hover {
    background: #c40813;
}

.mobile-search-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
}

/* Modal de recherche mobile */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-modal.active {
    display: flex;
    opacity: 1;
}

.search-modal-content {
    width: 90%;
    max-width: 500px;
    padding: 20px;
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-modal-title {
    color: white;
    font-size: 1.5rem;
    margin: 0;
}

.close-search {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.search-modal-form {
    display: flex;
    gap: 10px;
}

.search-modal-form input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
}

.search-modal-form input:focus {
    outline: none;
    border-color: var(--primary-color, #E50914);
}

.search-modal-form button {
    background: var(--primary-color, #E50914);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
}

/* ========== MENU HAMBURGER ========== */
.menu-toggle-wrapper {
    display: flex;
    align-items: center;
    margin-left: 15px;
    flex-shrink: 0;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 35px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001;
    transition: all 0.3s ease;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle:hover span {
    background: var(--primary-color, #E50914);
}

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

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

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

.menu-label {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 12px;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.menu-toggle:hover .menu-label {
    color: var(--primary-color, #E50914);
}

.menu-toggle.active .menu-label {
    color: var(--primary-color, #E50914);
}

/* Menu mobile */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 90px 20px 30px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    transform: translateX(-100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.mobile-menu-header {
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.mobile-menu-title {
    color: white;
    font-size: 2rem;
    margin: 0 0 8px 0;
    margin-top: 30px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color, #E50914), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-menu-slogan {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.4;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 500px;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 18px;
    color: white;
    text-decoration: none;
    padding: 18px 22px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.15rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    text-align: center;
    justify-content: center;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: rgba(229, 9, 20, 0.15);
    color: white;
    transform: translateX(5px);
    border-color: rgba(229, 9, 20, 0.3);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.2);
}

.mobile-nav-links a i {
    width: 24px;
    text-align: center;
    font-size: 1.3rem;
    color: var(--primary-color, #E50914);
}

.mobile-user-actions {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
    max-width: 500px;
}

.mobile-live-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.mobile-live-counter i {
    color: var(--primary-color, #E50914);
    font-size: 1.3rem;
}

.mobile-admin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    padding: 18px 22px;
    background: linear-gradient(135deg, var(--primary-color, #E50914), #c40813);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 1.15rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.3);
    border: none;
    cursor: pointer;
}

.mobile-admin-btn:hover {
    background: linear-gradient(135deg, #c40813, #a30710);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.4);
}

/* ========== ACTIONS UTILISATEUR ========== */
.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* Compteur de spectateurs */
.live-counter {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    font-size: 0.95rem;
    min-width: 180px;
    white-space: nowrap;
}

.live-counter i {
    color: var(--primary-color, #E50914);
}

.live-counter .viewer-text {
    font-weight: 500;
}

.live-counter .viewer-number {
    font-weight: 700;
    color: var(--primary-color, #E50914);
}

/* ========== BOUTONS CONNEXION ========== */
.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--primary-color, #E50914), #b00710);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    background: linear-gradient(135deg, #f50b18, var(--primary-color, #E50914));
}

.btn-register {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: transparent;
    border: 2px solid var(--primary-color, #E50914);
    color: var(--primary-color, #E50914);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-register:hover {
    background: rgba(229, 9, 20, 0.1);
    transform: translateY(-2px);
}

/* Profil utilisateur */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 40px;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(255,255,255,0.2);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color, #E50914);
}

.user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color, #E50914);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.user-name {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    color: #ccc;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .nav-container {
        padding: 10px 15px;
        flex-wrap: nowrap;
        gap: 12px;
    }
    
    .logo {
        order: 1;
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .logo-main {
        font-size: 1.1rem;
    }
    
    .logo-slogan {
        font-size: 0.7rem;
    }
    
    .desktop-search {
        display: none;
    }
    
    .mobile-search-btn {
        display: block;
        flex-shrink: 0;
    }
    
    .user-actions {
        order: 2;
        flex-shrink: 0;
        justify-content: flex-end;
        gap: 15px;
    }
    
    .live-counter {
        min-width: auto;
        padding: 8px 12px;
        font-size: 0.9rem;
        display: none;
    }
    
    .menu-toggle-wrapper {
        order: 3;
        margin-left: 0;
        flex-shrink: 0;
    }
    
    .menu-toggle {
        width: 32px;
        height: 26px;
    }
    
    .menu-label {
        font-size: 0.8rem;
        margin-left: 10px;
    }
    
    .mobile-menu {
        padding: 80px 20px 25px;
    }
    
    .mobile-menu-title {
        font-size: 1.8rem;
    }
    
    .mobile-nav-links a {
        padding: 16px 20px;
        font-size: 1.1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .logo-text {
        display: block;
    }
    
    .user-actions {
        gap: 20px;
    }
    
    .mobile-search-btn {
        font-size: 1.3rem;
    }
    
    .mobile-menu {
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .btn-login, .btn-register {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    .user-name {
        display: none;
    }
    .user-profile {
        padding: 5px 8px;
    }
}

@media (max-width: 550px) {
    .btn-register {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-container {
        gap: 10px;
        padding: 10px 12px;
    }
    
    .logo-text {
        display: none;
    }
    
    .user-actions {
        gap: 10px;
    }
    
    .mobile-search-btn {
        padding: 5px;
    }
    
    .menu-label {
        display: none;
    }
    
    .mobile-menu {
        padding: 70px 15px 20px;
    }
    
    .btn-login {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

@media (min-width: 1200px) {
    .mobile-menu {
        max-width: 100%;
    }
    
    .mobile-nav-links a {
        padding: 20px 25px;
        font-size: 1.2rem;
    }
    
    .live-counter {
        min-width: 200px;
    }
}

/* ========== MODAL DE CONNEXION ========== */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.auth-modal {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 450px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.auth-modal-overlay.active .auth-modal {
    transform: translateY(0);
    opacity: 1;
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.auth-modal-title {
    color: white;
    font-size: 1.4rem;
    margin: 0;
}

.auth-modal-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.auth-modal-close:hover {
    color: white;
}

.auth-modal-body {
    text-align: center;
}

.auth-modal-icon {
    font-size: 3rem;
    color: var(--primary-color, #E50914);
    margin-bottom: 15px;
}

.auth-modal-message {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.auth-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.auth-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.95rem;
}

.auth-btn-primary {
    background: var(--primary-color, #E50914);
    color: white;
}

.auth-btn-primary:hover {
    background: #c40813;
    transform: translateY(-2px);
}

.auth-btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.auth-btn-secondary:hover {
    background: rgba(255,255,255,0.15);
}

/* Toast notification */
.auth-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10001;
    background: #1a1a1a;
    border-left: 4px solid var(--primary-color, #E50914);
    border-radius: 8px;
    padding: 15px 20px;
    color: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: none;
    animation: slideInRight 0.3s ease;
    max-width: 350px;
}

.auth-toast.show {
    display: block;
}

.auth-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-toast i {
    font-size: 1.3rem;
    color: var(--primary-color, #E50914);
}

/* ========== GDPR COOKIE CONSENT ========== */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    font-family: inherit;
    display: none;
}

.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
}

.cookie-consent-container {
    position: relative;
    z-index: 10002;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border-top: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 20px 20px 0 0;
    max-width: 600px;
    margin: 0 auto;
    padding: 25px 30px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cookie-header i {
    font-size: 2rem;
    color: #FFB74D;
}

.cookie-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.cookie-content {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #ccc;
}

.cookie-content p {
    margin-bottom: 10px;
}

.cookie-preferences {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    display: none;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-info {
    flex: 1;
}

.preference-info strong {
    display: block;
    margin-bottom: 4px;
}

.preference-info small {
    font-size: 0.75rem;
    color: #999;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cookie-accept {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
}

.cookie-refuse {
    background: rgba(244, 67, 54, 0.15);
    color: #EF5350;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.cookie-settings {
    background: rgba(33, 150, 243, 0.15);
    color: #64B5F6;
}

.cookie-save {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    display: none;
}

.cookie-btn:hover {
    transform: translateY(-2px);
}

.cookie-footer {
    text-align: center;
    font-size: 0.75rem;
    color: #777;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.cookie-footer a {
    color: #64B5F6;
    text-decoration: none;
}

.cookie-footer a:hover {
    text-decoration: underline;
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-switch.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: #2196F3;
}

input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

.cookie-switch.disabled .cookie-slider {
    background-color: #666;
    cursor: not-allowed;
}

.cookie-manager-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 30px;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    display: none;
}

.cookie-manager-btn:hover {
    background: var(--primary-color, #E50914);
    transform: scale(1.05);
}

.cookie-manager-btn i {
    margin-right: 8px;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Utilitaires */
.organization-microformat {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .cookie-consent-container {
        margin: 0 15px 15px 15px;
        border-radius: 20px;
        padding: 20px;
    }
    .cookie-actions {
        flex-direction: column;
    }
    .cookie-btn {
        width: 100%;
        justify-content: center;
    }
    .auth-modal {
        padding: 25px 20px;
    }
    .auth-modal-actions {
        flex-direction: column;
    }
    .auth-btn {
        width: 100%;
    }
}