/* --- GLOBAL CONFIG --- */
:root {
    --bg-color: #060606;
    --card-bg: #0d1216;
    --text-color: #e6e6e6;
    --neon-orange: #FF6B00;
    --neon-green: #0aff47;
    --neon-blue: #13aff0;
    --neon-purple: #bd00ff;
    --neon-red: #ff003c;
    --cyber-font: 'Cinzel', serif;
    --code-font: 'JetBrains Mono', monospace;
    --ui-font: 'Inter', sans-serif;
    --alert-red: #ff0055;
    --bg-dark: #060606;
    --core-size: 120px;
    --ring-size: 340px;
    --sysbar-height: 40px;

    /* App Colors */
    --quiz-gradient: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--code-font);
    line-height: 1.6;
    /* espacement entre les lignes */
    overflow-x: hidden;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        linear-gradient(0deg, rgba(255, 107, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 0, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* --- MODALS & OVERLAY --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 3000;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

.modal-header-nav {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.nav-btn {
    background: #2c2c2e;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    left: 10px;
    right: 10px;
    bottom: 20px;
    background: #222;
    border-radius: 20px;
    z-index: 1;
    opacity: 0.6;
    transform: scale(0.95);
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: center;
    justify-content: space-around;
    align-items: center;
}

.modal-content {
    width: -webkit-fill-available;
    height: auto;
}

/* --- FLASHCARDS UI --- */
.fc-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: var(--ui-font);
}

.fc-top-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 1.1rem;
}

.fc-counter-badge {
    background: #2c2c2e;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #aaa;
}

.fc-progress-bg {
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin-bottom: 15px;
    width: 100%;
}

.fc-progress-fill {
    height: 100%;
    background: var(--neon-orange);
    width: 30%;
    border-radius: 2px;
    transition: width 0.3s;
}

.fc-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
}

.fc-scene {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    perspective: 1000px;
    margin-bottom: auto;
}

.fc-stack-1 {
    position: absolute;
    top: -10px;
    left: 10px;
    right: 10px;
    bottom: 20px;
    background: #222;
    border-radius: 20px;
    z-index: 1;
    opacity: 0.6;
    transform: scale(0.95);
}

.fc-stack-2 {
    position: absolute;
    top: -20px;
    left: 20px;
    right: 20px;
    bottom: 40px;
    background: #111;
    border-radius: 20px;
    z-index: 0;
    opacity: 0.4;
    transform: scale(0.9);
}

.fc-card {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 10;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.fc-card.flipped {
    transform: rotateY(180deg);
}

.fc-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: #1c1c1e;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.fc-back {
    transform: rotateY(180deg);
    background: #252527;
}

.fc-q-badge {
    position: absolute;
    top: 25px;
    left: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 1.1rem;
}

.fc-q-icon {
    background: rgba(255, 159, 10, 0.2);
    color: var(--neon-orange);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.fc-num-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    background: var(--neon-orange);
    color: black;
    font-weight: bold;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.fc-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    line-height: 1.4;
}

.fc-tap-hint {
    position: absolute;
    bottom: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fc-controls {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 30px 0;
    margin-top: auto;
}

.article-toolbar {
    display: flex;
    justify-content: center;
    /* centre horizontalement */
    align-items: center;
    /* aligne verticalement */
    gap: 8px;
    /* espace entre les boutons */
    margin: 12px 0;
    flex-wrap: wrap;
    /* (optionnel) permet le retour à la ligne si trop petit */
}

.fc-action-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: 0.2s;
}

.fc-btn-no {
    background: rgba(255, 69, 58, 0.15);
    color: var(--neon-red);
}

.fc-btn-yes {
    background: rgba(48, 209, 88, 0.15);
    color: var(--neon-green);
}

.fc-action-btn:active {
    transform: scale(0.9);
    filter: brightness(1.2);
}

/* --- QUIZ UI --- */
.qz-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    font-family: var(--ui-font);
}


.qz-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 1.2rem;
}

.qz-badge {
    background: #2c2c2e;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #888;
}

.qz-progress-bg {
    height: 6px;
    background: #222;
    border-radius: 3px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.qz-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #bf5af2, #0a84ff);
    width: 50%;
    border-radius: 3px;
    transition: width 0.3s;
}

.qz-question-box {
    background: #1c1c1e;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #333;
}

