@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --paper: #F7F8FC;
  --ink: #1C1F2E;
  --ink-soft: #666C88;
  --primary: #4A5FE8;
  --primary-soft: #EEF0FD;
  --line: #E4E7F5;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  background-image:
    linear-gradient(rgba(247,248,252,0.55), rgba(247,248,252,0.55)),
    url('background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 380px; height: 380px;
  background: rgba(74, 95, 232, 0.08);
  top: -100px; left: -120px;
  animation: drift-a 18s ease-in-out infinite;
}
body::after {
  width: 320px; height: 320px;
  background: rgba(74, 95, 232, 0.06);
  bottom: -80px; right: -100px;
  animation: drift-b 20s ease-in-out infinite;
}
@keyframes drift-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, 40px); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, -30px); }
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
header { position: relative; z-index: 1; }
.ticker { position: relative; z-index: 1; }

/* ---------- En-tête : logo miroir ---------- */
header { padding: 30px 0 24px; }
.brand { display: flex; justify-content: space-between; align-items: center; }
.brand-mark { display: flex; align-items: center; gap: 18px; flex-wrap: nowrap; }

.brand-mark .mirror-icon { display: block; width: 58px; height: 58px; flex-shrink: 0; }

.brand-mark strong {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 4.2rem;
  color: var(--ink);
  letter-spacing: 0.01em;
  display: block;
}
.brand-text-wrap { line-height: 1; position: relative; }
.brand-text-wrap .reflection {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  transform: scaleY(-1);
  transform-origin: top;
  margin-top: 2px;
  opacity: 0.16;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 85%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 85%);
  animation: ripple 4.5s ease-in-out infinite;
}
@keyframes ripple {
  0%, 100% { transform: scaleY(-1) skewX(0deg); opacity: 0.16; }
  50% { transform: scaleY(-1) skewX(1.8deg); opacity: 0.1; }
}

/* ---------- Bandeau défilant ---------- */
.ticker {
  overflow: hidden;
  background: rgba(74, 95, 232, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px 0;
  margin-bottom: 30px;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 22s linear infinite;
}
.ticker-track span {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--white);
  text-shadow: 0 1px 3px rgba(28, 31, 46, 0.5);
  white-space: nowrap;
  padding-right: 40px;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

#userPill {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--line);
  border-radius: 100px;
  padding: 8px 16px;
  background: var(--white);
  color: var(--ink-soft);
  display: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
#userPill.show:hover { border-color: var(--primary); color: var(--primary); }
#userPill.show::after { content: ' · quitter'; opacity: 0.6; font-weight: 400; }
#userPill.show { display: inline-block; }

/* ---------- Titres ---------- */
h1, h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 1.9rem;
  color: var(--ink);
  margin: 6px 0 10px;
}
.tagline {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 0 30px;
  max-width: 50ch;
}

/* ---------- Onglets ---------- */
.tabs {
  display: inline-flex;
  gap: 2px;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 28px;
}
.tab-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 10px 4px;
  margin-right: 22px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  position: relative;
  top: 1.5px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab-btn.active { color: var(--ink); border-bottom-color: var(--primary); }

/* ---------- Panneaux ---------- */
.panel {
  background: var(--white);
  border-radius: 18px;
  border: 1.5px solid var(--line);
  padding: 30px;
  margin-bottom: 40px;
}

.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 0.96rem;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
}
.form-row textarea { resize: vertical; min-height: 70px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: -6px 0 16px;
}

.photo-picker { display: flex; align-items: center; gap: 14px; }
.photo-preview {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 1.5px dashed var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--primary);
  font-size: 1.3rem;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-picker input[type="file"] {
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--primary-soft);
}
.avatar.avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  background: var(--primary);
}

.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 26px;
  border: none;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s ease, background 0.15s ease;
}
.btn:hover { background: var(--primary); }
.btn:active { transform: scale(0.98); }
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: scale(0);
  animation: ripple-out 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple-out {
  to { transform: scale(3); opacity: 0; }
}

.error-msg {
  margin-top: 14px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #D64545;
  display: none;
}
.error-msg.show { display: block; }

/* ---------- Fiches homonymes ---------- */
#matchList { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }

.match-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.match-card > div { flex: 1; min-width: 0; }
.match-card:hover { border-color: var(--primary); }
.match-card.active { border-color: var(--primary); background: var(--primary-soft); }
.match-card { transform-style: preserve-3d; will-change: transform; }

