/**
 * Portfolio Carousel - Styles
 * Carrousel de vidéos pour les témoignages
 */

.portfolio-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f1419 100%);
    position: relative;
    overflow: hidden;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(139,122,184,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(139,122,184,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(139,122,184,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(139,122,184,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(139,122,184,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 60px;
}

.portfolio-header h2 {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #8b7ab8, #a8a8d8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio-header .divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #8b7ab8, #a8a8d8);
    margin: 0 auto 30px;
    border-radius: 2px;
}

.portfolio-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Carrousel */
.portfolio-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 20px;
    max-width: 100%;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 30px;
    padding: 20px 0;
}

.video-card {
    flex: 0 0 min(350px, 90vw);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 122, 184, 0.3);
    border-color: #8b7ab8;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #000;
}

.video-thumbnail img,
.video-thumbnail .video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img,
.video-card:hover .video-thumbnail .video-preview {
    transform: scale(1.05);
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(139, 122, 184, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.video-card:hover .video-play-button {
    background: #8b7ab8;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.video-content {
    padding: 25px;
}

.video-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.4;
}

.video-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.video-meta i {
    color: #8b7ab8;
    margin-right: 5px;
}

/* Navigation */
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(139, 122, 184, 0.2);
    border: 2px solid #8b7ab8;
    color: #8b7ab8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.carousel-btn:hover {
    background: #8b7ab8;
    color: white;
    transform: scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.carousel-dots {
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #8b7ab8;
    transform: scale(1.2);
}

/* Modal vidéo */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-modal video {
    width: 100%;
    height: auto;
    max-height: 80vh;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-header h2 {
        font-size: 2.5rem;
    }

    .carousel-container {
        gap: 20px;
    }

    .video-card {
        flex: 0 0 280px;
    }

    .video-thumbnail {
        height: 160px;
    }

    .video-content {
        padding: 20px;
    }

    .video-title {
        font-size: 1.1rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .portfolio-section {
        padding: 60px 0;
    }

    .portfolio-header h2 {
        font-size: 2rem;
    }

    .video-card {
        flex: 0 0 250px;
    }

    .video-thumbnail {
        height: 140px;
    }

    .video-content {
        padding: 15px;
    }

    .video-title {
        font-size: 1rem;
    }

    .video-description {
        font-size: 0.9rem;
    }
}

/* Animation d'entrée */
.video-card {
    animation: fadeInUp 0.6s ease forwards;
}

.video-card:nth-child(1) {
    animation-delay: 0.1s;
}

.video-card:nth-child(2) {
    animation-delay: 0.2s;
}

.video-card:nth-child(3) {
    animation-delay: 0.3s;
}

.video-card:nth-child(4) {
    animation-delay: 0.4s;
}

.video-card:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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