/* Modal pipeline — style aligné sur « déjà proposé » */

body .modal.jp-pipe-dialog .modal-dialog,
.jp-pipe-dialog .modal-dialog {
    max-width: 480px !important;
    width: calc(100% - 32px) !important;
    margin-top: 12vh !important;
}

.jp-pipe-dialog .modal-content,
body .modal.jp-pipe-dialog .modal-content {
    border: 0 !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28), 0 2px 8px rgba(15, 23, 42, .08);
    animation: jp-pipe-in .22s cubic-bezier(.2, .9, .3, 1.15);
}

.jp-pipe-dialog .modal-header,
.jp-pipe-dialog .modal-footer,
.jp-pipe-dialog .modal-content > header,
.jp-pipe-dialog .modal-content > footer,
body .modal.jp-pipe-dialog .modal-header,
body .modal.jp-pipe-dialog .modal-footer {
    display: none !important;
}

.jp-pipe-dialog .modal-body,
body .modal.jp-pipe-dialog .modal-body {
    padding: 0 !important;
    max-height: none !important;
    background: #fff;
}

@keyframes jp-pipe-in {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: none; }
}

.jp-pipe { font-size: 13.5px; color: #0f172a; background: #fff; }

.jp-pipe-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.jp-pipe-head[data-tone="partner"] { background: linear-gradient(135deg, #f0fdfa, #ecfeff); border-bottom-color: #99f6e4; }
.jp-pipe-head[data-tone="warn"] { background: linear-gradient(135deg, #fffbeb, #fff7ed); border-bottom-color: #fde68a; }
.jp-pipe-head[data-tone="danger"],
.jp-pipe-head[data-phase="error"] { background: linear-gradient(135deg, #fef2f2, #fff1f2); border-bottom-color: #fecaca; }
.jp-pipe-head[data-phase="success"] { background: linear-gradient(135deg, #ecfdf5, #f0fdf4); border-bottom-color: #a7f3d0; }

.jp-pipe-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    background: #1e40af;
    box-shadow: 0 6px 16px rgba(30, 64, 175, .3);
}
.jp-pipe-head[data-tone="partner"] .jp-pipe-icon { background: linear-gradient(135deg, #0f766e, #14b8a6); box-shadow: 0 6px 16px rgba(15, 118, 110, .3); }
.jp-pipe-head[data-tone="warn"] .jp-pipe-icon { background: linear-gradient(135deg, #d97706, #f59e0b); box-shadow: 0 6px 16px rgba(217, 119, 6, .3); }
.jp-pipe-head[data-tone="danger"] .jp-pipe-icon,
.jp-pipe-head[data-phase="error"] .jp-pipe-icon { background: linear-gradient(135deg, #dc2626, #ef4444); box-shadow: 0 6px 16px rgba(220, 38, 38, .3); }
.jp-pipe-head[data-phase="success"] .jp-pipe-icon { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 6px 16px rgba(5, 150, 105, .3); }

.jp-pipe-titles { flex: 1; min-width: 0; }
.jp-pipe-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.25;
    color: #0f172a;
}
.jp-pipe-subhead {
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jp-pipe-close {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}
.jp-pipe-close:hover { background: rgba(15, 23, 42, .06); color: #0f172a; }

.jp-pipe-body { padding: 18px 22px 10px; background: #fff; }

.jp-pipe-msg {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: #334155;
}
.jp-pipe-msg.is-err { color: #b91c1c; }

.jp-pipe-status {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.jp-pipe-status span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #94a3b8;
}
.jp-pipe-status b {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}

.jp-pipe-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px 8px;
}
.jp-pipe-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    border-top-color: #1e40af;
    animation: jp-pipe-spin .7s linear infinite;
}
@keyframes jp-pipe-spin { to { transform: rotate(360deg); } }
.jp-pipe-loading-title { font-weight: 700; color: #0f172a; }

.jp-pipe-foot {
    padding: 14px 22px 18px;
    border-top: 1px solid #eef2f7;
    background: #fff;
}
.jp-pipe-actions { display: flex; justify-content: flex-end; gap: 8px; }
.jp-pipe-actions.is-center { justify-content: center; }

.jp-pipe-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 650;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.jp-pipe-btn:disabled { opacity: .65; cursor: wait; }
.jp-pipe-btn-ghost {
    background: #fff;
    border-color: #e2e8f0;
    color: #475569;
}
.jp-pipe-btn-ghost:hover { background: #f8fafc; }
.jp-pipe-btn-primary {
    background: #1e40af;
    border-color: #1e40af;
    color: #fff;
    box-shadow: 0 6px 14px rgba(30, 64, 175, .22);
}
.jp-pipe-btn-primary:hover:not(:disabled) { background: #1e3a8a; }
.jp-pipe[data-tone="partner"] .jp-pipe-btn-primary {
    background: #0f766e; border-color: #0f766e;
    box-shadow: 0 6px 14px rgba(15, 118, 110, .22);
}
.jp-pipe[data-tone="partner"] .jp-pipe-btn-primary:hover:not(:disabled) { background: #0d9488; }
.jp-pipe[data-tone="danger"] .jp-pipe-btn-primary {
    background: #dc2626; border-color: #dc2626;
    box-shadow: 0 6px 14px rgba(220, 38, 38, .22);
}
.jp-pipe[data-tone="danger"] .jp-pipe-btn-primary:hover:not(:disabled) { background: #b91c1c; }

/* Aide sous le champ statut besoin */
.jp-status-help {
    margin-top: 6px;
    font-size: 11.5px;
    line-height: 1.35;
    color: #94a3b8;
}

/* Ligne CV clos dans le panneau Réponses Consult-it */
.panel[data-name="rponseBesoins"] tr.jp-rb-closed > td,
.jp-case-detail .panel[data-name="rponseBesoins"] tr.jp-rb-closed > td {
    opacity: .55;
    background: #f8fafc !important;
}
.panel[data-name="rponseBesoins"] tr.jp-rb-closed:hover > td,
.jp-case-detail .panel[data-name="rponseBesoins"] tr.jp-rb-closed:hover > td {
    opacity: .72;
}
.panel[data-name="rponseBesoins"] tr.jp-rb-closed,
.jp-case-detail .panel[data-name="rponseBesoins"] tr.jp-rb-closed {
    cursor: help;
}
