/* Fichier : assets/css/components/offres-browser-fixes.css */
/* Corrections spécifiques pour la compatibilité cross-browser du carrousel des offres */

/* Corrections pour Internet Explorer */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .carousel-track {
        display: flex !important;
        transform: none !important;
    }
    
    .carousel-track .offer-card {
        width: 23% !important;
        margin-right: 2% !important;
        flex: 0 0 23% !important;
    }
    
    .carousel-track .offer-card.popular {
        width: 23.5% !important;
    }
    
    /* Forcer l'ordre d'affichage */
    .carousel-track .offer-card:nth-child(1) { order: 1; }
    .carousel-track .offer-card:nth-child(2) { order: 2; }
    .carousel-track .offer-card:nth-child(3) { order: 3; }
    .carousel-track .offer-card:nth-child(4) { order: 4; }
}

/* Corrections pour Edge Legacy */
@supports (-ms-ime-align:auto) {
    .carousel-track {
        display: flex !important;
        flex-wrap: nowrap !important;
    }
    
    .offer-card {
        width: calc(25% - 15px) !important;
        flex: 0 0 calc(25% - 15px) !important;
    }
    
    /* Forcer l'ordre d'affichage */
    .carousel-track .offer-card:nth-child(1) { order: 1; }
    .carousel-track .offer-card:nth-child(2) { order: 2; }
    .carousel-track .offer-card:nth-child(3) { order: 3; }
    .carousel-track .offer-card:nth-child(4) { order: 4; }
}

/* Corrections pour Firefox */
@-moz-document url-prefix() {
    .carousel-track {
        display: flex !important;
        flex-wrap: nowrap !important;
    }
    
    .offer-card {
        flex: 0 0 calc(25% - 15px) !important;
        width: calc(25% - 15px) !important;
    }
    
    /* Forcer l'ordre d'affichage */
    .carousel-track .offer-card:nth-child(1) { order: 1; }
    .carousel-track .offer-card:nth-child(2) { order: 2; }
    .carousel-track .offer-card:nth-child(3) { order: 3; }
    .carousel-track .offer-card:nth-child(4) { order: 4; }
}

/* Corrections pour Safari */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) {
        .carousel-track {
            display: -webkit-box !important;
            -webkit-box-orient: horizontal !important;
        }
        
        .offer-card {
            width: calc(25% - 15px) !important;
            margin-right: 15px;
        }
        
        /* Forcer l'affichage des 4 premières cartes */
        .offer-card:nth-child(n+5) {
            display: none;
        }
    }
}

/* Hack pour forcer l'ordre sur tous les navigateurs */
.carousel-track .offer-card[data-title="Découverte"] { order: 1; }
.carousel-track .offer-card[data-title="Auteur"] { order: 2; }
.carousel-track .offer-card[data-title="Éditeur"] { order: 3; }
.carousel-track .offer-card[data-title="Entreprise"] { order: 4; }
.carousel-track .offer-card[data-title="Premium"] { order: 5; }
.carousel-track .offer-card[data-title="Libraire"] { order: 6; }
.carousel-track .offer-card[data-title="Étudiant"] { order: 7; }
.carousel-track .offer-card[data-title="Annuelle"] { order: 8; }
