/* Hero Carousel Ajusté - Navigation en dessous, Personnage fixe, Palette Jaune/Or */

:root {
    --hero-bg: #0a0a0a;
    --hero-surface: #1a1a1a;
    --hero-text: #ffffff;
    --hero-text-muted: #e5e5e5;
    --hero-primary: #fbbf24;        /* Jaune/Or principal */
    --hero-secondary: #f59e0b;      /* Or plus foncé */
    --hero-accent: #fcd34d;         /* Jaune clair */
    --hero-border: rgba(251, 191, 36, 0.2);
    --hero-shadow: rgba(0, 0, 0, 0.8);
    --hero-glow: rgba(251, 191, 36, 0.6);        /* Lueur jaune/or */
    --hero-glow-secondary: rgba(245, 158, 11, 0.4);
    --hero-transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset et base */
* {
    box-sizing: border-box;
}
a.slide-cta {
    color: #fff;  /* ou autre */
    text-decoration: none;
    font-weight: bold; /* optionnel */
    /* Autres styles... */
}

a.slide-cta:hover, a.slide-cta:focus {
    color: #ffd700; /* au survol */
}

/* Container principal avec espacement header */
.hero-carousel {
    width: 100vw;
    height: 400px;
    position: relative;
    overflow: visible;
    background: var(--hero-bg);
    margin: 8rem 0 0;
    padding: 0;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1800px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: visible;
}

/* Slides */
.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: var(--hero-transition);
    display: flex;
    align-items: center;
    border-radius: 12px;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Bannière de fond avec effet de survol */
.slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
    transition: var(--hero-transition);
    border-radius: 12px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.5) contrast(1.2) saturate(1.1);
    transition: all 0.6s ease-out;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Effet de survol sur le background */
.slide-background:hover .banner-image {
    transform: scale(1.05);
    filter: brightness(0.6) contrast(1.3) saturate(1.2);
}

.slide.active .banner-image {
    transform: scale(1.02);
}

/* Overlay avec dégradé optimisé */
.slide-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 1;
    transition: opacity 0.3s ease;
}

.slide-background:hover::after {
    opacity: 0.8;
}

/* Contenu du slide */
.slide-content {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 4rem;
    justify-content: flex-start;
}

.slide-info {
    flex: 1;
    max-width: clamp(240px, 25vw, 500px);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s ease-out 0.2s;
}

.slide.active .slide-info {
    transform: translateY(0);
    opacity: 1;
}

/* Titre avec couleurs jaune/or */
.slide-title {
    font-size: clamp(1.2rem, 2.2vw + 0.8rem, 2.5rem);
    font-weight: 700;
    color: var(--hero-text);
    margin: 0 0 1rem 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 12px var(--hero-shadow);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 95%;
    word-break: break-word;
}

/* Genres avec style jaune/or */
.slide-genres {
    display: flex;
    gap: clamp(0.4rem, 0.8vw, 0.75rem);
    margin-bottom: clamp(0.8rem, 1.5vw, 1.5rem);
    flex-wrap: wrap;
}


.genre-tag {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
    color: var(--hero-primary);
    padding: clamp(0.2rem, 0.3vw, 0.4rem) clamp(0.5rem, 0.8vw, 1rem);
    border-radius: 20px;
    font-size: clamp(0.55rem, 0.8vw, 0.85rem);
    font-weight: 600;
    border: 1px solid var(--hero-border);
    backdrop-filter: blur(10px);
    transition: var(--hero-transition);
    text-transform: capitalize;
}

.genre-tag:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.2));
    color: var(--hero-accent);
    border-color: rgba(251, 191, 36, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

/* Description optimisée */
.slide-description {
    color: var(--hero-text-muted);
    font-size: clamp(0.6rem, 0.9vw, 1rem);
    line-height: 1.5;
    margin-bottom: clamp(1rem, 2vw, 2rem);
    max-width: 100%;
    font-weight: 400;
    text-shadow: 0 2px 4px var(--hero-shadow);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}


/* Bouton d'action avec couleurs jaune/or */
.slide-cta {
    display: inline-flex;
    align-items: center;
    gap: clamp(0.3rem, 0.5vw, 0.5rem);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
    color: var(--hero-text);
    padding: clamp(0.4rem, 0.8vw, 0.875rem) clamp(0.8rem, 1.5vw, 1.75rem);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.65rem, 0.9vw, 0.95rem);
    transition: var(--hero-transition);
    border: 1px solid var(--hero-border);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}
.slide-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.2), transparent);
    transition: left 0.5s ease;
}

.slide-cta:hover::before {
    left: 100%;
}