.qz-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0a84ff;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.qz-label i {
    background: rgba(10, 132, 255, 0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.qz-text {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
}

.qz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qz-option {
    background: #2c2c2e;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.2s;
}

.qz-option:active {
    background: #3a3a3c;
}

.qz-letter {
    background: #3a3a3c;
    color: #ccc;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.qz-option.correct {
    background: rgba(48, 209, 88, 0.15);
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.qz-option.wrong {
    background: rgba(255, 69, 58, 0.15);
    border-color: var(--neon-red);
    color: var(--neon-red);
}

.qz-next-btn {
    margin-top: 30px;
    padding: 16px;
    border-radius: 12px;
    background: #5e5ce6;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    border: none;
    width: 100%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* --- SYSTEM BAR --- */
.sys-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 20px 10px 10px;
    background: rgb(9 13 16);
    border-bottom: 1px solid rgb(14 88 119);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    backdrop-filter: blur(5px);
    z-index: 100;
    /* valeur finale consolidée */
}

.sys-status {
    color: var(--neon-green);
}

.back-btn {
    display: none;
    cursor: pointer;
    color: var(--neon-orange);
    font-weight: bold;
    text-transform: uppercase;
}

.view-section {
    display: none;
    min-height: 100vh;
    padding-top: var(--sysbar-height);
    animation: fadeIn 0.5s ease;
}

.view-section.active {
    display: block;
}

/* --- SHARE TOOLBAR --- */
.share-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.share-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #aaa;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--code-font);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    text-decoration: none;
}

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

.action-btn {
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-family: var(--ui-font);
    font-size: 0.9rem;
}

.container-btns-pic {
    margin-top: 2rem;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    align-content: center;
    align-items: stretch;
}

.pic-container {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.contact-btns {
    /* margin-top: 2rem; */
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-flash {
    background: var(--neon-orange);
    color: black;
}

.btn-quiz {
    background: var(--neon-blue);
    color: white;
}

.sys-id {
    color: var(--neon-green);
    font-size: 0.8rem;

}

/* --- PORTFOLIO --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.2rem;
    position: relative;
}

.port-h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    /* espace entre l’icône et le texte */
}


h1.port-h1 {
    font-family: var(--cyber-font);
    font-size: 3.5rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-shadow: 2px 2px 0 var(--neon-orange), -2px -2px 0 var(--neon-blue);
}


h2.port-h2 {
    font-family: var(--cyber-font);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
    width: 100%;
}

.tagline {
    font-family: var(--code-font);
    font-size: 1.1rem;
    color: var(--neon-blue);
    margin-bottom: 2rem;
    font-weight: 700;
    display: block;
}

.highlight-orange {
    color: var(--neon-orange);
}

.highlight-purple {
    color: var(--neon-purple);
}

.highlight-blue {
    color: var(--neon-blue);
}

.highlight-red {
    color: var(--neon-red);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 17px 35px;
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.btn-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.btn-oxford {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.btn-hack {
    border-color: var(--neon-orange);
    color: var(--neon-orange);
}

.timeline {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
    margin-left: 1rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 5px;
    width: 1rem;
    height: 1rem;
    background: var(--bg-color);
    border: 2px solid var(--text-color);
    border-radius: 50%;
}

.timeline-item.research::before {
    border-color: var(--neon-purple);
    box-shadow: 0 0 10px var(--neon-purple);
}

.timeline-item.ciso::before {
    border-color: var(--neon-orange);
    box-shadow: 0 0 10px var(--neon-orange);
}

.timeline-item.navy::before {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
}

.role-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3rem;
}

.company {
    font-size: 1rem;
    color: var(--neon-blue);
    margin-bottom: 0.2rem;
    display: block;
}

.summary {
    font-size: 0.95rem;
    color: #aaa;
    margin-top: 0.5rem;
    font-style: italic;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.card,
.project-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    z-index: 1;
    position: relative;
}

.card h3,
.project-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: var(--code-font);
    color: #fff;
    display: flex;
}

.card li {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 5px;
    border-left: 2px solid transparent;
    padding-left: 10px;
}

.card:hover,
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.project-card {
    border: none;
    background: #0d1216;
    position: relative;
    z-index: 0;
    overflow: hidden;
    padding: 2px;
    border-radius: 8px;
}

.project-content {
    background: var(--card-bg);
    height: 100%;
    padding: 1.5rem;
    border-radius: 6px;
    position: relative;
    z-index: 2;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, var(--neon-blue), transparent 30%);
    animation: rotate 4s linear infinite;
    z-index: 1;
}

@keyframes rotate {
    100% {
        transform: rotate(1turn);
    }
}

.project-card.border-orange::before {
    background: conic-gradient(transparent, var(--neon-orange), transparent 30%);
}

.project-card.border-green::before {
    background: conic-gradient(transparent, var(--neon-green), transparent 30%);
}

.project-card.border-purple::before {
    background: conic-gradient(transparent, var(--neon-purple), transparent 30%);
}

.project-card.border-blue::before {
    background: conic-gradient(transparent, var(--neon-blue), transparent 30%);
}

.border-purple {
    border-top: 3px solid var(--neon-purple);
}

.border-orange {
    border-top: 3px solid var(--neon-orange);
}

.border-green {
    border-top: 3px solid var(--neon-green);
}

.border-red {
    border-top: 3px solid var(--neon-red);
}

.border-blue {
    border-top: 3px solid var(--neon-blue);
}

/* --- BLOG & KB SHARED STYLES --- */
.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.console-output {
    font-family: var(--code-font);
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border: 1px solid #333;
    margin-bottom: 2rem;
    color: var(--neon-green);
    font-size: 0.9rem;
    position: relative;
}

.console-input {
    background: transparent;
    border: none;
    color: var(--neon-green);
    font-family: var(--code-font);
    font-size: 0.9rem;
    outline: none;
    width: 50%;
    font-weight: bold;
    text-transform: uppercase;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.article-entry {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--card-bg);
    border-left: 3px solid var(--text-color);
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 1rem;
}

.article-entry:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--neon-orange);
}

