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

body {
    font-family: 'Lato', sans-serif;
}

/* Header ALSTOM */
.alstom-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    gap: 30px;
}

/* Logo ALSTOM */
.header-logo {
    flex-shrink: 0;
}

.header-logo a {
    text-decoration: none;
    display: block;
    line-height: 0;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

/* Navigation principale */
.header-nav {
    flex-grow: 1;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 35px;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #000000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    opacity: 0.7;
}

.nav-link.active {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Menu de droite */
.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-shrink: 0;
}

.header-link {
    color: #000000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.header-link:hover {
    opacity: 0.7;
}

.header-connexion {
    color: #E30613;
    font-weight: 500;
}

/* Sélecteur de langue */
.language-selector {
    position: relative;
}

.language-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.language-btn:hover {
    background-color: #f5f5f5;
}

.flag-icon {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.dropdown-icon {
    font-size: 10px;
    color: #666;
    transition: transform 0.2s ease;
}

.language-selector:hover .dropdown-icon {
    transform: rotate(180deg);
}

.language-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    min-width: 160px;
    padding: 8px 0;
    z-index: 100;
}

/* Pont invisible pour éviter la perte du hover */
.language-selector::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.language-selector:hover .language-dropdown {
    display: block;
}

.language-dropdown li {
    margin: 0;
}

.language-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    transition: background-color 0.2s ease;
}

.language-dropdown a:hover {
    background-color: #f5f5f5;
}

.language-dropdown a.active {
    background-color: rgba(var(--primary-color-rgb), 0.08);
    color: var(--primary-color);
}

.language-dropdown img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

/* Menu utilisateur connecté */
.user-menu {
    position: relative;
}

.user-profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 25px;
    text-decoration: none;
    color: #1E3246;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
}

.user-profile-link:hover {
    background-color: #f5f5f5;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    color: #ffffff;
    font-family: 'Ubuntu', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu.active .user-profile-link {
    background-color: #f5f5f5;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    list-style: none;
    min-width: 200px;
    padding: 8px 0;
    z-index: 100;
    margin-top: 5px;
}

.user-menu.active .user-dropdown {
    display: block;
}

.user-dropdown li {
    margin: 0;
}

.user-dropdown a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #1E3246;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    transition: background-color 0.2s ease;
}

.user-dropdown a:hover {
    background-color: #f5f5f5;
}

.user-dropdown .logout-link {
    color: var(--primary-color);
}

.user-dropdown .logout-link:hover {
    background-color: rgba(var(--primary-color-rgb), 0.08);
}

.dropdown-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 8px 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .header-container {
        padding: 12px 20px;
        gap: 20px;
    }

    .nav-list {
        gap: 20px;
    }

    .header-right {
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .header-container {
        flex-wrap: wrap;
    }

    .header-nav {
        order: 3;
        flex-basis: 100%;
    }

    .nav-list {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .header-right {
        flex-direction: column;
        gap: 10px;
    }

    .logo-img {
        height: 30px;
    }
}