:root {
    --noir: #0f0e0c;
    --blanc: #f9f7f2;
    --gris: #6b6860;
    --border: #2a2825;
    --card: #1a1917;
    --net: #2E7D32;
    --net-bg: #0d2010;
    --radius: 12px;
    --Lien: #3b82f6;
    --green:       #16a34a;
    --green-light: #dcfce7;
    --green-dark:  #14532d;
    --green-mid:   #22c55e;
    --bg:          #0f172a;
    --bg2:         #1e293b;
    --bg3:         #273344;
    --text:        #e2e8f0;
    --text-muted:  #94a3b8;
    --accent:      #f59e0b;
    --blue:        #3b82f6;
    --red:         #ef4444;
    --white:       #ffffff;
    --mono:        'JetBrains Mono', monospace;
    --sans:        'Outfit', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    scroll-behavior: smooth
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--noir);
    color: var(--blanc);
    min-height: 100vh
}

a {
    text-decoration: none;
    color: var(--Lien);
}

/* ── HEADER ── */
.site-header {
    background: rgba(15, 14, 12, .95);
    backdrop-filter: blur(12px);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border)
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 2rem
}

.logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800
}

.logo span {
    color: #0078D4
}

nav {
    display: flex;
    gap: .25rem
}

nav a {
    color: rgba(255, 255, 255, .55);
    font-size: .88rem;
    font-weight: 500;
    padding: .4rem .85rem;
    border-radius: 6px;
    transition: all .2s
}

nav a:hover,
nav a.active {
    background: rgba(255, 255, 255, .1);
    color: #fff
}

/* ── LAYOUT PRINCIPAL ── */
.page-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    align-items: start
}

/* ── CONTENU PRINCIPAL ── */
.main-content {
    min-width: 0
}

/* Breadcrumb + retour */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: .75rem
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: rgba(255, 255, 255, .35)
}

.breadcrumb a {
    color: rgba(255, 255, 255, .4);
    transition: color .2s
}

.breadcrumb a:hover {
    color: #fff
}

.breadcrumb span {
    color: rgba(255, 255, 255, .2)
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
    color: rgba(255, 255, 255, .6);
    font-size: .82rem;
    font-weight: 500;
    padding: .4rem .9rem;
    border-radius: 6px;
    transition: all .2s;
    white-space: nowrap
}

.btn-back:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff
}

/* Méta-infos */
.tuto-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem
}

.meta-cat {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: rgba(46, 125, 50, .15);
    border: 1px solid rgba(46, 125, 50, .3);
    color: #81c784;
    font-size: .78rem;
    font-weight: 700;
    padding: .25rem .7rem;
    border-radius: 50px;
    -webkit-border-radius: 50px;
    -moz-border-radius: 50px;
    -ms-border-radius: 50px;
    -o-border-radius: 50px;
}

.meta-level {
    font-size: .78rem;
    font-weight: 700;
    padding: .25rem .7rem;
    border-radius: 50px;
    background: rgba(230, 101, 0, .15);
    color: #ffb74d;
    border: 1px solid rgba(230, 101, 0, .3)
}

.meta-date {
    font-size: .78rem;
    color: rgba(255, 255, 255, .35)
}

.meta-duration {
    font-size: .78rem;
    color: rgba(255, 255, 255, .35);
    display: flex;
    align-items: center;
    gap: .3rem
}

/* Titre */
.tuto-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    margin-bottom: .75rem
}

.tuto-title em {
    font-style: normal;
    color: var(--net)
}

.tuto-intro {
    color: rgba(255, 255, 255, .55);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 1.75rem;
    max-width: 680px
}

/* ── VIDÉO YOUTUBE ── */
.video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border)
}

.video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%
}

/* ── CONTENU ARTICLE ── */
.tuto-article {
    color: rgba(255, 255, 255, .75);
    font-size: 1rem;
    line-height: 1.85
}

.tuto-article h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 2.5rem 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border)
}

.tuto-article h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .9);
    margin: 1.75rem 0 .75rem
}

.tuto-article p {
    margin-bottom: 1.1rem
}

.tuto-article ul,
.tuto-article ol {
    margin: .75rem 0 1.1rem 1.5rem
}

