/**
 * Editorial Magazine Blocks - Premium Magazine Styles
 * Version: 1.0.0
 *
 * Styles élégants et responsifs pour un magazine éditorial moderne
 * Inspiré des meilleurs sites de décoration et lifestyle
 */

:root {
    --emb-primary: #2c3e50;
    --emb-accent: #e74c3c;
    --emb-text: #333333;
    --emb-text-light: #666666;
    --emb-border: #e0e0e0;
    --emb-bg-light: #f8f9fa;
    --emb-white: #ffffff;
    --emb-radius: 8px;
    --emb-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --emb-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --emb-transition: all 0.3s ease;
}

.emb-magazine-homepage,
.emb-hero-section,
.emb-categories-section,
.emb-latest-section,
.emb-trending-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

* {
    box-sizing: border-box;
}

.emb-hero-section {
    margin-bottom: 60px;
    padding-top: 40px;
}

.emb-hero-layout-editorial {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 968px) {
    .emb-hero-layout-editorial {
        grid-template-columns: 1fr;
    }
}

.emb-hero-main {
    position: relative;
    border-radius: var(--emb-radius);
    overflow: hidden;
    height: 600px;
    box-shadow: var(--emb-shadow);
    transition: var(--emb-transition);
}

.emb-hero-main:hover {
    box-shadow: var(--emb-shadow-hover);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .emb-hero-main {
        height: 500px;
    }
}

.emb-hero-main-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.emb-hero-main-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.emb-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
    transition: var(--emb-transition);
}

.emb-hero-main:hover .emb-hero-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
}

.emb-hero-main-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    color: var(--emb-white);
    z-index: 2;
}

@media (max-width: 768px) {
    .emb-hero-main-content {
        padding: 24px;
    }
}

.emb-category-badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--emb-accent);
    color: var(--emb-white);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 16px;
    transition: var(--emb-transition);
}

.emb-category-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.emb-sticky-badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: rgba(255, 193, 7, 0.9);
    color: #000;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-left: 8px;
    margin-bottom: 16px;
}

.emb-hero-title {
    font-size: 42px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: var(--emb-white);
}

@media (max-width: 768px) {
    .emb-hero-title {
        font-size: 28px;
    }
}

.emb-hero-excerpt {
    font-size: 18px;
    line-height: 1.6;
    margin: 0 0 16px 0;
    color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 768px) {
    .emb-hero-excerpt {
        font-size: 16px;
    }
}

.emb-hero-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.emb-hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.emb-hero-secondary {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.emb-hero-secondary-post {
    background: var(--emb-white);
    border-radius: var(--emb-radius);
    overflow: hidden;
    box-shadow: var(--emb-shadow);
    transition: var(--emb-transition);
}

.emb-hero-secondary-post:hover {
    box-shadow: var(--emb-shadow-hover);
    transform: translateY(-2px);
}

.emb-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.emb-card-image {
    position: relative;
    width: 100%;
    padding-bottom: 60%;
    overflow: hidden;
    background-color: var(--emb-bg-light);
}

.emb-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--emb-transition);
}

.emb-card-link:hover .emb-card-image img {
    transform: scale(1.05);
}

.emb-card-image .emb-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    margin: 0;
}

.emb-card-image .emb-sticky-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    margin: 0;
}

.emb-card-content {
    padding: 20px;
}

.emb-card-title {
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--emb-text);
    transition: color 0.2s ease;
}

.emb-card-link:hover .emb-card-title {
    color: var(--emb-accent);
}

.emb-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--emb-text-light);
    margin: 0 0 12px 0;
}

.emb-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--emb-text-light);
}

.emb-categories-section {
    margin-bottom: 60px;
}

.emb-category-block {
    margin-bottom: 60px;
}

.emb-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--emb-border);
}

@media (max-width: 768px) {
    .emb-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

.emb-category-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    color: var(--emb-text);
}

