/* ==========================================================================
   RÉSEAU — design unifié (mobile → desktop, un seul arbre)
   Tabs + cartes de commande avec <details>
   ========================================================================== */

.net {
    width: 100%;
    margin: var(--space-4) 0 var(--space-8);
}

/* ---------- Tabs (chips horizontaux) ---------- */
.net-tabs {
    position: relative;
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-6);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.net-tabs::-webkit-scrollbar { display: none; }

.net-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    white-space: nowrap;
    transition: color var(--t-fast);
    position: relative;
    z-index: 1;
}
.net-tab:hover { color: var(--text); }
.net-tab.active { color: var(--accent); font-weight: 600; }
.net-tab-icon { font-size: 1rem; line-height: 1; }

.net-tab-indicator {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
    transition: transform var(--t-slow), width var(--t-slow);
}

/* ---------- Panneaux ---------- */
.net-panel {
    display: none;
    flex-direction: column;
    gap: var(--space-3);
    animation: panelFade 0.25s ease-out;
}
.net-panel.active { display: flex; }

@keyframes panelFade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Cartes de commande ---------- */
.cmd-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.cmd-card:hover { border-color: var(--border-strong); }
.cmd-card[open] {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-bg);
}

.cmd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 14px var(--space-5);
    cursor: pointer;
    list-style: none;
    transition: background var(--t-fast);
    user-select: none;
}
.cmd-header::-webkit-details-marker { display: none; }
.cmd-header:hover { background: var(--surface-hover); }

.cmd-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.cmd-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    color: var(--text-subtle);
    background: var(--surface-2);
    border: 1px solid var(--border);
    transition: transform var(--t-base), background var(--t-fast), color var(--t-fast);
    flex-shrink: 0;
}
.cmd-card[open] .cmd-chevron {
    transform: rotate(180deg);
    color: var(--accent);
    background: var(--accent-bg);
    border-color: var(--accent-border);
}

/* ---------- Corps ---------- */
.cmd-body {
    padding: 0 var(--space-5) var(--space-4);
    animation: bodyReveal 0.25s ease-out;
}

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

.cmd-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: var(--space-3);
}

/* ---------- Bloc de commandes ---------- */
.cmd-block {
    position: relative;
}

.cmd {
    background: #0d1117;
    color: #e6edf3;
    padding: var(--space-4);
    padding-top: 2.6rem;
    border-radius: var(--radius-md);
    border: 1px solid #21262d;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    -webkit-overflow-scrolling: touch;
    margin: 0;
}
.cmd code {
    font-family: inherit;
    color: inherit;
}

.cmd-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    color: #e6edf3;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--t-fast);
}
.cmd-copy:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.25);
}
.cmd-copy:active { transform: scale(0.96); }
.cmd-copy.copied {
    background: color-mix(in srgb, var(--success) 30%, #0d1117);
    border-color: var(--success);
    color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .net-tab { padding: 10px 14px; font-size: 0.85rem; }
    .cmd-header { padding: 12px var(--space-4); }
    .cmd-title { font-size: 0.9rem; }
    .cmd-body { padding: 0 var(--space-4) var(--space-3); }
    .cmd { font-size: 0.78rem; padding: var(--space-3); padding-top: 2.4rem; }
}