.article-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-right: 10px;
    border: 1px solid #333;
    opacity: 0.7;
    transition: all 0.3s;
    border-radius: 4px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.article-entry:hover .article-thumb {
    opacity: 1;
    border-color: var(--neon-orange);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.2);
}

.thumb-icon {
    font-size: 2.5rem;
    color: #444;
}

.article-entry:hover .thumb-icon {
    color: var(--neon-orange);
}

.article-info {
    flex: 1;
}

.article-title {
    font-family: var(--cyber-font);
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.3;
}

.article-date {
    font-family: var(--code-font);
    font-size: 0.8rem;
    opacity: 0.5;
    display: block;
    margin-top: 0.2rem;
}

/* Restored CSS from old file */
.article-desc {
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    color: #bbb;
}

.article-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.file-icon {
    font-size: 1rem;
}

.kb-container {
    display: flex;
    height: calc(100vh - var(--sysbar-height));
    /* toute la fenêtre moins la sys-bar */
}


.kb-sidebar {
    width: 300px;
    background: #090d10;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    font-family: var(--code-font);
    font-size: 0.9rem;

    position: sticky;
    top: var(--sysbar-height);

    /* 🟩 TRÈS IMPORTANT : laisser la sidebar prendre toute la hauteur du container */
    height: calc(100vh - var(--sysbar-height));

    /* pas de overflow visible ici */
    overflow: hidden;

    display: flex;
    flex-direction: column;
}


.kb-main {
    flex: 1;
    height: calc(100vh - var(--sysbar-height));
    overflow-y: auto;
    /* ✔ c’est ici que le scroll doit être */
}

.kb-sidebar .inner {
    overflow-y: auto;
    flex: 1;
}




@keyframes glitch-anim {
    0% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    20% {
        clip: rect(70px, 9999px, 90px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 50px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 20px, 0);
    }

    80% {
        clip: rect(40px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(60px, 9999px, 80px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    20% {
        clip: rect(90px, 9999px, 70px, 0);
    }

    40% {
        clip: rect(50px, 9999px, 10px, 0);
    }

    60% {
        clip: rect(20px, 9999px, 80px, 0);
    }

    80% {
        clip: rect(60px, 9999px, 40px, 0);
    }

    100% {
        clip: rect(80px, 9999px, 60px, 0);
    }
}

@keyframes glitch-skew {
    0% {
        transform: skew(0deg);
    }

    20% {
        transform: skew(-2deg);
    }

    40% {
        transform: skew(2deg);
    }

    60% {
        transform: skew(-1deg);
    }

    80% {
        transform: skew(1deg);
    }

    100% {
        transform: skew(0deg);
    }
}

/* HIDDEN DATA UNLOCK ANIMATION */
/* on garde uniquement l'état .data-unlocked, la base est redéfinie plus bas */
#secret-data.data-unlocked {
    max-height: 27px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 10px;
    margin-bottom: 20px;
}

.badges-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* --- MUSIC / PORTAL MUSIC AREA --- */
.music-trigger {
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;

    transition: all 0.3s;
    z-index: 20;
    font-size: 1.5rem;
    border: 1px solid rgb(16 122 167);
    padding: 10px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}

.music-trigger:hover {
    color: var(--neon-red);
    border-color: var(--neon-red);
    box-shadow: 0 0 15px var(--neon-red);
    transform: scale(1.1);
}

.music-frame-container {
    width: 100%;
    max-width: 660px;
    margin: 2rem auto 4rem auto;
    padding: 0;
    background: #000;
    border: 1px solid #000000;
    box-shadow: 0 0 20px rgb(0 0 0 / 20%);
    border-radius: 12px;
    overflow: hidden;
}

.music-frame-container iframe {
    width: 100%;
    height: 450px;
    border: none;
    display: block;
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

.music-card {
    background: #0d1216;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.music-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-red);
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.3);
}

.album-cover {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    filter: grayscale(60%);
    transition: 0.3s;
}

.music-card:hover .album-cover {
    filter: grayscale(0%);
}

.music-info {
    padding: 0.3rem;
    background: rgba(0, 0, 0, 0.9);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.band-name {
    color: #fff;
    font-weight: bold;
    display: flex;
    text-transform: capitalize;
    font-size: 0.9rem;
    justify-content: center;
}

/* --- TOOLBAR BUTTONS --- */
.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--code-font);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* --- HOVER EFFECT --- */
.tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(19, 175, 240, 0.1);
    transform: translateY(-1px);
}

/* Bouton "Close" spécifique */
.tool-btn[onclick*="navigateTo('blog')"]:hover {
    border-color: var(--neon-red);
    color: var(--neon-red);
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.1);
}

