/* ===================================
   STYLES MODERNES POUR ARTICLES
   Palette: #164C2A, #1f6f3a, #ffffff
   =================================== */

/* Variables CSS */
:root {
    --primary-dark: #164C2A;
    --primary-light: #1f6f3a;
    --white: #ffffff;
    --gray-100: #f8fafc;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset et base */
.modern-article {
    max-width: none;
    margin: 0;
    padding: 0;
    background: var(--white);
    border-radius: 0;
    box-shadow: none;
    position: relative;
}

/* ===================================
   EN-TÊTE AVEC IMAGE HERO
   =================================== */
.article-header {
    position: relative;
    margin-bottom: 3rem;
}

.hero-image {
    position: relative;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(22, 76, 42, 0.8) 0%,
        rgba(31, 111, 58, 0.6) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 3rem;
}

.hero-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 1rem 0 1.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Version sans image */
.header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
}

.article-title {
    color: var(--primary-dark);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 1rem 0 1.5rem 0;
}

/* ===================================
   CATÉGORIES MODERNES
   =================================== */
.modern-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.category-badge {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.header-content .category-badge {
    background: var(--primary-light);
    color: var(--white);
}

.category-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* ===================================
   MÉTADONNÉES D'ARTICLE
   =================================== */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.article-meta.no-image {
    color: var(--gray-600);
    justify-content: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-icon {
    opacity: 0.8;
    flex-shrink: 0;
}

/* ===================================
   CONTENU PRINCIPAL
   =================================== */
.article-content {
    margin: 4rem 0;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-wrapper p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
}

.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4 {
    color: var(--primary-dark);
    font-weight: 700;
    margin: 2.5rem 0 1rem 0;
}

.content-wrapper h2 {
    font-size: 1.875rem;
    border-bottom: 3px solid var(--primary-light);
    padding-bottom: 0.5rem;
}

.content-wrapper h3 {
    font-size: 1.5rem;
}

.content-wrapper h4 {
    font-size: 1.25rem;
}

.content-wrapper blockquote {
    border-left: 4px solid var(--primary-light);
    background: var(--gray-100);
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--gray-600);
}

.content-wrapper ul,
.content-wrapper ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.content-wrapper li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--gray-700);
}

/* Pagination moderne */
.modern-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.page-links-title {
    font-weight: 600;
    color: var(--primary-dark);
}

.page-number {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--primary-light);
    border-radius: var(--border-radius);
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.page-number:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===================================
   PIED DE PAGE
   =================================== */
.article-footer {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    border-top: 1px solid var(--gray-200);
    margin-top: 4rem;
    padding: 3rem 0;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Tags modernisés */
.post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.tag-icon {
    color: var(--primary-light);
    margin-right: 0.5rem;
}

.tag-item {
    background: var(--white);
    color: var(--primary-dark)!important;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 2px solid var(--primary-light);
    transition: var(--transition);
    text-decoration: none;
}

.tag-item:hover {
    background: var(--primary-light);
    color: var(--white)!important;
    transform: translateY(-2px);
}

/* ===================================
   PARTAGE SOCIAL MODERNE
   =================================== */
.social-sharing {
    text-align: center;
}

.sharing-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 2rem;
}

.sharing-title svg {
    color: var(--primary-light);
}

.modern-share {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.share-btn.facebook {
    background: #1877f2;
    color: var(--white);
}

.share-btn.twitter {
    background: #1da1f2;
    color: var(--white);
}

.share-btn.linkedin {
    background: #0a66c2;
    color: var(--white);
}

.share-btn.whatsapp {
    background: #25d366;
    color: var(--white);
}

.share-btn.copy-link {
    background: var(--primary-light);
    color: var(--white);
}

/* ===================================
   NAVIGATION ENTRE ARTICLES
   =================================== */
.post-navigation {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    margin-top: 2rem;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 2rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    transition: var(--transition);
    min-height: 120px;
}

.nav-link:hover {
    border-color: var(--primary-light);
    background: var(--gray-100);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.nav-link.prev {
    justify-content: flex-start;
}

.nav-link.next {
    justify-content: flex-end;
    text-align: right;
}

.nav-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 250px;
}

.nav-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    line-height: 1.4;
}

.nav-link svg {
    color: var(--primary-light);
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-link:hover svg {
    transform: translateX(-3px);
}

.nav-link.next:hover svg {
    transform: translateX(3px);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablettes */
@media (max-width: 1024px) {
    .hero-overlay {
        padding: 2rem;
    }
    
    .content-wrapper {
        padding: 0 1.5rem;
    }
    
    .footer-content {
        padding: 0 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero-image {
        height: 50vh;
        min-height: 300px;
        border-radius: 0;
    }
    
    .hero-overlay {
        padding: 1.5rem;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .meta-item {
        justify-content: center;
    }
    
    .content-wrapper {
        padding: 0 1rem;
    }
    
    .content-wrapper p {
        font-size: 1rem;
    }
    
    .modern-share {
        gap: 0.75rem;
    }
    
    .share-btn {
        width: 45px;
        height: 45px;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 2rem 1rem;
    }
    
    .nav-link {
        padding: 1.5rem;
        min-height: 100px;
    }
    
    .nav-content {
        max-width: 100%;
    }
    
    .post-tags {
        justify-content: center;
    }
    
    .modern-categories {
        justify-content: center;
    }
}

/* Très petit écran */
@media (max-width: 480px) {
    .hero-title,
    .article-title {
        font-size: 1.75rem;
    }
    
    .hero-overlay {
        padding: 1rem;
    }
    
    .content-wrapper {
        padding: 0 0.75rem;
    }
    
    .footer-content {
        padding: 0 0.75rem;
    }
    
    .nav-links {
        padding: 1.5rem 0.75rem;
    }
    
    .share-btn {
        width: 40px;
        height: 40px;
    }
}

/* ===================================
   ANIMATIONS ET MICRO-INTERACTIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-article {
    animation: fadeInUp 0.6s ease-out;
}

/* Effet de survol sur l'image hero */
.hero-image:hover .hero-img {
    transform: scale(1.05);
}

/* Animation des boutons de partage */
.share-btn {
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.share-btn:hover::before {
    left: 100%;
}

/* Focus states pour l'accessibilité */
.share-btn:focus,
.nav-link:focus,
.category-badge:focus,
.tag-item:focus {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a202c;
        --gray-100: #2d3748;
        --gray-200: #4a5568;
        --gray-700: #e2e8f0;
        --gray-600: #cbd5e0;
    }
}