/* ===== ROADMAP STYLES CSS ===== */

:root {
    /* Variables existantes du thème */
    --theme-background: #faf0ce;
    --theme-text: #2c3e50;
    --theme-primary: #c39b77;
    --theme-secondary: #f2e3b3;
    --theme-tertiary: #fef9e7;
    --theme-quaternary: #f8f9fa;
    --theme-accent: #9a4c18;
    --theme-header-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    --theme-section-shadow: 0 2px 5px rgba(0,0,0,0.1);
    --theme-font-family: 'Georgia', serif;
    --theme-button-primary-text: white;
    --theme-section-hover-transform: translateY(-5px);
    
    /* Variables spécifiques à la roadmap */
    --roadmap-timeline-width: 6px;
    --roadmap-marker-size: 24px;
    --roadmap-content-width: 42%;
    --roadmap-content-gap: 80px;
}

body {
    font-family: var(--theme-font-family);
    background-color: var(--theme-background);
    color: var(--theme-text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ===== CONTENEUR PRINCIPAL ===== */
.roadmap-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* ===== HEADER DE LA ROADMAP ===== */
.roadmap-header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--theme-secondary), var(--theme-tertiary));
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--theme-section-shadow);
    position: relative;
    overflow: hidden;
}

.roadmap-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.05) 10px,
        rgba(255,255,255,0.05) 20px
    );
    animation: shimmer 20s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.roadmap-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.5em;
    color: var(--theme-primary);
    position: relative;
    z-index: 1;
}

.roadmap-header .subtitle {
    font-size: 1.2em;
    color: var(--theme-text);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* ===== CONTRÔLES DE LA ROADMAP ===== */
.roadmap-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.control-btn {
    background: var(--theme-secondary);
    color: var(--theme-text);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-family: var(--theme-font-family);
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.control-btn:hover {
    background: var(--theme-accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.control-btn.active {
    background: var(--theme-primary);
    color: var(--theme-button-primary-text);
    transform: scale(1.05);
}

/* ===== RECHERCHE ===== */
.search-container {
    text-align: center;
    margin: 20px 0;
}

#searchInput {
    padding: 12px 20px;
    border-radius: 25px;
    border: 2px solid var(--theme-primary);
    width: 300px;
    font-family: var(--theme-font-family);
    font-size: 14px;
    background: var(--theme-tertiary);
    color: var(--theme-text);
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: var(--theme-accent);
    box-shadow: 0 0 10px rgba(195, 155, 119, 0.3);
    transform: scale(1.02);
}

/* ===== TIMELINE ===== */
.roadmap-timeline {
    position: relative;
    padding: 40px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: var(--roadmap-timeline-width);
    background: linear-gradient(180deg, var(--theme-primary), var(--theme-accent));
    transform: translateX(-50%);
    border-radius: 3px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    z-index: 1;
}

/* Remplacer les styles existants de .timeline-item par : */
.timeline-item {
    position: relative;
    margin-bottom: var(--roadmap-content-gap);
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.6s ease forwards;
    display: flex;
    align-items: center;
    min-height: 120px;
    width: 100%;
}

/* ÉLÉMENTS DE GAUCHE (impairs) */
.timeline-item:nth-child(odd) {
    justify-content: flex-start;
}

.timeline-item:nth-child(odd) .timeline-content {
    width: var(--roadmap-content-width);
    margin-right: calc(50% + 30px);
    margin-left: 0;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 15px solid transparent;
    border-left-color: var(--theme-tertiary);
    border-right-color: transparent;
}

/* ÉLÉMENTS DE DROITE (pairs) */
.timeline-item:nth-child(even) {
    justify-content: flex-end;
}

.timeline-item:nth-child(even) .timeline-content {
    width: var(--roadmap-content-width);
    margin-left: calc(50% + 30px);
    margin-right: 0;
}

.timeline-item:nth-child(even) .timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 15px solid transparent;
    border-right-color: var(--theme-tertiary);
    border-left-color: transparent;
}

/* Supprimer les anciens styles de .timeline-content génériques et remplacer par : */
.timeline-content {
    background: var(--theme-tertiary);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--theme-section-shadow);
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-content:hover {
    transform: var(--theme-section-hover-transform);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* RESPONSIVE - Modifier la version mobile : */
@media (max-width: 768px) {
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        justify-content: flex-start;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: calc(100% - 80px);
        margin-left: 70px;
        margin-right: 0;
    }

    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -15px;
        right: auto;
        border-left-color: transparent;
        border-right-color: var(--theme-tertiary);
    }
}

/*
.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}
*/

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MARQUEURS DE LA TIMELINE ===== */
.timeline-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: var(--roadmap-marker-size);
    height: var(--roadmap-marker-size);
    background: var(--theme-primary);
    border: 4px solid var(--theme-background);
    border-radius: 50%;
    z-index: 3;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.timeline-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.timeline-marker.completed {
    background: #27ae60;
    animation: pulse 2s infinite;
}

.timeline-marker.in-progress {
    background: #f39c12;
    animation: spin 2s linear infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.15);
        box-shadow: 0 4px 20px rgba(39, 174, 96, 0.4);
    }
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== CONTENU DES ÉLÉMENTS ===== */
.timeline-content {
    width: var(--roadmap-content-width);
    background: var(--theme-tertiary);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--theme-section-shadow);
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0 30px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 30px;
    margin-right: 0px;
}

