/* =============================================
   MonDépôt.ma v4 — Marketplace de lots
   Mobile-first + Safari fixes
   ============================================= */
:root {
  --navy: #2A5080;
  --navy-dark: #1B3A5C;
  --navy-light: #3A6898;
  --orange: #D4713A;
  --orange-light: #E8894E;
  --cream: #F5F0E8;
  --white: #FFFFFF;
  --g50:  #FAFAF8;
  --g100: #F4F2EE;
  --g200: #E8E4DC;
  --g300: #D4CFC5;
  --g400: #A09880;
  --g600: #6B6355;
  --g800: #3A3530;
  --green: #2D8A4E;
  --green-bg: #E8F5EE;
  --red: #C0392B;
  --red-bg: #FEE2E2;
  --blue: #1E40AF;
  --blue-bg: #DBEAFE;
  --amber: #92400E;
  --amber-bg: #FEF3C7;
  --shadow-xs: 0 1px 4px rgba(0,0,0,.07);
  --shadow-sm: 0 2px 10px rgba(42,80,128,.09);
  --shadow-md: 0 6px 28px rgba(42,80,128,.13);
  --shadow-lg: 0 16px 50px rgba(42,80,128,.18);
  --r: 12px;
  --r-lg: 18px;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html {
  overflow-x: hidden; scroll-behavior: smooth;
  height: -webkit-fill-available;
}
body {
  font-family: 'Nunito', sans-serif;
  background: var(--g50); color: var(--g800);
  overflow-x: hidden; width: 100%; max-width: 100vw;
  min-height: 100vh; min-height: -webkit-fill-available;
}
* { max-width: 100%; }
img { max-width: 100%; display: block; }

/* ── Typography ─────────────────────────────── */
h1,h2,h3,h4,h5 {
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto; -webkit-hyphens: auto;
}

/* ── Navigation ─────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  background: var(--navy-dark);
  display: flex; align-items: center;
  justify-content: space-between;
  height: 58px; padding: 0 4%;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  -webkit-transform: translateZ(0); transform: translateZ(0);
}
.nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.nav-logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.nav-logo-text { font-weight: 900; font-size: 1.05rem; color: var(--white); white-space: nowrap; }
.nav-logo-text span { color: var(--orange); }
.nav-links { display: none; list-style: none; gap: 1.3rem; align-items: center; }
.nav-links a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .83rem; font-weight: 700; transition: color .2s; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--orange); }
.nav-links a.active { border-bottom: 2px solid var(--orange); padding-bottom: 2px; }
.nav-right { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.nav-icon-btn {
  position: relative; background: rgba(255,255,255,.1); border: none;
  border-radius: 50%; width: 34px; height: 34px; min-width: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--white); font-size: .9rem;
  text-decoration: none; -webkit-appearance: none;
}
.nav-icon-btn:hover { background: rgba(255,255,255,.2); }
.nbadge {
  position: absolute; top: -3px; right: -3px;
  background: var(--orange); color: var(--white);
  font-size: .5rem; font-weight: 900; width: 15px; height: 15px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--navy-dark);
}
.btn-nav-cta {
  display: none; background: var(--orange); color: var(--white);
  padding: .4rem .95rem; border-radius: 50px;
  font-size: .8rem; font-weight: 800; text-decoration: none;
  border: none; cursor: pointer; font-family: 'Nunito', sans-serif;
  transition: all .2s; white-space: nowrap; -webkit-appearance: none;
}
.btn-nav-cta:hover { background: var(--orange-light); }
.btn-nav-sell {
  display: none; background: var(--white); color: var(--navy-dark);
  padding: .4rem .95rem; border-radius: 50px;
  font-size: .8rem; font-weight: 900; text-decoration: none;
  border: none; cursor: pointer; font-family: 'Nunito', sans-serif;
  transition: all .2s; white-space: nowrap;
}
.btn-nav-sell:hover { background: var(--cream); }
.nav-burger {
  display: flex; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: .3rem;
}
.nav-burger span { width: 20px; height: 2px; background: var(--white); border-radius: 2px; display: block; transition: all .3s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile-menu {
  display: none; position: fixed; top: 58px; left: 0; right: 0;
  background: var(--navy-dark); z-index: 299;
  padding: .8rem 5% 1.3rem;
  border-bottom: 3px solid var(--orange);
  max-height: calc(100vh - 58px); overflow-y: auto;
}
.nav-mobile-menu.open { display: block; }
.nav-mobile-menu a {
  color: rgba(255,255,255,.8); text-decoration: none;
  font-size: .9rem; font-weight: 700;
  padding: .82rem 0; border-bottom: 1px solid rgba(255,255,255,.08);
  display: block; transition: color .2s;
}
.nav-mobile-menu a:last-of-type { border-bottom: none; }
.nav-mobile-menu a.active, .nav-mobile-menu a:hover { color: var(--orange); }
.nav-mob-sell {
  display: block; margin-top: .8rem;
  background: var(--white); color: var(--navy-dark) !important;
  padding: .75rem !important; border-radius: 10px;
  text-align: center; font-weight: 900 !important;
  border-bottom: none !important;
}
.nav-mob-cta {
  display: block; margin-top: .5rem;
  background: var(--orange); color: var(--white) !important;
  padding: .75rem !important; border-radius: 10px;
  text-align: center; font-weight: 800 !important;
  border-bottom: none !important;
}

/* ── Layout ─────────────────────────────────── */
.page-wrapper { padding-top: 58px; min-height: 100vh; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; width: 100%; }
.section { padding: 40px 4%; }
.section-white { background: var(--white); }
.section-cream { background: var(--cream); }
.section-navy  { background: var(--navy-dark); }
.section-gray  { background: var(--g100); }

/* ── Search Hero (LeBonCoin style) ──────────── */
.search-hero {
  background: var(--navy-dark);
  padding: 1.4rem 4% 0;
  position: relative; overflow: hidden;
}
.search-hero::before {
  content: ''; position: absolute; inset: 0; opacity: .04;
  background-image: repeating-linear-gradient(45deg,#fff 0,#fff 1px,transparent 0,transparent 50%);
  background-size: 24px 24px; pointer-events: none;
}
.search-hero-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.search-hero h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(1.3rem, 4vw, 2rem);
  color: var(--white); margin-bottom: .35rem;
  overflow-wrap: break-word;
}
.search-hero h1 span { color: var(--orange); }
.search-hero p { color: rgba(255,255,255,.6); font-size: .83rem; margin-bottom: 1rem; }
.main-search-bar {
  display: flex; background: var(--white);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  margin-bottom: 0;
}
.main-search-bar input {
  flex: 1; padding: .9rem 1.1rem; border: none; outline: none;
  font-family: 'Nunito', sans-serif; font-size: 16px;
  color: var(--g800); background: transparent; min-width: 0;
  -webkit-appearance: none;
}
.main-search-bar input::placeholder { color: var(--g400); }
.main-search-bar select {
  border: none; border-left: 2px solid var(--g200); outline: none;
  padding: .9rem .8rem; font-family: 'Nunito', sans-serif;
  font-size: .82rem; font-weight: 700; color: var(--navy);
  background: var(--g100); cursor: pointer;
  -webkit-appearance: none; min-width: 110px; flex-shrink: 0;
}
.main-search-bar button {
  background: var(--orange); color: var(--white);
  border: none; padding: .9rem 1.3rem; cursor: pointer;
  font-size: 1.1rem; font-weight: 800; flex-shrink: 0;
  transition: background .2s; -webkit-appearance: none;
}
.main-search-bar button:hover { background: var(--orange-light); }
/* Category tabs scrollable */
.cat-tabs-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 0; margin-top: .8rem;
}
.cat-tabs-wrap::-webkit-scrollbar { display: none; }
.cat-tabs {
  display: flex; gap: 0; white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,.1);
  min-width: max-content;
}
.cat-tab {
  padding: .72rem 1rem; background: transparent; border: none;
  color: rgba(255,255,255,.6); font-family: 'Nunito', sans-serif;
  font-size: .82rem; font-weight: 800; cursor: pointer;
  transition: all .2s; border-bottom: 3px solid transparent;
  white-space: nowrap; -webkit-appearance: none;
}
.cat-tab:hover { color: var(--white); }
.cat-tab.active { color: var(--white); border-bottom-color: var(--orange); }

