/* Page Détail Graphisme - CSS avec thème vert et support motion design */

/* Reset et base */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    background: linear-gradient(135deg, #1a1a1a 0%, #1f2a1f 50%, #1a1a1a 100%);
    
    .container {
        padding-top: 120px;
        min-height: 100vh;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;

        /* Section Hero avec support image/vidéo pour motion design */
        .hero-section {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 50px;
            padding: 0 50px 80px;
            align-items: start;

            .media-container {
                position: relative;
                background: rgba(255, 255, 255, 0.05);
                border-radius: 20px;
                overflow: hidden;
                border: 2px solid rgba(74, 222, 128, 0.3);
                backdrop-filter: blur(10px);
                box-shadow: 0 20px 40px rgba(74, 222, 128, 0.2);
                cursor: pointer;
                transition: all 0.3s ease;
                aspect-ratio: 16/9;

                &:hover {
                    transform: translateY(-5px);
                    border-color: #4ade80;
                    box-shadow: 0 25px 50px rgba(74, 222, 128, 0.3);
                }

                &.zoomed {
                    transform: scale(1.1);
                    z-index: 10;
                }

                /* Styles pour les images */
                img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    display: block;
                    border-radius: 18px;
                    transition: transform 0.3s ease;
                }

                /* Styles pour les vidéos */
                .hero-video, video {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    display: block;
                    border-radius: 18px;
                    transition: transform 0.3s ease;
                }

                .image-overlay {
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    background: linear-gradient(135deg, rgba(74, 222, 128, 0.8), rgba(74, 222, 128, 0.4));
                    opacity: 0;
                    transition: opacity 0.3s ease;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border-radius: 18px;

                    .zoom-icon {
                        font-size: 3em;
                        color: white;
                        animation: pulse 2s infinite;
                    }
                }

                &:hover .image-overlay {
                    opacity: 1;
                }

                /* Placeholder pour médias manquants */
                .media-placeholder {
                    width: 100%;
                    height: 100%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    background: rgba(255, 255, 255, 0.05);
                    border: 2px dashed rgba(74, 222, 128, 0.3);
                    border-radius: 18px;
                    color: rgba(255, 255, 255, 0.6);
                    font-size: 1.2em;
                    text-align: center;
                }

                /* Contrôles vidéo personnalisés */
                .video-controls {
                    position: absolute;
                    bottom: 10px;
                    left: 50%;
                    transform: translateX(-50%);
                    background: rgba(0, 0, 0, 0.7);
                    border-radius: 20px;
                    padding: 5px 15px;
                    opacity: 0;
                    transition: opacity 0.3s ease;
                }

                &:hover .video-controls {
                    opacity: 1;
                }
            }

            .main-info {
                padding: 20px 0;

                .project-title {
                    font-size: 3em;
                    font-weight: bold;
                    color: #4ade80;
                    margin-bottom: 20px;
                    letter-spacing: 3px;
                    text-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
                }

                .project-meta {
                    display: flex;
                    gap: 20px;
                    margin-bottom: 30px;
                    flex-wrap: wrap;

                    span {
                        background: rgba(74, 222, 128, 0.1);
                        color: #4ade80;
                        padding: 8px 16px;
                        border-radius: 20px;
                        font-weight: bold;
                        font-size: 0.9em;
                        border: 1px solid rgba(74, 222, 128, 0.3);
                    }

                    /* Badges spéciaux pour motion design */
                    .motion-badge, .video-badge {
                        background: linear-gradient(45deg, #8b5cf6, #ec4899);
                        color: white;
                        animation: pulse 2s infinite;
                        border: none;
                    }

                    .video-badge {
                        background: linear-gradient(45deg, #ef4444, #f97316);
                    }
                }

                .project-description {
                    color: rgba(255, 255, 255, 0.9);
                    font-size: 1.2em;
                    line-height: 1.8;
                    margin-bottom: 25px;
                }

                .additional-info {
                    color: rgba(255, 255, 255, 0.8);
                    font-size: 1.1em;
                    line-height: 1.7;
                    margin-bottom: 0;
                }

                /* Détails techniques */
                .tech-details {
                    margin-top: 30px;

                    h3 {
                        color: #4ade80;
                        margin-bottom: 15px;
                        font-size: 1.2em;
                    }

                    .tech-item {
                        display: flex;
                        justify-content: space-between;
                        padding: 12px 0;
                        border-bottom: 1px solid rgba(74, 222, 128, 0.2);
                        color: rgba(255, 255, 255, 0.8);

                        strong {
                            color: #4ade80;
                            min-width: 120px;
                        }
                    }
                }
            }
        }

        /* Sections de contenu avec support vidéo */
        .content-section {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 60px;
            padding: 60px 50px;
            align-items: center;
            opacity: 0;
            transform: translateY(50px);
            transition: all 0.8s ease;

            &.animate-in {
                opacity: 1;
                transform: translateY(0);
            }

            &.left-text {
                .text-content {
                    order: 1;
                }
                .media-content {
                    order: 2;
                }
            }

            &.right-text {
                .text-content {
                    order: 2;
                }
                .media-content {
                    order: 1;
                }
            }

            .text-content {
                h2 {
                    font-size: 2.5em;
                    color: #4ade80;
                    margin-bottom: 30px;
                    font-weight: bold;
                    letter-spacing: 2px;
                }

                p {
                    color: rgba(255, 255, 255, 0.9);
                    font-size: 1.1em;
                    line-height: 1.8;
                    margin-bottom: 25px;
                }

                .process-list {
                    list-style: none;
                    padding: 0;
                    margin: 30px 0;

                    li {
                        color: rgba(255, 255, 255, 0.8);
                        padding: 10px 0 10px 30px;
                        position: relative;
                        font-size: 1.1em;

                        &:before {
                            content: "→";
                            position: absolute;
                            left: 0;
                            color: #4ade80;
                            font-weight: bold;
                            font-size: 1.2em;
                        }
                    }
                }

                .tech-details {
                    margin-top: 30px;

                    .tech-item {
                        display: flex;
                        justify-content: space-between;
                        padding: 12px 0;
                        border-bottom: 1px solid rgba(74, 222, 128, 0.2);
                        color: rgba(255, 255, 255, 0.8);

                        strong {
                            color: #4ade80;
                            min-width: 120px;
                        }
                    }
                }

                .results-stats {
                    display: grid;
                    grid-template-columns: repeat(3, 1fr);
                    gap: 20px;
                    margin-top: 30px;

                    .stat-item {
                        text-align: center;
                        background: rgba(74, 222, 128, 0.1);
                        padding: 25px 15px;
                        border-radius: 15px;
                        border: 1px solid rgba(74, 222, 128, 0.3);

                        .stat-number {
                            display: block;
                            font-size: 2.5em;
                            font-weight: bold;
                            color: #4ade80;
                            margin-bottom: 10px;
                        }

                        .stat-label {
                            color: rgba(255, 255, 255, 0.8);
                            font-size: 0.9em;
                            text-transform: uppercase;
                            letter-spacing: 1px;
                        }
                    }
                }
            }

            .media-content {
                position: relative;
                border-radius: 20px;
                overflow: hidden;
                border: 2px solid rgba(74, 222, 128, 0.3);
                backdrop-filter: blur(10px);
                box-shadow: 0 20px 40px rgba(74, 222, 128, 0.2);
                transition: all 0.3s ease;
                cursor: pointer;
                aspect-ratio: 16/9;

                &:hover {
                    transform: translateY(-5px);
                    border-color: #4ade80;
                    box-shadow: 0 25px 50px rgba(74, 222, 128, 0.3);
                }

                /* Images dans les sections */
                img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    display: block;
                    transition: transform 0.3s ease;
                }

                /* Vidéos dans les sections */
                .section-video, video {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    display: block;
                    transition: transform 0.3s ease;
                    border-radius: 18px;
                }

                .media-caption {
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    right: 0;
                    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
                    color: white;
                    padding: 30px 20px 20px;
                    font-size: 0.9em;
                    text-align: center;
                    border-radius: 0 0 18px 18px;
                }

                /* Placeholder pour médias manquants dans les sections */
                .section-placeholder {
                    width: 100%;
                    height: 100%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    background: rgba(255, 255, 255, 0.05);
                    border: 2px dashed rgba(74, 222, 128, 0.3);
                    border-radius: 18px;
                    color: rgba(255, 255, 255, 0.6);
                    font-size: 1.2em;
                    text-align: center;
                }

                .video-controls {
                    position: absolute;
                    bottom: 10px;
                    left: 50%;
                    transform: translateX(-50%);
                    background: rgba(0, 0, 0, 0.7);
                    border-radius: 20px;
                    padding: 5px 15px;
                    opacity: 0;
                    transition: opacity 0.3s ease;
                }

                &:hover .video-controls {
                    opacity: 1;
                }
            }
        }

        /* Section Navigation */
        .navigation-section {
            padding: 60px 50px 100px;
            border-top: 1px solid rgba(74, 222, 128, 0.3);

            .nav-content {
                display: flex;
                justify-content: space-between;
                align-items: center;
                max-width: 1200px;
                margin: 0 auto;

                .btn-back,
                .btn-nav {
                    background: rgba(74, 222, 128, 0.1);
                    color: #4ade80;
                    border: 2px solid #4ade80;
                    padding: 15px 30px;
                    border-radius: 25px;
                    text-decoration: none;
                    font-weight: bold;
                    transition: all 0.3s ease;
                    text-transform: uppercase;
                    letter-spacing: 1px;

                    &:hover {
                        background: #4ade80;
                        color: #0f172a;
                        transform: translateY(-2px);
                        box-shadow: 0 10px 25px rgba(74, 222, 128, 0.4);
                    }
                }
            }
        }
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.1); 
    }
}

