html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
}

/* Wrapper pour les blocs de code avec bouton copier */
.code-block-wrapper {
    position: relative;
    margin: 1rem 0;
}

/* Bloc de code avec fond sombre et coloration syntaxique */
.code-block {
    font-family: 'Fira Code', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1.25rem;
    padding-top: 2.5rem;
    /* Espace pour le bouton */
    border-radius: 0.5rem;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.6;
    tab-size: 4;
}

/* Bouton Copier */
.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #4a5568;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 0.3rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    z-index: 10;
}

.copy-btn:hover {
    background-color: #2d3748;
    transform: translateY(-1px);
}

.copy-btn.copied {
    background-color: #48bb78;
}

/* Label de langage */
.code-lang {
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    font-size: 0.7rem;
    color: #a0aec0;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* === COLORS FOR SYNTAX HIGHLIGHTING (Basic) === */
.token-keyword {
    color: #c678dd;
}

.token-string {
    color: #98c379;
}

.token-variable {
    color: #e06c75;
}

.token-function {
    color: #61afef;
}

.token-comment {
    color: #5c6370;
    font-style: italic;
}

.token-class-name {
    color: #e5c07b;
}

.token-number {
    color: #d19a66;
}

.token-operator {
    color: #56b6c2;
}

.token-punctuation {
    color: #abb2bf;
}

.token-tag {
    color: #e06c75;
}

.token-attr-name {
    color: #d19a66;
}

.token-attr-value {
    color: #98c379;
}

/* === SECTIONS ET NAVIGATION === */
.section-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.chapter-nav {
    position: fixed;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.75rem;
    max-height: 70vh;
    overflow-y: auto;
    display: none;
}

@media (min-width: 1280px) {
    .chapter-nav {
        display: block;
    }
}

/* Checklist */
.checklist {
    list-style: none;
    padding-left: 0;
}

.checklist li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
}

.checklist li::before {
    content: "☐";
    position: absolute;
    left: 0;
    color: #9ca3af;
}

.checklist li.done::before {
    content: "✓";
    color: #22c55e;
    font-weight: bold;
}

/* Tables stylisées */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.styled-table thead {
    background-color: #1f2937;
    color: white;
}

.styled-table th,
.styled-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.styled-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Badges de séance */
.badge-seance {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-seance-1 {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-seance-2 {
    background-color: #fce7f3;
    color: #9d174d;
}

.badge-seance-3 {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-seance-4 {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-seance-5 {
    background-color: #ede9fe;
    color: #5b21b6;
}