/* ── Filter Bar ─────────────────────────────── */
.filter-bar {
  background: var(--white); padding: .6rem 4%;
  border-bottom: 2px solid var(--g200);
  display: flex; align-items: center; gap: .6rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  display: flex; align-items: center; gap: .35rem;
  padding: .38rem .9rem; border-radius: 50px;
  border: 2px solid var(--g200); background: var(--white);
  color: var(--g600); font-size: .78rem; font-weight: 800;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  font-family: 'Nunito', sans-serif; transition: all .2s;
  -webkit-appearance: none;
}
.filter-chip:hover { border-color: var(--navy); color: var(--navy); }
.filter-chip.active { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); }
.filter-sep { width: 1px; height: 20px; background: var(--g200); flex-shrink: 0; }
.sort-sel {
  padding: .38rem .8rem; border: 2px solid var(--g200);
  border-radius: 50px; font-family: 'Nunito', sans-serif;
  font-size: .78rem; font-weight: 700; color: var(--navy);
  outline: none; cursor: pointer; background: var(--white);
  -webkit-appearance: none; white-space: nowrap; flex-shrink: 0;
  margin-left: auto;
}
.results-count { font-size: .78rem; color: var(--g400); font-weight: 700; flex-shrink: 0; }

/* ── Lots Grid (LeBonCoin style) ────────────── */
.lots-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--g200);
}
/* Card = horizontal row like LeBonCoin */
.lot-card {
  background: var(--white);
  display: flex; gap: 0;
  cursor: pointer; transition: background .15s;
  text-decoration: none; color: inherit;
  overflow: hidden;
  position: relative;
}
.lot-card:hover { background: var(--g50); }
.lot-card:active { background: var(--g100); }
.lot-img {
  width: 130px; min-width: 130px; height: 110px;
  background: var(--g100); display: flex;
  align-items: center; justify-content: center;
  font-size: 3rem; flex-shrink: 0; position: relative;
  overflow: hidden;
}
.lot-img img { width: 100%; height: 100%; object-fit: cover; }
.lot-body {
  flex: 1; padding: .9rem .9rem .9rem .95rem;
  display: flex; flex-direction: column;
  gap: .3rem; min-width: 0;
  border-left: 1px solid var(--g200);
}
.lot-title {
  font-size: .93rem; font-weight: 800; color: var(--g800);
  line-height: 1.3; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.lot-meta {
  display: flex; align-items: center; gap: .45rem;
  flex-wrap: wrap;
}
.lot-qty {
  font-size: .75rem; color: var(--g600); font-weight: 700;
}
.cond-badge {
  font-size: .65rem; font-weight: 900; padding: .18rem .55rem;
  border-radius: 50px; text-transform: uppercase; letter-spacing: .4px;
  white-space: nowrap; flex-shrink: 0;
}
.cond-neuf    { background: var(--green-bg); color: var(--green); }
.cond-tbon    { background: var(--blue-bg);  color: var(--blue); }
.cond-bon     { background: var(--amber-bg); color: var(--amber); }
.cond-moyen   { background: var(--g100); color: var(--g600); }
.lot-location { font-size: .72rem; color: var(--g400); }
.lot-price-row {
  display: flex; align-items: center;
  justify-content: space-between; margin-top: auto; gap: .5rem;
}
.lot-price {
  font-size: 1.05rem; font-weight: 900; color: var(--navy-dark);
}
.lot-price small { font-size: .68rem; color: var(--g400); font-weight: 600; display: block; }
.lot-date { font-size: .68rem; color: var(--g400); }
.lot-fav {
  position: absolute; top: .5rem; right: .5rem;
  background: rgba(255,255,255,.9); border: none;
  border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .88rem;
  box-shadow: var(--shadow-xs); z-index: 1;
  -webkit-appearance: none;
}
.lot-fav.active { color: #e53e3e; }
/* Empty state */
.lots-empty {
  background: var(--white); padding: 4rem 2rem;
  text-align: center; color: var(--g400);
}
.lots-empty .big { font-size: 3rem; margin-bottom: 1rem; }

/* ── Lot Detail ─────────────────────────────── */
.lot-detail-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.lot-images {
  background: var(--g100); border-radius: var(--r-lg);
  height: 260px; display: flex; align-items: center;
  justify-content: center; font-size: 6rem;
  overflow: hidden; position: relative;
}
.detail-price-card {
  background: var(--white); border-radius: var(--r-lg);
  border: 2px solid var(--g200); padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.detail-price { font-size: 1.8rem; font-weight: 900; color: var(--navy-dark); margin-bottom: .3rem; }
.detail-price-sub { font-size: .78rem; color: var(--g400); margin-bottom: 1.2rem; }
.detail-qty-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--g100); border-radius: 8px;
  padding: .5rem .85rem; font-size: .85rem; font-weight: 800;
  color: var(--navy); margin-bottom: 1rem;
}
.detail-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1.2rem; }
.detail-info-item { background: var(--g100); border-radius: 10px; padding: .75rem; }
.detail-info-item .dii-label { font-size: .67rem; color: var(--g400); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: .2rem; }
.detail-info-item .dii-val { font-size: .88rem; font-weight: 800; color: var(--g800); }
.seller-card {
  background: var(--g100); border-radius: var(--r);
  border: 2px solid var(--g200); padding: 1rem;
  display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem;
}
.seller-av {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg,var(--navy),var(--orange));
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.1rem; font-weight: 900; flex-shrink: 0;
}

