/* ==========================================================================
   PROCESS - Processus, étapes et workflows
   ========================================================================== */

/* ==========================================================================
   PROCESS DE BASE
   ========================================================================== */

.process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* Étapes individuelles */
.process-step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 20px;
    position: relative;
    margin-bottom: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
}

/* Flèches entre étapes sur desktop */
.process-step::after {
    content: '→';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: var(--primary, #1a73e8);
    display: block;
}

.process-step:last-child::after {
    display: none;
}

/* Variante energy process */
.process-step.energy-process {
    background: linear-gradient(135deg, #1a73e8 0%, #34a853 100%);
    color: white;
}

.process-step.energy-process h4 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: white;
}

.process-step.energy-process p {
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 0;
    color: rgba(255,255,255,0.95);
}

/* Process steps dans section fabrication */
.craftsmanship-section .process-step,
.section .process-step {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin: 20px 0;
    padding: 30px 25px;
    text-align: left;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.craftsmanship-section .process-step h4,
.section .process-step h4 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

.craftsmanship-section .process-step p,
.section .process-step p {
    color: rgba(255,255,255,0.95);
    text-align: justify;
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

/* Suppression des flèches pour les process steps verticaux */
.craftsmanship-section .process-step::after,
.section .process-step::after {
    display: none;
}

/* ==========================================================================
   ICÔNES DE PROCESSUS
   ========================================================================== */

.process-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    font-weight: bold;
    width: 80px;
    height: 80px;
    background-color: var(--primary, #1a73e8);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
}

/* ==========================================================================
   NUMÉROTATION DES ÉTAPES
   ========================================================================== */

.process-number {
    background: #fbbc05;
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: absolute;
    top: -20px;
    left: 25px;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 2;
}

/* Ajustement pour les process-step avec numéros */
.process-step:has(.process-number) {
    padding-top: 40px;
}

.process-step.numbered {
    padding-top: 40px;
}

/* Numéros d'étapes alternatifs */
.step-number {
    background: linear-gradient(45deg, #1a73e8, #0d47a1);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Variantes de step-number */
.step-number.absolute {
    position: absolute;
    top: -15px;
    left: 20px;
    margin: 0;
}

/* ==========================================================================
   SOLUTION STEPS
   ========================================================================== */

.solution-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.solution-step {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #34a853;
    position: relative;
    transition: transform 0.3s ease;
}

.solution-step:hover {
    transform: translateY(-3px);
}

.solution-step .step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: #34a853;
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
}

.solution-step h4 {
    color: #34a853;
    margin-bottom: 15px;
    margin-top: 10px;
    font-size: 1.2rem;
}

.solution-step p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   INSTALLATION STEPS
   ========================================================================== */

.installation-steps {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.installation-steps li {
    counter-increment: step-counter;
    position: relative;
    padding: 20px 0 20px 60px;
    border-left: 2px solid var(--medium);
    margin-bottom: 20px;
}

.installation-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: -12px;
    top: 20px;
    background: var(--primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

.installation-steps li:last-child {
    border-left: none;
}

.installation-steps h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* ==========================================================================
   TIMELINE - Chronologie
   ========================================================================== */

.timeline-container {
    position: relative;
    margin: 30px 0;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-date {
    min-width: 120px;
    font-weight: bold;
    color: #495057;
}

.timeline-status {
    min-width: 100px;
    text-align: center;
    font-weight: bold;
}

/* Timeline section spécialisée */
.timeline-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 50px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: rgba(255,255,255,0.3);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-section .timeline-item {
    padding: 20px 40px;
    position: relative;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    width: 45%;
    margin: 20px 0;
    backdrop-filter: blur(10px);
}

.timeline-section .timeline-item.left {
    left: 0;
}

.timeline-section .timeline-item.right {
    left: 55%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ffd700;
    border: 4px solid white;
    top: 50%;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.left::after {
    right: -15px;
}

.timeline-item.right::after {
    left: -15px;
}

.timeline-content h4 {
    margin: 0 0 10px 0;
    color: #ffd700;
}

/* ==========================================================================
   FLOW STEPS - Flux de processus
   ========================================================================== */

.flow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.flow-step {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease;
}

.flow-step:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.15);
}

.flow-step h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.flow-step p {
    opacity: 0.9;
    line-height: 1.5;
}

/* Architecture flow */
.architecture-flow {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f5e8 100%);
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
}

.architecture-flow .flow-step {
    display: flex;
    align-items: center;
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: left;
}

.architecture-flow .step-number {
    background: linear-gradient(45deg, #1a73e8, #0d47a1);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
}

/* ==========================================================================
   NAVIGATION DE PROCESSUS
   ========================================================================== */

.process-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.process-link {
    padding: 8px 15px;
    background-color: #e0e0e0;
    color: var(--dark);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.process-link.active,
.process-link:hover {
    background-color: var(--primary);
    color: white;
}

.process-detail {
    display: none;
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.process-detail.active {
    display: block;
    animation: fadeIn 0.5s;
}

.process-detail h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* ==========================================================================
   STEPS NAVIGATION
   ========================================================================== */

.steps-nav {
    display: flex;
    justify-content: space-between;
    overflow-x: auto;
    padding: 15px 0;
}

.step-link {
    white-space: nowrap;
    padding: 10px 15px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

.step-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--primary);
    transform: translateX(-50%);
    transition: width 0.3s;
}

.step-link.active,
.step-link:hover {
    color: var(--primary);
}

.step-link.active::after,
.step-link:hover::after {
    width: 80%;
}

/* ==========================================================================
   METHODOLOGY STEPS
   ========================================================================== */

.methodology-step {
    margin: 60px 0;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--medium);
}

.methodology-step h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.step-description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    /* Flèches verticales sur mobile */
    .process-step::after {
        content: '↓';
        right: 50%;
        top: auto;
        bottom: -30px;
        transform: translateX(50%);
    }

    .process-step:last-child::after {
        display: none;
    }
    
    .process {
        grid-template-columns: 1fr;
    }
    
    .solution-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .flow-steps {
        grid-template-columns: 1fr;
    }
    
    .steps-nav {
        justify-content: flex-start;
    }
    
    .methodology-step h2 {
        font-size: 1.7rem;
    }
    
    .process-detail h3 {
        font-size: 1.3rem;
    }
    
    /* Timeline responsive */
    .timeline-item {
        width: 100%;
        left: 0 !important;
    }
    
    .timeline-item::after {
        left: -15px !important;
    }
    
    .timeline::after {
        left: 20px;
    }
    
    .timeline-date {
        min-width: auto;
        margin-bottom: 10px;
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .process-step {
        padding: 15px;
    }
    
    .solution-step {
        padding: 20px 15px;
        margin-top: 20px;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        top: -10px;
        left: 15px;
    }
    
    .process-detail {
        padding: 20px 15px;
    }
    
    .response-box,
    .example-box {
        padding: 15px;
    }
    
    .installation-steps li {
        padding: 15px 0 15px 50px;
    }
    
    .installation-steps li::before {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
        left: -10px;
        top: 15px;
    }
}