/* mboannonce — styles communs aux pages Compte, Déposer et Administration */
:root {
  --indigo: #14533a; --indigo-deep: #0c3a28; --indigo-soft: #e3efe8;
  --taxi: #f5c518; --taxi-ink: #2a2100;
  --paper: #f5f7f4; --card: #ffffff; --ink: #14201a; --muted: #56645c; --line: #dce4de;
  --wa: #1fa55a; --warn-bg: #fff7dc; --warn-line: #ecd27a; --bad: #9b2c1f; --bad-bg: #fbeae6;
  --display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--taxi); outline-offset: 2px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1080px; }

header { background: var(--indigo-deep); color: #fff; }
.bar { display: flex; align-items: center; gap: 8px; min-height: 60px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 23px; letter-spacing: -0.5px;
  margin-right: auto; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--taxi); display: inline-block; position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; inset: 7px; border: 2.5px solid var(--indigo-deep); transform: rotate(45deg); }
@media (max-width: 480px) { .logo { font-size: 19px; gap: 6px; } .logo-mark { width: 22px; height: 22px; } .logo-mark::after { inset: 6px; } }

.btn { border: 0; border-radius: 12px; padding: 11px 16px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; line-height: 1.2; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-taxi { background: var(--taxi); color: var(--taxi-ink); }
.btn-green { background: var(--indigo); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-line { background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.btn-bad { background: var(--bad-bg); color: var(--bad); }
.btn-lang { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.45); padding: 8px 11px; font-weight: 600; }
.btn-block { width: 100%; padding: 15px; font-size: 17px; }
.btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 10px; }

main.wrap { padding-top: 22px; padding-bottom: 48px; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(27px, 6vw, 36px); letter-spacing: -0.8px; line-height: 1.1; margin: 0 0 6px; }
h2 { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.3px; margin: 0 0 10px; }
.lead { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack { display: grid; gap: 14px; }

.f { display: grid; gap: 6px; font-weight: 600; }
.f .hint { font-weight: 400; color: var(--muted); font-size: 14px; }
.inp { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 11px; padding: 12px 13px; }
.inp:focus { outline: 2px solid var(--indigo); outline-offset: 0; border-color: var(--indigo); }
textarea.inp { min-height: 130px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 15px; }
.chip-btn[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }

.msg { border-radius: 12px; padding: 11px 14px; margin: 0 0 14px; font-weight: 600; }
.msg-bad { background: var(--bad-bg); color: var(--bad); }
.msg-ok { background: var(--indigo-soft); color: var(--indigo); }
.msg-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--ink); font-weight: 500; }

.badge { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 700; background: var(--indigo-soft); color: var(--indigo); }
.badge-sold { background: #ece9e1; color: #5b5545; }
.badge-removed, .badge-blocked { background: var(--bad-bg); color: var(--bad); }
.badge-ver { background: var(--indigo); color: #fff; }

/* Connexion WhatsApp */
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 30px; font-weight: 800; letter-spacing: 2px;
  background: var(--paper); border: 2px dashed var(--line); border-radius: 12px; padding: 10px 14px; text-align: center; }
.spin { width: 18px; height: 18px; border: 3px solid var(--indigo-soft); border-top-color: var(--indigo); border-radius: 50%; display: inline-block; flex: none; }
@media (prefers-reduced-motion: no-preference) { .spin { animation: spin 0.9s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; }

/* Liste d'annonces (compte et administration) */
.ad-item { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.ad-item:first-child { border-top: 0; padding-top: 0; }
.ad-thumb { width: 88px; height: 66px; border-radius: 10px; object-fit: cover; background: var(--indigo-soft); display: block; }
.ad-title { font-weight: 700; line-height: 1.3; }
.ad-meta { color: var(--muted); font-size: 14px; }
.ad-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Photos du formulaire */
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 560px) { .ph-grid { grid-template-columns: repeat(6, 1fr); } }
.ph-cell { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--indigo-soft); }
.ph-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-del { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(8,40,27,.82); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.ph-add { aspect-ratio: 1; border-radius: 10px; border: 2px dashed var(--line); background: #fff; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; color: var(--indigo); font-weight: 700; font-size: 13px; text-align: center; padding: 4px; }
.ph-add b { font-size: 26px; line-height: 1; }

/* Administration */
.tabs { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; }
.tab { border: 0; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 15px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0 0 14px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font-family: var(--display); font-size: 26px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 14px; }
.user-item { padding: 12px 0; border-top: 1px solid var(--line); }
.user-item:first-child { border-top: 0; padding-top: 0; }
code.k { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 14px; word-break: break-all; }
footer.foot { color: var(--muted); font-size: 14px; text-align: center; padding: 0 16px 30px; }

/* Lien Messages avec le nombre de non-lus */
.btn-msg { position: relative; padding: 7px 9px; }
.nb { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--taxi); color: var(--taxi-ink); font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; border: 2px solid var(--indigo-deep); }
.dot-in { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--taxi); color: var(--taxi-ink); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* Menu du bas sur téléphone */
.bnav { display: none; }
@media (max-width: 719px) {
  body.has-bnav { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }
  .bnav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: #fff; border-top: 1px solid var(--line); padding: 3px 4px calc(3px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgba(4,28,18,.08); }
  .bnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted);
    font-size: 11px; font-weight: 600; padding: 2px 0; position: relative; line-height: 1.2; }
  .bnav a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .bnav a[aria-current="page"] { color: var(--indigo); }
  .bnav .bn-sell .bn-ic { width: 40px; height: 26px; border-radius: 12px; background: var(--taxi); color: var(--taxi-ink); display: flex; align-items: center; justify-content: center; }
  .bnav .bn-sell { color: var(--ink); }
  .bnav .nb { top: -2px; right: calc(50% - 22px); }
  .bar .btn-msg { display: none !important; }
  body.thread .bnav { display: none; }
  body.thread.has-bnav { padding-bottom: 0; }
}
