/* ============================================
   BRICOUP BLOG - STYLES PERSONNALISÉS
   Charte graphique officielle BricoUp
   ============================================ */

/* CSS Variables */
:root {
    --wood: #8a5a44;
    --wood-dark: #6d4636;
    --wood-light: #a67c5b;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --success: #22c55e;
    --verified: #0ea5e9;
    --gray-dark: #343a40;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--wood-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--wood);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.5s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Hero gradient */
.hero-gradient {
    background: linear-gradient(135deg, var(--gray-light) 0%, #fff 50%, var(--gray-light) 100%);
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--wood) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Category pills */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--white);
    border: 2px solid #e5e7eb;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-dark);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Category tags */
.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent);
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.category-tag-small {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent);
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Badges de niveau */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

.badge-beginner {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.badge-intermediate {
    background: rgba(234, 179, 8, 0.9);
    color: white;
}

.badge-advanced {
    background: rgba(249, 115, 22, 0.9);
    color: white;
}

.badge-expert {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

/* Article cards */
.article-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(249, 115, 22, 0.2);
}

/* Featured card */
.featured-card {
    transition: all 0.4s ease;
}

.featured-card:hover {
    transform: translateY(-8px);
}

/* Topic cards */
.topic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 1rem;
    border: 2px solid #e5e7eb;
    text-align: center;
    transition: all 0.3s ease;
}

.topic-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Category cards */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: var(--gray-light);
    border-radius: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    background: var(--white);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Filter buttons */
.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-medium);
    background: transparent;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Step cards */
.step-card {
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: 1rem;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--accent);
    color: white;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

/* Table of contents */
.toc a {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.toc a:last-child {
    border-bottom: none;
}

.toc a:hover {
    padding-left: 0.5rem;
    color: var(--accent);
}

/* Sommaire link active state */
.sommaire-link.active {
    background-color: rgba(249, 115, 22, 0.1);
    color: #f97316;
    font-weight: 500;
    border-left: 2px solid #f97316;
}

/* FAQ items */
.faq-item {
    background: var(--gray-light);
    border-radius: 1rem;
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    font-weight: 600;
    color: var(--gray-dark);
    cursor: pointer;
    list-style: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: var(--gray-medium);
    line-height: 1.7;
}

/* FAQ animation */
.faq-content {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Article content typography */
.article-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Scroll margin for anchor links */
section[id] {
    scroll-margin-top: 6rem;
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* 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;
}

/* Search results highlight */
.search-highlight {
    background: rgba(249, 115, 22, 0.2);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Print styles */
@media print {
    header, footer, .toc, .sidebar {
        display: none !important;
    }
    
    .article-content {
        max-width: 100% !important;
        padding: 0 !important;
    }
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (future) */
@media (prefers-color-scheme: dark) {
    /* Variables will be overridden here for dark mode */
}