/* Icone à l'intérieur */
.tool-btn i {
    font-size: 0.9rem;
    transition: transform 0.2s;
}

/* Petit mouvement de l'icône au survol */
.tool-btn:hover i {
    transform: scale(1.1);
}

/* --- Music Reveal Styles --- */
#music-lock-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
}

#music-content {
    display: none;
    animation: fadeIn 1s ease;
}

.reveal-btn {
    background: transparent;
    border: 2px solid var(--neon-red);
    color: var(--neon-red);
    padding: 15px 30px;
    font-family: var(--code-font);
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.2);
}

.reveal-btn:hover {
    background: var(--neon-red);
    color: black;
    box-shadow: 0 0 30px rgba(255, 0, 60, 0.6);
}

/* merged: base + extension */
.bottom-icons-container {
    display: flex;
    gap: 25px;
    flex-direction: row;
    position: relative;
    top: 40px;
    margin-top: 15px;
}

/* --- AUDIO TOGGLE BTN --- */
.audio-toggle-btn {
    margin-left: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-family: var(--code-font);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #aaa;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.audio-toggle-btn i {
    font-size: 0.7rem;
    margin-right: 4px;
}

.audio-toggle-btn:hover {
    color: var(--neon-red);
    border-color: var(--neon-red);
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
}

/* Quand la musique joue, on affiche le bouton */
body.audio-playing .audio-toggle-btn {
    display: inline-flex;
}

/* --- PORTAL HOME (LAYOUT) --- */
/* version fusionnée / finale */
#portal-view {
    height: 100vh;
    background-color: #06060626;
    perspective: 1000px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* dernier état */
    align-items: center;
    text-align: center;
    padding: 8vh 0 10vh 0;
}

/* État par défaut : spin léger, glow discret (version la plus récente) */
.portal-ring {
    width: 300px;
    height: 300px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--neon-blue);
    border-radius: 50%;
    position: absolute;
    animation: spin 15s linear infinite;
    box-shadow: 0 0 15px rgba(19, 175, 240, 0.2);
    pointer-events: none;
}

.portal-ring::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-bottom: 2px solid var(--neon-orange);
    border-radius: 50%;
    animation: spin 10s linear infinite reverse;
}

/* Quand la musique joue : mode "quantique" */
.portal-ring.ring-active {
    animation: spin 12s linear infinite, ring-glow 1.6s ease-in-out infinite;
    box-shadow:
        0 0 20px rgba(19, 175, 240, 0.6),
        0 0 40px rgba(189, 0, 255, 0.4);
    border-top-color: var(--neon-purple);
}

.portal-ring.ring-active::after {
    border-bottom-color: var(--neon-green);
    box-shadow:
        0 0 25px rgba(255, 107, 0, 0.6),
        0 0 45px rgba(255, 0, 60, 0.5);
}

/* Pulse/glow */
@keyframes ring-glow {
    0% {
        transform: scale(1);
        filter: hue-rotate(0deg);
    }

    50% {
        transform: scale(1.06);
        filter: hue-rotate(40deg);
    }

    100% {
        transform: scale(1);
        filter: hue-rotate(0deg);
    }
}

/* --- 1. ARRIÈRE-PLAN GRID (HACKER VIBE) --- */
.cyber-grid {
    position: fixed;
    left: -50vw;
    top: 50vh;
    width: 200vw;
    height: 200vh;

    background-image:
        linear-gradient(rgba(0, 242, 255, 0.11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.11) 1px, transparent 1px);
    background-size: 50px 50px;

    transform-origin: 50% 0%;
    transform: perspective(900px) rotateX(78deg);
    animation: grid-move 10s linear infinite;

    /* --- FADE SUR LES 10% DU "LOIN" (haut du plan) --- */
    -webkit-mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0%,
            /* totalement transparent au tout début */
            rgba(0, 0, 0, 1) 10%,
            /* à partir de 10% : opaque */
            rgba(0, 0, 0, 1) 100%);
    mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 1) 10%,
            rgba(0, 0, 0, 1) 100%);

    pointer-events: none;
    z-index: -1;
}


/* --- 2. STRUCTURE DU RÉACTEUR (CENTRE ABSOLU) --- */
.reactor-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--ring-size);
    height: var(--ring-size);
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    z-index: 1;
    transition: all 0.5s ease-out;
    pointer-events: none;
}

/* --- 3. CŒUR QUANTIQUE --- */
.quantum-core {
    width: var(--core-size);
    height: var(--core-size);
    background: radial-gradient(circle, #fff 0%, var(--neon-blue) 40%, transparent 70%);
    border-radius: 50%;
    box-shadow:
        0 0 30px var(--neon-blue),
        0 0 60px var(--neon-purple),
        inset 0 0 20px #fff;
    animation: core-pulse 3s ease-in-out infinite alternate;
    position: relative;
    z-index: 20;
}

.quantum-core::after {
    content: '';
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    right: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    filter: blur(4px);
    opacity: 0.7;
    animation: internal-instability 0.2s infinite;
}

/* --- 4. BOUCLIERS --- */
.shield-layer {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
    transition: border-color 0.5s, box-shadow 0.5s;
}

.segment-1 {
    width: 100%;
    height: 100%;
    border-top: 2px solid var(--neon-purple);
    border-bottom: 2px dashed var(--neon-purple);
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.2);
    animation: spin-tilt 20s linear infinite;
}

