/*--------------------------------------------------
 # Project Page Styles
 # Modern project timeline with alternating content
--------------------------------------------------*/

:root {
    /* Timeline colors */
    --timeline-purple: #7b1fa2;
    --timeline-grey: #e0e0e0;
    --timeline-node-size: 60px; /* Cercles plus grands */
    --timeline-bar-height: 12px; /* Barre plus large */
    --transition-standard: all 0.3s ease-in-out;
    
    /* Animations */
    --anim-duration: 0.4s;
    --anim-easing: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Project Hero Section
--------------------------------------------------*/
.project-hero {
    position: relative;
    min-height: 35vh; /* Hauteur réduite */
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--gradient-project-contact);
    color: white;
    padding: 60px 0; /* Padding réduit */
}

/* Trait sous le titre avec animation de gauche à droite comme sur la page d'accueil */
.project-hero h1 {
    position: relative;
    display: inline-block;
}

.project-hero h1::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0; /* Démarre à 0 pour l'animation */
    height: 12px;
    background-color: rgba(255, 255, 255, 0.25);
    z-index: -1;
    border-radius: 2px;
    transition: width 1s ease-in-out; /* Transition exacte comme avant */
    animation: traitApparition 1s ease-in-out forwards; /* Animation de gauche à droite */
}

/* Animation keyframes pour l'apparition du trait de gauche à droite */
@keyframes traitApparition {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Effet de dégradé diagonal */
.project-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Effet lumineux style accueil */
.project-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.1), transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* SVG Animations in Project Hero */
.project-hero .svg-animations-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2; /* Au-dessus des effets lumineux */
    overflow: visible;
    filter: brightness(1.15) contrast(1.05);
}

.project-hero .svg-item {
    position: absolute;
    width: 180px;
    height: auto;
    opacity: 1;
    z-index: 2;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
}

/* Positionnement des SVGs */
.project-hero .svg-item[data-svg="screen-coding"] {
    top: 31%;
    left: 1%;
    width: 200px !important;
    transform: translateY(-50%) rotate(0deg) scale(0.7); 
}

.project-hero .svg-item[data-svg="code-connect"] {
    top: 68%;
    left: 11%;
    width: 200px !important;
    transform: translateY(-50%) rotate(0deg) scale(0.7);
}

.project-hero .svg-item[data-svg="code-windows"] {
    top: 65%;
    right: 8%;
    width: 200px !important;
    transform: translateY(-50%) rotate(0deg) scale(0.7);
}

.project-hero .svg-item[data-svg="gear"] {
    top: 25%;
    right: 0%;
    width: 220px !important;
    transform: translateY(-50%) rotate(0deg) scale(0.7);
}

/* SVG Loading et Security dans le hero */
.project-hero .svg-item[data-svg="loading"] {
    top: 26%;
    left: 19%;
    width: 282px !important;
    transform: translateY(-50%) rotate(0deg) scale(0.7);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
}

.project-hero .svg-item[data-svg="puzzle"] {
    top: 28%;
    right: 16%;
    width: 312px !important;
    transform: translateY(-50%) rotate(0deg) scale(0.7);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
}

/* Le motif de points en arrière-plan a été supprimé car redondant avec le dégradé */

.project-hero .container {
    position: relative;
    z-index: 10;
}

.project-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.project-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Styles uniformisés pour le titre principal */
.project-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    top: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: white;
    position: relative;
}

/* Exclure explicitement le titre principal du trait animé */
.project-hero .section-title h1:after {
    display: none !important;
}

.project-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Project Timeline Section
--------------------------------------------------*/
.project-timeline-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Styles pour les titres de section avec trait animé - uniquement pour les sections spécifiques */
.section-title h2.nos-services-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0.08em;
    width: 0;
    height: 12px;
    background-color: rgba(123, 31, 162, 0.25);
    transition: width 1s cubic-bezier(0.215,0.61,0.355,1);
    transform: skew(-12deg) rotate(-1deg);
    border-radius: 2px;
}

.section-title.visible h2.nos-services-title:after {
    width: 100%;
    left: 0;
    transform: none;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #4527a0;
    position: relative;
    display: inline-block;
}

.section-title h2:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--timeline-purple);
    border-radius: 2px;
}

/* Style spécial pour les titres de section comme "Nos services" */
.nos-services-title {
    color: #4527a0;
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.nos-services-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 12px;
    background-color: rgba(123, 31, 162, 0.25);
    z-index: -1;
    border-radius: 10px;
}

.section-title p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/* Timeline Container & Components - STRUCTURE CENTREE
--------------------------------------------------*/
.project-timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

/* Timeline Bar - Centrée */
.timeline-bar {
    position: absolute;
    top: 60px;
    bottom: 60px;
    left: 50%;
    width: var(--timeline-bar-height);
    background-color: var(--timeline-grey);
    transform: translateX(-50%);
    z-index: 1;
    border-radius: 3px;
}

.timeline-progress {
    position: absolute;
    width: 100%;
    height: 0%; /* Will be updated via JS */
    background-color: var(--timeline-purple);
    top: 0;
    left: 0;
    transition: height 0.8s var(--anim-easing);
    border-radius: 3px;
    z-index: 2;
    box-shadow: 0 0 10px rgba(123, 31, 162, 0.4);
}

/* Timeline Nodes - Centrés */
.timeline-nodes {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 80px;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
}

/* Nœuds individuels - Positionnement absolu précis */
.timeline-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    pointer-events: all;
    z-index: 6;
}

/* Positionnement dynamique des nœuds - géré par JavaScript */
/* Les positions sont calculées automatiquement en fonction du contenu réel */

