/* Background animé */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, var(--gold-glow) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-20px) rotate(1deg);
    }

    66% {
        transform: translateY(10px) rotate(-1deg);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* Header */
.section-head {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-gold), #ffd700);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 0 30px var(--gold-glow);
}

.muted {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 300;
}

/* Layout principal */
.docs__layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

/* Navigation */
.docs__toc {
    position: sticky;
    top: var(--spacing-md);
    background: var(--dark-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toc {
    list-style: none;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.toc a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
    transition: left 0.5s;
}

.toc a:hover::before {
    left: 100%;
}

.toc a:hover {
    color: var(--primary-gold);
    background: var(--dark-card-hover);
    transform: translateX(5px);
}

.toc ol {
    list-style: none;
    margin-left: var(--spacing-sm);
    margin-top: 0.5rem;
}

.toc ol a {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
}

/* Contenu */
.docs__content {
    background: var(--dark-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.doc-section {
    margin-bottom: var(--spacing-lg);
}

.doc-section h2 {
    color: var(--primary-gold);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    position: relative;
}

.doc-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-gold), transparent);
    border-radius: 2px;
}

.doc-section h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: var(--spacing-md) 0 var(--spacing-sm) 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.doc-section h3::before {
    content: '▶';
    color: var(--primary-gold);
    font-size: 0.8rem;
}

.doc-section h4 {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin: var(--spacing-sm) 0;
}

.doc-section p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.doc-section ul,
.doc-section ol {
    margin: var(--spacing-sm) 0;
    padding-left: var(--spacing-md);
}

.doc-section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Liens */
a {
    color: var(--primary-gold);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

a:hover {
    color: #ffd700;
    text-shadow: 0 0 8px var(--gold-glow);
}

/* Code */
code {
    background: rgba(0, 0, 0, 0.3);
    color: var(--primary-gold);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.9rem;
}

/* Status badges */
.muted {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
    margin-left: 0.5rem;
}

/* FAQ */
details {
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
}

summary {
    padding: var(--spacing-sm);
    cursor: pointer;
    background: var(--dark-card-hover);
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

summary:hover {
    background: var(--dark-card-hover);
    color: var(--primary-gold);
}

details[open] summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

details p {
    padding: var(--spacing-sm);
}

/* Menu mobile */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    z-index: 1000;
    background: var(--primary-gold);
    color: var(--dark-bg);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--gold-glow);
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .docs__layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .docs__toc {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .docs__toc.open {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .container {
        padding: var(--spacing-sm);
    }

    .docs__content {
        padding: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }

    .docs__content {
        padding: var(--spacing-sm);
    }

    .doc-section h2 {
        font-size: 1.5rem;
    }

    .doc-section h3 {
        font-size: 1.3rem;
    }
}

/* Scroll smooth */
html {
    scroll-behavior: smooth;
}

/* Animations d'entrée */
.doc-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.doc-section:nth-child(2) {
    animation-delay: 0.1s;
}

.doc-section:nth-child(3) {
    animation-delay: 0.2s;
}

.doc-section:nth-child(4) {
    animation-delay: 0.3s;
}

.doc-section:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}