/* Messagerie Amorly — interface dédiée (pas les styles globaux) */
body.msgr-mode .main {
  padding: 0 !important;
  background: #0b0608 !important;
}
body.msgr-mode .app-tools { display: none; }
#view-chats.msgr-root {
  display: none;
}
#view-chats.msgr-root.on {
  display: flex !important;
  flex-direction: column;
  height: calc(100dvh - 0px);
  min-height: calc(100vh - 0px);
  margin: 0;
  background: #0b0608;
  color: #f6eef1;
  font-family: "Outfit", system-ui, sans-serif;
}
.msgr {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: #0b0608;
}
.msgr-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #12080d;
  border-right: 1px solid rgba(255,255,255,.06);
}
.msgr-brand {
  padding: 22px 20px 10px;
}
.msgr-brand h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #fff;
  font-family: "Outfit", system-ui, sans-serif;
}
.msgr-brand p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #c9a0ad;
  font-weight: 500;
}
.msgr-find {
  margin: 8px 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: #1c1016;
  border: 1px solid rgba(255,255,255,.07);
}
.msgr-find i { opacity: .55; font-style: normal; }
.msgr-find input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
  outline: none;
}
.msgr-tabs {
  display: flex;
  gap: 6px;
  padding: 0 16px 12px;
}
.msgr-tabs button {
  border: 0;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #1c1016;
  color: #c9a0ad;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.msgr-tabs button.on {
  background: #fff;
  color: #1a0a10;
}
.msgr-rows {
  flex: 1;
  overflow: auto;
  padding: 4px 8px 16px;
}
.msgr-row {
  width: 100%;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 10px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.msgr-row:hover { background: rgba(255,255,255,.04); }
.msgr-row.on { background: #241018; }
.msgr-row.unread .msgr-name { font-weight: 800; color: #fff; }
.msgr-row.unread .msgr-prev { color: #f3d5de; font-weight: 600; }
.msgr-ava {
  position: relative;
  width: 52px;
  height: 52px;
}
.msgr-ava img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #2a1218;
}
.msgr-pulse {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #5a4450;
  border: 2px solid #12080d;
}
.msgr-pulse.on {
  background: #2ee59d;
  box-shadow: 0 0 0 4px rgba(46,229,157,.18);
}
.msgr-name {
  display: block;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  color: #fff;
}
.msgr-prev {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: #b38f9b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msgr-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 42px;
}
.msgr-side time {
  font-size: 11px;
  font-weight: 700;
  color: #9a7a84;
}
.msgr-row.unread .msgr-side time { color: #ff7aa3; }
.msgr-n {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff2d6a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.msgr-ck {
  font-style: normal;
  font-size: 13px;
  letter-spacing: -1px;
  color: #8a6a74;
  font-weight: 800;
}
.msgr-ck.vu { color: #6ad7ff; }
.msgr-blank {
  padding: 40px 18px;
  text-align: center;
  color: #c9a0ad;
}
.msgr-blank b { display: block; color: #fff; font-size: 16px; margin-bottom: 6px; }

.msgr-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(255,45,106,.16), transparent 55%),
    #14080c;
}
.msgr-idle {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 32px;
}
.msgr-idle-box {
  width: min(420px, 100%);
  text-align: center;
  padding: 36px 28px;
  border-radius: 28px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
}
.msgr-idle-box .logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 20px;
}
.msgr-idle-box b { display: block; font-size: 22px; margin-bottom: 8px; }
.msgr-idle-box p { margin: 0; color: #c9a0ad; line-height: 1.5; }

.msgr-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(12,6,9,.86);
  backdrop-filter: blur(16px);
}
.msgr-ico {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #24141a;
  color: #fff;
  cursor: pointer;
  font-size: 22px;
}
.msgr-who {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
}
.msgr-who b { display: block; font-size: 15px; }
.msgr-st { display: block; font-size: 12px; color: #b38f9b; margin-top: 1px; font-weight: 600; }
.msgr-st.live { color: #2ee59d; }
.msgr-feed {
  flex: 1;
  overflow: auto;
  padding: 18px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.msgr-day {
  align-self: center;
  margin: 10px 0 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  color: #e7c8d2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: capitalize;
}
.msgr-b {
  max-width: min(74%, 460px);
  padding: 10px 12px 7px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.msgr-b.me {
  align-self: flex-end;
  background: linear-gradient(180deg, #ff4f86, #e0145c);
  border-bottom-right-radius: 6px;
  color: #fff;
}
.msgr-b.you {
  align-self: flex-start;
  background: #24151c;
  border: 1px solid rgba(255,255,255,.05);
  border-bottom-left-radius: 6px;
}
.msgr-b span { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.msgr-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  opacity: .82;
}
.msgr-b.you .msgr-meta { justify-content: flex-start; color: #e7c8d2; }
.msgr-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #10080c;
  border-top: 1px solid rgba(255,255,255,.06);
}
.msgr-bar input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  border-radius: 16px;
  padding: 0 16px;
  background: #22141a;
  color: #fff;
  font-size: 15px;
}
.msgr-go {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: #ff2d6a;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  font-weight: 800;
}

@media (max-width: 799px) {
  body.msgr-mode .main { padding: 0 0 72px !important; }
  #view-chats.msgr-root.on {
    height: calc(100dvh - 72px);
    min-height: calc(100dvh - 72px);
  }
  .msgr { grid-template-columns: 1fr; }
  .msgr.show-list .msgr-pane { display: none; }
  .msgr.show-thread .msgr-list { display: none; }
  .msgr-ico.back { display: grid; place-items: center; }
}
@media (min-width: 800px) {
  .msgr-ico.back { display: none; }
  #view-chats.msgr-root.on { height: 100vh; }
}
