/* 
 * Banner Slider - Styles optimisés
 * Réduction de la taille et optimisation des performances
 */

/* Styles de base */
body {
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* Styles des couleurs */
.u-c-blanc { color: #fff; }
.u-c-bleu-nuit { color: #145ce0; }
.u-c-noir { color: #000000; }
.u-c-rouge { color: #FF0004; }
.u-c-jaune { color: #ffd700; }
.u-c-bleu-violet { color: #0019D9; }
.u-c-bleu-clair { color: #003dfc; }
.u-c-bleu-pur { color: #0b2547; }

/* Structure des bannières - optimisé pour les performances */
.diapositive-hero {
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 0;
    padding-bottom: 38%;
    position: relative;
    display: block;
    background-color: #f0f0f0; /* Couleur de fond pendant le chargement */
    will-change: background-image; /* Optimisation GPU */
}

.conteneur-principal {
    max-width: 100%;
    width: 100%;
    margin: 20px auto 0;
    padding: 0 10px;
    margin-bottom: 0 !important;
    height: auto !important;
    overflow: hidden;
}

.banner {
    width: 100%;
    position: relative;
    margin-bottom: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1); /* Ombre réduite */
    border-radius: 8px;
    overflow: hidden;
}

.s-skeleton--h-640 {
    width: 100%;
}

.conteneur-cible {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.contenu-slider {
    padding: 2rem 1.5rem;
    max-width: 55%;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Styles des textes optimisés */
.banner-nom {
    font-size: 1.5rem;
    font-weight: 800;
    display: block;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Simplifié */
    opacity: 0;
    transform: translateX(-80px);
    animation: fadeInLeftRotate 0.8s ease forwards;
    animation-delay: 0.3s;
}

.banner-description {
    font-weight: 700;
    font-size: 3.8rem;
    display: block;
    font-family: 'Playfair Display', serif;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #ffffff; /* Remplacé le dégradé par une couleur solide */
    text-shadow: 0 2px 4px rgba(0,0,0,0.4); /* Ombre simplifiée */
    opacity: 0;
    transform: translateX(-80px);
    animation: fadeInLeftScale 1s ease-out forwards;
    animation-delay: 0.8s;
}

.banner-promo {
    display: inline-block;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    opacity: 0;
    transform: translateX(-60px);
    animation: fadeInLeftBounce 0.7s ease-out forwards;
    animation-delay: 1.4s;
    box-shadow: 0 3px 5px rgba(0,0,0,0.2); /* Ombre réduite */
}

.banner-offre {
    font-size: 2.8rem;
    font-weight: 800;
    display: block;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    color: #003dfc; /* Couleur solide au lieu du dégradé */
    text-shadow: 0 1px 2px rgba(0,0,0,0.3); /* Ombre simplifiée */
    opacity: 0;
    transform: translateX(-50px);
    animation: fadeInLeftUp 0.9s ease-out forwards;
    animation-delay: 2s;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.2;
}

.banner-prix {
    display: block;
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 25px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3); /* Simplifié */
    opacity: 0;
    transform: translateX(-40px);
    animation: fadeInLeftDown 0.7s ease-out forwards;
    animation-delay: 2.5s;
}

.btn-achat-promo {
    padding: 15px 35px;
    font-size: 1.15rem;
    position: relative;
    transition: all 0.3s ease; /* Simplifié */
    text-align: center;
    border-radius: 50px;
    display: inline-block;
    color: #ffffff;
    background-color: #2a7ae2; /* Dégradé remplacé par couleur unique */
    border: none;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2); /* Ombre réduite */
    letter-spacing: 1.5px;
    cursor: pointer;
    z-index: 2000;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.7s ease-out forwards;
    animation-delay: 3s;
}

.btn-achat-promo:hover {
    transform: translateY(-3px); /* Effet réduit */
    box-shadow: 0 5px 10px rgba(0,0,0,0.3); /* Ombre réduite */
    background-color: #1a5bb0; /* Couleur au survol */
}

.u-c-marque {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    color: #003dfc;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3); /* Simplifié */
    display: inline-block;
}

/* Animations simplifiées */
@keyframes fadeInLeftRotate {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeInLeftScale {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeInLeftBounce {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeInLeftUp {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeInLeftDown {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

/* Gestion du chargement des images */
.diapositive-hero.loading {
    background-image: none !important;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
    position: relative;
}

.diapositive-hero.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #2a7ae2;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Support des images responsive */
.diapositive-hero {
    /* L'image par défaut (small) est définie via le style inline */
}

/* Classe pour les images en cours de chargement */
.diapositive-hero.img-loading {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Classe pour les images chargées */
.diapositive-hero.img-loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Suppression des espaces en dessous des éléments du carousel */
.owl-carousel {
    margin-bottom: 0;
    display: block;
    line-height: 0;
}

.owl-carousel .owl-wrapper-outer {
    margin-bottom: 0;
    line-height: 0;
}

/* Ajout pour supprimer l'espace sous les bannières */
.banner, .s-skeleton, .s-skeleton--h-640 {
    line-height: 0;
    font-size: 0;
}

.conteneur-principal {
    line-height: 0;
    font-size: 0;
}

/* Rétablir le line-height pour le contenu texte */
.contenu-slider, 
.banner-nom, 
.banner-description, 
.banner-promo, 
.banner-offre, 
.banner-prix, 
.btn-achat-promo {
    line-height: normal;
    font-size: 16px; /* Base font size */
}

/* Style pour les points de navigation */
.owl-pagination {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
}

.owl-page span {
    display: block !important;
    width: 10px !important; /* Réduit */
    height: 10px !important; /* Réduit */
    margin: 5px 7px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 20px !important;
    transition: all 0.3s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important; /* Bordure réduite */
}

.owl-page.active span {
    background: rgba(42, 122, 226, 0.9) !important;
    width: 12px !important; /* Réduit */
    height: 12px !important; /* Réduit */
}

/* Boutons de navigation personnalisés */
.custom-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Améliorer les boutons de navigation */
.custom-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; /* Réduit */
    height: 40px; /* Réduit */
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    font-size: 18px; /* Réduit */
    line-height: 40px; /* Réduit */
    text-align: center;
    opacity: 0.7;
    transition: all 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
    z-index: 1010;
    display: block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Ombre réduite */
}

.custom-prev {
    left: 20px;
}

.custom-next {
    right: 20px;
}

/* Afficher les boutons au survol */
.banner:hover .custom-nav-btn,
.s-skeleton:hover .custom-nav-btn,
.owl-carousel:hover .custom-nav-btn {
    opacity: 0.7;
}

.custom-nav-btn:hover {
    opacity: 1;
    background-color: rgba(42, 122, 226, 0.8);
    transform: translateY(-50%) scale(1.05); /* Effet réduit */
}

/* S'assurer que les boutons restent visibles */
.banner .custom-nav-btn {
    display: block !important;
    opacity: 0.9 !important;
}

/* S'assurer que les contrôles de pagination sont visibles */
.owl-controls {
    position: absolute;
    bottom: 10px;
    width: 100%;
    z-index: 9;
}

.owl-pagination {
    z-index: 10;
    position: relative;
}

.owl-page span {
    background-color: rgba(255,255,255,0.7) !important;
    width: 10px !important; /* Réduit */
    height: 10px !important; /* Réduit */
}

/* Optimisations pour tous les écrans - Media queries optimisées et réduites */

/* Pour les très grands écrans (1366px et plus) */
@media (min-width: 1366px) {
    .diapositive-hero {
        padding-bottom: 38%;
    }
    
    .conteneur-principal {
        max-width: 1200px;
    }
    
    .contenu-slider {
        max-width: 90%;
        padding: 2rem 1.5rem;
    }
    
    .banner-nom {
        font-size: 1.5rem;
    }
    
    .banner-description {
        font-size: 3.5rem;
    }
    
    .banner-promo {
        font-size: 1.1rem;
    }
    
    .banner-offre {
        font-size: 2.5rem;
    }
    
    .banner-prix {
        font-size: 1.3rem;
    }
    
    .u-c-marque {
        font-size: 2rem;
    }
    
    .btn-achat-promo {
        font-size: 1.1rem;
    }
}

/* Pour les écrans de grande taille (1024px à 1365px) */
@media (min-width: 1024px) and (max-width: 1365px) {
    .diapositive-hero {
        padding-bottom: 40%;
    }
    
    .conteneur-principal {
        max-width: 90%;
    }
    
    .contenu-slider {
        max-width: 90%;
        padding: 1.5rem;
    }
    
    .banner-nom {
        font-size: 1.3rem;
    }
    
    .banner-description {
        font-size: 3rem;
    }
    
    .banner-promo {
        font-size: 1rem;
    }
    
    .banner-offre {
        font-size: 2.2rem;
    }
    
    .banner-prix {
        font-size: 1.2rem;
    }
    
    .u-c-marque {
        font-size: 1.8rem;
    }
    
    .btn-achat-promo {
        font-size: 1rem;
        padding: 12px 30px;
    }
}

/* Pour les écrans de taille moyenne (768px à 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .diapositive-hero {
        padding-bottom: 45%;
    }
    
    .conteneur-principal {
        max-width: 95%;
    }
    
    .contenu-slider {
        max-width: 60%;
        padding: 1.5rem;
    }
    
    .banner-description {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    .banner-offre {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }
    
    .banner-prix {
        margin-bottom: 15px;
    }
}

/* Pour les écrans de petite taille (480px à 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .diapositive-hero {
        padding-bottom: 100%;
    }
    
    .conteneur-cible {
        align-items: center;
    }
    
    .contenu-slider {
        max-width: 90%;
        padding: 1rem;
        margin: 0 auto;
        text-align: center;
        transform: none !important;
        perspective: none !important;
    }
    
    .banner-nom,
    .banner-description,
    .banner-promo,
    .banner-offre,
    .banner-prix,
    .btn-achat-promo {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* Pour les très petits écrans (moins de 480px) */
@media (max-width: 479px) {
    .diapositive-hero {
        padding-bottom: 56.25%;
        min-height: auto;
    }
    
    .conteneur-principal {
        margin: 0 auto;
        padding: 0;
        width: 100%;
    }
    
    .debug-info + .conteneur-principal,
    .debug-info + div .conteneur-principal {
        margin-top: 5px;
    }
    
    .conteneur-cible {
        align-items: flex-start;
        padding-top: 20px;
        z-index: 2;
        height: auto;
        min-height: auto;
    }
    
    .contenu-slider {
        max-width: 100%;
        padding: 0.5rem;
        margin: 0 auto;
        text-align: center;
        transform: none !important;
        perspective: none !important;
        z-index: 3;
    }
    
    .owl-carousel, 
    .owl-wrapper-outer, 
    .owl-wrapper,
    .owl-item,
    .item,
    .diapositive-hero,
    .s-skeleton,
    .banner {
        height: auto !important;
        min-height: auto !important;
        display: block !important;
    }
    
    .owl-item {
        float: left;
    }
    
    .item {
        height: auto !important;
        min-height: auto !important;
    }
    
    /* Styles simplifiés pour le mobile */
    .banner-nom,
    .banner-description,
    .banner-promo,
    .banner-offre,
    .banner-prix,
    .u-c-marque,
    .btn-achat-promo {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
        box-shadow: none !important;
    }
    
    .banner-nom {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .banner-description {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .banner-promo {
        font-size: 0.8rem;
        padding: 5px 10px;
        margin-bottom: 8px;
    }
    
    .banner-offre {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .banner-prix {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .u-c-marque {
        font-size: 1.2rem;
    }

    .btn-achat-promo {
        padding: 10px 20px;
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    /* Navigation mobile simplifiée */
    .custom-nav-btn {
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 16px;
        opacity: 0.8;
    }
    
    .custom-prev {
        left: 10px;
    }
    
    .custom-next {
        right: 10px;
    }
}

/* Correction radicale pour l'espace en dessous - version simplifiée */
body {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.owl-carousel,
.owl-wrapper-outer,
.owl-wrapper,
.owl-item,
.item,
.diapositive-hero,
.s-skeleton,
.banner,
.conteneur-principal {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    vertical-align: bottom !important;
    display: block !important;
}

/* Forcer la taille des éléments de pagination pour qu'ils n'ajoutent pas d'espace */
.owl-controls {
    position: absolute;
    bottom: 20px;
    width: 100%;
    height: 0;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

/* Correction pour le body et HTML */
html, body {
    overflow-x: hidden;
}

/* S'assurer que le conteneur principal est bien collé */
.conteneur-principal {
    margin-bottom: 0 !important;
    height: auto !important;
    overflow: hidden;
}

/* Assurez-vous que tous les éléments ont une hauteur exacte */
.banner, .s-skeleton {
    height: auto !important;
    display: block !important;
    font-size: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Style pour les messages de debug DB */
.debug-info {
    background: #ffcccb; 
    padding: 10px; 
    margin: 10px; 
    border: 1px solid red;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
    z-index: 100;
    position: relative;
}
