/**
 * Video Consent Banner - RGPD Compliance with Axeptio
 * Bandeau de consentement pour les vidéos YouTube/Vimeo
 */

/* Container du placeholder vidéo */
.video-consent-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--color-dark) 0%, #1a1a1a 100%);
    border-radius: var(--rad-s);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
}

/* Motif de fond subtil */
.video-consent-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(44, 151, 170, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(244, 150, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Icône play barrée */
.video-consent-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

/* Contenu du bandeau */
.video-consent-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--gap-s);
    max-width: 400px;
}

/* Icône vidéo */
.video-consent-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-consent-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--color-light);
}

/* Badge de verrouillage */
.video-consent-icon::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    background: var(--color-secondary);
    border-radius: 50%;
    border: 2px solid var(--color-dark);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Titre du bandeau */
.video-consent-title {
    color: var(--color-light);
    font-size: var(--title-m);
    font-weight: 600;
    margin-bottom: 10px;
}

/* Description */
.video-consent-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: calc(var(--base) - 2px);
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Service (YouTube/Vimeo) */
.video-consent-service {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-size: calc(var(--base) - 4px);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.video-consent-service svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Bouton d'acceptation */
.video-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--color-primary);
    color: var(--color-light);
    border: none;
    border-radius: 50px;
    font-size: var(--base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.video-consent-btn:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 150, 0, 0.3);
}

.video-consent-btn:focus {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.video-consent-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Lien vers la politique de confidentialité */
.video-consent-link {
    display: block;
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: calc(var(--base) - 4px);
    text-decoration: underline;
    transition: color 0.3s ease;
}

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

/* Container de la vidéo (caché par défaut) */
.video-consent-wrapper .video-embed {
    display: none;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.video-consent-wrapper .video-embed iframe,
.video-consent-wrapper .video-embed video {
    width: 100%;
    height: 100%;
    border-radius: var(--rad-s);
}

/* État : consentement donné */
.video-consent-wrapper.consent-given .video-consent-placeholder {
    display: none;
}

.video-consent-wrapper.consent-given .video-embed {
    display: block;
}

/* Animation d'apparition */
.video-consent-wrapper.consent-given .video-embed {
    animation: videoFadeIn 0.5s ease-out;
}

@keyframes videoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media screen and (max-width: 767px) {
    .video-consent-content {
        padding: 15px;
    }

    .video-consent-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }

    .video-consent-icon svg {
        width: 22px;
        height: 22px;
    }

    .video-consent-icon::after {
        width: 18px;
        height: 18px;
        background-size: 11px;
    }

    .video-consent-title {
        font-size: calc(var(--title-m) - 4px);
    }

    .video-consent-description {
        font-size: calc(var(--base) - 3px);
    }

    .video-consent-btn {
        padding: 10px 20px;
        font-size: calc(var(--base) - 2px);
    }
}

/* Mode dans la modale testimony */
.testimony-video-modal .video-consent-placeholder {
    aspect-ratio: auto;
    min-height: 300px;
    height: 100%;
}

