/* Video Section Styles */
.video-presentation-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    font-family: 'Arial', sans-serif;
    display: block; /* Ensure block display to fill width */
}

.video-header {
    display: flex;
    flex-direction: column; /* Retour en colonne pour titre au-dessus du sous-titre */
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    width: 100%;
}

/* Responsive pour le header */
@media (max-width: 600px) {
    .video-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .find-more {
        align-self: flex-end;
    }
}

.video-header h2 {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
}

.video-subtitle {
    font-size: 14px;
    color: #666;
    margin-top: 2px;
}

/* Dark Mode Support */
body.options_dark_skin .video-header h2,
body.options_dark_skin .video-header .arrow {
    color: #fff;
}

body.options_dark_skin .video-subtitle {
    color: #ccc;
}

body.options_dark_skin .video-header {
    border-bottom: 1px solid #333;
}

.video-header .arrow {
    margin-left: 10px;
    font-size: 18px;
    color: #000;
}

.find-more {
    text-decoration: none;
    color: #000;
    font-weight: bold;
    display: flex;
    align-items: center;
    font-size: 14px;
    transition: color 0.3s;
}

.find-more:hover {
    color: #ff0000;
}

.find-more .arrow-circle {
    background-color: #ff0000;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s;
}

.find-more:hover .arrow-circle {
    transform: translateX(5px);
}

.video-content-wrapper {
    display: flex;
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    justify-content: center;
    width: 100%; /* Full width wrapper */
}

.main-video-area {
    width: 100%; /* Full width */
    max-width: 100%;
    background-color: #000;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    /* Border Radius for the player */
    border-radius: 15px;
}

.main-video-area iframe, .main-video-area #youtube-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Floating Player Styles */
body.is-floating-video .main-video-area {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px; /* Match ad width */
    max-width: 90vw;
    height: 180px; /* Fixed height match ad */
    padding-bottom: 0; /* Remove aspect ratio padding */
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px !important;
    animation: slideInRight 0.5s ease-out;
    overflow: hidden; /* Keep close button inside visually */
}

/* Ensure iframe respects border radius */
body.is-floating-video .main-video-area iframe,
body.is-floating-video .main-video-area #youtube-player {
    border-radius: 0; /* Let container handle radius via overflow hidden */
    width: 100%;
    height: 100%;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.floating-close-btn {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    font-size: 14px;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.floating-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: scale(1.1);
}

body.is-floating-video .floating-close-btn {
    display: flex;
}

/* Placeholder to prevent layout jump when video floats */
/* Le placeholder n'est plus utilisé car on cache tout le conteneur */
.video-placeholder {
    display: none;
}

body.is-floating-video .video-placeholder {
    display: none;
}

/* CTA Button for Floating Video */
.video-cta-btn {
    display: none;
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.video-cta-btn:hover {
    background: #2563eb;
    color: white;
}

body.is-floating-video .video-cta-btn {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .video-content-wrapper {
        flex-direction: column;
    }
    
    body.is-floating-video .main-video-area {
        width: 300px;
        padding-bottom: 168.75px; /* 16:9 of 300px */
        right: 10px;
        bottom: 10px;
        border-radius: 10px !important;
    }
    
    body.is-floating-video .main-video-area iframe,
    body.is-floating-video .main-video-area #youtube-player {
        border-radius: 6px;
    }
}
