/* =============================================
   BIBLIOTHÈQUE PYTHON — styles spécifiques
   ============================================= */

/* ====== HERO ====== */
.py-hero {
    position: relative;
    z-index: 1;
    padding: calc(var(--nav-h) + 60px) 24px 60px;
}

.py-hero-inner {
    max-width: 1060px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 48px;
    align-items: center;
}

.py-hero-left { min-width: 0; }

.py-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.py-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    background: rgba(248,161,32,0.12);
    border: 1px solid rgba(248,161,32,0.3);
    color: #f8a120;
}

.py-badge.blue {
    background: rgba(59,130,246,0.1);
    border-color: rgba(59,130,246,0.25);
    color: var(--accent);
}

.py-badge.green {
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.25);
    color: var(--accent2);
}

.py-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.4em, 4.5vw, 3.6em);
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 18px;
    line-height: 1.05;
}

.py-title .accent {
    background: linear-gradient(135deg, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.py-subtitle {
    font-size: 1em;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 28px;
    max-width: 480px;
}

.py-subtitle strong { color: var(--text); font-weight: 600; }

.py-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.eco-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 0.88em;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s, opacity 0.25s, background 0.25s;
}

.eco-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 18px rgba(59,130,246,0.35);
}

.eco-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(59,130,246,0.45);
}

.eco-btn.secondary {
    background: var(--glass);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.eco-btn.secondary:hover {
    background: var(--glass-hover);
    color: var(--text);
    transform: translateY(-2px);
}

/* ====== CODE PREVIEW ====== */
.py-code-preview {
    overflow: hidden;
    padding: 0;
}

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

.code-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

.code-dot.red    { background: #ff5f57; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green-dot { background: #28ca41; }

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

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

/* Syntax highlighting */
.code-block .kw  { color: #ff7b72; }  /* keywords */
.code-block .co  { color: #8b949e; font-style: italic; }  /* comments */
.code-block .num { color: #79c0ff; }  /* numbers */
.code-block .str { color: #a5d6ff; }  /* strings */

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

.py-section { animation: fadeInUp 0.6s ease both; }

.py-h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 28px;
    background: linear-gradient(135deg, var(--text), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====== FEATURES GRID ====== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.feature-card {
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59,130,246,0.25);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.feat-icon {
    font-size: 1.8em;
    line-height: 1;
}

.feature-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.97em;
    font-weight: 600;
    color: var(--text);
}

.feature-card p {
    font-size: 0.86em;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    margin: 0;
}

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

.feat-link {
    font-size: 0.82em;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.2s;
    align-self: flex-start;
}

.feat-link:hover { text-decoration: underline; }

/* ====== DOCS LIST ====== */
.docs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.doc-item:hover {
    transform: translateX(6px);
    border-color: rgba(59,130,246,0.25);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.doc-icon {
    font-size: 1.5em;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-body { flex: 1; min-width: 0; }

.doc-body h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.97em;
    font-weight: 600;
    margin-bottom: 4px;
}

.doc-body p {
    font-size: 0.83em;
    color: var(--text-muted);
    margin: 0;
}

.doc-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: var(--accent2);
    background: rgba(16,185,129,0.08);
    padding: 1px 5px;
    border-radius: 4px;
}

.doc-arrow {
    font-size: 1.1em;
    color: var(--accent);
    flex-shrink: 0;
    transition: transform 0.25s;
}

.doc-item:hover .doc-arrow { transform: translateX(4px); }

/* ====== INSTALL ====== */
.install-card {
    overflow: hidden;
    padding: 0;
    max-width: 560px;
}

.install-code {
    font-size: 0.85em;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
    .py-hero-inner {
        grid-template-columns: 1fr;
    }

    .py-code-preview {
        max-width: 100%;
    }
}

@media (max-width: 540px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .doc-item:hover { transform: none; }

    .py-title { font-size: 2.2em; }
}
