/* Nosvoisons - feuille de style de l'application */
:root {
  --brand: #2563EB;
  --brand-dark: #1E3A8A;
  --brand-soft: #EEF4FF;
  --ink: #0F172A;
  --ink-soft: #475569;
  --ink-mute: #7C8798;
  --line: #E3E9F2;
  --bg: #F3F6FC;
  --card: #FFFFFF;
  --ok: #059669;
  --warn: #D97706;
  --danger: #DC2626;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 14px 40px rgba(15, 23, 42, 0.12);
  --nav-h: 66px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p { margin: 0 0 10px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-mute); }
.soft { color: var(--ink-soft); }
.small { font-size: 13px; }
.center { text-align: center; }
.spacer { flex: 1; }

/* ---------- Logo ---------- */
.brandmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brandmark .glyph {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--brand) 0%, #4F86F7 55%, var(--brand-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.brandmark .glyph svg { width: 22px; height: 22px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  background: var(--brand);
  color: #fff;
  text-align: center;
}
.btn:hover { background: #1D4FD7; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-ghost { background: #fff; color: var(--brand); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn-soft:hover { background: #DFE9FF; }
.btn-dark { background: var(--ink); }
.btn-dark:hover { background: #1E293B; }
.btn-danger { background: #FEECEC; color: var(--danger); }
.btn-danger:hover { background: #FBD9D9; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 13px; font-size: 13.5px; border-radius: 11px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Cartes ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card + .card { margin-top: 14px; }
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.badge-don { background: #E9F7EF; color: #047857; }
.badge-recherche { background: #FFF4E5; color: #B45309; }
.badge-service { background: #EDF0FF; color: #4338CA; }
.badge-vente { background: #FEECEC; color: #B91C1C; }
.badge-info { background: #EEF4FF; color: #1D4ED8; }
.badge-mute { background: #F1F5F9; color: #475569; }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
textarea { resize: vertical; min-height: 92px; }
.hint { font-size: 12.5px; color: var(--ink-mute); margin-top: 5px; }

.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.alert svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.alert-error { background: #FEECEC; color: #991B1B; }
.alert-ok { background: #E9F7EF; color: #065F46; }
.alert-info { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- Ecran d'authentification ---------- */
.auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 520px at 50% -12%, #DCE7FF 0%, rgba(243, 246, 252, 0) 62%),
    var(--bg);
  padding: 0 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0px));
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 4px;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
}
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 20px;
}
.auth-box {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 24px 20px 22px;
}
.auth-box h1 { font-size: 23px; margin-bottom: 4px; }
.auth-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 18px; }
.auth-switch {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}
.auth-switch a { font-weight: 650; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--ink-mute); padding-top: 14px; }

.ribbon {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--brand-soft);
  border: 1px solid #D8E4FF;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13px;
  color: var(--brand-dark);
  margin-bottom: 16px;
}
.ribbon svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---------- Barre de navigation basse ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(226, 232, 240, .9);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, .06);
}
.tabbar .tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  color: var(--ink-mute);
  font-size: 11px;
  font-weight: 650;
  transition: transform .12s ease, background .18s ease, color .18s ease;
  padding: 4px 2px;
}
.tabbar .tab svg { width: 22px; height: 22px; }
.tabbar .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar .tab:active { transform: scale(.97); }
.tabbar .tab.active { color: var(--brand-dark); background: var(--brand-soft); }

.page-with-tabbar { padding-bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom, 0px)); }

/* ---------- En-tete d'application ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.appbar-row { display: flex; align-items: center; gap: 10px; max-width: 1120px; margin: 0 auto; }
.appbar .brandmark { font-size: 17px; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 auto;
}

/* ---------- Divers ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s ease;
  z-index: 200;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }

.empty {
  text-align: center;
  padding: 34px 18px;
  color: var(--ink-mute);
}
.empty svg { width: 34px; height: 34px; margin-bottom: 10px; opacity: .55; }

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  z-index: 150;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  max-height: 92vh;
  overflow-y: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.modal-head h2 { margin: 0; font-size: 19px; }
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-soft);
  transition: transform .12s ease, background .18s ease;
}
.icon-btn:active { transform: scale(.97); }
.icon-btn svg { width: 18px; height: 18px; }

.loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 26px; color: var(--ink-mute); font-size: 14px; }
.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Ecran d'ouverture ---------- */
#app-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #2563EB;
  color: #fff;
}
#app-splash img { width: 96px; height: 96px; border-radius: 24px; }
#app-splash .splash-name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
#app-splash.show { display: flex; animation: splashOut .4s ease 1.2s forwards; }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }

