/* Variables CELER */
:root {
    --primary: #1B3B5F;
    --secondary: #4A5568;
    --accent: #B87854;
    --light: #F8F9FA;
    --dark: #1B3B5F;
}

/* Hero - Fond moderne */
body {
    background: var(--light) !important;
}

/* Amélioration des glass-effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(27, 59, 95, 0.1);
    box-shadow: 0 4px 20px rgba(27, 59, 95, 0.08);
}

/* Amélioration des titres */
.text-shadow {
    text-shadow: none; /* Retirer les ombres lourdes */
}

/* Carousel processus - Couleurs CELER */
.step-1 .step-number { background: var(--primary); }
.step-2 .step-number { background: var(--accent); }
.step-3 .step-number { background: var(--primary); }
.step-4 .step-number { background: var(--accent); }
.step-5 .step-number { background: var(--primary); }
.step-6 .step-number { background: var(accent); }

.step-1 .step-icon,
.step-3 .step-icon,
.step-5 .step-icon { color: var(--primary); }

.step-2 .step-icon,
.step-4 .step-icon,
.step-6 .step-icon { color: var(--accent); }

.step-1 .deliverables-title,
.step-3 .deliverables-title,
.step-5 .deliverables-title { color: var(--primary); }

.step-2 .deliverables-title,
.step-4 .deliverables-title,
.step-6 .deliverables-title { color: var(--accent); }

.step-1 .bullet,
.step-3 .bullet,
.step-5 .bullet { background: var(--primary); }

.step-2 .bullet,
.step-4 .bullet,
.step-6 .bullet { background: var(--accent); }

/* Supprimer les formes flottantes inutiles */
.floating-shape {
    display: none;
}

/* Stats plus épurées */
.counter {
    font-weight: 700;
}

