/* AZALYS — Portail client premium v3.4.4
   Chargé après app.css pour éviter les anciens styles en cache. */
body.role-client-dossier{
  background:linear-gradient(135deg,#eef5ff 0%,#f8fbff 44%,#eef2ff 100%);
}
body.role-client-dossier .side{
  background:linear-gradient(180deg,#071a39 0%,#061226 100%);
  box-shadow:18px 0 45px rgba(15,23,42,.18);
}
body.role-client-dossier .side-brand{
  border-bottom-color:rgba(255,255,255,.12);
}
body.role-client-dossier .side-brand strong{letter-spacing:.02em}
body.role-client-dossier .side-nav .nav-btn:not(.hidden){
  border:1px solid rgba(96,165,250,.22);
  background:linear-gradient(135deg,rgba(37,99,235,.72),rgba(30,64,175,.48));
  color:#fff;
  box-shadow:0 14px 30px rgba(30,64,175,.22);
}
body.role-client-dossier .side-footer .btn:not(.hidden){
  border-color:rgba(148,163,184,.24);
  background:rgba(255,255,255,.08);
  color:#f8fafc;
}
body.role-client-dossier .topbar{
  border-bottom:1px solid rgba(148,163,184,.18);
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(18px);
}
body.role-client-dossier .main{
  background:radial-gradient(circle at 75% 5%,rgba(59,130,246,.16),transparent 36%),linear-gradient(180deg,#f8fbff,#eaf1fb);
}
.client-portal{
  max-width:1220px;
  margin:0 auto;
  padding:26px;
  gap:18px!important;
}
.client-portal .card,
.client-portal .client-hero{
  border:1px solid rgba(191,219,254,.72)!important;
  border-radius:28px!important;
  box-shadow:0 24px 70px rgba(15,23,42,.08)!important;
  background:rgba(255,255,255,.82)!important;
  backdrop-filter:blur(18px);
}
.client-hero{
  position:relative;
  overflow:hidden;
  min-height:178px;
  padding:30px 34px!important;
  background:linear-gradient(135deg,#ffffff 0%,#edf6ff 56%,#eef2ff 100%)!important;
}
.client-hero::before{
  content:"";
  position:absolute;
  width:260px;
  height:260px;
  right:-70px;
  top:-95px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(37,99,235,.22),rgba(37,99,235,0) 66%);
}
.client-hero::after{
  content:"";
  position:absolute;
  width:170px;
  height:170px;
  left:46%;
  bottom:-105px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(14,165,233,.18),rgba(14,165,233,0) 68%);
}
.client-hero>*{position:relative;z-index:1}
.client-hero .eyebrow{
  color:#315985;
  letter-spacing:.12em;
  font-weight:900;
}
.client-hero h1{
  margin:8px 0 10px!important;
  color:#0b2347;
  font-size:clamp(28px,3vw,42px)!important;
  letter-spacing:-.04em;
}
.client-hero p{
  max-width:760px;
  color:#526981!important;
  font-size:15px;
}
.client-hero-badge{
  display:flex;
  align-items:center;
  gap:8px;
  padding:12px 16px!important;
  border:1px solid rgba(34,197,94,.22);
  background:linear-gradient(135deg,#dcfce7,#f0fdf4)!important;
  color:#047857!important;
  box-shadow:0 12px 26px rgba(22,163,74,.12);
}
.client-hero-badge::before{content:"🔐"}
.client-action-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
}
.client-action-card{
  position:relative;
  min-height:154px;
  border:1px solid rgba(203,213,225,.72)!important;
  border-radius:24px!important;
  padding:20px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;
  text-align:left!important;
  display:grid!important;
  grid-template-columns:auto 1fr!important;
  grid-template-rows:1fr auto!important;
  gap:12px 14px!important;
  align-items:start!important;
  color:#10233f!important;
  box-shadow:0 18px 42px rgba(15,23,42,.08)!important;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.client-action-card:hover{
  transform:translateY(-4px);
  border-color:rgba(59,130,246,.42)!important;
  box-shadow:0 24px 58px rgba(15,23,42,.13)!important;
}
.client-action-card::after{
  content:"→";
  position:absolute;
  top:18px;
  right:18px;
  width:30px;
  height:30px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#1d4ed8;
  background:#eff6ff;
  font-weight:900;
}
.client-action-icon{
  width:50px;
  height:50px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px!important;
  background:linear-gradient(135deg,#eff6ff,#dbeafe);
  box-shadow:inset 0 0 0 1px rgba(59,130,246,.16);
}
.client-action-copy{
  min-width:0;
  padding-right:26px;
}
.client-action-copy strong{
  display:block;
  margin:2px 0 7px;
  color:#0f172a!important;
  font-size:16px!important;
  line-height:1.18;
}
.client-action-copy small{
  display:block;
  color:#64748b!important;
  line-height:1.45!important;
  font-size:13px!important;
}
.client-action-card em{
  grid-column:1/-1;
  justify-self:start;
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:6px 10px;
  border-radius:999px;
  background:#f1f5f9;
  color:#315985;
  font-style:normal;
  font-size:11px;
  font-weight:900;
  letter-spacing:.02em;
}
.client-action-card.tone-green .client-action-icon{background:linear-gradient(135deg,#ecfdf5,#dcfce7)}
.client-action-card.tone-gold .client-action-icon{background:linear-gradient(135deg,#fff7ed,#fef3c7)}
.client-action-card.tone-orange .client-action-icon{background:linear-gradient(135deg,#fff7ed,#fed7aa)}
.client-action-card.tone-purple .client-action-icon{background:linear-gradient(135deg,#faf5ff,#ede9fe)}
.client-action-card.tone-red .client-action-icon{background:linear-gradient(135deg,#fff1f2,#ffe4e6)}
.client-action-card.tone-pink .client-action-icon{background:linear-gradient(135deg,#fdf2f8,#fce7f3)}
.client-action-card.tone-message .client-action-icon{background:linear-gradient(135deg,#eef2ff,#dbeafe)}
.client-two-col{
  display:grid!important;
  grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr)!important;
  gap:18px!important;
}
.client-portal .section-head h3{
  color:#0b2347;
  font-size:19px;
  letter-spacing:-.02em;
}
.client-dossier-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:16px!important;
  border-radius:22px!important;
  border:1px solid rgba(203,213,225,.68)!important;
  background:linear-gradient(135deg,#ffffff,#f8fbff)!important;
  box-shadow:0 12px 30px rgba(15,23,42,.06);
}
.client-dossier-main{
  display:flex!important;
  align-items:center!important;
  flex-direction:row!important;
  gap:14px!important;
  min-width:0;
}
.client-dossier-main>div{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}
.client-dossier-main strong{
  color:#0f172a;
  font-size:15px;
}
.client-dossier-main small{
  color:#64748b;
}
.client-dossier-avatar{
  width:46px;
  height:46px;
  min-width:46px;
  border-radius:17px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#1d4ed8,#60a5fa);
  color:#fff;
  font-weight:900;
  box-shadow:0 14px 26px rgba(37,99,235,.22);
}
.client-workflow{
  display:grid!important;
  gap:12px!important;
}
.client-workflow div{
  position:relative;
  border:1px solid rgba(203,213,225,.68)!important;
  border-radius:20px!important;
  padding:15px 15px 15px 48px!important;
  background:linear-gradient(135deg,#ffffff,#f8fafc)!important;
}
.client-workflow div::before{
  content:"✓";
  position:absolute;
  left:15px;
  top:15px;
  width:24px;
  height:24px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#dbeafe;
  color:#1d4ed8;
  font-weight:900;
}
.client-workflow strong{color:#0f172a}
.client-workflow span{color:#64748b!important;line-height:1.45}
.client-empty-state{
  grid-column:1/-1;
  border:1px dashed rgba(148,163,184,.8);
  border-radius:24px;
  padding:24px;
  background:rgba(255,255,255,.72);
  color:#475569;
}
.client-empty-state strong{display:block;color:#0f172a;margin-bottom:6px;font-size:16px}
@media(max-width:1100px){
  .client-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .client-two-col{grid-template-columns:1fr!important}
}
@media(max-width:760px){
  .client-portal{padding:16px}
  .client-hero{padding:24px!important}
  .client-action-grid{grid-template-columns:1fr!important}
  .client-dossier-row{align-items:stretch!important;flex-direction:column!important}
  .client-dossier-row .btn{width:100%}
}

/* HOTFIX v3.4.6 — séparation stricte portail client / cockpit cabinet
   .client-portal définissait display:flex et annulait .view{display:none}.
   On force le masquage du portail client tant que sa vue n'est pas active. */
.view.client-portal:not(.active){display:none!important;}
.view.client-portal.active{display:flex!important;flex-direction:column;}
body:not(.role-client-dossier) .side-nav .nav-btn[data-view="client"],
body:not(.role-client-dossier) .side-nav .nav-btn.client-only{display:none!important;}
body.role-client-dossier .side-nav .nav-btn[data-view="client"]{display:flex!important;}
body.role-client-dossier .view:not(#view-client){display:none!important;}

/* AZALYS v3.4.7 — Portail client structuré : dashboard / dépôts / mode avancé */
.client-portal-root{display:flex;flex-direction:column;gap:18px;width:100%;max-width:1280px;margin:0 auto;}
.client-mode-tabs{display:flex;gap:10px;flex-wrap:wrap;background:rgba(255,255,255,.72);border:1px solid rgba(191,207,229,.72);border-radius:22px;padding:8px;box-shadow:0 20px 50px rgba(15,23,42,.08);backdrop-filter:blur(16px)}
.client-mode-tabs button{border:0;background:transparent;border-radius:16px;padding:12px 16px;font-weight:900;color:#47617f;cursor:pointer;transition:.18s ease;}
.client-mode-tabs button:hover{background:#eef6ff;color:#0f2b55;}
.client-mode-tabs button.active{background:linear-gradient(135deg,#2563eb,#3b82f6);color:#fff;box-shadow:0 12px 24px rgba(37,99,235,.22)}
.client-mode-body{display:flex;flex-direction:column;gap:18px;}
.client-dashboard-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
.client-stat-card{border:1px solid rgba(203,213,225,.72);background:linear-gradient(180deg,#fff,#f8fbff);border-radius:22px;padding:18px;display:grid;gap:6px;box-shadow:0 18px 40px rgba(15,23,42,.06);}
.client-stat-card span{width:44px;height:44px;border-radius:16px;display:grid;place-items:center;background:#eef6ff;font-size:22px;}
.client-stat-card strong{font-size:30px;line-height:1;color:#0f2b55;font-weight:1000;}
.client-stat-card small{font-weight:900;color:#0f172a;font-size:14px;}
.client-stat-card em{font-style:normal;color:#64748b;font-size:13px;line-height:1.35;}
.client-quick-grid{display:grid;grid-template-columns:1.1fr 1fr 1fr 1fr;gap:14px;}
.client-quick-card{border:1px solid rgba(203,213,225,.72);background:#fff;border-radius:22px;padding:20px;text-align:left;display:flex;flex-direction:column;gap:8px;cursor:pointer;box-shadow:0 18px 42px rgba(15,23,42,.07);transition:.18s ease;color:#0f172a;}
.client-quick-card:hover{transform:translateY(-2px);box-shadow:0 22px 50px rgba(15,23,42,.10);}
.client-quick-card.primary{background:linear-gradient(135deg,#0f3b85,#2563eb);color:#fff;border-color:rgba(37,99,235,.35);}
.client-quick-card.ai-card{background:linear-gradient(135deg,#f5f3ff,#eff6ff);border-color:#c4b5fd;}
.client-quick-card strong{font-size:18px;font-weight:1000;}
.client-quick-card span{font-size:14px;line-height:1.45;color:inherit;opacity:.78;}
.client-depot-choice .client-action-card{min-height:132px;}
.client-action-card.is-active{outline:3px solid rgba(37,99,235,.22);border-color:#93c5fd;box-shadow:0 24px 56px rgba(37,99,235,.18);}
.client-depot-layout{align-items:start;}
.client-upload-card{position:sticky;top:18px;}
.client-upload-form{display:grid;gap:14px;}
.client-upload-form label{display:grid;gap:8px;font-weight:900;color:#0f172a;}
.client-upload-form small{font-weight:500;}
.client-doc-list{display:grid;gap:10px;}
.client-doc-row{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid rgba(203,213,225,.75);border-radius:18px;padding:14px;background:linear-gradient(180deg,#fff,#f8fbff);}
.client-doc-row>div{display:grid;gap:4px;min-width:0;}
.client-doc-row strong{color:#0f172a;font-weight:1000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:580px;}
.client-doc-row small{color:#64748b;font-size:13px;line-height:1.35;}
.client-doc-row em{font-style:normal;color:#334155;font-size:13px;line-height:1.35;}
.client-advanced-grid{align-items:start;}
.client-module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.client-module-card{border:1px solid rgba(203,213,225,.75);border-radius:20px;background:#fff;padding:16px;text-align:left;display:grid;grid-template-columns:44px 1fr;column-gap:12px;row-gap:4px;cursor:pointer;transition:.18s ease;box-shadow:0 16px 34px rgba(15,23,42,.06);}
.client-module-card:hover{transform:translateY(-2px);box-shadow:0 20px 46px rgba(15,23,42,.10);border-color:#bfdbfe;}
.client-module-card span{grid-row:1/3;width:44px;height:44px;border-radius:16px;display:grid;place-items:center;background:#eef6ff;font-size:22px;}
.client-module-card strong{color:#0f172a;font-weight:1000;}
.client-module-card small{color:#64748b;line-height:1.35;}
body.role-client-dossier .top-actions .admin-only{display:none!important;}
@media(max-width:1100px){.client-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.client-quick-grid{grid-template-columns:1fr}.client-module-grid{grid-template-columns:1fr}.client-upload-card{position:static}.client-doc-row{align-items:flex-start;flex-direction:column;}}
@media(max-width:720px){.client-dashboard-grid{grid-template-columns:1fr}.client-mode-tabs{display:grid;grid-template-columns:1fr}.client-mode-tabs button{text-align:left}.client-doc-row strong{max-width:280px;}}

/* AZALYS v3.4.8 — Dépôts simples premium inspiré pré-comptabilité */
.client-depot-command{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:22px 24px!important;
  background:linear-gradient(135deg,#ffffff 0%,#eef6ff 58%,#f8fbff 100%)!important;
}
.client-depot-command h3{
  margin:4px 0 6px;
  color:#0b2347;
  font-size:24px;
  letter-spacing:-.03em;
}
.client-depot-command .eyebrow{
  color:#315985;
  font-size:12px;
  letter-spacing:.12em;
  font-weight:1000;
  text-transform:uppercase;
}
.client-depot-steps{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.client-depot-steps span{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(191,219,254,.78);
  background:#fff;
  color:#315985;
  font-size:12px;
  font-weight:1000;
  box-shadow:0 10px 22px rgba(15,23,42,.05);
}
.client-depot-steps span.active{
  background:linear-gradient(135deg,#2563eb,#60a5fa);
  color:#fff;
  border-color:transparent;
}
.client-depot-layout-xp{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr);
  gap:18px;
  align-items:start;
}
.client-depot-side{
  display:grid;
  gap:18px;
}
.client-upload-card-xp{
  position:sticky;
  top:18px;
  overflow:hidden;
}
.client-upload-card-xp::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:linear-gradient(90deg,#2563eb,#38bdf8,#22c55e);
}
.client-upload-form-xp{
  gap:16px;
}
.client-form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.client-dropzone{
  position:relative;
  display:grid;
  justify-items:center;
  gap:10px;
  padding:28px 22px;
  border:2px dashed rgba(37,99,235,.34);
  border-radius:26px;
  background:linear-gradient(180deg,#f8fbff,#eef6ff);
  cursor:pointer;
  text-align:center;
  transition:transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.client-dropzone:hover,
.client-dropzone.is-dragover{
  transform:translateY(-2px);
  border-color:#2563eb;
  background:linear-gradient(180deg,#ffffff,#eff6ff);
  box-shadow:0 22px 55px rgba(37,99,235,.16);
}
.client-file-input{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
}
.client-drop-ic{
  width:62px;
  height:62px;
  border-radius:22px;
  display:grid;
  place-items:center;
  font-size:32px;
  background:#dbeafe;
  box-shadow:inset 0 0 0 1px rgba(59,130,246,.18),0 16px 35px rgba(37,99,235,.13);
}
.client-dropzone strong{
  color:#0f172a;
  font-size:18px;
  font-weight:1000;
}
.client-dropzone small{
  max-width:420px;
  color:#64748b;
  line-height:1.45;
}
.client-selected-files{
  display:block;
}
.client-file-empty{
  padding:13px 14px;
  border-radius:16px;
  border:1px dashed rgba(148,163,184,.65);
  background:rgba(248,250,252,.78);
  color:#64748b;
  font-size:13px;
}
.client-file-queue{
  display:grid;
  gap:10px;
}
.client-file-row{
  display:grid;
  grid-template-columns:52px 1fr 34px;
  align-items:center;
  gap:12px;
  padding:12px;
  border:1px solid rgba(203,213,225,.72);
  border-radius:18px;
  background:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,.05);
}
.client-file-row>span{
  display:grid;
  place-items:center;
  min-width:52px;
  height:42px;
  border-radius:14px;
  background:#eef6ff;
  color:#1d4ed8;
  font-size:11px;
  font-weight:1000;
}
.client-file-row strong{
  display:block;
  color:#0f172a;
  font-size:14px;
  font-weight:1000;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.client-file-row small{
  color:#64748b;
  font-size:12px;
}
.client-file-row button{
  width:34px;
  height:34px;
  border:0;
  border-radius:999px;
  background:#fee2e2;
  color:#b91c1c;
  font-size:20px;
  font-weight:1000;
  cursor:pointer;
}
.client-optional-details{
  border:1px solid rgba(203,213,225,.72);
  border-radius:20px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  overflow:hidden;
}
.client-optional-details summary{
  padding:14px 16px;
  cursor:pointer;
  color:#0f172a;
  font-weight:1000;
  list-style:none;
}
.client-optional-details summary::-webkit-details-marker{display:none;}
.client-optional-details summary::after{
  content:"+";
  float:right;
  width:26px;
  height:26px;
  display:inline-grid;
  place-items:center;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
}
.client-optional-details[open] summary::after{content:"–";}
.client-optional-details>div,
.client-optional-details>.client-checkline{
  margin:0 16px 14px;
}
.client-checkline{
  display:flex!important;
  align-items:center;
  gap:10px!important;
  padding:12px 14px;
  border-radius:16px;
  background:#fff7ed;
  color:#9a3412!important;
  font-weight:900!important;
}
.client-checkline input{width:16px;height:16px;}
.client-upload-note{
  margin:0;
  padding:12px 14px;
  border-radius:16px;
  background:#f1f5f9;
  color:#64748b;
  font-size:13px;
  line-height:1.4;
}
.client-import-guide .client-workflow.compact div{
  padding-top:13px!important;
  padding-bottom:13px!important;
}
.client-action-count{
  position:absolute;
  right:18px;
  bottom:18px;
  color:#64748b;
  font-size:12px;
  font-weight:1000;
}
.client-action-card em{
  max-width:calc(100% - 110px);
}
@media(max-width:1180px){
  .client-depot-layout-xp{grid-template-columns:1fr;}
  .client-upload-card-xp{position:static;}
}
@media(max-width:820px){
  .client-depot-command{align-items:stretch;flex-direction:column;}
  .client-depot-steps{justify-content:flex-start;}
  .client-form-row{grid-template-columns:1fr;}
  .client-dropzone{padding:24px 16px;}
}

/* AZALYS v3.4.9 — Dépôts simples en fenêtre au premier plan */
.client-depot-split{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(340px,.34fr);
  gap:18px;
  align-items:start;
}
.client-depot-main{min-width:0;}
.client-depot-choice .client-action-card{
  min-height:150px;
}
.client-action-card.is-active{
  outline:3px solid rgba(37,99,235,.18);
}
.client-depot-modal{
  position:fixed;
  inset:0;
  z-index:5000;
  display:grid;
  place-items:center;
  padding:24px;
}
.client-depot-backdrop{
  position:absolute;
  inset:0;
  background:rgba(8,18,38,.56);
  backdrop-filter:blur(9px);
}
.client-depot-modal-panel{
  position:relative!important;
  z-index:1;
  width:min(920px,calc(100vw - 48px));
  max-height:calc(100vh - 48px);
  overflow:auto;
  padding:28px!important;
  box-shadow:0 38px 120px rgba(2,6,23,.36)!important;
  animation:clientModalIn .18s ease-out;
}
.client-depot-modal-panel .section-head{
  padding-right:56px;
}
.client-modal-close{
  position:absolute;
  top:18px;
  right:18px;
  z-index:2;
  width:38px;
  height:38px;
  border:1px solid rgba(203,213,225,.8);
  border-radius:999px;
  background:#fff;
  color:#0f172a;
  font-size:24px;
  font-weight:1000;
  line-height:1;
  cursor:pointer;
  box-shadow:0 14px 28px rgba(15,23,42,.12);
}
.client-modal-close:hover{
  background:#eff6ff;
  color:#1d4ed8;
}
@keyframes clientModalIn{
  from{opacity:0;transform:translateY(14px) scale(.98);}
  to{opacity:1;transform:translateY(0) scale(1);}
}
@media(max-width:1180px){
  .client-depot-split{grid-template-columns:1fr;}
}
@media(max-width:720px){
  .client-depot-modal{padding:10px;place-items:start center;overflow:auto;}
  .client-depot-modal-panel{width:100%;max-height:none;padding:22px 16px!important;border-radius:24px!important;}
  .client-depot-modal-panel .section-head{padding-right:42px;}
  .client-modal-close{top:14px;right:14px;}
}

/* AZALYS v3.5.0 — Messagerie client/cabinet activée */
.client-message-layout{
  display:grid;
  grid-template-columns:minmax(320px,.42fr) minmax(0,1fr);
  grid-template-areas:"composer thread" "help thread";
  gap:18px;
  align-items:start;
}
.client-message-composer-card{grid-area:composer;}
.client-message-thread-card{grid-area:thread;min-height:420px;}
.client-message-help-card{grid-area:help;}
.client-message-form{display:grid;gap:14px;}
.client-message-form label{display:grid;gap:8px;font-weight:900;color:#0f172a;}
.client-message-thread{display:grid;gap:14px;max-height:620px;overflow:auto;padding-right:6px;}
.client-message-row{display:flex;}
.client-message-row.from-client{justify-content:flex-end;}
.client-message-row.from-cabinet{justify-content:flex-start;}
.client-message-bubble{
  width:min(720px,92%);
  border:1px solid rgba(203,213,225,.72);
  border-radius:24px;
  padding:16px 18px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  box-shadow:0 18px 40px rgba(15,23,42,.07);
}
.client-message-row.from-client .client-message-bubble{
  background:linear-gradient(135deg,#0f3b85,#2563eb);
  color:#fff;
  border-color:rgba(37,99,235,.4);
}
.client-message-row.from-cabinet .client-message-bubble{
  background:linear-gradient(135deg,#ffffff,#eef6ff);
}
.client-message-row.is-unread .client-message-bubble{
  border-color:#60a5fa;
  box-shadow:0 20px 52px rgba(37,99,235,.18);
}
.client-message-meta{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:8px;}
.client-message-meta strong{font-weight:1000;color:inherit;}
.client-message-meta span{font-size:12px;color:inherit;opacity:.68;}
.client-message-bubble h4{margin:0 0 8px;color:inherit;font-size:15px;font-weight:1000;}
.client-message-bubble p{margin:0;color:inherit;opacity:.86;line-height:1.55;font-size:14px;}
body.role-client-dossier .client-message-row.from-client .client-message-meta span,
body.role-client-dossier .client-message-row.from-client .client-message-bubble p{color:#fff;}
.cabinet-message-box{display:grid;gap:14px;margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid rgba(203,213,225,.72);}
.cabinet-message-list{display:grid;gap:12px;}
.cabinet-message-row{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px;padding:15px;border:1px solid rgba(203,213,225,.72);border-radius:18px;background:linear-gradient(180deg,#fff,#f8fbff);box-shadow:0 12px 30px rgba(15,23,42,.05);}
.cabinet-message-row.is-unread{border-color:#60a5fa;box-shadow:0 18px 42px rgba(37,99,235,.13);}
.cabinet-message-main{display:grid;gap:5px;min-width:0;}
.cabinet-message-main strong{color:#0f172a;font-weight:1000;}
.cabinet-message-main small{color:#64748b;}
.cabinet-message-main b{color:#0f2b55;}
.cabinet-message-main p{margin:0;color:#334155;line-height:1.45;}
.cabinet-message-actions{display:grid;gap:8px;align-content:start;}
.cabinet-message-actions textarea{min-height:70px;}
@media(max-width:1100px){
  .client-message-layout{grid-template-columns:1fr;grid-template-areas:"composer" "thread" "help";}
  .cabinet-message-row{grid-template-columns:1fr;}
}

/* AZALYS v3.5.1 — Refonte présentation Messages cabinet */
.client-message-redesign{
  display:grid;
  grid-template-columns:minmax(0,1fr) 350px;
  gap:18px;
  align-items:start;
}
.client-message-main-card{
  padding:0!important;
  overflow:hidden;
}
.client-message-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:26px 28px;
  border-bottom:1px solid rgba(203,213,225,.72);
  background:
    radial-gradient(circle at 94% 0%,rgba(37,99,235,.14),transparent 34%),
    linear-gradient(135deg,#ffffff 0%,#eef6ff 100%);
}
.client-message-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-bottom:8px;
  color:#315985;
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-weight:1000;
}
.client-message-eyebrow::before{content:"💬";font-size:13px;letter-spacing:0;}
.client-message-panel-head h3{
  margin:0 0 6px!important;
  color:#0b2347!important;
  font-size:26px!important;
  letter-spacing:-.035em;
}
.client-message-panel-head p{
  margin:0;
  max-width:680px;
  color:#526981;
  line-height:1.45;
}
.client-message-panel-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.client-message-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  padding:16px 18px;
  background:rgba(248,251,255,.76);
  border-bottom:1px solid rgba(203,213,225,.62);
}
.client-message-kpis div{
  border:1px solid rgba(203,213,225,.72);
  border-radius:18px;
  padding:14px 16px;
  background:#fff;
  display:grid;
  gap:4px;
  box-shadow:0 12px 26px rgba(15,23,42,.04);
}
.client-message-kpis strong{
  color:#0f2b55;
  font-size:27px;
  line-height:1;
  font-weight:1000;
}
.client-message-kpis span{
  color:#64748b;
  font-size:12px;
  font-weight:900;
}
.client-message-thread-wrap{
  padding:20px 22px 18px;
  min-height:250px;
  background:linear-gradient(180deg,#f8fbff 0%,#ffffff 100%);
}
.client-message-thread-wrap .client-empty-state{
  min-height:170px;
  display:grid;
  align-content:center;
  justify-items:center;
  text-align:center;
  border-radius:24px;
  background:linear-gradient(135deg,#fff,#f8fbff);
}
.client-message-thread{
  max-height:430px;
  padding:4px 6px 4px 0;
}
.client-message-row + .client-message-row{margin-top:2px;}
.client-message-bubble{
  border-radius:22px;
}
.client-message-row.from-client .client-message-bubble{
  border-bottom-right-radius:8px;
}
.client-message-row.from-cabinet .client-message-bubble{
  border-bottom-left-radius:8px;
}
.client-message-form-modern{
  margin:0 22px 22px;
  padding:18px;
  border:1px solid rgba(147,197,253,.72);
  border-radius:24px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  box-shadow:0 18px 45px rgba(37,99,235,.08);
  display:grid;
  gap:14px;
}
.client-compose-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom:2px;
}
.client-compose-head strong{
  display:block;
  color:#0b2347;
  font-size:17px;
  font-weight:1000;
}
.client-compose-head span{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:13px;
}
.client-message-compose-grid{
  display:grid;
  grid-template-columns:minmax(220px,.72fr) minmax(260px,1fr);
  gap:12px;
}
.client-message-form-modern label{
  display:grid;
  gap:8px;
  color:#0f172a;
  font-weight:900;
}
.client-message-form-modern .control{
  background:#fff;
}
.client-message-textarea-label textarea{
  min-height:112px;
  resize:vertical;
}
.client-compose-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.client-compose-footer span{
  color:#64748b;
  font-size:13px;
}
.client-message-side-stack{
  display:grid;
  gap:18px;
}
.client-message-side-card{
  padding:20px!important;
}
.client-message-tips{
  display:grid;
  gap:10px;
}
.client-message-tips div{
  display:grid;
  grid-template-columns:34px 1fr;
  column-gap:12px;
  row-gap:4px;
  align-items:start;
  padding:13px;
  border:1px solid rgba(203,213,225,.72);
  border-radius:18px;
  background:linear-gradient(180deg,#fff,#f8fbff);
}
.client-message-tips span{
  grid-row:1/3;
  width:34px;
  height:34px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#dbeafe;
  color:#1d4ed8;
  font-weight:1000;
}
.client-message-tips strong{
  color:#0f172a;
  font-weight:1000;
}
.client-message-tips small{
  color:#64748b;
  line-height:1.4;
}
.client-message-side-card .client-workflow div{
  padding:13px 13px 13px 46px!important;
  border-radius:18px!important;
}
.client-message-side-card .client-doc-row{
  align-items:flex-start;
  flex-direction:column;
}
.client-message-side-card .client-doc-row strong{max-width:250px;}
@media(max-width:1180px){
  .client-message-redesign{grid-template-columns:1fr;}
  .client-message-side-stack{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:820px){
  .client-message-panel-head{align-items:flex-start;flex-direction:column;padding:22px;}
  .client-message-panel-actions{width:100%;justify-content:stretch;}
  .client-message-panel-actions .btn{flex:1;}
  .client-message-kpis{grid-template-columns:1fr;}
  .client-message-compose-grid{grid-template-columns:1fr;}
  .client-compose-footer{align-items:stretch;flex-direction:column;}
  .client-compose-footer .btn{width:100%;}
  .client-message-side-stack{grid-template-columns:1fr;}
}

/* AZALYS v3.5.2 — boîte messages clients côté cabinet */
.cabinet-inbox{display:grid;gap:18px;}
.cabinet-inbox-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:26px;border-radius:28px;background:linear-gradient(135deg,#ffffff,#eef6ff);box-shadow:0 26px 70px rgba(15,23,42,.08);}
.cabinet-inbox-hero h3{margin:6px 0 8px;font-size:30px;color:#0f2b55;letter-spacing:-.04em;}
.cabinet-inbox-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.cabinet-inbox-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
.cabinet-inbox-kpis .card{padding:18px;border-radius:22px;background:linear-gradient(180deg,#fff,#f8fbff);box-shadow:0 18px 46px rgba(15,23,42,.06);}
.cabinet-inbox-kpis strong{display:block;font-size:28px;line-height:1;color:#1d4ed8;font-weight:1000;letter-spacing:-.04em;}
.cabinet-inbox-kpis span{display:block;margin-top:8px;color:#0f172a;font-weight:1000;}
.cabinet-inbox-kpis small{display:block;margin-top:5px;color:#64748b;font-weight:700;line-height:1.35;}
.cabinet-inbox-list-card{border-radius:26px;padding:20px;}
.cabinet-inbox-list{max-height:calc(100vh - 390px);min-height:360px;overflow:auto;padding-right:6px;}
.cabinet-message-row.is-unread::before{content:'Nouveau';position:absolute;top:12px;right:12px;border-radius:999px;padding:4px 9px;background:#dbeafe;color:#1d4ed8;font-size:11px;font-weight:1000;}
.cabinet-message-row{position:relative;}
@media(max-width:1100px){.cabinet-inbox-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}.cabinet-inbox-hero{align-items:flex-start;flex-direction:column;}.cabinet-inbox-actions{justify-content:flex-start;}}
@media(max-width:720px){.cabinet-inbox-kpis{grid-template-columns:1fr;}.cabinet-inbox-hero h3{font-size:24px;}.cabinet-inbox-list{max-height:none;}}

/* V3.5.3 - Cabinet messages redesigned as grouped conversation threads */
.cabinet-inbox-v2{gap:16px;}
.cabinet-inbox-hero-slim{padding:22px 26px;border-radius:26px;}
.cabinet-inbox-hero-slim h3{font-size:28px;margin:5px 0 6px;}
.cabinet-inbox-kpis-compact .card{position:relative;overflow:hidden;border:1px solid rgba(191,219,254,.72);}
.cabinet-inbox-kpis-compact .card::after{content:'';position:absolute;inset:auto -26px -38px auto;width:90px;height:90px;border-radius:999px;background:rgba(59,130,246,.08);}
.cabinet-inbox-kpis-compact .card.kpi-hot{border-color:rgba(248,113,113,.42);background:linear-gradient(180deg,#fff,#fff7f7);}
.cabinet-inbox-kpis-compact .card.kpi-hot strong{color:#dc2626;}
.cabinet-inbox-workspace{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start;}
.cabinet-thread-panel{padding:18px;border-radius:28px;background:linear-gradient(180deg,#fff,#f8fbff);box-shadow:0 24px 70px rgba(15,23,42,.07);}
.cabinet-thread-head{padding:4px 4px 16px;margin-bottom:2px;border-bottom:1px solid rgba(203,213,225,.68);}
.cabinet-thread-stack{display:grid;gap:16px;max-height:calc(100vh - 410px);min-height:430px;overflow:auto;padding:14px 6px 6px 0;scrollbar-width:thin;}
.cabinet-thread-card{position:relative;border:1px solid rgba(203,213,225,.86);border-radius:24px;background:#fff;box-shadow:0 14px 42px rgba(15,23,42,.06);overflow:hidden;}
.cabinet-thread-card.has-unread{border-color:rgba(59,130,246,.68);box-shadow:0 20px 54px rgba(37,99,235,.12);}
.cabinet-thread-card.has-unread::before{content:'';position:absolute;left:0;top:0;bottom:0;width:5px;background:linear-gradient(180deg,#2563eb,#22c55e);}
.cabinet-thread-titlebar{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:12px;align-items:center;padding:16px 18px;background:linear-gradient(135deg,#f8fbff,#eef6ff);border-bottom:1px solid rgba(203,213,225,.72);}
.cabinet-thread-avatar{display:grid;place-items:center;width:46px;height:46px;border-radius:16px;background:linear-gradient(135deg,#2563eb,#60a5fa);color:#fff;font-weight:1000;box-shadow:0 14px 28px rgba(37,99,235,.18);}
.cabinet-thread-title{display:grid;gap:3px;min-width:0;}
.cabinet-thread-title strong{font-size:15px;color:#0f172a;font-weight:1000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cabinet-thread-title span{font-size:12px;color:#64748b;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cabinet-thread-title-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.cabinet-thread-bubbles{display:grid;gap:12px;padding:18px;background:linear-gradient(180deg,#ffffff,#f8fbff);}
.cabinet-chat-line{display:flex;}
.cabinet-chat-line.from-client{justify-content:flex-start;}
.cabinet-chat-line.from-cabinet{justify-content:flex-end;}
.cabinet-chat-bubble{max-width:min(680px,78%);border:1px solid rgba(203,213,225,.75);border-radius:20px;padding:12px 14px;background:#fff;box-shadow:0 12px 28px rgba(15,23,42,.04);}
.cabinet-chat-line.from-client .cabinet-chat-bubble{border-top-left-radius:8px;background:linear-gradient(180deg,#ffffff,#f1f7ff);}
.cabinet-chat-line.from-cabinet .cabinet-chat-bubble{border-top-right-radius:8px;background:linear-gradient(135deg,#2563eb,#3b82f6);color:#fff;border-color:rgba(37,99,235,.45);}
.cabinet-chat-line.is-unread .cabinet-chat-bubble{border-color:#60a5fa;box-shadow:0 14px 34px rgba(37,99,235,.13);}
.cabinet-chat-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:6px;}
.cabinet-chat-meta b{font-size:12px;color:#0f2b55;font-weight:1000;}
.cabinet-chat-meta span{font-size:11px;color:#64748b;font-weight:750;}
.cabinet-chat-line.from-cabinet .cabinet-chat-meta b,
.cabinet-chat-line.from-cabinet .cabinet-chat-meta span{color:rgba(255,255,255,.86);}
.cabinet-chat-bubble strong{display:block;margin-bottom:6px;font-size:13px;color:#0f172a;font-weight:1000;}
.cabinet-chat-line.from-cabinet .cabinet-chat-bubble strong{color:#fff;}
.cabinet-chat-bubble p{margin:0;color:#334155;line-height:1.55;font-size:14px;}
.cabinet-chat-line.from-cabinet .cabinet-chat-bubble p{color:rgba(255,255,255,.95);}
.cabinet-reply-composer{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:10px;padding:14px 18px;background:#fff;border-top:1px solid rgba(203,213,225,.72);}
.cabinet-reply-composer textarea{min-height:54px;resize:vertical;border-radius:18px;}
.cabinet-reply-composer .btn{height:54px;align-self:start;border-radius:18px;}
.cabinet-inbox-side{display:grid;gap:14px;position:sticky;top:96px;}
.cabinet-side-card{border-radius:24px;padding:18px;background:linear-gradient(180deg,#fff,#f8fbff);box-shadow:0 18px 50px rgba(15,23,42,.06);}
.cabinet-side-card h4{margin:8px 0 8px;color:#0f172a;font-size:17px;}
.cabinet-side-card.soft{background:linear-gradient(135deg,#f8fbff,#eef6ff);}
.cabinet-priority-list{display:grid;gap:8px;margin-top:12px;}
.cabinet-priority-list div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid rgba(203,213,225,.74);border-radius:16px;background:#fff;}
.cabinet-priority-list b{font-size:12px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cabinet-priority-list span{font-size:11px;color:#1d4ed8;font-weight:1000;white-space:nowrap;}
.cabinet-empty-thread{padding:40px;text-align:center;border:1px dashed rgba(148,163,184,.7);border-radius:22px;background:#fff;}
@media(max-width:1180px){.cabinet-inbox-workspace{grid-template-columns:1fr;}.cabinet-inbox-side{position:static;grid-template-columns:repeat(2,minmax(0,1fr));}.cabinet-thread-stack{max-height:none;}}
@media(max-width:760px){.cabinet-thread-titlebar{grid-template-columns:40px 1fr;}.cabinet-thread-title-actions{grid-column:1/-1;justify-content:flex-start;}.cabinet-chat-bubble{max-width:92%;}.cabinet-reply-composer{grid-template-columns:1fr;}.cabinet-reply-composer .btn{width:100%;}.cabinet-inbox-side{grid-template-columns:1fr;}}


/* AZALYS v17.5 — Portail client premium + entêtes allégés */
.client-hero.client-hero-compact{
  min-height:132px;
  padding:22px 28px!important;
}
.client-hero.client-hero-compact h1{font-size:clamp(24px,2.6vw,34px)!important;margin:6px 0 8px!important;}
.client-hero.client-hero-compact p{font-size:14px;max-width:820px;}
.client-hero.client-hero-compact .eyebrow{font-size:11px;letter-spacing:.1em;}
.client-mode-tabs-premium{margin-top:-2px;}
.client-panel-card{padding:20px!important;display:grid;gap:16px;}
.client-card-intro.compact{display:grid;gap:4px;margin-bottom:2px;}
.client-card-intro.compact .eyebrow{
  display:inline-flex;align-items:center;gap:6px;color:#315985;text-transform:uppercase;
  letter-spacing:.11em;font-size:11px;font-weight:1000;
}
.client-card-intro.compact h3{margin:0;color:#0b2347;font-size:20px;letter-spacing:-.03em;}
.client-card-intro.compact p{margin:0;color:#64748b;line-height:1.45;}
.client-depot-command-premium{align-items:flex-start;gap:24px;padding:26px 28px!important;}
.client-depot-command-copy{max-width:720px;}
.client-depot-stepper{display:flex;align-items:flex-start;justify-content:flex-end;gap:12px;flex-wrap:wrap;min-width:min(460px,100%);}
.client-step{position:relative;display:grid;justify-items:center;gap:8px;min-width:118px;text-align:center;color:#64748b;font-size:13px;font-weight:900;}
.client-step:not(:last-child)::after{content:"";position:absolute;left:calc(100% - 6px);top:20px;width:36px;border-top:2px dashed rgba(191,219,254,.95);}
.client-step span{width:40px;height:40px;border-radius:999px;display:grid;place-items:center;background:#fff;border:1px solid rgba(191,219,254,.95);color:#2563eb;box-shadow:0 10px 24px rgba(37,99,235,.08);}
.client-step.active{color:#1d4ed8;}
.client-step.active span{color:#fff;background:linear-gradient(135deg,#2563eb,#3b82f6);border-color:transparent;box-shadow:0 16px 34px rgba(37,99,235,.22);}
.client-step strong{font-size:13px;line-height:1.35;}
.client-depot-split-premium{grid-template-columns:minmax(0,1fr) minmax(320px,.34fr);gap:22px;}
.client-depot-categories-card{padding:22px!important;display:grid;gap:18px;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;}
.client-depot-choice .client-action-card{min-height:168px;padding:20px 20px 18px!important;grid-template-columns:64px 1fr!important;border-radius:26px!important;overflow:hidden;}
.client-depot-choice .client-action-card.is-active{transform:translateY(-2px);border-color:rgba(96,165,250,.95)!important;box-shadow:0 24px 56px rgba(37,99,235,.16)!important;background:linear-gradient(180deg,#ffffff 0%,#f6faff 100%)!important;}
.client-depot-choice .client-action-card.is-active::before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:linear-gradient(180deg,#2563eb,#60a5fa);}
.client-depot-choice .client-action-icon{width:56px;height:56px;border-radius:18px;font-size:28px!important;}
.client-depot-choice .client-action-copy strong{font-size:15px!important;margin-top:4px;}
.client-depot-choice .client-action-copy small{font-size:13px!important;line-height:1.5!important;}
.client-depot-choice .client-action-card em{margin-top:4px;background:linear-gradient(135deg,#f1f5f9,#eff6ff);}
.client-side-card-head{display:grid;grid-template-columns:52px 1fr;gap:14px;align-items:flex-start;margin-bottom:16px;}
.client-side-card-head.compact{margin-bottom:14px;}
.client-side-card-head h3{margin:0 0 5px;color:#0b2347;font-size:19px;letter-spacing:-.02em;}
.client-side-card-head p{margin:0;color:#64748b;line-height:1.42;}
.client-side-card-icon{width:52px;height:52px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(135deg,#eff6ff,#dbeafe);color:#1d4ed8;font-size:24px;box-shadow:inset 0 0 0 1px rgba(59,130,246,.14);}
.client-guide-card,.client-recent-card{padding:20px!important;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;}
.client-workflow.compact.premium{gap:12px!important;}
.client-workflow.compact.premium div{border-radius:20px!important;padding:15px 15px 15px 48px!important;}
.client-workflow.compact.premium strong{display:block;margin-bottom:4px;}
.client-recent-meta{display:flex;align-items:baseline;gap:8px;padding:0 0 14px;}
.client-recent-meta strong{color:#1d4ed8;font-size:28px;font-weight:1000;line-height:1;}
.client-recent-meta span{color:#64748b;font-size:13px;font-weight:900;}
.client-doc-list.premium{display:grid;gap:12px;}
.client-doc-row.premium{align-items:flex-start;padding:16px;border-radius:20px;background:linear-gradient(180deg,#fff,#f8fbff);box-shadow:0 12px 26px rgba(15,23,42,.05);}
.client-doc-row.premium strong{white-space:normal;max-width:none;line-height:1.35;}
.client-doc-row.premium small,.client-doc-row.premium em{display:block;}
.client-doc-row.premium em{margin-top:4px;color:#64748b;}
.client-doc-row.premium .badge{white-space:nowrap;align-self:flex-start;}
.client-empty-state-illustrated{display:grid;justify-items:center;align-content:center;text-align:center;min-height:180px;background:linear-gradient(180deg,#ffffff,#f8fbff);}
.client-empty-state-illustrated.compact{min-height:220px;}
.client-empty-visual{width:78px;height:78px;border-radius:24px;display:grid;place-items:center;margin-bottom:10px;background:linear-gradient(135deg,#dbeafe,#eff6ff);color:#1d4ed8;font-size:34px;box-shadow:0 18px 34px rgba(37,99,235,.14);}
.client-message-side-card{padding:20px!important;}
.client-message-side-card .section-head{display:none;}
.client-depot-modal-panel{border-radius:30px!important;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;}
.client-depot-modal-panel .section-head h3{font-size:24px;}
@media(max-width:1180px){.client-depot-split-premium{grid-template-columns:1fr;}}
@media(max-width:860px){.client-depot-command-premium{flex-direction:column;align-items:stretch;}.client-depot-stepper{justify-content:flex-start;min-width:0;}.client-step{min-width:96px;}.client-step:not(:last-child)::after{display:none;}}
@media(max-width:720px){.client-hero.client-hero-compact{padding:20px!important;}.client-panel-card,.client-depot-categories-card,.client-guide-card,.client-recent-card,.client-message-side-card{padding:18px!important;}.client-depot-choice .client-action-card{grid-template-columns:56px 1fr!important;min-height:154px;}.client-side-card-head{grid-template-columns:44px 1fr;}.client-side-card-icon{width:44px;height:44px;border-radius:14px;font-size:20px;}}


/* AZALYS v17.6 — harmonisation client + adaptation automatique écran */
.client-portal,
.client-portal-root{
  width:100%;
  max-width:1600px;
}
.client-portal{
  padding:clamp(18px,1.8vw,28px);
}
.client-dashboard-grid{
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}
.client-quick-grid{
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}
.client-two-col,
.client-depot-split-premium,
.client-message-redesign{
  align-items:start;
}
.client-two-col{
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr))!important;
}
.client-module-grid{
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}
.client-mode-tabs-premium{
  position:sticky;
  top:84px;
  z-index:3;
}
.client-hero-dashboard{
  min-height:166px;
}
.client-hero-compact{
  min-height:118px;
}
.client-card-intro.compact h3,
.client-side-card-head h3{
  font-size:18px;
}
.client-message-panel-head h3{
  font-size:24px!important;
}
.client-message-kpis{
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
}
@media(min-width:1500px){
  .client-depot-split-premium{grid-template-columns:minmax(0,1.1fr) minmax(340px,.33fr);}
  .client-message-redesign{grid-template-columns:minmax(0,1fr) 360px;}
}
@media(max-width:900px){
  .client-mode-tabs-premium{top:0;position:relative;}
}


/* AZALYS v17.7 — Messagerie client compactée et mieux équilibrée */
.client-message-main-card.compact-layout{
  padding:0!important;
}
.client-message-panel-head.compact{
  padding:20px 22px;
}
.client-message-panel-head.compact h3{
  font-size:22px!important;
}
.client-message-panel-head.compact p{
  font-size:13px;
  max-width:560px;
}
.client-message-kpis.compact{
  padding:12px 14px;
  gap:10px;
}
.client-message-kpis.compact div{
  padding:12px 14px;
  border-radius:16px;
}
.client-message-kpis.compact strong{
  font-size:23px;
}
.client-message-content-grid{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);
  gap:14px;
  padding:14px 16px 16px;
  align-items:start;
  background:linear-gradient(180deg,#f8fbff 0%,#ffffff 100%);
}
.client-message-thread-wrap.compact{
  padding:14px;
  min-height:0;
  border:1px solid rgba(203,213,225,.72);
  border-radius:24px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}
.client-message-thread.compact,
.client-message-thread-wrap.compact .client-message-thread{
  max-height:320px;
  min-height:220px;
  padding-right:4px;
}
.client-message-row .client-message-bubble{
  width:min(100%,560px);
  padding:14px 16px;
}
.client-message-bubble h4{
  font-size:14px;
  margin-bottom:6px;
}
.client-message-bubble p{
  font-size:13px;
  line-height:1.45;
}
.client-message-compose-wrap{
  min-width:0;
}
.client-message-compose-wrap .client-message-form-modern{
  margin:0;
  padding:16px;
  border-radius:22px;
  position:sticky;
  top:0;
  box-shadow:0 14px 34px rgba(37,99,235,.07);
}
.client-message-compose-wrap .client-compose-head strong{
  font-size:16px;
}
.client-message-compose-wrap .client-compose-head span,
.client-message-compose-wrap .client-compose-footer span{
  font-size:12px;
}
.client-message-compose-wrap .client-message-compose-grid{
  grid-template-columns:1fr;
  gap:10px;
}
.client-message-compose-wrap .client-message-textarea-label textarea{
  min-height:92px;
}
.client-message-side-stack.compact{
  gap:14px;
}
.client-message-side-card.compact{
  padding:16px!important;
}
.client-message-tips.compact div{
  padding:11px;
  border-radius:16px;
}
.client-message-side-card.compact .client-doc-row{
  padding:12px 13px;
  border-radius:16px;
}
@media(max-width:1360px){
  .client-message-content-grid{
    grid-template-columns:1fr;
  }
  .client-message-compose-wrap .client-message-form-modern{
    position:relative;
  }
}
@media(max-width:1180px){
  .client-message-redesign{grid-template-columns:1fr;}
}
@media(max-width:820px){
  .client-message-panel-head.compact{padding:18px;}
  .client-message-content-grid{padding:12px;}
  .client-message-thread-wrap.compact{padding:12px;}
  .client-message-thread-wrap.compact .client-message-thread{max-height:280px;min-height:180px;}
}


/* AZALYS v17.8 — Demandes liées aux pièces plus visibles et orientées action */
.client-action-needed-card{
  padding:20px!important;
  display:grid;
  gap:16px;
  border:1px solid rgba(191,219,254,.84);
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;
}
.client-action-needed-card.has-alerts{
  box-shadow:0 18px 42px rgba(37,99,235,.08);
}
.client-action-needed-card.has-alerts::before{
  content:"";
  display:block;
  height:4px;
  border-radius:999px;
  background:linear-gradient(90deg,#2563eb,#60a5fa);
}
.client-action-needed-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.client-action-needed-head h3{
  margin:4px 0 6px;
  color:#0b2347;
  font-size:22px;
  letter-spacing:-.03em;
}
.client-action-needed-head .muted{
  max-width:800px;
  line-height:1.45;
}
.client-action-needed-badge{
  white-space:nowrap;
  border-radius:999px;
  padding:10px 14px;
  background:linear-gradient(135deg,#dbeafe,#eff6ff);
  color:#1d4ed8;
  font-size:12px;
  font-weight:1000;
  box-shadow:inset 0 0 0 1px rgba(96,165,250,.25);
}
.client-followup-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
}
.client-followup-card{
  border:1px solid rgba(203,213,225,.76);
  border-radius:22px;
  padding:16px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  box-shadow:0 12px 30px rgba(15,23,42,.05);
  display:grid;
  gap:12px;
}
.client-followup-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.client-followup-top strong,
.client-followup-side-head strong{
  display:block;
  color:#0f172a;
  font-size:16px;
  line-height:1.3;
  font-weight:1000;
}
.client-followup-top small,
.client-followup-side-head small{
  display:block;
  margin-top:4px;
  color:#64748b;
  font-size:12px;
}
.client-followup-card p{
  margin:0;
  color:#334155;
  line-height:1.5;
  font-size:14px;
}
.client-followup-actions,
.client-followup-side-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.client-followup-empty{
  display:grid;
  justify-items:center;
  text-align:center;
  gap:8px;
  padding:10px 0 4px;
}
.client-followup-empty strong{color:#0b2347;font-size:18px;}
.client-followup-empty span{max-width:720px;color:#64748b;line-height:1.45;}
.client-followup-list-side{
  display:grid;
  gap:12px;
}
.client-followup-side-item{
  border:1px solid rgba(203,213,225,.76);
  border-radius:18px;
  padding:13px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  display:grid;
  gap:10px;
}
.client-followup-side-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.client-followup-side-item em{
  color:#334155;
  line-height:1.45;
  font-style:normal;
}
.client-quick-card.attention{
  border-color:rgba(96,165,250,.9)!important;
  box-shadow:0 14px 34px rgba(37,99,235,.08);
}
@media(max-width:860px){
  .client-action-needed-head{flex-direction:column;}
  .client-action-needed-badge{white-space:normal;}
}
@media(max-width:640px){
  .client-followup-actions,.client-followup-side-actions{flex-direction:column;}
  .client-followup-actions .btn,.client-followup-side-actions .btn{width:100%;}
}


/* AZALYS v17.9 — dashboard client compact pour éviter une partie trop grande */
.client-portal-root{
  gap:14px;
}
.client-mode-body{
  gap:14px;
}
.client-hero{
  padding:20px 24px!important;
}
.client-hero-dashboard{
  min-height:124px;
}
.client-hero.client-hero-dashboard h1{
  font-size:clamp(24px,2.2vw,34px)!important;
  margin:6px 0 8px!important;
}
.client-hero.client-hero-dashboard p{
  font-size:14px;
  max-width:760px;
}
.client-hero-badge{
  padding:10px 18px;
  font-size:14px;
}
.client-mode-tabs,
.client-mode-tabs-premium{
  padding:6px;
  border-radius:20px;
}
.client-mode-tabs button,
.client-mode-tabs-premium button{
  padding:10px 14px;
  border-radius:14px;
  font-size:14px;
}
.client-dashboard-grid{
  gap:12px;
}
.client-stat-card{
  padding:14px 16px;
  gap:5px;
  border-radius:20px;
  min-height:128px;
}
.client-stat-card span{
  width:40px;
  height:40px;
  border-radius:14px;
  font-size:20px;
}
.client-stat-card strong{
  font-size:22px;
  margin-top:2px;
}
.client-stat-card small{
  font-size:13px;
}
.client-stat-card em{
  font-size:12px;
  line-height:1.35;
}
.client-quick-grid{
  gap:12px;
}
.client-quick-card{
  padding:16px 18px;
  border-radius:20px;
  gap:6px;
  min-height:92px;
}
.client-quick-card strong{
  font-size:16px;
}
.client-quick-card span{
  font-size:13px;
  line-height:1.35;
}
.client-action-needed-card{
  padding:18px!important;
  gap:14px;
}
.client-action-needed-head h3{
  font-size:20px;
}
.client-action-needed-head .muted{
  font-size:13px;
}
.client-action-needed-badge{
  padding:8px 12px;
  font-size:11px;
}
.client-followup-grid{
  gap:12px;
}
.client-followup-card{
  padding:14px;
  border-radius:20px;
  gap:10px;
}
.client-followup-top strong{
  font-size:15px;
}
.client-followup-card p{
  font-size:13px;
}
@media(min-width:1280px){
  .client-dashboard-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .client-quick-grid{
    grid-template-columns:1.05fr 1fr 1fr 1fr;
  }
}
@media(max-width:900px){
  .client-hero{padding:18px!important;}
  .client-hero-dashboard{min-height:110px;}
}
@media(max-width:720px){
  .client-hero{padding:18px!important;}
  .client-hero-badge{width:100%;justify-content:center;}
  .client-stat-card,
  .client-quick-card{min-height:auto;}
}


/* AZALYS v17.10 — harmonisation compacte premium de tout l'espace client */

/* Topbar client : moins haute, plus sobre */
body.role-client-dossier .topbar{
  min-height:56px!important;
  padding:9px clamp(16px,1.7vw,26px)!important;
}
body.role-client-dossier .topbar h2{
  font-size:clamp(18px,1.45vw,22px)!important;
  line-height:1.15!important;
}
body.role-client-dossier .topbar .eyebrow{
  font-size:10px!important;
  letter-spacing:.12em!important;
}
body.role-client-dossier .status-pill{
  padding:7px 12px!important;
  font-size:12px!important;
}

/* Structure générale : moins de vide vertical */
.client-portal{
  padding:clamp(14px,1.45vw,24px)!important;
}
.client-portal-root,
.client-mode-body{
  gap:12px!important;
}
.client-portal .card,
.client-portal .client-hero{
  border-radius:24px!important;
}

/* Hero unique : compact partout */
.client-hero,
.client-hero.client-hero-dashboard,
.client-hero.client-hero-compact{
  min-height:96px!important;
  padding:18px 22px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
}
.client-hero h1,
.client-hero.client-hero-dashboard h1,
.client-hero.client-hero-compact h1{
  font-size:clamp(23px,2vw,32px)!important;
  margin:4px 0 6px!important;
  line-height:1.08!important;
}
.client-hero p{
  margin:0!important;
  font-size:13.5px!important;
  line-height:1.4!important;
}
.client-hero .eyebrow{
  font-size:10px!important;
  letter-spacing:.12em!important;
}
.client-hero-badge{
  min-height:38px!important;
  padding:9px 15px!important;
  font-size:13px!important;
  white-space:nowrap!important;
}

/* Onglets : densité normale d'une application SaaS */
.client-mode-tabs,
.client-mode-tabs-premium{
  padding:6px!important;
  border-radius:19px!important;
  gap:6px!important;
}
.client-mode-tabs button,
.client-mode-tabs-premium button{
  padding:9px 13px!important;
  min-height:38px!important;
  border-radius:13px!important;
  font-size:13px!important;
}

/* Dashboard : KPI et raccourcis compacts */
.client-dashboard-grid{
  gap:11px!important;
}
.client-stat-card{
  min-height:106px!important;
  padding:13px 15px!important;
  border-radius:18px!important;
  gap:4px!important;
}
.client-stat-card span{
  width:36px!important;
  height:36px!important;
  border-radius:13px!important;
  font-size:18px!important;
}
.client-stat-card strong{
  font-size:22px!important;
}
.client-stat-card small{
  font-size:12.5px!important;
}
.client-stat-card em{
  font-size:11.5px!important;
}
.client-quick-grid{
  gap:11px!important;
}
.client-quick-card{
  min-height:78px!important;
  padding:14px 16px!important;
  border-radius:18px!important;
  gap:5px!important;
}
.client-quick-card strong{
  font-size:15.5px!important;
}
.client-quick-card span{
  font-size:12.5px!important;
}

/* Dépôts simples : commandes et cartes plus équilibrées */
.client-depot-command,
.client-depot-command-premium{
  padding:18px 20px!important;
  border-radius:22px!important;
  gap:16px!important;
}
.client-depot-command h3,
.client-depot-command-premium h3{
  font-size:21px!important;
  margin:3px 0 5px!important;
}
.client-depot-command .muted,
.client-depot-command-premium .muted{
  font-size:13px!important;
  line-height:1.4!important;
}
.client-step span{
  width:34px!important;
  height:34px!important;
}
.client-step{
  min-width:102px!important;
  gap:6px!important;
}
.client-step strong{
  font-size:12px!important;
}
.client-depot-categories-card{
  padding:18px!important;
  gap:14px!important;
}
.client-depot-choice .client-action-card{
  min-height:138px!important;
  padding:16px!important;
  grid-template-columns:52px 1fr!important;
  border-radius:22px!important;
}
.client-depot-choice .client-action-icon{
  width:48px!important;
  height:48px!important;
  border-radius:16px!important;
  font-size:23px!important;
}
.client-depot-choice .client-action-copy strong{
  font-size:14.2px!important;
}
.client-depot-choice .client-action-copy small{
  font-size:12.5px!important;
  line-height:1.38!important;
}
.client-action-card em{
  min-height:24px!important;
  padding:5px 9px!important;
  font-size:10.5px!important;
}
.client-action-count{
  font-size:11px!important;
}

/* Dossier & modules : moins haut, plus lisible */
.client-panel-card{
  padding:18px!important;
  gap:13px!important;
}
.client-card-intro.compact h3,
.client-side-card-head h3{
  font-size:17px!important;
}
.client-card-intro.compact p,
.client-side-card-head p{
  font-size:12.5px!important;
}
.client-dossier-row{
  padding:13px!important;
  border-radius:18px!important;
}
.client-dossier-avatar{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  border-radius:14px!important;
}
.client-module-card{
  padding:13px!important;
  border-radius:17px!important;
  grid-template-columns:38px 1fr!important;
  gap:8px 11px!important;
}
.client-module-card span{
  width:38px!important;
  height:38px!important;
  border-radius:13px!important;
  font-size:19px!important;
}
.client-module-card strong{
  font-size:13.5px!important;
}
.client-module-card small{
  font-size:12px!important;
}

/* Messages : compact partout */
.client-message-panel-head,
.client-message-panel-head.compact{
  padding:17px 20px!important;
}
.client-message-panel-head h3,
.client-message-panel-head.compact h3{
  font-size:20px!important;
  margin-bottom:4px!important;
}
.client-message-panel-head p{
  font-size:12.5px!important;
  line-height:1.38!important;
}
.client-message-eyebrow{
  margin-bottom:5px!important;
  font-size:10px!important;
}
.client-message-kpis,
.client-message-kpis.compact{
  padding:10px 12px!important;
  gap:8px!important;
}
.client-message-kpis div{
  padding:10px 12px!important;
  border-radius:15px!important;
}
.client-message-kpis strong{
  font-size:20px!important;
}
.client-message-kpis span{
  font-size:11.5px!important;
}
.client-message-content-grid{
  padding:12px!important;
  gap:12px!important;
}
.client-message-thread-wrap.compact,
.client-message-thread-wrap{
  padding:12px!important;
  border-radius:20px!important;
}
.client-message-thread-wrap.compact .client-message-thread{
  max-height:300px!important;
}
.client-message-row .client-message-bubble{
  padding:12px 14px!important;
  border-radius:18px!important;
}
.client-message-bubble h4{
  font-size:13.5px!important;
}
.client-message-bubble p{
  font-size:12.5px!important;
}
.client-message-form-modern{
  padding:14px!important;
  border-radius:20px!important;
  gap:10px!important;
}
.client-message-textarea-label textarea{
  min-height:82px!important;
}
.client-message-side-card{
  padding:14px!important;
  border-radius:20px!important;
}
.client-message-tips div{
  padding:10px!important;
  border-radius:15px!important;
}
.client-message-tips span{
  width:30px!important;
  height:30px!important;
}
.client-message-tips strong{
  font-size:12.8px!important;
}
.client-message-tips small{
  font-size:11.5px!important;
}

/* Demandes liées aux pièces : visibles sans être énormes */
.client-action-needed-card{
  padding:16px!important;
  gap:12px!important;
  border-radius:22px!important;
}
.client-action-needed-head h3{
  font-size:19px!important;
  margin:2px 0 4px!important;
}
.client-action-needed-head .muted{
  font-size:12.5px!important;
}
.client-followup-card{
  padding:13px!important;
  border-radius:18px!important;
}
.client-followup-top strong,
.client-followup-side-head strong{
  font-size:14px!important;
}
.client-followup-card p,
.client-followup-side-item em{
  font-size:12.5px!important;
}
.client-followup-side-item{
  padding:12px!important;
  border-radius:16px!important;
}

/* Modales dépôt : plus compactes */
.client-depot-modal-panel{
  padding:22px!important;
}
.client-depot-modal-panel .section-head h3{
  font-size:21px!important;
}
.client-dropzone{
  padding:22px 18px!important;
  border-radius:22px!important;
}
.client-drop-ic{
  width:52px!important;
  height:52px!important;
  border-radius:18px!important;
  font-size:27px!important;
}
.client-form-row{
  gap:10px!important;
}
.client-upload-form-xp{
  gap:12px!important;
}

@media(min-width:1280px){
  .client-dashboard-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  .client-quick-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
}
@media(max-width:900px){
  .client-hero,
  .client-hero.client-hero-dashboard,
  .client-hero.client-hero-compact{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
}
@media(max-width:720px){
  .client-portal{padding:14px!important;}
  .client-mode-tabs{display:grid!important;grid-template-columns:1fr!important;}
  .client-dashboard-grid,
  .client-quick-grid,
  .client-followup-grid{grid-template-columns:1fr!important;}
}


/* V5.46 — Dashboard client plus compact et centré */
.client-dashboard-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(180px,220px))!important;
  justify-content:center!important;
  gap:12px!important;
}
.client-stat-card{
  width:100%!important;
  min-height:74px!important;
  padding:10px 12px!important;
  border-radius:18px!important;
  gap:2px!important;
}
.client-stat-card span{
  width:32px!important;
  height:32px!important;
  border-radius:11px!important;
  font-size:16px!important;
}
.client-stat-card strong{
  font-size:18px!important;
  line-height:1!important;
  margin-top:0!important;
}
.client-stat-card small{
  font-size:11px!important;
  line-height:1.2!important;
}
.client-stat-card em{
  font-size:10.5px!important;
  line-height:1.25!important;
}
@media(min-width:1280px){
  .client-dashboard-grid{
    grid-template-columns:repeat(5,220px)!important;
    justify-content:center!important;
  }
}


/* AZALYS V5.47 — Recette client : déconnexion mobile, pièces consultables, timeline simple */
.top-user-box{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:6px 9px!important;
  border:1px solid rgba(203,213,225,.9)!important;
  border-radius:999px!important;
  background:rgba(248,250,252,.94)!important;
  color:#0f2544!important;
  max-width:260px!important;
}
.top-user-box.hidden,
.top-logout.hidden{display:none!important;}
.top-user-avatar{
  width:26px;height:26px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;
  background:#eef2ff;border:1px solid #dbeafe;font-size:13px;flex:0 0 auto;
}
.top-user-main{display:flex;flex-direction:column;min-width:0;line-height:1.05;}
.top-user-main strong{font-size:12px;font-weight:950;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#0f2544;}
.top-user-main small{font-size:10px;font-weight:850;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.top-logout{white-space:nowrap!important;}

.client-doc-list-trackable{display:grid;gap:10px;}
.client-doc-row-trackable{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:12px!important;
  align-items:start!important;
  padding:13px!important;
}
.client-doc-main{display:grid;gap:6px;min-width:0;}
.client-doc-titleline{display:flex;align-items:center;gap:8px;justify-content:space-between;min-width:0;}
.client-doc-titleline strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.client-doc-row-trackable em{font-style:normal;color:#64748b;font-size:12px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.client-doc-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;}
.client-doc-actions .btn{min-height:30px!important;padding:6px 9px!important;font-size:12px!important;border-radius:10px!important;}
.client-doc-timeline{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:3px;}
.client-doc-timeline span{position:relative;display:flex;align-items:center;gap:5px;font-size:10px;font-weight:900;color:#94a3b8;white-space:nowrap;min-width:0;}
.client-doc-timeline span:after{content:"";position:absolute;left:16px;right:-4px;top:7px;height:2px;background:#e2e8f0;z-index:0;}
.client-doc-timeline span:last-child:after{display:none;}
.client-doc-timeline i{position:relative;z-index:1;width:14px;height:14px;border-radius:999px;border:2px solid #cbd5e1;background:#fff;flex:0 0 auto;}
.client-doc-timeline span.done{color:#0f766e;}
.client-doc-timeline span.done i{background:#14b8a6;border-color:#0f766e;box-shadow:0 0 0 3px rgba(20,184,166,.12);}
.client-doc-timeline span.done:after{background:#99f6e4;}

@media(max-width:1000px){
  .topbar .top-actions{width:100%!important;display:flex!important;align-items:center!important;gap:8px!important;}
  .top-user-box{order:-2;max-width:calc(100% - 130px)!important;}
  .top-logout{order:-1;margin-left:auto!important;flex:0 0 auto!important;display:inline-flex!important;}
  .top-actions #db-status{order:3;}
}
@media(max-width:640px){
  .top-user-box{max-width:100%!important;flex:1 1 100%!important;border-radius:14px!important;}
  .top-user-main strong{max-width:none;}
  .top-logout{width:auto!important;flex:1 1 auto!important;justify-content:center!important;}
  .client-doc-row-trackable{grid-template-columns:1fr!important;}
  .client-doc-actions{justify-content:stretch!important;}
  .client-doc-actions .btn{flex:1 1 auto!important;justify-content:center!important;}
  .client-doc-timeline{grid-template-columns:1fr 1fr!important;gap:7px 10px;}
  .client-doc-timeline span:after{display:none;}
}

/* AZALYS V5.48 — Messages client réellement opérationnels */
body.role-client-dossier .client-message-operational{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(300px,360px);
  gap:18px;
  align-items:start;
}
body.role-client-dossier .client-chat-card{
  padding:0!important;
  overflow:hidden;
  border-radius:24px!important;
  background:#fff!important;
  box-shadow:0 18px 50px rgba(15,23,42,.07)!important;
}
body.role-client-dossier .client-chat-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px 14px;
  background:linear-gradient(135deg,#ffffff,#eef6ff);
  border-bottom:1px solid rgba(203,213,225,.72);
}
body.role-client-dossier .client-chat-head h3{
  margin:4px 0 4px;
  color:#0b2347;
  font-size:22px;
  font-weight:1000;
  letter-spacing:-.03em;
}
body.role-client-dossier .client-chat-head p{
  margin:0;
  color:#64748b;
  font-size:13px;
  font-weight:750;
}
body.role-client-dossier .client-chat-head-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}
body.role-client-dossier .client-chat-alert{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:8px 11px;
  background:#dbeafe;
  color:#1d4ed8;
  font-weight:1000;
  font-size:12px;
}
body.role-client-dossier .client-chat-mini-status{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:10px 20px;
  border-bottom:1px solid rgba(226,232,240,.9);
  background:#fff;
}
body.role-client-dossier .client-chat-mini-status span{
  display:inline-flex;
  gap:5px;
  align-items:center;
  border:1px solid rgba(203,213,225,.86);
  border-radius:999px;
  padding:6px 10px;
  color:#475569;
  font-size:12px;
  font-weight:850;
  background:#f8fbff;
}
body.role-client-dossier .client-chat-mini-status strong{color:#0f2b55;font-weight:1000;}
body.role-client-dossier .client-chat-stream-wrap{
  padding:14px 18px;
  background:linear-gradient(180deg,#f8fbff,#ffffff);
}
body.role-client-dossier .client-message-thread.operational-thread{
  max-height:clamp(320px, calc(100vh - 500px), 560px);
  min-height:300px;
  overflow:auto;
  display:grid;
  gap:10px;
  padding:4px 6px 4px 0;
  scroll-behavior:smooth;
}
body.role-client-dossier .client-message-thread.operational-thread .client-message-row{
  display:flex;
  margin:0;
}
body.role-client-dossier .client-message-thread.operational-thread .client-message-row.from-client{justify-content:flex-end;}
body.role-client-dossier .client-message-thread.operational-thread .client-message-row.from-cabinet{justify-content:flex-start;}
body.role-client-dossier .client-message-thread.operational-thread .client-message-bubble{
  max-width:min(760px,82%);
  padding:13px 15px;
  border-radius:18px;
  border:1px solid rgba(203,213,225,.75);
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}
body.role-client-dossier .client-message-thread.operational-thread .from-cabinet .client-message-bubble{
  background:linear-gradient(180deg,#ffffff,#f1f7ff);
  border-bottom-left-radius:7px;
}
body.role-client-dossier .client-message-thread.operational-thread .from-client .client-message-bubble{
  background:linear-gradient(135deg,#2563eb,#3b82f6);
  color:#fff;
  border-color:rgba(37,99,235,.45);
  border-bottom-right-radius:7px;
}
body.role-client-dossier .client-message-thread.operational-thread .is-unread .client-message-bubble{
  border-color:#60a5fa;
  box-shadow:0 14px 34px rgba(37,99,235,.14);
}
body.role-client-dossier .client-message-thread.operational-thread .client-message-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:5px;
}
body.role-client-dossier .client-message-thread.operational-thread .client-message-meta strong{font-size:12px;font-weight:1000;}
body.role-client-dossier .client-message-thread.operational-thread .client-message-meta span{font-size:11px;opacity:.72;font-weight:800;}
body.role-client-dossier .client-message-thread.operational-thread h4{margin:0 0 5px;font-size:13px;font-weight:1000;color:inherit;}
body.role-client-dossier .client-message-thread.operational-thread p{margin:0;line-height:1.52;font-size:13px;color:inherit;opacity:.92;}
body.role-client-dossier .client-chat-compose-zone{
  border-top:1px solid rgba(203,213,225,.72);
  background:#fff;
  padding:14px 18px 16px;
}
body.role-client-dossier .client-message-form-operational{
  display:grid;
  gap:10px;
  margin:0;
}
body.role-client-dossier .client-message-form-line{
  display:grid;
  grid-template-columns:minmax(190px,.75fr) minmax(220px,1fr);
  gap:10px;
}
body.role-client-dossier .client-message-form-operational label{
  display:grid;
  gap:6px;
  color:#0f172a;
  font-weight:950;
  font-size:12px;
}
body.role-client-dossier .client-message-form-operational .control{
  min-height:38px;
  border-radius:12px;
  background:#fff;
}
body.role-client-dossier .client-message-body-field textarea{
  min-height:74px;
  resize:vertical;
}
body.role-client-dossier .client-compose-footer.operational{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
body.role-client-dossier .client-compose-footer.operational span{font-size:12px;color:#64748b;font-weight:750;}
body.role-client-dossier .client-compose-footer.operational .btn{min-width:132px;}
body.role-client-dossier .client-chat-action-card{
  padding:18px!important;
  border-radius:24px!important;
  position:sticky;
  top:82px;
  max-height:calc(100vh - 110px);
  overflow:auto;
}
body.role-client-dossier .client-action-head{
  display:grid;
  grid-template-columns:44px 1fr;
  gap:12px;
  align-items:start;
  margin-bottom:14px;
}
body.role-client-dossier .client-action-head h3{margin:2px 0 4px;color:#0b2347;font-size:18px;font-weight:1000;}
body.role-client-dossier .client-followup-list-side.operational{display:grid;gap:10px;}
body.role-client-dossier .client-followup-side-item.operational{
  border:1px solid rgba(203,213,225,.86);
  border-radius:18px;
  padding:12px;
  background:linear-gradient(180deg,#fff,#f8fbff);
}
body.role-client-dossier .client-followup-side-item.operational em{
  display:block;
  margin:8px 0 10px;
  color:#475569;
  font-style:normal;
  font-size:12px;
  line-height:1.45;
}
body.role-client-dossier .client-followup-side-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
body.role-client-dossier .client-followup-side-actions .client-doc-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
body.role-client-dossier .client-followup-empty-operational{
  display:grid;
  gap:8px;
  padding:14px;
  border:1px dashed rgba(148,163,184,.8);
  border-radius:18px;
  background:#f8fbff;
}
body.role-client-dossier .client-followup-empty-operational strong{color:#0f172a;font-weight:1000;}
body.role-client-dossier .client-followup-empty-operational span{color:#64748b;font-size:13px;line-height:1.4;}
@media(max-width:1180px){
  body.role-client-dossier .client-message-operational{grid-template-columns:1fr;}
  body.role-client-dossier .client-chat-action-card{position:relative;top:auto;max-height:none;}
}
@media(max-width:720px){
  body.role-client-dossier .client-chat-head{padding:16px;flex-direction:column;}
  body.role-client-dossier .client-chat-head-actions{width:100%;justify-content:stretch;}
  body.role-client-dossier .client-chat-head-actions .btn{flex:1;}
  body.role-client-dossier .client-chat-mini-status{padding:10px 14px;}
  body.role-client-dossier .client-chat-stream-wrap{padding:12px;}
  body.role-client-dossier .client-message-thread.operational-thread{max-height:48vh;min-height:280px;}
  body.role-client-dossier .client-message-thread.operational-thread .client-message-bubble{max-width:92%;}
  body.role-client-dossier .client-chat-compose-zone{padding:12px;}
  body.role-client-dossier .client-message-form-line{grid-template-columns:1fr;}
  body.role-client-dossier .client-compose-footer.operational{align-items:stretch;flex-direction:column;}
  body.role-client-dossier .client-compose-footer.operational .btn{width:100%;}
}

/* V5.49 - Tableau de bord client orienté actions : quoi faire maintenant */
body.role-client-dossier .client-action-dashboard{
  display:grid!important;
  gap:18px!important;
  max-width:1280px!important;
  margin:0 auto!important;
}
body.role-client-dossier .client-today-panel{
  position:relative!important;
  overflow:hidden!important;
  border:1px solid rgba(37,99,235,.22)!important;
  box-shadow:0 20px 48px rgba(15,23,42,.08)!important;
  padding:22px!important;
}
body.role-client-dossier .client-today-panel::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:linear-gradient(90deg,#2563eb,#60a5fa,#22c55e);
}
body.role-client-dossier .client-today-panel.is-calm::before{
  background:linear-gradient(90deg,#22c55e,#86efac);
}
body.role-client-dossier .client-today-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:18px!important;
  margin-bottom:16px!important;
}
body.role-client-dossier .client-today-head h2{
  margin:4px 0 6px!important;
  font-size:clamp(24px,3vw,34px)!important;
  line-height:1.08!important;
  color:#0b2347!important;
  letter-spacing:-.03em!important;
}
body.role-client-dossier .client-today-head .muted{
  margin:0!important;
  font-size:14px!important;
  max-width:680px!important;
}
body.role-client-dossier .client-action-list{
  display:grid!important;
  gap:10px!important;
}
body.role-client-dossier .client-action-row{
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr) auto!important;
  gap:14px!important;
  align-items:center!important;
  padding:14px!important;
  border-radius:18px!important;
  border:1px solid rgba(203,213,225,.85)!important;
  background:#fff!important;
  box-shadow:0 12px 28px rgba(15,23,42,.05)!important;
}
body.role-client-dossier .client-action-row.urgent{
  border-color:rgba(248,113,113,.5)!important;
  background:linear-gradient(135deg,#fff,#fff7f7)!important;
}
body.role-client-dossier .client-action-icon{
  width:44px!important;
  height:44px!important;
  border-radius:16px!important;
  display:grid!important;
  place-items:center!important;
  background:#eef6ff!important;
  font-size:20px!important;
}
body.role-client-dossier .client-action-titleline{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  margin-bottom:2px!important;
}
body.role-client-dossier .client-action-titleline strong{
  font-size:15px!important;
  color:#0f172a!important;
}
body.role-client-dossier .client-action-content small{
  display:block!important;
  color:#64748b!important;
  font-size:12px!important;
  font-weight:800!important;
  margin-bottom:4px!important;
}
body.role-client-dossier .client-action-content p{
  margin:0!important;
  color:#334155!important;
  font-size:13px!important;
  line-height:1.42!important;
}
body.role-client-dossier .client-action-buttons{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  min-width:190px!important;
}
body.role-client-dossier .client-action-buttons .client-doc-actions{
  margin:0!important;
  display:flex!important;
  gap:8px!important;
}
body.role-client-dossier .client-action-empty{
  min-height:190px!important;
  border:1px dashed rgba(34,197,94,.35)!important;
  border-radius:22px!important;
  display:grid!important;
  place-items:center!important;
  text-align:center!important;
  gap:8px!important;
  padding:28px!important;
  background:linear-gradient(135deg,#f0fdf4,#fff)!important;
}
body.role-client-dossier .client-action-empty div{font-size:36px!important;}
body.role-client-dossier .client-action-empty strong{font-size:20px!important;color:#0f172a!important;}
body.role-client-dossier .client-action-empty span{color:#64748b!important;font-size:14px!important;}
body.role-client-dossier .client-simple-actions{
  display:grid!important;
  grid-template-columns:1.1fr 1fr 1fr .9fr!important;
  gap:14px!important;
}
body.role-client-dossier .client-simple-action{
  border:1px solid rgba(203,213,225,.82)!important;
  border-radius:22px!important;
  background:#fff!important;
  color:#0f172a!important;
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr)!important;
  grid-template-areas:"icon title" "icon sub"!important;
  gap:2px 12px!important;
  text-align:left!important;
  padding:16px!important;
  min-height:92px!important;
  cursor:pointer!important;
  box-shadow:0 16px 34px rgba(15,23,42,.06)!important;
  transition:.18s ease!important;
}
body.role-client-dossier .client-simple-action:hover{
  transform:translateY(-2px)!important;
  box-shadow:0 22px 44px rgba(15,23,42,.10)!important;
}
body.role-client-dossier .client-simple-action span{
  grid-area:icon;
  width:44px!important;
  height:44px!important;
  border-radius:16px!important;
  display:grid!important;
  place-items:center!important;
  background:#eff6ff!important;
  font-size:20px!important;
}
body.role-client-dossier .client-simple-action strong{
  grid-area:title;
  align-self:end;
  font-size:16px!important;
  font-weight:1000!important;
}
body.role-client-dossier .client-simple-action small{
  grid-area:sub;
  color:#64748b!important;
  font-size:12px!important;
  line-height:1.35!important;
  font-weight:700!important;
}
body.role-client-dossier .client-simple-action.primary{
  background:linear-gradient(135deg,#1d4ed8,#3b82f6)!important;
  color:#fff!important;
  border-color:rgba(37,99,235,.35)!important;
}
body.role-client-dossier .client-simple-action.primary span{background:rgba(255,255,255,.18)!important;}
body.role-client-dossier .client-simple-action.primary small{color:rgba(255,255,255,.82)!important;}
body.role-client-dossier .client-simple-action.attention{
  border-color:rgba(248,113,113,.45)!important;
  background:linear-gradient(135deg,#fff7f7,#fff)!important;
}
body.role-client-dossier .client-simple-action.subtle{
  background:#f8fafc!important;
}
body.role-client-dossier .client-home-split{
  display:grid!important;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;
  gap:18px!important;
  align-items:start!important;
}
body.role-client-dossier .client-home-card{
  padding:18px!important;
}
body.role-client-dossier .compact-head{
  margin-bottom:12px!important;
}
body.role-client-dossier .compact-head h3{
  margin:0!important;
  font-size:18px!important;
  color:#0f172a!important;
}
body.role-client-dossier .compact-head .muted{
  font-size:13px!important;
  margin-top:4px!important;
}
body.role-client-dossier .client-message-preview-list{
  display:grid!important;
  gap:10px!important;
}
body.role-client-dossier .client-message-preview{
  text-align:left!important;
  border:1px solid rgba(203,213,225,.8)!important;
  background:#fff!important;
  border-radius:16px!important;
  padding:12px 13px!important;
  display:grid!important;
  grid-template-columns:26px minmax(0,1fr)!important;
  gap:2px 10px!important;
  cursor:pointer!important;
  color:#0f172a!important;
}
body.role-client-dossier .client-message-preview.unread{
  border-color:rgba(37,99,235,.35)!important;
  background:linear-gradient(135deg,#eff6ff,#fff)!important;
}
body.role-client-dossier .client-message-preview span{
  grid-row:1/4!important;
  margin-top:1px!important;
}
body.role-client-dossier .client-message-preview strong{
  font-size:14px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.role-client-dossier .client-message-preview small{
  color:#64748b!important;
  font-size:12px!important;
  font-weight:800!important;
}
body.role-client-dossier .client-message-preview em{
  color:#475569!important;
  font-style:normal!important;
  font-size:13px!important;
  line-height:1.35!important;
}
body.role-client-dossier .client-doc-list-trackable .client-doc-row-trackable{
  grid-template-columns:minmax(0,1fr) auto!important;
  padding:12px!important;
}
body.role-client-dossier .client-doc-timeline{
  margin-top:8px!important;
}
body.role-client-dossier .client-dashboard-grid,
body.role-client-dossier .client-quick-grid,
body.role-client-dossier .client-action-needed-card{
  display:none!important;
}
@media(max-width:1000px){
  body.role-client-dossier .client-today-head{flex-direction:column!important;align-items:stretch!important;}
  body.role-client-dossier .client-simple-actions{grid-template-columns:1fr 1fr!important;}
  body.role-client-dossier .client-home-split{grid-template-columns:1fr!important;}
  body.role-client-dossier .client-action-row{grid-template-columns:40px minmax(0,1fr)!important;align-items:start!important;}
  body.role-client-dossier .client-action-buttons{grid-column:2!important;justify-content:flex-start!important;min-width:0!important;}
}
@media(max-width:640px){
  body.role-client-dossier .client-action-dashboard{gap:14px!important;}
  body.role-client-dossier .client-today-panel{padding:18px!important;border-radius:22px!important;}
  body.role-client-dossier .client-simple-actions{grid-template-columns:1fr!important;}
  body.role-client-dossier .client-simple-action{min-height:auto!important;}
  body.role-client-dossier .client-action-row{grid-template-columns:1fr!important;}
  body.role-client-dossier .client-action-icon{display:none!important;}
  body.role-client-dossier .client-action-buttons{grid-column:1!important;}
  body.role-client-dossier .client-action-buttons .btn,
  body.role-client-dossier .client-action-buttons .client-doc-actions .btn{width:100%!important;justify-content:center!important;}
  body.role-client-dossier .client-action-buttons .client-doc-actions{width:100%!important;flex-direction:column!important;}
}
