/* ==========================================================================
   Minetest.fr (Luanti) — Design System 2026
   Architecture Voxel, Performance C++, Modding Lua & Administration Serveur
   100% Responsive Mobile-First avec Menu Burger Tactile
   ========================================================================== */

:root {
    --bg-dark: #080c12;
    --bg-surface: #0d121b;
    --bg-card: #131a26;
    --bg-elevated: #1a2333;
    --bg-code: #05080e;
    --border: #263347;
    --border-light: rgba(88, 166, 255, 0.18);
    --border-accent: rgba(63, 185, 80, 0.45);

    --text-main: #f0f6fc;
    --text-body: #c9d1d9;
    --text-muted: #8b949e;
    --text-faint: #566170;

    --green: #2ea043;
    --green-light: #3fb950;
    --green-soft: rgba(46, 160, 67, 0.14);
    --blue: #58a6ff;
    --blue-soft: rgba(88, 166, 255, 0.12);
    --amber: #d29922;
    --amber-soft: rgba(210, 153, 34, 0.14);
    --cyan: #39c5bb;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.55);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    width: 100%;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(ellipse 90% 40% at 50% -10%, rgba(46, 160, 67, 0.14), transparent 75%),
        linear-gradient(to bottom, rgba(8, 12, 18, 0.98), var(--bg-dark));
    color: var(--text-body);
    line-height: 1.75;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    width: 100%;
    max-width: 100vw;
    padding-top: 62px;
}

[id] {
    scroll-margin-top: 80px;
}

/* ==========================================================================
   HEADER PRINCIPAL (FIGÉ EN HAUT) & MENU BURGER MOBILE
   ========================================================================== */
.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    background: rgba(8, 12, 18, 0.94);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(46, 160, 67, 0.4);
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-tag {
    font-size: 0.68rem;
    font-weight: 800;
    background: var(--green);
    color: #ffffff;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Navigation Bureau */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-desktop a {
    color: var(--text-body);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: all 0.18s ease;
}

.nav-desktop a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-desktop a.is-active {
    color: var(--green-light);
    background: var(--green-soft);
    border: 1px solid rgba(63, 185, 80, 0.3);
}

.nav-btn-dl {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, var(--green) 0%, #238636 100%);
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 0.5rem 1.05rem !important;
    border-radius: 999px !important;
    box-shadow: 0 3px 12px rgba(46, 160, 67, 0.35);
    margin-left: 0.5rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

.nav-btn-dl:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(46, 160, 67, 0.5) !important;
    background: linear-gradient(135deg, var(--green-light) 0%, var(--green) 100%) !important;
}

/* Bouton Burger Mobile */
.burger-btn {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.burger-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--border-accent);
}

.burger-btn svg {
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease;
}

.burger-btn .icon-close {
    display: none;
}

.burger-btn.is-active .icon-open {
    display: none;
}

.burger-btn.is-active .icon-close {
    display: block;
}

/* Tiroir Mobile (Slide-down) */
.nav-mobile-drawer {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 60px);
    background: rgba(8, 12, 18, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    padding: 1.5rem 1.25rem 2.5rem;
    overflow-y: auto;
    border-top: 1px solid var(--border);
    animation: drawerFadeIn 0.2s ease forwards;
}

.nav-mobile-drawer.is-open {
    display: block;
}

@keyframes drawerFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-mobile-section {
    margin-bottom: 1.5rem;
}

.nav-mobile-title {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
    padding-left: 0.5rem;
}

.nav-mobile-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-mobile-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.98rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.18s ease;
}

.nav-mobile-links a:hover,
.nav-mobile-links a.is-active {
    background: var(--bg-elevated);
    border-color: var(--green-light);
    color: #ffffff;
}

.nav-mobile-links a svg {
    width: 18px;
    height: 18px;
    color: var(--green-light);
    flex-shrink: 0;
}

.mobile-cta-dl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, var(--green) 0%, #238636 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(46, 160, 67, 0.4);
    margin-top: 1rem;
}

/* ==========================================================================
   STRUCTURE GÉNÉRALE & TYPOGRAPHIE
   ========================================================================== */
.container {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4.5rem;
    flex: 1;
}

/* Bannière Hero */
.hero {
    position: relative;
    padding: 3.5rem 1.5rem 4rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(46, 160, 67, 0.18), transparent 80%);
}

.hero-inner {
    max-width: 920px;
    margin: 0 auto;
}

.kicker-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--green-soft);
    color: var(--green-light);
    border: 1px solid rgba(63, 185, 80, 0.45);
    padding: 0.35rem 0.95rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 1.35rem;
}

.kicker-badge svg {
    width: 14px;
    height: 14px;
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero p.lead {
    font-size: clamp(1.05rem, 1.8vw, 1.22rem);
    color: var(--text-body);
    max-width: 780px;
    margin: 0 auto 2rem;
    line-height: 1.68;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 2.75rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: linear-gradient(135deg, var(--green) 0%, #238636 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(46, 160, 67, 0.45);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(46, 160, 67, 0.6);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--border-light);
    color: #ffffff;
}

/* Image Vitrine Hero */
.hero-figure {
    max-width: 1040px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    background: var(--bg-card);
}

.hero-figure img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.hero-figure figcaption {
    padding: 0.75rem 1.25rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* ==========================================================================
   SOMMAIRE & NAVIGATION RAPIDE DE PAGE
   ========================================================================== */
.page-toc {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin: 2rem auto 2.5rem;
    max-width: 960px;
    box-shadow: var(--shadow-sm);
}

.toc-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--green-light);
    margin-bottom: 0.85rem;
}

.toc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
}

