/* ============================================ */
/* PROJECT TIMELINE - GANTT STYLE              */
/* ============================================ */

.project-timeline-section {
    padding: 60px 0 50px;
    background: var(--bg-primary);
    transition: background 0.3s ease;
}

.gantt-container {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    padding: 24px 16px 16px;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* Grille du Gantt */
.gantt-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 800px;
}

.gantt-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-light);
}

.gantt-row:last-child {
    border-bottom: none;
}

.gantt-label {
    flex: 0 0 160px;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gantt-bar-wrapper {
    flex: 1;
    position: relative;
    height: 36px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: visible;
}

.gantt-bar {
    position: absolute;
    height: 28px;
    top: 4px;
    border-radius: 4px;
    background: var(--primary-blue);
    transition: width 0.6s ease, left 0.6s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    padding: 0 6px;
    min-width: 20px;
    cursor: default;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gantt-bar.status-en-cours { background: #22c55e; }
.gantt-bar.status-a-venir { background: #3b82f6; }
.gantt-bar.status-prevu { background: #f59e0b; }
.gantt-bar.status-retard { background: #ef4444; }

.gantt-bar .gantt-rain-icon {
    margin-left: 4px;
    font-size: 0.6rem;
    opacity: 0.8;
}

.gantt-ticks {
    display: flex;
    padding-left: 172px;
    margin-bottom: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
    position: relative;
}

.gantt-tick {
    flex: 1;
    text-align: center;
    border-left: 1px solid var(--border-light);
}

.gantt-tick:first-child {
    border-left: none;
    text-align: left;
}

.gantt-tick:last-child {
    text-align: right;
}

.gantt-weather-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.gantt-weather-info .rain-days {
    color: var(--primary-blue);
    font-weight: 500;
}

/* Loading */
.gantt-loading {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
}

.gantt-loading i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mode clair */
body[data-theme="light"] .gantt-container {
    background: #ffffff;
    border-color: #e2e8f0;
}

body[data-theme="light"] .gantt-bar-wrapper {
    background: #f1f5f9;
}

/* Responsive */
@media (max-width: 768px) {
    .gantt-label {
        flex: 0 0 100px;
        font-size: 0.75rem;
    }
    .gantt-ticks {
        padding-left: 112px;
        font-size: 0.6rem;
    }
}