.timeline-content:hover {
    transform: var(--theme-section-hover-transform);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 15px solid transparent;
    border-left-color: var(--theme-tertiary);
}

.timeline-item:nth-child(even) .timeline-content::before {
    right: auto;
    left: -15px;
    border-left-color: transparent;
    border-right-color: var(--theme-tertiary);
}

/* ===== DÉTAILS DU CONTENU ===== */
.timeline-date {
    color: var(--theme-primary);
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--theme-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-description {
    color: var(--theme-text);
    line-height: 1.6;
    margin-bottom: 15px;
}

.timeline-features {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.timeline-features li {
    background: var(--theme-secondary);
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.timeline-features li:hover {
    background: var(--theme-primary);
    color: var(--theme-button-primary-text);
    transform: scale(1.05);
}

/* ===== LIENS D'ACTION ===== */
.timeline-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-link {
    background: var(--theme-primary);
    color: var(--theme-button-primary-text);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-link:hover {
    background: var(--theme-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.action-link.secondary {
    background: var(--theme-secondary);
    color: var(--theme-text);
}

.action-link.secondary:hover {
    background: var(--theme-primary);
    color: var(--theme-button-primary-text);
}

/* ===== BARRES DE PROGRESSION ===== */
.progress-bar {
    background: #ecf0f1;
    border-radius: 12px;
    height: 10px;
    margin: 15px 0;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-accent));
    border-radius: 12px;
    transition: width 2s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8em;
    font-weight: bold;
    color: var(--theme-text);
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

/* ===== STATUTS ===== */
.timeline-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.5);
}

.status-completed { 
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.status-in-progress { 
    color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
}

.status-planned { 
    color: #95a5a6;
    background: rgba(149, 165, 166, 0.1);
}

/* ===== JAUGES CIRCULAIRES POUR LES ÉLÉMENTS EN COURS ===== */
.circular-progress {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(var(--theme-primary) var(--progress-angle, 0deg), #ecf0f1 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px auto;
    position: relative;
    transition: all 0.5s ease;
}

.circular-progress::before {
    content: '';
    position: absolute;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--theme-tertiary);
}

.circular-progress .progress-value {
    position: relative;
    z-index: 1;
    font-weight: bold;
    font-size: 0.9em;
    color: var(--theme-primary);
}

/* ===== STATISTIQUES ===== */
.roadmap-stats {
    background: linear-gradient(135deg, var(--theme-secondary), var(--theme-tertiary));
    padding: 30px;
    border-radius: 15px;
    margin-top: 40px;
    text-align: center;
    box-shadow: var(--theme-section-shadow);
    position: relative;
    overflow: hidden;
}

.roadmap-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-accent));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.stat-card {
    background: var(--theme-tertiary);
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--theme-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 2.8em;
    font-weight: bold;
    color: var(--theme-primary);
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--theme-text);
    font-size: 0.95em;
    font-weight: 500;
}

.stat-icon {
    font-size: 2em;
    color: var(--theme-accent);
    margin-bottom: 10px;
    opacity: 0.7;
}

/* ===== GRAPHIQUE DE PROGRESSION GLOBALE ===== */
.overall-progress {
    margin-top: 30px;
    padding: 20px;
    background: var(--theme-tertiary);
    border-radius: 12px;
    box-shadow: var(--theme-section-shadow);
}

.progress-chart {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
}

.progress-background {
    stroke: #ecf0f1;
}

.progress-bar-circle {
    stroke: var(--theme-primary);
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 2s ease;
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    font-weight: bold;
    color: var(--theme-primary);
}

/* ===== ONGLETS DE FILTRAGE ===== */
.filter-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 5px;
    flex-wrap: wrap;
}