/* Responsive - Tablettes */
@media (max-width: 1024px) {
    body {
        .container {
            padding-top: 100px;

            .hero-section {
                grid-template-columns: 1fr;
                gap: 40px;
                padding: 0 30px 60px;

                .media-container {
                    aspect-ratio: 16/9;
                    margin-bottom: 20px;
                }

                .main-info {
                    .project-title {
                        font-size: 2.5em;
                        letter-spacing: 2px;
                    }
                }
            }

            .content-section {
                grid-template-columns: 1fr;
                gap: 40px;
                padding: 50px 30px;

                &.right-text {
                    .text-content {
                        order: 1;
                    }
                    .media-content {
                        order: 2;
                    }
                }

                .text-content {
                    h2 {
                        font-size: 2em;
                        letter-spacing: 1px;
                    }

                    .results-stats {
                        grid-template-columns: 1fr;
                        gap: 15px;
                    }
                }

                .media-content {
                    aspect-ratio: 16/9;
                    margin-bottom: 20px;
                }
            }

            .navigation-section {
                padding: 40px 30px 80px;

                .nav-content {
                    flex-direction: column;
                    gap: 20px;
                }
            }
        }
    }
}

/* Responsive - Mobiles */
@media (max-width: 768px) {
    body {
        .container {
            padding-top: 80px;

            .hero-section {
                padding: 0 20px 40px;
                gap: 30px;

                .media-container {
                    aspect-ratio: 16/9;
                    margin-bottom: 20px;
                }

                .main-info {
                    .project-title {
                        font-size: 2em;
                        letter-spacing: 1px;
                    }

                    .project-meta {
                        gap: 10px;

                        span {
                            font-size: 0.8em;
                            padding: 6px 12px;
                        }
                    }

                    .project-description {
                        font-size: 1em;
                    }

                    .additional-info {
                        font-size: 0.95em;
                    }
                }
            }

            .content-section {
                padding: 40px 20px;
                gap: 30px;

                .text-content {
                    h2 {
                        font-size: 1.6em;
                    }

                    p {
                        font-size: 1em;
                    }

                    .process-list li {
                        font-size: 1em;
                    }
                }

                .media-content {
                    aspect-ratio: 16/9;
                    margin-bottom: 20px;

                    .media-caption {
                        padding: 20px 15px 15px;
                        font-size: 0.8em;
                    }
                }
            }

            .navigation-section {
                padding: 30px 20px 60px;

                .nav-content {
                    .btn-back,
                    .btn-nav {
                        padding: 12px 25px;
                        font-size: 0.9em;
                    }
                }
            }
        }
    }
}

/* Responsive - Petits mobiles */
@media (max-width: 480px) {
    body {
        .container {
            .hero-section {
                padding: 0 15px 30px;

                .media-container {
                    aspect-ratio: 4/3;
                }

                .main-info {
                    .project-title {
                        font-size: 1.6em;
                        letter-spacing: 0.5px;
                    }

                    .project-meta {
                        flex-direction: column;
                        align-items: flex-start;
                    }
                }
            }

            .content-section {
                padding: 30px 15px;

                .text-content {
                    h2 {
                        font-size: 1.4em;
                    }

                    .results-stats {
                        .stat-item {
                            padding: 20px 10px;

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

                .media-content {
                    aspect-ratio: 4/3;
                }
            }

            .navigation-section {
                padding: 25px 15px 50px;

                .nav-content {
                    .btn-back,
                    .btn-nav {
                        padding: 10px 20px;
                        font-size: 0.85em;
                    }
                }
            }
        }
    }
}