* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --purple-color: #8b5cf6;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.75rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    /* Logo en couleur, pas de filtre */
}

.logo .subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    color: white;
}

nav {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-backup,
.btn-restore {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 0.4rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.btn-backup:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.btn-restore:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.btn-backup i,
.btn-restore i {
    font-size: 0.75rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 0.4rem;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: white;
    color: var(--primary-color);
    font-weight: 600;
}

.nav-btn i {
    font-size: 0.85rem;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.chart-card {
    min-height: 400px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.chart-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filters select,
.filters input {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text-primary);
}

.filters input {
    flex: 1;
    min-width: 200px;
}

.table-container {
    background: var(--card-bg);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-color);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: var(--bg-color);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--text-primary);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-edit {
    background: var(--warning-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-edit:hover {
    background: #d97706;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.plan-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.plan-filters select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text-primary);
}

.actions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.action-item {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-item-content {
    flex: 1;
    min-width: 300px;
}

.action-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.action-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.action-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.badge-quarter {
    background: #dbeafe;
    color: #1e40af;
}

.badge-status {
    background: #dcfce7;
    color: #166534;
}

.sectors-grid,
.sales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.sector-card,
.sales-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.sector-card h3,
.sales-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.sector-stats,
.sales-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
}

.stat-row-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-row-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-prospect {
    background: #fef3c7;
    color: #92400e;
}

.status-negotiation {
    background: #dbeafe;
    color: #1e40af;
}

.status-won {
    background: #d1fae5;
    color: #065f46;
}

.status-lost {
    background: #fee2e2;
    color: #991b1b;
}

/* Chatbot */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

#chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

#chatbot-window.chatbot-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chatbot-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.chatbot-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chatbot-message {
    display: flex;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-message-content {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.chatbot-message.bot .chatbot-message-content {
    background: var(--bg-color);
    color: var(--text-primary);
    border-bottom-left-radius: 0.25rem;
}

.chatbot-message.user .chatbot-message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.chatbot-message-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chatbot-message.bot .chatbot-message-icon {
    background: var(--bg-color);
    color: var(--primary-color);
}

.chatbot-message.user .chatbot-message-icon {
    background: var(--primary-color);
    color: white;
}

.chatbot-input-container {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

#chatbot-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
}

#chatbot-input:focus {
    border-color: var(--primary-color);
}

#chatbot-send {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

#chatbot-send:hover {
    background: var(--secondary-color);
}

.chatbot-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.chatbot-quick-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-quick-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

@media (max-width: 1024px) {
    .header-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    nav {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    nav {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.7rem;
        padding: 0.35rem 0.5rem;
    }

    .logo-img {
        height: 55px;
    }

    main {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .charts-container {
        flex-direction: column;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters {
        flex-direction: column;
    }

    .filters input {
        width: 100%;
    }

    #chatbot-window {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
}

/* Tooltip pour les commerciaux */
.sales-tooltip {
    position: fixed;
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 400px;
    max-height: 500px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
}

.tooltip-header {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 0.75rem 0.75rem 0 0;
    font-size: 0.875rem;
}

.tooltip-content {
    padding: 1rem;
}

.tooltip-section {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.tooltip-section:first-child {
    margin-top: 0;
}

.tooltip-client {
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tooltip-client-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    flex: 1;
}

.tooltip-total {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-left: 1rem;
}

.tooltip-empty {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Plan d'action - Pilotage RDV */
.plan-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.week-selector {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text-primary);
    min-width: 200px;
}

.rdv-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rdv-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rdv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.rdv-card-header {
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rdv-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.rdv-card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
}

.rdv-count-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.rdv-card-body {
    padding: 1.5rem;
}

.rdv-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.rdv-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.rdv-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rdv-item-commercial,
.rdv-item-client {
    font-size: 0.875rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rdv-item-commercial i,
.rdv-item-client i {
    color: var(--text-secondary);
    width: 16px;
}

.rdv-item-actions {
    display: flex;
    gap: 0.5rem;
}

.rdv-item-edit,
.rdv-item-delete {
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rdv-item-edit:hover {
    background: var(--primary-color);
    color: white;
}

.rdv-item-delete:hover {
    background: var(--danger-color);
    color: white;
}

.rdv-empty {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

.rdv-add-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
}

.rdv-add-btn:hover {
    background: var(--secondary-color);
}

.rdv-chart-container {
    margin-top: 2rem;
}

/* Barre de progression gamifiée */
.rdv-progress-container {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.progress-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-title i {
    font-size: 1.5rem;
    color: #f59e0b;
}

.progress-title h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.progress-stats {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.progress-current {
    color: var(--primary-color);
    font-size: 2rem;
}

.progress-separator {
    color: var(--text-secondary);
    font-weight: 400;
}

.progress-target {
    color: var(--text-primary);
}

.progress-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.progress-bar-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.progress-bar-bg {
    background: var(--bg-color);
    border-radius: 9999px;
    height: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
    background: linear-gradient(90deg, #10b981, #059669, #10b981);
    background-size: 200% 100%;
    height: 100%;
    border-radius: 9999px;
    position: relative;
    transition: width 0.6s ease;
    width: 0%;
    animation: shimmer 2s infinite;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.progress-bar-fill.complete {
    background: linear-gradient(90deg, #f59e0b, #d97706, #f59e0b);
    background-size: 200% 100%;
    animation: celebrate 0.5s ease, shimmer 2s infinite;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.6);
}

.progress-bar-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: glow 2s infinite;
}

.progress-milestones {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem;
    pointer-events: none;
}

.milestone {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.milestone.reached {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
    animation: pulse 1s ease;
}

.milestone.active.reached {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
    animation: celebrate-milestone 0.5s ease;
}

.milestone-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.milestone.reached .milestone-label {
    color: white;
}

.progress-message {
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.progress-message i {
    font-size: 1.25rem;
}

.progress-message.progress-start {
    background: #dbeafe;
    color: #1e40af;
}

.progress-message.progress-low {
    background: #dcfce7;
    color: #166534;
}

.progress-message.progress-medium {
    background: #fef3c7;
    color: #92400e;
}

.progress-message.progress-high {
    background: #fce7f3;
    color: #9f1239;
}

.progress-message.progress-very-high {
    background: #fef3c7;
    color: #92400e;
}

.progress-message.progress-complete {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-size: 1.125rem;
    animation: celebrate-message 0.5s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes glow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes celebrate {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.1);
    }
}

@keyframes celebrate-milestone {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2) rotate(5deg);
    }
    75% {
        transform: scale(1.2) rotate(-5deg);
    }
}

@keyframes celebrate-message {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Section Consultants */
.consultants-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.consultants-filters select,
.consultants-filters input {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text-primary);
}

.consultants-filters input {
    flex: 1;
    min-width: 200px;
}

.consultants-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.consultant-stat-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.consultant-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.clickable-stat-card {
    cursor: pointer;
    position: relative;
}

.clickable-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.clickable-stat-card.active-stat-card {
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.clickable-stat-card.active-stat-card::after {
    content: '';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.consultant-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.consultant-type-badge.interne {
    background: #dbeafe;
    color: #1e40af;
}

.consultant-type-badge.externe {
    background: #dcfce7;
    color: #166534;
}

.consultant-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.consultant-status-badge.status-en_mission {
    background: #dbeafe;
    color: #1e40af;
}

.consultant-status-badge.status-inter_contrat {
    background: #fef3c7;
    color: #92400e;
}

.consultant-status-badge.status-disponible {
    background: #dcfce7;
    color: #166534;
}

.consultants-chart-container {
    margin-top: 2rem;
}

/* Pilotage CA */
.pilotage-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.year-selector {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 600;
    min-width: 120px;
}

.chart-card-large {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .chart-card-large {
        grid-column: span 1;
    }
}

