/* =========================================================
   NOTEBOOK — Python, SQL et texte
   ========================================================= */

.notebook-page .nb-container {
    width: min(1100px, 94%);
    padding-bottom: 80px;
}

.notebook-page.schema-open .nb-container {
    width: min(1440px, 96%);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Titre ---------- */

.nb-titlebar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.nb-back {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.nb-back:hover {
    color: var(--text);
}

.nb-title {
    flex: 1;
    min-width: 200px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 26px;
    font-weight: 700;
}

.nb-title:hover {
    border-color: var(--border);
}

.nb-title:focus {
    outline: none;
    border-color: var(--blue);
    background: rgba(17, 24, 39, 0.6);
}

.nb-kernels {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nb-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
}

.nb-pill.loading { color: var(--yellow); border-color: rgba(234, 179, 8, 0.35); }
.nb-pill.ready { color: var(--green); border-color: rgba(34, 197, 94, 0.35); }
.nb-pill.error { color: var(--red); border-color: rgba(239, 68, 68, 0.4); }

/* ---------- Barre d'outils ---------- */

.nb-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin-bottom: 18px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(11, 15, 25, 0.92);
    backdrop-filter: blur(10px);
}

.nb-toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nb-toolbar-end {
    margin-left: auto;
}

.nb-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.nb-btn:hover { background: var(--surface-light); border-color: rgba(255, 255, 255, 0.16); }
.nb-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.nb-btn.primary:hover { filter: brightness(1.1); }
.nb-btn.active { border-color: var(--blue); color: #c7d2fe; }
.nb-btn:disabled { opacity: 0.55; cursor: wait; }
.nb-btn.small { padding: 6px 10px; font-size: 13px; }

.nb-btn [class*="fa-python"] { color: var(--yellow); }
.nb-btn .fa-database { color: var(--cyan); }
.nb-btn .fa-paragraph { color: var(--purple); }
.nb-btn.primary i { color: #fff; }

.nb-icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.nb-icon-btn:hover { background: var(--surface-light); color: var(--text); }

.nb-save {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.nb-save.error { color: var(--red); }

/* Menus déroulants */
.nb-menu {
    position: relative;
}

.nb-menu > summary {
    list-style: none;
}

.nb-menu > summary::-webkit-details-marker { display: none; }

.nb-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    min-width: 260px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.nb-menu-list button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.nb-menu-list button:hover { background: var(--surface-light); }
.nb-menu-list button i { width: 18px; color: var(--text-secondary); }

.nb-shortcuts {
    min-width: 330px;
    padding: 12px 14px;
}

.nb-shortcuts p {
    margin: 6px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

kbd {
    padding: 1px 6px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--surface-light);
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
}

/* ---------- Disposition ---------- */

.nb-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.schema-open .nb-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.nb-cells {
    min-width: 0;
}

/* ---------- Cellules ---------- */

.nb-cell {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    margin-bottom: 30px;
}

.nb-gutter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 42px;
}

.nb-count {
    color: var(--text-secondary);
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 12px;
}

.nb-run {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--green);
    cursor: pointer;
    transition: transform 0.1s, background 0.15s;
}

.nb-run:hover { background: var(--surface-light); transform: scale(1.06); }
.nb-cell[data-type="markdown"] .nb-run { color: var(--purple); }
.nb-cell.running .nb-run i { animation: nb-pulse 0.9s ease-in-out infinite; }
.nb-cell.running .nb-count { color: var(--yellow); }

@keyframes nb-pulse { 50% { opacity: 0.3; } }

.nb-main {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.72);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.nb-cell.active .nb-main {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.nb-cell[data-type="python"] .nb-main { border-left: 3px solid rgba(234, 179, 8, 0.7); }
.nb-cell[data-type="sql"] .nb-main { border-left: 3px solid rgba(6, 182, 212, 0.75); }
.nb-cell[data-type="markdown"] .nb-main { border-left: 3px solid rgba(139, 92, 246, 0.7); }

.nb-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px 6px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(11, 15, 25, 0.45);
}

.nb-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.nb-cell[data-type="python"] .nb-type i { color: var(--yellow); }
.nb-cell[data-type="sql"] .nb-type i { color: var(--cyan); }
.nb-cell[data-type="markdown"] .nb-type i { color: var(--purple); }

.nb-type select {
    padding: 3px 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

.nb-type select:hover, .nb-type select:focus { border-color: var(--border); background: var(--surface); }
.nb-type select option { background: var(--surface); }

.nb-actions {
    display: flex;
    gap: 2px;
    opacity: 0.45;
    transition: opacity 0.15s;
}

.nb-cell:hover .nb-actions, .nb-cell.active .nb-actions, .nb-actions:focus-within { opacity: 1; }

.nb-actions button {
    width: 30px;
    height: 28px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.nb-actions button:hover { background: var(--surface-light); color: var(--text); }
.nb-actions button[data-action="delete"]:hover { color: var(--red); }

/* Insérer entre deux cellules */
.nb-insert {
    position: absolute;
    left: 54px;
    right: 0;
    bottom: -26px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.15s;
}

.nb-cell:hover .nb-insert, .nb-insert:focus-within { opacity: 1; }
.nb-cell:last-child .nb-insert { opacity: 0.85; }

.nb-insert button {
    padding: 3px 10px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: var(--background);
    color: var(--text-secondary);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.nb-insert button::before { content: "+ "; }
.nb-insert button:hover { border-style: solid; color: var(--text); }
.nb-insert button i { display: none; }

/* ---------- Éditeur ---------- */

.nb-editor .CodeMirror {
    height: auto;
    min-height: 54px;
    padding: 8px 0;
    background: transparent;
    font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
    font-size: 14px;
    line-height: 1.55;
}

.nb-cell[data-type="markdown"] .nb-editor .CodeMirror {
    font-family: inherit;
    font-size: 15px;
    padding: 10px 6px;
}

.nb-cell.rendered .nb-editor { display: none; }

.nb-fallback-editor {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: Consolas, monospace;
    font-size: 14px;
    line-height: 1.55;
    resize: vertical;
    tab-size: 4;
}

.nb-fallback-editor:focus { outline: none; }

/* Thème CodeMirror assorti au site */
.cm-s-nsi.CodeMirror { color: #e2e8f0; }
.cm-s-nsi .CodeMirror-gutters { border-right: none; background: transparent; }
.cm-s-nsi .CodeMirror-linenumber { padding: 0 10px 0 6px; color: #475569; }
.cm-s-nsi .CodeMirror-cursor { border-left: 2px solid #a5b4fc; }
.cm-s-nsi div.CodeMirror-selected,
.cm-s-nsi.CodeMirror-focused div.CodeMirror-selected { background: rgba(99, 102, 241, 0.3); }
.cm-s-nsi .CodeMirror-line::selection, .cm-s-nsi .CodeMirror-line > span::selection, .cm-s-nsi .CodeMirror-line > span > span::selection { background: rgba(99, 102, 241, 0.3); }
.cm-s-nsi .CodeMirror-matchingbracket { color: #fde68a !important; text-decoration: underline; }
.cm-s-nsi .CodeMirror-placeholder { color: #475569; }
.cm-s-nsi .cm-keyword { color: #c084fc; }
.cm-s-nsi .cm-builtin { color: #38bdf8; }
.cm-s-nsi .cm-def { color: #60a5fa; }
.cm-s-nsi .cm-variable-2 { color: #93c5fd; }
.cm-s-nsi .cm-variable-3, .cm-s-nsi .cm-type { color: #5eead4; }
.cm-s-nsi .cm-string, .cm-s-nsi .cm-string-2 { color: #86efac; }
.cm-s-nsi .cm-number { color: #fdba74; }
.cm-s-nsi .cm-atom { color: #fb923c; }
.cm-s-nsi .cm-comment { color: #64748b; font-style: italic; }
.cm-s-nsi .cm-operator { color: #f472b6; }
.cm-s-nsi .cm-meta { color: #fbbf24; }
.cm-s-nsi .cm-header { color: #c4b5fd; font-weight: 700; }
.cm-s-nsi .cm-strong { font-weight: 700; }
.cm-s-nsi .cm-em { font-style: italic; }
.cm-s-nsi .cm-link, .cm-s-nsi .cm-url { color: #93c5fd; }
.cm-s-nsi .cm-quote { color: #94a3b8; }
.cm-s-nsi .cm-error { color: #fca5a5; }
.cm-s-nsi .nb-line-error { background: rgba(239, 68, 68, 0.16); }

.CodeMirror-hints {
    z-index: 40;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 13px;
}

.CodeMirror-hint { color: var(--text); padding: 3px 10px; }
li.CodeMirror-hint-active { background: var(--blue); color: #fff; }

/* ---------- Texte rendu ---------- */

.nb-rendered {
    padding: 16px 20px;
    cursor: text;
    line-height: 1.65;
}

.nb-rendered > :first-child { margin-top: 0; }
.nb-rendered > :last-child { margin-bottom: 0; }
.nb-rendered h1 { font-size: 28px; margin: 0.4em 0 0.5em; }
.nb-rendered h2 { font-size: 22px; margin: 1.1em 0 0.5em; }
.nb-rendered h3 { font-size: 18px; margin: 1em 0 0.4em; }
.nb-rendered p, .nb-rendered li { color: #cbd5e1; }
.nb-rendered p { margin: 0.6em 0; }
.nb-rendered ul, .nb-rendered ol { margin: 0.6em 0; padding-left: 1.6em; }
.nb-rendered li { margin: 0.2em 0; }
.nb-rendered ul { list-style: disc; }
.nb-rendered ol { list-style: decimal; }
.nb-rendered a { color: #93c5fd; }
.nb-rendered code { padding: 2px 6px; border-radius: 5px; background: rgba(99, 102, 241, 0.16); color: #e0e7ff; font-family: "JetBrains Mono", Consolas, monospace; font-size: 0.9em; }
.nb-rendered pre { padding: 12px 14px; border-radius: 10px; background: rgba(11, 15, 25, 0.7); overflow-x: auto; }
.nb-rendered pre code { padding: 0; background: none; }
.nb-rendered blockquote { margin: 1em 0; padding: 8px 14px; border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; background: rgba(99, 102, 241, 0.08); }
.nb-rendered blockquote p { margin: 0.3em 0; }
.nb-rendered table { border-collapse: collapse; margin: 1em 0; }
.nb-rendered th, .nb-rendered td { padding: 6px 12px; border: 1px solid var(--border); }
.nb-rendered details { margin: 1em 0; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(11, 15, 25, 0.4); }
.nb-rendered summary { cursor: pointer; color: var(--text); font-weight: 600; }
.nb-rendered hr { border: none; border-top: 1px solid var(--border); margin: 1.5em 0; }

/* ---------- Sorties ---------- */

.nb-output {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: rgba(11, 15, 25, 0.55);
}

.nb-output > * + * { margin-top: 10px; }

.nb-stream, .nb-result {
    margin: 0;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 13.5px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    color: #e2e8f0;
}

.nb-stream .stderr { color: #fca5a5; }
.nb-stream .stdin { color: #a5b4fc; font-weight: 600; }
.nb-result { color: #fdba74; }

.nb-info {
    margin: 0;
    color: var(--green);
    font-size: 14px;
}

.nb-muted { color: var(--text-secondary); font-size: 14px; margin: 0; }
.nb-loading { margin: 0; }
.nb-sql-label { margin: 14px 0 0; font-size: 12px; color: var(--text-secondary); }
.nb-sql-label code { background: none; color: var(--text-secondary); }

.nb-table-wrap {
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.nb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.nb-table th, .nb-table td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.nb-table th {
    position: sticky;
    top: 0;
    background: var(--surface-light);
    color: #c7d2fe;
    font-weight: 600;
}

.nb-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.nb-table tbody tr:hover { background: rgba(99, 102, 241, 0.08); }
.nb-table td.num { text-align: right; font-variant-numeric: tabular-nums; color: #fdba74; }
.nb-table td.null { color: #64748b; font-style: italic; }

.nb-table-caption {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 12px;
}

.nb-error {
    padding: 12px 14px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
}

.nb-error-title {
    color: #fca5a5;
    font-weight: 700;
}

.nb-error-line {
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.2);
    font-size: 12px;
    font-weight: 600;
}

.nb-error p { margin: 8px 0 0; color: #e2e8f0; font-size: 14px; line-height: 1.55; }
.nb-error .nb-error-tip { color: #fde68a; }
.nb-error code { padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.3); font-family: "JetBrains Mono", Consolas, monospace; font-size: 0.9em; }
.nb-error details { margin-top: 10px; }
.nb-error summary { color: var(--text-secondary); font-size: 12px; cursor: pointer; }
.nb-error pre { margin: 8px 0 0; padding: 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.3); color: #fca5a5; font-size: 12.5px; white-space: pre-wrap; overflow-x: auto; }
.nb-error-inline { color: #fca5a5; font-size: 14px; }

/* ---------- Panneau base de données ---------- */

.nb-schema {
    position: sticky;
    top: 74px;
    max-height: calc(100vh - 94px);
    overflow-y: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.85);
}

.nb-schema-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.nb-schema-label {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nb-schema-head h2 {
    margin: 2px 0 0;
    font-size: 20px;
}

.nb-schema-actions {
    display: flex;
    gap: 6px;
    margin: 12px 0 6px;
}

.nb-schema-actions .nb-menu-list { left: 0; right: auto; }

.nb-schema-description {
    margin: 8px 0 14px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.nb-schema-tables {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nb-schema-table {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(11, 15, 25, 0.55);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.nb-schema-table.highlight {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.nb-schema-table header {
    margin: 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

.nb-schema-table-name { font-weight: 700; font-size: 14px; }
.nb-schema-table-name i { color: var(--cyan); margin-right: 4px; }
.nb-schema-count { color: var(--text-secondary); font-size: 12px; }

.nb-schema-table ul {
    margin: 0;
    padding: 6px 0;
    list-style: none;
}

.nb-schema-table li {
    display: grid;
    grid-template-columns: 18px auto 1fr;
    align-items: baseline;
    column-gap: 6px;
    padding: 2px 10px;
    font-size: 13px;
}

.nb-col-icon { color: var(--yellow); font-size: 11px; }
li.fk .nb-col-icon { color: var(--cyan); }
.nb-col-name { font-family: "JetBrains Mono", Consolas, monospace; }
li.pk .nb-col-name { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.nb-col-type { color: #64748b; font-size: 11.5px; text-align: right; }
.nb-col-ref { grid-column: 2 / 4; color: var(--cyan); font-size: 11.5px; }
li.fk { cursor: help; }

.nb-preview {
    display: block;
    width: calc(100% - 16px);
    margin: 4px 8px 8px;
    padding: 5px;
    border: 1px dashed var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.nb-preview:hover { border-style: solid; color: var(--text); }

.nb-schema-python {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(234, 179, 8, 0.07);
    font-size: 13px;
}

.nb-schema-python i { color: var(--yellow); }

.nb-schema-python code {
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 12px;
    color: #fde68a;
    word-break: break-all;
}

/* ---------- Divers ---------- */

.nb-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.nb-empty i { font-size: 40px; margin-bottom: 12px; }
.nb-empty h2 { color: var(--text); }
.nb-empty .nb-btn { margin-top: 10px; }

.nb-toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(380px, 90vw);
}

.nb-toast {
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    font-size: 14px;
    animation: nb-toast-in 0.2s ease-out;
    transition: opacity 0.4s, transform 0.4s;
}

.nb-toast.error { border-color: rgba(239, 68, 68, 0.5); color: #fecaca; }
.nb-toast.leaving { opacity: 0; transform: translateY(6px); }

@keyframes nb-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Écrans étroits ---------- */

@media (max-width: 1100px) {
    .schema-open .nb-layout { grid-template-columns: minmax(0, 1fr); }

    .nb-schema {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        width: min(360px, 92vw);
        max-height: none;
        border-radius: 14px 0 0 14px;
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
    }
}

@media (max-width: 700px) {
    .nb-toolbar { position: static; }
    .nb-cell { grid-template-columns: 1fr; }
    .nb-gutter { flex-direction: row; justify-content: flex-start; padding: 0 0 6px; }
    .nb-insert { left: 0; }
    .nb-title { font-size: 21px; }
    .nb-toolbar-end { margin-left: 0; }
    .nb-toolbar .nb-btn { padding: 7px 10px; font-size: 13px; }
}

/* =========================================================
   LISTE DES NOTEBOOKS
   ========================================================= */

.nbl-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.nbl-search {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.nbl-search:focus { outline: none; border-color: var(--blue); }

.nbl-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.nbl-list > .nb-empty, .nbl-list > .nb-muted { grid-column: 1 / -1; }

.nbl-card {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.72);
    transition: border-color 0.15s, transform 0.15s;
}

.nbl-card:hover { border-color: rgba(99, 102, 241, 0.5); transform: translateY(-2px); }

.nbl-card-main {
    flex: 1;
    display: flex;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    color: inherit;
    text-decoration: none;
}

.nbl-card-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    font-size: 18px;
}

.nbl-card-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.nbl-card-text strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
}

.nbl-card-meta { color: var(--text-secondary); font-size: 13px; }

.nbl-badges { display: flex; gap: 6px; margin-top: 4px; }

.nbl-badge {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 12px;
}

.nbl-badge.python i { color: var(--yellow); }
.nbl-badge.sql i { color: var(--cyan); }
.nbl-badge.markdown i { color: var(--purple); }

.nbl-card-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 8px;
    border-left: 1px solid var(--border);
}

.nbl-card-actions button {
    width: 32px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.nbl-card-actions button:hover { background: var(--surface-light); color: var(--text); }
.nbl-card-actions button[data-action="delete"]:hover { color: var(--red); }

.nbl-note {
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}

/* Fenêtre de création */
.nbl-dialog {
    margin: auto;
    width: min(760px, 94vw);
    max-height: 90vh;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.nbl-dialog::backdrop { background: rgba(3, 6, 15, 0.7); backdrop-filter: blur(3px); }

.nbl-dialog form { padding: 22px; }

.nbl-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 16px;
    text-align: left;
}

.nbl-dialog-head h2 { margin: 0; font-size: 22px; }

.nbl-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.nbl-field span, .nbl-field-label { color: var(--text-secondary); font-size: 13px; }

.nbl-field input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--background);
    color: var(--text);
    font: inherit;
}

.nbl-field input:focus { outline: none; border-color: var(--blue); }

.nbl-templates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.nbl-template {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--background);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.nbl-template:hover { border-color: rgba(255, 255, 255, 0.2); }
.nbl-template.selected { border-color: var(--blue); background: rgba(99, 102, 241, 0.12); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.nbl-template i { color: #a5b4fc; font-size: 18px; }
.nbl-template-title { font-weight: 700; }
.nbl-template-desc { color: var(--text-secondary); font-size: 12.5px; line-height: 1.45; }

.nbl-dialog-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}


/* =========================================================
   CARTES MENTALES
   ========================================================= */

.nb-btn .fa-diagram-project { color: var(--pink); }
.nb-cell[data-type="mindmap"] .nb-main { border-left: 3px solid rgba(236, 72, 153, 0.7); overflow: visible; }
.nb-cell[data-type="mindmap"] .nb-type i { color: var(--pink); }
.nb-cell[data-type="mindmap"] .nb-run { visibility: hidden; }
.nb-cell[data-type="mindmap"] .nb-count { visibility: hidden; }
.nbl-badge.mindmap i { color: var(--pink); }

.mm [hidden] { display: none !important; }

.mm {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: var(--text);
}

.mm-toolbar,
.mm-format,
.mm-linkbar,
.mm-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
}

.mm-format,
.mm-linkbar {
    background: rgba(236, 72, 153, 0.05);
}

.mm-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.mm-group-end { margin-left: auto; }

.mm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.mm-btn:hover { background: var(--surface-light); border-color: rgba(255, 255, 255, 0.16); }
.mm-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.mm-btn.icon { width: 32px; padding: 0; }
.mm-btn.active { border-color: var(--pink); color: var(--pink); background: rgba(236, 72, 153, 0.1); }
.mm-btn.primary { background: var(--pink); border-color: var(--pink); color: #fff; }
.mm-btn.primary:hover { filter: brightness(1.08); }
.mm-btn i { font-size: 13px; }
.mm-btn:focus-visible,
.mm-swatch:focus-visible,
.mm-select:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.mm-zoom { min-width: 58px; font-variant-numeric: tabular-nums; }

.mm-menu > summary { list-style: none; }
.mm-menu > summary::-webkit-details-marker { display: none; }
.mm-menu[open] > summary { border-color: var(--pink); }

.mm-menu-list {
    left: 0;
    right: auto;
    z-index: 60;
    max-height: 380px;
    overflow-y: auto;
}

.mm-menu-right .mm-menu-list { left: auto; right: 0; }
.mm-menu-list button.active { background: rgba(236, 72, 153, 0.12); color: var(--pink); }
.mm-menu-list button.active i { color: var(--pink); }

.mm-menu-title {
    margin: 8px 10px 4px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mm-menu-title:first-child { margin-top: 4px; }

.mm-theme-dots {
    display: inline-flex;
    gap: 2px;
    width: auto !important;
}

.mm-theme-dots i {
    width: 9px !important;
    height: 9px;
    border-radius: 50%;
}

.mm-shortcuts {
    min-width: 320px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-secondary);
}

.mm-shortcuts p { margin: 5px 0; }

.mm-shortcuts kbd,
.mm-footer kbd,
.mm-context kbd {
    padding: 1px 6px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface-light);
    color: var(--text);
    font: 11.5px/1.5 "JetBrains Mono", Consolas, monospace;
}

.mm-icons {
    display: grid;
    grid-template-columns: repeat(6, 38px);
    gap: 2px;
    min-width: 0;
}

.mm-icons button {
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 19px;
}

.mm-icons .mm-icon-none {
    grid-column: 1 / -1;
    width: 100%;
    font-size: 13px;
}

.mm-swatches { gap: 5px; }

.mm-swatch {
    position: relative;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    background: var(--c);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.mm-swatch.active { border-color: var(--text); }

.mm-swatch.auto {
    background: conic-gradient(#6366f1, #ec4899, #f97316, #22c55e, #06b6d4, #6366f1);
}

.mm-swatch.custom {
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    background: var(--surface-light);
    color: var(--text-secondary);
    font-size: 11px;
}

.mm-swatch.custom input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.mm-select {
    min-height: 32px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.mm-linkbar > span {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.mm-banner {
    font-size: 13.5px;
    color: var(--text-secondary);
}

.mm-banner > i { color: var(--pink); }
.mm-banner > span { flex: 1 1 220px; }
.mm-revision { background: rgba(34, 197, 94, 0.08); }
.mm-revision > i { color: var(--green); }
.mm-linking { background: rgba(99, 102, 241, 0.1); }

.mm-search-input {
    flex: 1 1 180px;
    min-width: 0;
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.mm-search-count { min-width: 80px; font-variant-numeric: tabular-nums; }

/* ---------- Zone de la carte ---------- */

.mm-viewport {
    position: relative;
    height: 460px;
    min-height: 240px;
    max-height: 85vh;
    overflow: hidden;
    resize: vertical;
    outline: none;
    cursor: grab;
    touch-action: pan-x pan-y;
    background-color: rgba(11, 15, 25, 0.35);
    background-image: radial-gradient(rgba(148, 163, 184, 0.16) 1px, transparent 1px);
    background-size: 22px 22px;
    user-select: none;
    -webkit-user-select: none;
}

.mm-viewport:focus-visible { box-shadow: inset 0 0 0 2px rgba(236, 72, 153, 0.55); }
.mm-viewport.panning { cursor: grabbing; }
.mm-viewport.dragging-node { cursor: grabbing; }
.mm-is-linking .mm-viewport,
.mm-is-linking .mm-node { cursor: crosshair; }

.mm-world {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    transform-origin: 0 0;
}

.mm-links {
    position: absolute;
    overflow: visible;
    pointer-events: none;
}

.mm-relation-hit {
    pointer-events: stroke;
    cursor: pointer;
}

.mm-nodes { position: absolute; left: 0; top: 0; }

.mm-node {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px 6px;
    width: max-content;
    text-align: center;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    cursor: pointer;
    box-sizing: border-box;
    transition: box-shadow 0.15s, opacity 0.15s;
}

.mm-node.selected { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px var(--mm-color); }
.mm-node.shape-souligne.selected { box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.25); border-radius: 6px !important; }
.mm-node.match { box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.55); }
.mm-node.current-match { box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px #eab308; }
.mm-node.done .mm-text { text-decoration: line-through; opacity: 0.7; }
.mm-node.editing { opacity: 0; }
.mm-node.link-source { box-shadow: 0 0 0 3px #6366f1; }
.mm-node.dragging { z-index: 5; opacity: 0.85; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); pointer-events: none; transition: none; }
.mm-node.drop-inside { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px #22c55e; }
.mm-node.drop-before { box-shadow: 0 -4px 0 0 #22c55e; }
.mm-node.drop-after { box-shadow: 0 4px 0 0 #22c55e; }

.mm-text code {
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.22);
    font: 0.92em "JetBrains Mono", Consolas, monospace;
}

.mm-empty { opacity: 0.55; }
.mm-icon { font-size: 1.1em; line-height: 1; }

.mm-check {
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    font-size: 1.05em;
    cursor: pointer;
}

.mm-progress {
    padding: 0 6px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.18);
    font-size: 0.78em;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.mm-badge {
    color: inherit;
    font-size: 0.82em;
    opacity: 0.75;
    text-decoration: none;
}

a.mm-badge:hover { opacity: 1; }

.mm-toggle {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    border: 1.5px solid var(--mm-color);
    border-radius: 99px;
    background: var(--surface);
    color: var(--text);
    font: 700 11px/1 Inter, system-ui, sans-serif;
    transform: translate(-50%, -50%);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}

.mm-toggle.collapsed,
.mm-viewport:hover .mm-toggle,
.mm-toggle:focus-visible { opacity: 1; }
.mm-toggle.collapsed { background: var(--mm-color); color: #fff; border-color: var(--mm-color); }
.mm-revising .mm-toggle.collapsed { background: #22c55e; border-color: #22c55e; }

.mm-relation-label {
    position: absolute;
    z-index: 3;
    max-width: 180px;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.mm-relation-label.selected { border-color: #6366f1; color: var(--text); }
.mm-relation-label.empty { font-style: italic; opacity: 0.8; }

.mm-editor {
    position: absolute;
    z-index: 10;
    box-sizing: border-box;
    min-height: 30px;
    margin: 0;
    border: 2px solid var(--pink);
    background: var(--surface);
    color: var(--text);
    text-align: center;
    resize: none;
    overflow: hidden;
    outline: none;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
    user-select: text;
    -webkit-user-select: text;
}

.mm-editor-link {
    width: 160px;
    padding: 5px 8px;
    border-radius: 10px;
    font: 13px/1.35 Inter, system-ui, sans-serif;
}

.mm-touch-hint {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    margin: 0;
    padding: 7px 10px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12.5px;
    text-align: center;
    pointer-events: none;
}

.mm-fullscreen .mm-touch-hint { display: none; }

.mm-context {
    position: absolute;
    z-index: 70;
    min-width: 230px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.mm-context button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13.5px;
    text-align: left;
    cursor: pointer;
}

.mm-context button:hover,
.mm-context button:focus-visible { background: var(--surface-light); outline: none; }
.mm-context button i { width: 16px; color: var(--text-secondary); }
.mm-context button span { flex: 1; }

/* ---------- Panneau (note, lien, import) ---------- */

.mm-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    background: rgba(236, 72, 153, 0.04);
}

.mm-panel[hidden] { display: none; }

.mm-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}

.mm-panel-head i { color: var(--pink); margin-right: 4px; }
.mm-panel-help { margin: 0; color: var(--text-secondary); font-size: 13px; }

.mm-panel-example {
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--surface-light);
    color: var(--text-secondary);
    font: 12.5px/1.5 "JetBrains Mono", Consolas, monospace;
    white-space: pre;
}

.mm-panel textarea,
.mm-panel input[type="url"] {
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

.mm-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-secondary); }
.mm-field-row { display: flex; gap: 6px; }
.mm-field-error { color: var(--red); }
.mm-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.mm-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 14px;
    padding: 6px 12px;
    border-top: 1px solid var(--border);
    border-radius: 0 0 14px 14px;
    color: var(--text-secondary);
    font-size: 12.5px;
}

.mm-stats { font-variant-numeric: tabular-nums; }
.mm-stats.flash { color: var(--pink); font-weight: 600; }

/* ---------- Thème « Tableau noir » ---------- */

.mm-board .mm-viewport {
    background-color: #1d3b2a;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

.mm-board .mm-toggle { background: #1d3b2a; color: #f8fafc; }
.mm-board .mm-relation-label { background: #1d3b2a; color: #f8fafc; border-color: rgba(255, 255, 255, 0.25); }

/* ---------- Plein écran ---------- */

html.mm-no-scroll,
html.mm-no-scroll body { overflow: hidden; }

.mm-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--background);
}

.mm-fullscreen .mm-viewport {
    flex: 1;
    height: auto;
    max-height: none;
    resize: none;
    touch-action: none;
}

.mm-fullscreen .mm-footer { border-radius: 0; }

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
    /* Barres sur une seule ligne, défilables ; les menus s'ouvrent en bas de l'écran */
    .mm-toolbar,
    .mm-format {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mm-toolbar::-webkit-scrollbar,
    .mm-format::-webkit-scrollbar { display: none; }
    .mm-toolbar .mm-group,
    .mm-format .mm-group { flex-wrap: nowrap; flex-shrink: 0; }

    .mm-menu-list,
    .mm-menu-right .mm-menu-list {
        position: fixed;
        left: 10px;
        right: 10px;
        top: auto;
        bottom: 10px;
        z-index: 1100;
        max-height: 62vh;
        min-width: 0;
        max-width: none;
    }

    .mm-icons {
        grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
        left: 10px;
    }

    .mm-icons button { width: 100%; }
    .mm-btn span { display: none; }
    .mm-btn:not(.icon) { padding: 5px 9px; }
    .mm-group-end { margin-left: 0; }
    .mm-viewport { height: 380px; }
    .mm-hint { display: none; }
    .mm-toolbar, .mm-format { gap: 6px; padding: 6px 8px; }
    .mm-shortcuts { min-width: 0; }
    .mm-banner > span { flex-basis: 100%; }
}

@media (pointer: coarse) {
    .mm-toggle { opacity: 1; min-width: 24px; height: 24px; font-size: 12px; }
    .mm-btn { min-height: 38px; }
    .mm-btn.icon { width: 38px; }
}


/* =========================================================
   COURS DES PROFESSEURS
   ========================================================= */

.nbl-courses { margin-bottom: 26px; }

.nbl-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 20px;
    margin-bottom: 14px;
}

.nbl-section-head h2,
.nbl-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 4px;
    font-size: 20px;
}

.nbl-section-head h2 i { color: #34d399; }
.nbl-section-title { margin: 0 0 14px; }
.nbl-section-title i { color: #a5b4fc; }
.nbl-section-head p { margin: 0; color: var(--text-secondary); font-size: 14px; }

.nbl-levels { display: flex; flex-wrap: wrap; gap: 6px; }

.nbl-level {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.nbl-level:hover { color: var(--text); border-color: rgba(52, 211, 153, 0.5); }
.nbl-level.active { color: var(--text); border-color: #34d399; background: rgba(52, 211, 153, 0.12); }

.nbl-course { flex-direction: column; align-items: stretch; }
.nbl-course .nbl-card-main { cursor: default; }
.nbl-card-icon.course { background: rgba(52, 211, 153, 0.14); color: #34d399; }

.nbl-course-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.45;
}

.nbl-course-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 16px;
}

.nb-course-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 12px;
    background: rgba(52, 211, 153, 0.08);
    color: var(--text-secondary);
    font-size: 14px;
}

.nb-course-banner[hidden] { display: none; }
.nb-course-banner i { color: #34d399; }
.nb-course-banner strong { color: var(--text); }

/* Fenêtre « Proposer comme cours » */
.nbc-dialog { max-width: 620px; }
.nbc-dialog h2 i { color: #34d399; margin-right: 6px; }
.nbc-text { margin: 0 0 12px; color: var(--text-secondary); line-height: 1.5; }

.nbc-steps {
    margin: 0 0 16px;
    padding-left: 20px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.nbc-steps li + li { margin-top: 6px; }
.nbc-steps strong { color: var(--text); }

.nbc-warning {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid rgba(234, 179, 8, 0.35);
    border-radius: 10px;
    background: rgba(234, 179, 8, 0.08);
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.5;
}

.nbc-warning i { color: var(--yellow); margin-right: 4px; }
.nbc-warning.error { border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.08); }
.nbc-warning.error i { color: var(--red); }
.nbc-size { color: var(--text-secondary); font-size: 12px; }

.nbc-code {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-light);
    color: var(--text-secondary);
    font: 12px/1.45 "JetBrains Mono", Consolas, monospace;
    word-break: break-all;
    resize: none;
    box-sizing: border-box;
}

.nb-btn.disabled { opacity: 0.5; pointer-events: none; }
.nbl-course .nbl-card-text strong { white-space: normal; }
