/* Roady — place de marché, comptes acheteurs, administration de la plateforme */
body.market { background: #f4f5f4; overflow-x: hidden; }
.mmain { max-width: 1240px; margin: 0 auto; padding: 22px 20px 50px; min-height: 60vh; }

/* En-tête */
.mhead { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px; height: 62px; padding: 0 24px; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.mbrand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.mbrand:hover { color: var(--ink); }
.mnav { display: flex; gap: 4px; flex: 1; }
.mnav a { color: var(--ink-2); padding: 8px 13px; border-radius: 9px; font-weight: 500; }
.mnav a:hover { background: var(--line-2); color: var(--ink); }
.mnav a.on { background: var(--accent-soft); color: var(--accent-dark); }
.mnav a.pro { margin-left: auto; color: var(--muted); }
.macc { display: flex; align-items: center; gap: 12px; }
.macc > a:not(.btn) { color: var(--ink-2); font-size: 18px; }
.langsw { font-size: 12px !important; font-weight: 600; color: var(--muted) !important; }
.burger { display: none; font-size: 22px; cursor: pointer; }
.count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }

/* Accueil */
.hero { margin: -22px calc(50% - 50vw) 30px; width: 100vw; box-sizing: border-box; padding: 64px 20px 54px; background: radial-gradient(900px 420px at 15% 0%, #d1fae5 0%, transparent 60%), radial-gradient(700px 400px at 95% 10%, #e4e4e7 0%, transparent 60%), #fafafa; border-bottom: 1px solid var(--line); }
.hero-in { max-width: 1040px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.2vw, 46px); letter-spacing: -.035em; line-height: 1.08; margin: 0 0 12px; }
.hero-sub { color: var(--muted); font-size: 16px; margin: 0 0 28px; }
.qsearch { display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 10px; align-items: end; text-align: left; background: #fff; padding: 16px; border-radius: 16px; box-shadow: 0 10px 40px -12px rgba(24,24,27,.18), 0 0 0 1px rgba(24,24,27,.05); }
.btn.big { padding: 11px 20px; font-size: 15px; }
.hero-links { margin: 18px 0 0; color: var(--muted); }
.msec { margin: 0 0 38px; }
.msec > h2, .msec-h h2 { font-size: 20px; text-transform: none; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.msec > h2 { margin-bottom: 14px; }
.msec-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.makes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.makes a { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 12px 14px; border-radius: 11px; box-shadow: var(--shadow); color: var(--ink); }
.makes a:hover { box-shadow: 0 0 0 1.5px var(--accent); }
.makes span { color: var(--muted); font-size: 12px; }
.ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cta { background: #fff; border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.cta h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.02em; }
.cta p { color: var(--muted); margin: 0 0 18px; }
.cta.dark { background: #18181b; color: #fff; }
.cta.dark p { color: #a1a1aa; }

/* Cartes d'annonces */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.lgrid.three { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.lcard { position: relative; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.lcard:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -14px rgba(24,24,27,.3), 0 0 0 1px rgba(24,24,27,.06); }
.lcard.boosted { box-shadow: 0 0 0 1.5px var(--accent), var(--shadow); }
.lcard-img { position: relative; display: block; aspect-ratio: 4/3; background: linear-gradient(135deg, #f4f4f5, #e4e4e7); }
.lcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { display: grid; place-items: center; width: 100%; height: 100%; font-size: 42px; opacity: .35; }
.tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; }
.tags i { font-style: normal; font-size: 11px; font-weight: 600; background: rgba(24,24,27,.78); color: #fff; padding: 3px 8px; border-radius: 6px; }
.tags i.top { background: var(--accent); }
.favf { position: absolute; right: 10px; top: 10px; margin: 0; }
.fav { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); cursor: pointer; font-size: 17px; color: var(--ink-2); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.fav.on { color: #e11d48; }
.lcard-body { display: block; padding: 13px 15px 15px; color: var(--ink); flex: 1; }
.lcard-body:hover { color: var(--ink); }
.lcard-body h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.ver { margin: 2px 0 8px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard .price { margin: 0 0 9px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.vatb { font-size: 10px; font-weight: 600; color: var(--accent-dark); background: var(--accent-soft); padding: 2px 6px; border-radius: 5px; vertical-align: middle; }
.facts { list-style: none; margin: 0 0 9px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 11.5px; color: var(--ink-2); }
.facts li { background: var(--line-2); padding: 2px 7px; border-radius: 5px; }
.seller { margin: 0; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2); padding-top: 9px; }

/* Recherche */
.sres { display: grid; grid-template-columns: 270px 1fr; gap: 22px; align-items: start; }
.filters-side { position: sticky; top: 80px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 16px; max-height: calc(100vh - 100px); overflow: auto; }
.filters-side form { display: flex; flex-direction: column; gap: 11px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checks-col { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.checks-col legend { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.sres-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sres-h h1 { font-size: 20px; margin: 0; }
.sres-tools { display: flex; gap: 8px; align-items: center; }
.sres-tools select { width: auto; }
.empty { text-align: center; padding: 40px; }
.pager { display: flex; gap: 5px; justify-content: center; margin: 24px 0 0; flex-wrap: wrap; }
.pager a { min-width: 36px; text-align: center; padding: 7px 10px; border-radius: 8px; background: #fff; box-shadow: var(--shadow); color: var(--ink); }
.pager a.on { background: var(--accent); color: #fff; }

/* Fiche annonce */
.crumbs { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.ldetail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.lside { position: sticky; top: 80px; display: flex; flex-direction: column; }
.pricebox h1 { font-size: 22px; letter-spacing: -.02em; margin: 0; }
.pricebox .price.big { font-size: 30px; font-weight: 750; letter-spacing: -.03em; margin: 10px 0 2px; }
.pb-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin: 16px 0 10px; }
.pb-actions form, .pb-actions form .btn { width: 100%; }
.pb-actions .btn { text-align: center; }
.sellerhead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sellerhead .logo, .sellerhead img { width: 46px; height: 46px; border-radius: 12px; object-fit: contain; display: grid; place-items: center; font-size: 18px; }
.sellerbox form textarea { min-height: 96px; }
.phone { font-weight: 600; }
.specgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.specgrid > div { border-bottom: 1px solid var(--line-2); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.specgrid span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.report summary { cursor: pointer; }
.report:not([open]) { background: none; box-shadow: none; padding: 4px 0; }

/* Page garage */
.dhero { display: flex; gap: 20px; align-items: center; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 24px; margin-bottom: 22px; border-top: 4px solid var(--accent); }
.dhero h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.dhero-logo { width: 84px; height: 84px; border-radius: 18px; background: var(--accent-soft); display: grid; place-items: center; flex: none; overflow: hidden; }
.dhero-logo img { width: 100%; height: 100%; object-fit: contain; }
.dhero-logo span { font-size: 34px; font-weight: 700; color: var(--accent-dark); }
.dlinks { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 0; }
.dlayout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.stars { color: #f59e0b; }
.review { border-top: 1px solid var(--line-2); padding: 12px 0; }
.review:first-of-type { border-top: 0; }
.reply { background: var(--line-2); border-radius: 8px; padding: 8px 10px; margin: 6px 0 0 14px; }

/* Connexion, inscription, compte */
.authwrap { max-width: 440px; margin: 30px auto; }
.authwrap h1 { letter-spacing: -.02em; }
.accwrap, .adminwrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.accnav, .adminnav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.accnav > b, .adminnav > b { padding: 6px 10px 10px; font-size: 13px; }
.accnav a, .adminnav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.accnav a:hover, .adminnav a:hover { background: var(--line-2); color: var(--ink); }
.accnav a.on, .adminnav a.on { background: var(--accent-soft); color: var(--accent-dark); }
.accnav form, .adminnav form { margin: 8px 10px 0; }
.crow, .adrow, .srow { display: flex; gap: 14px; align-items: center; padding: 12px 14px; margin-bottom: 10px; }
.crow { color: var(--ink); }
.crow.unread { box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
.crow img, .adrow img, .crow .noimg, .adrow .noimg { width: 92px; height: 68px; border-radius: 9px; object-fit: cover; flex: none; background: var(--line-2); font-size: 26px; }
.crow > div, .adrow > div, .srow > div:first-child { flex: 1; min-width: 0; }
.srow .btns, .adrow .btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.srow.muted { opacity: .65; }

/* Conversation */
.convwrap { max-width: 760px; margin: 0 auto; }
.convcar { display: flex; gap: 12px; align-items: center; }
.convcar img { width: 80px; height: 60px; object-fit: cover; border-radius: 8px; }
.thread { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.bubble { max-width: 78%; padding: 10px 13px; border-radius: 14px; background: var(--line-2); white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble .small { display: block; opacity: .7; margin-top: 4px; font-size: 11px; }

/* Vendre */
.sellwrap { max-width: 860px; margin: 0 auto; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: st; margin: 24px 0; padding: 0; list-style: none; }
.steps3 li { background: #fff; padding: 18px; border-radius: 14px; box-shadow: var(--shadow); counter-increment: st; }
.steps3 li::before { content: counter(st); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; margin-bottom: 8px; }
.hero.dark { background: #18181b; color: #fff; border: 0; }
.hero.dark .hero-sub { color: #a1a1aa; }

/* Pied de page */
.mfoot { background: #fff; border-top: 1px solid var(--line); padding: 34px 20px; }
.mfoot-in { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.mfoot-in > div { display: flex; flex-direction: column; gap: 6px; }
.mfoot-in a { color: var(--ink-2); font-size: 13px; }
.logo.sm { width: 20px; height: 20px; font-size: 11px; border-radius: 6px; }

/* Administration */
.adminwrap section > h1 { margin-top: 0; }
.rowform.tight { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rowform.tight input, .rowform.tight select { width: auto; max-width: 150px; padding: 5px 7px; }
.pre { white-space: pre-wrap; }

/* Mobile */
@media (max-width: 960px) {
  .qsearch { grid-template-columns: 1fr 1fr; }
  .qsearch .btn { grid-column: 1 / -1; }
  .sres, .ldetail, .dlayout, .accwrap, .adminwrap { grid-template-columns: 1fr; }
  .filters-side, .lside, .accnav, .adminnav { position: static; max-height: none; }
  .accnav, .adminnav { flex-direction: row; flex-wrap: wrap; }
  .ctas, .steps3 { grid-template-columns: 1fr; }
  .mfoot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .mhead { padding: 0 14px; gap: 10px; }
  .burger { display: block; order: 3; }
  .mnav { display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 10px; border-bottom: 1px solid var(--line); }
  #mnav:checked ~ .mnav { display: flex; }
  .mnav a.pro { margin-left: 0; }
  .macc { margin-left: auto; }
  .hero { padding: 36px 16px 30px; }
  .lgrid, .lgrid.three { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lcard-body { padding: 10px; }
  .lcard .price { font-size: 16px; }
  .facts { font-size: 11px; }
  .dhero { flex-direction: column; align-items: flex-start; }
  .crow img, .adrow img { width: 70px; height: 52px; }
}
.fdet > summary { list-style: none; display: none; }
.fdet > summary::-webkit-details-marker { display: none; }
@media (max-width: 960px) {
  .filters-side { padding: 0; background: none; box-shadow: none; }
  .fdet > summary { display: block; text-align: center; }
  .fdet[open] > summary { margin-bottom: 10px; }
  .fdet[open] { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 12px; }
}

/* ---- Application mobile : barre d'onglets, installation, dépôt en étapes ---- */
.tabbar { display: none; }
.installbar { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 14px 40px -10px rgba(24,24,27,.35), 0 0 0 1px rgba(24,24,27,.06); max-width: 520px; margin: 0 auto; }
.installbar[hidden] { display: none; }
.installbar > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.installbar .logo { flex: none; width: 40px; height: 40px; font-size: 18px; border-radius: 11px; }
@media (min-width: 681px) { .installbar { bottom: 20px; } }

.wizard .wsteps { display: none; }
.wizard.js .wsteps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; counter-reset: w; }
.wsteps li { flex: 1; font-size: 12px; color: var(--muted); counter-increment: w; }
.wsteps li::before { content: ''; display: block; height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 6px; }
.wsteps li.done::before, .wsteps li.on::before { background: var(--accent); }
.wsteps li.on { color: var(--ink); font-weight: 600; }
.wizard .wstep { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.wizard .wstep[hidden] { display: none; }
.wizard .wstep h2 { margin: 6px 0 0; }
.wnav { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.wnav [hidden] { display: none; }
.wnav [data-next], .wnav [data-submit] { margin-left: auto; }
.wnav .busy { opacity: .7; }
.vinbox { background: var(--line-2); border-radius: 12px; padding: 12px; }
.vinbox p { margin: 4px 0 0; }
details.more summary { cursor: pointer; color: var(--accent-dark); font-weight: 500; padding: 6px 0; }
details.more[open] summary { margin-bottom: 10px; }
.estimate { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; background: var(--accent-soft); border: 1px solid #a7f3d0; border-radius: 12px; padding: 12px 14px; }
.estimate > span:first-child { width: 100%; font-size: 12px; color: var(--accent-dark); font-weight: 600; }
.estimate b { font-size: 18px; }
.estimate[hidden] { display: none; }

@media (max-width: 680px) {
  body.market { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .mhead { padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); }
  .burger, .mnav, .mhead .macc .btn { display: none !important; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 10.5px; font-weight: 500; padding: 4px 0; }
  .tabbar a.on { color: var(--accent-dark); }
  .tabbar a.sell b { display: grid; place-items: center; width: 44px; height: 44px; margin-top: -20px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 6px 16px -4px rgba(4,120,87,.55); border: 3px solid #fff; }
  .tabbar a.sell svg { width: 22px; height: 22px; }
  .tabbar .dot { position: absolute; top: 0; left: 55%; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e11d48; color: #fff; font-size: 10px; font-style: normal; font-weight: 700; display: grid; place-items: center; }
  .mfoot { padding-bottom: 20px; }
  .sellwrap .card.form { padding: 16px; }
  .wnav { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); background: #fff; padding: 10px 0 4px; margin: 0 -2px; z-index: 5; }
  .wnav .btn { flex: 1; text-align: center; }
  .pickbtns .btn { flex: 1; justify-content: center; }
}
