/* ============================================
   HEADER & FOOTER - DESIGN MODERNE
   ============================================ */

/* Header principal */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
    border-bottom-color: transparent;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Logo */
.logo-container {
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-primary {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: #667eea;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Navigation principale */
.main-nav {
    flex: 1;
    margin: 0 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.nav-item.active .nav-link {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.nav-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-item.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding-left: 25px;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Admin item */
.admin-item .nav-link {
    color: #e53e3e;
}

.admin-item.active .nav-link,
.admin-item .nav-link:hover {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Search */
.search-container {
    position: relative;
}

.search-toggle {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #667eea;
}

.search-box {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.search-container:hover .search-box {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-form {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-submit:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Language selector */
.language-selector {
    position: relative;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.language-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

.current-language {
    font-weight: 600;
    color: #2d3748;
}

.language-icon {
    color: #667eea;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.language-selector:hover .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 15px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.language-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.language-option.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.language-flag {
    font-size: 1.2rem;
}

/* User account */
.user-account {
    position: relative;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.user-dropdown {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 8px;
}

.user-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-avatar.large {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
}

.user-name {
    font-weight: 500;
    color: #2d3748;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-arrow {
    font-size: 0.8rem;
    color: #718096;
    transition: transform 0.3s ease;
}

.user-dropdown:hover .user-arrow {
    transform: rotate(180deg);
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.user-dropdown:hover .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details strong {
    font-size: 1rem;
    margin-bottom: 2px;
}

.user-details span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.user-menu-items {
    padding: 10px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
}

.user-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #667eea;
    padding-left: 25px;
}

.user-menu-item i {
    width: 20px;
    text-align: center;
}

.user-menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 10px 0;
}

.user-menu-item.logout {
    color: #e53e3e;
}

.user-menu-item.logout:hover {
    background: rgba(229, 62, 62, 0.1);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle .bar {
    height: 3px;
    width: 100%;
    background: #2d3748;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: white;
    z-index: 2000;
    transition: right 0.4s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-nav-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    text-decoration: none;
}

.mobile-nav-header .logo i {
    color: #667eea;
    font-size: 1.5rem;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    transition: color 0.3s ease;
}

.mobile-nav-close:hover {
    color: #e53e3e;
}

.mobile-nav-menu {
    padding: 20px;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: #667eea;
    padding-left: 10px;
}

.mobile-nav-item i {
    width: 20px;
    text-align: center;
}

.mobile-nav-item.admin-item {
    color: #e53e3e;
}

.mobile-nav-item.admin-item:hover {
    color: #c53030;
}

.mobile-user-section {
    margin: 20px 0;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.mobile-user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.mobile-language-selector {
    margin-top: 20px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
}

.mobile-language-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.mobile-language-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mobile-language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-language-option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.mobile-language-option.active {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    color: #667eea;
}

/* Mobile overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   FOOTER
   ============================================ */

.main-footer {
    background: #1a202c;
    color: #cbd5e0;
}

/* Newsletter */
.footer-newsletter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.newsletter-text {
    max-width: 500px;
}

.newsletter-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.newsletter-description {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.newsletter-form {
    max-width: 500px;
}

.form-group {
    position: relative;
    margin-bottom: 15px;
}

.newsletter-input {
    width: 100%;
    padding: 18px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-form .btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 25px;
    border-radius: 8px;
}

.newsletter-message {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: none;
}

.newsletter-message.success {
    background: rgba(72, 187, 120, 0.2);
    color: #68d391;
    display: block;
}

.newsletter-message.error {
    background: rgba(245, 101, 101, 0.2);
    color: #fc8181;
    display: block;
}

.newsletter-privacy {
    font-size: 0.85rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Footer main */
.footer-main {
    padding: 80px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    margin-bottom: 25px;
}

.footer-logo .logo {
    color: white;
}

.footer-logo .logo-primary {
    color: white;
}

.footer-about {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #667eea;
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #667eea;
    transform: translateX(5px);
}

.footer-links a i {
    font-size: 0.8rem;
}

.footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-contact i {
    color: #667eea;
    font-size: 1rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-contact a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #667eea;
}

/* Footer bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
}

.footer-legal a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #667eea;
}

.divider {
    opacity: 0.5;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-language .language-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.footer-language .language-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.back-to-top {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #667eea;
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 1200px) {
    .header-container {
        padding: 0 20px;
    }
    
    .main-nav {
        margin: 0 20px;
    }
}

@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 70px;
        padding: 0 15px;
    }
    
    .logo-primary {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .mobile-nav {
        width: 280px;
    }
    
    .footer-newsletter {
        padding: 40px 0;
    }
    
    .footer-main {
        padding: 50px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 10px;
    }
    
    .auth-buttons .btn-sm {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .user-name {
        max-width: 80px;
    }
    
    .mobile-nav {
        width: 100%;
    }
}