/* ── Breadcrumb ─────────────────────────────── */
.breadcrumb {
  padding: .7rem 4%; background: var(--white);
  border-bottom: 1px solid var(--g200);
  display: flex; align-items: center; gap: .4rem;
  overflow-x: auto; scrollbar-width: none;
}
.breadcrumb::-webkit-scrollbar { display: none; }
.breadcrumb a { color: var(--g400); text-decoration: none; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span { color: var(--g400); font-size: .76rem; flex-shrink: 0; }
.breadcrumb .current { color: var(--g800); font-size: .76rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Buttons ─────────────────────────────────── */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--orange); color: var(--white);
  padding: .88rem 1.5rem; border-radius: 50px;
  font-size: .92rem; font-weight: 800; text-decoration: none;
  border: none; cursor: pointer; transition: all .2s;
  box-shadow: 0 4px 16px rgba(212,113,58,.35);
  font-family: 'Nunito', sans-serif; text-align: center;
  width: 100%; -webkit-appearance: none; min-height: 48px;
}
.btn-primary:hover { background: var(--orange-light); -webkit-transform: translateY(-1px); transform: translateY(-1px); }
.btn-secondary {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  background: transparent; color: var(--navy-dark);
  padding: .88rem 1.5rem; border-radius: 50px;
  font-size: .92rem; font-weight: 800; text-decoration: none;
  border: 2px solid var(--g200); cursor: pointer; transition: all .2s;
  font-family: 'Nunito', sans-serif; width: 100%; -webkit-appearance: none; min-height: 48px;
}
.btn-secondary:hover { border-color: var(--navy); }
.btn-outline-white {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  background: transparent; color: var(--white);
  padding: .88rem 1.5rem; border-radius: 50px;
  font-size: .92rem; font-weight: 800; text-decoration: none;
  border: 2px solid rgba(255,255,255,.3); cursor: pointer; transition: all .2s;
  font-family: 'Nunito', sans-serif; width: 100%; -webkit-appearance: none; min-height: 48px;
}
.btn-outline-white:hover { border-color: var(--orange); color: var(--orange); }

