/* Snug — Cocon sur mesure. Toutes les couleurs passent par ces variables. */
:root {
  --prune: #4A2545;
  --prune-ink: #3A1F3D;
  --prune-mute: #7A5C70;
  --abricot: #F6A96B;
  --peche: #F7DCCB;
  --creme: #FFF4EC;
  --blanc: #FFFFFF;
  --ligne: #E7CDBE;
  --danger: #B3261E;
  --font-title: 'Bricolage Grotesque', 'Poppins', system-ui, sans-serif;
  --font-body: 'Manrope', 'Poppins', system-ui, sans-serif;
  --radius-pill: 999px;
  --radius-card: 20px;
  --ruler: repeating-linear-gradient(90deg, var(--prune) 0 2px, transparent 2px 14px) 12px 0 / calc(100% - 24px) 8px no-repeat, var(--abricot);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--peche);
  color: var(--prune-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#root { min-height: 100%; display: flex; justify-content: center; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--prune); font-weight: 700; }
:focus-visible { outline: 3px solid var(--abricot); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* L'appli occupe un écran de téléphone ; sur ordinateur elle est centrée. */
.app {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  background: var(--creme);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px rgba(74, 37, 69, 0.06);
}
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: max(20px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
}
.spacer { flex: 1; }

/* Barre du haut : retour + progression */
.topbar { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  border: none; border-radius: var(--radius-pill);
  background: var(--blanc); color: var(--prune);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:disabled { visibility: hidden; }
.progress { flex: 1; height: 6px; border-radius: 6px; background: var(--peche); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 6px; background: var(--prune); transition: width .3s ease; }
.step-count { font-size: 13px; font-weight: 700; color: var(--prune-mute); min-width: 34px; text-align: right; }

/* Titres */
.title { margin: 0; font-family: var(--font-title); font-weight: 700; font-size: 34px; line-height: 1.08; letter-spacing: -0.02em; }
.subtitle { margin: 10px 0 0; font-size: 15px; line-height: 1.45; color: var(--prune-mute); }
.label { font-size: 15px; font-weight: 700; margin: 0 0 10px; display: block; }

/* Boutons */
.btn {
  height: 56px; width: 100%;
  border: none; border-radius: var(--radius-pill);
  background: var(--prune); color: var(--blanc);
  font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity .15s ease, transform .1s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn.abricot { background: var(--abricot); color: var(--prune); font-weight: 800; }
.btn.light { background: var(--blanc); color: var(--prune-ink); border: 1.5px solid var(--ligne); }
.btn-link { height: 48px; border: none; background: transparent; color: var(--prune); font-weight: 700; font-size: 15px; width: 100%; }
.actions { display: flex; flex-direction: column; gap: 8px; }

/* Choix */
.options { display: flex; flex-direction: column; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.option {
  min-height: 56px; padding: 12px 20px;
  border-radius: var(--radius-card); border: 1.5px solid var(--ligne);
  background: var(--blanc); color: var(--prune-ink);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  text-align: left; font-weight: 700; font-size: 16px;
  transition: background .15s ease, border-color .15s ease;
}
.option small { font-weight: 500; font-size: 13px; color: var(--prune-mute); }
.option[aria-pressed='true'] { background: var(--prune); border-color: var(--prune); color: var(--blanc); }
.option[aria-pressed='true'] small { color: var(--abricot); }
.option.pill { border-radius: var(--radius-pill); align-items: center; text-align: center; font-size: 15px; font-weight: 600; min-height: 50px; padding: 8px 12px; }
.option.tile { align-items: center; text-align: center; padding: 10px 6px; font-size: 13px; font-weight: 600; gap: 6px; border-radius: 18px; }

/* Champs */
.field {
  height: 60px; width: 100%; padding: 0 20px;
  border-radius: 18px; border: 2px solid var(--ligne);
  background: var(--blanc); font-size: 22px; font-weight: 600; color: var(--prune-ink);
}
.field:focus { border-color: var(--prune); outline: none; }
.field.center { text-align: center; padding: 0; }
.dob { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; }
.dob label { font-size: 13px; font-weight: 700; color: var(--prune-mute); display: block; margin-bottom: 6px; }

/* Notes et erreurs */
.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 16px; background: var(--peche);
  font-size: 13px; line-height: 1.45;
}
.note svg { flex-shrink: 0; color: var(--prune); }
.error { color: var(--danger); font-size: 14px; font-weight: 600; margin: 0; }

/* Règle abricot, signature de la marque */
.ruler { height: 16px; border-radius: 8px; background: var(--ruler); }

/* Interrupteur */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 22px; background: var(--blanc); }
.switch { width: 52px; height: 32px; flex-shrink: 0; border: none; border-radius: var(--radius-pill); background: var(--ligne); padding: 3px; display: flex; transition: background .15s ease; }
.switch::after { content: ''; width: 26px; height: 26px; border-radius: 50%; background: var(--blanc); transition: transform .15s ease; }
.switch[aria-checked='true'] { background: var(--prune); }
.switch[aria-checked='true']::after { transform: translateX(20px); }

/* Pastilles */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--abricot); color: var(--prune-ink); font-size: 14px; font-weight: 800; }

/* Consentement */
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-card); background: var(--blanc); }
.consent input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--prune); }
.consent label { font-size: 14px; line-height: 1.4; }

