/* Espace correspondant : styles limités aux vues utilisant correspondant/base.html.twig. */
body.correspondant-ui { --cp-ink:#20344a; --cp-muted:#627489; --cp-border:#dde5ed; --cp-blue:#235a91; background:#f3f6fa; color:var(--cp-ink); }
.correspondant-ui .main-content { box-sizing:border-box; width:calc(100% - 220px); max-width:none; padding:28px 32px; }
.correspondant-ui .main-content.container { margin-right:0; }
.correspondant-ui h1,.correspondant-ui h2,.correspondant-ui h3 { color:var(--cp-ink); font-weight:700; letter-spacing:-.025em; overflow-wrap:anywhere; }
.correspondant-ui h1 { font-size:1.8rem; }
.correspondant-ui h2 { font-size:1.15rem; }
.correspondant-ui .card { border:1px solid var(--cp-border); border-radius:14px; box-shadow:0 3px 12px #173b5405; }
.correspondant-ui .card-body { padding:20px; }
.correspondant-ui h5.card-title { font-size:.8rem; font-weight:600; color:var(--cp-muted); margin-bottom:12px; }
.correspondant-ui .card-text { overflow-wrap:anywhere; }
.correspondant-ui .btn { border-radius:8px!important; font-weight:500; }
.correspondant-ui a:focus-visible,.correspondant-ui button:focus-visible { outline:3px solid #df9f28; outline-offset:3px; }
.correspondant-ui .table-responsive { border:1px solid var(--cp-border); border-radius:12px; background:#fff; }
.correspondant-ui .table-responsive>.table { margin:0!important; }
.correspondant-ui .table { font-size:.86rem; vertical-align:middle; color:var(--cp-ink); }
.correspondant-ui .table small { font-size:inherit; }
.correspondant-ui .table thead th { padding:14px 12px; font-size:.73rem; font-weight:650; white-space:nowrap; background:#e9eff6; color:#304c67; border-bottom:1px solid #d8e2ec; box-shadow:none; }
.correspondant-ui .table tbody td { padding:13px 12px; border-bottom:1px solid #e6ecf2; }
/* Les classes de statut de tâche restent intactes ; seules les lignes ordinaires sont adoucies. */
.correspondant-ui .table tbody tr:not([class]) td { background:#fff; }
.correspondant-ui .table tbody tr:hover td { filter:brightness(.985); }
.correspondant-ui .table a { text-underline-offset:3px; }
.correspondant-ui .badge { border-radius:6px; padding:.4em .6em; font-weight:600; line-height:1.3; }
.correspondant-ui .pagination { margin-top:24px; gap:4px; flex-wrap:wrap; }
.correspondant-ui .pagination .page-link { border-radius:7px; }
.correspondant-ui .form-control,.correspondant-ui .form-select { border-radius:8px; border-color:#cbd7e3; }
.correspondant-ui .alert { border-radius:12px; }
.correspondant-ui .cp-page-header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:0 0 24px; padding-bottom:22px; border-bottom:1px solid var(--cp-border); }
.correspondant-ui .cp-page-header h1 { margin:8px 0; }
.correspondant-ui .cp-page-header p { margin:0; color:var(--cp-muted); font-size:.9rem; }
.correspondant-ui .cp-back,.correspondant-ui .cp-breadcrumb { font-size:.8rem; color:var(--cp-muted); text-decoration:none; }
.correspondant-ui .cp-breadcrumb { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:20px; }
.correspondant-ui .cp-breadcrumb a { color:var(--cp-blue); text-decoration:none; }
.correspondant-ui .cp-count { padding:9px 14px; border:1px solid var(--cp-border); border-radius:30px; white-space:nowrap; background:#fff; font-size:.8rem; font-weight:600; }
.correspondant-ui .cp-hero { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:30px; border-radius:18px; background:linear-gradient(115deg,var(--menu1, var(--sidebar-menu-1, #36A793)),var(--menu2, var(--sidebar-menu-2, #2b8d7c))); color:var(--sidebar-text, var(--sidebar-menu-text, #ffffff)); margin-bottom:24px; }
.correspondant-ui .cp-hero h1 { color:var(--sidebar-text, var(--sidebar-menu-text, #ffffff)); font-size:2rem; margin:12px 0; }
.correspondant-ui .cp-hero p { color:var(--sidebar-text, var(--sidebar-menu-text, #ffffff)); margin:0; max-width:650px; }
.correspondant-ui .cp-eyebrow { font-size:.65rem; font-weight:650; letter-spacing:.15em; color:var(--sidebar-text, var(--sidebar-menu-text, #ffffff)); }
.correspondant-ui .cp-hero-meta { display:flex; gap:18px; flex-wrap:wrap; margin-top:22px; color:var(--sidebar-text, var(--sidebar-menu-text, #ffffff)); font-size:.78rem; }
.correspondant-ui .cp-hero-button { background:transparent; color:var(--sidebar-text, var(--sidebar-menu-text, #ffffff)); border-color:currentColor; white-space:nowrap; padding:12px 16px; }
.correspondant-ui .cp-hero-button:hover,
.correspondant-ui .cp-hero-button:focus-visible,
.correspondant-ui .cp-hero-button:active { background:var(--sidebar-hover-bg, var(--sidebar-menu-hover-bg, #11565f)); color:var(--sidebar-text, var(--sidebar-menu-text, #ffffff)); border-color:currentColor; }
.correspondant-ui .cp-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
.correspondant-ui .cp-stat { display:flex; flex-direction:column; gap:12px; background:#fff; border:1px solid var(--cp-border); border-radius:14px; padding:22px; color:var(--cp-ink); text-decoration:none; transition:box-shadow .15s,border-color .15s; }
.correspondant-ui .cp-stat:hover { border-color:#7195b6; box-shadow:0 6px 18px #1c426e0c; }
.correspondant-ui .cp-stat-top { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:.8rem; font-weight:600; }
.correspondant-ui .cp-stat-top i { color:#2e7395; }
.correspondant-ui .cp-stat>strong { font-size:2.1rem; line-height:1; font-variant-numeric:tabular-nums; }
.correspondant-ui .cp-muted { color:var(--cp-muted); font-size:.78rem; line-height:1.5; }
.correspondant-ui .cp-dashboard-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); gap:22px; }
.correspondant-ui .cp-panel { min-width:0; background:#fff; border:1px solid var(--cp-border); border-radius:15px; padding:24px; }
.correspondant-ui .cp-section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:20px; }
.correspondant-ui .cp-section-heading h2 { margin:0 0 6px; }
.correspondant-ui .cp-section-heading p { font-size:.8rem; color:var(--cp-muted); margin:0; }
.correspondant-ui .cp-family-grid { display:grid; gap:9px; }
.correspondant-ui .cp-family { display:flex; align-items:center; gap:12px; border:1px solid #e5ebf2; border-radius:10px; padding:12px; text-decoration:none; color:var(--cp-ink); font-size:.87rem; }
.correspondant-ui .cp-family:hover,.correspondant-ui .cp-row-link:hover { background:#f3f7fb; }
.correspondant-ui .cp-family strong { margin-left:auto; font-size:1rem; font-variant-numeric:tabular-nums; }
.correspondant-ui .cp-chevron { color:#8498ac; font-size:.65rem; }
.correspondant-ui .cp-icon { width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; border-radius:9px; background:#eef4fa; color:#36698d; flex-shrink:0; }
.correspondant-ui .cp-tag { display:inline-block; background:#eef3f8; color:#526d87; font-size:.7rem; font-weight:600; border-radius:6px; padding:5px 8px; }
.correspondant-ui .cp-tag-success { background:#e9f5ee; color:#286642; margin-top:5px; }
.correspondant-ui .cp-footnote { margin:18px 0 0; color:var(--cp-muted); font-size:.72rem; line-height:1.6; }
.correspondant-ui .cp-list-row { display:flex; align-items:center; gap:14px; padding:16px 0; border-bottom:1px solid #e8edf3; font-size:.85rem; overflow-wrap:anywhere; }
.correspondant-ui .cp-list-row:first-of-type { padding-top:0; }
.correspondant-ui .cp-row-link { text-decoration:none; color:var(--cp-ink); }
.correspondant-ui .cp-date { display:flex; flex-direction:column; align-items:center; background:#edf3f9; padding:10px; border-radius:9px; min-width:62px; font-size:.67rem; color:#3a6389; }
.correspondant-ui .cp-date strong { font-size:1.35rem; }
.correspondant-ui .cp-text-link { display:inline-flex; gap:8px; align-items:center; color:var(--cp-blue); font-size:.8rem; font-weight:600; text-decoration:none; }
.correspondant-ui .cp-panel>.cp-text-link { margin-top:20px; }
.correspondant-ui .cp-empty { display:flex; flex-direction:column; align-items:flex-start; gap:12px; padding:24px 0; }
.correspondant-ui .cp-empty>i { font-size:1.6rem; color:#7c95aa; }
.correspondant-ui .cp-empty strong { font-size:.9rem; }
.correspondant-ui .cp-empty p { font-size:.8rem; color:var(--cp-muted); margin:0; }
.correspondant-ui .cp-quick-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:22px; }
.correspondant-ui .cp-quick-actions a { display:flex; align-items:center; gap:9px; background:#fff; border:1px solid var(--cp-border); border-radius:10px; padding:13px 16px; color:#335c7e; text-decoration:none; font-size:.82rem; }
.correspondant-ui .cp-quick-actions a:hover { border-color:#7195b6; }
@media(min-width:992px) { .correspondant-ui .main-content { margin-left:220px; } }
@media(max-width:1199.98px) { .correspondant-ui .cp-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .correspondant-ui .cp-hero { align-items:flex-start; flex-direction:column; } }
@media(max-width:991.98px) { .correspondant-ui .main-content { margin-left:0!important; width:100%; padding:22px; } .correspondant-ui .navbar { border-bottom:1px solid var(--cp-border); } }
@media(max-width:767.98px) { .correspondant-ui .cp-dashboard-grid { grid-template-columns:1fr; } .correspondant-ui .cp-page-header { align-items:flex-start; } .correspondant-ui .cp-count { font-size:.7rem; } }
@media(max-width:575.98px) { .correspondant-ui .main-content { padding:16px; } .correspondant-ui .cp-hero { padding:23px; } .correspondant-ui .cp-hero h1 { font-size:1.65rem; } .correspondant-ui .cp-hero p { font-size:.88rem; } .correspondant-ui .cp-stat { padding:15px; } .correspondant-ui .cp-stat-top { align-items:flex-start; font-size:.75rem; } .correspondant-ui .cp-stat-top i { display:none; } .correspondant-ui .cp-stats { gap:10px; } .correspondant-ui .cp-panel { padding:19px; } .correspondant-ui .cp-page-header { flex-direction:column; gap:12px; } .correspondant-ui .cp-quick-actions { display:grid; grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { .correspondant-ui * { transition:none!important; scroll-behavior:auto!important; } }

.correspondant-ui .cp-task-progress { background:#fff; border:1px solid var(--cp-border); border-radius:12px; padding:20px; margin:0 0 22px; font-size:.85rem; }
.correspondant-ui .cp-task-progress .progress { height:18px; background:#e9eff5; border-radius:8px; }
.correspondant-ui .cp-task-progress .progress-bar { background:#287b79; }
.correspondant-ui .cp-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:20px; }
.correspondant-ui .cp-tabs a { padding:9px 14px; border:1px solid var(--cp-border); border-radius:8px; color:var(--cp-blue); font-size:.85rem; text-decoration:none; background:#fff; }
.correspondant-ui .cp-tabs a[aria-current="page"] { background:#244f79; color:#fff; border-color:#244f79; }

/* Impayés : dernière période connue par dossier du correspondant connecté. */
.correspondant-ui .cp-unpaid { margin:0 0 24px; padding:22px 24px; border:1px solid #edb7bc; border-left:4px solid #b42332; border-radius:14px; background:#fff5f5; color:#8f1d2a; }
.correspondant-ui .cp-unpaid-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.correspondant-ui .cp-unpaid h2 { color:#a31f30; margin:0 0 8px; font-size:1.1rem; }
.correspondant-ui .cp-unpaid-heading p { margin:0; font-size:.85rem; }
.correspondant-ui .cp-unpaid-total { font-size:1.8rem; color:#b42332; white-space:nowrap; font-variant-numeric:tabular-nums; }
.correspondant-ui .cp-unpaid-note { font-size:.76rem; line-height:1.5; margin:14px 0; color:#83545a; }
.correspondant-ui .cp-unpaid-details summary { cursor:pointer; font-weight:600; font-size:.85rem; padding:7px 0; }
.correspondant-ui .cp-unpaid-details summary:focus-visible { outline:3px solid #b42332; outline-offset:4px; }
.correspondant-ui .cp-unpaid-details ul { list-style:none; padding:0; margin:8px 0 0; max-height:360px; overflow-y:auto; }
.correspondant-ui .cp-unpaid-details li { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:14px 4px; border-top:1px solid #efd3d6; }
.correspondant-ui .cp-unpaid-company { min-width:0; overflow-wrap:anywhere; }
.correspondant-ui .cp-unpaid-company a { color:#992234; font-size:.9rem; font-weight:600; text-underline-offset:3px; }
.correspondant-ui .cp-unpaid-company span { display:block; color:#83545a; font-size:.75rem; margin-top:5px; }
.correspondant-ui .cp-unpaid-details li>strong { white-space:nowrap; font-variant-numeric:tabular-nums; color:#b42332; }
@media(max-width:575.98px) { .correspondant-ui .cp-unpaid { padding:18px; } .correspondant-ui .cp-unpaid-heading { align-items:flex-start; flex-direction:column; gap:12px; } .correspondant-ui .cp-unpaid-details li { align-items:flex-start; flex-direction:column; gap:8px; } }
