@charset "UTF-8";

/* ========================================
   BANNIÈRE HERO EN ARRIÈRE-PLAN COMME AMAZON
   ======================================== */

.hero-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 755px; /* 155px header + 600px bannière */
    z-index: -1;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 155px; /* Sous le header */
    left: 0;
    width: 100%;
    height: 600px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; /* Priorité sur le haut de l'image */
}

/* Navigation du carrousel */
.hero-nav {
    position: absolute;
    top: 0;
    height: 100%;
    width: 15%;
    min-width: 80px;
    max-width: 150px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    outline: none;
    font-size: 24px;
    font-weight: bold;
    color: rgba(255,255,255,0.8);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
}

.hero-nav:focus {
    outline: none;
}

.hero-prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 5px;
}

.hero-next {
    right: 0;
    justify-content: flex-end;
    padding-right: 5px;
}

/* Touch/swipe pour mobile */
@media (pointer: coarse) {
    .hero-banner {
        cursor: grab;
    }
    
    .hero-banner:active {
        cursor: grabbing;
    }
}

/* ========================================
   LAYOUT PRINCIPAL
   ======================================== */

.main-content {
    position: relative;
    background: transparent;
}

.content-layout {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
    margin-top: 400px;
    position: relative;
    z-index: 1;
}

/* ========================================
   SECTIONS PRODUITS
   ======================================== */

.homepage-sections {
    padding: 50px 0;
    position: relative;
    background: #f8f9fa;
}

/* GRILLE FIXE - TOUJOURS 4 COLONNES */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-section {
    background: var(--color-white);
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.category-section h2 {
    font-size: 1.4rem;
    color: var(--color-primary);
    text-align: left;
    margin-bottom: 20px;
    font-weight: bold;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-accent);
}

/* ========================================
   IMAGE DE SECTION
   ======================================== */

.section-image {
    width: 100%;
    height: 250px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.section-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: var(--transition);
}

.section-image img:hover {
    transform: scale(1.02);
}

/* ========================================
   PIED DE SECTION
   ======================================== */

.section-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 15px;
}

.voir-plus {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 8px 20px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.voir-plus:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ========================================
   GESTION DES SECTIONS VIDES
   ======================================== */

.empty-sections {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    background: var(--color-white);
    border-radius: 8px;
    margin: 40px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.empty-sections h2 {
    color: #495057;
    margin-bottom: 15px;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

@media (max-width: 1400px) {
    .hero-banner {
        height: 635px; /* 155 + 480 */
    }
    
    .hero-slide {
        height: 480px;
    }
    
    .content-layout {
        max-width: 1200px;
        margin-top: 320px;
    }
    
    /* Passer à 3 colonnes */
    .sections-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .hero-banner {
        height: 555px; /* 155 + 400 */
    }
    
    .hero-slide {
        height: 400px;
    }
    
    .content-layout {
        margin-top: 280px;
    }
    
    /* Passer à 2 colonnes */
    .sections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .category-section {
        padding: 25px;
    }
    
    .category-section h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 900px) {
    .hero-banner {
        height: 438px; /* 188 + 250 */
    }
    
    .hero-slide {
        top: 188px;
    }
}

@media (max-width: 768px) {
    .hero-banner {
        height: 427px; /* 177 + 250 */
    }
    
    .hero-slide {
        top: 177px; /* Header mobile */
        height: 250px;
    }
    
    .content-layout {
        margin-top: 180px;
    }
    
    .hero-nav {
        width: 60px;
        min-width: 60px;
        font-size: 20px;
    }
    
    /* Une seule colonne sur mobile */
    .sections-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .homepage-sections {
        padding: 30px 0;
    }
    
    .category-section {
        padding: 25px;
    }
    
    .category-section h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 530px) {
    .hero-banner {
        height: 428px; /* 178 + 250 */
    }
    
    .hero-slide {
        top: 178px; /* Header très compact */
    }
}

@media (max-width: 480px) {
    .hero-banner {
        height: 368px; /* 168 + 200 */
    }
    
    .hero-slide {
        top: 168px;
        height: 200px;
    }
    
    .content-layout {
        margin-top: 140px;
    }
    
    .homepage-sections {
        padding: 20px 0;
    }

    .category-section {
        padding: 20px 15px;
    }

    .category-section h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 360px) {
    .hero-banner {
        height: 344px; /* 144 + 200 */
    }
    
    .hero-slide {
        top: 144px;
    }
}

@media (max-width: 320px) {
    .hero-banner {
        height: 338px; /* 138 + 200 */
    }
    
    .hero-slide {
        top: 138px;
    }
}

/* ========================================
   ANIMATIONS D'APPARITION
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section {
    animation: fadeInUp 0.6s ease-out both;
}

/* Délais échelonnés pour un effet de cascade */
.category-section:nth-child(1) { animation-delay: 0.1s; }
.category-section:nth-child(2) { animation-delay: 0.2s; }
.category-section:nth-child(3) { animation-delay: 0.3s; }
.category-section:nth-child(4) { animation-delay: 0.4s; }
.category-section:nth-child(5) { animation-delay: 0.5s; }
.category-section:nth-child(6) { animation-delay: 0.6s; }
.category-section:nth-child(7) { animation-delay: 0.7s; }
.category-section:nth-child(8) { animation-delay: 0.8s; }

.category-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}