.tuto-article li {
    margin-bottom: .4rem;
    line-height: 1.7
}

.tuto-article code {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    color: #81c784;
    font-family: 'Courier New', monospace;
    font-size: .88em;
    padding: .15rem .45rem;
    border-radius: 4px
}

.tuto-article pre {
    background: #111;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.25rem 0
}

.tuto-article pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: .9rem
}

.tuto-article .callout {
    background: rgba(46, 125, 50, .1);
    border-left: 3px solid var(--net);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, .75)
}

.tuto-article .callout strong {
    color: #81c784;
    display: block;
    margin-bottom: .25rem;
    font-size: .88rem;
    text-transform: uppercase;
    letter-spacing: .06em
}

.tuto-article img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 1.25rem 0
}

.alerte {
    color: red
}

.keyword {
    color: var(--green-mid);
    font-weight: 700;
    font-family: var(--mono);
}

.topo {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin: 24px 0;
    -webkit-border-radius: var(--radius);
    -moz-border-radius: var(--radius);
    -ms-border-radius: var(--radius);
    -o-border-radius: var(--radius);
}
    
.topo-title {
    font-size: 12px;
    font-family: var(--mono);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
}

.topo-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; gap: 0;
    row-gap: 16px;
}

.topo-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.topo-icon {
    font-size: 32px;
    line-height: 1;
}
 
.topo-box {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--green-mid);
    text-align: center;
    white-space: nowrap;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -ms-border-radius: 8px;
    -o-border-radius: 8px;
}
    
.topo-box.router {
    border-color: var(--blue);
    color: #93c5fd;
}

.topo-box.server {
    border-color: var(--green);
    color: var(--green-mid);
    background: var(--green-dark);
}

.topo-box.switch {
    border-color: var(--accent);
    color: #fcd34d;
}

.topo-sub {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--mono);
    text-align: center;
}

.topo-line {
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 22px;
    color: var(--accent);
}

.topo-ip {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--mono);
    text-align: center;
    margin-top: 2px;
}

/* ── STEPS ── */
.steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 16px 0;
}

.step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: border-color .2s;
}

.step:hover {
    border-color: var(--green);
}

.step-num {
    width: 34px;
    height: 34px;
    background: var(--green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.step-body h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 6px;
}

.step-body p  {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.65;
}

.step-body code {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--green-mid);
    font-family: var(--mono);
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 4px;
}

/* ── CODE BLOCKS ── */
.code-block {
    background: #070d1a;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 20px 0;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
}

.code-header.blue  {
    border-bottom-color: var(--blue);
}

.code-header.amber {
    border-bottom-color: var(--accent);
}

