/**
 * Bloc Hero - Bannière principale
 * Styles pour carousel et vidéo
 */

 .sp-hero {
    position: relative;
    height: var(--sp-hero-height);
    min-height: var(--sp-hero-min-height);
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 90px;
}

/* === MÉDIA HERO === */
.sp-hero-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.sp-hero-image,
.sp-hero-video-local {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* === CAROUSEL === */
.sp-hero-carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.sp-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.sp-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.sp-carousel-slide.sp-active {
    opacity: 1;
}

.sp-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation carousel */
.sp-carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    padding: 0 var(--sp-space-lg);
    transform: translateY(-50%);
    pointer-events: none;
}

.sp-carousel-prev,
.sp-carousel-next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--sp-white);
    border: 2px solid var(--sp-gold);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--sp-transition-normal);
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.sp-carousel-prev:hover,
.sp-carousel-next:hover {
    background: var(--sp-gold);
    color: var(--sp-black);
    transform: scale(1.1);
}

.sp-carousel-prev:active,
.sp-carousel-next:active {
    transform: scale(0.95);
}

/* Indicateurs */
.sp-carousel-indicators {
    position: absolute;
    bottom: var(--sp-space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--sp-space-sm);
    z-index: 10;
}

.sp-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--sp-white);
    background: transparent;
    cursor: pointer;
    transition: var(--sp-transition-normal);
    opacity: 0.7;
}

.sp-carousel-dot.sp-active,
.sp-carousel-dot:hover {
    background: var(--sp-gold);
    border-color: var(--sp-gold);
    opacity: 1;
    transform: scale(1.2);
}

/* === VIDÉO === */
.sp-hero-video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.sp-video-embed,
.sp-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

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

.sp-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--sp-gold);
    border: 3px solid var(--sp-gold);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--sp-transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 5;
}

.sp-video-play:hover {
    background: var(--sp-gold);
    color: var(--sp-black);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.sp-video-play:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.sp-video-play svg {
    margin-left: 5px; /* Centrage visuel du triangle */
}

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

/* === OVERLAY === */
.sp-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--sp-gradient-overlay);
    z-index: 2;
}

/* === CONTENU === */
.sp-hero-content {
    position: relative;
    z-index: 10;
    color: var(--sp-white);
    text-align: center;
    width: 100%;
    padding: var(--sp-space-xl) 0;
}

.sp-hero-text {
    max-width: 800px;
    margin: 0 auto;
}