/* ---------- Bloc installation ---------- */
.install-row { display: flex; flex-direction: column; gap: 10px; }
.store-icons { display: flex; align-items: center; gap: 14px; }
.store-icons svg { width: 26px; height: 26px; }
.steps-list { margin: 0; padding-left: 20px; font-size: 14px; color: var(--ink-soft); }
.steps-list li { margin-bottom: 6px; }

/* ---------- Accueil public ---------- */
.hero {
  position: relative;
  min-height: 470px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, .28) 0%, rgba(15, 23, 42, .72) 58%, rgba(15, 23, 42, .88) 100%);
}
.hero-content {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 18px 30px;
  color: #fff;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .34);
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 14px;
}
.hero-content h1 { font-size: 29px; color: #fff; margin-bottom: 10px; }
.hero-content p { color: rgba(255, 255, 255, .92); font-size: 15.5px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-actions .btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .5); }
.hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, .26); }

.band { background: #fff; border-bottom: 1px solid var(--line); padding: 18px 0; }
.band-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 0; }
.stats-band { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: var(--bg); border-radius: var(--radius-sm); padding: 14px 12px; text-align: center; }
.stat strong { display: block; font-size: 22px; color: var(--brand-dark); letter-spacing: -0.02em; }
.stat span { font-size: 12.5px; color: var(--ink-mute); }

.section { padding: 30px 16px; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.eyebrow {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand);
  margin-bottom: 8px;
}
.center-block { text-align: center; }
.center-block.eyebrow { margin-bottom: 6px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 14px; }

.check-list { list-style: none; margin: 0 0 20px; padding: 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; color: var(--ink-soft); font-size: 14.5px; }
.check-list svg { width: 18px; height: 18px; color: var(--ok); flex: 0 0 auto; margin-top: 2px; }

.split { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-height: 380px; object-fit: cover; }

.steps-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 22px; }
.step-card { background: var(--bg); border-radius: var(--radius); padding: 20px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  margin-bottom: 10px;
}
.step-card h3 { margin-bottom: 6px; }
.step-card p { margin: 0; font-size: 14.5px; }

.install-card { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: center; }
.install-card h2 { font-size: 21px; }
.install-cta { margin: 14px 0 4px; }
.install-block { margin-top: 14px; }
.install-os { display: flex; align-items: center; gap: 8px; font-weight: 650; margin-bottom: 8px; }
.install-os svg { width: 20px; height: 20px; color: var(--ink); }

