/* ================= MODALE ================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal {
    background: var(--white);
    padding: 30px;
    border-radius: 14px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modal h3 {
    margin-bottom: 20px;
    color: var(--primary);
}

.modal .form-group {
    margin-bottom: 15px;
}

.modal input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.modal input:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
}

/* ===== Modal View Client ===== */

.modal-view {
    max-width: 600px;
    width: 100%;
    max-height: 80vh; /* hauteur maximale de la modale */
    display: flex;
    flex-direction: column;
}

.client-view-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.view-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-radius: 10px;
    background-color: var(--bg-main);
}

.view-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
}

.view-value {
    font-weight: 500;
    color: var(--primary);
    word-break: break-word;
}

.modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: var(--bg-main);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    color: var(--text-main); /* couleur par défaut du texte */
}

.tab-btn.active {
    background: var(--white);
    border-bottom: 2px solid var(--primary);
    color: var(--primary); /* texte visible sur fond blanc */
}

.tab-content {
    flex: 1; /* occupe l'espace restant */
    overflow-y: auto;
    padding: 15px;
}