@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --green: #14915a;
  --green-dark: #0d6b41;
  --green-soft: #e4f4ec;
  --orange: #ff7a1a;
  --orange-soft: #fff0e3;
  --bg: #faf8f4;
  --card: #ffffff;
  --text: #17201b;
  --muted: #6c756f;
  --border: #ebe7df;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(23, 32, 27, .04), 0 6px 20px rgba(23, 32, 27, .06);
  --font-title: 'Outfit', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px;
}
h1, h2, h3 { font-family: var(--font-title); letter-spacing: -.02em; line-height: 1.15; }
h2 { font-size: 1.35rem; margin: 32px 0 14px; }
a { color: var(--green-dark); }
main { max-width: 1160px; margin: 0 auto; padding: 24px 20px 64px; }

/* ---------- En-tête ---------- */
header.site {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(20px, calc((100% - 1160px) / 2 + 20px));
}
.logo {
  font-family: var(--font-title); font-weight: 800; font-size: 1.55rem; color: var(--green);
  text-decoration: none; letter-spacing: -.04em; display: inline-flex; align-items: center; white-space: nowrap;
}
.logo::before {
  content: "🥫"; font-size: 1.1rem; width: 34px; height: 34px; border-radius: 10px;
  background: var(--green-soft); display: grid; place-items: center; margin-right: 8px;
}
.logo span { color: var(--orange); }
header nav { display: flex; align-items: center; gap: 18px; font-weight: 500; white-space: nowrap; }
header nav a:not(.btn) { color: var(--text); text-decoration: none; }
header nav a:not(.btn):hover { color: var(--green); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--green); color: var(--green); background: #fff;
  padding: 10px 18px; border-radius: 999px; font: 600 .95rem 'Inter', sans-serif;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--green-soft); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 14px rgba(20,145,90,.25); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-orange { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 4px 14px rgba(255,122,26,.3); }
