/* ====================================================================
   MA VILLE — Système visuel unique (23/10/2026)
   --------------------------------------------------------------------
   Une seule source pour les couleurs, les formes, les ombres et les
   mouvements. Chargée en dernier : elle affine l'existant sans rien
   supprimer. Mouvements désactivés si le téléphone demande de réduire
   les animations.
   ==================================================================== */
:root {
  --mv-green-900: #0C5424;
  --mv-green-700: #0C6C3C;
  --mv-green-500: #1E9E5A;
  --mv-mint: #E4FCE4;
  --mv-mint-2: #C9F3D6;
  --mv-gold: #FFC22E;
  --mv-ink: #10202E;
  --mv-muted: #4A5A52;
  --mv-paper: #F2F8F4;
  --mv-radius-lg: 22px;
  --mv-radius: 16px;
  --mv-shadow-sm: 0 1px 3px rgba(12, 84, 36, .10);
  --mv-shadow: 0 8px 22px rgba(12, 84, 36, .12);
  --mv-grad: linear-gradient(135deg, #1E9E5A 0%, #0C5424 100%);
  --mv-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Focus visible, lisible au clavier et au toucher ---------- */
html body :focus-visible {
  outline: 2.5px solid var(--mv-gold);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- Défilement discret ---------- */
html body * { scrollbar-width: thin; scrollbar-color: rgba(12, 84, 36, .25) transparent; }

/* ---------- Discussions : cartes nettes, survol doux ---------- */
html body #my-conversations-list .chat-row {
  transition: background .18s var(--mv-ease), transform .18s var(--mv-ease);
}
html body #my-conversations-list .chat-row:hover { background: rgba(228, 252, 228, .55); }
html body #my-conversations-list .chat-row-avatar-wrap > .chat-row-avatar-img,
html body #my-conversations-list .chat-row-avatar-wrap > .chat-row-avatar {
  transition: transform .2s var(--mv-ease);
}
html body #my-conversations-list .chat-row:active .chat-row-avatar-wrap > * { transform: scale(.96); }

/* ---------- En-tête du tchat : dégradé vert, ombre douce ---------- */
html body :is(#private-chat-modal, #group-chat-modal) .chat-screen-header,
html body :is(#private-chat-modal, #group-chat-modal) .chat-top {
  background: var(--mv-grad) !important;
  box-shadow: 0 6px 18px rgba(12, 84, 36, .22);
}
html body :is(#private-chat-modal, #group-chat-modal) .chat-modal-name,
html body :is(#private-chat-modal, #group-chat-modal) #private-chat-user-name {
  font-weight: 800;
  letter-spacing: .1px;
}

/* ---------- Bulles : rayon net, légère profondeur ---------- */
html body :is(#private-chat-modal, #group-chat-modal) .chat-bubble-user,
html body :is(#private-chat-modal, #group-chat-modal) .chat-bubble-bot {
  box-shadow: var(--mv-shadow-sm);
}
html body:not(.dark-mode) :is(#private-chat-modal, #group-chat-modal) .chat-bubble-user {
  background: var(--mv-mint) !important;
}
html body.dark-mode :is(#private-chat-modal, #group-chat-modal) .chat-bubble-user {
  background: #134B3A !important;
  color: #EAF1F6 !important;
}
html body.dark-mode :is(#private-chat-modal, #group-chat-modal) .chat-bubble-user * {
  color: inherit;
}

/* ---------- Zone de saisie : pilule nette ---------- */
html body :is(#private-chat-modal, #group-chat-modal) .chat-input-flex.mvd-composer .mvd-pill {
  box-shadow: 0 2px 10px rgba(12, 84, 36, .10);
  transition: box-shadow .2s var(--mv-ease), border-color .2s var(--mv-ease);
}
html body :is(#private-chat-modal, #group-chat-modal) .chat-input-flex.mvd-composer .mvd-pill:focus-within {
  border-color: var(--mv-green-500) !important;
  box-shadow: 0 0 0 3px rgba(30, 158, 90, .18);
}

/* ---------- Bouton d'envoi : doré, léger rebond ---------- */
html body :is(#private-chat-modal, #group-chat-modal) .chat-input-flex.mvd-composer > .chat-send-btn {
  transition: transform .15s var(--mv-ease), box-shadow .2s var(--mv-ease);
}
html body :is(#private-chat-modal, #group-chat-modal) .chat-input-flex.mvd-composer > .chat-send-btn:active {
  transform: scale(.92);
}

/* ---------- Écran de bienvenue : dégradé profond ---------- */
html body #mv-welcome-signup .mv-welcome-card,
html body .mv-welcome-card {
  border-radius: var(--mv-radius-lg);
}

/* ---------- Mouvements réduits : respecter le téléphone ---------- */
@media (prefers-reduced-motion: reduce) {
  html body *, html body *::before, html body *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ==================================================================
   ÉCRAN DISCUSSIONS — « Tchat & Rencontres » (23/10/2026)
   Onglets en pilules vertes, lignes en cartes, pastilles vertes pour les
   non-lus, heure discrète. Même fonctionnement qu'avant.
   ================================================================== */
html body #tab-dating .mv-tab-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--mv-green-900);
  margin: 6px 4px 10px;
  letter-spacing: -.2px;
}
html body #tab-dating .chat-subnav {
  display: flex;
  gap: 4px;
  background: var(--mv-mint);
  border-radius: 999px;
  padding: 4px;
  margin: 0 0 12px;
  box-shadow: inset 0 1px 2px rgba(12, 84, 36, .08);
}
html body #tab-dating .chat-subnav-btn {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--mv-green-700);
  font-weight: 800;
  border-radius: 999px;
  padding: 9px 10px;
  transition: background .2s var(--mv-ease), color .2s var(--mv-ease);
}
html body #tab-dating .chat-subnav-btn.active {
  background: var(--mv-grad);
  color: #fff;
  box-shadow: 0 4px 12px rgba(12, 84, 36, .25);
}
html body #my-conversations-list .chat-row {
  background: #fff;
  border-radius: 18px;
  padding: 12px 14px;
  margin: 8px 0;
  box-shadow: var(--mv-shadow-sm);
  border: 1px solid rgba(12, 84, 36, .06);
  align-items: center;
}
html body #my-conversations-list .chat-row:hover { background: #fff; box-shadow: var(--mv-shadow); }
html body #my-conversations-list .chat-row-time {
  font-size: 12px;
  color: var(--mv-muted);
  font-weight: 600;
}
html body #my-conversations-list .chat-unread-badge {
  background: var(--mv-green-500);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  min-width: 22px;
  height: 22px;
  line-height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(30, 158, 90, .35);
}
html body.dark-mode #my-conversations-list .chat-row { background: #13231A; border-color: rgba(255,255,255,.05); }
html body.dark-mode #tab-dating .chat-subnav { background: #13231A; }
html body.dark-mode #tab-dating .chat-subnav-btn { color: #9FD9B5; }
html body.dark-mode #tab-dating .mv-tab-title { color: #E4FCE4; }

