/* emi — feuille de style (styles du mockup convertis en classes) */
:root {
  --brand: #0B3FBD;
  --brand-dark: #0A2F8F;
  --brand-soft: #DFE7F8;
  --brand-softer: #EDF1FB;
  --accent: #F40163;
  --accent-soft: #FEE0EB;
  --cyan: #00CCD7;
  --purple: #7436A1;
  --navy-bg: #112340;
  --ink: #0B1831;
  --ink-soft: #3A4560;
  --muted: #5B6680;
  --line: #E4E7EF;
  --line-soft: #EDEFF6;
  --border: #C9CFDC;
  --bar-bg: #E3E6EE;
  --surface-soft: #F6F7FB;
  --track: #E3E6EE;
  --gradient: linear-gradient(120deg, #00CCD7 0%, #0B3FBD 50%, #F40163 100%);
  --warn: #B4540A;
  --warn-dark: #8A3F06;
  --warn-bg: #FCEBDC;
  --warn-text: #6E3205;
  --warn-border: #E9B98F;
  --danger: #A12A1C;
  --danger-border: #D9A7A0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: 'Manrope', system-ui, sans-serif; color: var(--ink); background: #fff; }
h1, h2, h3, h4, .page-title, .card-title, .group-title, .empty-title, .auth-title, .modal-title,
.btn, .send-btn, .pill, .nav-btn, .tool-btn, .action-item, .hist-title, .profile-name, .group-badge, .conn-logo, .avatar { font-family: 'Poppins', 'Manrope', system-ui, sans-serif; }
html, body { min-height: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== Boutons ===== */
.btn { height: 44px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { border: none; background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border: 1px solid var(--border); background: #fff; color: var(--ink); }
.btn-outline:hover { background: var(--brand-softer); }
.btn-outline-brand { border: 1px solid var(--brand); background: #fff; color: var(--brand); }
.btn-danger { border: none; background: var(--danger); color: #fff; }
.btn-danger-outline { height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--danger-border); background: #fff; color: var(--danger); font-weight: 700; font-size: 14px; }
.btn-block { width: 100%; }
.btn-lg { height: 48px; font-size: 16px; }

.ghost { background: transparent; }
.ghost:hover { background: var(--line-soft); }
.card-btn { transition: border-color .15s; }
.card-btn:hover { border-color: var(--brand) !important; }
.link-btn { background: none; border: none; padding: 0; color: var(--brand); font-weight: 600; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--brand-dark); }
.icon-btn, .icon-btn-lg { border: none; background: transparent; border-radius: 8px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn { width: 36px; height: 36px; }
.icon-btn-lg { width: 44px; height: 44px; border-radius: 10px; }
.icon-on { background: var(--brand-soft); color: var(--brand-dark); }

/* ===== Champs ===== */
.field { height: 44px; border-radius: 10px; border: 1px solid var(--border); padding: 0 12px; font-size: 15px; background: #fff; width: 100%; }
textarea.field { height: auto; padding: 12px; resize: vertical; }
.field-readonly { border-color: var(--line); background: var(--surface-soft); color: var(--ink-soft); }
.field-slim { height: 38px; }
.field-xs { height: 38px; width: 70px; }
.field-label { font-size: 14px; font-weight: 600; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.form-error { margin: 0; font-size: 14px; font-weight: 600; color: var(--danger); background: #FBEFED; border: 1px solid var(--danger-border); border-radius: 10px; padding: 10px 14px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.check { width: 18px; height: 18px; accent-color: var(--brand); }
.color-input { width: 56px; height: 44px; border: 1px solid var(--border); border-radius: 10px; padding: 2px; background: #fff; }

/* ===== Auth / install ===== */
.auth-body { background: #fff; }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 20px; }
.auth-inner { display: flex; flex-direction: column; gap: 20px; }
.auth-logo { width: 160px; height: 160px; object-fit: contain; align-self: center; }
.auth-logo-sm { width: 120px; height: 120px; }
.auth-title { margin: 0; font-size: 24px; font-weight: 800; text-align: center; }
.auth-sub { margin: 0; font-size: 15px; color: var(--muted); }
.auth-text { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.55; }
.auth-note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; text-align: center; }
.auth-center { display: flex; flex-direction: column; gap: 14px; text-align: center; align-items: center; }
.check-circle { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; }
.install-wrap { align-items: flex-start; }
.install-form { max-width: 640px; }
.check-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }

/* ===== Layout ===== */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.sidebar { flex: 1 1 272px; max-width: 100%; background: #fff; border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 860px) { .sidebar { max-width: 272px; } }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; background: #fff; }

.logo-btn { border: none; background: transparent; border-radius: 12px; padding: 4px; display: flex; align-items: center; justify-content: center; align-self: stretch; }
.logo-img { width: 96px; height: 96px; object-fit: contain; }
.logo-preview { width: 96px; height: 96px; object-fit: contain; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-btn { width: 100%; min-height: 44px; border: none; border-radius: 10px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; font-size: 15px; text-align: left; background: transparent; color: var(--ink); font-weight: 500; }
.nav-btn:hover { background: var(--line-soft); }
.nav-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.nav-label { display: flex; align-items: center; gap: 10px; }
.nav-badge { font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 2px 8px; }
.nav-section { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; padding: 12px 10px 4px; }

.recents { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; }
.recents-title { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; padding: 0 10px 6px; }
.recent-item { min-height: 36px; border-radius: 8px; padding: 6px 10px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); }
.recent-item:hover { background: var(--line-soft); }
.recent-active { background: var(--brand-softer); color: var(--brand-dark); font-weight: 600; }
.recents-all { font-size: 13px; text-align: left; padding: 6px 10px; }

.quota-card { text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fff; color: var(--ink); width: 100%; }
.quota-card-top { display: flex; justify-content: space-between; font-size: 13px; width: 100%; }
.quota-card-title { font-weight: 700; }
.quota-card-pct { color: var(--ink-soft); }
.quota-bar { display: block; width: 100%; height: 8px; border-radius: 99px; background: var(--bar-bg); overflow: hidden; }
.quota-bar-fill { display: block; height: 100%; border-radius: 99px; background: var(--gradient); }
.quota-warn { background: var(--warn); }
.quota-card-sub { font-size: 12px; color: var(--muted); }

.profile-row { display: flex; align-items: center; gap: 10px; padding: 4px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.profile-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.profile-name { font-weight: 700; font-size: 14px; }
.profile-service { font-size: 12px; color: var(--muted); }

/* ===== Header ===== */
.header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px; border-bottom: 1px solid var(--line); }
.header-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.page-title { margin: 0; font-size: 20px; font-weight: 800; }
.page-sub { font-size: 13px; color: var(--muted); }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pill-btn { height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border); background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pill { height: 40px; padding: 0 14px; border-radius: 99px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #B9C7EE; }
.pill-warn { background: var(--warn-bg); color: var(--warn-dark); border-color: var(--warn-border); }
.pill-on { background: var(--brand) !important; color: #fff !important; border-color: var(--brand) !important; }
a.pill { color: var(--brand-dark); }
a.pill.pill-on { color: #fff; }
a.pill.pill-warn { color: var(--warn-dark); }

/* ===== Chat ===== */
.chat-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-scroll { flex: 1; padding: 28px; display: flex; flex-direction: column; align-items: center; overflow-y: auto; }
.chat-col { width: 100%; max-width: 820px; display: flex; flex-direction: column; gap: 22px; }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 32px 0 8px; }
.empty-logo { width: 96px; height: 96px; object-fit: contain; }
.empty-title { margin: 0; font-size: 30px; font-weight: 800; }
.empty-sub { margin: 0; font-size: 16px; color: var(--muted); max-width: 600px; line-height: 1.5; }

.groups-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.group-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.group-head { display: flex; align-items: center; gap: 10px; }
.group-badge { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.group-head-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.group-title { font-size: 16px; font-weight: 800; }
.status-ok { font-size: 13px; font-weight: 600; color: var(--brand); }
.status-ko { font-size: 13px; font-weight: 600; color: var(--warn-dark); }
.status-neutral { font-size: 13px; font-weight: 600; color: var(--muted); }
.group-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.group-actions { display: flex; flex-direction: column; gap: 2px; }
.action-item { width: 100%; min-height: 40px; border: none; border-radius: 8px; text-align: left; padding: 8px 10px; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.action-ok { color: var(--brand); }
.action-off { color: var(--muted); }

.msg-user { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.msg-files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.msg-file { font-size: 13px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; background: #fff; }
.bubble-user { max-width: 78%; background: var(--brand); color: #fff; border-radius: 16px 16px 4px 16px; padding: 14px 18px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; }

.msg-bot { display: flex; gap: 12px; align-items: flex-start; }
.bot-avatar { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.bot-avatar img { width: 30px; height: 30px; object-fit: contain; }
.msg-bot-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; }
.step-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); background: var(--brand-softer); border-radius: 99px; padding: 5px 12px; }
.bubble-bot { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 16px 18px; font-size: 15px; line-height: 1.6; }
.bubble-bot.md p { margin: 0 0 .7em; }
.bubble-bot.md p:last-child { margin-bottom: 0; }
.bubble-bot.md h1, .bubble-bot.md h2, .bubble-bot.md h3, .bubble-bot.md h4 { margin: .8em 0 .4em; font-weight: 800; }
.bubble-bot.md h1 { font-size: 19px; } .bubble-bot.md h2 { font-size: 17px; } .bubble-bot.md h3 { font-size: 16px; }
.bubble-bot.md ul, .bubble-bot.md ol { margin: .4em 0; padding-left: 1.4em; }
.bubble-bot.md code { background: #E8ECF5; border-radius: 5px; padding: 1px 5px; font-size: 13.5px; }
.bubble-bot.md pre { background: var(--ink); color: #E8ECF5; border-radius: 10px; padding: 12px; overflow-x: auto; }
.bubble-bot.md pre code { background: none; color: inherit; padding: 0; }
.msg-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.msg-meta { font-size: 12px; color: var(--muted); margin-left: 6px; }
.thinking { display: flex; gap: 12px; align-items: center; color: var(--ink-soft); font-size: 14px; }

/* ===== Composer ===== */
.composer-zone { padding: 0 28px 24px; display: flex; justify-content: center; }
.composer { width: 100%; max-width: 820px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 4px 18px rgba(11,24,49,.06); }
.composer:focus-within { border-top: 2px solid transparent; border-image: var(--gradient) 1; border-radius: 16px 16px 16px 16px; }
.composer textarea { border: none; resize: none; font-size: 15px; line-height: 1.5; outline: none; color: var(--ink); background: transparent; }
.composer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.composer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tool-icon { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); display: flex; align-items: center; justify-content: center; }
.tool-btn { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tools-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.tool-pill { height: 36px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 600; background: #fff; color: var(--ink-soft); border: 1px solid var(--border); }
.tool-on { background: var(--brand-soft); color: var(--brand-dark); border-color: #8FA6E0; }
.tool-off { color: var(--muted); border: 1px dashed var(--border-strong); }
.send-btn { height: 44px; padding: 0 18px; border-radius: 10px; border: none; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; background: var(--gradient); color: #fff; }
.send-btn:disabled { background: var(--track); color: var(--muted); cursor: default; }
.attached-list { display: flex; flex-wrap: wrap; gap: 6px; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; padding: 2px 4px 2px 10px; background: var(--surface-soft); }
.att-chip button { width: 28px; height: 28px; border: none; background: transparent; border-radius: 6px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.blocked-box { width: 100%; max-width: 820px; border: 1px solid var(--warn-border); background: #FFF6EE; border-radius: 16px; padding: 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.blocked-text { font-size: 15px; color: var(--warn-text); font-weight: 600; }
.chat-disclaimer { margin: -12px 0 18px; text-align: center; font-size: 12px; color: var(--muted); }

/* ===== Pages génériques ===== */
.page-col { padding: 28px; display: flex; flex-direction: column; gap: 18px; max-width: 1040px; width: 100%; }
.page-col-inner { display: flex; flex-direction: column; gap: 18px; }
.page-narrow { max-width: 820px; }
.page-intro { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.55; max-width: 680px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.card-flush { padding: 0; }
.card-tight { gap: 6px; }
.card-title { margin: 0; font-size: 17px; font-weight: 800; }
.card-title-pad { padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.card-head-row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.form-end { display: flex; justify-content: flex-end; }
.list-empty { margin: 0; padding: 28px; text-align: center; color: var(--muted); }
.list-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.row-menu summary { cursor: pointer; }
.edit-form { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; }

/* ===== Historique ===== */
.history-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.history-search { flex: 1 1 280px; }
.hist-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line-soft); padding-right: 12px; }
.hist-open { flex: 1; min-width: 0; text-align: left; border: none; padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--ink); }
.hist-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hist-title { font-size: 15px; font-weight: 700; }
.hist-preview { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-tools { display: flex; gap: 6px; }
.hist-date { font-size: 13px; color: var(--muted); min-width: 110px; text-align: right; }
.tool-tag { font-size: 12px; font-weight: 600; background: var(--line-soft); color: var(--brand-dark); border-radius: 6px; padding: 3px 8px; }

/* ===== Connecteurs ===== */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.conn-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.conn-logo { width: 44px; height: 44px; border-radius: 10px; color: #fff; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.conn-name { font-size: 16px; font-weight: 700; }
.conn-desc { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.conn-scopes { display: flex; flex-wrap: wrap; gap: 6px; }
.scope-tag { font-size: 12px; background: var(--surface-soft); color: var(--ink-soft); border-radius: 6px; padding: 3px 8px; }

/* ===== Consommation ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.kpi-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 30px; font-weight: 800; }
.kpi-brand { color: var(--brand); }
.kpi-sub { font-size: 13px; color: var(--muted); }
.quota-bar-lg { position: relative; height: 14px; border-radius: 99px; background: var(--bar-bg); overflow: hidden; }
.quota-marker { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--warn); }
.quota-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.histo { height: 160px; display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--border); }
.histo-bar { flex: 1; border-radius: 3px 3px 0 0; }
.break-row { display: flex; flex-direction: column; gap: 6px; }
.break-head { display: flex; justify-content: space-between; font-size: 14px; }
.break-label { font-weight: 600; }
.break-value { color: var(--ink-soft); }
.break-bar { height: 8px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.break-fill { height: 100%; border-radius: 99px; background: var(--brand); }
.quota-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ===== Paramètres / aide ===== */
.tone-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tone-row .pill { cursor: pointer; border: 1px solid var(--border); background: #fff; color: var(--ink); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.switch-meta { display: flex; flex-direction: column; gap: 2px; }
.switch-label { font-size: 15px; font-weight: 600; }
.switch-hint { font-size: 13px; color: var(--muted); }
.switch input { position: absolute; opacity: 0; }
.switch-track { flex-shrink: 0; width: 52px; height: 30px; border-radius: 99px; border: none; padding: 3px; display: flex; align-items: center; justify-content: flex-start; background: var(--border-strong); transition: background .15s; }
.switch input:checked + .switch-track { justify-content: flex-end; background: var(--brand); }
.switch-knob { width: 24px; height: 24px; border-radius: 50%; background: #fff; display: block; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-foot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding-top: 12px; }

.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-q { width: 100%; min-height: 52px; text-align: left; border: none; background: transparent; padding: 14px 20px; font-size: 15px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-sign { font-size: 20px; color: var(--brand); }
.faq-a { margin: 0; padding: 0 20px 16px; font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

/* ===== Modales ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(11,24,49,.45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; width: 100%; }
.modal-lg { max-width: 920px; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-sm { max-width: 480px; }
.modal-xs { max-width: 440px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head-meta { display: flex; flex-direction: column; gap: 4px; }
.modal-title { margin: 0; font-size: 20px; font-weight: 800; }
.modal-lg .modal-title { font-size: 22px; }
.modal-sub { font-size: 14px; color: var(--muted); }
.modal-section { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.modal-text { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.55; }
.modal-btns { display: flex; justify-content: flex-end; gap: 10px; }
.modal-cancel { align-self: flex-end; }
.attach-drop { height: 72px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-soft); font-size: 15px; font-weight: 600; color: var(--ink); width: 100%; }
.attach-hint { font-size: 12px; color: var(--muted); }
.kdrive-soon { margin: 0; font-size: 14px; color: var(--muted); font-style: italic; }

/* ===== Toast ===== */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 18px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.18); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); }

/* ===== Bouton principal des pages d'authentification ===== */
.auth-form .btn-primary { background: var(--gradient); border: none; }
.auth-form .btn-primary:hover { filter: brightness(1.08); background: var(--gradient); }

/* ===== Mascotte emi (yeux animés) ===== */
.emi-mascot { position: relative; display: inline-block; line-height: 0; }
.emi-mascot .emi-face { display: block; width: 100%; height: auto; }
.emi-mascot .emi-eyes { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .18s ease-out; }
.emi-mascot .emi-eye { transform-box: fill-box; transform-origin: center; animation: emi-blink 5s infinite; animation-delay: var(--blink-delay, 0s); }
@keyframes emi-blink {
  0%, 91.5%, 96.5%, 97.6%, 100% { transform: scaleY(1); }
  94%   { transform: scaleY(.12); }
  96.8% { transform: scaleY(.35); }
}
.emi-mascot.is-thinking .emi-eye { animation: emi-scan 1.2s ease-in-out infinite; animation-delay: 0s; }
@keyframes emi-scan {
  0%, 100% { transform: translate(-8px, -2px); }
  50%      { transform: translate(8px, 2px); }
}
.emi-mascot.is-happy .emi-eye { animation: emi-hop .45s ease-in-out 2; animation-delay: 0s; }
@keyframes emi-hop {
  50% { transform: translateY(-9px) scaleY(.82); }
}
.emi-mascot.sidebar-wordmark { width: 150px; }
.emi-mascot.empty-mascot { width: 120px; }
.emi-mascot.bot-mascot { width: 30px; }
.emi-mascot.brand-preview { width: 200px; }
@media (prefers-reduced-motion: reduce) {
  .emi-mascot .emi-eye, .emi-mascot .emi-eyes { animation: none !important; transition: none !important; }
}
