/**
 * Styles pour le centre d'aide et l'aide contextuelle
 */

/* === Sidebar === */
.help-sidebar {
    position: sticky;
    top: 1rem;
}

.help-sidebar .list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.help-sidebar .list-group-item:hover {
    background-color: var(--bs-light);
    border-left-color: var(--bs-primary);
}

.help-sidebar .list-group-item.active {
    border-left-color: var(--bs-primary);
}

/* === Contenu === */
.help-content {
    min-height: 60vh;
}

.help-page-content {
    line-height: 1.7;
}

.help-page-content h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bs-primary);
}

.help-page-content h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--bs-primary);
}

.help-page-content h3 {
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.help-page-content p {
    margin-bottom: 1rem;
}

.help-page-content ul,
.help-page-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.help-page-content li {
    margin-bottom: 0.5rem;
}

.help-page-content code {
    background-color: var(--bs-light);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.help-page-content pre {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    overflow-x: auto;
}

.help-page-content pre code {
    background-color: transparent;
    padding: 0;
}

.help-page-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--bs-secondary);
    font-style: italic;
}

.help-page-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.help-page-content table th,
.help-page-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.help-page-content table th {
    background-color: var(--bs-light);
    font-weight: 600;
}

.help-page-content table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.help-page-content a {
    color: var(--bs-primary);
    text-decoration: none;
}

.help-page-content a:hover {
    text-decoration: underline;
}

.help-page-content hr {
    margin: 2rem 0;
    border-color: #dee2e6;
}

/* === Modal d'aide contextuelle === */
#helpModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#helpModal .help-content h1 {
    font-size: 1.5rem;
}

#helpModal .help-content h2 {
    font-size: 1.25rem;
}

#helpModal .help-content h3 {
    font-size: 1.1rem;
}

/* === Boutons d'aide === */
.help-btn,
.tour-btn {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.help-btn:hover,
.tour-btn:hover {
    opacity: 1;
}

.help-buttons {
    white-space: nowrap;
}

/* === Responsive === */
@media (max-width: 767.98px) {
    .help-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 1rem;
    }

    .help-content {
        min-height: auto;
    }

    .help-page-content h1 {
        font-size: 1.5rem;
    }

    .help-page-content h2 {
        font-size: 1.25rem;
    }
}

/* === Dark mode support === */
@media (prefers-color-scheme: dark) {
    .help-page-content code {
        background-color: #343a40;
    }

    .help-page-content pre {
        background-color: #212529;
        border-color: #495057;
    }

    .help-page-content table th {
        background-color: #343a40;
        color: #f8f9fa;
    }

    .help-page-content table tr:nth-child(even) {
        background-color: #2c3034;
        color: #dee2e6;
    }

    .help-page-content table td {
        color: #dee2e6;
        border-color: #495057;
    }
}