/* Fenêtre « CV chez le client sans réponse » (case-liberation-poller.js) */

.clb-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    padding: 16px;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(2px);
    animation: clb-fade .18s ease-out;
    overflow-y: auto;
}

.clb-overlay.is-leaving {
    opacity: 0;
    transition: opacity .18s;
}

@keyframes clb-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.clb-modal {
    width: 100%;
    max-width: 680px;
    margin: auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .3), 0 2px 8px rgba(15, 23, 42, .08);
    animation: clb-in .22s cubic-bezier(.2, .9, .3, 1.2);
    font-size: 13.5px;
    color: #0f172a;
}

.clb-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px 18px;
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border-bottom: 1px solid #e0e7ff;
}

.clb-icon {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 6px 16px rgba(99, 102, 241, .35);
}

.clb-titles {
    flex: 1;
    min-width: 0;
}

.clb-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    color: #3730a3;
    letter-spacing: -.01em;
}

.clb-count {
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
}

.clb-subtitle {
    margin-top: 4px;
    color: #475569;
    line-height: 1.45;
}

.clb-close {
    flex: 0 0 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 15px;
    cursor: pointer;
}

.clb-close:hover {
    background: rgba(15, 23, 42, .06);
    color: #0f172a;
}

.clb-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 22px;
    max-height: 60vh;
    overflow-y: auto;
}

.clb-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #6366f1;
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s, opacity .15s, background .2s;
}

.clb-item:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, .07);
}

.clb-item.is-busy {
    opacity: .6;
}

.clb-item.is-extended {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.clb-item.is-released {
    border-left-color: #f97316;
    background: #fff7ed;
}

.clb-item-main {
    flex: 1 1 300px;
    min-width: 0;
}

.clb-item-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.clb-num {
    flex: 0 0 auto;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 1px 6px;
}

.clb-name {
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clb-name:hover {
    color: #4f46e5;
    text-decoration: none;
}

.clb-account {
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
}

.clb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.clb-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.6;
    background: #f1f5f9;
    color: #334155;
}

.clb-pill .fas {
    font-size: 9.5px;
    opacity: .75;
}

.clb-pill.is-info { background: #e0f2fe; color: #0369a1; }
.clb-pill.is-danger { background: #fee2e2; color: #b91c1c; }

.clb-item-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.clb-item-done {
    flex: 1 1 100%;
    font-weight: 600;
    color: #15803d;
}

.clb-item.is-released .clb-item-done {
    color: #c2410c;
}

.clb-btn {
    border: 0;
    border-radius: 9px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: box-shadow .15s, background .15s, transform .1s;
}

.clb-btn:active {
    transform: scale(.98);
}

.clb-btn:disabled {
    cursor: default;
    opacity: .7;
}

.clb-btn-extend {
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 4px 12px rgba(99, 102, 241, .3);
}

.clb-btn-release {
    color: #c2410c;
    background: #fff;
    box-shadow: inset 0 0 0 1px #fdba74;
}

.clb-btn-release:hover {
    background: #fff7ed;
}

.clb-btn-ghost {
    background: #fff;
    color: #334155;
    box-shadow: inset 0 0 0 1px #cbd5e1;
}

.clb-btn-ghost:hover {
    background: #f1f5f9;
}

.clb-foot {
    display: flex;
    justify-content: flex-end;
    padding: 14px 22px 16px;
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
}

/* Modale paramètres (réutilise le style .cvt-ap) */

.clb-settings-head {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border-bottom-color: #e0e7ff;
}

.clb-settings-icon {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 6px 16px rgba(99, 102, 241, .35);
}

.clb-settings-title {
    color: #3730a3;
}

.clb-settings-loading {
    padding: 24px 0;
    text-align: center;
    color: #64748b;
}

.clb-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 14px;
    cursor: pointer;
    font-weight: 600;
}

.clb-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.clb-toggle-track {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background .15s;
}

.clb-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .15s;
}

.clb-toggle input:checked + .clb-toggle-track {
    background: #6366f1;
}

.clb-toggle input:checked + .clb-toggle-track .clb-toggle-thumb {
    transform: translateX(16px);
}

.clb-settings-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.clb-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.clb-field-icon {
    flex: 0 0 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4f46e5;
}

.clb-field-text {
    flex: 1;
    min-width: 0;
}

.clb-field-title {
    font-weight: 600;
}

.clb-field-help {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.clb-field-input {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 12.5px;
}

.clb-field-input input {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #0f172a;
}

.clb-field-input input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

.clb-field-input input.is-invalid {
    border-color: #ef4444;
}

.clb-btn-save {
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 4px 12px rgba(99, 102, 241, .3);
}

@media (max-width: 560px) {
    .clb-item-actions {
        width: 100%;
    }

    .clb-item-actions .clb-btn {
        flex: 1;
    }

    .clb-field {
        flex-wrap: wrap;
    }
}
