:root {
    --primary-color: #ffb700;
    --secondary-color: #a57b00;
    --dark-color: #333;
    --light-color: #f9f9f9;
    --gray-color: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cinzel', sans-serif;
    color: var(--dark-color);
    background-color: #fff;
    line-height: 1.6;
}

/* Header Styles */
.media-header {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    color: white;
    padding: 30px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.media-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/bg-pattern-dark.png') repeat;
    opacity: 0.05;
    z-index: 0;
}

.header-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-title {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease-out;
}

.header-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #ddd;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 1.5s ease-out;
}

.social-section {
    margin-top: 40px;
    animation: fadeInUp 1s ease-out;
}

.social-title {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #bbb;
    display: inline-block;
    padding: 8px 25px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.social-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 183, 0, 0.2), transparent);
    transition: 0.5s;
}

.social-title:hover::after {
    left: 100%;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.social-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    text-decoration: none !important;
}

.social-icon i {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1));
    transform: translateZ(-1px);
}

.social-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.social-icon:hover {
    transform: translateY(-8px) rotate(5deg) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.social-icon:hover::after {
    transform: scale(1.1);
    opacity: 0;
}

.social-icon:hover i {
    transform: scale(1.2);
}

/* Effet de vague au survol */
.social-icon .wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: scale(0);
    opacity: 1;
    transition: all 0.6s ease-out;
}

.social-icon:hover .wave {
    transform: scale(2);
    opacity: 0;
}

/* Couleurs spécifiques pour chaque réseau */
.social-icon.facebook { 
    background: linear-gradient(135deg, #3b5998, #4c70ba); 
}

.social-icon.instagram { 
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); 
}

.social-icon.twitter { 
    background: linear-gradient(135deg, #1da1f2, #0096f2); 
}

.social-icon.whatsapp { 
    background: linear-gradient(135deg, #25d366, #128c7e); 
}

.social-icon.youtube { 
    background: linear-gradient(135deg, #ff0000, #cc0000); 
}

/* Animation de flottement */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.social-icon {
    animation: float 4s ease-in-out infinite;
}

.social-icon.facebook { animation-delay: 0.1s; }
.social-icon.instagram { animation-delay: 0.2s; }
.social-icon.twitter { animation-delay: 0.3s; }
.social-icon.whatsapp { animation-delay: 0.4s; }
.social-icon.youtube { animation-delay: 0.5s; }

/* Videos Section */
.videos-section {
    padding: 80px 0;
    background-color: var(--light-color);
    position: relative;
}

.videos-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/bg-pattern-light.png') repeat;
    opacity: 0.03;
    z-index: 0;
}

.videos-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 700px;
    margin: 0 auto;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.video-card {
    position: relative;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    cursor: pointer;
}

.video-card.visible {
    animation: cardEntrance 0.8s ease-out forwards;
}

.video-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    border-radius: 8px;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background 0.3s ease;
}

.video-thumbnail::after {
    content: '\f04b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3rem;
    z-index: 2;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 40px;
    opacity: 0.8;
    transition: all 0.3s;
    z-index: 2;
}

.video-card:hover .video-thumbnail::before {
    background: rgba(0, 0, 0, 0.5);
}

.video-card:hover .video-thumbnail::after,
.video-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

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

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    z-index: 3;
    font-weight: 600;
}

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

.video-player-container.show {
    opacity: 1;
    visibility: visible;
}

.video-player-wrapper {
    position: relative;
    width: 90%;
    max-width: 1200px;
}

.video-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.close-player {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.close-player:hover {
    color: var(--primary-color);
}

/* Pagination */
.pagination-container {
    margin-top: 40px;
}

/* .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
} */

.page-link {
    color: var(--dark-color);
    padding: 0.5rem 1rem;
}

.page-link:hover {
    color: var(--primary-color);
}

/* Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

/* Navigation entre catégories */
.category-nav {
    background-color: #f8f9fa ;
    padding: 15px 0 ;
    margin-bottom: 30px ;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) ;
}

.category-nav .nav-pills {
    display: flex ;
    flex-wrap: wrap ;
    justify-content: center;
    gap: 10px;
}

.category-nav .nav-pills .nav-link {
    border-radius: 20px ;
    padding: 8px 20px ;
    color: var(--dark-color) ;
    transition: all 0.1s ;
    font-weight: 500 ;
    border: 1px solid #dee2e6 
}

.category-nav .nav-pills .nav-link:hover {
    background-color: #e9ecef ;
    border-color: #dee2e6 ;
}

/* .category-nav .nav-pills .nav-link.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color) ;
    color: white ; 
}*/

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 1199.98px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 991.98px) {
    .header-title {
        font-size: 2.5rem;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .videos-grid {
        gap: 25px;
    }
    
    .social-icon {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }
    
    .video-player-wrapper {
        width: 95%;
    }
    
    .category-nav .nav-pills {
        gap: 8px ;
    }
    
    .category-nav .nav-pills .nav-link {
        padding: 6px 16px ;
        font-size: 0.9rem ;
    }
}

@media (max-width: 767.98px) {
    .media-header {
        padding: 25px 0;
    }
    
    .header-title {
        font-size: 2.2rem;
    }
    
    .header-subtitle {
        font-size: 1rem;
    }
    
    .videos-section {
        padding: 60px 0;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .social-icons {
        gap: 20px;
    }
    
    .social-icon {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .video-player-wrapper {
        width: 98%;
    }
    
    .close-player {
        top: -30px;
        font-size: 1.5rem;
    }
    
    .category-nav {
        padding: 10px 0 ;
    }
    
    .category-nav .nav-pills {
        gap: 6px ;
    }
    
    .category-nav .nav-pills .nav-link {
        padding: 5px 12px ;
        font-size: 0.8rem ;
    }
}

@media (max-width: 575.98px) {
    .header-title {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .social-icons {
        gap: 15px;
    }
    
    .social-icon {
        width: 45px ; 
        height: 45px ;
        font-size: 1.3rem ;
    }
    
    .category-nav .nav-pills {
        gap: 4px ;
    }
    
    .category-nav .nav-pills .nav-link {
        padding: 4px 10px ;
        font-size: 0.75rem ;
    }
    
    .category-badge {
        padding: 3px 8px ;
        font-size: 0.65rem ;
    }
}