/* ===== FRICAIMMO — MESSAGERIE (modal + page) ===== */

/* ====================================================
   CONTACT MODAL (used on listing pages)
   ==================================================== */

.fmsg-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(10, 20, 40, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fmsg-overlay.open {
  opacity: 1;
  visibility: visible;
}

.fmsg-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.28);
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
  position: relative;
}

.fmsg-overlay.open .fmsg-modal {
  transform: translateY(0) scale(1);
}

.fmsg-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0,0,0,0.08);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  line-height: 1;
  transition: background 0.2s;
  z-index: 1;
}

.fmsg-close:hover { background: rgba(0,0,0,0.15); }

.fmsg-header {
  background: linear-gradient(135deg, #78350f, #92400e);
  padding: 28px 28px 24px;
  color: #fff;
}

.fmsg-prop-badge {
  display: inline-flex;
  padding: 4px 12px;
  background: rgba(255,255,255,0.18);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.fmsg-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}

.fmsg-prop-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.fmsg-prop-meta span {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}

.fmsg-prop-meta span:first-child {
  font-weight: 700;
  color: #fcd34d;
  font-size: 14px;
}

.fmsg-form {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fmsg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fmsg-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fmsg-group label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.fmsg-group input,
.fmsg-group textarea {
  padding: 10px 14px;
  border: 1.5px solid #e7e5e4;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  color: #111827;
  transition: border-color 0.2s;
  resize: none;
}

.fmsg-group input:focus,
.fmsg-group textarea:focus {
  outline: none;
  border-color: #f59e0b;
}

.fmsg-submit {
  padding: 13px 20px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #78350f;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.fmsg-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.35);
}

.fmsg-submit:disabled { opacity: 0.7; cursor: default; }
.fmsg-submit.success { background: #22c55e !important; color: #fff !important; }

/* ====================================================
   NAVBAR BADGE
   ==================================================== */

.msg-badge {
  display: none;
  min-width: 18px;
  height: 18px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 100px;
  padding: 0 5px;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 4px;
  line-height: 1;
}

.msg-nav-link { display: flex !important; align-items: center; gap: 4px; }

/* ====================================================
   LISTING CARD — CONTACT BUTTON
   ==================================================== */

.listing-btn-contact {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #78350f;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245,158,11,.22);
  transition: all 0.2s ease;
}

.listing-btn-contact:hover {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 4px 16px rgba(245,158,11,.35);
  transform: translateY(-2px);
}

.listing-btn-contact-loc {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #78350f;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(245,158,11,.25);
}

.listing-btn-contact-loc:hover {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #78350f;
  box-shadow: 0 4px 16px rgba(245,158,11,.35);
  transform: translateY(-2px);
}

/* ====================================================
   MESSAGERIE PAGE
   ==================================================== */

.fmsg-page-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #292524 100%);
  padding: 116px 5% 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fmsg-page-header::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 50%, rgba(245,158,11,0.12) 0%, transparent 70%);
}

.fmsg-page-header-inner { position: relative; }

.fmsg-page-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.fmsg-page-header p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

/* ====================================================
   MESSAGERIE PAGE — 3-column layout (Vinted/LeBonCoin style)
   ==================================================== */

/* Three-panel layout */
.fmsg-interface {
  display: grid;
  grid-template-columns: 320px 1fr 280px;
  /* navbar: 64px(top)+44px(cats)=108px ; header compact: ~200px → total 308px */
  height: calc(100vh - 310px);
  min-height: 500px;
  background: #f5f5f5;
}

/* ---- Left sidebar ---- */
.fmsg-sidebar {
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #e8e8e8;
}

.fmsg-sidebar-header {
  padding: 16px 16px 10px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fmsg-sidebar-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.fmsg-total-count {
  background: #f5f5f5;
  color: #666;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}

/* Sidebar search */
.fmsg-sidebar-search {
  padding: 8px 12px 10px;
  border-bottom: 1px solid #e8e8e8;
}

.fmsg-sidebar-search-input {
  width: 100%;
  padding: 8px 14px;
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  color: #1a1a1a;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.fmsg-sidebar-search-input::placeholder { color: #aaa; }
.fmsg-sidebar-search-input:focus { border-color: #f0b429; background: #fff; }

/* Sidebar filter bar */
.fmsg-sidebar-filters {
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #e8e8e8;
}

.fmsg-filter-btn {
  padding: 5px 14px;
  border: 1.5px solid #e8e8e8;
  border-radius: 20px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  outline: none;
}

.fmsg-filter-btn:focus { outline: none; }
.fmsg-filter-btn:hover { background: #f5f5f5; }
.fmsg-filter-btn.active { background: #f0b429; color: #7c4a00; border-color: #f0b429; font-weight: 700; }

.fmsg-conv-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e0e0e0 transparent;
}

/* Conv item — Vinted style */
.fmsg-conv-item {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.fmsg-conv-item:hover { background: #fafafa; }
.fmsg-conv-item.active { background: #fff9ee; border-left: 3px solid #f0b429; }

/* Property thumbnail (square 56px) */
.fmsg-conv-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fde8b4, #f0b429);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #7c4a00;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.fmsg-conv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Avatar with initial (fallback when no thumb) */
.fmsg-conv-avatar {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fde8b4, #f0b429);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #7c4a00;
  flex-shrink: 0;
  position: relative;
}

.fmsg-conv-avatar-online {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #fff;
}

.fmsg-conv-item-body { flex: 1; min-width: 0; }

.fmsg-conv-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.fmsg-conv-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.fmsg-conv-title.unread { font-weight: 800; }

.fmsg-conv-time {
  font-size: 11px;
  color: #aaa;
  white-space: nowrap;
  flex-shrink: 0;
}

.fmsg-conv-interlocutor {
  font-size: 12px;
  color: #888;
  margin-bottom: 2px;
}

.fmsg-conv-type {
  font-size: 11px;
  font-weight: 600;
  color: #f0b429;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fmsg-conv-preview {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fmsg-conv-preview.unread { color: #1a1a1a; font-weight: 600; }

.fmsg-conv-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.fmsg-conv-delete-btn {
  display: none;
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  color: #ccc;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  padding: 0;
}

.fmsg-conv-delete-btn:hover { color: #ef4444; background: #fee2e2; }
.fmsg-conv-item:hover .fmsg-conv-delete-btn { display: flex; }

.fmsg-unread-badge {
  min-width: 20px;
  height: 20px;
  background: #f0b429;
  color: #7c4a00;
  font-size: 11px;
  font-weight: 800;
  border-radius: 100px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Central panel ---- */
.fmsg-main {
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  border-right: 1px solid #e8e8e8;
}

/* Empty state */
.fmsg-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  gap: 16px;
}

.fmsg-empty-icon { font-size: 64px; opacity: 0.4; }

.fmsg-empty h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a1a;
}

.fmsg-empty p {
  font-size: 14px;
  color: #9ca3af;
  max-width: 320px;
}

.fmsg-empty a {
  display: inline-flex;
  padding: 11px 24px;
  background: #f0b429;
  color: #7c4a00;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
  margin-top: 6px;
}

.fmsg-empty a:hover { background: #d97706; transform: translateY(-1px); }

/* Conversation header */
.fmsg-conv-header {
  padding: 12px 20px;
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.fmsg-conv-header-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #fde8b4, #f0b429);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #7c4a00;
  flex-shrink: 0;
}

.fmsg-conv-header-info { flex: 1; min-width: 0; }

.fmsg-conv-header-info h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fmsg-conv-header-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.fmsg-conv-header-price {
  font-size: 13px;
  font-weight: 700;
  color: #7c4a00;
  background: #fef3c7;
  padding: 4px 10px;
  border-radius: 16px;
  flex-shrink: 0;
}

/* Property info bar (below conv header) */
.fmsg-prop-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fafafa;
  border-bottom: 1px solid #e8e8e8;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s;
}

.fmsg-prop-bar:hover { background: #f5f0e8; }

.fmsg-prop-bar-img {
  width: 52px;
  height: 40px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fde8b4, #f0b429);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.fmsg-prop-bar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fmsg-prop-bar-info { flex: 1; min-width: 0; }

.fmsg-prop-bar-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fmsg-prop-bar-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.fmsg-prop-bar-price {
  font-weight: 700;
  color: #f0b429;
}

.fmsg-prop-bar-arrow {
  font-size: 14px;
  color: #ccc;
  flex-shrink: 0;
}

/* Messages thread */
.fmsg-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #e0e0e0 transparent;
}

/* Message group (consecutive messages from same sender) */
.fmsg-msg-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
}

.fmsg-msg-group.user { align-items: flex-end; }
.fmsg-msg-group.owner { align-items: flex-start; }

/* Date separator */
.fmsg-date-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  color: #bbb;
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
}

.fmsg-date-sep::before,
.fmsg-date-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #efefef;
}

/* Bubble row */
.fmsg-bubble-wrap {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  max-width: 70%;
  word-break: break-word;
}

.fmsg-bubble-wrap.user { flex-direction: row-reverse; }

.fmsg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  align-self: flex-end;
}

.fmsg-avatar.hidden { visibility: hidden; }

.fmsg-bubble-wrap.user .fmsg-avatar {
  background: #fde8b4;
}

/* Bubble base */
.fmsg-bubble {
  padding: 9px 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

/* Owner bubbles (received — light grey, left side) */
.fmsg-bubble.owner {
  background: #f5f5f5;
  color: #1a1a1a;
  border: 1px solid #e8e8e8;
}

.fmsg-bubble.owner.alone  { border-radius: 16px 16px 16px 4px; }
.fmsg-bubble.owner.first  { border-radius: 16px 16px 16px 16px; }
.fmsg-bubble.owner.middle { border-radius: 4px 16px 16px 4px; }
.fmsg-bubble.owner.last   { border-radius: 4px 16px 16px 16px; }

/* User bubbles (sent — orange doux, right side) */
.fmsg-bubble.user {
  background: #fde8b4;
  color: #7c4a00;
}

.fmsg-bubble.user.alone  { border-radius: 16px 16px 4px 16px; }
.fmsg-bubble.user.first  { border-radius: 16px 16px 16px 16px; }
.fmsg-bubble.user.middle { border-radius: 16px 4px 4px 16px; }
.fmsg-bubble.user.last   { border-radius: 16px 4px 16px 16px; }

/* Timestamp under each bubble group */
.fmsg-group-footer {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 0 2px;
}

.fmsg-msg-group.owner .fmsg-group-footer { padding-left: 32px; }

.fmsg-group-time {
  font-size: 11px;
  color: #9e9e9e;
}

.fmsg-msg-status {
  font-size: 11px;
  color: #9e9e9e;
}

.fmsg-msg-status.read { color: #f0b429; }

/* Typing indicator */
.fmsg-typing-wrap {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.fmsg-typing {
  display: flex;
  gap: 4px;
  padding: 11px 16px;
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 16px 16px 16px 4px;
  align-items: center;
}

.fmsg-typing-dot {
  width: 6px;
  height: 6px;
  background: #aaa;
  border-radius: 50%;
  animation: fmsg-bounce 1.4s infinite;
}

.fmsg-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.fmsg-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes fmsg-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Owner indicator (kept for compat) */
.fmsg-owner-label {
  font-size: 11px;
  font-weight: 600;
  color: #9e9e9e;
  margin-bottom: 4px;
}

/* Sticker display in thread */
.fmsg-sticker {
  font-size: 3rem;
  line-height: 1;
  padding: 4px;
  background: none;
  user-select: none;
  cursor: default;
  transition: transform 0.15s;
}

.fmsg-sticker:hover { transform: scale(1.15); }

/* Sticker picker panel */
.fmsg-sticker-picker {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  width: 300px;
  max-height: 260px;
  display: flex;
  flex-direction: column;
  margin: 0 14px 6px;
  overflow: hidden;
  animation: fmsg-sp-in 0.15s ease;
}

@keyframes fmsg-sp-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fmsg-sp-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 8px 6px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.fmsg-sp-tabs::-webkit-scrollbar { display: none; }

.fmsg-sp-tab {
  padding: 4px 10px;
  border: none;
  border-radius: 20px;
  background: none;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.fmsg-sp-tab:hover { background: #f5f5f5; }
.fmsg-sp-tab.active { background: #fde8b4; }

.fmsg-sp-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e0e0e0 transparent;
}

.fmsg-sp-sticker {
  width: 32px; height: 32px; /* fallback Safari < 15 */
  aspect-ratio: 1;
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, transform 0.1s;
  padding: 2px;
}

.fmsg-sp-sticker:hover {
  background: #f5f5f5;
  transform: scale(1.2);
}

/* Reply bar */
.fmsg-reply-box {
  padding: 10px 12px;
  border-top: 1px solid #e8e8e8;
  background: #fff;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.fmsg-reply-add-btn {
  width: 40px;
  height: 40px;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
  line-height: 1;
}

.fmsg-reply-add-btn:hover { background: #e8e8e8; }

.fmsg-reply-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  padding-bottom: 4px;
}

.fmsg-reply-action-btn {
  width: 38px;
  height: 38px;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: background 0.15s;
  flex-shrink: 0;
}

.fmsg-reply-action-btn:hover { background: #e8e8e8; }

.fmsg-reply-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #e8e8e8;
  border-radius: 24px;
  background: #f5f5f5;
  font-family: inherit;
  font-size: 14px;
  color: #1a1a1a;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  line-height: 1.4;
  transition: border-color 0.2s, background 0.2s;
}

.fmsg-reply-input::placeholder { color: #aaa; }

.fmsg-reply-input:focus {
  outline: none;
  border-color: #f0b429;
  background: #fff;
}

.fmsg-reply-send {
  width: 40px;
  height: 40px;
  background: #f0b429;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  padding: 0;
  align-self: flex-end;
}

.fmsg-reply-send:hover { background: #d97706; transform: scale(1.06); }

/* No conversations empty state full page */
.fmsg-empty-full {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px;
  background: #fff;
}

/* ---- Right info panel ---- */
.fmsg-right-panel {
  background: #fff;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: #e0e0e0 transparent;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fmsg-rp-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 16px;
}

.fmsg-rp-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde8b4, #f0b429);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #7c4a00;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.fmsg-rp-name {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 3px;
  text-align: center;
}

.fmsg-rp-stars {
  color: #f0b429;
  font-size: 13px;
  margin-bottom: 4px;
}

.fmsg-rp-lastseen {
  font-size: 12px;
  color: #9e9e9e;
  text-align: center;
}

.fmsg-rp-property {
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 16px;
}

.fmsg-rp-prop-img {
  width: 100%;
  height: 130px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fde8b4, #f0b429);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.fmsg-rp-prop-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fmsg-rp-prop-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
  line-height: 1.3;
}

.fmsg-rp-prop-price {
  font-size: 15px;
  font-weight: 800;
  color: #f0b429;
  margin-bottom: 4px;
}

.fmsg-rp-prop-loc {
  font-size: 12px;
  color: #9e9e9e;
}

.fmsg-rp-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #9e9e9e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.fmsg-rp-empty {
  font-size: 13px;
  color: #ccc;
  text-align: center;
  padding: 40px 0;
}

.fmsg-rp-role {
  font-size: 12px;
  color: #9e9e9e;
  margin-bottom: 6px;
}

.fmsg-rp-contact-row {
  font-size: 12px;
  color: #555;
  margin-bottom: 3px;
  word-break: break-all;
  text-align: center;
}

.fmsg-rp-prop-type {
  font-size: 11px;
  font-weight: 600;
  color: #f0b429;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 3px;
}

.fmsg-rp-view-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 14px;
  background: #f0b429;
  color: #7c4a00;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}

.fmsg-rp-view-btn:hover { background: #d97706; }

/* Thumbnail in sidebar (photo du bien) */
.fmsg-conv-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fde8b4, #f0b429);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #7c4a00;
  flex-shrink: 0;
  overflow: hidden;
}

.fmsg-conv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fmsg-conv-thumb-init {
  background: linear-gradient(135deg, #fde8b4, #f0b429);
}

/* ====================================================
   RESPONSIVE
   ==================================================== */

@media (max-width: 1100px) {
  .fmsg-interface {
    grid-template-columns: 280px 1fr 240px;
  }
}

@media (max-width: 900px) {
  .fmsg-interface {
    grid-template-columns: 1fr;
    grid-template-rows: 260px 1fr;
    /* navbar: 64px(top only) ; header compact: ~200px → total 264px */
    height: calc(100vh - 264px);
    min-height: 600px;
  }
  .fmsg-right-panel { display: none; }
  .fmsg-reply-send { width: 44px; height: 44px; }
}

@media (max-width: 768px) {
  .fmsg-reply-input,
  .fmsg-group input,
  .fmsg-group select,
  .fmsg-group textarea,
  .fcompte-group input,
  .fcompte-group select { font-size: 16px !important; }

  .fmsg-modal { max-width: calc(100% - 32px); }
  .fmsg-overlay { padding: 16px; }
}

@media (max-width: 600px) {
  .fmsg-row { grid-template-columns: 1fr; }
  .fmsg-modal { border-radius: 20px 20px 0 0; align-self: flex-end; max-width: 100%; }
  .fmsg-overlay { align-items: flex-end; padding: 0; }
  .fmsg-thread { padding: 10px 8px; }
  .fmsg-reply-box { padding: 8px 10px; }
  .fmsg-conv-header { padding: 10px 14px; }
  .fmsg-conv-header-price { display: none; }
  .fmsg-sidebar-header { padding: 12px 14px 8px; }

  /* Mode liste/chat mobile : un seul panneau visible à la fois */
  .fmsg-interface {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 208px);
    min-height: 0;
  }
  .fmsg-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: none;
    border-bottom: none;
    min-height: 0;
  }
  .fmsg-conv-list {
    flex: 1;
    overflow-y: auto;
    max-height: none;
  }
  .fmsg-main {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
  }

  /* Quand une conversation est sélectionnée */
  .fmsg-interface.chat-open .fmsg-sidebar { display: none; }
  .fmsg-interface.chat-open .fmsg-main { display: flex; }

  /* Bouton retour dans le header de la conversation */
  .fmsg-back-btn {
    display: flex !important;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #f59e0b;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 0 8px 0 0;
    flex-shrink: 0;
  }
}

@media (min-width: 601px) {
  .fmsg-back-btn { display: none !important; }
}

@media (max-width: 400px) {
  .fmsg-interface { grid-template-rows: 200px 1fr; }
  .fmsg-bubble { max-width: 85%; }
}

/* ====================================================
   COMPTE PAGE
   ==================================================== */

.fcompte-main {
  min-height: calc(100vh - 72px);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #292524 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 100px 20px 60px;
  position: relative;
}

.fcompte-main::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(ellipse 50% 70% at 50% 40%, rgba(245,158,11,0.1) 0%, transparent 70%);
}

/* ---- Auth card ---- */
.fcompte-auth { position: relative; width: 100%; max-width: 480px; }

.fcompte-card {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 32px 100px rgba(0,0,0,0.4);
}

.fcompte-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.fcompte-logo h1 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #78350f;
}

.fcompte-tabs {
  display: flex;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}

.fcompte-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.fcompte-tab.active {
  background: #fff;
  color: #111827;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.fcompte-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.fcompte-form.hidden { display: none; }

.fcompte-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.fcompte-row > .fcompte-group { min-width: 0; }

.fcompte-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.fcompte-group label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.fcompte-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e7e5e4;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  color: #111827;
  background: #fff;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.fcompte-group select {
  width: 100%;
  padding: 11px 36px 11px 14px;
  border: 1.5px solid #e7e5e4;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  color: #111827;
  background: #fff;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  box-sizing: border-box;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.fcompte-group select:focus { border-color: #f59e0b; }

.fcompte-group input:focus {
  outline: none;
  border-color: #f59e0b;
}

.fcompte-pwd-wrap {
  position: relative;
  display: flex;
}

.fcompte-pwd-wrap input {
  flex: 1;
  padding-right: 40px;
}

.fcompte-toggle-pwd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
}

/* Account type selector */
.fcompte-type-group { display: flex; flex-direction: column; gap: 10px; }

.fcompte-type-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.fcompte-type-btns {
  display: flex;
  gap: 8px;
}

.fcompte-type-btn {
  flex: 1;
  cursor: pointer;
}

.fcompte-type-btn input { display: none; }

.fcompte-type-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border: 1.5px solid #e7e5e4;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
  transition: all 0.2s;
  white-space: nowrap;
}

.fcompte-type-btn input:checked + span {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #78350f;
}

.fcompte-type-btn span:hover { border-color: #f59e0b; }

.fcompte-error {
  color: #ef4444;
  font-size: 13px;
  font-weight: 600;
  min-height: 0;
}

.fcompte-submit {
  padding: 13px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #78350f;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.fcompte-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.35);
}

.fcompte-submit:disabled { opacity: 0.7; cursor: default; }

.fcompte-switch {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.fcompte-link {
  background: none;
  border: none;
  color: #f59e0b;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}

/* ---- Profile ---- */
.fcompte-profile {
  position: relative;
  width: 100%;
  max-width: 760px;
}

.fcompte-profile.hidden { display: none; }

.fcompte-profile-header {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.fcompte-avatar-lg {
  width: 80px;
  height: 80px;
  background: rgba(245,158,11,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
  border: 2px solid rgba(245,158,11,0.3);
}

.fcompte-profile-header h2 {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
}

.fcompte-type-badge {
  display: inline-flex;
  padding: 4px 14px;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  color: #f59e0b;
}

.fcompte-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.fcompte-profile-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.2s;
  display: block;
}

.fcompte-profile-card:hover {
  background: rgba(255,255,255,0.09);
  transform: translateY(-3px);
}

.fcompte-profile-card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.fcompte-profile-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.fcompte-profile-card p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
  line-height: 1.5;
}

.fcompte-profile-link {
  font-size: 13px;
  font-weight: 700;
  color: #f59e0b;
}

.fcompte-logout {
  display: block;
  width: 100%;
  padding: 13px;
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.fcompte-logout:hover { background: rgba(239,68,68,0.2); }

/* hidden utility */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 600px) {
  .fcompte-card { padding: 28px 20px; }
  .fcompte-row { grid-template-columns: 1fr; }
  .fcompte-type-btns { flex-direction: column; }
  .fcompte-profile-grid { grid-template-columns: 1fr; }
  .fcompte-profile-header { flex-direction: column; text-align: center; }
}

/* ====================================================
   PAYWALL MODAL (forfaits)
   ==================================================== */

.fpay-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(10, 20, 40, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fpay-overlay.open {
  opacity: 1;
  visibility: visible;
}

.fpay-modal {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 700px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.32);
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
  position: relative;
  padding: 36px 32px 28px;
}

.fpay-overlay.open .fpay-modal {
  transform: translateY(0) scale(1);
}

.fpay-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: none; border-radius: 50%;
  background: #f3f4f6;
  color: #374151;
  font-size: 20px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.fpay-close:hover { background: #e5e7eb; }

.fpay-header { text-align: center; margin-bottom: 28px; }
.fpay-icon { font-size: 36px; margin-bottom: 10px; }
.fpay-header h2 { font-size: 22px; font-weight: 800; color: #111827; margin: 0 0 6px; }
.fpay-header p  { font-size: 14px; color: #6b7280; margin: 0; }

/* Plans grid */
.fpay-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.fpay-plan {
  border: 2px solid #e5e7eb;
  border-radius: 18px;
  padding: 22px 16px 18px;
  text-align: center;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: default;
}

.fpay-plan.fpay-active {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245,158,11,0.15);
}

/* Gold highlight */
.fpay-gold {
  border-color: #d97706;
  background: linear-gradient(160deg, #fffbeb 0%, #fff 80%);
}

.fpay-plan-badge-top {
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #78350f;
  font-size: 11px; font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.fpay-plan-name {
  font-size: 18px; font-weight: 800;
  color: #111827;
  margin-bottom: 6px;
  margin-top: 4px;
}

.fpay-plan-price {
  font-size: 26px; font-weight: 900;
  color: #1d4ed8;
  margin-bottom: 16px;
  line-height: 1;
}
.fpay-plan-price span {
  font-size: 13px; font-weight: 600;
  color: #6b7280;
}

.fpay-features {
  list-style: none; margin: 0 0 18px; padding: 0;
  text-align: left;
}
.fpay-features li {
  font-size: 13px; padding: 4px 0;
  display: flex; align-items: center; gap: 6px;
}
.fpay-ok { color: #111827; }
.fpay-no { color: #9ca3af; text-decoration: line-through; }

.fpay-btn {
  display: block; width: 100%;
  padding: 11px 12px;
  border: none; border-radius: 12px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  background: #1d4ed8;
  color: #fff;
  transition: background 0.15s, transform 0.1s;
}
.fpay-btn:hover { background: #1e40af; transform: translateY(-1px); }
.fpay-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Gold button */
.fpay-gold .fpay-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #78350f;
}
.fpay-gold .fpay-btn:hover { background: linear-gradient(135deg, #d97706, #b45309); }

/* Argent button */
.fpay-argent .fpay-btn {
  background: #64748b;
}
.fpay-argent .fpay-btn:hover { background: #475569; }

.fpay-note {
  text-align: center; font-size: 12px; color: #9ca3af;
  margin: 0;
}

/* Mobile */
@media (max-width: 600px) {
  .fpay-modal { border-radius: 24px 24px 0 0; padding: 28px 16px 20px; }
  .fpay-overlay { align-items: flex-end; padding: 0; }
  .fpay-plans { grid-template-columns: 1fr; gap: 12px; }
  .fpay-plan { padding: 16px 14px 14px; }
  .fpay-plan-price { font-size: 22px; }
  .fpay-plan-name { font-size: 16px; }
}

/* ====================================================
   OWNER INFO (revealed in contact modal based on forfait)
   ==================================================== */

.fmsg-owner-info {
  margin: 0 24px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 14px 16px;
}

.fmsg-owner-title {
  font-size: 12px; font-weight: 700;
  color: #15803d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.fmsg-owner-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.fmsg-owner-row:last-child { margin-bottom: 0; }

.fmsg-owner-icon { font-size: 16px; }

.fmsg-owner-row a {
  font-size: 14px; font-weight: 600;
  color: #166534;
  text-decoration: none;
}
.fmsg-owner-row a:hover { text-decoration: underline; }

/* ====================================================
   SENDER INFO BADGE (contact modal — logged-in user)
   ==================================================== */

.fmsg-sender-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 24px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 12px 14px;
}

.fmsg-sender-details { min-width: 0; }

.fmsg-sender-name {
  font-size: 14px;
  font-weight: 700;
  color: #1e40af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fmsg-sender-email {
  font-size: 12px;
  color: #3b82f6;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ====================================================
   MODAL CONNEXION REQUISE
   ==================================================== */

.fauth-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(10, 20, 40, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.fauth-overlay.open {
  opacity: 1;
  visibility: visible;
}

.fauth-modal {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 380px;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.28);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.22s ease;
}

.fauth-overlay.open .fauth-modal {
  transform: translateY(0) scale(1);
}

.fauth-icon {
  font-size: 44px;
  margin-bottom: 14px;
}

.fauth-title {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 10px;
}

.fauth-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 28px;
}

.fauth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fauth-btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #78350f;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(245,158,11,0.3);
}

.fauth-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}

.fauth-btn-secondary {
  width: 100%;
  padding: 12px;
  background: #f3f4f6;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.fauth-btn-secondary:hover { background: #e5e7eb; }

@media (max-width: 600px) {
  .fauth-modal { border-radius: 24px 24px 0 0; padding: 32px 20px 24px; }
  .fauth-overlay { align-items: flex-end; padding: 0; }
}