.match-card .field-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.new-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 100px;
  margin-left: 6px;
  vertical-align: middle;
  animation: badge-pulse 1.6s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ---------- Titre de discussion ---------- */
.chat-sub-message {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
  white-space: pre-line;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}
.chat-title-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 8px;
  vertical-align: middle;
  animation: badge-pulse 1.6s ease-in-out infinite;
}
.match-card .field-value {
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 1px 0 4px;
}
.match-card .field-message {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 10px;
  white-space: pre-line;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.empty-state {
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  padding: 26px;
  font-size: 0.94rem;
  color: var(--ink-soft);
  background: var(--white);
}

.danger-zone { margin-top: 22px; text-align: center; }
.confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
  max-width: 360px;
  margin: 0 auto 10px;
  cursor: pointer;
  text-align: left;
}
.confirm-check input { margin-top: 2px; accent-color: var(--primary); }
.link-danger {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
  padding: 8px;
}
.link-danger:hover { color: #D64545; }
.link-danger:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: none; }

/* ---------- Aperçu agrandi des avatars ---------- */
.avatar-zoom {
  position: fixed;
  z-index: 300;
  pointer-events: none;
  animation: fade-in 0.15s ease both;
}
.avatar-zoom .avatar-zoom-img {
  width: 140px !important;
  height: 140px !important;
  border-radius: 50%;
  box-shadow: 0 20px 50px -15px rgba(28, 31, 46, 0.5), 0 0 0 4px var(--white);
  font-size: 2.8rem !important;
}

/* ---------- Chat ---------- */
.chat-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  margin-bottom: 18px;
  padding-right: 4px;
}
.msg-row { display: flex; align-items: flex-end; gap: 8px; max-width: 82%; }
.msg-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.theirs { align-self: flex-start; }
.msg-row .avatar { width: 42px; height: 42px; font-size: 1rem; }

.msg {
  max-width: 100%;
  padding: 10px 15px;
  font-size: 0.92rem;
  border-radius: 14px;
  line-height: 1.5;
}
.msg.mine { background: var(--primary); color: var(--white); border-bottom-right-radius: 4px; }
.msg.theirs { background: var(--primary-soft); color: var(--ink); border-bottom-left-radius: 4px; }
.msg-image {
  max-width: 220px;
  border-radius: 12px;
  display: block;
  cursor: zoom-in;
}
.msg-image + .msg-text { margin-top: 8px; }

.chat-form { display: flex; gap: 10px; align-items: center; }
.attach-btn {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 100px;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.attach-btn:hover { background: var(--line); }

.chat-image-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-soft);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.chat-image-preview img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.chat-image-preview button {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.chat-image-preview button:hover { color: #D64545; }
.chat-form input {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 0.94rem;
  padding: 11px 16px;
  border: 1.5px solid var(--line);
  border-radius: 100px;
  background: var(--paper);
}
.chat-form input:focus { outline: none; border-color: var(--primary); }

.hidden { display: none !important; }

footer {
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding: 24px 0 48px;
  margin-top: 20px;
  border-top: 1.5px solid var(--line);
}
footer code {
  background: var(--primary-soft);
  border-radius: 6px;
  padding: 2px 6px;
}
footer a { color: var(--ink-soft); text-decoration: underline; }
footer a:hover { color: var(--primary); }

/* ---------- Animations, sobres ---------- */
#authSection:not(.hidden),
#dashSection:not(.hidden),
#chatSection:not(.hidden) { animation: fade-in 0.35s ease both; }
.panel:not(.hidden) { animation: fade-in 0.3s ease both; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.match-card {
  animation: fade-in 0.35s ease both;
  animation-delay: calc(var(--i, 0) * 0.05s);
}

.msg-row.msg-new { animation: msg-in 0.25s ease both; }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Fenêtres de confirmation personnalisées ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 31, 46, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: fade-in 0.2s ease both;
}
.modal-box {
  background: var(--white);
  border-radius: 16px;
  padding: 26px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 50px -20px rgba(28, 31, 46, 0.4);
}
.modal-box h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0 0 10px;
  color: var(--ink);
}
.modal-box p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.modal-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}
.modal-cancel { background: var(--primary-soft); color: var(--ink-soft); }
.modal-cancel:hover { background: var(--line); }
.modal-confirm { background: var(--ink); color: var(--white); }
.modal-confirm:hover { background: var(--primary); }

/* ---------- Toast (alerte en direct) ---------- */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 100px;
  box-shadow: 0 14px 30px -12px rgba(28, 31, 46, 0.5);
  z-index: 200;
  animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.toast::before { content: '✦ '; color: var(--primary-soft); }
