/* modal.css — Composant modale PhotoAsso */

.pa-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-toast);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(0 0 0 / 50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.pa-modal-overlay--open {
    opacity: 1;
    visibility: visible;
}

.pa-modal {
    background: var(--surface-2, #1e293b);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 440px;
    width: calc(100% - 32px);
    box-shadow: 0 8px 32px rgb(0 0 0 / 40%);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.pa-modal-overlay--open .pa-modal {
    transform: scale(1);
}

.pa-modal__header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.pa-modal__icon {
    font-size: var(--fs-xl);
    line-height: 1;
    flex-shrink: 0;
}

.pa-modal__title {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-1, #f1f5f9);
    margin: 0;
    line-height: 1.4;
}

.pa-modal__message {
    font-size: var(--fs-base);
    color: var(--text-2, #94a3b8);
    margin: 0 0 20px;
    line-height: 1.5;
}

.pa-modal__body {
    font-size: var(--fs-base);
    color: var(--text-2, #94a3b8);
    margin: 0 0 20px;
    line-height: 1.5;
    max-height: 60vh;
    overflow-y: auto;
}
.pa-modal__body h3 { color: var(--text-1, #e2e8f0); }
.pa-modal__body table { margin-bottom: 8px; }

.pa-modal__body kbd {
    font-family: monospace;
    font-size: var(--fs-xs);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--surface-1, #0f172a);
    border: 1px solid var(--border, #334155);
}

.pa-modal__input {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border, #334155);
    background: var(--surface-1, #0f172a);
    color: var(--text-1, #f1f5f9);
    font-size: var(--fs-base);
    box-sizing: border-box;
    margin-bottom: 16px;
}

.pa-modal__input:focus {
    outline: 2px solid var(--accent, #2563eb);
    outline-offset: -1px;
    border-color: transparent;
}

.pa-modal__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.pa-modal__btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-base);
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border, #334155);
    background: transparent;
    color: var(--text-2, #94a3b8);
    transition: background 0.15s ease;
}

.pa-modal__btn:hover {
    background: var(--surface-3, #334155);
}

.pa-modal__btn:focus-visible {
    outline: 2px solid var(--accent, #2563eb);
    outline-offset: 2px;
}

.pa-modal__btn--primary {
    border: none;
    color: #fff;
    font-weight: 600;
    background: var(--accent, #2563eb);
}

.pa-modal__btn--primary:hover {
    filter: brightness(1.1);
    background: var(--accent, #2563eb);
}

.pa-modal__btn--danger {
    background: #dc2626;
}

.pa-modal__btn--danger:hover {
    background: #dc2626;
    filter: brightness(1.1);
}

.pa-modal__btn--warning {
    background: #f59e0b;
    color: #000;
}

.pa-modal__btn--warning:hover {
    background: #f59e0b;
    filter: brightness(1.1);
}

@media (width <= 480px) {
    .pa-modal {
        padding: 16px;
    }

    .pa-modal__actions {
        flex-direction: column-reverse;
    }

    .pa-modal__btn {
        width: 100%;
        text-align: center;
    }
}
