/* ============================================================
   RAPPORT ZABBIX SNMP — Page styles
   ============================================================ */

/* ── Navigation ── */
.back-nav {
    max-width: 1100px;
    margin: 2rem auto 0;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.back-nav--bottom {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.back-btn,
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Conteneur principal ── */
.rapport-container {
    max-width: 1100px;
    margin: 1.5rem auto 4rem;
    padding: 2.5rem;
    background: var(--bg-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

/* ── En-tête du rapport ── */
.rapport-header {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 3px solid #3b82f6;
    margin-bottom: 2rem;
}

.rapport-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 16px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.rapport-icon svg {
    width: 28px;
    height: 28px;
    color: #fff;
    stroke: #fff;
}

.rapport-header h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.rapport-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-system {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-formation {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-cyber {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

/* ── Section PDF ── */
.pdf-section {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    gap: 1rem;
    flex-wrap: wrap;
}

.pdf-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pdf-label svg {
    width: 1rem;
    height: 1rem;
    color: #3b82f6;
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
}

.pdf-viewer {
    display: block;
    width: 100%;
    height: 85vh;
    min-height: 600px;
    border: none;
    background: #f5f5f5;
}

/* ── Fallback si PDF non supporté ── */
.pdf-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.pdf-fallback svg {
    width: 3rem;
    height: 3rem;
    color: #3b82f6;
}

.pdf-fallback p {
    font-size: 1rem;
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .rapport-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .rapport-header h1 {
        font-size: 1.35rem;
    }

    .pdf-viewer {
        height: 70vh;
        min-height: 400px;
    }

    .back-nav {
        flex-direction: column;
        align-items: flex-start;
    }
}
