/* Modale d'aide F1 */

.help-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
    padding: 2rem;
    align-items: center;
    justify-content: center;
}

.help-modal-content {
    background-color: var(--bg-secondary, #fff);
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    flex-shrink: 0;
}

.help-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-primary, #1a1a1a);
}

.help-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-secondary, #999);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.help-modal-close:hover {
    color: var(--text-primary, #1a1a1a);
}

.help-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.help-section {
    margin-bottom: 2rem;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin: 0 0 0.8rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color, #2563eb);
}

.help-section-content {
    color: var(--text-secondary, #666);
    line-height: 1.6;
    font-size: 0.95rem;
}

.help-section-content ol,
.help-section-content ul {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
}

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

.help-section-content strong {
    color: var(--text-primary, #1a1a1a);
}

.help-section-content ul ul,
.help-section-content ol ol {
    margin: 0.5rem 0;
}

.help-modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    flex-shrink: 0;
}

.help-modal-footer .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
}

/* ===== ÉLÉMENTS PÉDAGOGIQUES ===== */

/* Badges de statut */
.help-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0.3rem;
}

.help-badge-success {
    background: #dcfce7;
    color: #16a34a;
}

.help-badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.help-badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.help-badge-info {
    background: #dbeafe;
    color: #0284c7;
}

.help-badge-primary {
    background: #e0e7ff;
    color: #4f46e5;
}

/* Boîtes annotées */
.help-box {
    border-left: 4px solid var(--primary-color, #2563eb);
    background: var(--bg-tertiary, #f9fafb);
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.help-box-info {
    border-left-color: #0284c7;
    background: #ecf8ff;
}

.help-box-success {
    border-left-color: #16a34a;
    background: #ecfdf5;
}

.help-box-warning {
    border-left-color: #d97706;
    background: #fffbeb;
}

.help-box-danger {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.help-box-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Tableaux comparatifs */
.help-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.help-table th {
    background: var(--bg-tertiary, #f3f4f6);
    color: var(--text-primary, #1a1a1a);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
}

.help-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.help-table tr:hover {
    background: var(--bg-tertiary, #f9fafb);
}

.help-table tr:last-child td {
    border-bottom: none;
}

/* Points clés */
.help-keypoints {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
}

.help-keypoint {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary, #f9fafb);
    border-radius: 6px;
    font-size: 0.9rem;
}

.help-keypoint-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.help-keypoint-text {
    flex: 1;
    color: var(--text-secondary, #666);
}

/* Cas d'usage */
.help-usecase {
    background: var(--bg-tertiary, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.help-usecase-title {
    font-weight: 700;
    color: var(--primary-color, #2563eb);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.help-usecase-scenario {
    color: var(--text-secondary, #666);
    font-style: italic;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.help-usecase-steps {
    margin-top: 0.75rem;
}

.help-usecase-steps ol {
    margin: 0;
    padding-left: 1.5rem;
}

.help-usecase-steps li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary, #666);
    font-size: 0.9rem;
}

.help-usecase-result {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #ecfdf5;
    border-left: 3px solid #16a34a;
    border-radius: 4px;
    color: #15803d;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Images mockup */
.help-mockup {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
    background: #f3f4f6;
}

.help-mockup-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: contain;
}

.help-mockup-caption {
    padding: 0.75rem;
    background: var(--bg-tertiary, #f9fafb);
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
    text-align: center;
    font-style: italic;
}

/* Diagrammes SVG */
.help-diagram {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-tertiary, #f9fafb);
    border-radius: 8px;
}

.help-diagram svg {
    max-width: 100%;
    height: auto;
}

/* Comparaison côte à côte */
.help-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.help-comparison-item {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.help-comparison-good {
    background: #ecfdf5;
    border-color: #16a34a;
}

.help-comparison-bad {
    background: #fef2f2;
    border-color: #dc2626;
}

.help-comparison-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Icônes inline */
.help-icon {
    display: inline-block;
    margin: 0 0.25rem;
    font-size: 1rem;
    vertical-align: -0.125em;
}

/* Listes pédagogiques */
.help-checklist {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.help-checklist li {
    padding: 0.5rem 0;
    padding-left: 1.75rem;
    position: relative;
    color: var(--text-secondary, #666);
    font-size: 0.9rem;
}

.help-checklist li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .help-comparison {
        grid-template-columns: 1fr;
    }

    .help-table {
        font-size: 0.8rem;
    }

    .help-table th,
    .help-table td {
        padding: 0.5rem;
    }
}

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

.help-modal-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary, #f5f5f5);
    border-radius: 4px;
}

.help-modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color, #d1d5db);
    border-radius: 4px;
}

.help-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary, #999);
}

/* Responsive */
@media (max-width: 768px) {
    .help-modal {
        padding: 1rem;
    }

    .help-modal-content {
        max-height: 90vh;
    }

    .help-modal-header {
        padding: 1rem;
    }

    .help-modal-header h2 {
        font-size: 1.2rem;
    }

    .help-modal-body {
        padding: 1rem;
    }

    .help-section-title {
        font-size: 1rem;
    }

    .help-section-content {
        font-size: 0.9rem;
    }

    .help-modal-footer {
        padding: 1rem;
        flex-direction: column;
    }

    .help-modal-footer .btn {
        width: 100%;
    }
}
