/**
 * CSS - Section "À la une de Savoor" (Homepage)
 * Layout : 1 article principal (50%) + 3 articles secondaires (50%)
 * Cohérence visuelle avec "Dernières actualités" et "Recette du jour"
 * 
 * @version 1.0
 * @date 2025-01-25
 */

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */

.alaune-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Desktop : 2 colonnes égales (50% / 50%) */
@media (min-width: 768px) {
    .alaune-container {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* ============================================
   ARTICLE PRINCIPAL (GAUCHE)
   ============================================ */

.alaune-main {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg, #fff);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

[data-theme="dark"] .alaune-main,
.dark-mode .alaune-main {
    background: var(--card-bg, #1e1e2e);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .alaune-main:hover,
.dark-mode .alaune-main:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.alaune-main-image {
    width: 100%;
    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: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alaune-main-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #2d3436);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .alaune-main-title,
.dark-mode .alaune-main-title {
    color: var(--text-primary, #f0f0f0);
}

.alaune-main-excerpt {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary, #636e72);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .alaune-main-excerpt,
.dark-mode .alaune-main-excerpt {
    color: var(--text-secondary, #b0b0b0);
}

/* ============================================
   ARTICLES SECONDAIRES (DROITE)
   ============================================ */

.alaune-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Desktop : les items secondaires remplissent la hauteur du principal */
@media (min-width: 768px) {
    .alaune-side {
        height: 100%;
    }

    .alaune-side-item {
        flex: 1;
    }

    /* Image occupe 100% de la hauteur, pas d'aspect-ratio fixe */
    .alaune-side-image {
        width: 140px;
        min-width: 140px;
        aspect-ratio: unset;
        height: 100%;
        align-self: stretch;
    }

    /* Texte aligné en haut */
    .alaune-side-content {
        justify-content: flex-start;
        padding: 4px 0;
    }
}

.alaune-side-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 10px;
    border-radius: 10px;
    background: var(--card-bg, #fff);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    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.12);
}

[data-theme="dark"] .alaune-side-item,
.dark-mode .alaune-side-item {
    background: var(--card-bg, #1e1e2e);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .alaune-side-item:hover,
.dark-mode .alaune-side-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.alaune-side-image {
    width: 160px;
    min-width: 160px;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
}

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

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

.alaune-side-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.alaune-side-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #2d3436);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .alaune-side-title,
.dark-mode .alaune-side-title {
    color: var(--text-primary, #f0f0f0);
}

.alaune-side-excerpt {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary, #636e72);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .alaune-side-excerpt,
.dark-mode .alaune-side-excerpt {
    color: var(--text-secondary, #b0b0b0);
}

/* ============================================
   BADGES DE CATÉGORIE
   ============================================ */

.alaune-category {
    display: inline-block;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    background: none !important;
}

.alaune-category-actualites {
    color: #FF6B6B !important;
}

.alaune-category-astuces {
    color: #27ae60 !important;
}

.alaune-category-article {
    color: #3498db !important;
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */

@media (max-width: 767px) {
    .alaune-container {
        gap: 16px;
    }
    
    .alaune-main-content {
        padding: 14px 16px 16px;
    }
    
    .alaune-main-title {
        font-size: 1.15rem;
    }
    
    .alaune-side-item {
        padding: 8px;
    }
    
    .alaune-side-image {
        width: 85px;
        min-width: 85px;
    }
    
    .alaune-side-title {
        font-size: 0.9rem;
    }
}