/* Segment (choix à deux onglets) */
.segment { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: var(--radius-pill); background: var(--peche); }
.segment button { min-height: 42px; border: none; border-radius: var(--radius-pill); background: transparent; font-weight: 600; font-size: 14px; padding: 4px 8px; }
.segment button[aria-pressed='true'] { background: var(--blanc); font-weight: 700; }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-slot { position: relative; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-add { width: 100%; height: 100%; border: 2px dashed var(--ligne); border-radius: 20px; background: var(--blanc); display: flex; align-items: center; justify-content: center; }
.photo-add span { width: 36px; height: 36px; border-radius: 50%; background: var(--abricot); color: var(--prune); font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.photo-badge { position: absolute; bottom: 8px; left: 8px; padding: 3px 8px; border-radius: var(--radius-pill); background: var(--prune); color: var(--blanc); font-size: 11px; font-weight: 700; }
.photo-remove { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: none; border-radius: 50%; background: rgba(58, 31, 61, 0.75); color: var(--blanc); display: flex; align-items: center; justify-content: center; }

/* Taille */
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: var(--radius-card); background: var(--blanc); }
.stepper output { font-family: var(--font-title); font-weight: 700; font-size: 40px; line-height: 1; }
.stepper .icon-btn { border: 1.5px solid var(--ligne); font-size: 22px; font-weight: 700; }

/* Accueil */
.welcome-brand { display: flex; flex-direction: column; align-items: center; gap: 30px; padding-top: 64px; text-align: center; }
.wordmark { font-family: var(--font-title); font-weight: 800; letter-spacing: -0.05em; color: var(--prune); line-height: 0.85; }
.legal { margin: 0; font-size: 12px; line-height: 1.5; color: var(--prune-mute); text-align: center; }

/* Carte et sélecteur de ville */
.map { height: 240px; border-radius: 28px; background: var(--peche); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.map-ring { width: 190px; height: 190px; border-radius: 50%; background: rgba(246, 169, 107, 0.35); display: flex; align-items: center; justify-content: center; }
.map-ring > div { width: 104px; height: 104px; border-radius: 50%; background: rgba(246, 169, 107, 0.6); display: flex; align-items: center; justify-content: center; }
.map-tag { position: absolute; bottom: 14px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--blanc); font-size: 13px; font-weight: 700; }

/* Selfie */
.selfie-frame { align-self: center; width: 220px; height: 280px; border-radius: 50%; border: 4px dashed var(--abricot); background: var(--blanc); display: flex; align-items: center; justify-content: center; color: #C9A9B9; }
.selfie-frame.ok { border-style: solid; border-color: var(--prune); color: var(--prune); }

/* Arrivée */
.counter-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 24px; background: var(--blanc); }
.counter-track { height: 22px; border-radius: 11px; background: var(--peche); overflow: hidden; }
.counter-track > div { height: 100%; background: var(--ruler); background-size: auto; }


/* ===================== Accueil à onglets ===================== */
.home { height: 100dvh; display: flex; flex-direction: column; }
.home-view { flex: 1; min-height: 0; position: relative; overflow-y: auto; overscroll-behavior: contain; }
.tabbar { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--blanc); border-top: 1px solid var(--ligne); padding-bottom: env(safe-area-inset-bottom); }
.tab { height: 62px; border: none; background: transparent; color: var(--prune-mute); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 700; }
.tab[aria-current='page'] { color: var(--prune); }
.tab[aria-current='page'] svg { stroke-width: 2.5; }
.tab-screen { padding-top: max(24px, env(safe-area-inset-top)); }

