/**
 * La Touche Editorial Grid - Styles
 * Version: 1.0.0
 * Ultra-léger et responsive
 */

/* ========================================
   WRAPPER PRINCIPAL
   ======================================== */
.lteg-editorial-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   ARTICLE FEATURED
   ======================================== */
.lteg-featured-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 2px solid #e5e5e5;
}

.lteg-featured-image {
    overflow: hidden;
    border-radius: 4px;
}

.lteg-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.lteg-featured-image:hover img {
    transform: scale(1.05);
}

.lteg-featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lteg-featured-category {
    margin-bottom: 12px;
}

.lteg-featured-category a {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #d42020;
    text-decoration: none;
    transition: color 0.2s ease;
}

.lteg-featured-category a:hover {
    color: #a01818;
}

.lteg-featured-title {
    font-size: 36px;
    line-height: 1.2;
    margin: 0 0 20px 0;
    font-weight: 700;
}

.lteg-featured-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.lteg-featured-title a:hover {
    color: #d42020;
}

.lteg-featured-excerpt {
    font-size: 16px;
    line-height: 1.6;
    color: #4a4a4a;
    margin-bottom: 16px;
}

.lteg-featured-meta {
    font-size: 14px;
    color: #888;
}

/* ========================================
   SECTIONS SOUS-CATÉGORIES
   ======================================== */
.lteg-subcategory-section {
    margin-bottom: 50px;
}

.lteg-subcategory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #d42020;
}

.lteg-subcategory-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.lteg-subcategory-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.lteg-subcategory-title a:hover {
    color: #d42020;
}

.lteg-view-all {
    font-size: 14px;
    font-weight: 600;
    color: #d42020;
    text-decoration: none;
    transition: color 0.2s ease;
}

.lteg-view-all:hover {
    color: #a01818;
}

/* ========================================
   GRID DES ARTICLES
   ======================================== */
.lteg-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ========================================
   CARTES ARTICLE
   ======================================== */
.lteg-post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lteg-post-card:hover {
    transform: translateY(-4px);
}

.lteg-post-image {
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 16px;
    aspect-ratio: 16 / 9;
    background: #f5f5f5;
}

.lteg-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.lteg-post-card:hover .lteg-post-image img {
    transform: scale(1.05);
}

.lteg-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lteg-post-category {
    margin-bottom: 8px;
}

.lteg-post-category a {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #d42020;
    text-decoration: none;
    transition: color 0.2s ease;
}

.lteg-post-category a:hover {
    color: #a01818;
}

.lteg-post-title {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.lteg-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.lteg-post-title a:hover {
    color: #d42020;
}

.lteg-post-meta {
    font-size: 13px;
    color: #888;
    margin-top: auto;
}

/* ========================================
   MESSAGES D'ERREUR ET VIDES
   ======================================== */
.lteg-error,
.lteg-no-content {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 14px;
}

/* ========================================
   LOAD MORE BUTTON
   ======================================== */
.lteg-load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.lteg-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: #d42020;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lteg-load-more-btn:hover:not(:disabled) {
    background: #a01818;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.lteg-load-more-btn:active:not(:disabled) {
    transform: translateY(0);
}

.lteg-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lteg-load-more-btn.lteg-no-more-posts {
    background: #888;
    cursor: default;
}

/* Spinner de chargement */
.lteg-load-more-btn.lteg-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lteg-spin 0.6s linear infinite;
}

@keyframes lteg-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animation d'apparition des nouveaux articles */
.lteg-post-card {
    opacity: 1;
    transform: translateY(0);
}

.lteg-post-card.lteg-fade-in {
    animation: lteg-fadeInUp 0.4s ease-out;
}

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

/* ========================================
   RESPONSIVE - TABLETTE
   ======================================== */
@media (max-width: 1024px) {
    .lteg-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .lteg-featured-article {
        gap: 30px;
    }

    .lteg-featured-title {
        font-size: 30px;
    }

    .lteg-subcategory-title {
        font-size: 24px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    .lteg-editorial-wrapper {
        padding: 16px;
    }

    .lteg-featured-article {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
        padding-bottom: 40px;
    }

    .lteg-featured-title {
        font-size: 26px;
    }

    .lteg-featured-excerpt {
        font-size: 15px;
    }

    .lteg-subcategory-section {
        margin-bottom: 40px;
    }

    .lteg-subcategory-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .lteg-subcategory-title {
        font-size: 22px;
    }

    .lteg-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .lteg-post-title {
        font-size: 16px;
    }
}

/* ========================================
   RESPONSIVE - TRÈS PETIT MOBILE
   ======================================== */
@media (max-width: 480px) {
    .lteg-featured-title {
        font-size: 22px;
    }

    .lteg-subcategory-title {
        font-size: 20px;
    }

    .lteg-post-title {
        font-size: 15px;
    }

    .lteg-post-image {
        aspect-ratio: 4 / 3;
    }
}

/* ========================================
   ACCESSIBILITÉ
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .lteg-featured-image img,
    .lteg-post-image img,
    .lteg-post-card {
        transition: none;
    }
}

/* ========================================
   MODE SOMBRE (optionnel)
   ======================================== */
@media (prefers-color-scheme: dark) {
    .lteg-post-card {
        background: #2a2a2a;
    }

    .lteg-featured-title a,
    .lteg-subcategory-title a,
    .lteg-post-title a {
        color: #f5f5f5;
    }

    .lteg-featured-excerpt,
    .lteg-post-content {
        color: #d0d0d0;
    }

    .lteg-subcategory-header {
        border-bottom-color: #d42020;
    }

    .lteg-featured-article {
        border-bottom-color: #3a3a3a;
    }

    .lteg-post-image {
        background: #1a1a1a;
    }
}

/* ========================================
   PRINT
   ======================================== */
@media print {
    .lteg-view-all {
        display: none;
    }

    .lteg-post-card,
    .lteg-featured-article {
        break-inside: avoid;
    }
}