.segment-2 {
    width: 80%;
    height: 80%;
    border-left: 4px solid var(--neon-blue);
    border-right: 1px dotted var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    animation: spin-tilt 10s linear infinite reverse;
}

.segment-3 {
    width: 60%;
    height: 60%;
    border: 1px dashed var(--neon-green);
    opacity: 0.6;
    animation: spin 5s linear infinite;
}

.particle {
    position: absolute;
    width: 90%;
    height: 90%;
    animation: spin 8s linear infinite;
}

.particle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    border-radius: 50%;
}

/* --- ANIMATIONS --- */
@keyframes grid-move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 50px;
    }
}

@keyframes core-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes internal-instability {
    0% {
        transform: translate(1px, 1px);
    }

    50% {
        transform: translate(-1px, -1px);
    }

    100% {
        transform: translate(1px, 1px);
    }
}

/* spin final (ancienne version supprimée) */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-tilt {
    0% {
        transform: rotate3d(1, 1, 1, 0deg);
    }

    100% {
        transform: rotate3d(1, 1, 1, 360deg);
    }
}

/* --- MODE ACTIF (MUSIQUE ON) --- */
.reactor-container.active-mode .quantum-core {
    background: radial-gradient(circle, #fff 0%, var(--alert-red) 50%, transparent 70%);
    box-shadow: 0 0 50px var(--alert-red), 0 0 100px var(--alert-red);
    animation: core-pulse 0.2s ease-in-out infinite alternate;
}

.reactor-container.active-mode .segment-1 {
    border-color: var(--alert-red);
    border-bottom-color: transparent;
    animation-duration: 2s;
    box-shadow: 0 0 20px var(--alert-red);
}

.reactor-container.active-mode .segment-2 {
    border-color: #ff9900;
    animation-duration: 1.5s;
}

.reactor-container.active-mode .particle::before {
    background: var(--alert-red);
    box-shadow: 0 0 15px var(--alert-red);
}

.reactor-container.active-mode {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) infinite;
}

@keyframes shake {

    10%,
    90% {
        transform: translate(-51%, -50%);
    }

    20%,
    80% {
        transform: translate(-49%, -50%);
    }

    30%,
    50%,
    70% {
        transform: translate(-52%, -50%);
    }

    40%,
    60% {
        transform: translate(-48%, -50%);
    }
}

/* --- UI DU HAUT (Titre & Badges) --- */
.top-section-ui {
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.sub-identity {
    letter-spacing: 5px;
    opacity: 0.8;
    font-family: 'Share Tech Mono', monospace;
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
}

/* --- BADGES "DATA STREAM" --- */
#secret-data {
    /* 1. Layout (On garde votre structure) */
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;

    /* 2. ÉTAT CACHÉ (C'est ce qui manquait) */
    max-height: 0;
    /* Hauteur nulle au départ */
    opacity: 0;
    /* Invisible */
    overflow: hidden;
    /* Empêche le contenu de déborder */
    transform: translateY(10px);
    /* Légèrement décalé vers le bas */
    margin-top: 0;
    /* Pas de marge quand c'est fermé */
    pointer-events: none;
    /* Empêche de cliquer sur les liens invisibles */

    /* 3. Animation fluide */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ÉTAT DÉVERROUILLÉ (Activé par JS via la classe .data-unlocked) */
#secret-data.data-unlocked {
    max-height: 200px;
    /* Suffisamment grand pour afficher le contenu */
    opacity: 1;
    /* Visible */
    transform: translateY(0);
    /* Revient à sa place */
    margin-top: 15px;
    /* Ajoute l'espace */
    margin-bottom: 20px;
    pointer-events: auto;
    /* Réactive les clics */
}

/* badges individuels */
.cyber-badge {
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 1px solid transparent;
}

.cyber-badge:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 8px var(--neon-blue);
    border-bottom: 1px solid var(--neon-blue);
    transform: translateY(-2px);
}

.cyber-badge i {
    font-size: 0.9em;
}