/* ===================== Découverte ===================== */
.discover { position: absolute; inset: 0; overflow: hidden; background: var(--prune); }
.discover-overlay { position: absolute; left: 0; right: 0; top: 0; z-index: 5; padding: calc(max(12px, env(safe-area-inset-top)) + 16px) 16px 0; pointer-events: none; }
.discover-overlay .round-btn { pointer-events: auto; }
.discover-bar { display: flex; align-items: center; justify-content: space-between; }
.discover-bar .wordmark { color: var(--blanc); text-shadow: 0 1px 12px rgba(42, 20, 44, 0.35); }
.round-btn { width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: var(--radius-pill); background: var(--blanc); color: var(--prune); display: inline-flex; align-items: center; justify-content: center; }
.round-btn.ghost { background: rgba(255, 255, 255, 0.14); color: var(--blanc); }
.discover-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: max(16px, env(safe-area-inset-top)) 24px 24px; text-align: center; background: var(--creme); }
.discover-empty .discover-bar .wordmark { color: var(--prune); text-shadow: none; }
.discover-empty .discover-bar .round-btn { background: var(--peche); }
.loader { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--peche); border-top-color: var(--abricot); animation: spin .8s linear infinite; align-self: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: absolute; left: 16px; right: 16px; top: 76px; z-index: 30; padding: 12px 16px; border-radius: 16px; background: var(--prune-ink); color: var(--blanc); font-size: 14px; font-weight: 600; text-align: center; box-shadow: 0 8px 24px rgba(42, 20, 44, 0.3); }

