/**
 * Global Theme Styles - TestPermis.fr
 * Header, Footer, Navigation - Applied to ALL pages
 * Theme: Cobra - Refonte 2026
 */

/* ==============================
   Variables CSS
============================== */
:root {
    --primary-color: #2DD4BF;
    --primary-dark: #14B8A6;
    --primary-light: #5EEAD4;
    --secondary-color: #374151;
    --secondary-dark: #1F2937;
    --secondary-light: #6B7280;
    --accent-color: #0D9488;
    --background-light: #F0FDFA;
    --background-white: #FFFFFF;
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --text-light: #9CA3AF;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ==============================
   Header Styles
============================== */
.the-header {
    background: var(--background-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 20px !important;
}

/* Header main row - Ligne principale */
.header-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.the-header #logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.the-header #logo .site-logo {
    height: 45px;
    width: auto;
}

.the-header #logo .site-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Desktop Navigation */
.desktop-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.desktop-nav .navbar-nav {
    display: flex;
    gap: 5px;
}

.the-header .navbar-nav .nav-link {
    color: var(--secondary-color) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    transition: color 0.3s ease;
}

.the-header .navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.the-header .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 8px;
}

.the-header .dropdown-item {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: var(--secondary-color);
    transition: all 0.2s ease;
}

.the-header .dropdown-item:hover {
    background: var(--background-light);
    color: var(--primary-color);
}

.the-header .auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.the-header .login-button {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.the-header .login-button:hover {
    color: var(--primary-color);
    background: var(--background-light);
}

.the-header .register-button {
    background: var(--primary-color);
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.the-header .register-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* User Profile Menu */
.the-header .user-profile-menu .profile-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--background-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.the-header .user-profile-menu .profile-toggle:hover {
    background: var(--primary-light);
}

.the-header .user-profile-menu .username {
    font-weight: 500;
    color: var(--secondary-color);
}

/* ==============================
   Footer Styles
============================== */
.the-footer {
    background: var(--secondary-dark);
    color: white;
    padding: 80px 0 30px !important;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-brand .site-logo {
    height: 50px;
    margin-bottom: 20px;
}

.footer-brand .site-name {
    font-size: 24px;
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-column h4 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-column ul li a i {
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-column ul li a:hover i {
    opacity: 1;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
}

.footer-contact-item i {
    color: var(--primary-color);
    font-size: 18px;
    margin-top: 3px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--primary-color);
}

/* ==============================
   Global Button Styles
============================== */
.btn-primary-global {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-color);
    color: white !important;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary-global:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary-global {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--secondary-color) !important;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.btn-secondary-global:hover {
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
}

/* ==============================
   Responsive - Header & Footer
============================== */

/* ==============================
   Mobile Menu Styles
============================== */

/* Burger button - caché par défaut sur desktop */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    gap: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--background-light);
}

.mobile-menu-toggle .burger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animation burger -> X */
.mobile-menu-toggle.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .burger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Menu mobile - caché par défaut */
.mobile-nav {
    display: none;
    width: 100%;
    background: var(--background-light);
    border-radius: var(--radius-md);
    margin-top: 15px;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.mobile-nav.active {
    max-height: 500px;
    padding: 15px;
}

.mobile-nav .mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav .mobile-menu > li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav .mobile-menu > li:last-child {
    border-bottom: none;
}

.mobile-nav .mobile-menu .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.2s ease;
}

.mobile-nav .mobile-menu .nav-link:hover,
.mobile-nav .mobile-menu .nav-link:focus {
    color: var(--primary-color);
    background: white;
    border-radius: var(--radius-sm);
}

/* Sous-menus mobile */
.mobile-nav .mobile-menu .dropdown-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: none;
    background: white;
    border-radius: var(--radius-sm);
    margin: 0 0 8px 16px;
    padding: 8px;
    display: none;
}

.mobile-nav .mobile-menu .dropdown-menu.show {
    display: block;
}

.mobile-nav .mobile-menu .dropdown-item {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-medium);
    font-size: 15px;
}

.mobile-nav .mobile-menu .dropdown-item:hover {
    background: var(--background-light);
    color: var(--primary-color);
}

/* Chevron pour dropdown */
.mobile-nav .mobile-menu .dropdown-toggle::after {
    transition: transform 0.3s ease;
}

.mobile-nav .mobile-menu .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    /* Header structure mobile */
    .the-header {
        flex-direction: column;
        padding: 12px 15px !important;
    }
    
    /* Afficher le burger, cacher le menu desktop */
    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-nav {
        display: block;
        width: 100%;
        order: 4;
    }
    
    /* Header main row - ligne unique */
    .header-main-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        flex-wrap: nowrap;
    }
    
    /* Logo à gauche */
    .header-main-row #logo {
        order: 1;
        flex-shrink: 0;
    }
    
    /* Droite : Burger + Auth */
    .header-right {
        display: flex;
        align-items: center;
        gap: 10px;
        order: 2;
        flex-shrink: 0;
    }
    
    /* Ordre dans header-right: Auth d'abord, Burger ensuite */
    .header-right .auth-container {
        order: 1;
    }
    
    .header-right .mobile-menu-toggle {
        order: 2;
    }
    
    /* Logo */
    .the-header #logo .site-logo {
        height: 38px;
    }
    
    .the-header #logo .site-name {
        font-size: 16px;
    }
    
    /* Auth buttons sur mobile */
    .the-header .auth-buttons {
        gap: 8px;
    }
    
    .the-header .login-button {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .the-header .register-button {
        padding: 8px 14px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    /* Header Mobile */
    .the-header {
        padding: 10px 15px !important;
    }
    
    .the-header #logo .site-logo {
        height: 35px;
    }
    
    .the-header #logo .site-name {
        font-size: 15px;
    }

    /* Footer Mobile */
    .the-footer {
        padding: 50px 0 20px !important;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
        padding: 0 15px;
    }
    
    .footer-brand .site-name {
        font-size: 20px;
    }
    
    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-contact-item {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 0 15px;
    }
    
    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .the-header #logo .site-name {
        display: none;
    }
    
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }
    
    .the-header .auth-buttons {
        gap: 6px;
    }
    
    .the-header .login-button {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .the-header .register-button {
        padding: 6px 12px;
        font-size: 13px;
    }
}