.emb-category-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.emb-category-title a:hover {
    color: var(--emb-accent);
}

.emb-category-description {
    color: var(--emb-text-light);
    margin: 8px 0 0 0;
    font-size: 15px;
}

.emb-view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background-color: var(--emb-primary);
    color: var(--emb-white);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--emb-transition);
}

.emb-view-all-link:hover {
    background-color: var(--emb-accent);
    transform: translateX(4px);
}

.emb-arrow {
    transition: transform 0.2s ease;
}

.emb-view-all-link:hover .emb-arrow {
    transform: translateX(4px);
}

.emb-category-posts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 968px) {
    .emb-category-posts {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .emb-category-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .emb-category-posts {
        grid-template-columns: 1fr;
    }
}

.emb-category-post {
    background: var(--emb-white);
    border-radius: var(--emb-radius);
    overflow: hidden;
    box-shadow: var(--emb-shadow);
    transition: var(--emb-transition);
}

.emb-category-post:hover {
    box-shadow: var(--emb-shadow-hover);
    transform: translateY(-4px);
}

.emb-category-post-featured {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .emb-category-post-featured {
        grid-column: span 1;
    }
}

.emb-latest-section {
    margin-bottom: 60px;
}

.emb-section-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: var(--emb-text);
    padding-bottom: 16px;
    border-bottom: 2px solid var(--emb-border);
}

.emb-latest-section.emb-columns-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.emb-latest-section.emb-columns-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.emb-latest-section.emb-columns-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.emb-latest-section.emb-columns-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 968px) {
    .emb-latest-section.emb-columns-3,
    .emb-latest-section.emb-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .emb-latest-section.emb-columns-2,
    .emb-latest-section.emb-columns-3,
    .emb-latest-section.emb-columns-4 {
        grid-template-columns: 1fr;
    }
}

.emb-latest-post {
    background: var(--emb-white);
    border-radius: var(--emb-radius);
    overflow: hidden;
    box-shadow: var(--emb-shadow);
    transition: var(--emb-transition);
}

.emb-latest-post:hover {
    box-shadow: var(--emb-shadow-hover);
    transform: translateY(-4px);
}

.emb-trending-section {
    margin-bottom: 60px;
    padding: 40px;
    background-color: var(--emb-bg-light);
    border-radius: var(--emb-radius);
}

.emb-trending-posts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 968px) {
    .emb-trending-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .emb-trending-posts {
        grid-template-columns: 1fr;
    }
}

.emb-no-posts,
.emb-no-categories {
    padding: 40px;
    text-align: center;
    background-color: var(--emb-bg-light);
    border-radius: var(--emb-radius);
    color: var(--emb-text-light);
    font-size: 16px;
}

.emb-author::before,
.emb-date::before,
.emb-reading-time::before {
    content: "•";
    margin-right: 8px;
    color: var(--emb-text-light);
}

.emb-author:first-child::before,
.emb-date:first-child::before,
.emb-reading-time:first-child::before {
    content: "";
    margin-right: 0;
}

@media print {
    .emb-hero-section,
    .emb-categories-section,
    .emb-latest-section,
    .emb-trending-section {
        box-shadow: none !important;
    }

    .emb-hero-main,
    .emb-card-link {
        page-break-inside: avoid;
    }
}

.emb-latest-wrapper {
    margin-bottom: 60px;
}

.emb-magazine-homepage {
    margin-top: 40px;
    margin-bottom: 60px;
}

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

.emb-hero-main,
.emb-hero-secondary-post,
.emb-category-block,
.emb-latest-post {
    animation: embFadeIn 0.6s ease-out forwards;
}

.emb-category-post:nth-child(1) { animation-delay: 0.1s; }
.emb-category-post:nth-child(2) { animation-delay: 0.2s; }
.emb-category-post:nth-child(3) { animation-delay: 0.3s; }
.emb-category-post:nth-child(4) { animation-delay: 0.4s; }

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
