/* ==================================================================
   Portail fiduciaire — espace client + lanceur (prototype local)
   Même identité que la démo cockpit : blanc + bleu marine, grand,
   calme, lisible. Pensé pour des clients non techniques.
   ================================================================== */

:root {
  --bg:        #EEF2F7;
  --surface:   #FFFFFF;
  --surface-2: #F4F7FB;
  --ink:       #0E2742;
  --ink-soft:  #46586B;
  --ink-faint: #7A8A9B;
  --line:      #E2E8F1;
  --blue:      #1D5FD6;
  --blue-700:  #1A4FB0;
  --blue-soft: #E8F0FE;
  --green:     #1B7A45;
  --green-soft:#E4F4EA;
  --amber:     #A85B11;
  --amber-soft:#FBEFDD;
  --red:       #BE2F26;
  --red-soft:  #FBE7E4;
  --shadow-sm: 0 1px 3px rgba(14,39,66,.06), 0 1px 2px rgba(14,39,66,.05);
  --shadow-md: 0 10px 30px rgba(14,39,66,.08);
  --shadow-lg: 0 24px 60px rgba(14,39,66,.16);
  --display: "Fraunces", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --r: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink);
  font-size: 18px; line-height: 1.55; background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 500; letter-spacing: -.02em; }
a { color: var(--blue); }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 22px; }

/* bandeau prototype */
.proto {
  background: var(--ink); color: #cfe0f5; text-align: center;
  font-size: 12.5px; font-weight: 600; padding: 7px 12px;
}

/* en-tête */
.head { background: var(--surface); border-bottom: 1px solid var(--line); }
.head-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; align-items: baseline; font-family: var(--display); font-size: 22px; }
.brand b { color: var(--blue); font-weight: 600; }
.brand span { color: var(--ink); font-weight: 500; }
.head-tag { font-size: 14px; color: var(--ink-faint); font-weight: 600; }

/* ── espace client ── */
.hero { padding: 40px 0 8px; }
.hello { font-family: var(--display); font-size: clamp(28px, 5vw, 40px); }
.hello .co { color: var(--blue-700); }
.sub { color: var(--ink-soft); font-size: 19px; margin-top: 10px; max-width: 48ch; }

.section { padding: 26px 0 60px; }

/* zone de dépôt */
.drop {
  display: block; width: 100%;
  background: var(--surface); border: 2px dashed #C2D2E8; border-radius: var(--r);
  padding: 44px 28px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
  box-shadow: var(--shadow-sm);
}
.drop:hover { border-color: var(--blue); background: var(--surface-2); }
.drop.drag { border-color: var(--blue); background: var(--blue-soft); transform: scale(1.005); }
.drop-ico { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px;
  background: var(--blue-soft); color: var(--blue-700); display: grid; place-items: center; }
.drop-ico svg { width: 34px; height: 34px; }
.drop-title { font-family: var(--display); font-size: 23px; font-weight: 500; }
.drop-hint { color: var(--ink-soft); font-size: 16px; margin-top: 8px; }
.drop input { display: none; }
.drop-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  background: var(--blue); color: #fff; font-weight: 600; font-size: 17px;
  padding: 14px 26px; border: 0; border-radius: 12px; cursor: pointer; min-height: 52px;
}
.drop-btn:hover { background: var(--blue-700); }

/* liste des documents */
.list-head { display: flex; align-items: baseline; justify-content: space-between; margin: 38px 0 14px; }
.list-title { font-family: var(--display); font-size: 22px; font-weight: 500; }
.list-hint { font-size: 14px; color: var(--ink-faint); }

