/**
 * Styles Frontend - Gestion de Brochures
 */

/* === Wrapper principal === */
.brochures-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* === Section liste === */
.brochures-list-section {
    margin-bottom: 40px;
}

.brochures-list-section h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* === Catégories === */
.brochure-category {
    margin-bottom: 50px;
}

.category-title {
    font-size: 24px;
    color: #0073aa;
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 4px solid #0073aa;
}

.category-description {
    color: #666;
    margin-bottom: 20px;
    padding-left: 19px;
    font-style: italic;
}

/* === Grille de brochures === */
.brochures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.brochure-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.brochure-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* === Image === */
.brochure-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.brochure-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === Contenu === */
.brochure-content {
    padding: 20px;
}

.brochure-title {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

.brochure-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.brochure-description p {
    margin: 0 0 10px 0;
}

/* === Actions === */
.brochure-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 15px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-download:hover {
    background: #005a87;
    color: #fff;
}

.btn-download .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* === Sélecteur de quantité === */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.quantity-selector label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.brochure-quantity {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.brochure-quantity:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* === Résumé === */
.brochures-summary-section {
    margin-bottom: 40px;
}

.brochures-summary {
    background: #f0f8ff;
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 20px;
}

.brochures-summary h3 {
    margin: 0 0 15px 0;
    color: #0073aa;
    font-size: 20px;
}

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.summary-list li {
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.summary-list li:last-child {
    border-bottom: none;
}

.summary-total {
    font-size: 16px;
    margin: 15px 0 0 0;
    padding-top: 15px;
    border-top: 2px solid #0073aa;
}

.summary-total span {
    color: #0073aa;
    font-size: 18px;
}

/* === Section formulaire === */
.brochures-form-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.brochures-form-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

/* Masquer le champ de brochures dans le formulaire (visuellement) */
.brochures-hidden-field,
#field_22_999 {
    display: none !important;
}

/* === Responsive === */
@media (max-width: 768px) {
    .brochures-grid {
        grid-template-columns: 1fr;
    }
    
    .brochures-wrapper {
        padding: 15px;
    }
    
    .brochure-actions {
        gap: 8px;
    }
    
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .brochure-quantity {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .brochures-list-section h2 {
        font-size: 22px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    .brochure-title {
        font-size: 16px;
    }
}