/* ---------- Cartes d'annonces ---------- */
.ad-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.ad-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ad-card.ad-mine { box-shadow: 0 0 0 2px #D6E2FF, var(--shadow); }
.ad-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #E8EEF7; }
.ad-img-empty { display: flex; align-items: center; justify-content: center; color: #9AA7BC; }
.ad-img-empty svg { width: 42px; height: 42px; }
.ad-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ad-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ad-price { font-size: 12.5px; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; }
.ad-card h3 { font-size: 16.5px; margin: 0; }
.ad-text { font-size: 14px; color: var(--ink-soft); margin: 0; }
.ad-place { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-mute); margin: 0; }
.ad-place svg { width: 15px; height: 15px; }
.ad-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.ad-author { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.ad-time { font-size: 12px; color: var(--ink-mute); margin-left: auto; }
.ad-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- Espace voisin ---------- */
.app-main { padding: 18px 16px; }
.view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.view-head h1 { font-size: 22px; margin-bottom: 4px; }
.view-head .eyebrow { margin-bottom: 2px; }
.app-link { font-size: 13.5px; font-weight: 650; color: var(--ink-soft); }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.search-box { position: relative; flex: 1; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-mute); }
.search-box .input { padding-left: 38px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  transition: transform .12s ease, background .18s ease, color .18s ease;
}
.chip:active { transform: scale(.97); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Chat */
.chat-wrap {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: calc(100dvh - 268px - env(safe-area-inset-bottom, 0px));
  min-height: 320px;
}
.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F7F9FD;
}
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-form .input { flex: 1; min-width: 0; }
.chat-form .btn { padding: 13px 16px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg-body { background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); flex: 1; min-width: 0; }
.msg.mine .msg-body { background: var(--brand-soft); }
.msg-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 4px; }
.msg-head strong { font-size: 14px; }
.msg-appt { font-size: 11.5px; color: var(--ink-mute); }
.msg-time { font-size: 11.5px; color: var(--ink-mute); margin-left: auto; }
.msg-del {
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  border-radius: 8px;
  transition: transform .12s ease;
}
.msg-del:active { transform: scale(.97); }
.msg-del svg { width: 15px; height: 15px; }
.msg-text { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }

/* Annuaire */
.member-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.member { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.member-body { flex: 1; min-width: 0; }
.member-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.member-body p { margin: 0 0 6px; }
.member-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.member-tel { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 650; }
.member-tel svg { width: 16px; height: 16px; }

/* Profil */
.profile-card { display: flex; align-items: center; gap: 14px; }
.profile-card h2 { margin: 0 0 2px; font-size: 19px; }
.profile-card p { margin: 0; }
.avatar-lg { width: 58px; height: 58px; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.photo-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.photo-preview img { width: 96px; height: 72px; object-fit: cover; border-radius: 12px; }

/* ---------- Pied de page ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 26px 0 30px; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.footer-links a { color: var(--ink-soft); }
.footer-bottom { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

@media (min-width: 640px) {
  .stats-band { grid-template-columns: repeat(4, 1fr); }
  .ad-grid { grid-template-columns: repeat(2, 1fr); }
  .member-list { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  body { font-size: 15.5px; }
  .auth-box { padding: 32px 30px 28px; }
  .modal { border-radius: 22px; margin-bottom: 24px; }
  .modal-back { align-items: center; }
  .hero { min-height: 540px; }
  .hero-content { padding: 40px 24px 46px; }
  .hero-content h1 { font-size: 40px; }
  .section { padding: 44px 16px; }
  .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .split { grid-template-columns: 1.05fr 1fr; gap: 34px; }
  .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .install-card { grid-template-columns: 1.4fr 1fr; }
  .app-main { padding: 24px 16px; }
  .view-head h1 { font-size: 26px; }
  .chat-wrap { height: calc(100dvh - 300px); }
  .footer-inner { grid-template-columns: 1.2fr 2fr; align-items: start; }
  .footer-links { justify-content: flex-end; }
}

@media (min-width: 1024px) {
  .ad-grid { grid-template-columns: repeat(3, 1fr); }
  .member-list { grid-template-columns: repeat(3, 1fr); }
  .tabbar { display: none; }
  .page-with-tabbar { padding-bottom: 0; }
  .auth-wrap { padding-bottom: 28px; }
  .chat-wrap { height: 620px; }
}

/* ---------- Ajustements de robustesse sur petits ecrans ---------- */
.appbar-row { min-width: 0; }
.appbar .brandmark { min-width: 0; }
.appbar .brandmark > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.view-head > div { min-width: 0; }
.ad-foot { flex-wrap: wrap; }
.ad-author { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-head strong { min-width: 0; overflow-wrap: anywhere; }
.hint, .ad-text, .msg-text, .member-body p { overflow-wrap: anywhere; }
