/* ========================================
   GraphenEye Article Detail Styles
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-primary: #1a1d29;
    --bg-secondary: #242938;
    --bg-card: #2a2f42;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --tertiary: #06b6d4;
    --accent-tertiary: #06b6d4;
    --darker: #050510;
    --dark: #0f0f23;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --border-color: #374151;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Article Hero Section
   ======================================== */

.article-hero {
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.articleTag-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.2rem 0.2rem 0.2rem 0;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    color: white;
}

/* Couleurs spécifiques par tag */
.articleTag-fundamental { background-color: #6c5ce7; }
.articleTag-synthesis { background-color: #00b894; }
.articleTag-fabrication { background-color: #fd79a8; }
.articleTag-electronics { background-color: #0984e3; }
.articleTag-computing { background-color: #d63031; }
.articleTag-energy { background-color: #e17055; }
.articleTag-environment { background-color: #00cec9; }
.articleTag-biotechnology { background-color: #55efc4; color: #000; }
.articleTag-health { background-color: #ff7675; }
.articleTag-industry { background-color: #fdcb6e; color: #000; }
.articleTag-construction { background-color: #e84393; }
.articleTag-nanotechnology { background-color: #0984e3; }
.articleTag-research { background-color: #636e72; }
.articleTag-market { background-color: #fab1a0; color: #000; }
.articleTag-innovation { background-color: #ffeaa7; color: #000; }

.articleTag-pill:hover {
    opacity: 0.85;
    cursor: pointer;
}

.breadcrumb-nav {
    margin-bottom: 2rem;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "→";
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0.5rem;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--secondary);
}

/* ========================================
   Back to News Button
   ======================================== */

.back-to-news {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    backdrop-filter: blur(20px);
}

.back-to-news:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    color: var(--primary);
    text-decoration: none;
}

.back-to-news svg {
    transition: transform 0.3s ease;
}

.back-to-news:hover svg {
    transform: translateX(-2px);
}

/* ========================================
   Article Header
   ======================================== */

.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meta-item svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* ========================================
   Article Image
   ======================================== */

.article-image-container {
    margin-bottom: 4rem;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.article-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-image:hover {
    transform: scale(1.02);
}

/* ========================================
   Article Content
   ======================================== */

.article-content-wrapper {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    margin: 4rem auto;
    backdrop-filter: blur(20px);
    position: relative;
}

.article-content-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-radius: 24px;
    z-index: -1;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

/* ========================================
   Article Content Typography
   ======================================== */

.article-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 3rem 0 2rem 0;
    color: var(--text);
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem 0;
    color: var(--text);
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem 0;
    color: var(--text);
    position: relative;
}

.article-content h3::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.5rem;
    background: var(--secondary);
    border-radius: 2px;
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--text);
}

.article-content h5, .article-content h6 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
    color: var(--text);
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.article-content blockquote {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-size: 1.2rem;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.3;
    line-height: 1;
}

.article-content ul, .article-content ol {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.article-content ul li::marker {
    color: var(--primary);
}

.article-content ol li::marker {
    color: var(--primary);
    font-weight: 600;
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(99, 102, 241, 0.3);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.article-content a:hover {
    color: var(--secondary);
    text-decoration-color: var(--secondary);
    text-decoration-thickness: 2px;
}

.article-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.article-content pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: 0.9rem;
    line-height: 1.5;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.article-content th,
.article-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.article-content th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.article-content tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ========================================
   Edit Buttons
   ======================================== */

.edit-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
}

.edit-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-tertiary), var(--primary));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
    color: white;
    text-decoration: none;
}

.edit-btn svg {
    transition: transform 0.3s ease;
}

.edit-btn:hover svg {
    transform: rotate(5deg);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .article-content-wrapper {
        padding: 2.5rem;
    }

    .article-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .article-hero {
        padding: 4rem 0 2rem;
    }

    .article-container {
        padding: 0 1rem;
    }

    .article-content-wrapper {
        padding: 2rem;
        margin: 2rem auto;
    }

    .article-image {
        height: 250px;
    }

    .article-meta {
        gap: 1rem;
    }

    .edit-buttons {
        bottom: 1rem;
        right: 1rem;
    }

    .article-content {
        font-size: 1rem;
        line-height: 1.7;
    }

    .article-content h2 {
        font-size: 1.5rem;
        padding-left: 1rem;
    }

    .article-content h3 {
        font-size: 1.3rem;
    }

    .article-content blockquote {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }

    .article-content pre {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .article-content-wrapper {
        padding: 1.5rem;
        margin: 1rem auto;
    }

    .article-content blockquote {
        padding: 1rem 1.5rem;
    }

    .article-title {
        font-size: 2rem;
    }

    .back-to-news {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .edit-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .edit-buttons,
    .back-to-news {
        display: none;
    }

    .article-content {
        color: black;
    }

    .article-hero {
        background: white;
        color: black;
    }

    .article-title {
        color: black;
    }

    .article-content-wrapper {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
    }

    .article-image {
        max-height: 300px;
    }
}

/* ========================================
   Accessibility
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .article-image,
    .edit-btn,
    .back-to-news {
        transition: none;
    }

    .edit-btn:hover,
    .back-to-news:hover {
        transform: none;
    }

    .article-image:hover {
        transform: none;
    }
}

/* Focus styles for keyboard navigation */
.back-to-news:focus,
.edit-btn:focus,
.article-content a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --glass-border: rgba(255, 255, 255, 0.5);
        --text-muted: rgba(255, 255, 255, 0.9);
    }

    .article-content-wrapper {
        border-width: 2px;
    }
}