:root {
    --yellow-pale: #FFF8DC;
    --pink-pale: #FFB6C1;
    --yellow-accent: #F0E68C;
    --pink-accent: #FF69B4;
    --color-yellow: #f5df2b;
    --color-pink: #ff66c4;
    --color-blue: #48abe0;
    --color-green: #48e049;
    --color-dark: #333;
    --color-light: #f8f9fa;
    --color-white: #ffffff;
    --color-ColorDblue: #0d1421;
    --gradient-primary: linear-gradient(135deg, var(--color-yellow) 0%, var(--color-pink) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--color-pink) 0%, var(--color-yellow) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/***********VIDEOS PAGE****************/

.videos-container {
    padding: 2rem 0;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid transparent;
    background: #e9ecef;
}

.video-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(245, 223, 43, 0.4);
    border-color: var(--color-yellow);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.video-thumbnail.loading img {
    opacity: 0.7;
}

/* Overlay play button */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover .video-play-overlay {
    opacity: 1;
}

.play-button {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.video-thumbnail:hover .play-button {
    transform: scale(1.1);
}

.play-button i {
    color: white;
    font-size: 24px;
    margin-left: 4px;
}

/* Titre des vidéos */
.video-title {
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-ColorDblue);
    text-align: center;
    line-height: 1.4;
    min-height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-item {
    margin-bottom: 2rem;
}

/* Modal vidéo personnalisé */
.modal-content {
    background: var(--color-ColorDblue) !important;
    border: none;
    box-shadow: 0 0 50px rgba(245, 223, 43, 0.3);
}

.modal-header {
    border-bottom: 1px solid var(--color-yellow);
}

.modal-title {
    color: var(--color-yellow) !important;
    font-weight: bold;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Contrôles de navigation vidéo */
.video-controls {
    position: relative;
    height: 0;
}

.video-control-prev,
.video-control-next {
    position: absolute;
    top: -280px; /* Centré sur la vidéo */
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.video-control-prev {
    left: 20px;
}

.video-control-next {
    right: 20px;
}

.video-control-prev:hover,
.video-control-next:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Compteur de vidéos */
.video-counter {
    position: absolute;
    top: -560px;
    right: 20px;
    background: rgba(245, 223, 43, 0.9);
    color: var(--color-ColorDblue);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

/* Animation de chargement */
.loading-placeholder {
    background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 991.98px) {
    .video-controls {
        display: none !important;
    }
    
    .video-thumbnail {
        height: 200px;
    }
    
    .video-title {
        font-size: 1rem;
        min-height: 2.4rem;
    }
}

@media (max-width: 575.98px) {
    .video-thumbnail {
        height: 180px;
    }
    
    .video-title {
        font-size: 0.9rem;
        min-height: 2rem;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
    }
    
    .play-button i {
        font-size: 18px;
    }
}

/* États d'erreur */
.video-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.video-thumbnail.error {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.video-thumbnail.error::after {
    content: "Vidéo indisponible";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #721c24;
    font-weight: bold;
}