/**
 * CSS Frontend - Catégories Mises en Avant
 * Compatible avec le design moderne du site Meilleur Poêle
 */

/* Section principale */
.mp-featured-categories {
    padding: 30px 0;
    background-color: rgb(249, 250, 251);
}

/* Titre principal du bloc - style Tailwind équivalent */
.mp-featured-categories .section-title {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700; /* font-bold */
    text-align: center; /* text-center */
    margin-bottom: 2rem; /* mb-8 */
    line-height: 1.25;
    color: #000;
}

/* Responsive - md:text-3xl */
@media (min-width: 768px) {
    .mp-featured-categories .section-title {
        font-size: 1.875rem; /* text-3xl */
    }
}

/* Grille des catégories */
.categories-grid {
    margin: 0 -15px;
}

/* Carte de catégorie */
.category-card {
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.category-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.category-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Container d'image */
.category-image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Ratio 1:1 pour un carré */
    overflow: hidden;
}

.category-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image {
    transform: scale(1.05);
}

/* Overlay avec gradient */
.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-overlay {
    opacity: 0.9;
}

/* Contenu de la catégorie */
.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.category-title {
    font-size: 18px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    flex: 1;
    text-align: left;
    background: none;
}

.category-arrow {
    margin-left: 16px;
    opacity: 0.8;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.category-card:hover .category-arrow {
    opacity: 1;
    transform: translateX(4px);
}

.category-arrow svg {
    width: 24px;
    height: 24px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .category-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 991.98px) {
    .mp-featured-categories {
        padding: 40px 0;
    }
    
    .mp-featured-categories .section-title {
        margin-bottom: 2rem;
    }
    
    .category-content {
        padding: 20px;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 767.98px) {
    .mp-featured-categories {
        padding: 30px 0;
    }
    
    .category-content {
        padding: 16px;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .category-arrow svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 575.98px) {
    .category-content {
        padding: 14px;
    }
    
    .category-title {
        font-size: 1rem;
    }
    
    /* Optimisation pour l'affichage en deux colonnes sur mobile */
    .categories-grid {
        margin: 0 -8px;
    }
    
    .categories-grid .col-xs-6 {
        padding: 0 8px;
    }
    
    .categories-grid .col-xs-6 .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .category-content {
        padding: 12px;
    }
    
    .category-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .category-arrow svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .mp-featured-categories {
        padding: 30px 1rem;
    }
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card {
    animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }
.category-card:nth-child(7) { animation-delay: 0.7s; }
.category-card:nth-child(8) { animation-delay: 0.8s; }

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    .category-card,
    .category-image,
    .category-overlay,
    .category-arrow {
        animation: none;
        transition: none;
    }
    
    .category-card:hover {
        transform: none;
    }
    
    .category-card:hover .category-image {
        transform: none;
    }
    
    .category-card:hover .category-arrow {
        transform: none;
    }
} 