/* --- UI DU BAS (Menu Futuriste) --- */
.portal-menu {
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.portal-btn {
    background: rgba(10, 15, 20, 0.7);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: var(--neon-blue);
    padding: 15px 25px;
    min-width: 140px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: 'Share Tech Mono', monospace;
    position: relative;
    backdrop-filter: blur(4px);
    clip-path: polygon(15px 0,
            100% 0,
            100% calc(100% - 15px),
            calc(100% - 15px) 100%,
            0 100%,
            0 15px);
}

.portal-btn span {
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.portal-btn small {
    font-size: 0.6rem;
    opacity: 0.6;
    letter-spacing: 1px;
}

.portal-btn i {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.8);
}

/* Hover Effect Scanline */
.portal-btn:hover {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    transform: translateY(-5px);
}

.portal-btn:hover i {
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

/* Barre décorative en bas des boutons */
.portal-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    opacity: 0.5;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    h1.port-h1 {
        font-size: 2.5rem;
    }

    .container::before {
        display: none;
    }

    .portal-menu {
        gap: 10px;
    }

    .portal-btn {
        min-width: 30%;
        padding: 10px;
    }

    .portal-btn span {
        font-size: 0.8rem;
    }

    .portal-btn i {
        font-size: 1.2rem;
    }

    .portal-title {
        font-size: 3rem;
        top: 20px;
    }

    /* On remonte un peu le centre sur mobile */
    .reactor-container {
        top: 50%;
    }

    .article-entry {
        flex-direction: column;
    }

    .article-thumb {
        width: 100%;
        height: 150px;
        margin-bottom: 1rem;
    }

    .kb-container {
        flex-direction: column;
    }


    /* ÉTAT DÉVERROUILLÉ (Activé par JS via la classe .data-unlocked) */
    #secret-data.data-unlocked {
        max-height: 200px;
        /* Suffisamment grand pour afficher le contenu */
        opacity: 1;
        /* Visible */
        transform: translateY(0);
        /* Revient à sa place */
        margin-top: 15px;
        /* Ajoute l'espace */
        margin-bottom: 20px;
        pointer-events: auto;
        /* Réactive les clics */
    }

    /* badges individuels */
    .cyber-badge {
        color: rgba(255, 255, 255, 0.5);
        font-family: 'Share Tech Mono', monospace;
        font-size: 1rem;
        text-transform: uppercase;
        text-decoration: none;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 5px;
        border-bottom: 1px solid transparent;
    }

    .cyber-badge:hover {
        color: var(--neon-blue);
        text-shadow: 0 0 8px var(--neon-blue);
        border-bottom: 1px solid var(--neon-blue);
        transform: translateY(-2px);
    }

    .cyber-badge i {
        font-size: 0.9em;
    }

    /* --- UI DU BAS (Menu Futuriste) --- */
    .portal-menu {
        z-index: 10;
        display: flex;
        justify-content: center;
        gap: 20px;
        width: 100%;
        max-width: 800px;
        padding: 0 20px;
        flex-wrap: wrap;
    }

    .portal-btn {
        background: rgba(10, 15, 20, 0.7);
        border: 1px solid rgba(0, 243, 255, 0.3);
        color: var(--neon-blue);
        padding: 15px 25px;
        min-width: 140px;
        cursor: pointer;
        transition: all 0.3s;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        font-family: 'Share Tech Mono', monospace;
        position: relative;
        backdrop-filter: blur(4px);
        clip-path: polygon(15px 0,
                100% 0,
                100% calc(100% - 15px),
                calc(100% - 15px) 100%,
                0 100%,
                0 15px);
    }

    .portal-btn span {
        font-size: 1rem;
        font-weight: bold;
        letter-spacing: 2px;
    }

    .portal-btn small {
        font-size: 0.6rem;
        opacity: 0.6;
        letter-spacing: 1px;
    }

    .portal-btn i {
        font-size: 1.5rem;
        margin-bottom: 5px;
        color: rgba(255, 255, 255, 0.8);
    }

    /* Hover Effect Scanline */
    .portal-btn:hover {
        background: rgba(0, 243, 255, 0.15);
        border-color: var(--neon-blue);
        box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
        transform: translateY(-5px);
    }

    .portal-btn:hover i {
        color: var(--neon-blue);
        text-shadow: 0 0 10px var(--neon-blue);
    }

    /* Barre décorative en bas des boutons */
    .portal-btn::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
        opacity: 0.5;
    }
}


/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    h1.port-h1 {
        font-size: 2.5rem;
    }

    .container::before {
        display: none;
    }

    .portal-menu {
        gap: 10px;
    }

    .portal-btn {
        min-width: 30%;
        padding: 10px;
    }

    .portal-btn span {
        font-size: 0.8rem;
    }

    .portal-btn i {
        font-size: 1.2rem;
    }

    .portal-title {
        font-size: 3rem;
        top: 20px;
    }

    /* On remonte un peu le centre sur mobile */
    .reactor-container {
        top: 50%;
    }

    .article-entry {
        flex-direction: column;
    }

    .article-thumb {
        width: 100%;
        height: 150px;
        margin-bottom: 1rem;
    }



    .music-trigger {
        bottom: 20px;
        right: 20px;

        width: 40px;
        height: 40px;
    }

    /* Mobile Music Grid: 3 per row */
    .music-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;

        margin-top: 2rem;
    }

    .band-name {
        font-size: 0.6rem;
        padding: 2px;
    }

}

/* --- RESTORED STYLES --- */

.kb-search-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    padding: 8px;
    width: 100%;
    color: #fff;
    font-family: var(--code-font);
    margin-bottom: 1rem;
    border-radius: 4px;
}

.kb-search-box:focus {
    outline: none;
    border-color: var(--neon-purple);
}

