/**
 * Bloc Texte + Vidéo
 * Styles pour section avec vidéo gauche/droite
 */

 .sp-texte-video {
    padding: var(--sp-section-padding);
    position: relative;
    overflow: hidden;
}

.sp-texte-video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-space-5xl);
    align-items: center;
    max-width: var(--sp-container-xl);
    margin: 0 auto;
}

/* === CONTENU TEXTE === */
.sp-texte-video .sp-texte-content {
    position: relative;
    z-index: 2;
}

.sp-texte-video .sp-texte-wrapper {
    max-width: 500px;
}

.sp-video-droite .sp-texte-wrapper {
    margin-left: 0;
    margin-right: auto;
}

.sp-video-gauche .sp-texte-wrapper {
    margin-left: auto;
    margin-right: 0;
}

.sp-texte-video .sp-texte-title {
    font-size: var(--sp-font-4xl);
    font-weight: var(--sp-font-bold);
    color: var(--sp-black);
    margin-bottom: var(--sp-space-lg);
    position: relative;
}

.sp-texte-video .sp-texte-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--sp-gradient-secondary);
    border-radius: var(--sp-border-radius);
}

.sp-video-gauche .sp-texte-title::after {
    left: auto;
    right: 0;
}

.sp-texte-video .sp-texte-body {
    font-size: var(--sp-font-lg);
    line-height: var(--sp-leading-relaxed);
    color: var(--sp-gray-dark);
}

.sp-texte-video .sp-texte-body p {
    margin-bottom: var(--sp-space-md);
    line-height: 1.5;
}

.sp-texte-video .sp-texte-body p:last-child {
    margin-bottom: 0;
}

.sp-texte-video .sp-texte-body strong {
    color: var(--sp-gold-dark);
    font-weight: var(--sp-font-semibold);
}

.sp-texte-video .sp-texte-body a {
    color: var(--sp-gold-dark);
    text-decoration: underline;
    text-decoration-color: var(--sp-gold-light);
    text-underline-offset: 3px;
    transition: var(--sp-transition-normal);
}

.sp-texte-video .sp-texte-body a:hover {
    color: var(--sp-gold);
    text-decoration-color: var(--sp-gold);
}

/* === CONTENU VIDÉO === */
.sp-video-content {
    position: relative;
}

.sp-video-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--sp-border-radius-lg);
    box-shadow: var(--sp-shadow-lg);
    background: var(--sp-black);
}

/* Ratios vidéo */
.sp-video-16-9 .sp-video-wrapper {
    aspect-ratio: 16 / 9;
}

.sp-video-4-3 .sp-video-wrapper {
    aspect-ratio: 4 / 3;
}

.sp-video-21-9 .sp-video-wrapper {
    aspect-ratio: 21 / 9;
}

.sp-video-1-1 .sp-video-wrapper {
    aspect-ratio: 1 / 1;
}

/* Hover effect sur la vidéo */
.sp-video-wrapper:hover {
    /* transform: translateY(-5px); */
    /* box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2); */
}

/* === VIDÉOS INTÉGRÉES (YouTube, Vimeo) === */
.sp-video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sp-video-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* === VIDÉOS LOCALES === */
.sp-video-local {
    position: relative;
    width: 100%;
    height: 100%;
}

.sp-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay pour contrôles personnalisés */
.sp-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.sp-video-playing .sp-video-overlay {
    opacity: 0;
    pointer-events: none;
}

