/**
 * Fichier CSS pour le layout de la page index.php
 * Date: 2026-01-05
 * 
 * Structure HTML:
 * <div class="product-container">
 *   <?php include 'sidebar-index.php'; ?>
 *   <div class="product-box">
 *     <?php include 'produits-du-moment.php'; ?>
 *     <div class="product-content">
 *       <?php include 'includes/offre-du-jour.php'; ?>
 *       <?php include 'grille-produits.php'; ?>
 *       <?php include 'temoignages-cta-services.php'; ?>
 *     </div>
 *   </div>
 *   <?php include 'blog-index.php'; ?>
 * </div>
 * </div>
 */

/* --------------------------------------------------------------
 * 1. CONTENEUR PRINCIPAL - product-container
 * --------------------------------------------------------------*/

.product-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
    background-color: #ffffff;
    border-radius: 8px;
    box-sizing: border-box;
}

/* --------------------------------------------------------------
 * 2. CONTENEUR DE CONTENU - product-box
 * --------------------------------------------------------------*/

.product-box {
    flex: 1;
    width: 75%;
    min-width: calc(75% - 15px);
    background-color: #ffffff;
    margin-left: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.07);
    box-sizing: border-box;
}

/* --------------------------------------------------------------
 * 3. CONTENEUR DE CONTENU INTÉRIEUR - product-content
 * --------------------------------------------------------------*/

.product-content {
    width: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
}

/* --------------------------------------------------------------
 * 4. SIDEBAR - sidebar-index
 * --------------------------------------------------------------*/

.sidebar-index {
    width: 25%;
    min-width: 250px;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.07);
    box-sizing: border-box;
}

/* --------------------------------------------------------------
 * RESPONSIVE DESIGN
 * --------------------------------------------------------------*/

/* Desktop Moyen (1024px à 1279.98px) : Proportions harmonieuses sans rupture */
@media (min-width: 1024px) and (max-width: 1279.98px) {
    .product-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px 12px !important;
        gap: 14px !important;
        box-sizing: border-box !important;
    }
    
    .sidebar-index,
    .sidebar.sidebar-modern-container {
        display: flex !important;
        flex-direction: column !important;
        position: static !important;
        visibility: visible !important;
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        left: auto !important;
        transform: none !important;
        box-sizing: border-box !important;
    }
    
    .product-box {
        flex: 1 1 0 !important;
        width: calc(100% - 274px) !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
        box-sizing: border-box !important;
    }

    .product-content {
        padding: 14px 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Tablette et mobile (< 1024px) */
@media (max-width: 1023.98px) {
    .product-container {
        flex-direction: column;
    }
    
    .product-box {
        width: 100%;
        margin-left: 0;
        margin-bottom: 20px;
    }
    
    .sidebar-index {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767.98px) {
    .product-container {
        padding: 10px;
    }
    
    .product-box {
        margin-left: 0;
    }
    
    .sidebar-index {
        width: 100%;
    }
}
