/* Modale générique */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.hidden {
    display: none;
}

.modal-overlay.closing {
    animation: fadeOut 0.3s ease-in forwards;
}

.modal-content {
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 24px !important;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal-content.closing {
    animation: zoomOut 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.modal-header i {
    font-size: 1.5rem;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
}

.modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    color: var(--color-text-main);
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
}

.modal-footer .btn {
    width: auto;
    padding: 10px 24px;
}

/* Modale d'aide */
.help-modal-content {
    max-width: 680px !important;
}

.help-modal-body {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.help-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

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

.help-section h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section ol,
.help-section ul {
    padding-left: 1.6rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.help-section ol {
    list-style: none;
    padding-left: 0;
    counter-reset: help-counter;
}

.help-section ol li {
    counter-increment: help-counter;
    padding-left: 2rem;
    position: relative;
}

.help-section ol li::before {
    content: counter(help-counter);
    position: absolute;
    left: 0;
    top: 1px;
    width: 1.4rem;
    height: 1.4rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.4rem;
    text-align: center;
}

.help-section li {
    font-size: 0.9rem;
    line-height: 1.5;
}

.help-section p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 0.5rem;
}

.help-tip {
    background: rgba(var(--color-primary-rgb, 99, 102, 241), 0.08);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 6px 6px 0;
    padding: 8px 12px !important;
    margin-top: 0.6rem !important;
    font-size: 0.85rem !important;
    display: flex;
    gap: 8px;
    align-items: center;
}

.help-tip i {
    flex-shrink: 0;
    color: var(--color-primary);
}
