/**
 * Styles pour le module Catalogues Display
 * Path: modules/pscataloguesdisplay/views/css/front.css
 */

.catalogues-section {
    padding: 60px 0;
    background-color: #f5f5f5;
}

.catalogues-section .section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* .catalogues-section .section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #00873e, #3498db);
    margin: 20px auto 0;
} */

.catalogues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .catalogues-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
}

.catalogue-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    aspect-ratio: 4 / 5;
}

.catalogue-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.catalogue-link {
    display: block;
    text-decoration: none;
    height: 100%;
    position: relative;
}

.catalogue-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalogue-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.catalogue-card:hover .catalogue-image img {
    transform: scale(1.05);
}

.catalogue-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.catalogue-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.catalogue-arrow {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.catalogue-card:hover .catalogue-arrow {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transform: rotate(90deg);
}

.catalogues-cta {
    text-align: center;
    margin-top: 40px;
}

.btn-catalogues {
    display: inline-block;
    padding: 16px 40px;
    background-color: #00873e;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 135, 62, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-catalogues:hover {
    background-color: #006b31;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 135, 62, 0.4);
    color: #fff;
}

/* Animations d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.catalogue-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.catalogue-card:nth-child(1) { animation-delay: 0.1s; }
.catalogue-card:nth-child(2) { animation-delay: 0.2s; }
.catalogue-card:nth-child(3) { animation-delay: 0.3s; }
.catalogue-card:nth-child(4) { animation-delay: 0.4s; }

/* Support pour plus de 4 éléments */
.catalogue-card:nth-child(n+5) {
    animation-delay: 0.5s;
}

/* Responsive */
@media (max-width: 1200px) {
    .catalogues-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .catalogues-section {
        padding: 40px 0;
    }
    
    .catalogues-section .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .catalogue-title {
        font-size: 16px;
    }
    
    .btn-catalogues {
        padding: 14px 30px;
        font-size: 14px;
    }
}