/* Carte de profil */
.pcard { position: absolute; inset: 0; overflow: hidden; background: #DCC3D2; color: var(--blanc); user-select: none; -webkit-user-select: none; touch-action: pan-y; will-change: transform; }
.pcard.swipeable { touch-action: none; cursor: grab; }
.pcard-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pcard-empty { display: flex; align-items: center; justify-content: center; color: #A88A9C; }
.pcard-top-shade { position: absolute; left: 0; right: 0; top: 0; height: 140px; background: linear-gradient(180deg, rgba(42, 20, 44, 0.45), rgba(42, 20, 44, 0)); pointer-events: none; }
.pcard-top { position: absolute; left: 0; right: 0; top: 0; padding: max(12px, env(safe-area-inset-top)) 16px 0; display: flex; flex-direction: column; gap: 12px; }
.pcard-dots { display: flex; gap: 4px; }
.pcard-dots span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.45); }
.pcard-dots span.on { background: var(--blanc); }
.pcard-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 62%; background: linear-gradient(180deg, rgba(42, 20, 44, 0) 0%, rgba(42, 20, 44, 0.55) 40%, rgba(42, 20, 44, 0.92) 100%); pointer-events: none; }
.pcard-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.pcard-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pcard-id { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pcard-name { margin: 0; font-family: var(--font-title); font-weight: 700; font-size: 36px; line-height: 1; letter-spacing: -0.01em; }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 14px; font-weight: 600; align-items: center; }
.pcard-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.pcard-intent { padding: 2px 10px; border-radius: var(--radius-pill); background: var(--blanc); color: var(--prune); font-size: 13px; font-weight: 700; }
.pcard-more { width: 40px; height: 40px; flex-shrink: 0; border: none; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.22); color: var(--blanc); display: flex; align-items: center; justify-content: center; }
.pcard-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-anat { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--abricot); color: var(--prune-ink); font-size: 14px; font-weight: 800; }
.pill-glass { padding: 6px 12px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.22); border: 1px solid rgba(255, 255, 255, 0.35); font-size: 14px; font-weight: 700; }
.stamp { position: absolute; top: 96px; padding: 6px 14px; border-radius: 12px; font-family: var(--font-title); font-weight: 800; font-size: 34px; letter-spacing: 0.04em; pointer-events: none; }
.stamp.like { left: 22px; border: 4px solid var(--abricot); color: var(--abricot); transform: rotate(-14deg); }
.stamp.pass { right: 22px; border: 4px solid var(--blanc); color: var(--blanc); transform: rotate(14deg); }
.swipe-actions { display: flex; justify-content: center; align-items: center; gap: 24px; padding-top: 4px; }
.swipe-btn { border: none; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(42, 20, 44, 0.25); transition: transform .1s ease; }
.swipe-btn:active { transform: scale(0.92); }
.swipe-btn.pass { width: 64px; height: 64px; background: var(--blanc); color: var(--prune); }
.swipe-btn.like { width: 76px; height: 76px; background: var(--abricot); color: var(--prune); }

/* Feuilles plein écran (profil détaillé, filtres, Snug fit) */
.sheet { position: fixed; inset: 0; z-index: 40; margin: 0 auto; max-width: 480px; background: var(--creme); display: flex; flex-direction: column; animation: sheet-in .22s ease; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: max(20px, env(safe-area-inset-top)) 24px 8px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; display: flex; flex-direction: column; gap: 26px; }
.sheet-foot { padding: 12px 24px max(20px, env(safe-area-inset-bottom)); background: var(--creme); border-top: 1px solid var(--ligne); display: flex; flex-direction: column; gap: 4px; }

.detail-scroll { flex: 1; overflow-y: auto; }
.detail-hero { position: relative; aspect-ratio: 3 / 4; background: #DCC3D2; }
.detail-hero img, .detail-photo { width: 100%; display: block; object-fit: cover; aspect-ratio: 3 / 4; }
.detail-close { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 16px; box-shadow: 0 4px 14px rgba(42, 20, 44, 0.2); }
.detail-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 22px; }
.detail-name { margin: 0; font-family: var(--font-title); font-weight: 700; font-size: 34px; line-height: 1.05; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--prune); }
.detail-meta span { display: inline-flex; align-items: center; gap: 5px; }
.detail-section h3 { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--prune-mute); }
.detail-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.light { background: var(--blanc); border: 1.5px solid var(--ligne); font-weight: 700; }
.detail-bio { margin: 0; font-size: 16px; line-height: 1.5; }
.detail-actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 24px; padding: 18px 0 max(22px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(255, 244, 236, 0), var(--creme) 45%); }

.filter-block { display: flex; flex-direction: column; gap: 14px; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.filter-row strong { font-size: 15px; }
.filter-note { margin: -4px 0 0; font-size: 13px; line-height: 1.45; color: var(--prune-mute); }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group-title { font-size: 14px; font-weight: 700; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { min-height: 40px; padding: 6px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--ligne); background: var(--blanc); font-size: 14px; font-weight: 700; }
.fchip[aria-pressed='true'] { background: var(--abricot); border-color: var(--abricot); color: var(--prune-ink); }
.free-badge { padding: 3px 10px; border-radius: var(--radius-pill); background: var(--prune); color: var(--abricot); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.dual { position: relative; height: 32px; }
.dual::before { content: ''; position: absolute; left: 0; right: 0; top: 13px; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--peche) var(--a), var(--prune) var(--a), var(--prune) var(--b), var(--peche) var(--b)); }
.dual input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual input::-webkit-slider-runnable-track { background: none; height: 32px; }
.dual input::-moz-range-track { background: none; }
.dual input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 28px; height: 28px; margin-top: 2px; border-radius: 50%; background: var(--blanc); border: 3px solid var(--prune); box-shadow: 0 2px 8px rgba(42, 20, 44, 0.2); cursor: pointer; }
.dual input::-moz-range-thumb { pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--blanc); border: 3px solid var(--prune); cursor: pointer; }