/* Suppression de la duplication - déjà défini ci-dessus */

.timeline-circle {
    width: var(--timeline-node-size);
    height: var(--timeline-node-size);
    border-radius: 50%;
    background-color: white;
    border: 3px solid var(--timeline-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem; /* Texte plus grand */
    color: var(--color-text-dark);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    cursor: pointer;
    transition: var(--transition-standard);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Ombre plus marquée */
}

.timeline-circle:hover, 
.timeline-circle:focus {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Active and completed states */
.timeline-node.completed .timeline-circle {
    background-color: var(--timeline-purple);
    border-color: var(--timeline-purple);
    color: white;
}

.timeline-node.active .timeline-circle {
    background-color: white;
    border-color: var(--timeline-purple);
    border-width: 4px;
    color: var(--timeline-purple);
    transform: translateX(-50%) scale(1.15);
    box-shadow: 0 4px 16px rgba(123, 31, 162, 0.3);
}

/* Timeline Content 
--------------------------------------------------*/
.timeline-content {
    position: relative;
    z-index: 2;
}

/* Timeline Steps - Structure Flex avec alternance */
.timeline-step {
    display: flex;
    align-items: center;
    min-height: 320px; /* Hauteur augmentée pour plus d'espace */
    margin-bottom: 80px; /* Espacement augmenté entre les étapes */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: relative;
}

/* Alternance gauche-droite */
.timeline-step:nth-child(odd) {
    flex-direction: row; /* Texte à gauche, image à droite */
}

.timeline-step:nth-child(even) {
    flex-direction: row-reverse; /* Image à gauche, texte à droite */
}

/* Ajustements spécifiques */
.timeline-step.step-1 {
    margin-top: 20px; /* Espace initial */
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.timeline-step.active {
    opacity: 1;
    transform: translateY(0);
}

/* Text and image containers - Flex Layout */
.timeline-text, 
.timeline-image {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 60px;
}

/* Alignement du texte selon l'alternance - Espacement encore augmenté */
.timeline-step:nth-child(odd) .timeline-text {
    text-align: right;
    padding-right: 150px; /* Augmenté de 120px à 150px */
}

.timeline-step:nth-child(even) .timeline-text {
    text-align: left;
    padding-left: 150px; /* Augmenté de 120px à 150px */
}

.timeline-text h3 {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    position: relative;
}

.timeline-text h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--timeline-purple);
}

.timeline-text p {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Image styling */
.timeline-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.timeline-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.timeline-image img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Supprimer la duplication - déjà défini ci-dessus */

/* Ajuster l'alignement des titres et sous-titres */
.timeline-step:nth-child(odd) .timeline-text h3::after {
    left: auto;
    right: 0;
}

/* Optimisation pour l'affichage mobile */
@media (max-width: 768px) {
    .timeline-step, .timeline-step:nth-child(even), .timeline-step:nth-child(odd) {
        flex-direction: column;
    }
    
    .timeline-step:nth-child(odd) .timeline-text,
    .timeline-step:nth-child(even) .timeline-text {
        text-align: left;
        padding: 20px;
    }
    
    .timeline-step:nth-child(odd) .timeline-text h3::after {
        left: 0;
        right: auto;
    }
}

/* La règle pour les étapes paires est déjà définie plus haut */

/* Project Details Section
--------------------------------------------------*/
.project-details {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.technologies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.technology-card {
    background: white;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Animation de lame brillante pour les icônes */
@keyframes shineSweep {
    0% {
        transform: translateX(-100%) skewX(-20deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    20% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(100%) skewX(-20deg);
        opacity: 0;
    }
}

/* L'effet de lame brillante a été déplacé vers l'icône */

.technology-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(123, 31, 162, 0.15), 0 8px 25px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid rgba(123, 31, 162, 0.2);
}

.technology-card:hover i::after {
    animation: shineSweep 1.5s ease-in-out;
}

/* Ensure content stays above the shine effect */
.technology-card > * {
    position: relative;
    z-index: 2;
}

.technology-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--color-primary);
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    overflow: hidden;
}

/* Effet de lame brillante sur les icônes */
.technology-card i::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(123, 31, 162, 0.2),
        rgba(255, 255, 255, 0.6),
        rgba(123, 31, 162, 0.2),
        transparent
    );
    transform: translateX(-100%) skewX(-20deg);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
}

.technology-card:hover i {
    color: var(--color-primary);
    transform: scale(1.05);
    opacity: 1;
}

.technology-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-text-dark);
}

.technology-card p {
    color: var(--color-text-muted);
}

/* Call to Action Section
--------------------------------------------------*/
.project-cta {
    background: linear-gradient(135deg, rgba(69, 39, 160, 0.05) 0%, rgba(123, 31, 162, 0.08) 100%);
    padding: 100px 0;
    text-align: center;
    color: var(--color-text);
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Éléments décoratifs supprimés */

.project-cta .container {
    position: relative;
    z-index: 2;
}

.project-cta h2 {
    font-size: 2.8rem;
    margin-bottom: 30px;
    color: #4527a0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.project-cta p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    color: #333;
}

.project-cta .btn {
    font-size: 1.2rem;
    padding: 14px 34px;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(123, 31, 162, 0.25);
    transform: translateZ(0);
    margin-top: 10px;
    position: relative;
    z-index: 5;
    border: none;
    font-weight: 600;
}

.project-cta .btn-primary {
    background: linear-gradient(90deg, #4527a0, #7b1fa2);
    color: #fff;
}

.project-cta .btn-primary:hover {
    color: #fff;
    background: linear-gradient(90deg, #4527a0, #7b1fa2);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(123, 31, 162, 0.35);
}
