/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --soprema-blue: #0072CE;
    --soprema-dark-blue: #1a5f9e;
    --header-bg: #0d3c61;
    --text-dark: #2c3e50;
    --text-gray: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --success-green: #28a745;
    --danger-red: #dc3545;
    --hover-bg: #f0f0f0;
}

body {
    font-family: 'Azo Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.admin-header {
    background-color: var(--header-bg);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0.5rem;
    position: relative;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.header-logo img {
    height: 60px;
    width: auto;
    max-width: 100%;
}

@media (max-width: 768px) {
    .header-logo img {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .header-logo img {
        height: 32px;
    }
}

.header-center {
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
}

.search-container {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--soprema-blue);
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--soprema-blue);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: var(--soprema-dark-blue);
}

.header-right {
    display: flex;
    align-items: center;
}

.user-profile {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    transition: transform 0.2s ease;
    object-fit: cover;
}

.user-avatar:hover {
    transform: scale(1.1);
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.user-profile-trigger:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-profile-trigger .user-name {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
}

.user-profile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
    min-width: 220px;
    overflow: hidden;
    z-index: 100;
}

.user-profile-menu[hidden] {
    display: none;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.profile-menu-item:hover {
    background-color: var(--bg-light);
}

.profile-menu-item.active {
    background-color: rgba(0, 114, 206, 0.08);
    color: var(--soprema-blue);
}

.profile-menu-item svg {
    width: 18px;
    height: 18px;
}

.profile-menu-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 73px;
    width: 260px;
    height: calc(100vh - 73px);
    background-color: white;
    z-index: 900;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    transform: translateX(-100%);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 1.2rem;
    color: var(--soprema-blue);
    font-weight: 600;
}

.sidebar-nav {
    padding: 3rem 0 1rem 0;
}

.sidebar-link {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background-color: var(--hover-bg);
    color: var(--soprema-blue);
}

.sidebar-link.active {
    background-color: rgba(41, 137, 216, 0.1);
    color: var(--soprema-blue);
    border-left-color: var(--soprema-blue);
    font-weight: 600;
}