.btn-orange:hover { background: #ec6a0c; }
.btn-white { background: #fff; color: var(--green-dark); border-color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-block { display: flex; width: 100%; }

/* ---------- Accueil : bannière ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 44px 40px;
  background: linear-gradient(135deg, #14915a 0%, #0d6b41 100%); color: #fff;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  border-radius: 50%; background: rgba(255,122,26,.25);
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 0 0 12px; }
.hero h1 em { font-style: normal; color: #ffd2a8; }
.hero p { font-size: 1.08rem; opacity: .92; margin: 0 0 22px; max-width: 480px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-emojis { position: relative; z-index: 1; font-size: 3.2rem; display: grid;
  grid-template-columns: repeat(3, 1fr); gap: 14px; justify-items: center; }
.hero-emojis span { width: 84px; height: 84px; border-radius: 22px; background: rgba(255,255,255,.14);
  display: grid; place-items: center; backdrop-filter: blur(4px); }
.hero-emojis span:nth-child(even) { transform: translateY(14px); }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 8px; }
.trust div { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
  display: flex; gap: 12px; align-items: center; font-size: .9rem; }
.trust b { display: block; font-family: var(--font-title); font-size: 1rem; }
.trust i { font-style: normal; font-size: 1.5rem; width: 42px; height: 42px; flex: none; border-radius: 12px;
  background: var(--orange-soft); display: grid; place-items: center; }

/* ---------- Recherche + catégories ---------- */
.search { position: relative; margin: 26px 0 14px; }
.search input {
  width: 100%; padding: 15px 18px 15px 48px; border-radius: 999px; border: 1.5px solid var(--border);
  font-size: 1rem; background: #fff; box-shadow: var(--shadow);
}
.search::before { content: "🔍"; position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1.5px solid var(--border); background: #fff; color: var(--text);
  padding: 8px 14px; border-radius: 999px; font: 500 .88rem 'Inter', sans-serif; cursor: pointer;
}
.chip:hover { border-color: var(--green); }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------- Grille d'annonces ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; text-decoration: none;
  color: inherit; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(23,32,27,.12); }
.card-img { aspect-ratio: 1; background: linear-gradient(135deg, #f1eee7, #e8e4da); position: relative;
  display: grid; place-items: center; font-size: 3rem; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--orange); color: #fff; font-style: normal;
  font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.card-body { padding: 12px 14px 14px; }
.card-price { font-family: var(--font-title); font-weight: 700; font-size: 1.2rem; }
.card-body p { margin: 2px 0 8px; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .76rem; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.pill-dlc { background: var(--orange-soft); color: #b5520a; }
.pill-ddm { background: var(--green-soft); color: var(--green-dark); }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; background: #fff; border-radius: var(--radius);
  border: 1.5px dashed var(--border); }

/* ---------- Formulaires ---------- */
form.box, .box {
  background: var(--card); border-radius: 20px; padding: 28px; max-width: 580px; margin: 0 auto;
  box-shadow: var(--shadow);
}
label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: .9rem; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px;
  font: inherit; background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
textarea { min-height: 110px; resize: vertical; }
input[type=file] { padding: 18px; border-style: dashed; background: var(--bg); cursor: pointer; }
input[type=checkbox] { width: auto; accent-color: var(--green); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.tabs { display: flex; gap: 6px; margin-bottom: 8px; background: var(--bg); padding: 5px; border-radius: 999px; }
.tabs .btn { flex: 1; border-color: transparent; background: transparent; color: var(--muted); box-shadow: none; }
.tabs .btn.btn-primary { background: #fff; color: var(--text); box-shadow: var(--shadow); }

/* ---------- Page annonce ---------- */
.listing { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: start; }
.gallery { display: grid; gap: 10px; }
.gallery img { width: 100%; border-radius: var(--radius); background: #eceae4; display: block; }
.listing > div:last-child { background: #fff; border-radius: 20px; padding: 26px; box-shadow: var(--shadow); position: sticky; top: 84px; }
.price { font-family: var(--font-title); font-size: 2.2rem; font-weight: 800; margin: 6px 0 0; }
.facts { list-style: none; padding: 0; margin: 16px 0; }
.facts li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.facts li span { color: var(--muted); }
.seller { display: flex; align-items: center; gap: 12px; margin: 18px 0; text-decoration: none; color: inherit;
  padding: 12px; border-radius: 14px; background: var(--bg); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--font-title); flex: none; }
.stars { color: var(--orange); }
.notice { background: var(--orange-soft); border-radius: 12px; padding: 12px 14px; font-size: .86rem; color: #7a3d08; }

.previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.previews img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow); }

.review { background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }

/* ---------- Notifications ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 13px 20px;
  border-radius: 14px; color: #fff; background: var(--text); z-index: 99; max-width: 90vw;
  box-shadow: 0 10px 30px rgba(0,0,0,.2); font-weight: 500; }
.toast-error { background: #d63b2f; }
.toast-success { background: var(--green); }

footer.site { text-align: center; color: var(--muted); font-size: .85rem; padding: 32px 16px; border-top: 1px solid var(--border); }
footer.site a { color: var(--muted); margin: 0 6px; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  main { padding: 16px 14px 56px; }
  header.site { padding: 10px 14px; }
  .logo { font-size: 1.3rem; }
  .logo::before { width: 30px; height: 30px; }
  header nav { gap: 12px; font-size: .88rem; }
  header nav .btn { padding: 8px 14px; }
  .hide-mobile { display: none; }
  .hero { grid-template-columns: 1fr; padding: 30px 22px; }
  .hero-emojis { display: none; }
  .trust { grid-template-columns: 1fr; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px 12px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .listing { grid-template-columns: 1fr; }
  .listing > div:last-child { position: static; }
  .row { grid-template-columns: 1fr; }
}

/* ---------- Pastilles, annonces vendues, suivi ---------- */
.nav-ico { position: relative; }
.dot { position: absolute; top: -6px; left: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #e5392f; color: #fff; font: 700 .68rem/18px 'Inter', sans-serif; text-align: center; font-style: normal; }
.card-sold .card-img img { filter: grayscale(.6); opacity: .8; }
.timeline { list-style: none; padding: 0; margin: 18px 0; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; padding: 0 0 18px 0; position: relative; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .ic { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border);
  display: grid; place-items: center; flex: none; filter: grayscale(1); opacity: .6; }
.timeline li.done { color: var(--text); }
.timeline li.done .ic { border-color: var(--green); background: var(--green-soft); filter: none; opacity: 1; }
.timeline li.done::before { background: var(--green); }
.timeline li.current .ic { box-shadow: 0 0 0 4px var(--green-soft); }
.timeline small { display: block; color: var(--muted); font-size: .8rem; }
.relay { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px; margin-top: 8px; cursor: pointer; }
.relay:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.relay input { width: auto; margin-top: 3px; accent-color: var(--green); }
.relay small { color: var(--muted); }
.notif { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 8px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.notif.unread { border-left: 4px solid var(--orange); }
.notif .ic { font-size: 1.4rem; }
.bubble.system { align-self: center; background: var(--orange-soft); color: #7a3d08; box-shadow: none; text-align: center; font-size: .9rem; max-width: 90%; }
