/* ==========================================================================
   MEEVO — Dashboard
   ========================================================================== */
.demo-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px;
  background: rgba(240, 178, 50, 0.12);
  border-bottom: 1px solid rgba(240, 178, 50, 0.3);
  color: #f5cf7a;
  font-size: 13.5px; font-weight: 600;
  text-align: center;
}
.demo-banner[hidden] { display: none; }
.demo-banner [data-lucide], .demo-banner .lucide { width: 16px; height: 16px; }

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 6px 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--text-strong);
}
.user-chip img { width: 28px; height: 28px; border-radius: 50%; }
.user-chip span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip a { display: inline-flex; padding: 6px; border-radius: 50%; color: var(--muted); }
.user-chip a:hover { color: #fff; background: var(--bg-3); }
.user-chip [data-lucide], .user-chip .lucide { width: 16px; height: 16px; }
@media (max-width: 520px) { .user-chip span { display: none; } }

/* Connexion */
.login-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.login-card h1 { font: 800 clamp(32px, 4.5vw, 48px)/1.08 var(--font-display); color: #fff; letter-spacing: -0.02em; margin: 20px 0 14px; }
.login-card > p { color: var(--muted); font-size: 17px; margin: 0 0 24px; line-height: 1.6; }
.login-logo { width: 64px; height: 64px; }
.login-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.login-secure { display: flex; align-items: center; gap: 6px; margin-top: 20px; color: var(--faint); font-size: 13px; }
.login-secure [data-lucide], .login-secure .lucide { width: 15px; height: 15px; color: var(--green); }
.login-preview { background: #313338; border: 1px solid var(--border); border-radius: 18px; padding: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.error-callout { background: rgba(242, 63, 67, 0.1); border-color: rgba(242, 63, 67, 0.35); }
.error-callout > .lucide, .error-callout > [data-lucide] { color: var(--red); }
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; padding: 40px 16px 64px; }
}

/* Liste des serveurs */
.servers { padding-top: 48px; padding-bottom: 96px; }
.servers h1 { font: 800 clamp(28px, 4vw, 40px) var(--font-display); color: #fff; margin: 0 0 6px; letter-spacing: -0.02em; }
.lead-muted { color: var(--muted); margin: 0 0 32px; }
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.server-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: border-color 0.15s, transform 0.15s; }
.server-card:hover { border-color: rgba(88, 101, 242, 0.5); transform: translateY(-2px); }
.server-card.off { opacity: 0.75; }
.server-banner {
  height: 110px;
  display: grid; place-items: center;
  background: radial-gradient(closest-side, rgba(88, 101, 242, 0.35), transparent), var(--bg-0);
}
.server-banner .g-icon { width: 64px; height: 64px; }
.server-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.server-info b { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-icon { width: 56px; height: 56px; border-radius: 30%; flex-shrink: 0; object-fit: cover; }
.g-initials { display: grid; place-items: center; background: var(--bg-3); color: var(--text-strong); font-weight: 700; font-size: 18px; }

/* Barre latérale du serveur */
.side-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin: 0 10px 16px; }
.side-back:hover { color: #fff; }
.side-back [data-lucide], .side-back .lucide { width: 15px; height: 15px; }
.side-guild { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; margin-bottom: 14px; border-bottom: 1px solid var(--border); color: #fff; }
.side-guild .g-icon { width: 36px; height: 36px; font-size: 13px; }
.side-guild b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link .on-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.dash-layout { grid-template-columns: 272px minmax(0, 1fr); }
@media (max-width: 1200px) { .dash-layout { grid-template-columns: 256px minmax(0, 1fr); } }
@media (max-width: 900px) { .dash-layout { grid-template-columns: minmax(0, 1fr); } }

.doc-card .status { margin-top: auto; align-self: flex-start; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg-3); color: var(--muted); }
.doc-card .status.on { background: rgba(35, 165, 89, 0.15); color: #4ade80; }
.doc-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: #8d96ff; font-size: 14px; font-weight: 600; }
.doc-link:hover { text-decoration: underline; }
.doc-link [data-lucide], .doc-link .lucide { width: 16px; height: 16px; }

/* Formulaire */
.settings { margin-top: 28px; display: grid; gap: 16px; }
.f-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.f-row { display: grid; gap: 10px; }
.f-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.f-label { font-weight: 700; color: #fff; font-size: 14.5px; }
.f-label.big { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; }
.f-label.big img.emoji { width: 24px; height: 24px; }
.f-label .star { color: var(--red); }
.f-label .note { font-weight: 400; color: var(--muted); }
.f-sep { height: 1px; background: var(--border); margin: 18px 0; }
.f-input {
  width: 100%;
  max-width: 480px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--bg-deep);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-strong);
  font: 14px var(--font);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.f-input:focus { border-color: var(--blurple); box-shadow: 0 0 0 3px var(--blurple-soft); }
select.f-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23dbdee1' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
select.f-input option { background: var(--bg-1); }
/* Bloc « Envoyer » */
.f-textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; line-height: 1.5; max-width: none; }
.send-card .f-label.big [data-lucide], .send-card .f-label.big .lucide { width: 20px; height: 20px; color: #8d96ff; }
.send-lead { color: var(--muted); font-size: 14px; margin: 6px 0 18px; }
.send-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.send-form { display: grid; gap: 14px; }
.send-form .f-input { max-width: none; }
.send-preview { display: grid; gap: 10px; }
.send-preview .cv2-msg { background: #313338; border-radius: 12px; padding: 14px; }
.cv2-text { font-size: 14px; line-height: 1.5; color: var(--text); word-break: break-word; }
.cv2-sub { font-size: 12px; color: var(--faint); }
.send-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.send-foot .btn { margin-left: auto; }
@media (max-width: 760px) { .send-grid { grid-template-columns: 1fr; } }

.last-update { color: var(--faint); font-size: 13px; margin: 0; }

/* Interrupteur */
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--faint); transition: background 0.2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--blurple-soft); }

/* Barre d'enregistrement */
.savebar {
  position: fixed;
  left: 50%; bottom: 20px;
  transform: translate(-50%, 140%);
  width: min(720px, calc(100vw - 32px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 70;
  transition: transform 0.25s ease;
  font-weight: 600; font-size: 14px; color: var(--text-strong);
}
.savebar.show { transform: translate(-50%, 0); }
.savebar > span { display: inline-flex; align-items: center; gap: 8px; }
.savebar > span [data-lucide], .savebar > span .lucide { color: var(--yellow); width: 18px; height: 18px; }
.savebar > div { display: flex; gap: 8px; }
.toast.error [data-lucide], .toast.error .lucide { color: var(--red); }
@media (max-width: 520px) { .savebar > span { font-size: 13px; } }