.sheet.fit { background: var(--prune); color: var(--blanc); align-items: center; gap: 22px; padding: max(20px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); text-align: center; overflow-y: auto; }
.fit-head { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fit-kicker { font-size: 14px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--abricot); }
.fit-title { margin: 0; font-family: var(--font-title); font-weight: 800; font-size: 64px; line-height: 0.95; letter-spacing: -0.03em; }
.fit-photos { display: flex; align-items: center; justify-content: center; padding: 14px 0 4px; }
.fit-photo { width: 150px; height: 190px; border-radius: 28px; overflow: hidden; background: #DCC3D2; color: #A88A9C; display: flex; align-items: center; justify-content: center; }
.fit-photo img { width: 100%; height: 100%; object-fit: cover; }
.fit-photo.left { border: 4px solid var(--blanc); transform: rotate(-6deg); }
.fit-photo.right { margin-left: -28px; border: 4px solid var(--abricot); transform: rotate(6deg); }
.fit-ruler { width: 100%; height: 8px; background: repeating-linear-gradient(90deg, var(--abricot) 0 2px, transparent 2px 12px) 0 0 / 100% 8px no-repeat; }
.fit-text { margin: 0; font-size: 16px; line-height: 1.45; color: #E8D3DC; }

/* Snugs et profil */
.snug-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.snug-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; width: 84px; text-align: center; }
.snug-avatar { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; border: 3px solid var(--abricot); background: #DCC3D2; color: #A88A9C; display: flex; align-items: center; justify-content: center; }
.snug-avatar img { width: 100%; height: 100%; object-fit: cover; }
.snug-item small { font-size: 11px; color: var(--prune-mute); line-height: 1.2; }
.my-card { position: relative; aspect-ratio: 3 / 4; border-radius: 28px; overflow: hidden; flex-shrink: 0; }


/* ===================== Messages et chat ===================== */
.messages { gap: 18px; }
.messages-head { display: flex; align-items: center; justify-content: space-between; }
.messages-block { display: flex; flex-direction: column; gap: 10px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--prune-mute); }
.ruler.thin { height: 8px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--prune) 0 2px, transparent 2px 12px) 0 0 / 100% 4px no-repeat, var(--abricot); }
button.snug-item { border: none; background: none; padding: 0; color: inherit; }
.convo-list { display: flex; flex-direction: column; }
.convo { display: flex; align-items: center; gap: 12px; padding: 12px 0; border: none; border-bottom: 1px solid var(--ligne); background: none; color: var(--prune-ink); text-align: left; width: 100%; }
.convo .snug-avatar { border: none; flex-shrink: 0; }
.convo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.convo-text strong { font-size: 16px; font-weight: 800; }
.convo-text span { font-size: 14px; color: var(--prune-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo.unread .convo-text span { color: var(--prune-ink); font-weight: 700; }
.convo-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.convo-side small { font-size: 12px; color: var(--prune-mute); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--abricot); }
.tab-icon { position: relative; display: inline-flex; }
.tab-badge { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--abricot); color: var(--prune-ink); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

.sheet.chat { background: var(--creme); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 16px 14px; background: var(--blanc); border-bottom: 1px solid var(--ligne); }
.round-btn.soft { background: var(--creme); }
.chat-avatar { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: #E3BFA8; color: #B88E78; display: flex; align-items: center; justify-content: center; }
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-who strong { font-size: 17px; font-weight: 800; }
.chat-who span { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--prune-mute); }
.chat-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-since { align-self: center; padding: 8px 14px; border-radius: var(--radius-pill); background: var(--peche); font-size: 12px; font-weight: 700; }
.chat-bio { padding: 12px 14px; border-radius: 18px; border: 1.5px dashed var(--abricot); display: flex; flex-direction: column; gap: 4px; }
.chat-bio span { font-size: 12px; font-weight: 800; color: var(--prune-mute); }
.chat-bio p { margin: 0; font-family: var(--font-title); font-size: 16px; font-weight: 600; line-height: 1.3; }
.chat-empty { margin: 8px 0; text-align: center; font-size: 14px; color: var(--prune-mute); }
.bubble { max-width: 78%; padding: 11px 15px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--prune); color: var(--blanc); border-radius: 22px 22px 6px 22px; }
.bubble.theirs { align-self: flex-start; background: var(--blanc); color: var(--prune-ink); border-radius: 22px 22px 22px 6px; }
.chat-status { align-self: flex-end; font-size: 11px; color: var(--prune-mute); }
.chat-note { font-size: 12px; }
.chat-input { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 16px max(16px, env(safe-area-inset-bottom)); background: var(--blanc); border-top: 1px solid var(--ligne); }
.chat-input input { flex: 1; min-width: 0; height: 48px; padding: 0 18px; border-radius: var(--radius-pill); border: 1.5px solid var(--ligne); background: var(--creme); font-size: 16px; font-weight: 500; }
.chat-input input:focus { outline: none; border-color: var(--prune); }
.chat-error { position: absolute; left: 16px; right: 16px; bottom: 100%; padding: 8px 12px; background: var(--blanc); border-radius: 12px 12px 0 0; }
.send-btn { width: 48px; height: 48px; flex-shrink: 0; border: none; border-radius: 50%; background: var(--abricot); color: var(--prune); display: flex; align-items: center; justify-content: center; }
.send-btn:disabled { opacity: 0.45; }