/* Boutons CTA */
.gradient-primary {
    background: linear-gradient(135deg, var(--accent), #a36848);
}

.gradient-primary:hover {
    background: linear-gradient(135deg, #a36848, #8b5a3c);
}

/* Styles de base existants */
.pattern-dots {
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 1px, transparent 1px);
    background-size: 30px 30px;
}

.timeline-line {
    background: linear-gradient(to bottom, var(--primary), var(--accent), var(--secondary));
}

.counter { 
    transition: all 0.3s ease; 
}

/* Images de service - Optimisées pour responsive */
.service-image1 {
    background-image: url("../IMG/moteurPerformance.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.service-image2 {
    background-image: url("../IMG/equipe.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.service-image3 {
    background-image: url("../IMG/résultat-processus.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.service-image4 {
    background-image: url("../IMG/processus-fusion.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Amélioration de l'effet glass pour toutes les tailles */
.glass-effect {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    transition: all 0.3s ease;
}

.glass-effect:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

/* Animations et formes flottantes */
@keyframes floating {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
    }
    50% { 
        transform: translateY(-20px) rotate(5deg);
    }
}

.floating {
    animation: floating 6s ease-in-out infinite;
}

.floating-shape {
    position: fixed;
    opacity: 0.1;
    animation: floating 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.shape-1 {
    top: 20%;
    left: 10%;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 50%;
    animation-delay: 0s;
}

.shape-2 {
    top: 60%;
    right: 15%;
    width: 150px;
    height: 150px;
    background: linear-gradient(45deg, var(--accent), var(--secondary));
    border-radius: 30%;
    animation-delay: -2s;
}

.shape-3 {
    bottom: 20%;
    left: 20%;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    border-radius: 25%;
    animation-delay: -4s;
}

/* Animation des slides */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

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

/* Text shadow pour améliorer la lisibilité */
.text-shadow {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

/* Optimisations spécifiques pour mobile */
@media (max-width: 768px) {
    /* Prévenir le débordement horizontal */
    body, html {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Réduction des animations sur mobile pour les performances */
    .floating, .floating-shape {
        animation-duration: 10s;
    }

    /* Amélioration des images de service sur mobile */
    .service-image1,
    .service-image2,
    .service-image3,
    .service-image4 {
        background-attachment: scroll; /* Améliore les performances sur mobile */
        min-height: 300px;
    }

    /* Ajustement des effets glass sur mobile */
    .glass-effect {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    /* Simplification des animations hover sur mobile */
    .glass-effect:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 25px 0 rgba(31, 38, 135, 0.4);
    }

    /* Amélioration de la timeline sur mobile */
    .timeline-line {
        display: none; /* Cachée sur mobile, remplacée par des connecteurs */
    }

    /* Optimisation des grids sur mobile */
    .grid {
        gap: 1rem;
    }

    /* Amélioration des boutons sur mobile */
    .group:active {
        transform: scale(0.98);
    }

    /* Amélioration de la lisibilité des textes sur mobile */
    .text-justify {
        text-align: left; /* Plus lisible sur petit écran */
    }

    /* Optimisation des espacements */
    .space-y-8 > * + * {
        margin-top: 1.5rem;
    }

    .space-y-16 > * + * {
        margin-top: 2rem;
    }

    /* Réduction de la taille des ombres sur mobile */
    .shadow-2xl {
        box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }

    /* Amélioration des formes flottantes sur mobile */
    .floating-shape {
        opacity: 0.05; /* Moins visibles sur mobile */
    }

    .shape-1 {
        width: 60px;
        height: 60px;
    }

    .shape-2 {
        width: 80px;
        height: 80px;
    }

    .shape-3 {
        width: 50px;
        height: 50px;
    }

    /* Optimisation des icônes sur mobile */
    .fas, .fab, .far {
        line-height: 1;
    }

    /* Amélioration des cartes de processus sur mobile */
    .group {
        margin-bottom: 2rem;
    }

    /* Espacement amélioré pour les listes sur mobile */
    .space-y-1 > * + * {
        margin-top: 0.5rem;
    }

    .space-y-2 > * + * {
        margin-top: 0.75rem;
    }

    .space-y-3 > * + * {
        margin-top: 1rem;
    }

    .space-y-4 > * + * {
        margin-top: 1.25rem;
    }

    /* Amélioration des flex layouts sur mobile */
    .flex-shrink-0 {
        flex-shrink: 0;
        min-width: auto;
    }

    /* Correction des débordements de contenu */
    .max-w-5xl,
    .max-w-4xl,
    .max-w-7xl,
    .max-w-6xl {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    /* Amélioration de la section CTA sur mobile */
    .relative.inline-block {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Optimisation des grids responsive */
    .grid-cols-2.md\:grid-cols-4 {
        gap: 1rem;
    }

    .grid-cols-2.md\:grid-cols-3.lg\:grid-cols-6 {
        gap: 0.75rem;
    }
}

/* Optimisations pour tablettes */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Ajustement des images pour tablettes */
    .service-image1,
    .service-image2,
    .service-image3,
    .service-image4 {
        min-height: 400px;
    }

    /* Amélioration des grids sur tablette */
    .grid.gap-8 {
        gap: 1.5rem;
    }

    /* Ajustement des espacements */
    .space-y-16 > * + * {
        margin-top: 3rem;
    }
}

/* Optimisations pour grands écrans */
@media (min-width: 1024px) {
    /* Timeline visible uniquement sur desktop */
    .timeline-line {
        display: block;
    }

    /* Amélioration des effets hover sur desktop */
    .group:hover {
        transform: scale(1.02);
    }

    .glass-effect:hover {
        transform: translateY(-5px) scale(1.01);
    }

    /* Parallax léger pour les formes flottantes sur desktop */
    .floating-shape {
        opacity: 0.1;
    }

    /* Amélioration des images de service sur desktop */
    .service-image1,
    .service-image2,
    .service-image3,
    .service-image4 {
        background-attachment: fixed; /* Effet parallax sur desktop */
        min-height: 500px;
    }
}

/* Optimisations pour très petits écrans */
@media (max-width: 480px) {
    /* Réduction drastique des espacements */
    .py-16 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .py-20 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .mb-16 {
        margin-bottom: 2rem;
    }

    .mb-12 {
        margin-bottom: 1.5rem;
    }

    /* Réduction de la taille des titres */
    .text-3xl {
        font-size: 1.5rem;
    }

    .text-4xl {
        font-size: 1.75rem;
    }

    .text-5xl {
        font-size: 2rem;
    }

    .text-6xl {
        font-size: 2.25rem;
    }

    /* Ajustement des images pour très petits écrans */
    .service-image1,
    .service-image2,
    .service-image3,
    .service-image4 {
        min-height: 250px;
    }

    /* Réduction des paddings pour très petits écrans */
    .p-6 {
        padding: 1rem;
    }

    .p-8 {
        padding: 1.25rem;
    }

    /* Amélioration des boutons sur très petits écrans */
    .px-12 {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .py-4 {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    /* Ajustement des grids pour très petits écrans */
    .grid-cols-2 {
        gap: 0.5rem;
    }

    /* Réduction des ombres pour économiser les ressources */
    .shadow-2xl {
        box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.1);
    }

    /* Simplification des formes flottantes */
    .floating-shape {
        display: none; /* Suppression sur très petits écrans */
    }
}

/* Corrections supplémentaires pour éviter les débordements */
* {
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* Amélioration de l'accessibilité */
@media (prefers-reduced-motion: reduce) {
    .floating,
    .floating-shape,
    .slide-in-left,
    .slide-in-right,
    .group {
        animation: none;
        transition: none;
    }

    .glass-effect:hover,
    .group:hover {
        transform: none;
    }
}

/* Support pour les écrans haute densité */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .glass-effect {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
}

/* Mode sombre pour les utilisateurs qui le préfèrent */
@media (prefers-color-scheme: dark) {
    .glass-effect {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

        :root {
            --primary: #c6be91;
            --secondary: #a39878;
            --accent: #a28150;
            --dark: #65644d;
        }

        /* Animation continue pour le défilement */
        @keyframes slideProcessus {
            0% { transform: translateX(0); }
            100% { transform: translateX(-3600px); } /* 6 slides × 600px = 3600px */
        }

        @keyframes slideProcessusMobile {
            0% { transform: translateX(0); }
            100% { transform: translateX(-3000px); } /* 6 slides × 500px = 3000px */
        }

        /* Container principal */
        .processus-carousel {
            position: relative;
            width: 100%;
            height: 500px;
            overflow: hidden;
            border-radius: 20px;
            
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            margin: 3rem 0;
        }

        /* Track du carousel - défilement continu */
        .processus-track {
            display: flex;
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            animation: slideProcessus 36s infinite linear; /* 6s par étape */
        }

        /* Pause au survol */
        .processus-carousel:hover .processus-track {
            animation-play-state: paused;
        }

        /* Slide individuelle */
        .processus-slide {
            min-width: 600px;
            height: 100%;
            margin-right: 2rem;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 15px;
            position: relative;
            padding: 2rem;
        }

        /* Étapes numérotées */
        .etape-slide {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: 0 8px 32px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            gap: 2rem;
            padding: 2rem;
            width: 100%;
            height: 80%;
            border-left: 6px solid var(--primary);
        }

        /* Numéro d'étape */
        .step-number-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 120px;
        }

        .step-number {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            font-weight: bold;
            color: white;
            margin-bottom: 1rem;
            position: relative;
        }

        .step-1 .step-number { background: linear-gradient(135deg, #a855f7, #ec4899); }
        .step-2 .step-number { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
        .step-3 .step-number { background: linear-gradient(135deg, #f59e0b, #f97316); }
        .step-4 .step-number { background: linear-gradient(135deg, #10b981, #059669); }
        .step-5 .step-number { background: linear-gradient(135deg, #3b82f6, #6366f1); }
        .step-6 .step-number { background: linear-gradient(135deg, #ec4899, #a855f7); }

        .step-icon {
            font-size: 4rem;
            margin-bottom: 0.5rem;
        }

        .step-1 .step-icon { color: #a855f7; }
        .step-2 .step-icon { color: #06b6d4; }
        .step-3 .step-icon { color: #f59e0b; }
        .step-4 .step-icon { color: #10b981; }
        .step-5 .step-icon { color: #3b82f6; }
        .step-6 .step-icon { color: #ec4899; }

        /* Contenu de l'étape */
        .step-content {
            flex: 1;
        }

        .step-title {
            font-size: 1.8rem;
            font-weight: bold;
            margin-bottom: 1rem;
            color: var(--dark);
        }

        .step-description {
            font-size: 1.1rem;
            line-height: 1.6;
            color: #666;
            margin-bottom: 1.5rem;
        }

        .step-deliverables {
            background: rgba(255, 255, 255, 0.8);
            border-radius: 12px;
            padding: 1.5rem;
            border: 1px solid rgba(0,0,0,0.1);
        }

        .deliverables-title {
            font-weight: bold;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .step-1 .deliverables-title { color: #a855f7; }
        .step-2 .deliverables-title { color: #06b6d4; }
        .step-3 .deliverables-title { color: #f59e0b; }
        .step-4 .deliverables-title { color: #10b981; }
        .step-5 .deliverables-title { color: #3b82f6; }
        .step-6 .deliverables-title { color: #ec4899; }

        .deliverable-list {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.5rem;
        }

        .deliverable-item {
            display: flex;
            align-items: center;
            font-size: 0.9rem;
            color: #666;
        }

        .bullet {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            margin-right: 0.75rem;
            flex-shrink: 0;
        }

        .step-1 .bullet { background: #a855f7; }
        .step-2 .bullet { background: #06b6d4; }
        .step-3 .bullet { background: #f59e0b; }
        .step-4 .bullet { background: #10b981; }
        .step-5 .bullet { background: #3b82f6; }
        .step-6 .bullet { background: #ec4899; }

        /* Indicateur de progression */
        .progress-container {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            gap: 8px;
            z-index: 10;
        }

        .progress-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255,255,255,0.5);
            animation: progressDot 36s infinite linear;
        }

        .progress-dot:nth-child(1) { animation-delay: 0s; }
        .progress-dot:nth-child(2) { animation-delay: -6s; }
        .progress-dot:nth-child(3) { animation-delay: -12s; }
        .progress-dot:nth-child(4) { animation-delay: -18s; }
        .progress-dot:nth-child(5) { animation-delay: -24s; }
        .progress-dot:nth-child(6) { animation-delay: -30s; }

        @keyframes progressDot {
            0%, 16.66% { 
                background: var(--primary);
                transform: scale(1.5);
            }
            16.67%, 100% { 
                background: rgba(255,255,255,0.5);
                transform: scale(1);
            }
        }

        /* Section titre */
        .section-header {
            text-align: center;
            margin-bottom: 3rem;
        }

        .section-title {
            font-size: 3rem;
            font-weight: 800;
            color: var(--dark);
            margin-bottom: 1rem;
        }

        .gradient-text {
            background: linear-gradient(135deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .section-subtitle {
            font-size: 1.2rem;
            color: #666;
            max-width: 600px;
            margin: 0 auto;
        }

        /* Responsive Mobile */
        @media (max-width: 768px) {
            .processus-carousel {
                height: 400px;
            }

            .processus-track {
                animation: slideProcessusMobile 30s infinite linear; /* Plus rapide sur mobile */
            }

            .processus-slide {
                min-width: 500px;
                padding: 1.5rem;
            }

            .etape-slide {
                flex-direction: column;
                text-align: center;
                gap: 1rem;
                padding: 1.5rem;
            }

            .step-number-container {
                min-width: auto;
            }

            .step-number {
                width: 60px;
                height: 60px;
                font-size: 1.5rem;
            }

            .step-icon {
                font-size: 2.5rem;
            }

            .step-title {
                font-size: 1.4rem;
            }

            .step-description {
                font-size: 1rem;
            }

            .deliverable-list {
                grid-template-columns: 1fr;
            }

            .section-title {
                font-size: 2rem;
            }
        }

        @media (max-width: 480px) {
            .processus-carousel {
                height: 350px;
            }

            .processus-slide {
                min-width: 400px;
                padding: 1rem;
            }

            .etape-slide {
                padding: 1rem;
            }

            .step-deliverables {
                padding: 1rem;
            }
        }

        /* Accessibilité */
        @media (prefers-reduced-motion: reduce) {
            .processus-track {
                animation: none;
            }
            
            .progress-dot {
                animation: none;
            }
        }

        /* Effet de brillance sur les slides */
        .etape-slide::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            animation: shine 8s infinite linear;
            animation-delay: var(--shine-delay);
        }

        .step-1::before { --shine-delay: 0s; }
        .step-2::before { --shine-delay: 6s; }
        .step-3::before { --shine-delay: 12s; }
        .step-4::before { --shine-delay: 18s; }
        .step-5::before { --shine-delay: 24s; }
        .step-6::before { --shine-delay: 30s; }

        @keyframes shine {
            0%, 50% { left: -100%; }
            50.1%, 100% { left: 100%; }
        }

 /* ===== CORRECTION LAYOUT SECTIONS ALTERNÉES ===== */

/* Force l'affichage horizontal sur desktop (≥1024px) */
@media (min-width: 1024px) {
    /* Première section : Image GAUCHE, Texte DROITE */
    section > .flex:nth-of-type(1) {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 4rem !important;
    }
    
    /* Deuxième section : Image DROITE, Texte GAUCHE */
    section > .flex:nth-of-type(2) {
        display: flex !important;
        flex-direction: row-reverse !important;
        align-items: center !important;
        gap: 4rem !important;
    }
    
    /* Troisième section : Image GAUCHE, Texte DROITE */
    section > .flex:nth-of-type(3) {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 4rem !important;
    }
    
    /* Quatrième section : Image DROITE, Texte GAUCHE */
    section > .flex:nth-of-type(4) {
        display: flex !important;
        flex-direction: row-reverse !important;
        align-items: center !important;
        gap: 4rem !important;
    }
    
    /* Chaque colonne (image et texte) prend 50% */
    section > .flex > .flex-1 {
        flex: 1 1 50% !important;
        max-width: 50% !important;
        min-width: 50% !important;
    }
    
    /* S'assurer que les images gardent leur hauteur */
    .service-image1,
    .service-image2,
    .service-image3,
    .service-image4 {
        height: 500px !important;
    }
}

/* Sur tablette (768px - 1023px) : garde le mode vertical */
@media (min-width: 768px) and (max-width: 1023px) {
    section > .flex {
        flex-direction: column !important;
    }
    
    section > .flex > .flex-1 {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Sur mobile (<768px) : mode vertical par défaut */
@media (max-width: 767px) {
    section > .flex {
        flex-direction: column !important;
    }
    
    section > .flex > .flex-1 {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .service-image1,
    .service-image2,
    .service-image3,
    .service-image4 {
        height: 300px !important;
    }
}