.tree-item {
    margin-left: 1rem;
    cursor: pointer;
    padding: 5px;
    color: #aaa;
    display: block;
}

.tree-item:hover {
    color: var(--neon-purple);
    background: rgba(255, 255, 255, 0.05);
}

.tree-item i {
    margin-right: 8px;
    color: #555;
    font-size: 0.8rem;
}

.tree-item:hover i {
    color: var(--neon-purple);
}

.tree-folder {
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    margin-top: 10px;
    cursor: pointer;
}

.tree-children {
    display: none;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.tree-children.open {
    display: block;
}

/* article-list  2 card per row in mobile */
@media (max-width: 768px) {
    .article-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.article-body {
    margin-top: 1rem;
    font-family: sans-serif;
    line-height: 1.1;
    color: #ccc;
    max-width: 100%;
    padding: 10px;
}

.article-body img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 4px;
}

.article-body h1 {
    color: var(--neon-purple);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    border-bottom: 1px solid rgba(189, 0, 255, 0.3);
    padding-bottom: 0.5rem;
    font-family: var(--cyber-font);
    font-size: 2rem;
}

.article-body h2 {
    color: var(--neon-blue);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    border-bottom: 1px solid rgba(19, 175, 240, 0.3);
    padding-bottom: 0.5rem;
    font-family: var(--cyber-font);
    font-size: 1.5rem;
}

.article-body h3 {
    color: var(--neon-orange);
    margin-top: 1.2em;
    margin-bottom: 0.5em;
    font-family: var(--code-font);
    font-size: 1.2rem;
    font-weight: bold;
}

.article-body h4 {
    color: var(--neon-green);
    margin-top: 1.2em;
    margin-bottom: 0.5em;
    font-family: var(--code-font);
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
}

.article-body p {
    margin-bottom: 1rem;
    text-align: justify;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    position: relative;
}

.article-body ul li::marker {
    color: var(--neon-blue);
}

.article-body ol li::marker {
    color: var(--neon-orange);
    font-family: var(--code-font);
    font-weight: bold;
}

.article-body strong {
    color: #fff;
    font-weight: 700;
}

.article-body em {
    color: var(--neon-blue);
    font-style: italic;
}

.article-body code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--code-font);
    color: var(--neon-orange);
    font-size: 0.9em;
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.article-body pre {
    background: #000;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid #333;
    margin-bottom: 1.5rem;
}

.article-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    border: none;
}

.article-body blockquote {
    border-left: 3px solid var(--neon-orange);
    padding-left: 1rem;
    color: #999;
    font-style: italic;
}

/* --- PORTAL TITLE & GLITCH --- */
.portal-title {
    font-family: var(--cyber-font);
    font-size: 4rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.3);
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    position: relative;
    line-height: 1;
}

/* HOVER PADLOCK EFFECT */
.portal-title:hover::after {
    content: '\f023';
    /* FontAwesome Lock Icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.5rem;
    position: absolute;
    top: -20px;
    right: -20px;
    color: var(--neon-red);
    animation: fadeIn 0.3s ease;
}

/* GLITCH ANIMATION CLASS */
.glitch-active {
    animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    color: var(--neon-red);
}

.glitch-active::before,
.glitch-active::after {
    content: "INFINITION";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch-active::before {
    left: 2px;
    color: var(--neon-purple);
    background: rgba(255, 255, 255, 0.05);
}

.tree-item i {
    margin-right: 8px;
    color: #555;
    font-size: 0.8rem;
}

.tree-item:hover i {
    color: var(--neon-purple);
}

.tree-folder {
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    margin-top: 10px;
    cursor: pointer;
}

.tree-children {
    display: none;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.tree-children.open {
    display: block;
}

.article-body h1 {
    color: var(--neon-purple);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    border-bottom: 1px solid rgba(189, 0, 255, 0.3);
    padding-bottom: 0.5rem;
    font-family: var(--cyber-font);
    font-size: 2rem;
}

.article-body h2 {
    color: var(--neon-blue);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    border-bottom: 1px solid rgba(19, 175, 240, 0.3);
    padding-bottom: 0.5rem;
    font-family: var(--cyber-font);
    font-size: 1.5rem;
}

.article-body h3 {
    color: var(--neon-orange);
    margin-top: 1.2em;
    margin-bottom: 0.5em;
    font-family: var(--code-font);
    font-size: 1.2rem;
    font-weight: bold;
}

.article-body h4 {
    color: var(--neon-green);
    margin-top: 1.2em;
    margin-bottom: 0.5em;
    font-family: var(--code-font);
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
}

.article-body p {
    margin-bottom: 1rem;
    text-align: justify;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    position: relative;
}

.article-body ul li::marker {
    color: var(--neon-blue);
}

.article-body ol li::marker {
    color: var(--neon-orange);
    font-family: var(--code-font);
    font-weight: bold;
}

.article-body strong {
    color: #fff;
    font-weight: 700;
}

.article-body em {
    color: var(--neon-blue);
    font-style: italic;
}

.article-body code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--code-font);
    color: var(--neon-orange);
    font-size: 0.9em;
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.article-body pre {
    background: #000;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid #333;
    margin-bottom: 1.5rem;
}

.article-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    border: none;
}

.article-body blockquote {
    border-left: 3px solid var(--neon-orange);
    padding-left: 1rem;
    color: #999;
    font-style: italic;
}

/* --- PORTAL TITLE & GLITCH --- */
.portal-title {
    font-family: var(--cyber-font);
    font-size: 4rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.3);
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    position: relative;
    line-height: 1;
}