.filter-tab {
    background: var(--theme-secondary);
    color: var(--theme-text);
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-family: var(--theme-font-family);
}

.filter-tab:hover {
    background: var(--theme-primary);
    color: var(--theme-button-primary-text);
    transform: translateY(-2px);
}

.filter-tab.active {
    background: var(--theme-primary);
    color: var(--theme-button-primary-text);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ===== ÉLÉMENTS FLOTTANTS ===== */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.floating-icon {
    position: absolute;
    color: var(--theme-primary);
    opacity: 0.08;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.08;
    }
    50% { 
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.12;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    :root {
        --roadmap-content-width: calc(100% - 80px);
        --roadmap-content-gap: 50px;
        --roadmap-marker-size: 20px;
    }
    
    .timeline-line {
        left: 40px;
        width: 4px;
    }

    .timeline-item {
        flex-direction: row !important;
        align-items: flex-start;
    }

    .timeline-content {
        width: var(--roadmap-content-width);
        margin-left: 70px !important;
        margin-right: 0 !important;
    }

    .timeline-content::before {
        left: -15px !important;
        right: auto !important;
        border-left-color: transparent !important;
        border-right-color: var(--theme-tertiary) !important;
    }

    .timeline-marker {
        left: 40px;
    }

    .roadmap-header h1 {
        font-size: 2em;
    }

    .control-btn {
        padding: 8px 15px;
        font-size: 12px;
    }

    #searchInput {
        width: 90%;
        max-width: 300px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 20px 15px;
    }

    .stat-number {
        font-size: 2.2em;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .roadmap-container {
        padding: 15px;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .filter-tabs {
        gap: 3px;
    }
    
    .filter-tab {
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* ===== CLASSES UTILITAIRES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* ===== ANIMATIONS SPÉCIALES ===== */
.slide-in-left {
    animation: slideInLeft 0.6s ease;
}

.slide-in-right {
    animation: slideInRight 0.6s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== DÉLAIS D'ANIMATION ===== */
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }
.timeline-item:nth-child(9) { animation-delay: 0.9s; }
.timeline-item:nth-child(10) { animation-delay: 1.0s; }
.timeline-item:nth-child(11) { animation-delay: 1.1s; }
.timeline-item:nth-child(12) { animation-delay: 1.2s; }
.timeline-item:nth-child(13) { animation-delay: 1.3s; }
.timeline-item:nth-child(14) { animation-delay: 1.4s; }
.timeline-item:nth-child(15) { animation-delay: 1.5s; }
.timeline-item:nth-child(16) { animation-delay: 1.6s; }
.timeline-item:nth-child(17) { animation-delay: 1.7s; }
.timeline-item:nth-child(18) { animation-delay: 1.8s; }