/* Menu du drapeau et signalement */
.backdrop { position: fixed; inset: 0; z-index: 60; margin: 0 auto; max-width: 480px; background: rgba(42, 20, 44, 0.45); display: flex; align-items: flex-end; animation: fade-in .15s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.action-sheet { width: 100%; padding: 16px 16px max(20px, env(safe-area-inset-bottom)); background: var(--creme); border-radius: 28px 28px 0 0; display: flex; flex-direction: column; gap: 8px; animation: sheet-in .2s ease; }
.action { height: 54px; border: none; border-radius: 18px; background: var(--blanc); font-size: 16px; font-weight: 700; color: var(--prune-ink); }
.action.danger { color: var(--danger); }
.action.muted { background: transparent; color: var(--prune-mute); }
.action:disabled { opacity: 0.5; }
.action-text { margin: 4px 4px 8px; font-size: 15px; line-height: 1.45; text-align: center; }
.sheet.report { z-index: 70; }
.field.area { height: 110px; padding: 14px 16px; font-size: 15px; font-weight: 500; resize: none; font-family: inherit; }
.report-link { color: var(--prune-mute); font-size: 14px; height: 40px; }


/* ===================== Profil, compte, modération, pages légales ===================== */
.btn.danger { background: var(--danger); color: var(--blanc); }
.ok-msg { margin: 0 0 6px; color: #2E7D4F; font-weight: 700; font-size: 14px; text-align: center; }
.loader.small { width: 26px; height: 26px; border-width: 3px; }
.edit-body { gap: 30px; }
.edit-section { display: flex; flex-direction: column; gap: 14px; }
.edit-section + .edit-section { padding-top: 26px; border-top: 1px solid var(--ligne); }
.edit-section.embedded .title { font-size: 22px; }
.edit-section.embedded .subtitle { font-size: 14px; margin-top: 6px; }
.counter { align-self: flex-end; font-size: 12px; color: var(--prune-mute); margin-top: -8px; }
.photo-state { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 800; background: var(--abricot); color: var(--prune-ink); }
.photo-state.rejected { background: var(--danger); color: var(--blanc); }
.settings { display: flex; flex-direction: column; background: var(--blanc); border-radius: 22px; padding: 16px 18px 6px; gap: 0; }
.settings .eyebrow { margin-bottom: 4px; }
.settings-email { margin: 0 0 6px; font-size: 14px; color: var(--prune-mute); }
.settings-row { display: flex; align-items: center; min-height: 50px; border: none; border-top: 1px solid var(--ligne); background: none; padding: 0; font-size: 15px; font-weight: 700; color: var(--prune-ink); text-decoration: none; text-align: left; width: 100%; }
.settings-row.danger { color: var(--danger); }
.backdrop.center { align-items: center; justify-content: center; padding: 24px; z-index: 80; }
.notice-card { width: 100%; background: var(--creme); border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.notice-card p { margin: 0; font-size: 15px; line-height: 1.5; }
.legal-body { gap: 20px; }
.legal-body section h3 { margin: 0 0 8px; font-family: var(--font-title); font-size: 19px; }
.legal-body p, .legal-body li { margin: 0 0 8px; font-size: 15px; line-height: 1.55; }
.legal-body ul { margin: 0 0 8px; padding-left: 20px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 8px 0 24px; }
.mod-stats { font-size: 13px; color: var(--prune-mute); font-weight: 600; }
.mod-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--blanc); }
.mod-photos { display: flex; gap: 6px; overflow-x: auto; }
.mod-photo { width: 72px; height: 96px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: #DCC3D2; color: #A88A9C; display: flex; align-items: center; justify-content: center; }
.mod-photo img { width: 100%; height: 100%; object-fit: cover; }
.mod-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mod-who strong { font-size: 18px; }
.mod-who small, .mod-reason small { font-size: 12px; color: var(--prune-mute); }
.mod-who small.danger { color: var(--danger); font-weight: 700; }
.mod-reason { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mod-details { margin: 0; font-weight: 700; font-size: 15px; }
.mod-bio { margin: 0; font-size: 14px; color: var(--prune-mute); }
.mod-convo { font-size: 13px; background: var(--creme); border-radius: 14px; padding: 10px 12px; }
.mod-convo summary { font-weight: 700; cursor: pointer; }
.mod-convo p { margin: 6px 0 0; }
.mod-convo p.from-reported { color: var(--danger); }
.mod-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-actions .btn-link { width: auto; padding: 0 8px; }
.fchip.danger { border-color: var(--danger); color: var(--danger); }
.mod-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mod-photo-item { display: flex; flex-direction: column; gap: 6px; }


/* ===================== Installation sur l'écran d'accueil ===================== */
.install-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 12px 8px; border-radius: 18px; background: var(--prune); color: var(--blanc); }
.install-logo { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: var(--abricot); color: var(--prune); font-family: var(--font-title); font-weight: 800; font-size: 26px; line-height: 34px; text-align: center; letter-spacing: -0.05em; }
.install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.install-text strong { font-size: 14px; }
.install-text small { font-size: 12px; color: #E8D3DC; }
.install-go { height: 34px; padding: 0 14px; border: none; border-radius: var(--radius-pill); background: var(--abricot); color: var(--prune); font-weight: 800; font-size: 13px; }
.install-close { width: 30px; height: 30px; border: none; border-radius: 50%; background: rgba(255,255,255,0.14); color: var(--blanc); display: flex; align-items: center; justify-content: center; }
.install-help ol { margin: 4px 0 8px; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; }
.share-icon { display: inline-block; transform: rotate(-90deg); font-weight: 700; }

@media (min-width: 520px) {
  body { padding: 24px 0; }
  .app { min-height: calc(100dvh - 48px); border-radius: 32px; overflow: hidden; }
  .home { height: calc(100dvh - 48px); }
  .sheet { top: 24px; bottom: 24px; border-radius: 32px; overflow: hidden; }
  .backdrop { top: 24px; bottom: 24px; border-radius: 32px; overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