.sidebar-link svg {
    flex-shrink: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 73px;
    left: 0;
    width: 100%;
    height: calc(100vh - 73px);
    z-index: 850;
    background-color: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.open {
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

/* Container principal */
.admin-container {
    flex: 1;
    margin-left: 0;
    padding: 2rem;
    transition: margin-left 0.3s ease;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.nav-tab {
    padding: 1rem 0;
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-tab:hover {
    color: var(--soprema-blue);
}

.page-header {
    margin-bottom: 1rem;
}

.page-subtitle,
.section-subtitle {
    margin: 0;
    display: flex;
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 400;
}

.nav-tab.active {
    color: var(--soprema-blue);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--soprema-blue);
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.btn-create {
    padding: 0.75rem 1.5rem;
    background-color: var(--soprema-blue);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-create:hover {
    background-color: var(--soprema-dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Table */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.proposals-table {
    width: 100%;
    border-collapse: collapse;
}

.proposals-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
}

.proposals-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    white-space: nowrap;
}
.proposals-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 2rem;
}

/* hover */
.proposals-table th.sortable:hover {
    background-color: var(--hover-bg);
}

/* default unsorted icon */
.proposals-table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 0.5rem;
    opacity: 0.35;
    font-size: 0.8rem;
    pointer-events: none; /* 🔥 VERY IMPORTANT */
}

/* ascending */
.proposals-table th.sortable.asc::after {
    content: '▲';
    opacity: 1;
    color: var(--soprema-blue);
}

/* descending */
.proposals-table th.sortable.desc::after {
    content: '▼';
    opacity: 1;
    color: var(--soprema-blue);
}


.proposals-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.proposals-table tbody tr:hover {
    background-color: var(--hover-bg);
}

.proposals-table td {
    padding: 1rem;
    font-size: 0.9rem;
}

/* AI Recommendation indicator */
.ai-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    margin: 0 auto;
}

.ai-indicator.green {
    background-color: var(--success-green);
}

.ai-indicator.red {
    background-color: var(--danger-red);
}

/* AI Score */
.ai-score {
    font-weight: 600;
    color: var(--text-dark);
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.btn-action {
    padding: 0.5rem;
    background: none;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-view {
    border-color: var(--soprema-blue);
    color: var(--soprema-blue);
}

.btn-view:hover {
    background-color: var(--soprema-blue);
    color: white;
}

.btn-validate {
    border-color: var(--success-green);
    color: var(--success-green);
}

.btn-validate:hover {
    background-color: var(--success-green);
    color: white;
}

.btn-archive {
    border-color: var(--text-gray);
    color: var(--text-gray);
}

.btn-archive:hover {
    background-color: var(--text-gray);
    color: white;
}

.btn-restore {
    border-color: #ffc107;
    color: #ffc107;
}

.btn-restore:hover {
    background-color: #ffc107;
    color: white;
}

.btn-unvalidate {
    border-color: #d32f2f;
    color: #d32f2f;
}

.btn-unvalidate:hover {
    background-color: #d32f2f;
    color: white;
}

.btn-delete {
    border-color: var(--danger-red);
    color: var(--danger-red);
}

.btn-delete:hover {
    background-color: var(--danger-red);
    color: white;
}

.btn-search {
    border-color: #1b6fd1;
    color: #1b6fd1;
}

.btn-search:hover {
    background-color: #1b6fd1;
    color: white;
}

.btn-email {
    border-color: #17a773;
    color: #17a773;
}

.btn-email:hover {
    background-color: #17a773;
    color: white;
}

/* Badge compteur de projets */
.project-count-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #1b6fd1;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background-color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    border-left: 4px solid;
    font-weight: 500;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-left-color: var(--success-green);
    color: var(--success-green);
}

.notification-info {
    border-left-color: var(--soprema-blue);
    color: var(--soprema-blue);
}

.notification-error {
    border-left-color: var(--danger-red);
    color: var(--danger-red);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--soprema-blue);
    color: white;
    border-color: var(--soprema-blue);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-weight: 500;
    color: var(--text-dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
}

.detail-row {
    margin-bottom: 1.5rem;
}

.detail-label {
    font-weight: 600;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.detail-value {
    color: var(--text-dark);
    font-size: 1rem;
}

/* Content Views */
.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card.clickable-card {
    cursor: pointer;
}

.stat-card.clickable-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue {
    background-color: rgba(41, 137, 216, 0.1);
    color: var(--soprema-blue);
}

.stat-icon.green {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-green);
}

.stat-icon.orange {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.stat-icon.gray {
    background-color: rgba(108, 117, 125, 0.1);
    color: var(--text-gray);
}

.stat-content h3 {
    height: 35px;
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.stat-content p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Statistics Page */
.statistics-container {
    padding: 1rem 0;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-direction: column;
    gap: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.stats-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    color: var(--text-dark);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--soprema-blue);
}

.filter-select:focus {
    outline: none;
    border-color: var(--soprema-blue);
    box-shadow: 0 0 0 3px rgba(41, 137, 216, 0.1);
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-export {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-dark);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-export:hover {
    background-color: var(--soprema-blue);
    border-color: var(--soprema-blue);
    color: white;
}

.btn-export svg {
    width: 16px;
    height: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-card-large {
    grid-column: span 2;
}

.chart-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.chart-card canvas {
    max-height: 300px;
}

.stats-summary {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.stats-summary h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--soprema-blue);
}

.summary-trend {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.summary-trend.positive {
    color: var(--success-green);
}

.summary-trend.negative {
    color: var(--danger-red);
}

/* Top projects and attention sections */
.top-projects-section,
.attention-projects-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.top-projects-section h3,
.attention-projects-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background-color: rgba(255, 193, 7, 0.2);
    color: #d39e00;
}

.status-badge.validated {
    background-color: rgba(40, 167, 69, 0.2);
    color: var(--success-green);
}

.status-badge.archived {
    background-color: rgba(108, 117, 125, 0.2);
    color: var(--text-gray);
}

.days-pending {
    font-weight: 600;
    color: var(--danger-red);
}

.days-pending.warning {
    color: #ffc107;
}

.days-pending.ok {
    color: var(--success-green);
}

/* Responsive */
@media (max-width: 1200px) {
    .proposals-table {
        font-size: 0.85rem;
    }

    .proposals-table th,
    .proposals-table td {
        padding: 0.75rem 0.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .chart-card-large {
        grid-column: span 1;
    }

    .stats-header {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-filters {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .admin-header {
        padding: 1rem;
    }

    .header-center {
        margin: 0 1rem;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .admin-container {
        margin-left: 0;
        padding: 1rem;
    }

    .table-container {
        overflow-x: auto;
    }

    .proposals-table {
        min-width: 1200px;
    }

    .action-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .stats-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    .export-buttons {
        width: 100%;
    }

    .btn-export {
        flex: 1;
    }

}

/* Language Switcher Styles */
.language-switch {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    margin-right: 1rem;
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 50px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.lang-btn.active {
    background: var(--soprema-blue);
    color: white;
    box-shadow: 0 2px 6px rgba(41, 137, 216, 0.4);
}

/* Mobile Language Toggle */
.mobile-lang-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.mobile-lang-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.mobile-lang-toggle img {
    width: 20px;
    height: 20px;
}

/* Language Sidebar for Mobile */
.lang-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lang-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.lang-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.lang-sidebar.open {
    right: 0;
}

.lang-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.lang-sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.lang-sidebar-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.lang-sidebar-close:hover {
    color: var(--text-dark);
}

.lang-sidebar-options {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
}

.lang-sidebar-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.lang-sidebar-btn:hover {
    background: #f8f9fa;
    border-color: var(--soprema-blue);
}

.lang-sidebar-btn.active {
    background: #e7f3ff;
    border-color: var(--soprema-blue);
    color: var(--soprema-blue);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Style pour les noms d'employés cliquables */
.clickable-employee-name {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-employee-name:hover {
    color: #2989d8;
    text-decoration: underline;
}

/* Style pour les départements cliquables */
.clickable-department {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-department:hover {
    color: #2989d8;
    text-decoration: underline;
}

/* Style pour les dates cliquables */
.clickable-date {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-date:hover {
    color: #2989d8;
    text-decoration: underline;
}

/* Style pour les pays cliquables */
.clickable-country {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-country:hover {
    color: #2989d8;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .language-switch {
        display: none !important;
    }

    .mobile-lang-toggle {
        display: flex;
    }
}

/* ===================================
   FAQ PAGE STYLES
   =================================== */

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--soprema-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* Visually hidden (for screen readers) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* FAQ Search */
.faq-search-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.faq-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    pointer-events: none;
}

.faq-search {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.faq-search:focus {
    outline: none;
    border-color: var(--soprema-blue);
    box-shadow: 0 0 0 3px rgba(0, 114, 206, 0.1);
}

.faq-search::placeholder {
    color: var(--text-gray);
}

/* FAQ List */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* FAQ Item (details element) */
.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-item[open] {
    border-color: var(--soprema-blue);
}

/* FAQ Question (summary element) */
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.2s ease;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.05rem;
}

.faq-question::-webkit-details-marker,
.faq-question::marker {
    display: none;
}

.faq-question:hover {
    background-color: var(--bg-light);
}

.faq-question:focus {
    outline-offset: -3px;
}

.faq-question-text {
    flex: 1;
    padding-right: 1rem;
}

/* FAQ Chevron Icon */
.faq-chevron {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--text-gray);
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
    color: var(--soprema-blue);
}

/* FAQ Answer */
.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-gray);
    line-height: 1.7;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-answer p {
    margin: 0 0 1rem 0;
}

.faq-answer code {
    background: var(--bg-light);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9rem;
    color: var(--soprema-blue);
}

.faq-answer code a {
    color: var(--soprema-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

.faq-answer code a:hover {
    color: #005a9e;
    text-decoration-thickness: 2px;
}

.faq-answer code a:focus {
    outline: 2px solid var(--soprema-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

/* FAQ Feedback Section */
.faq-feedback {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.faq-feedback-question {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
    margin-bottom: 0.75rem;
}

.faq-feedback-buttons {
    display: flex;
    gap: 0.75rem;
}

.faq-feedback-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    color: var(--text-dark);
}

.faq-feedback-btn:hover {
    border-color: var(--soprema-blue);
    background: var(--bg-light);
}

.faq-feedback-btn:focus {
    outline: 2px solid var(--soprema-blue);
    outline-offset: 2px;
}

.faq-feedback-yes:hover {
    border-color: var(--success-green);
    color: var(--success-green);
}

.faq-feedback-no:hover {
    border-color: var(--danger-red);
    color: var(--danger-red);
}

.faq-feedback-btn svg {
    flex-shrink: 0;
}

.faq-feedback-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-green);
    border-radius: 6px;
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

.faq-feedback-result[hidden] {
    display: none;
}

.faq-feedback-result svg {
    flex-shrink: 0;
}

.faq-feedback-result p {
    margin: 0;
}

/* No Results Message */
.faq-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-gray);
}

.faq-no-results[hidden] {
    display: none;
}

.faq-no-results svg {
    color: #dee2e6;
    margin-bottom: 1rem;
}

.faq-no-results p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive FAQ Styles */
@media (max-width: 768px) {
    .faq-search {
        padding: 0.75rem 1rem 0.75rem 2.75rem;
        font-size: 0.95rem;
    }

    .faq-search-icon {
        left: 0.875rem;
    }

    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }

    .faq-question-text {
        padding-right: 0.75rem;
    }

    .faq-answer {
        padding: 0 1rem 1rem;
        font-size: 0.95rem;
    }

    .faq-feedback-buttons {
        flex-direction: column;
    }

    .faq-feedback-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .faq-question {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    .faq-answer {
        padding: 0 0.875rem 0.875rem;
        font-size: 0.9rem;
    }

    .faq-chevron {
        width: 18px;
        height: 18px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-question,
    .faq-chevron,
    .faq-feedback-btn {
        transition: none;
    }

    .faq-answer {
        animation: none;
    }
}

.wordcloud-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  width: 460px;
  height: 100%;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.wordcloud-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
}

.wordcloud-canvas {
  display: block;
  margin: 0 auto;
}