.docs { display: flex; flex-direction: column; gap: 12px; }
.doc {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.doc-ico { width: 46px; height: 46px; flex: none; border-radius: 12px;
  background: var(--surface-2); color: var(--ink-soft); display: grid; place-items: center; }
.doc-ico svg { width: 24px; height: 24px; }
.doc-main { flex: 1; min-width: 0; }
.doc-name { font-weight: 600; font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-sub { font-size: 13.5px; color: var(--ink-faint); margin-top: 2px; }

.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.pill.blue  { background: var(--blue-soft);  color: var(--blue-700); } .pill.blue .dot  { background: var(--blue); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }    .pill.amber .dot { background: var(--amber); }
.pill.green { background: var(--green-soft); color: var(--green); }    .pill.green .dot { background: var(--green); }
.pill.red   { background: var(--red-soft);   color: var(--red); }      .pill.red .dot   { background: var(--red); }

.empty { text-align: center; color: var(--ink-faint); padding: 40px 0; font-size: 16px; }

/* note rassurante */
.reassure { display: flex; gap: 13px; align-items: flex-start; margin-top: 30px;
  background: var(--blue-soft); color: var(--blue-700); border-radius: 14px; padding: 16px 18px;
  font-size: 15px; }
.reassure svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

/* contrôle de simulation (DEV uniquement) */
.sim { margin-left: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-faint);
  background: none; border: 1px dashed #C2D2E8; border-radius: 8px; padding: 5px 9px; cursor: pointer; }
.sim:hover { color: var(--blue); border-color: var(--blue); }

/* ── lanceur (index) ── */
.launch { padding: 46px 0 60px; }
.launch h1 { font-size: clamp(28px, 5vw, 40px); }
.launch p { color: var(--ink-soft); font-size: 18px; margin-top: 12px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.cli {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; box-shadow: var(--shadow-sm); transition: transform .14s, box-shadow .14s, border-color .14s;
}
.cli:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #CFDDEE; }
.cli-av { width: 48px; height: 48px; flex: none; border-radius: 13px; background: var(--blue-soft);
  color: var(--blue-700); display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.cli-name { font-weight: 600; font-size: 17px; }
.cli-sub { font-size: 14px; color: var(--ink-faint); }
.cli-go { margin-left: auto; color: var(--blue); }
.cli-go svg { width: 22px; height: 22px; }
.tools { display: flex; gap: 12px; align-items: center; margin-top: 30px; flex-wrap: wrap; }
.ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600;
  font-size: 15px; padding: 11px 18px; border-radius: 11px; cursor: pointer; }
.ghost:hover { border-color: #C5D3E6; background: var(--surface-2); }
.note-mini { font-size: 14px; color: var(--ink-faint); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 24px);
  background: var(--ink); color: #fff; font-weight: 500; font-size: 15.5px; padding: 14px 20px;
  border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 11px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ok { width: 24px; height: 24px; border-radius: 50%; background: var(--green); display: grid; place-items: center; font-size: 14px; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .cards { grid-template-columns: 1fr; }
  .drop { padding: 34px 18px; }
}

/* ── simulateur d'email entrant ── */
.intro { padding: 38px 0 4px; }
.intro h1 { font-family: var(--display); font-size: clamp(26px,4.5vw,36px); font-weight: 500; }
.intro p { color: var(--ink-soft); font-size: 18px; margin-top: 10px; max-width: 52ch; }
.mailcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-md); padding: 24px; margin: 22px 0 30px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.field input, .field select { font-family: var(--sans); font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; width: 100%; }
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { font-family: var(--sans); font-size: 14.5px; font-weight: 600; padding: 11px 15px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-soft); cursor: pointer; }
.seg button.on { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-700); }
.send-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.sent { margin-top: 10px; }
.sent h3 { font-family: var(--display); font-weight: 500; font-size: 19px; margin-bottom: 10px; }
.sent-item { display: flex; gap: 12px; align-items: center; padding: 13px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); margin-bottom: 10px; font-size: 15px; }
.sent-item .ok { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 14px; }
.sent-item.intake .ok { background: var(--amber); }

/* ── statut de la procédure (résumé) ── */
.status-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.status-strip .ss { background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; font-size: 13.5px; color: var(--ink-soft); }
.status-strip .ss b { color: var(--ink); font-weight: 700; }
.status-strip .ss.green { background: var(--green-soft); border-color: var(--green-soft); color: var(--green); }
.status-strip .ss.amber { background: var(--amber-soft); border-color: var(--amber-soft); color: var(--amber); }
.status-strip .ss.red { background: var(--red-soft); border-color: var(--red-soft); color: var(--red); }

/* ── messagerie client <-> cabinet ── */
.thread { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; max-height: 340px; overflow: auto; }
.msg { max-width: 80%; }
.msg.me { align-self: flex-end; text-align: right; }
.msg.them { align-self: flex-start; }
.msg-b { display: inline-block; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; text-align: left; }
.msg.me .msg-b { background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }
.msg.them .msg-b { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg-t { font-size: 11.5px; color: var(--ink-faint); margin-top: 3px; }
.msgbox { display: flex; gap: 10px; align-items: flex-end; }
.msgbox textarea { flex: 1; box-sizing: border-box; font: inherit; font-size: 15px; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink); resize: vertical; min-height: 46px; }
.msgbox textarea:focus { outline: none; border-color: var(--blue); }
.msgbox .drop-btn { white-space: nowrap; }

/* ── habillage cabinet : en-tête logo + pied de page identité ── */
.portal-brand { display: flex; align-items: center; min-height: 34px; margin-bottom: 18px; }
.portal-brand .pb-logo { max-height: 46px; max-width: 200px; object-fit: contain; }
.portal-brand .pb-name { font-weight: 700; font-size: 18px; color: var(--ink); }
.portal-footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin: 30px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.pf-firm { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ink-soft); }
.pf-firm strong { color: var(--ink); font-size: 14px; }
.pf-sorvyn { font-size: 12.5px; color: var(--ink-faint); }
.pf-sorvyn strong { color: var(--ink-soft); }

/* liste longue de documents : on plafonne et on scrolle dedans (sinon 100 factures poussent tout en bas) */
.docs-scroll { max-height: 360px; overflow-y: auto; padding-right: 4px; }
.docs-scroll::-webkit-scrollbar { width: 8px; }
.docs-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

/* bascule de langue FR | EN */
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.lang-toggle button { border: 0; background: none; padding: 6px 11px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink-faint); }
.lang-toggle button.active { background: var(--blue); color: #fff; }
