/* ============================================
   Styles pour le système d'aide
   ============================================ */

/* Sidebar fixe */
.help-sidebar {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.help-sidebar .card {
    border: 1px solid var(--app-border-color);
}

.help-sidebar .accordion-button {
    background-color: var(--app-card-bg);
    color: var(--app-text-primary);
    border: none;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
}

.help-sidebar .accordion-button:not(.collapsed) {
    background-color: var(--app-bg-secondary);
    color: var(--bs-primary);
    font-weight: 600;
}

.help-sidebar .accordion-button:hover {
    background-color: var(--app-bg-hover);
}

.help-sidebar .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.help-sidebar .accordion-button::after {
    filter: var(--app-icon-filter);
}

.help-sidebar .list-group-item {
    background-color: var(--app-card-bg);
    color: var(--app-text-primary);
    border-color: var(--app-border-color);
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

.help-sidebar .list-group-item:hover {
    background-color: var(--app-bg-hover);
}

.help-sidebar .list-group-item.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    font-weight: 600;
}

/* Contenu de l'aide */
.help-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--app-text-primary);
}

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

.help-content h2 {
    color: var(--app-text-primary);
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.help-content h3 {
    color: var(--app-text-primary);
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.7rem;
    font-weight: 600;
}

.help-content h4 {
    color: var(--app-text-secondary);
    font-size: 1.1rem;
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

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

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

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

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

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

.help-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin: 1.5rem 0;
}

.help-content code {
    background-color: var(--app-bg-secondary);
    color: var(--bs-danger);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.help-content pre {
    background-color: var(--app-bg-secondary);
    border: 1px solid var(--app-border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.help-content pre code {
    background-color: transparent;
    color: var(--app-text-primary);
    padding: 0;
}

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

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

.help-content table th,
.help-content table td {
    padding: 0.75rem;
    border: 1px solid var(--app-border-color);
}

.help-content table th {
    background-color: var(--app-bg-secondary);
    font-weight: 600;
    text-align: left;
}

.help-content table tbody tr:hover {
    background-color: var(--app-bg-hover);
}

/* Badge pour les statuts */
.help-content .badge {
    font-size: 0.85em;
    padding: 0.35em 0.65em;
}

/* Alertes dans le contenu */
.help-content .alert {
    margin: 1.5rem 0;
}

/* Bouton d'aide contextuel (sur les formulaires) */
.btn-help-contextual {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .help-sidebar {
        position: relative !important;
        max-height: none;
        margin-bottom: 1rem;
    }
    
    .help-content h1 {
        font-size: 1.6rem;
    }
    
    .help-content h2 {
        font-size: 1.4rem;
    }
    
    .help-content h3 {
        font-size: 1.2rem;
    }
}

/* Scrollbar personnalisée pour la sidebar */
.help-sidebar::-webkit-scrollbar {
    width: 8px;
}

.help-sidebar::-webkit-scrollbar-track {
    background: var(--app-bg-primary);
}

.help-sidebar::-webkit-scrollbar-thumb {
    background: var(--app-border-color);
    border-radius: 4px;
}

.help-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--app-text-secondary);
}
