/* === VARIABLES GLOBALES === */
:root {
    --primary-gradient: linear-gradient(135deg, #34c7ff 0%, #2b8af9 100%);
    --dark-bg: #0a0f1a;
    --card-bg: #1a1f2e;
    --text-primary: #ffffff;
    --text-secondary: #b0b8c8;
    --text-muted: #8892a6;
    --accent-cyan: #00E0FF;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --glow-shadow: 0 0 15px rgba(52, 199, 255, 0.5);
    --content-width: 800px;
}

/* === STYLES GÉNÉRAUX === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Fond animé avec dégradé radial */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 40%, rgba(0, 224, 255, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(52, 199, 255, 0.06) 0%, transparent 50%);
    z-index: -1;
    animation: bg-float 25s ease-in-out infinite alternate;
}

@keyframes bg-float {
    0% { transform: translateX(-20px) translateY(-10px) scale(1); }
    100% { transform: translateX(20px) translateY(10px) scale(1.05); }
}

/* === BARRE DE PROGRESSION DE LECTURE === */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--primary-gradient);
    z-index: 1000;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(0, 224, 255, 0.6);
}

/* === CONTENEUR PRINCIPAL === */
.article-page-container {
    max-width: 100%;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInPage 1s ease forwards;
}

@keyframes fadeInPage {
    to { opacity: 1; }
}

/* === HEADER DE L'ARTICLE === */
.article-header {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    margin-bottom: 60px;
}

.article-image-hero {
    position: relative;
    width: 100%;
    height: 100%;
}

.article-image-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 15, 26, 0.3) 0%,
        rgba(10, 15, 26, 0.6) 50%,
        rgba(10, 15, 26, 0.9) 100%
    );
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 40px;
    z-index: 2;
}

.article-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.image-caption h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 900px;
}

.article-meta-top {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

/* === CORPS DE L'ARTICLE === */
.article-body {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 40px;
}

.article-intro-section {
    margin-bottom: 50px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease 0.3s forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-intro-section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 30px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.author-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.author-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.meta-right {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* === CONTENU DE L'ARTICLE === */
.article-content {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease 0.5s forwards;
}

.article-intro {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 400;
}

.article-content h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 50px 0 25px;
    color: var(--text-primary);
    position: relative;
    padding-left: 20px;
}

.article-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.article-content p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.article-content a:hover {
    color: #34c7ff;
    border-bottom-color: #34c7ff;
}

/* === CITATION EN LIGNE === */
.inline-quote {
    background: rgba(26, 31, 46, 0.6);
    backdrop-filter: blur(15px);
    border-left: 4px solid var(--accent-cyan);
    border-radius: var(--border-radius-md);
    padding: 30px;
    margin: 40px 0;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.inline-quote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--accent-cyan);
    font-family: serif;
    line-height: 1;
}

.inline-quote p {
    font-style: italic;
    font-size: 1.2rem;
    margin: 0;
    padding-left: 20px;
}

/* === NOTE LATÉRALE === */
.side-note {
    background: rgba(26, 31, 46, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 224, 255, 0.3);
    border-radius: var(--border-radius-md);
    padding: 25px;
    margin: 30px 0;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.side-note h4 {
    color: var(--accent-cyan);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-note h4::before {
    content: '💡';
    font-size: 1.2rem;
}

.side-note p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    color: var(--text-secondary);
}

/* === IMAGE INLINE === */
.article-inline-image {
    margin: 50px 0;
    text-align: center;
}

.article-inline-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-medium);
}

.article-inline-image img:hover {
    transform: scale(1.02);
}

.article-inline-image figcaption {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* === CITATION EN EXERGUE === */
.pull-quote {
    background: rgba(26, 31, 46, 0.4);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    margin: 50px 0;
    text-align: center;
    position: relative;
    border: 1px solid rgba(0, 224, 255, 0.2);
}

.pull-quote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 6rem;
    color: var(--accent-cyan);
    font-family: serif;
    line-height: 1;
    opacity: 0.3;
}

.pull-quote p {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.pull-quote footer {
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: normal;
    position: relative;
    padding-top: 20px;
}

.pull-quote footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--primary-gradient);
}

/* === LISTE À PUCES === */
.checklist {
    list-style: none;
    margin: 30px 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(26, 31, 46, 0.3);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.checklist li:hover {
    background: rgba(26, 31, 46, 0.5);
    transform: translateX(5px);
}

.checklist li::before {
    content: '';
    width: 20px;
    height: 20px;
    background: var(--accent-cyan);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    mask: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m13.854 3.646-7.5 7.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6 10.293l7.146-7.147a.5.5 0 0 1 .708.708z'/%3e%3c/svg%3e") no-repeat center;
    mask-size: 12px;
}

/* === PARTAGE SOCIAL === */
.article-sharing {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 60px 0;
    padding: 30px;
    background: rgba(26, 31, 46, 0.4);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-sharing span {
    font-weight: 600;
    color: var(--text-primary);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--glow-shadow);
}

/* === ARTICLES SUGGÉRÉS === */
.related-articles {
    max-width: 1200px;
    margin: 100px auto 0;
    padding: 0 40px;
}

.related-articles h3 {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-primary);
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-article-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease forwards;
}

.related-article-card:nth-child(1) { animation-delay: 0.1s; }
.related-article-card:nth-child(2) { animation-delay: 0.2s; }
.related-article-card:nth-child(3) { animation-delay: 0.3s; }

.related-article-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-shadow);
}

.related-article-card .card-image {
    height: 200px;
    overflow: hidden;
}

.related-article-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.related-article-card:hover .card-image img {
    transform: scale(1.05);
}

.related-article-card .card-content {
    padding: 25px;
}

.related-article-card .card-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 224, 255, 0.2);
    color: var(--accent-cyan);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.related-article-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.related-article-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.related-article-card .card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* === CTA FINAL === */
.article-final-cta {
    background: rgba(26, 31, 46, 0.6);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    margin: 100px auto 60px;
    max-width: var(--content-width);
    padding: 60px 40px;
    text-align: center;
    border: 1px solid rgba(0, 224, 255, 0.2);
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease 0.8s forwards;
}

.cta-content h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.button-primary {
    display: inline-block;
    padding: 18px 36px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: var(--glow-shadow);
}

.button-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), var(--glow-shadow);
    filter: brightness(1.1);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .related-articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .related-article-card:nth-child(3) {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .article-body,
    .related-articles,
    .article-final-cta {
        padding: 0 20px;
    }
    
    .image-caption {
        padding: 40px 20px;
    }
    
    .image-caption h1 {
        font-size: 2.5rem;
    }
    
    .article-intro-section h2 {
        font-size: 2rem;
    }
    
    .author-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .meta-right {
        margin-left: 0;
        align-items: flex-start;
    }
    
    .article-content h3 {
        font-size: 1.5rem;
    }
    
    .pull-quote p {
        font-size: 1.3rem;
    }
    
    .related-articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .related-article-card:nth-child(3) {
        grid-column: auto;
        max-width: none;
    }
    
    .article-sharing {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .side-note {
        margin: 20px -10px;
    }
}

@media (max-width: 480px) {
    .article-header {
        height: 50vh;
        min-height: 400px;
    }
    
    .image-caption h1 {
        font-size: 2rem;
    }
    
    .article-intro-section h2 {
        font-size: 1.8rem;
    }
    
    .article-intro {
        font-size: 1.1rem;
    }
    
    .article-content p {
        font-size: 1rem;
    }
    
    .inline-quote,
    .side-note,
    .pull-quote {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .cta-content h3 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
}