.sp-hero-title {
    font-size: var(--sp-font-5xl);
    font-weight: var(--sp-font-bold);
    color: var(--sp-white);
    margin-bottom: var(--sp-space-lg);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.sp-hero-subtitle {
    font-size: var(--sp-font-xl);
    font-weight: var(--sp-font-normal);
    color: var(--sp-white);
    margin-bottom: var(--sp-space-2xl);
    opacity: 0.9;
    line-height: var(--sp-leading-relaxed);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.sp-hero-cta {
    margin-top: var(--sp-space-2xl);
}

.sp-btn-hero {
    padding: var(--sp-space-lg) var(--sp-space-2xl);
    font-size: var(--sp-font-lg);
    font-weight: var(--sp-font-semibold);
    border-radius: var(--sp-border-radius-lg);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--sp-shadow-lg);
    position: relative;
    overflow: hidden;
}

.sp-btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sp-btn-hero:hover::before {
    left: 100%;
}

/* === INDICATEUR DE SCROLL === */
.sp-hero-scroll-indicator {
    position: absolute;
    bottom: var(--sp-space-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.sp-scroll-down {
    background: transparent;
    border: 2px solid var(--sp-white);
    color: var(--sp-white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--sp-transition-normal);
    animation: sp-bounce 2s infinite;
}

.sp-scroll-down:hover {
    background: var(--sp-white);
    color: var(--sp-black);
    transform: translateX(-50%) scale(1.1);
}

/* === ANIMATIONS === */
@keyframes sp-hero-fade-in {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sp-hero-title {
    animation: sp-hero-fade-in 1s ease-out 0.3s both;
}

.sp-hero-subtitle {
    animation: sp-hero-fade-in 1s ease-out 0.6s both;
}

.sp-hero-cta {
    animation: sp-hero-fade-in 1s ease-out 0.9s both;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .sp-carousel-nav {
        padding: 0 var(--sp-space-md);
    }
    
    .sp-carousel-prev,
    .sp-carousel-next {
        width: 45px;
        height: 45px;
    }
    
    .sp-video-play {
        width: 80px;
        height: 80px;
    }
    
    .sp-video-play svg {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .sp-hero {
        height: 70vh;
        min-height: 400px;
    }
    
    .sp-hero-title {
        font-size: var(--sp-font-4xl);
        margin-bottom: var(--sp-space-md);
    }
    
    .sp-hero-subtitle {
        font-size: var(--sp-font-lg);
        margin-bottom: var(--sp-space-xl);
    }
    
    .sp-btn-hero {
        padding: var(--sp-space-md) var(--sp-space-xl);
        font-size: var(--sp-font-base);
    }
    
    .sp-carousel-nav {
        padding: 0 var(--sp-space-sm);
    }
    
    .sp-carousel-prev,
    .sp-carousel-next {
        width: 40px;
        height: 40px;
    }
    
    .sp-video-play {
        width: 70px;
        height: 70px;
    }
    
    .sp-video-play svg {
        width: 40px;
        height: 40px;
    }
    
    .sp-carousel-indicators {
        bottom: var(--sp-space-lg);
    }
    
    .sp-hero-scroll-indicator {
        bottom: var(--sp-space-lg);
    }
}

@media (max-width: 480px) {
    .sp-hero {
        height: 60vh;
        min-height: 350px;
    }
    
    .sp-hero-content {
        padding: var(--sp-space-lg) 0;
    }
    
    .sp-hero-title {
        font-size: var(--sp-font-3xl);
    }
    
    .sp-hero-subtitle {
        font-size: var(--sp-font-base);
    }
    
    .sp-btn-hero {
        width: 100%;
        max-width: 280px;
    }
    
    .sp-carousel-nav {
        display: none;
    }
    
    .sp-video-play {
        width: 60px;
        height: 60px;
    }
    
    .sp-video-play svg {
        width: 32px;
        height: 32px;
    }
}

/* === ACCESSIBILITÉ === */
@media (prefers-reduced-motion: reduce) {
    .sp-carousel-slide {
        transition: none;
    }
    
    .sp-hero-title,
    .sp-hero-subtitle,
    .sp-hero-cta {
        animation: none;
    }
    
    .sp-scroll-down {
        animation: none;
    }
    
    .sp-btn-hero::before {
        display: none;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .sp-carousel-dot {
        border-color: var(--sp-gray-light);
    }
    
    .sp-scroll-down {
        border-color: var(--sp-gray-light);
        color: var(--sp-gray-light);
    }
    
    .sp-scroll-down:hover {
        background: var(--sp-gray-light);
        color: var(--sp-black);
    }
}
/* === AJOUTS CSS POUR LES VIDÉOS LOCALES === */

/* Vidéo locale cachée (pour l'option avec bouton play) */
.sp-hero-video-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    pointer-events: none;
}

/* Vidéo locale active */
.sp-hero-video-local {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none; /* Empêche les clics sur la vidéo */
}

/* Wrapper pour vidéo locale avec bouton play */
.sp-video-local-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Masquer les contrôles natifs sur tous les navigateurs */
.sp-hero-video-local::-webkit-media-controls {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

.sp-hero-video-local::-webkit-media-controls-panel {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

.sp-hero-video-local::-webkit-media-controls-start-playback-button {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

.sp-hero-video-local::-moz-media-controls {
    display: none !important;
}

.sp-hero-video-local::--webkit-media-controls-overlay-play-button {
    display: none !important;
}

/* Styles spécifiques pour assurer que la vidéo n'affiche aucun contrôle */
.sp-hero-video-local[controls] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.sp-hero-logo{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    margin-bottom: 2%;
 
}
.sp-hero-logo img{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50%;
    height: auto;
    margin-bottom: 2%;
 
}

/* Responsive pour les vidéos locales */
@media (max-width: 768px) {
    .sp-hero-logo img{
        width: 35%;
    }
    .sp-hero-video-local {
        /* Assurer la compatibilité mobile */
        -webkit-playsinline: true;
        playsinline: true;
    }
}

/* Fallback pour les navigateurs qui ne supportent pas l'autoplay */
@media (prefers-reduced-motion: reduce) {
    .sp-hero-video-local {
        /* Arrêter l'autoplay si l'utilisateur préfère moins d'animations */
        autoplay: false;
    }
    
    .sp-hero-logo-img {
        animation: none;
    }
}