/* =============================================
   DOCS PAGES — styles partagés
   ============================================= */

/* ====== PAGE HEADER ====== */
.doc-page-header {
    position: relative;
    z-index: 1;
    padding: calc(var(--nav-h) + 52px) 24px 44px;
    max-width: 860px;
    margin: 0 auto;
}

.doc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.82em;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.doc-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.doc-breadcrumb a:hover { color: var(--accent); }

.doc-breadcrumb .sep { opacity: 0.4; }

.doc-breadcrumb .current { color: var(--text); }

.doc-page-tag {
    display: inline-block;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.25);
    color: var(--accent);
    font-size: 0.72em;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.doc-page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8em, 3.5vw, 2.6em);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    line-height: 1.15;
}

.doc-page-title .accent {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.doc-page-subtitle {
    color: var(--text-muted);
    font-size: 1em;
    line-height: 1.65;
    max-width: 560px;
}

/* ====== MAIN LAYOUT ====== */
.doc-main {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ====== SECTIONS ====== */
.doc-section {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 28px 32px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeInUp 0.5s ease both;
}

.doc-section:nth-child(1) { animation-delay: 0.05s; }
.doc-section:nth-child(2) { animation-delay: 0.10s; }
.doc-section:nth-child(3) { animation-delay: 0.15s; }
.doc-section:nth-child(4) { animation-delay: 0.20s; }
.doc-section:nth-child(5) { animation-delay: 0.25s; }

.doc-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-section h2 code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88em;
    color: var(--accent2);
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    padding: 2px 8px;
    border-radius: 6px;
}

.doc-section p {
    color: var(--text-muted);
    font-size: 0.92em;
    line-height: 1.7;
    margin-bottom: 14px;
}

.doc-section p:last-child { margin-bottom: 0; }

.doc-section p strong { color: var(--text); font-weight: 600; }

/* Inline code */
.doc-section p code,
.doc-section li code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    color: var(--accent2);
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.15);
    padding: 1px 6px;
    border-radius: 4px;
}

/* Superscript */
.doc-section sup {
    font-size: 0.7em;
    vertical-align: super;
}

/* ====== BLOCS DE CODE ====== */
.code-wrap {
    margin: 16px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.code-wrap:last-child { margin-bottom: 0; }

.code-topbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid var(--glass-border);
}

.code-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.code-dot.red    { background: #ff5f57; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green-dot { background: #28ca41; }

.code-label {
    margin-left: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72em;
    color: var(--text-muted);
}

.code-block {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.83em;
    line-height: 1.7;
    padding: 18px 20px;
    margin: 0;
    overflow-x: auto;
    color: #c9d1d9;
    background: rgba(0,0,0,0.2);
    white-space: pre;
}

/* Syntax highlighting */
.code-block .kw  { color: #ff7b72; }
.code-block .co  { color: #8b949e; font-style: italic; }
.code-block .num { color: #79c0ff; }
.code-block .fn  { color: #d2a8ff; }
.code-block .st  { color: #a5d6ff; }

/* ====== LISTES ====== */
.doc-section ul, .doc-section ol {
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-section li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92em;
    color: var(--text-muted);
    line-height: 1.6;
}

.doc-section li::before {
    content: '▸';
    color: var(--accent2);
    font-size: 0.85em;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ====== NOTE BOX ====== */
.doc-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(59,130,246,0.07);
    border: 1px solid rgba(59,130,246,0.2);
    margin-top: 14px;
    font-size: 0.88em;
    color: var(--text-muted);
    line-height: 1.6;
}

.doc-note .note-ico { flex-shrink: 0; font-size: 1em; }

.doc-note.warning {
    background: rgba(245,158,11,0.07);
    border-color: rgba(245,158,11,0.2);
}

/* ====== BACK BUTTON ====== */
.doc-back {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto 0;
    padding: 0 24px 48px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88em;
    font-weight: 500;
    padding: 9px 16px;
    border-radius: 10px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    transition: background 0.25s, color 0.25s, transform 0.25s;
}

.back-btn:hover {
    background: var(--glass-hover);
    color: var(--text);
    transform: translateX(-3px);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 600px) {
    .doc-section { padding: 20px 18px; }
    .doc-page-header { padding-top: calc(var(--nav-h) + 36px); }
}
