/* ============================================
   SÉLECTIONS QUOTIDIENNES HOMEPAGE
   - Carousel "Recettes du jour" (4 recettes)
   - Section "À la une de Savoor"
   
   @version 2.0
   @date 2026-01-21
   ============================================ */


/* ============================================
   CAROUSEL RECETTES DU JOUR
   ============================================ */

.recipes-carousel-container {
    position: relative;
    margin-bottom: 20px;
}

/* Carousel - scroll horizontal sur mobile */
.recipes-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 10px;
}

.recipes-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.recipes-carousel .recipe-card {
    flex: 0 0 calc(100% - 20px);
    scroll-snap-align: start;
    min-width: 280px;
}

/* Flèches de navigation */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carousel-arrow:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-arrow i {
    font-size: 1rem;
    color: #333;
}

.carousel-arrow-left {
    left: -10px;
}

.carousel-arrow-right {
    right: -10px;
}

/* Dots de pagination */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-dot.active {
    background: var(--primary-color, #FF6B6B);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: #bbb;
}

.carousel-dot.active:hover {
    background: var(--primary-color, #FF6B6B);
}


/* ============================================
   À LA UNE DE SAVOOR
   ============================================ */

.alaune-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

/* Article principal */
.alaune-main {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.alaune-main:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.alaune-main-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.alaune-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.alaune-main:hover .alaune-main-image img {
    transform: scale(1.05);
}

.alaune-main-content {
    padding: 20px;
}

.alaune-main-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
    margin: 10px 0;
    line-height: 1.3;
}

.alaune-main-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* Catégorie badge */
.alaune-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alaune-category-astuces {
    color: #f39c12;
}

.alaune-category-actualites {
    color: #3498db;
}

/* Articles secondaires */
.alaune-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.alaune-side-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.alaune-side-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alaune-side-image {
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
}

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

.alaune-side-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.alaune-side-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin: 6px 0 0 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ============================================
   RESPONSIVE - TABLET (768px+)
   ============================================ */

@media (min-width: 768px) {
    /* Carousel devient grille sur tablet */
    .recipes-carousel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow-x: visible;
        scroll-snap-type: none;
    }
    
    .recipes-carousel .recipe-card {
        flex: none;
        min-width: auto;
    }
    
    /* Cacher les flèches et dots sur tablet+ */
    .carousel-arrow,
    .carousel-dots {
        display: none;
    }
    
    /* À la une - layout horizontal */
    .alaune-container {
        flex-direction: row;
        gap: 24px;
    }
    
    .alaune-main {
        flex: 1.2;
    }
    
    .alaune-side {
        flex: 1;
    }
    
    .alaune-main-title {
        font-size: 1.4rem;
    }
    
    .alaune-side-image {
        width: 120px;
        height: 90px;
    }
}


/* ============================================
   RESPONSIVE - DESKTOP (1024px+)
   ============================================ */

@media (min-width: 1024px) {
    /* Grille 4 colonnes sur desktop */
    .recipes-carousel {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* À la une - proportions desktop */
    .alaune-main {
        flex: 1.5;
    }
    
    .alaune-main-content {
        padding: 24px;
    }
    
    .alaune-main-title {
        font-size: 1.6rem;
    }
    
    .alaune-main-excerpt {
        font-size: 1rem;
    }
    
    .alaune-side-image {
        width: 140px;
        height: 100px;
    }
    
    .alaune-side-title {
        font-size: 1rem;
    }
}


/* ============================================
   DARK MODE
   ============================================ */

.dark-mode .alaune-main,
.dark-mode .alaune-side-item {
    background: #2a2a2a;
}

.dark-mode .alaune-main-title,
.dark-mode .alaune-side-title {
    color: #f0f0f0;
}

.dark-mode .alaune-main-excerpt {
    color: #a0a0a0;
}

.dark-mode .carousel-arrow {
    background: #333;
}

.dark-mode .carousel-arrow:hover {
    background: #444;
}

.dark-mode .carousel-arrow i {
    color: #f0f0f0;
}

.dark-mode .carousel-dot {
    background: #555;
}

.dark-mode .carousel-dot:hover {
    background: #666;
}