/* ── Forms ─────────────────────────────────── */
.form-group { margin-bottom: .9rem; }
.form-group label {
  display: block; font-size: .7rem; font-weight: 800;
  color: var(--navy); margin-bottom: .28rem;
  text-transform: uppercase; letter-spacing: .5px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .78rem 1rem;
  border: 2px solid var(--g200); border-radius: 10px;
  font-size: 16px; font-family: 'Nunito', sans-serif;
  color: var(--g800); outline: none; transition: border-color .2s;
  background: var(--white); -webkit-appearance: none; -webkit-border-radius: 10px;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--navy); }
.form-group textarea { resize: vertical; min-height: 95px; }
.form-group-dark label { color: rgba(255,255,255,.65); }
.form-group-dark input, .form-group-dark select, .form-group-dark textarea {
  background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: var(--white);
}
.form-group-dark input::placeholder, .form-group-dark textarea::placeholder { color: rgba(255,255,255,.3); }
.form-group-dark input:focus, .form-group-dark select:focus, .form-group-dark textarea:focus { border-color: var(--orange); }
.form-grid-2 { display: grid; grid-template-columns: 1fr; gap: .9rem; }
.form-grid-2 .full { grid-column: 1; }
.form-submit {
  width: 100%; background: var(--orange); color: var(--white);
  padding: .95rem; border-radius: 12px; border: none;
  font-size: .97rem; font-weight: 900; cursor: pointer;
  font-family: 'Nunito', sans-serif; transition: all .2s;
  -webkit-appearance: none; min-height: 48px;
}
.form-submit:hover { background: var(--orange-light); }