/* ---------- À la une (accueil) en mode sombre ---------- */
html body.dark-mode .mv-alaune {
  background: #13231A;
  border-color: rgba(255,255,255,.08);
  color: #EAF1F6;
}
html body.dark-mode .mv-alaune h2,
html body.dark-mode .mv-alaune h3 { color: #E4FCE4; }
html body.dark-mode .mv-alaune .mva1-info {
  background: #1A2E22;
  border-color: rgba(255,255,255,.10);
}
html body.dark-mode .mv-alaune .mva1-info-body,
html body.dark-mode .mv-alaune .mva1-info-t b,
html body.dark-mode .mv-alaune .mva1-cap { color: #EAF1F6; }
html body.dark-mode .mv-alaune .mva1-info-t small,
html body.dark-mode .mv-alaune .mva1-vid small,
html body.dark-mode .mv-alaune .mva1-ad small { color: #9FB3C2; }
html body.dark-mode .mv-alaune .mva1-info-body a { color: #8CC8FF; }
html body.dark-mode .mv-alaune .mva1-thumb { background-color: #2A3A48; }

/* ---------- Liste des discussions façon WhatsApp (capture de référence) ---------- */
#my-conversations-list { background: transparent; }
#my-conversations-list .chat-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px 11px 12px;
  margin: 0; border: 0; border-radius: 0;
  border-bottom: 1px solid rgba(12,84,36,.10);
  background: #FFFFFF; box-shadow: none;
}
#my-conversations-list .chat-row:active { background: #E4FCE4; }
#my-conversations-list .chat-row-avatar-wrap { flex: 0 0 auto; width: 54px; height: 54px; }
#my-conversations-list .chat-row-avatar-wrap > .chat-row-avatar-img {
  width: 54px !important; height: 54px !important; border-radius: 50% !important;
  object-fit: cover; box-shadow: 0 0 0 2px var(--mv-green-500); 
}
#my-conversations-list .chat-row-body { flex: 1 1 auto; min-width: 0; }
#my-conversations-list .chat-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#my-conversations-list .chat-row-name { font-size: 16px; font-weight: 700; color: var(--mv-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#my-conversations-list .chat-row-time { font-size: 12px; color: var(--mv-muted); flex: 0 0 auto; }
#my-conversations-list .chat-row-preview { font-size: 14px; color: var(--mv-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
#my-conversations-list .chat-row-unread .chat-row-name { color: var(--mv-green-900); }
#my-conversations-list .chat-unread-badge { background: var(--mv-green-500); color: #fff; font-weight: 700; border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }

body.dark-mode #my-conversations-list .chat-row { background: #0B1A12; border-bottom-color: rgba(255,255,255,.07); }
body.dark-mode #my-conversations-list .chat-row:active { background: #13231A; }
body.dark-mode #my-conversations-list .chat-row-name { color: #E9EDEF; }
body.dark-mode #my-conversations-list .chat-row-unread .chat-row-name { color: #E4FCE4; }
body.dark-mode #my-conversations-list .chat-row-time,
body.dark-mode #my-conversations-list .chat-row-preview { color: #8696A0; }
body.dark-mode #my-conversations-list .chat-row-avatar-wrap > .chat-row-avatar-img { box-shadow: 0 0 0 2px #1E9E5A; }

/* ---------- Cadre publicitaire de l'accueil : mêmes dimensions que « Le Pouls de votre Quartier » ---------- */
html body .ad-carousel-wrap { margin-left: -12px !important; margin-right: -12px !important; padding-left: 0 !important; padding-right: 0 !important; }
html body .ad-carousel { width: 100% !important; height: 176px !important; border-radius: 22px !important; overflow: hidden !important; }
html body .ad-carousel .ad-slide { height: 100% !important; border-radius: 22px !important; }