.slide-cta:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.2));
    border-color: rgba(251, 191, 36, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

.slide-cta svg {
    transition: transform 0.3s ease;
}

.slide-cta:hover svg {
    transform: translateX(3px);
}


/* Personnage FIXE au bord bas qui sort du cadre */
.slide-character {
    position: absolute;
    right: 3%;
    bottom: 0;
    z-index: 10;
    max-width: 500px;
    height: auto;
    opacity: 0;
    transform: translateX(40px) scale(0.9);
    transition: all 1s ease-out 0.4s;
    pointer-events: none;
    overflow: visible;
}

.slide.active .slide-character {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.slide-character::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 106%;
    height: 106%;
    background: radial-gradient(
        ellipse at center bottom,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    transform: translateX(-50%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s ease;
    border-radius: 50%;
    filter: blur(8px);
    animation: shinePulse 3s ease-in-out infinite;
}

.slide.active .slide-character::before {
    opacity: 1;
}

@keyframes shinePulse {
    0% {
        background: radial-gradient(
            ellipse at center bottom,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 70%
        );
        transform: translateX(-50%) scale(1);
    }
    50% {
        background: radial-gradient(
            ellipse at center bottom,
            rgba(255, 255, 255, 0.2) 0%,
            transparent 70%
        );
        transform: translateX(-50%) scale(1.1);
    }
    100% {
        background: radial-gradient(
            ellipse at center bottom,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 70%
        );
        transform: translateX(-50%) scale(1);
    }
}

.character-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: none;
    filter: 
        brightness(1.1) 
        contrast(1.1) 
        saturate(1.05)
        drop-shadow(0 0 3px rgba(255, 255, 255, 0.6))
        drop-shadow(0 0 6px rgba(138, 117, 82, 0.4))
        drop-shadow(0 15px 35px rgba(0, 0, 0, 0.8));
}

.slide.active .character-image {
    animation: glowPulseGold 3s ease-in-out infinite;
}

/* Navigation EN DESSOUS du carrousel */
.carousel-navigation {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    backdrop-filter: blur(15px);
    border: 1px solid var(--hero-border);
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease;
}

.hero-carousel:hover .carousel-navigation,
.hero-carousel:focus-within .carousel-navigation {
    opacity: 1;
    bottom: 1.5rem;
}

.nav-arrow {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
    border: 1px solid var(--hero-border);
    color: var(--hero-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--hero-transition);
    backdrop-filter: blur(10px);
}

.nav-arrow:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.2));
    border-color: rgba(251, 191, 36, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-indicators {
    display: flex;
    gap: 0.75rem;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.3);
    cursor: pointer;
    transition: var(--hero-transition);
    position: relative;
}

.indicator.active {
    background: var(--hero-primary);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.indicator.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(251, 191, 36, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rippleGold 2s infinite;
}

@keyframes rippleGold {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.indicator:hover {
    background: rgba(251, 191, 36, 0.6);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .carousel-navigation {
        display: none;          
    }
}

@media (max-width: 480px) {
    .carousel-navigation {
        display: none;          
    }

}

/* Espacement pour la navigation en dessous */
.hero-carousel-wrapper {
    margin-bottom: 5rem;
}

@media (max-width: 480px) {
    .hero-carousel-wrapper {
        margin-bottom: 3rem;
    }
}

/* Responsive Design Optimisé */
@media (max-width: 1600px) {
    .hero-carousel {
        height: 380px;
        margin-top: 7rem;
    }
    .slide-character {
        max-width: 500px;
    }
    .slide-info {
        max-width: 450px;
    }
    .slide-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 1400px) {
    .hero-carousel {
        height: 350px;
        margin-top: 6rem;
    }
    .slide-character {
        max-width: 450px;
        right: 4%;
    }
    .slide-info {
        max-width: 400px;
    }
    .slide-title {
        font-size: 2rem;
    }
}

@media (max-width: 1200px) {
    .hero-carousel {
        height: 320px;
        margin-top: 5rem;
    }
    .slide-character {
        max-width: 400px;
        right: 3%;
    }
    .slide-content {
        padding: 0 1rem;
    }
    .slide-info {
        max-width: 350px;
    }
    .slide-title {
        font-size: 1.5rem;
    }
    .slide-genres {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    .genre-tag {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
    }
    .slide-description {
        font-size: 0.83rem;
        margin-bottom: 1rem;
        -webkit-line-clamp: 4;
    }
}

@media (max-width: 968px) {
    .hero-carousel {
        height: 280px;
        margin-top: 4rem;
    }
    .slide-character {
        max-width: 300px;
        right: 2%;
    }
    .slide-info {
        max-width: 280px;
    }
    .slide-title {
        font-size: 1.6rem;
    }
    .slide-description {
        font-size: 0.65rem;
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .hero-carousel {
        height: 250px;
        margin-top: 3rem;
    }
    .slide-character {
        max-width: 250px;
        right: 2%;
    }
    .slide-info {
        max-width: 220px;
    }
    .slide-title {
        font-size: 1.4rem;
    }
    .slide-description {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-carousel {
        height: 200px;
        margin-top: 2rem;
    }
    .slide-character {
        max-width: 200px;
        right: 1%;
    }
    .slide-info {
        max-width: 160px;
    }
    .slide-title {
        font-size: 1.2rem;
    }
    .slide-genres {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    .genre-tag {
        font-size: 0.4rem;
        padding: 0.25rem 0.5rem;
    }
    .slide-description {
        font-size: 0.53rem;
        max-width: 140px;
        margin-bottom: 1rem;
        -webkit-line-clamp: 3;
    }
    .slide-cta {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
        gap: 0.3rem;
    }
    .slide-cta:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    }
}

/* Préchargement et optimisation des images */
.slide-background img,
.character-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: optimizeQuality;
}

/* Animation de chargement */
.hero-carousel.loading {
    background: var(--hero-bg);
}

.hero-carousel.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(251, 191, 36, 0.2);
    border-top: 3px solid var(--hero-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 10;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Effet de focus pour l'accessibilité */
.nav-arrow:focus,
.indicator:focus,
.slide-cta:focus {
    outline: 2px solid var(--hero-primary);
    outline-offset: 2px;
}

/* Optimisations de performance */
.slide {
    will-change: opacity, transform;
}

.slide-character {
    will-change: opacity, transform;
}

.banner-image {
    will-change: transform, filter;
}