/* ===============================================
   HERO SLIDER - Modern Design
   Bhubbles Homepage Header
   Image en fond + overlay blanc dégradé
   =============================================== */

/* CSS Variables */
:root {
    --hero-blue: #559DD3;
    --hero-text: #333333;
    --hero-cta: #559DD3;
    --hero-cta-hover: #4589C0;
    --hero-bullet: #D4943A;
    --hero-bullet-inactive: #E0E0E0;
    --hero-transition: 0.8s ease-in-out;
    --hero-autoplay-duration: 7s;
}

/* ========== MAIN CONTAINER ========== */
#homepage .hero-slider {
    position: relative;
    width: 100vw;
    min-height: 480px;
    overflow: hidden;
    margin-left: calc(-50vw + 50%);
    padding: 0;
    background: #ffffff;
}

/* ========== SLIDES - Position + Animations ========== */
#homepage .hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
}

#homepage .hero-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Animations keyframes */
@keyframes heroFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes heroFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

#homepage .hero-slide.fade-in {
    animation: heroFadeIn 1s ease-in-out forwards;
}

#homepage .hero-slide.fade-out {
    animation: heroFadeOut 1s ease-in-out forwards;
}

/* ========== SLIDE INNER - Image en fond ========== */
#homepage .hero-slide-inner {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Image de fond */
#homepage .hero-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 65%;
    height: 100%;
    z-index: 1;
}

#homepage .hero-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

#homepage .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right top;
}

/* Slide 2 - Image plus à droite */
#homepage .hero-slide[data-slide="1"] .hero-image {
    right: -10% !important;
    width: 55% !important;
}

#homepage .hero-slide[data-slide="1"] .hero-image img {
    object-position: 80% top !important;
}

/* ========== OVERLAY BLANC DÉGRADÉ ========== */
#homepage .hero-content {
    position: relative;
    z-index: 5;
    width: 75% !important;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 10% 60px 8%;
    box-sizing: border-box;
    /* Fond blanc dégradé vers la droite */
    background: linear-gradient(
        to right,
        #ffffff 0%,
        #ffffff 50%,
        rgba(255, 255, 255, 0.95) 65%,
        rgba(255, 255, 255, 0.7) 80%,
        rgba(255, 255, 255, 0) 100%
    );
}

/* ========== TITRE ========== */
#homepage .hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #186799;
    margin: 0 0 20px 0;
    padding: 0;
    background: none;
    width: 100%;
}

/* ========== SOUS-TITRE ========== */
#homepage .hero-subtitle {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(15px, 1.6vw, 17px);
    font-weight: 400;
    line-height: 1.65;
    color: var(--hero-text);
    margin: 0 0 28px 0;
    padding: 0;
    width: 100%;
}

/* ========== CTA BUTTON - Bleu arrondi ========== */
#homepage .hero-cta {
    display: flex;
    align-items: center;
}

#homepage .btn-hero-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 28px !important;
    background: var(--hero-cta) !important;
    color: #FFFFFF !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 25px !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(85, 157, 211, 0.3) !important;
    height: auto !important;
    line-height: normal !important;
    width: auto !important;
}

#homepage .btn-hero-primary:hover {
    background: var(--hero-cta-hover) !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(85, 157, 211, 0.4) !important;
}

#homepage .btn-hero-primary:active {
    transform: translateY(0);
}

#homepage .btn-hero-primary:focus {
    outline: none;
}

/* ========== NAVIGATION ARROWS - Desktop only ========== */
#homepage .hero-arrow {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#homepage .hero-arrow:focus {
    outline: none;
    border: none;
}

#homepage .hero-arrow i {
    font-size: 18px;
    color: #559DD3;
    font-weight: bold;
    transition: all 0.3s ease;
}

#homepage .hero-arrow:hover i {
    color: #4a8bc2;
    transform: scale(1.2);
}

@media (max-width: 767px) {
    #homepage .hero-arrow {
        display: none;
    }
}

/* ========== NAVIGATION BULLETS - Boules orange ========== */
#homepage .hero-nav {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

#homepage .hero-bullet {
    position: relative;
    width: 12px;
    height: 12px;
    background: var(--hero-bullet-inactive);
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 !important;
    box-shadow: none !important;
    overflow: visible;
}

#homepage .hero-bullet:hover {
    background: #ccc;
    transform: scale(1.1);
}

#homepage .hero-bullet:focus {
    outline: none;
}

#homepage .hero-bullet.active {
    background: var(--hero-bullet) !important;
    transform: scale(1.15);
}

/* Cacher le span progress car on utilise des boules simples */
#homepage .bullet-progress {
    display: none;
}

/* ========== DECORATIVE ELEMENTS - Masqués ========== */
#homepage .hero-decoration {
    display: none;
}

/* ========== ANIMATIONS ========== */
#homepage .hero-slide.active .hero-title {
    animation: fadeInUp 0.6s ease-out forwards;
}

#homepage .hero-slide.active .hero-subtitle {
    animation: fadeInUp 0.6s ease-out 0.1s forwards;
    opacity: 0;
}

