/* ===================================================================
   LAMINAK — "MSN" Theme
   Fidèle à MSN Messenger 7.x — blanc, ciel bleu, chrome argenté.
   Panneaux blancs, dégradés bleu ciel, accent orange MSN.
   =================================================================== */

/* ── Theme Variables ── */
body.theme-msn {
  --bg:              #dce9f7;
  --bg-card:         #ffffff;
  --bg-input:        #ffffff;
  --bg-hover:        rgba(0, 120, 215, 0.07);
  --border:          #b8cfe8;
  --text:            #1a1a1a;
  --text-muted:      #5a6a80;
  --accent:          #0078d7;
  --accent-hover:    #005fa3;
  --accent-dim:      rgba(0, 120, 215, 0.1);
  --user-bg:         #e8f0fc;
  --assistant-bg:    #f5f9ff;
  --success:         #2d8c2d;
  --warning:         #e86900;
  --error:           #cc0000;
  --thinking-bg:     #f0f5fb;
  --thinking-border: #b8cfe8;
  --tool-bg:         #f5f9ff;
  --tool-border:     #c8d8ec;
  --bg-secondary:    #eef4fb;
  --glass:           rgba(220, 233, 247, 0.97);
  --glass-border:    #b8cfe8;
  --orb-idle:       radial-gradient(circle, #5cb8ff 0%, #0078d7 40%, #0050a0 100%);
  --orb-thinking:   radial-gradient(circle, #ffb347 0%, #e86900 40%, #b84f00 100%);
  --orb-speaking:   radial-gradient(circle, #5de85d 0%, #2d8c2d 40%, #1a5a1a 100%);
  --orb-listening:  radial-gradient(circle, #f7c06e 0%, #e0900a 40%, #b86000 100%);
  --orb-error:      radial-gradient(circle, #ff6060 0%, #cc0000 40%, #880000 100%);
}

/* ── Background — ciel de bureau MSN ── */
body.theme-msn {
  background: #dce9f7;
  font-family: 'Segoe UI', Tahoma, Arial, var(--font);
}

body.theme-msn::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(175deg, #cce0f5 0%, #dce9f7 40%, #e8f2fc 100%);
}

/* ── Header — toolbar bleu ciel MSN ── */
body.theme-msn header {
  background: linear-gradient(180deg,
    #c8e0f8 0%,
    #b0d0f0 25%,
    #9ec4ec 50%,
    #8ab8e8 51%,
    #9ac0ea 100%
  );
  border-bottom: 1px solid #6090c8;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 2px 4px rgba(0, 80, 160, 0.15);
  color: #1a2a4a;
}

body.theme-msn header .logo-text { color: #003080; }
body.theme-msn header .logo-accent { color: #e06000; }

body.theme-msn .logo-icon {
  background: linear-gradient(135deg, #5cb8ff, #0078d7);
  border-radius: 6px;
  color: #fff;
  border: 1px solid #0050a0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
}

/* ── Nav sidebar — panneau contacts MSN ── */
body.theme-msn #app-nav {
  background: linear-gradient(180deg, #e8f2fc 0%, #d8e8f8 100%);
  border-right: 1px solid #a8c4e0;
}

body.theme-msn .nav-item { color: #1a2a4a; }

body.theme-msn .nav-item.active {
  background: linear-gradient(90deg, #c0d8f4 0%, #b0ccf0 100%);
  color: #003080;
  border-left: 3px solid #0078d7;
  font-weight: 700;
}

body.theme-msn .nav-item:hover {
  background: rgba(0, 120, 215, 0.08);
  color: #0050a0;
}

body.theme-msn .sidebar-footer {
  background: linear-gradient(180deg, #d8e8f8 0%, #c8ddf5 100%);
  border-top: 1px solid #a8c4e0;
}

/* ── Messages — bulles de chat MSN ── */
body.theme-msn .msg.user .msg-body {
  background: #e0eefb;
  border: 1px solid #a8c8ec;
  border-radius: 10px 10px 3px 10px;
  color: #1a1a1a;
}

body.theme-msn .msg.assistant .msg-body {
  background: #ffffff;
  border: 1px solid #c0d4ec;
  border-radius: 10px 10px 10px 3px;
  box-shadow: 0 1px 3px rgba(0,80,160,0.06);
  color: #1a1a1a;
}

body.theme-msn .msg.assistant .msg-avatar {
  background: linear-gradient(135deg, #5cb8ff, #0078d7);
  color: #fff;
}

/* ── Input area — zone de saisie MSN ── */
body.theme-msn .input-area {
  background: linear-gradient(180deg, #eef4fb 0%, #e4eef8 100%);
  border-top: 2px solid #a8c4e0;
  box-shadow: 0 -1px 0 rgba(255,255,255,0.8);
}

body.theme-msn #msg-input {
  background: #ffffff;
  border: 2px solid #90b8e0;
  border-radius: 4px;
  color: #1a1a1a;
  box-shadow: 1px 1px 3px rgba(0,80,160,0.1) inset;
}

body.theme-msn #msg-input:focus {
  border-color: #0078d7;
  box-shadow: 1px 1px 3px rgba(0,80,160,0.1) inset, 0 0 0 2px rgba(0,120,215,0.2);
}

/* ── Send button — bouton "Send" MSN chrome ── */
body.theme-msn .send-btn {
  background: linear-gradient(180deg, #f0f8ff 0%, #c8e0f8 40%, #a8ccf0 100%);
  color: #003080;
  border: 1px solid #7090c0;
  border-radius: 3px;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 1px 2px rgba(0,50,120,0.1);
}

body.theme-msn .send-btn:hover {
  background: linear-gradient(180deg, #d8eeff 0%, #b0d4f8 50%, #90c0f0 100%);
  border-color: #0078d7;
  color: #001860;
}

/* ── Model picker ── */
body.theme-msn .model-picker-btn {
  background: linear-gradient(180deg, #f0f8ff 0%, #ddeeff 100%);
  border: 1px solid #90b8e0;
  border-radius: 3px;
  color: #1a2a4a;
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset;
}

body.theme-msn .model-picker-btn:hover {
  border-color: #0078d7;
  background: linear-gradient(180deg, #d8eeff 0%, #c8e0f8 100%);
}

body.theme-msn .model-picker-bubble {
  background: #ffffff;
  border-color: #90b8e0;
  box-shadow: 3px 3px 8px rgba(0,50,120,0.2);
}

body.theme-msn .model-picker-bubble::after {
  background: #ffffff;
  border-color: #90b8e0;
}

/* ── Suggestions ── */
body.theme-msn .suggestion {
  background: linear-gradient(180deg, #f8fcff 0%, #eef4fb 100%);
  border: 1px solid #b0ccec;
  border-radius: 4px;
  color: #1a2a4a;
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset;
}

body.theme-msn .suggestion:hover {
  background: linear-gradient(180deg, #deeefb 0%, #cce0f8 100%);
  border-color: #0078d7;
  color: #001860;
}

/* ── Thinking / tool blocks ── */
body.theme-msn .thinking-block {
  background: #f0f7ff;
  border-color: #b0ccec;
  border-radius: 4px;
}

body.theme-msn .tool-block {
  background: #f5faff;
  border-color: #c0d4ec;
  border-radius: 4px;
}

/* ── Code blocks ── */
body.theme-msn pre,
body.theme-msn code {
  background: #f0f5ff;
  border: 1px solid #b8cce8;
  border-radius: 3px;
  color: #1a1a1a;
  font-family: 'Courier New', Courier, monospace;
}

/* ── Buttons ── */
body.theme-msn .btn-primary {
  background: linear-gradient(180deg, #5cb8ff 0%, #0078d7 50%, #005fa3 100%);
  color: #ffffff;
  border: 1px solid #0050a0;
  border-radius: 3px;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 1px 3px rgba(0,50,120,0.2);
}

body.theme-msn .btn-primary:hover {
  background: linear-gradient(180deg, #70c4ff 0%, #1a8ae0 50%, #0070b8 100%);
}

body.theme-msn .btn-icon { color: #4a6a90; }
body.theme-msn .btn-icon:hover { color: #003080; background: rgba(0,120,215,0.08); }
body.theme-msn .btn-icon.active { color: #0078d7; }

/* ── Auth ── */
body.theme-msn .auth-card {
  background: #ffffff;
  border: 1px solid #90b8e0;
  border-radius: 6px;
  box-shadow: 4px 4px 12px rgba(0,50,120,0.15), 0 1px 0 rgba(255,255,255,0.9) inset;
}

body.theme-msn #connect-screen { background: #dce9f7; }
body.theme-msn #connect-screen .big-spinner {
  border-color: rgba(0, 120, 215, 0.15);
  border-top-color: #0078d7;
}

/* ── Focus ── */
body.theme-msn :focus-visible {
  outline: 2px solid rgba(0, 120, 215, 0.6);
  outline-offset: 1px;
}

/* ── Scrollbars — style MSN/XP ── */
body.theme-msn ::-webkit-scrollbar { width: 14px; }
body.theme-msn ::-webkit-scrollbar-track {
  background: #d0e4f6;
  border-left: 1px solid #a8c4e0;
}
body.theme-msn ::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #c0d8f0 0%, #a8c8e8 50%, #90b4e0 100%);
  border: 1px solid #6090c8;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
}
body.theme-msn ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #a8c8ec 0%, #8ab8e4 50%, #6898d8 100%);
}
body.theme-msn ::-webkit-scrollbar-button {
  background: linear-gradient(180deg, #d8ecff 0%, #b8d8f8 100%);
  border: 1px solid #6090c8;
  height: 14px;
}

/* ── Status dot — vert "Online" ── */
body.theme-msn .status-dot {
  background: #2d8c2d;
  box-shadow: 0 0 4px #5de85d;
}
