/* Styles personnalisés pour le blog */

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animation fadeInUp */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Article card hover effects */
.article-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Category filter active state */
.category-filter.active {
    background: linear-gradient(135deg, #8054FF 0%, #6366f1 100%);
    border-color: #8054FF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px rgba(128, 84, 255, 0.5);
}

.category-filter {
    transition: all 0.2s ease;
}

.category-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -4px rgba(128, 84, 255, 0.3);
}

/* Custom gradient backgrounds */
.bg-gradient-hero {
    background: linear-gradient(135deg, rgba(128, 84, 255, 0.1) 0%, rgba(99, 102, 241, 0.05) 50%, rgba(168, 85, 247, 0.1) 100%);
}

/* Smooth transitions for all interactive elements */
button, a {
    transition: all 0.2s ease;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8054FF, #6366f1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7048e8, #5b5bd6);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .article-card:hover {
        transform: translateY(-4px);
    }

    .category-filter {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* Focus states for accessibility */
.category-filter:focus,
button:focus,
a:focus {
    outline: 2px solid #8054FF;
    outline-offset: 2px;
}

/* Newsletter section styling */
.newsletter-input:focus {
    box-shadow: 0 0 0 3px rgba(128, 84, 255, 0.1);
}

/* Loading animation for future use */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    animation: loading-dots 1.4s infinite linear;
}

@keyframes loading-dots {
    0%, 20% {
        box-shadow:
            8px 0 currentColor,
            16px 0 currentColor,
            24px 0 currentColor;
    }
    40% {
        box-shadow:
            8px 0 currentColor,
            16px 0 currentColor,
            24px 0 transparent;
    }
    60% {
        box-shadow:
            8px 0 currentColor,
            16px 0 transparent,
            24px 0 transparent;
    }
    80%, 100% {
        box-shadow:
            8px 0 transparent,
            16px 0 transparent,
            24px 0 transparent;
    }
}

/* Article content typography */
.article-content {
    line-height: 1.75;
    color: #374151;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    color: #1f2937;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    scroll-margin-top: 100px; /* For anchor links with fixed header */
}

.article-content h1 {
    font-size: 2.25rem;
    line-height: 1.2;
    border-bottom: 3px solid #8054FF;
    padding-bottom: 0.5rem;
}

.article-content h2 {
    font-size: 1.875rem;
    line-height: 1.3;
    color: #8054FF;
    position: relative;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #8054FF;
    border-radius: 2px;
}

.article-content h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    color: #6366f1;
}

.article-content h4 {
    font-size: 1.25rem;
    line-height: 1.5;
    color: #4f46e5;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: #4b5563;
    text-align: justify;
}

/* Strong and emphasis */
.article-content strong {
    font-weight: 700;
    color: #1f2937;
}

.article-content em {
    font-style: italic;
    color: #6b7280;
}

/* Blockquotes */
.article-content blockquote,
.article-content .article-quote {
    border-left: 4px solid #8054FF;
    padding: 1.5rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, rgba(128, 84, 255, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    border-radius: 0.75rem;
    position: relative;
    font-style: italic;
    color: #6b7280;
}

.article-content blockquote::before,
.article-content .article-quote::before {
    content: '"';
    font-size: 4rem;
    color: #8054FF;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-family: serif;
    opacity: 0.3;
}

/* Code styling */
.article-content code,
.article-content .inline-code {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #8054FF;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-family: 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #d1d5db;
}

.article-content pre,
.article-content .code-block {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid #374151;
    position: relative;
}

.article-content pre::before,
.article-content .code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8054FF, #6366f1, #8b5cf6);
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-weight: normal;
}

/* Lists */
.article-content ul,
.article-content ol,
.article-content .article-list {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.article-content ul li,
.article-content .article-list li {
    margin-bottom: 0.75rem;
    position: relative;
    color: #4b5563;
}

.article-content ul li::marker,
.article-content .article-list li::marker {
    color: #8054FF;
    font-weight: bold;
}

.article-content ol li {
    margin-bottom: 0.75rem;
    color: #4b5563;
}

.article-content ol li::marker {
    color: #8054FF;
    font-weight: bold;
}

/* Nested lists */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

/* Links */
.article-content a,
.article-content .article-link {
    color: #8054FF;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.article-content a:hover,
.article-content .article-link:hover {
    color: #6366f1;
    border-bottom-color: #6366f1;
}

/* Special content boxes */
.article-content .info-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.article-content .warning-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.article-content .success-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

/* Images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 2rem 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Horizontal rules */
.article-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8054FF, transparent);
    margin: 3rem 0;
}

/* First paragraph styling */
.article-content > p:first-of-type {
    font-size: 1.125rem;
    font-weight: 500;
    color: #374151;
}

/* Table styling */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-content th,
.article-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.article-content th {
    background: linear-gradient(135deg, #8054FF 0%, #6366f1 100%);
    color: white;
    font-weight: 600;
}

.article-content tr:hover {
    background: rgba(128, 84, 255, 0.05);
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Table of contents styling */
.table-of-contents {
    background: rgba(128, 84, 255, 0.05);
    border: 1px solid rgba(128, 84, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.table-of-contents h3 {
    color: #8054FF;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin: 0.5rem 0;
}

.table-of-contents a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.table-of-contents a:hover {
    color: #8054FF;
}

/* Article navigation */
.article-nav {
    border-top: 1px solid #e5e7eb;
    margin-top: 3rem;
    padding-top: 2rem;
}

.article-nav a {
    display: block;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-nav a:hover {
    border-color: #8054FF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -4px rgba(128, 84, 255, 0.3);
}

/* Breadcrumb styling */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb a {
    color: #8054FF;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #d1d5db;
}