.toast.toast-out { animation: toast-out 0.3s ease both; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-14px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(-14px); }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }

  .brand-mark { gap: 10px; }
  .brand-mark .mirror-icon { width: 32px; height: 32px; }
  .brand-mark strong { font-size: 1.9rem; }

  #userPill { font-size: 0.72rem; padding: 6px 12px; }

  h1, h2 { font-size: 1.4rem; }
  .tagline { font-size: 0.9rem; margin-bottom: 22px; }

  .ticker-track span { font-size: 0.68rem; }

  .panel { padding: 20px; }
  .two-col { grid-template-columns: 1fr; gap: 0; }

  .btn { padding: 12px 20px; font-size: 0.88rem; }

  .match-card { padding: 14px 16px; gap: 12px; }
  .match-card .field-value { font-size: 1rem; }

  .chat-body { max-height: 50vh; }
  .msg-row { max-width: 92%; }
  .msg-image { max-width: 65vw; }

  .chat-form { flex-wrap: wrap; }
  .attach-btn { width: 36px; height: 36px; font-size: 1rem; }

  .toast {
    left: 12px;
    right: 12px;
    transform: none;
    text-align: center;
    font-size: 0.8rem;
  }
  @keyframes toast-in {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-14px); }
  }

  .modal-box { padding: 20px; }

  /* L'aperçu agrandi au survol n'a pas de sens au toucher : on le désactive */
  .avatar-zoom { display: none !important; }

  .hero-chip { padding: 8px 12px; font-size: 0.74rem; }
  .hero-strip-track { gap: 6px; }
}
/* ---------- Statut en ligne ---------- */
.avatar-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #2ecc71;
  border: 2px solid #ffffff;
  border-radius: 50%;
}
.status-online {
  color: #2ecc71;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-offline {
  color: var(--ink-soft, #999);
  font-size: 0.75rem;
  font-weight: 500;
}

/* ---------- En-tête du chat : photo + statut dessous, nom à côté ---------- */
.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.chat-header-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.chat-header-status {
  margin-top: 4px;
  text-align: center;
}
.chat-header-text {
  flex: 1;
}

/* ---------- Salon de groupe : nom de l'expéditeur au-dessus du message ---------- */
.msg-sender {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand, #4A5FE8);
  margin-bottom: 2px;
}

/* ---------- Icône du bouton Salon de groupe, agrandie ---------- */
.group-chat-icon {
  font-size: 1.5rem;
  vertical-align: middle;
  margin-right: 4px;
}
.group-chat-subtitle {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.75;
  margin-top: 2px;
}

/* ---------- Bloc nom utilisateur + retour au chat, sous l'en-tête ---------- */
.header-user-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
#backToChatBtn {
  cursor: pointer;
}
/* ---------- Barre d'onglets du bas ---------- */
.bottom-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  background: #fff;
  border-top: 1.5px solid var(--line, #E4E7F5);
  padding: 4px 0 max(4px, env(safe-area-inset-bottom, 0px));
}
.nav-btn {
  flex: 0 1 92px;
  padding: 3px 0;
}
/* Pied de page moins haut */
footer {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Pousse la barre d'onglets tout en bas de la page, juste au-dessus du
   pied de page, quelle que soit la quantité de contenu au-dessus. */
body:has(#bottomNav:not(.hidden)) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body:has(#bottomNav:not(.hidden)) > .wrap {
  flex: 1;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  padding: 6px 0;
  cursor: pointer;
}
.nav-icon {
  font-size: 1.3rem;
}
.nav-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-soft, #666C88);
}
.nav-btn.nav-btn-active .nav-label {
  color: var(--brand, #4A5FE8);
}

/* ---------- Page Mon profil ---------- */
.profile-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}
.profile-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink, #1C1F2E);
  margin-top: 12px;
}
.profile-loc {
  font-size: 0.85rem;
  color: var(--ink-soft, #666C88);
  margin-top: 4px;
}
.profile-msg {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-soft, #666C88);
  margin-top: 10px;
}
.profile-full-btn {
  width: 100%;
  box-sizing: border-box;
}
.secondary-btn {
  border: 1.5px solid var(--line, #E4E7F5);
  background: #fff;
  color: var(--ink, #1C1F2E);
  border-radius: 10px;
  padding: 15px;
  font-weight: 700;
  font-size: 15px;
  margin-top: 12px;
  cursor: pointer;
}
/* ---------- Fond de page : essai en blanc, sans photo ---------- */
html, body {
  background-image: none !important;
  background-color: #FFFFFF !important;
}

/* ---------- Logo "mondoublon" en lettres standard ---------- */
.brand-text-wrap strong {
  font-family: inherit !important;
  font-style: italic !important;
  font-weight: 600 !important;
  font-size: 46px !important;
  color: var(--ink, #1C1F2E) !important;
  letter-spacing: normal !important;
  text-shadow: none !important;
  filter: none !important;
}

/* ---------- Texte du bandeau défilant, plus lisible ---------- */
.ticker, .ticker-track, .ticker span {
  color: var(--ink, #1C1F2E) !important;
}

/* ---------- Pied de page, sur une seule ligne et plus petit ---------- */
footer {
  font-size: 0.72rem;
  line-height: 1.6;
}
footer a {
  font-size: inherit;
}

#profileSection .danger-zone {
  border: 2px solid #D64545;
  border-radius: 14px;
  padding: 16px;
  background: rgba(214, 69, 69, 0.05);
}
.danger-zone-title {
  color: #D64545;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

/* ---------- Page de connexion : bandeau remonté, onglets descendus ---------- */
/* Uniquement quand la section de connexion est affichée (pas sur les
   autres pages), pour ne rien changer ailleurs. */
body:has(#authSection:not(.hidden)) header {
  padding-bottom: 4px;
}
body:has(#authSection:not(.hidden)) .hero-strip {
  margin-top: 0;
}

/* ---------- Rangée de badges modernes (remplace le bandeau défilant) ---------- */
.hero-strip {
  padding: 4px 20px 14px;
}
.hero-strip-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  background: var(--brand-soft, #EEF0FD);
  color: var(--brand, #4A5FE8);
  border-radius: 100px;
  padding: 11px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}
body:has(#authSection:not(.hidden)) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body:has(#authSection:not(.hidden)) > .wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
}
body:has(#authSection:not(.hidden)) #authSection {
  display: flex;
  flex-direction: column;
  flex: 1;
}
body:has(#authSection:not(.hidden)) #authSection .tabs {
  margin-top: auto;
}

/* ---------- Contenu explicatif de la page d'accueil (visible avant connexion) ---------- */
.info-block { margin-top: 40px; padding-bottom: 20px; }
.info-block h2 { margin-top: 28px; }
.info-block p, .info-block li { color: var(--ink-soft); font-size: 0.95rem; }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 10px; }
.steps strong { color: var(--ink); }
.faq-item {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.faq-item p { margin: 10px 0 2px; }

/* ---------- Bouton "Inviter un homonyme" ---------- */
.share-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--primary);
  background: var(--primary-soft);
  border: none;
  border-radius: 100px;
  padding: 10px 18px;
  margin: 4px 0 16px;
  cursor: pointer;
}
.share-btn:hover { background: var(--line); }

/* ---------- Conditions d'utilisation à l'inscription ---------- */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0 0 16px;
  cursor: pointer;
}
.terms-check input { margin-top: 3px; accent-color: var(--primary); }
.terms-check a { color: var(--primary); }

/* ---------- Signaler / bloquer ---------- */
.chat-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.chat-actions { display: flex; gap: 4px; }
.msg-menu-btn {
  align-self: center;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.msg-menu-btn:hover { background: var(--primary-soft); color: var(--primary); }
.modal-actions.stacked { flex-direction: column; align-items: stretch; }
.modal-btn.modal-danger { background: #D64545; color: var(--white); }
.modal-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.reason-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 20px; }
.reason-option { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; color: var(--ink); cursor: pointer; }
.reason-option input { accent-color: var(--primary); }

/* ---------- Personnes bloquées (Mon profil) ---------- */
.blocked-box { margin-top: 28px; }
.blocked-title { font-weight: 700; font-size: 0.85rem; color: var(--ink); margin-bottom: 8px; }
.blocked-empty { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.blocked-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 8px 14px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--ink);
}

/* Bouton « Afficher / Masquer » dans un champ mot de passe */
.pw-wrap { position: relative; }
.form-row .pw-wrap input { padding-right: 92px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--primary);
  cursor: pointer;
}
.pw-toggle:hover { text-decoration: underline; }
.pw-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Drapeau de signalement en haut d'une conversation : plus grand et plus facile à toucher */
#chatMenuBtn { font-size: 1.9rem; line-height: 1; padding: 4px 10px; text-decoration: none; border-radius: 10px; }
#chatMenuBtn:hover { background: var(--primary-soft); }