#homepage .hero-slide.active .hero-cta {
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVE ========== */

/* Large screens */
@media (min-width: 1400px) {
    #homepage .hero-slide-inner {
        min-height: 520px;
    }

    #homepage .hero-content {
        min-height: 520px;
        padding-left: 10%;
    }

    #homepage .hero-title {
        font-size: 42px;
    }

    #homepage .hero-subtitle {
        font-size: 17px;
    }

    #homepage .btn-hero-primary {
        font-size: 17px !important;
        padding: 14px 32px !important;
    }
}

/* Ultra-wide screens (2K+) */
@media (min-width: 1800px) {
    #homepage .hero-slide-inner {
        min-height: 560px;
    }

    #homepage .hero-content {
        min-height: 560px;
        padding-left: 12%;
    }

    #homepage .hero-image {
        width: 70%;
    }

    #homepage .hero-slide[data-slide="1"] .hero-image {
        width: 60% !important;
        right: -5% !important;
    }
}

/* Medium screens */
@media (max-width: 1200px) {
    #homepage .hero-content {
        width: 70%;
        padding: 50px 6% 50px 6%;
    }

    #homepage .hero-image {
        width: 50%;
    }
}

/* Tablets */
@media (max-width: 991px) {
    #homepage .hero-slider {
        min-height: 400px;
    }

    #homepage .hero-slide-inner {
        min-height: 400px;
    }

    #homepage .hero-content {
        width: 65%;
        min-height: 400px;
        padding: 40px 4% 40px 5%;
        background: linear-gradient(
            to right,
            #ffffff 0%,
            #ffffff 40%,
            rgba(255, 255, 255, 0.9) 60%,
            rgba(255, 255, 255, 0.5) 80%,
            rgba(255, 255, 255, 0) 100%
        );
    }

    #homepage .hero-image {
        width: 60%;
    }

    #homepage .hero-title {
        font-size: 26px;
    }

    #homepage .hero-subtitle {
        font-size: 14px;
    }

    #homepage .hero-nav {
        bottom: 20px;
    }

    #homepage .hero-bullet {
        width: 10px;
        height: 10px;
    }
}

/* Mobile - Image en fond + texte sur carte blanche flottante */
@media (max-width: 767px) {
    #homepage .hero-slider {
        min-height: 560px;
    }

    #homepage .hero-slide-inner {
        min-height: 560px;
        flex-direction: column;
        position: relative;
        padding: 0;
    }

    /* Image en fond - hauteur fixe */
    #homepage .hero-image {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 320px;
        z-index: 1;
    }

    #homepage .hero-image-wrapper {
        height: 100%;
    }

    #homepage .hero-image img {
        object-position: right top;
        object-fit: cover;
        height: 100%;
    }

    /* Overlay sombre subtil sur l'image */
    #homepage .hero-image::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.15) 100%
        );
        pointer-events: none;
    }

    /* Carte blanche flottante - chevauche l'image */
    #homepage .hero-content {
        position: absolute;
        top: 250px;
        left: 50%;
        transform: translateX(-50%);
        width: 90% !important;
        min-height: auto;
        padding: 24px 20px 20px;
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
        text-align: center;
        z-index: 5;
    }

    #homepage .hero-title {
        font-size: 20px;
        max-width: 100%;
        margin-bottom: 10px;
        color: #186799;
    }

    #homepage .hero-subtitle {
        font-size: 15px;
        max-width: 100%;
        margin-bottom: 16px;
        line-height: 1.5;
        color: #555;
    }

    #homepage .hero-cta {
        justify-content: center;
    }

    #homepage .btn-hero-primary {
        padding: 11px 24px !important;
        font-size: 15px !important;
    }

    #homepage .hero-nav {
        bottom: 12px;
        gap: 8px;
        z-index: 10;
    }

    #homepage .hero-bullet {
        width: 10px;
        height: 10px;
        background: #ddd;
    }

    #homepage .hero-bullet.active {
        background: var(--hero-bullet) !important;
    }

    #homepage .hero-bullet:hover {
        background: #ccc;
    }

    #homepage .hero-slider {
        margin-bottom: 0;
    }

    /* Slide 2 - même traitement */
    #homepage .hero-slide[data-slide="1"] .hero-image {
        right: 0 !important;
        width: 100% !important;
    }

    #homepage .hero-slide[data-slide="1"] .hero-image img {
        object-position: center top !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    #homepage .hero-slider {
        min-height: 520px;
    }

    #homepage .hero-slide-inner {
        min-height: 520px;
    }

    #homepage .hero-image {
        height: 280px;
    }

    #homepage .hero-content {
        top: 220px;
        width: 92% !important;
        padding: 20px 16px 18px;
    }

    #homepage .hero-title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    #homepage .hero-subtitle {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 14px;
    }

    #homepage .btn-hero-primary {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }

    #homepage .hero-nav {
        bottom: 8px;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    /* Désactiver uniquement les animations du contenu, pas les transitions du slider */
    #homepage .hero-slide .hero-title,
    #homepage .hero-slide .hero-subtitle,
    #homepage .hero-slide .hero-cta {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