/* ── Pills ─────────────────────────────────── */
.pill { padding: .2rem .6rem; border-radius: 50px; font-size: .67rem; font-weight: 900; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; display: inline-block; }
.pill-neuf      { background: var(--green-bg); color: var(--green); }
.pill-tbon      { background: var(--blue-bg);  color: var(--blue); }
.pill-bon       { background: var(--amber-bg); color: var(--amber); }
.pill-moyen     { background: var(--g100); color: var(--g600); }
.pill-confirmed { background: var(--blue-bg);  color: var(--blue); }
.pill-pending   { background: var(--amber-bg); color: var(--amber); }
.pill-shipped   { background: #EDE9FE; color: #5B21B6; }
.pill-delivered { background: var(--green-bg); color: var(--green); }
.pill-cancelled { background: var(--red-bg);   color: var(--red); }
.pill-admin     { background: rgba(212,113,58,.15); color: var(--orange); }

/* ── CMI Modal ─────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  z-index: 1000; align-items: flex-end; justify-content: center; padding: 0;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: 20px 20px 0 0;
  max-width: 500px; width: 100%; padding: 1.8rem 1.6rem;
  position: relative; animation: slideUp .3s ease;
  max-height: 92vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(1.8rem + env(safe-area-inset-bottom, 0px));
}
.modal-handle { width: 40px; height: 4px; background: var(--g300); border-radius: 2px; margin: 0 auto 1.2rem; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--g100); border: none; border-radius: 50%;
  width: 30px; height: 30px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--g800); font-size: .85rem; -webkit-appearance: none;
}
.modal h2 { font-family: 'Libre Baskerville', serif; font-size: 1.2rem; color: var(--navy-dark); margin-bottom: 1.1rem; }
.cmi-bar {
  background: #003087; border-radius: 10px;
  padding: .8rem 1rem; display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 1.1rem; flex-wrap: wrap; gap: .4rem;
}
.cmi-bar span { color: #fff; font-size: .8rem; font-weight: 900; }
.cmi-cards span { background: rgba(255,255,255,.2); padding: .15rem .4rem; border-radius: 4px; font-size: .62rem; font-weight: 900; color: #fff; margin-left: .25rem; }

/* ── Section titles ─────────────────────────── */
.sec-label { color: var(--orange); font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; margin-bottom: .5rem; display: block; }
.sec-title { font-family: 'Libre Baskerville', serif; font-size: clamp(1.35rem,5vw,2.3rem); color: var(--navy-dark); line-height: 1.2; overflow-wrap: break-word; }
.sec-title-white { color: var(--white); }
.sec-sub { color: var(--g600); margin-top: .65rem; font-size: clamp(.85rem,2.5vw,.95rem); line-height: 1.7; overflow-wrap: break-word; }
.sec-sub-white { color: rgba(255,255,255,.6); }
.sec-header { margin-bottom: 1.8rem; }
.sec-header.center { text-align: center; }
.sec-header.center .sec-sub { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ── Page hero (secondary pages) ───────────── */
.page-hero { background: var(--navy-dark); padding: 2rem 4% 1.8rem; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; opacity: .04; background-image: repeating-linear-gradient(45deg,#fff 0,#fff 1px,transparent 0,transparent 50%); background-size: 24px 24px; pointer-events: none; }
.page-hero-inner { position: relative; z-index: 1; }
.page-hero-label { display: inline-flex; align-items: center; gap: .35rem; background: rgba(212,113,58,.15); border: 1px solid rgba(212,113,58,.3); color: var(--orange-light); padding: .3rem .8rem; border-radius: 50px; font-size: .68rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: .8rem; }
.page-hero h1 { font-family: 'Libre Baskerville', serif; font-size: clamp(1.5rem,5vw,2.6rem); color: var(--white); line-height: 1.2; overflow-wrap: break-word; }
.page-hero h1 span { color: var(--orange); }
.page-hero p { color: rgba(255,255,255,.65); font-size: clamp(.85rem,2.5vw,.97rem); line-height: 1.7; margin-top: .6rem; overflow-wrap: break-word; }

/* ── Trust bar ─────────────────────────────── */
.trust-bar { background: var(--white); padding: .65rem 4%; display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; border-bottom: 2px solid var(--g200); overflow-x: auto; scrollbar-width: none; }
.trust-bar::-webkit-scrollbar { display: none; }
.trust-item { display: flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; color: var(--navy); white-space: nowrap; flex-shrink: 0; }

/* ── Footer ─────────────────────────────────── */
footer { background: #101E30; color: rgba(255,255,255,.5); }
.footer-grid { padding: 2.5rem 4% 2rem; display: grid; grid-template-columns: 1fr; gap: 2rem; }
.footer-logo-text { font-size: 1.1rem; font-weight: 900; color: var(--white); }
.footer-logo-text span { color: var(--orange); }
.footer-brand-desc { font-size: .78rem; line-height: 1.7; margin-top: .6rem; }
.footer-social { display: flex; gap: .5rem; margin-top: .8rem; }
.social-btn { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; font-size: .85rem; text-decoration: none; color: rgba(255,255,255,.6); transition: all .2s; }
.social-btn:hover { background: var(--orange); color: var(--white); }
.footer-col h4 { color: var(--white); font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: .7rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.footer-col a { color: rgba(255,255,255,.45); text-decoration: none; font-size: .78rem; transition: color .2s; }
.footer-col a:hover { color: var(--orange); }
.footer-bottom { padding: .9rem 4%; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem; font-size: .7rem; }
.footer-bottom .hl { color: var(--orange); }

/* ── Auth ────────────────────────────────────── */
.auth-tabs { display: flex; background: var(--g100); border-radius: 10px; padding: .25rem; margin-bottom: 1.1rem; }
.auth-tab-btn { flex: 1; padding: .5rem; border-radius: 8px; border: none; background: transparent; font-family: 'Nunito', sans-serif; font-size: .86rem; font-weight: 800; cursor: pointer; color: var(--g600); transition: all .2s; -webkit-appearance: none; }
.auth-tab-btn.active { background: var(--white); color: var(--navy-dark); box-shadow: 0 2px 6px rgba(0,0,0,.09); }
.btn-social { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .75rem 1.1rem; border-radius: 11px; border: 2px solid var(--g200); background: var(--white); font-family: 'Nunito', sans-serif; font-size: .87rem; font-weight: 800; cursor: pointer; color: var(--g800); margin-bottom: .55rem; -webkit-appearance: none; min-height: 48px; transition: all .2s; }
.btn-social:hover { border-color: var(--navy-light); background: var(--g100); }
.social-ico { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 900; flex-shrink: 0; }
.divider { display: flex; align-items: center; gap: .7rem; margin: .7rem 0; color: var(--g400); font-size: .76rem; font-weight: 700; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--g200); }

/* ── Dashboard tabs ─────────────────────────── */
.dp-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: none; margin-bottom: 1.2rem; -webkit-overflow-scrolling: touch; }
.dp-tabs::-webkit-scrollbar { display: none; }
.dp-tab { flex-shrink: 0; padding: .5rem 1rem; border-radius: 50px; border: 2px solid var(--g200); background: transparent; color: var(--g600); font-size: .8rem; font-weight: 800; cursor: pointer; transition: all .2s; font-family: 'Nunito', sans-serif; white-space: nowrap; -webkit-appearance: none; }
.dp-tab.active { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); }
.dp-page { display: none; animation: fadeUp .3s ease both; }
.dp-page.active { display: block; }

/* ── Admin ─────────────────────────────────── */
.admin-tabbar { position: fixed; top: 58px; width: 100%; z-index: 199; background: var(--navy); display: flex; overflow-x: auto; scrollbar-width: none; }
.admin-tabbar::-webkit-scrollbar { display: none; }
.admin-tab { flex-shrink: 0; padding: .65rem 1rem; background: transparent; border: none; color: rgba(255,255,255,.6); font-family: 'Nunito', sans-serif; font-size: .8rem; font-weight: 800; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; -webkit-appearance: none; transition: all .2s; }
.admin-tab.active { color: #fff; border-bottom-color: var(--orange); }
.table-wrap { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; border: 2px solid var(--g200); }
.table-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 2px solid var(--g200); }
.table-header h3 { font-size: .9rem; font-weight: 900; color: var(--navy-dark); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.admin-table th { text-align: left; padding: .7rem .9rem; font-size: .67rem; font-weight: 900; color: var(--g600); text-transform: uppercase; letter-spacing: .7px; background: var(--g100); border-bottom: 2px solid var(--g200); white-space: nowrap; }
.admin-table td { padding: .75rem .9rem; font-size: .82rem; color: var(--g800); border-bottom: 1px solid var(--g200); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--g50); }
.status-sel { border: 2px solid var(--g200); border-radius: 8px; padding: .27rem .55rem; font-family: 'Nunito', sans-serif; font-size: .77rem; font-weight: 700; color: var(--navy); outline: none; cursor: pointer; -webkit-appearance: none; background: var(--white); }
.btn-del { background: var(--red-bg); color: var(--red); border: none; border-radius: 7px; padding: .28rem .65rem; font-size: .74rem; font-weight: 800; cursor: pointer; font-family: 'Nunito', sans-serif; -webkit-appearance: none; }

/* ── WhatsApp ─────────────────────────────── */
.wa-btn {
  position: fixed; right: 1.2rem;
  bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
  width: 50px; height: 50px; border-radius: 50%;
  background: #25D366; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; text-decoration: none;
  box-shadow: 0 4px 14px rgba(37,211,102,.5); z-index: 200;
}

/* ── Toast ──────────────────────────────────── */
.toast {
  position: fixed; bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  left: 50%; -webkit-transform: translateX(-50%) translateY(16px);
  transform: translateX(-50%) translateY(16px);
  background: var(--navy-dark); color: var(--white);
  padding: .75rem 1.2rem; border-radius: 50px;
  font-size: .82rem; font-weight: 700; opacity: 0;
  transition: all .3s; z-index: 9999; max-width: 88vw;
  text-align: center; pointer-events: none;
  border-left: 4px solid var(--orange); white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.toast.show { -webkit-transform: translateX(-50%) translateY(0); transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }

/* ── Time slot buttons ───────────────────────── */
.ts-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.ts-btn { padding: .42rem .85rem; border-radius: 8px; border: 2px solid rgba(255,255,255,.15); color: rgba(255,255,255,.65); font-size: .8rem; font-weight: 700; cursor: pointer; transition: all .2s; background: transparent; font-family: 'Nunito', sans-serif; min-height: 40px; -webkit-appearance: none; }
.ts-btn.sel { background: var(--orange); border-color: var(--orange); color: #fff; }
.ts-btn:hover:not(.sel) { border-color: rgba(255,255,255,.35); color: #fff; }

/* ── Animations ─────────────────────────────── */
@-webkit-keyframes fadeUp { from { opacity: 0; -webkit-transform: translateY(14px); } to { opacity: 1; -webkit-transform: translateY(0); } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@-webkit-keyframes scaleIn { from { opacity: 0; -webkit-transform: scale(.93); } to { opacity: 1; -webkit-transform: scale(1); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.93); } to { opacity: 1; transform: scale(1); } }
@-webkit-keyframes slideUp { from { opacity: 0; -webkit-transform: translateY(30px); } to { opacity: 1; -webkit-transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* ══════════════════════════════════════════════
   TABLET 640px+
══════════════════════════════════════════════ */
@media screen and (min-width: 640px) {
  .lots-grid { grid-template-columns: 1fr 1fr; }
  .lot-card { flex-direction: column; }
  .lot-img { width: 100%; min-width: unset; height: 180px; }
  .lot-body { border-left: none; border-top: 1px solid var(--g200); }
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .form-grid-2 .full { grid-column: 1/-1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .lot-detail-grid { grid-template-columns: 1.3fr 1fr; }
  .btn-primary, .btn-secondary, .btn-outline-white { width: auto; }
  .modal { border-radius: 20px; max-width: 480px; padding-bottom: 1.8rem; }
  .modal-overlay { align-items: center; padding: 1rem; }
}

/* ══════════════════════════════════════════════
   DESKTOP 900px+
══════════════════════════════════════════════ */
@media screen and (min-width: 900px) {
  nav { height: 64px; }
  .page-wrapper { padding-top: 64px; }
  .nav-mobile-menu { display: none !important; }
  .nav-links { display: flex; }
  .nav-burger { display: none; }
  .btn-nav-cta { display: inline-block; }
  .btn-nav-sell { display: inline-block; }
  .lots-grid { grid-template-columns: 1fr; }
  .lot-card { flex-direction: row; }
  .lot-img { width: 160px; min-width: 160px; height: 130px; }
  .lot-body { border-left: 1px solid var(--g200); border-top: none; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; padding: 3.5rem 5% 2.5rem; }
  .section { padding: 60px 5%; }
}

/* ══════════════════════════════════════════════
   iOS SAFE AREA
══════════════════════════════════════════════ */
@supports (padding: env(safe-area-inset-top)) {
  nav { padding-left: calc(4% + env(safe-area-inset-left)); padding-right: calc(4% + env(safe-area-inset-right)); }
  .nav-mobile-menu { padding-left: calc(5% + env(safe-area-inset-left)); padding-right: calc(5% + env(safe-area-inset-right)); }
}


/* ══════════════════════════════════════════════
   RTL — Arabe (العربية)
   S'active via [dir="rtl"] ou body.rtl
══════════════════════════════════════════════ */
body.rtl, [dir="rtl"] {
  font-family: 'Noto Sans Arabic', 'Nunito', sans-serif;
  direction: rtl;
  text-align: right;
}
[dir="rtl"] nav { direction: rtl; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .nav-right { flex-direction: row-reverse; }
[dir="rtl"] .nav-logo { flex-direction: row-reverse; }
[dir="rtl"] .nav-mobile-menu { text-align: right; direction: rtl; }
[dir="rtl"] .nav-mobile-menu a { text-align: right; }

/* Lot cards RTL */
[dir="rtl"] .lot-card { flex-direction: row-reverse; }
[dir="rtl"] .lot-body { border-left: none; border-right: 1px solid var(--g200); padding-right: .95rem; padding-left: .85rem; }
[dir="rtl"] .lot-price-row { flex-direction: row-reverse; }
[dir="rtl"] .lot-meta { flex-direction: row-reverse; }

/* Sections RTL */
[dir="rtl"] .sec-header { text-align: right; }
[dir="rtl"] .sec-header.center { text-align: center; }
[dir="rtl"] .page-hero-inner { text-align: right; }
[dir="rtl"] .trust-bar { flex-direction: row-reverse; }

/* Forms RTL */
[dir="rtl"] .form-group input,
[dir="rtl"] .form-group select,
[dir="rtl"] .form-group textarea {
  text-align: right;
  direction: rtl;
}
[dir="rtl"] .form-group-dark input,
[dir="rtl"] .form-group-dark select,
[dir="rtl"] .form-group-dark textarea { text-align: right; direction: rtl; }

/* Modal RTL */
[dir="rtl"] .modal { text-align: right; direction: rtl; }
[dir="rtl"] .modal-close { left: 1rem; right: auto; }
[dir="rtl"] .stripe-modal-close { left: 1rem; right: auto; }

/* Footer RTL */
[dir="rtl"] footer { direction: rtl; }
[dir="rtl"] .footer-grid { direction: rtl; }
[dir="rtl"] .footer-bottom { flex-direction: row-reverse; }
[dir="rtl"] .footer-social { flex-direction: row-reverse; }

/* Cart RTL */
[dir="rtl"] .cart-panel { left: 0; right: auto; transform: translateX(-100%); }
[dir="rtl"] .cart-panel.open { transform: translateX(0); }

/* Breadcrumb RTL */
[dir="rtl"] .breadcrumb { flex-direction: row-reverse; }

/* Steps RTL */
[dir="rtl"] .step-sell { flex-direction: row-reverse; }
[dir="rtl"] .rdv-feat { flex-direction: row-reverse; text-align: right; }

/* Lot detail RTL */
[dir="rtl"] .detail-price-card { text-align: right; }
[dir="rtl"] .detail-info-grid { direction: rtl; }
[dir="rtl"] .seller-box { flex-direction: row-reverse; }

/* Auth RTL */
[dir="rtl"] .auth-tabs { flex-direction: row-reverse; }
[dir="rtl"] .btn-social { flex-direction: row-reverse; }

/* Dashboard RTL */
[dir="rtl"] .dp-tabs { flex-direction: row-reverse; }
[dir="rtl"] .dp-user-card { flex-direction: row-reverse; }
[dir="rtl"] .rdv-card-d { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .order-header { flex-direction: row-reverse; }
[dir="rtl"] .profile-row { flex-direction: row-reverse; }

/* ── PAGINATION ──────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem; padding: 1.5rem 4% 2rem; flex-wrap: wrap;
}
.pag-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--g200); background: var(--white);
  color: var(--navy); font-size: .82rem; font-weight: 800;
  cursor: pointer; transition: all .2s; display: flex;
  align-items: center; justify-content: center;
  font-family: 'Nunito', sans-serif; -webkit-appearance: none;
  flex-shrink: 0;
}
.pag-btn:hover:not(:disabled) { border-color: var(--navy); }
.pag-btn.active { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); }
.pag-btn:disabled { opacity: .35; cursor: not-allowed; }
.pag-arrow {
  padding: 0 .9rem; border-radius: 50px; font-size: .8rem; width: auto;
}
.pag-info {
  font-size: .78rem; color: var(--g400); font-weight: 700;
  white-space: nowrap;
}

/* ── PRICE RANGE FILTER ──────────────────── */
.price-range-row {
  display: flex; align-items: center; gap: .4rem;
  padding: .45rem .9rem; background: var(--white);
  border: 2px solid var(--g200); border-radius: 50px;
  flex-shrink: 0; min-width: 200px;
}
.price-range-row span { font-size: .72rem; color: var(--g400); font-weight: 700; white-space: nowrap; }
.price-input {
  width: 80px; border: none; outline: none; font-family: 'Nunito', sans-serif;
  font-size: .78rem; font-weight: 700; color: var(--navy-dark);
  background: transparent; -webkit-appearance: none;
  padding: 0;
}
.price-input::placeholder { color: var(--g300); }
.price-sep { width: 12px; height: 2px; background: var(--g300); flex-shrink: 0; }

/* ── SOCIAL SHARE ────────────────────────── */
.share-bar {
  display: flex; align-items: center; gap: .55rem;
  padding: 1rem; background: var(--g100);
  border-radius: 14px; margin-bottom: 1rem; flex-wrap: wrap;
}
.share-bar-label {
  font-size: .72rem; font-weight: 900; color: var(--g600);
  text-transform: uppercase; letter-spacing: .5px;
  flex-shrink: 0; margin-right: .3rem;
}
[dir="rtl"] .share-bar-label { margin-right: 0; margin-left: .3rem; }
.share-btn {
  display: flex; align-items: center; gap: .35rem;
  padding: .42rem .9rem; border-radius: 50px; border: 2px solid var(--g200);
  background: var(--white); font-family: 'Nunito', sans-serif;
  font-size: .78rem; font-weight: 800; cursor: pointer;
  transition: all .2s; -webkit-appearance: none; white-space: nowrap; flex-shrink: 0;
}
.share-btn:hover { border-color: var(--navy); color: var(--navy); }
.share-btn.whatsapp:hover { border-color: #25D366; color: #25D366; }
.share-btn.facebook:hover { border-color: #1877F2; color: #1877F2; }
.share-btn.copy:hover { border-color: var(--orange); color: var(--orange); }
.share-btn.copied { background: var(--green-bg); border-color: var(--green); color: var(--green); }

/* ── IMAGE UPLOAD ADMIN ──────────────────── */
.img-upload-zone {
  border: 2px dashed var(--g300); border-radius: 12px;
  padding: 1.2rem; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--g50);
  position: relative; overflow: hidden;
}
.img-upload-zone:hover, .img-upload-zone.drag-over {
  border-color: var(--orange); background: rgba(212,113,58,.05);
}
.img-upload-zone input[type=file] {
  position: absolute; inset: 0; opacity: 0;
  cursor: pointer; width: 100%; height: 100%;
}
.img-upload-zone .upload-icon { font-size: 2rem; margin-bottom: .4rem; }
.img-upload-zone p { font-size: .82rem; color: var(--g600); font-weight: 700; }
.img-upload-zone small { font-size: .7rem; color: var(--g400); }
.img-preview-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: .5rem; margin-top: .8rem;
}
.img-preview-item {
  position: relative; aspect-ratio: 1; border-radius: 8px;
  overflow: hidden; background: var(--g100);
}
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.img-preview-item .img-rm {
  position: absolute; top: 3px; right: 3px;
  background: rgba(0,0,0,.6); color: white; border: none;
  border-radius: 50%; width: 20px; height: 20px; cursor: pointer;
  font-size: .6rem; display: flex; align-items: center; justify-content: center;
  -webkit-appearance: none;
}
.upload-progress {
  height: 4px; background: var(--g200); border-radius: 2px; margin-top: .6rem; overflow: hidden;
}
.upload-progress-fill {
  height: 100%; background: var(--orange); border-radius: 2px;
  transition: width .3s; width: 0%;
}

/* ── EXCHANGE RATE BADGE ─────────────────── */
.rate-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--blue-bg); color: var(--blue);
  padding: .22rem .65rem; border-radius: 50px;
  font-size: .7rem; font-weight: 800;
}

/* ── SKELETON LOADERS ────────────────────── */
.skeleton-card {
  background: var(--white); border-radius: 14px; overflow: hidden;
}
.skeleton-img { height: 160px; background: var(--g200); }
.skeleton-body { padding: .9rem; }
.skeleton-line {
  height: 12px; background: var(--g200); border-radius: 4px; margin-bottom: .5rem;
}
.skeleton-line.short { width: 55%; }
.skeleton-line.medium { width: 75%; }
.skeleton-line.full { width: 100%; }
@keyframes shimmer {
  0% { background-position: -500px 0; }
  100% { background-position: 500px 0; }
}
.skeleton-card .skeleton-img,
.skeleton-card .skeleton-line {
  background: linear-gradient(90deg, var(--g200) 25%, var(--g100) 50%, var(--g200) 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.6s infinite linear;
}