.toc-nav a {
    color: var(--blue);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.15s ease;
}

.toc-nav a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   SECTIONS DE CONTENU & CARTES BENTO
   ========================================================================== */
.article-body {
    max-width: 960px;
    margin: 0 auto;
}

.content-block {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2.5rem 2.25rem;
    margin-bottom: 2.25rem;
    box-shadow: var(--shadow-sm);
    overflow-wrap: break-word;
    word-break: break-word;
}

h2 {
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 1.25rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    letter-spacing: -0.02em;
}

h2::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 1.2em;
    background: var(--green-light);
    border-radius: 4px;
}

h3 {
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--green-light);
    margin: 2rem 0 0.75rem;
}

p {
    margin-bottom: 1.2rem;
    color: var(--text-body);
}

ul, ol {
    margin: 0 0 1.35rem 1.6rem;
    color: var(--text-body);
}

li {
    margin-bottom: 0.45rem;
}

strong {
    color: #ffffff;
    font-weight: 700;
}

a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.18s ease;
}

a:hover {
    color: var(--green-light);
}

/* Grille Bento de Cartes */
.bento-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.4rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.bento-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.bento-card h4 {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bento-card p {
    font-size: 0.92rem;
    margin-bottom: 0;
    color: var(--text-muted);
}

/* Code & Préformaté */
pre {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin: 1.25rem 0 1.6rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

code {
    background: rgba(110, 118, 129, 0.25);
    color: var(--green-light);
    padding: 0.18rem 0.45rem;
    border-radius: 5px;
    font-family: "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.88em;
}

pre code {
    background: transparent;
    color: #e6edf3;
    padding: 0;
    font-size: 0.88rem;
    line-height: 1.6;
    white-space: pre;
}

/* Tableaux Techniques Responsives */
.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0 1.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

table {
    width: 100%;
    min-width: 460px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

th, td {
    padding: 0.85rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

th {
    background: rgba(255, 255, 255, 0.035);
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Bloc Partenaire & Recommandation SEO (iZyLiFy) */
.callout-partner {
    background: linear-gradient(135deg, rgba(46, 160, 67, 0.12) 0%, rgba(88, 166, 255, 0.12) 100%);
    border: 1px solid rgba(88, 166, 255, 0.35);
    border-radius: var(--radius-md);
    padding: 1.85rem;
    margin-top: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.callout-partner h3 {
    margin-top: 0;
    color: #ffffff;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.callout-partner p {
    color: var(--text-body);
    font-size: 0.98rem;
}

.callout-partner p:last-child {
    margin-bottom: 0;
}

/* Fil d'Ariane (Breadcrumbs) */
.breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding: 0.35rem 0.85rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}

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

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

.breadcrumb span.sep {
    opacity: 0.4;
}

/* Grille des Guides */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.4rem;
    margin: 2rem 0;
}

.guide-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.guide-card:hover {
    border-color: var(--green-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.guide-card-tag {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--green-light);
    margin-bottom: 0.6rem;
}

.guide-card h3 {
    margin: 0 0 0.6rem;
    color: #ffffff;
    font-size: 1.15rem;
    line-height: 1.35;
}

.guide-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 1.2rem;
}

.guide-card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--blue);
}

.guide-card:hover .guide-card-action {
    color: var(--green-light);
}

/* ==========================================================================
   FOOTER MODERNE
   ========================================================================== */
footer {
    background: #05080e;
    border-top: 1px solid var(--border);
    padding: 3.5rem 1.5rem 2.5rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--green-light);
}

.footer-bottom {
    max-width: 1140px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
}

/* ==========================================================================
   BREAKPOINTS RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    .burger-btn {
        display: flex;
    }
    .header-inner {
        padding: 0.75rem 1rem;
    }
    .container {
        padding: 1.5rem 1rem 3.5rem;
    }
    .hero {
        padding: 2.5rem 1rem 3rem;
    }
    .hero h1 {
        font-size: 1.85rem;
    }
    .hero p.lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    .content-block {
        padding: 1.4rem 1.15rem;
        border-radius: var(--radius-sm);
    }
    .bento-grid-2 {
        grid-template-columns: 1fr;
    }
    .guides-grid {
        grid-template-columns: 1fr;
    }
    .table-wrap table {
        min-width: 400px;
        font-size: 0.85rem;
    }
    .callout-partner {
        padding: 1.35rem 1.1rem;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.25rem 0.75rem 3rem;
    }
    .content-block {
        padding: 1.25rem 0.9rem;
    }
    h2 {
        font-size: 1.3rem;
    }
    .brand {
        font-size: 1.05rem;
    }
}