/* HOVER PADLOCK EFFECT */
.portal-title:hover::after {
    content: '\f023';
    /* FontAwesome Lock Icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.5rem;
    position: absolute;
    top: -20px;
    right: -20px;
    color: var(--neon-red);
    animation: fadeIn 0.3s ease;
}

/* GLITCH ANIMATION CLASS */
.glitch-active {
    animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    color: var(--neon-red);
}

.glitch-active::before,
.glitch-active::after {
    content: "INFINITION";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch-active::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

.glitch-active::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 2s infinite linear alternate-reverse;
}

.article-body h5 {
    color: var(--neon-blue);
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-family: var(--code-font);
    font-size: 1rem;
    font-weight: bold;
    text-decoration: underline;
}

.article-body h6 {
    color: var(--neon-purple);
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-family: var(--code-font);
    font-size: 0.9rem;
    font-style: italic;
}

/* --- MODAL ACTIVE STATE FIX --- */
.modal-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* --- Mobile KB Sidebar Slide --- */
.kb-toggle-btn {
    display: none;
}

/* MOBILE (max 768px) — VERSION 100% OPÉRATIONNELLE */
@media (max-width: 768px) {





    /* SIDEBAR MOBILE SLIDE LEFT */
    .kb-sidebar {
        position: fixed;
        top: var(--sysbar-height);
        bottom: 0;
        left: -80%;
        width: 80%;
        background: #090d10;
        border-right: 1px solid rgba(255, 255, 255, 0.15);
        z-index: 4000;
        padding: 1rem;
        overflow-y: auto;
        transition: left 0.35s ease;
    }

    .kb-sidebar.open {
        left: 0;
    }

    /* BACKDROP */
    .kb-backdrop {
        position: fixed;
        top: var(--sysbar-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--sysbar-height));
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
        z-index: 3500;
    }

    .kb-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Empêcher le contenu de bouger */
    .kb-main {
        position: relative;
        z-index: 1;
    }
}





/* --- MOBILE KB SIDEBAR : ADVANCED UX OVERRIDES --- */
@media (max-width: 768px) {

    body {
        overscroll-behavior-y: none;
        /* évite que le body scroll derrière */
    }

    .kb-container {
        flex-direction: column;
    }

    .kb-sidebar {
        position: fixed;
        top: var(--sysbar-height);
        bottom: 0;
        left: 0;
        width: 80%;
        max-width: 360px;
        background: #090d10;
        border-right: 1px solid rgba(255, 255, 255, 0.15);
        z-index: 4000;
        padding: 1rem;
        overflow: hidden;

        /* slide + tilt 3D */
        transform: translate3d(-100%, 0, 0) rotateY(12deg);
        transform-origin: left center;
        transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    }

    .kb-sidebar.open {
        transform: translate3d(0, 0, 0) rotateY(0deg);
    }

    .kb-sidebar.dragging {
        transition: none;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
    }

    .kb-sidebar .inner {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* inertie iOS */
        overscroll-behavior: contain;
        /* ne propage pas le scroll au body */
    }

    .kb-backdrop {
        position: fixed;
        top: var(--sysbar-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--sysbar-height));
        background: rgba(0, 0, 0, 0.7);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease-out;
        z-index: 3500;
    }

    .kb-backdrop.active {
        opacity: 0.6;
        /* valeur “pleinement ouvert”, ajustée par le swipe en JS */
        pointer-events: auto;
    }

    .kb-toggle-btn {
        display: block;
        position: fixed;
        bottom: 10px;
        left: 0;
        color: var(--neon-blue);
        padding: 10px 14px;
        border-radius: 0 8px 8px 0;
        z-index: 4001;
        cursor: pointer;
        font-size: 1.4rem;
        transition: transform 0.25s ease;
    }

    .kb-toggle-btn.open i {
        transform: rotate(180deg);
    }
}

/* --- AUDIO PLAYER REVEAL --- */
.btn-reveal-player {
    background: transparent;
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    padding: 10px 20px;
    font-family: var(--code-font);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
}

.btn-reveal-player:hover {
    background: var(--neon-red);
    color: #000;
    box-shadow: 0 0 15px var(--neon-red);
}

.audio-player {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* Stylish bounce/ease */
    transform: translateY(-20px) scale(0.95);
    margin-bottom: 0;
}

.audio-player.active {
    max-height: 500px;
    /* Adjust as needed to fit the iframe */
    opacity: 1;
    transform: translateY(0) scale(1);
    margin-bottom: 2rem;
}