.code-lang {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--green-mid);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.code-lang.blue  { color: #93c5fd; }

.code-lang.amber { color: #fcd34d; }

.code-dots { display: flex; gap: 6px; }

.code-dots span { width: 10px; height: 10px; border-radius: 50%; }

.code-dots span:nth-child(1) { background: #ff5f57; }

.code-dots span:nth-child(2) { background: #febc2e; }

.code-dots span:nth-child(3) { background: #28c840; }

pre {
    padding: 20px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.8;
}

.cmd     { color: var(--green-mid); }

.val     { color: #f59e0b; }

.val2    { color: #93c5fd; }

.kw      { color: #c084fc; }

.comment { color: #3d5070; font-style: italic; }

.prompt  { color: #3d5070; user-select: none; }

.ok      { color: #22c55e; }

.err     { color: #ef4444; }


 /* =====================================================
        TABLEAUX
    ===================================================== */
/* .tuto-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--clr-border);
    margin: 20px 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.table thead th {
    background: var(--clr-surface2);
    color: var(--clr-text-muted);
    font-family: var(--font-mono);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--clr-border);
} */

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    border-radius: var(--radius);
    overflow: hidden;
}

.param-table th {
    background: var(--green-dark);
    color: var(--green-mid);
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid var(--green);
}

.param-table th.blue-th  { background: #1e3a5f; color: #93c5fd; border-bottom-color: var(--blue); }

.param-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }

.param-table tr:nth-child(odd)  td { background: var(--bg2); }

.param-table tr:nth-child(even) td { background: var(--bg3); }

.param-table td:first-child { font-family: var(--mono); color: var(--green-mid); font-weight: 700; }

.param-table td.blue-td  { color: #93c5fd !important; }

.param-table td:last-child { color: var(--text-muted); font-style: italic; }

/* ── TABS ── */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 20px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
    white-space: nowrap;
}

.tab-btn.active       { color: var(--green-mid); border-bottom-color: var(--green); }

.tab-btn.blue.active  { color: #93c5fd; border-bottom-color: var(--blue); }

.tab-content          { display: none; }

.tab-content.active   { display: block; }

/* ── CMD SUMMARY ── */
.cmd-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.cmd-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cmd-card .cc-cmd  { font-family: var(--mono); font-size: 12px; color: var(--green-mid); font-weight: 700; }

.cmd-card.blue-card .cc-cmd { color: #93c5fd; }

.cmd-card .cc-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ── NAVIGATION PREV/NEXT ── */
.tuto-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border)
}

.nav-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    transition: border-color .2s, transform .2s;
    cursor: pointer
}

.nav-card:hover {
    border-color: rgba(255, 255, 255, .15);
    transform: translateY(-2px)
}

.nav-dir {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .3)
}

.nav-title {
    font-family: 'Syne', sans-serif;
    font-size: .92rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .85);
    line-height: 1.3
}

.nav-card.next {
    text-align: right
}

.nav-card.next .nav-dir::before {
    content: ''
}

.nav-card.next .nav-dir::after {
    content: ' →'
}

.nav-card.prev .nav-dir::before {
    content: '← '
}

/* ── TUTOS LIÉS ── */
.related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border)
}

.related h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, .9)
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: .85rem
}

.related-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: border-color .2s, transform .2s;
    cursor: pointer
}

.related-card:hover {
    border-color: rgba(255, 255, 255, .12);
    transform: translateY(-2px)
}

.related-cat {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--net)
}

.related-title {
    font-family: 'Syne', sans-serif;
    font-size: .9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3
}

/* ── SIDEBAR ── */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 84px
}

.sidebar-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem
}

.sidebar-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: .95rem;
    font-weight: 800;
    color: rgba(255, 255, 255, .9)
}

/* Sommaire */
.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .3rem
}

.toc-list li a {
    font-size: .85rem;
    color: rgba(255, 255, 255, .45);
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .5rem;
    border-radius: 5px;
    transition: all .2s
}

.toc-list li a:hover,
.toc-list li a.active {
    background: rgba(46, 125, 50, .12);
    color: #81c784
}

.toc-list li a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    flex-shrink: 0;
    transition: background .2s
}

.toc-list li a:hover::before,
.toc-list li a.active::before {
    background: var(--net)
}

/* Progress bar lecture */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--net);
    z-index: 200;
    transition: width .1s linear;
    width: 0
}

/* Partage */
.share-btns {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap
}

.share-btn {
    flex: 1;
    text-align: center;
    font-size: .78rem;
    font-weight: 600;
    padding: .45rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: rgba(255, 255, 255, .6);
    transition: all .2s;
    cursor: pointer;
    background: transparent
}

.share-btn:hover {
    border-color: rgba(255, 255, 255, .3);
    color: #fff
}

/* Info tuto */
.info-list {
    display: flex;
    flex-direction: column;
    gap: .5rem
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: .82rem
}

.info-row span:first-child {
    color: rgba(255, 255, 255, .4)
}

.info-row span:last-child {
    color: rgba(255, 255, 255, .8);
    font-weight: 500
}

/* ── RESPONSIVE ── */
@media(max-width:900px) {
    .page-wrapper {
        grid-template-columns: 1fr
    }

    .sidebar {
        position: static;
        display: none
    }

    nav {
        display: none
    }
}

@media(max-width:600px) {
    .tuto-nav {
        grid-template-columns: 1fr
    }

    .page-wrapper {
        padding: 1rem
    }

    .topo-diagram {
        flex-direction: column;
    }
    
    .topo-line {
        transform: rotate(90deg);
        -webkit-transform: rotate(90deg);
        -moz-transform: rotate(90deg);
        -ms-transform: rotate(90deg);
        -o-transform: rotate(90deg);
}
      .cmd-summary  { grid-template-columns: 1fr; }
}