.sp-play-button {
    background: rgba(255, 215, 0, 0.95);
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--sp-black);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.sp-play-button:hover {
    background: var(--sp-gold);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.sp-play-icon {
    margin-left: 3px; /* Centrage visuel */
}

/* === ORDRE DES ÉLÉMENTS === */
.sp-video-droite .sp-texte-content {
    order: 1;
}

.sp-video-droite .sp-video-content {
    order: 2;
}

.sp-video-gauche .sp-texte-content {
    order: 2;
}

.sp-video-gauche .sp-video-content {
    order: 1;
}

/* === CTA SIMPLE CENTRÉ === */
.sp-texte-video .sp-texte-cta-simple {
    margin-top: var(--sp-space-2xl);
    text-align: center;
}

.sp-texte-video .sp-btn-cta-simple {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-space-sm);
    padding: var(--sp-space-md) var(--sp-space-xl);
    background: var(--sp-gold);
    color: var(--sp-black);
    border: none;
    border-radius: var(--sp-border-radius);
    font-size: var(--sp-font-base);
    font-weight: var(--sp-font-medium);
    text-decoration: none;
    transition: all var(--sp-transition-normal);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sp-texte-video .sp-btn-cta-simple:hover {
    background: var(--sp-black);
    color: var(--sp-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.sp-texte-video .sp-btn-cta-simple .sp-btn-icon {
    width: 16px;
    height: 16px;
    transition: transform var(--sp-transition-normal);
}

.sp-texte-video .sp-btn-cta-simple:hover .sp-btn-icon {
    transform: translateX(3px);
}

.sp-texte-video .sp-btn-cta-simple:focus {
    outline: 2px solid var(--sp-gold);
    outline-offset: 2px;
}

/* === ÉLÉMENT DÉCORATIF === */
.sp-texte-video .sp-decorative-element {
    position: absolute;
    top: 20%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.1;
}

.sp-video-droite .sp-decorative-element {
    right: -50px;
}

.sp-video-gauche .sp-decorative-element {
    left: -50px;
}

.sp-texte-video .sp-decoration-svg {
    color: var(--sp-gold);
    animation: sp-rotate 20s linear infinite;
}

/* === ANIMATIONS === */
@keyframes sp-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes sp-slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes sp-slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sp-texte-video .sp-texte-content {
    animation: sp-slide-in-left 0.8s ease-out;
}

.sp-texte-video .sp-video-content {
    animation: sp-slide-in-right 0.8s ease-out;
}

.sp-video-gauche .sp-texte-content {
    animation: sp-slide-in-right 0.8s ease-out;
}

.sp-video-gauche .sp-video-content {
    animation: sp-slide-in-left 0.8s ease-out;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .sp-texte-video-grid {
        gap: var(--sp-space-4xl);
    }
    
    .sp-texte-video .sp-texte-title {
        font-size: var(--sp-font-3xl);
    }
    
    .sp-texte-video .sp-texte-body {
        font-size: var(--sp-font-base);
    }
}

@media (max-width: 768px) {
    .sp-texte-video {
        padding: var(--sp-section-padding-sm);
    }
    
    .sp-texte-video-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-space-3xl);
        text-align: center;
    }
    
    .sp-texte-video .sp-texte-wrapper {
        max-width: none;
        margin: 0 auto;
    }
    
    .sp-video-droite .sp-texte-wrapper,
    .sp-video-gauche .sp-texte-wrapper {
        margin: 0 auto;
    }
    
    .sp-texte-video .sp-texte-title::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .sp-video-gauche .sp-texte-title::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .sp-texte-content,
    .sp-video-content {
        order: initial;
    }
    
    .sp-video-gauche .sp-texte-content,
    .sp-video-gauche .sp-video-content {
        order: initial;
    }
    
    .sp-texte-video .sp-decorative-element {
        display: none;
    }
    
    .sp-play-button {
        width: 60px;
        height: 60px;
    }
    
    .sp-play-icon {
        width: 40px;
        height: 40px;
    }
    
    /* Animation mobile */
    .sp-texte-video .sp-texte-content,
    .sp-texte-video .sp-video-content {
        animation: sp-slide-up 0.8s ease-out;
    }
    
    .sp-video-gauche .sp-texte-content,
    .sp-video-gauche .sp-video-content {
        animation: sp-slide-up 0.8s ease-out;
    }
}

@keyframes sp-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .sp-texte-video-grid {
        gap: var(--sp-space-2xl);
    }
    
    .sp-texte-video .sp-texte-title {
        font-size: var(--sp-font-2xl);
        margin-bottom: var(--sp-space-md);
    }
    
    .sp-texte-video .sp-texte-body {
        font-size: var(--sp-font-sm);
    }
    
    .sp-video-wrapper {
        border-radius: var(--sp-border-radius);
    }
    
    .sp-play-button {
        width: 50px;
        height: 50px;
    }
    
    .sp-play-icon {
        width: 30px;
        height: 30px;
    }
}

/* === ACCESSIBILITÉ === */
@media (prefers-reduced-motion: reduce) {
    .sp-video-wrapper {
        transition: none;
    }
    
    .sp-video-overlay {
        transition: none;
    }
    
    .sp-texte-video .sp-decoration-svg {
        animation: none;
    }
    
    .sp-texte-video .sp-texte-content,
    .sp-texte-video .sp-video-content {
        animation: none;
    }
    
    .sp-video-gauche .sp-texte-content,
    .sp-video-gauche .sp-video-content {
        animation: none;
    }
}

/* === FOCUS ET INTERACTIONS === */
.sp-video-wrapper:focus-within {
    outline: 2px solid var(--sp-gold);
    outline-offset: 4px;
}

.sp-play-button:focus {
    outline: 2px solid var(--sp-white);
    outline-offset: 2px;
}

/* === PRINT === */
@media print {
    .sp-texte-video {
        page-break-inside: avoid;
    }
    
    .sp-texte-video .sp-decorative-element {
        display: none;
    }
    
    .sp-video-overlay {
        display: none;
    }
}

/* === ICÔNE PLAY CENTRÉE SUR VIDÉO === */

/* Conteneur pour l'icône play */
.sp-video-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    z-index: 10;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

/* Icône play (triangle) */
.sp-video-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-45%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent var(--sp-black);
    z-index: 11;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Animation au hover */
.sp-video-wrapper:hover::before {
    background: var(--sp-gold);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
}

.sp-video-wrapper:hover::after {
    border-color: transparent transparent transparent var(--sp-white);
}

/* Masquer l'icône quand la vidéo joue */
.sp-video-playing .sp-video-wrapper::before,
.sp-video-playing .sp-video-wrapper::after {
    opacity: 0;
}

/* Animation de pulsation (optionnelle) */
@keyframes sp-pulse-play {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
    }
}

.sp-video-wrapper::before {
    animation: sp-pulse-play 2s ease-in-out infinite;
}

/* Désactiver l'animation au hover */
.sp-video-wrapper:hover::before {
    animation: none;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .sp-video-wrapper::before {
        width: 60px;
        height: 60px;
    }
    
    .sp-video-wrapper::after {
        border-width: 12px 0 12px 20px;
    }
}

@media (max-width: 480px) {
    .sp-video-wrapper::before {
        width: 50px;
        height: 50px;
    }
    
    .sp-video-wrapper::after {
        border-width: 10px 0 10px 16px;
    }
}

/* === DÉSACTIVER SI PRÉFÉRENCE MOUVEMENT RÉDUIT === */
@media (prefers-reduced-motion: reduce) {
    .sp-video-wrapper::before {
        animation: none;
    }
}