/* millechoses.com — feuille de style principale (sans dépendance, polices système pour un chargement rapide) */
:root {
  --brand: #e8590c;
  --brand-dark: #c2410c;
  --brand-soft: #fff1e8;
  --brand-light: #fb923c;   /* dégradés */
  --accent: #facc15;        /* soulignés, mises en valeur */
  --ink: #1c2430;
  --ink-2: #4b5563;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f5f6f8;
  --card: #ffffff;
  --success: #15803d;
  --success-soft: #e8f6ee;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --warning: #a16207;
  --warning-soft: #fef6e0;
  --info: #1d4ed8;
  --info-soft: #e8efff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); }
img, video { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container-sm { max-width: 760px; }
.container-xs { max-width: 460px; }
main { min-height: 60vh; padding: 24px 0 48px; }

/* --- En-tête --------------------------------------------------------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-row { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 2.05rem; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.site-header .logo { font-size: 1.55rem; }
/* Logo : pictogramme + slogan + adresse du site. Toutes les tailles suivent la taille de police de .logo. */
.logo-lockup { display: inline-flex; align-items: center; gap: .42em; line-height: 1; }
.brand-mark { flex: none; display: grid; place-items: center; width: 1.62em; height: 1.62em; border-radius: .44em; color: #fff;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  box-shadow: 0 .1em .32em color-mix(in srgb, var(--brand) 38%, transparent); transition: transform .25s ease; }
.brand-mark svg { width: 64%; height: 64%; }
a:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.logo-lockup__text { display: flex; flex-direction: column; gap: .2em; min-width: 0; }
.logo-lockup__sub { font-size: max(.4em, 9px); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-left: .12em; }
.logo-lockup--light .logo-lockup__sub { color: #8b95a7; }
/* Dernier mot du slogan surligné au feutre (couleur d'accent de la palette), sous le texte. */
.logo-lockup__text { isolation: isolate; }   /* le surlignage (z-index -1) reste au-dessus du fond, sous le texte */
.brand-hl { position: relative; }
.brand-hl::before { content: ""; position: absolute; z-index: -1; left: -.08em; right: -.1em; bottom: .02em; height: .42em;
  background: color-mix(in srgb, var(--accent) 70%, transparent); border-radius: .12em .3em .16em .26em; transform: skewX(-12deg) rotate(-1.5deg); }
.logo-lockup--light .brand-hl::before { background: color-mix(in srgb, var(--accent) 38%, transparent); }   /* fond sombre : texte blanc lisible */
/* Point d'exclamation légèrement incliné, façon « Yahoo! » */
.brand { white-space: nowrap; }

/* Couleurs du mot du nom du site (Admin › Paramètres) : classe logo-* sur <body>, logo-sample--* pour les aperçus. */
.logo-sample { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.2; }
body.logo-point .brand-bang, .logo-sample--point .brand-bang { color: var(--brand); }
body.logo-couleur .brand, .logo-sample--couleur .brand { color: var(--brand); }
body.logo-couleur .site-footer .brand { color: var(--brand-light); }
body.logo-degrade .brand, .logo-sample--degrade .brand {
  background: linear-gradient(90deg, var(--brand-light), var(--brand-dark)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.logo-afrique .brand, .logo-sample--afrique .brand {
  background: linear-gradient(90deg, #16a34a 0%, #16a34a 30%, #eab308 50%, #dc2626 75%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Le « ! » garde une couleur unie : la fin du dégradé. */
body.logo-degrade .brand-bang, .logo-sample--degrade .brand-bang { background: none; color: var(--brand-dark); }
body.logo-afrique .brand-bang, .logo-sample--afrique .brand-bang { background: none; color: #dc2626; }
body.logo-degrade .site-footer .brand { background-image: linear-gradient(90deg, var(--brand-light), var(--accent)); }
body.logo-degrade .site-footer .brand-bang { color: var(--accent); }
/* Présentation « Nouveau » : le mot arrondi suit aussi le style choisi (son « ! » épingle est déjà en couleur). */
body.logo-couleur .logo-n__word { color: var(--brand); }
body.logo-degrade .logo-n__word { background: linear-gradient(90deg, var(--brand-light), var(--brand-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.logo-afrique .logo-n__word { background: linear-gradient(90deg, #16a34a 0%, #16a34a 30%, #eab308 55%, #dc2626 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-bang { display: inline-block; transform: skewX(-14deg); transform-origin: 0 100%; margin-left: -1px; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.header-search { flex: 1; display: flex; max-width: 520px; }
.header-search input { flex: 1; border: 1px solid var(--line); border-right: 0; border-radius: 999px 0 0 999px; padding: 9px 16px; font: inherit; background: var(--bg); min-width: 0; }
.header-search button { border: 0; background: var(--brand); color: #fff; padding: 0 16px; border-radius: 0 999px 999px 0; cursor: pointer; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-link { color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--radius-sm); font-weight: 500; background: none; border: 0; font: inherit; cursor: pointer; }
.header-link:hover { background: var(--bg); text-decoration: none; }
.cat-nav { border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 6px 0; white-space: nowrap; }
.cat-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; color: var(--ink-2); font-size: .92rem; }
.cat-nav a:hover, .cat-nav a.active { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; z-index: 50; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--ink); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg); text-decoration: none; }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.mobile-search { display: none; padding: 0 0 10px; }

/* --- Boutons --------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2; text-decoration: none !important; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: #cbd0d8; background: var(--bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1ebe5b; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f2c4c4; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { background: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 6px 12px; font-size: .88rem; }
.btn-lg { padding: 13px 22px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- Formulaires ----------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .93rem; }
.field .optional { font-weight: 400; color: var(--muted); }
.input, .select, .textarea { width: 100%; padding: 10px 12px; border: 1px solid #d5d9e0; border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--ink); }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 25%, transparent); border-color: var(--brand); }
.textarea { min-height: 160px; resize: vertical; }
.input-group { display: flex; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--bg); border: 1px solid #d5d9e0; border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--muted); font-weight: 600; }
.input-group .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group .addon-select { width: auto; flex: none; max-width: 55%; border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--bg); font-weight: 600; padding-right: 6px; }
.country-switch { margin-left: auto; display: flex; align-items: center; gap: 6px; padding-left: 8px; }
.country-switch select { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .88rem; background: #fff; color: var(--ink-2); }
.cat-nav .container { display: flex; align-items: center; }
.help { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.error { font-size: .86rem; color: var(--danger); margin-top: 4px; }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; cursor: pointer; }
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
.otp-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-weight: 700; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.radio-card { border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 600; background: #fff; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.radio-card input { accent-color: var(--brand); }

/* --- Cartes & blocs -------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h2, .card-header h3 { margin: 0; font-size: 1.05rem; }
.stack > * + * { margin-top: 16px; }
.section { margin-bottom: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.text-right { text-align: right; }
.flex { display: flex; gap: 8px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-2 { margin-top: 16px; } .mb-2 { margin-bottom: 16px; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid transparent; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: var(--success-soft); color: #0f5c2e; border-color: #bfe5cd; }
.alert-danger { background: var(--danger-soft); color: #8c1d1d; border-color: #f2c4c4; }
.alert-warning { background: var(--warning-soft); color: #7a4b05; border-color: #f1dca2; }
.alert-info { background: var(--info-soft); color: #1e3a8a; border-color: #c7d6fb; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: #eef0f3; color: var(--muted); }
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); }

/* --- Accueil --------------------------------------------------------- */
.hero { background: linear-gradient(135deg, #1c2430 0%, #2d3a4d 100%); color: #fff; border-radius: 18px; padding: 40px 32px; margin-bottom: 28px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: var(--brand); opacity: .25; }
.hero h1 { font-size: 2rem; max-width: 640px; }
.hero p { color: #cbd5e1; max-width: 560px; }
/* Variante « Photo » du bandeau (Admin › Paramètres › Fond du bandeau) : voile sombre à gauche pour la lisibilité du texte.
   Le second sélecteur l'emporte sur le fond wax de la présentation « Nouveau ». */
.hero.hero--photo, .theme-nouveau .hero.hero--photo, .hero-sample.hero--photo {
  background:
    linear-gradient(100deg, rgba(20, 22, 32, .88) 0%, rgba(20, 22, 32, .66) 45%, rgba(20, 22, 32, .18) 100%),
    url("../images/hero-lbv.jpg") center 58% / cover no-repeat, #2a2433;
}
.hero.hero--photo::after { display: none; }
.hero.hero--photo h1, .hero.hero--photo p { text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }
.hero.hero--photo p { color: #e5e7eb; }
.hero-sample { display: block; width: 100%; height: 64px; border-radius: 10px; background: linear-gradient(135deg, #1c2430 0%, #2d3a4d 100%); }
.hero-search { display: flex; gap: 8px; background: #fff; padding: 6px; border-radius: 14px; width: 100%; position: relative; z-index: 1; flex-wrap: wrap; }
.hero-search input, .hero-search select { border: 0; padding: 10px 12px; font: inherit; min-width: 0; background: transparent; color: var(--ink); }
.hero-search input[name=q] { flex: 2 1 240px; }
.hero-search select, .hero-search input[name=ville] { flex: 1 1 170px; border-left: 1px solid var(--line); }
.hero-search .btn { flex: none; }
.cat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 12px; text-align: center; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.cat-tile .icon-wrap { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; margin: 0 auto 10px; }
.cat-tile strong { display: block; font-size: .95rem; }
.cat-tile span { font-size: .82rem; color: var(--muted); }
/* Tuile avec photo : image en fond, dégradé sombre pour lire le nom et le nombre d'annonces */
.cat-tile.has-photo { position: relative; overflow: hidden; padding: 0; aspect-ratio: 4 / 3; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; text-align: left; border: 0; color: #fff; background: #1c2430; }
.cat-tile.has-photo .cat-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cat-tile.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.78) 100%); }
.cat-tile.has-photo:hover .cat-photo { transform: scale(1.06); }
.cat-tile.has-photo .icon-wrap { position: absolute; top: 10px; left: 10px; z-index: 1; width: 38px; height: 38px; border-radius: 10px; margin: 0; background: rgba(255,255,255,.92); }
.cat-tile.has-photo strong, .cat-tile.has-photo span { position: relative; z-index: 1; padding: 0 12px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.cat-tile.has-photo strong { font-size: 1rem; line-height: 1.2; }
.cat-tile.has-photo span { padding-bottom: 12px; color: rgba(255,255,255,.88); }
.photo-credits { margin: 8px 0 0; font-size: .72rem; color: var(--muted); }
.photo-credits a { color: var(--muted); }
.steps-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step-item .num { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }

/* --- Cartes d'annonces ----------------------------------------------- */
.listing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.listing-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.listing-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); transition: box-shadow .15s, transform .15s; position: relative; }
.listing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); text-decoration: none; }
.listing-card .thumb { aspect-ratio: 4 / 3; background: #eceef2; position: relative; overflow: hidden; }
.listing-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .thumb .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #b3b9c4; }
.listing-card .photo-count { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; padding: 2px 8px; border-radius: 999px; display: flex; gap: 4px; align-items: center; }
.listing-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.listing-card .price { font-weight: 800; font-size: 1.08rem; color: var(--brand-dark); }
.listing-card .title { font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-card .meta { font-size: .82rem; color: var(--muted); margin-top: auto; display: flex; justify-content: space-between; gap: 6px; padding-top: 6px; }
.listing-card .seller { font-size: .82rem; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }

/* --- Recherche ------------------------------------------------------- */
.search-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
/* Filtres de recherche sur toute la largeur */
.filters-bar { margin-bottom: 20px; }
.filters-toggle { display: none; margin-bottom: 12px; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.filters-grid .field { margin-bottom: 14px; }
.filters-grid .input, .filters-grid .select { padding: 9px 10px; }
.filters-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.listing-card .meta > span:first-child { min-width: 0; overflow: hidden; }
.ad-slot.compact { max-width: 300px; margin: 24px auto 0; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumb { font-size: .86rem; color: var(--muted); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb a { color: var(--muted); }
.subcats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .88rem; color: var(--ink-2); }
.chip:hover, .chip.active { border-color: var(--brand); color: var(--brand-dark); text-decoration: none; background: var(--brand-soft); }

/* --- Fiche annonce --------------------------------------------------- */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.gallery-main { aspect-ratio: 4 / 3; background: #111; border-radius: var(--radius); overflow: hidden; position: relative; }
.gallery-main img, .gallery-main video { width: 100%; height: 100%; object-fit: contain; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.9); border: 0; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.gallery-nav.prev { left: 10px; } .gallery-nav.next { right: 10px; }
.gallery-counter { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; padding: 3px 10px; border-radius: 999px; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.gallery-thumbs button { flex: none; width: 78px; height: 58px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: #ddd; position: relative; }
.gallery-thumbs button.active { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-empty { aspect-ratio: 16 / 9; display: grid; place-items: center; background: #eceef2; border-radius: var(--radius); color: var(--muted); }
.detail-price { font-size: 1.7rem; font-weight: 800; color: var(--brand-dark); }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.specs div { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.specs div:nth-child(odd) { border-right: 1px solid var(--line); }
.specs dt { color: var(--muted); } .specs dd { margin: 0; font-weight: 600; text-align: right; }
.description { white-space: pre-line; word-wrap: break-word; }
.seller-box .avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: none; }
.sticky-side { position: sticky; top: 130px; }
.safety { font-size: .86rem; color: var(--ink-2); }
.safety li { margin-bottom: 4px; }
.mobile-contact-bar { display: none; }

/* --- Aperçu de thème (administrateur) ---------------------------------- */
.theme-preview-bar { position: sticky; top: 0; z-index: 100; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; padding: 8px 16px; background: #1b1f2a; color: #fff; font-size: .9rem; }
.theme-preview-bar .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.theme-preview-bar form { display: inline; }
.tpb-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.tpb-group { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tpb-label { color: #9aa3b2; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.tpb-name { font-size: .82rem; color: #cbd5e1; min-width: 7.5em; }
.tpb-chip { color: #e5e7eb; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); font-size: .85rem; }
.tpb-chip:hover { text-decoration: none; background: rgba(255,255,255,.1); }
.tpb-chip.is-active { background: #fff; color: #1b1f2a; font-weight: 600; }
.tpb-swatch { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--sw-a) 0 60%, var(--sw-b) 60%); border: 2px solid rgba(255,255,255,.35); transition: transform .15s; }
.tpb-swatch:hover { transform: scale(1.15); }
.tpb-swatch.is-active { border-color: #fff; box-shadow: 0 0 0 2px #1b1f2a, 0 0 0 4px #fff; }
.palette-dots { display: inline-flex; gap: 4px; }

/* --- Avertissements de sécurité ----------------------------------------- */
.scam-warning, .pin-warning { align-items: flex-start; line-height: 1.5; }
.scam-warning svg, .pin-warning svg { flex: none; margin-top: 2px; }
.contact-warning { display: flex; gap: 6px; align-items: center; color: var(--warning); font-weight: 600; }
.side-nav__logout { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: var(--radius-sm); color: var(--ink-2); font: inherit; font-weight: 500; cursor: pointer; text-align: left; }
.side-nav__logout:hover { background: var(--bg); }

/* --- Barre de navigation mobile (bas d'écran) ---------------------------- */
.bottom-nav { display: none; }
.palette-dots span { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); }

/* --- Localisation GPS des biens immobiliers ------------------------- */
.gps-map { height: 280px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #e9eef3; z-index: 0; }
.gps-field .gps-map { height: 300px; cursor: crosshair; }

/* --- Premium (annonces affichées en premier) ------------------------- */
.badge-premium { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #7a4b00; background: linear-gradient(135deg, #fde68a, #f59e0b); white-space: nowrap; }
.btn-premium { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.btn-premium:hover { background: #b45309; }
.premium-list { list-style: none; padding: 0; margin: 0 0 12px; }
.premium-list li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.premium-list li svg { color: #d97706; flex: none; margin-top: 3px; }
.premium-offer { border: 2px solid #f59e0b; background: linear-gradient(180deg, #fffbeb, #fff 60%); }
.listing-card.is-premium { border-color: #f5c451; box-shadow: 0 0 0 1px #f5c451; }
.listing-card .premium-tag { position: absolute; top: 8px; left: 8px; z-index: 1; }

/* --- Publicité ------------------------------------------------------- */
.ad-slot { margin: 0 0 24px; text-align: center; }
.ad-slot a { display: block; border-radius: var(--radius); overflow: hidden; position: relative; }
.ad-slot img { width: 100%; height: auto; }
.ad-slot .ad-label { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: .68rem; padding: 1px 6px; border-radius: 4px; letter-spacing: .03em; }
.ad-slot.feed { grid-column: 1 / -1; margin: 0; }

/* Colonnes publicitaires latérales : bannières carrées (300×300) empilées, deux par côté,
   à gauche et à droite du contenu des pages publiques. Largeur adaptée à l'écran (220 à 300 px). */
.page-body.with-rails { --rail-w: clamp(220px, 19vw, 300px); display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--rail-w); gap: 16px; max-width: calc(1200px + 2 * var(--rail-w) + 64px); margin: 0 auto; padding: 0 16px; }
.page-body.with-rails main .container { padding: 0; }
.ad-rail { padding-top: 24px; }
.rail-sticky { position: sticky; top: 132px; display: flex; flex-direction: column; gap: 16px; }
.rail-sticky > .ad-label { display: block; text-align: center; font-size: .68rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-bottom: -12px; }
.rail-ad { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); transition: opacity .35s ease; }
.rail-ad.fading { opacity: 0; }
.rail-ad img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Écran trop bas pour deux carrés dans la colonne collante : un seul par côté. */
@media (max-height: 820px) { .rail-ad ~ .rail-ad { display: none; } }

/* --- Espace annonceur ------------------------------------------------ */
.account-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; }
.side-nav a:hover { background: var(--bg); text-decoration: none; }
.side-nav a.active { background: var(--brand-soft); color: var(--brand-dark); }
.side-nav .count { margin-left: auto; font-size: .78rem; background: var(--danger); color: #fff; border-radius: 999px; padding: 0 7px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .value { font-size: 1.5rem; font-weight: 800; }
.stat .label { color: var(--muted); font-size: .86rem; }
.stat.alert-stat .value { color: var(--danger); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.active { border-color: var(--brand); color: var(--brand-dark); }
.tabs .n { font-size: .78rem; color: var(--muted); margin-left: 4px; }
.my-listing { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line); align-items: center; }
.my-listing:last-child { border-bottom: 0; }
.my-listing .thumb { width: 110px; height: 82px; border-radius: var(--radius-sm); background: #eceef2; overflow: hidden; display: grid; place-items: center; color: #b3b9c4; }
.my-listing .thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-listing h3 { font-size: 1rem; margin: 0 0 4px; }
.my-listing .actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 330px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .icon-wrap { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; }

.stepper { display: flex; gap: 8px; margin-bottom: 20px; counter-reset: step; }
.stepper li { flex: 1; list-style: none; padding: 10px 12px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stepper li::before { counter-increment: step; content: counter(step); width: 24px; height: 24px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: .82rem; flex: none; }
.stepper li.done { color: var(--success); }
.stepper li.done::before { background: var(--success); color: #fff; content: "✓"; }
.stepper li.current { border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
.stepper li.current::before { background: var(--brand); color: #fff; }
.stepper { padding: 0; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.media-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: #eceef2; border: 1px solid var(--line); cursor: grab; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item .remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; display: grid; place-items: center; }
.media-item .cover-tag { position: absolute; left: 6px; top: 6px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.media-item .state { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.65); color: #fff; font-size: .72rem; padding: 3px 6px; text-align: center; }
.media-item.uploading { display: grid; place-items: center; cursor: default; }
.progress { height: 6px; background: #dfe3e8; border-radius: 99px; overflow: hidden; width: 80%; }
.progress > div { height: 100%; background: var(--brand); transition: width .2s; }
.dropzone { border: 2px dashed #cbd0d8; border-radius: var(--radius); padding: 28px 16px; text-align: center; background: #fafbfc; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }

.pay-status { text-align: center; padding: 32px 20px; }
.pay-status .big-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; }
.spinner { width: 42px; height: 42px; border: 4px solid #f3d3c1; border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.summary-row:last-child { border-bottom: 0; }

/* --- Tableaux -------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfc; font-weight: 600; }
.table tr:hover td { background: #fcfcfd; }
.table .thumb-sm { width: 56px; height: 42px; border-radius: 6px; object-fit: cover; background: #eceef2; }

/* --- Pagination ------------------------------------------------------ */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--ink); }
.pagination a:hover { border-color: var(--brand); text-decoration: none; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.pagination .disabled { color: #b7bcc5; }

/* --- Modale ---------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }

/* --- Pages légales --------------------------------------------------- */
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.prose h2 { margin-top: 1.6em; font-size: 1.15rem; }
.prose h2:first-of-type { margin-top: .6em; }
.prose li { margin-bottom: .4em; }
.legal-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.legal-contact .sep { color: var(--muted); }
.toc { background: var(--bg); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; columns: 2; font-size: .9rem; }

/* --- Pied de page ---------------------------------------------------- */
.site-footer { background: #151b24; color: #aab3c0; padding: 40px 0 24px; font-size: .92rem; }
.site-footer a { color: #d6dce5; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.site-footer h4 { color: #fff; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid #2a3340; padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* --- Administration -------------------------------------------------- */
.admin-body { background: #f1f3f6; }
.admin-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: #151b24; color: #c7cfda; padding: 16px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .logo { color: #fff; padding: 4px 8px 16px; }
.admin-side .admin-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: var(--brand); color: #fff; padding: 2px 7px; border-radius: 6px; margin-left: 4px; }
.admin-side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: #c7cfda; font-size: .93rem; }
.admin-side a:hover { background: #222b37; text-decoration: none; color: #fff; }
.admin-side a.active { background: var(--brand); color: #fff; }
.admin-side .group { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #6f7b8b; padding: 14px 12px 6px; }
.admin-side .count { margin-left: auto; background: var(--danger); color: #fff; font-size: .72rem; border-radius: 999px; padding: 0 7px; }
.admin-main { padding: 24px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-top h1 { margin: 0; font-size: 1.4rem; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar .input, .filter-bar .select { width: auto; flex: 1 1 160px; padding: 8px 10px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 10px; }
.bars div { flex: 1; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; opacity: .85; }
.bars div:hover { opacity: 1; }
.bars div:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .72rem; padding: 3px 7px; border-radius: 5px; white-space: nowrap; margin-bottom: 4px; z-index: 2; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mod-card img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: blur(14px); transition: filter .2s; cursor: pointer; }
.mod-card img.revealed { filter: none; }
.admin-menu-toggle { display: none; }

/* --- Reçu (impression) ----------------------------------------------- */
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; }
}

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 1199px) {
  .page-body.with-rails { display: block; max-width: none; padding: 0; }
  .page-body.with-rails main .container { padding: 0 16px; }
  .ad-rail { display: none; }
}
@media (max-width: 1024px) {
  .listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .search-layout, .detail-layout, .account-layout { grid-template-columns: minmax(0, 1fr); }
  .filters-toggle { display: inline-flex; }
  .sticky-side { position: static; }
  .steps-band { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-side { position: fixed; left: 0; top: 0; z-index: 90; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .admin-side.open { transform: none; box-shadow: var(--shadow-lg); }
  .admin-menu-toggle { display: inline-flex; }
  .admin-main { padding: 16px; }
  .listing-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .header-search { display: none; }
  .mobile-search { display: block; }
  .mobile-search form { display: flex; }
  .mobile-search input { flex: 1; border: 1px solid var(--line); border-right: 0; border-radius: 999px 0 0 999px; padding: 9px 14px; font: inherit; background: var(--bg); min-width: 0; }
  .mobile-search button { border: 0; background: var(--brand); color: #fff; padding: 0 14px; border-radius: 0 999px 999px 0; }
  .header-link .label-text { display: none; }
  .header-actions .btn .label-text { display: none; }
  .site-header .logo { font-size: 1.15rem; }
  .listing-grid, .listing-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .listing-card .body { padding: 10px; }
  .listing-card .price { font-size: .98rem; }
  .listing-card .title { font-size: .9rem; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 26px 18px; border-radius: 14px; }
  .hero h1 { font-size: 1.45rem; }
  .hero.hero--photo, .theme-nouveau .hero.hero--photo {
    background: linear-gradient(180deg, rgba(20, 22, 32, .82) 0%, rgba(20, 22, 32, .62) 100%), url("../images/hero-lbv-mobile.jpg") 70% center / cover no-repeat, #2a2433;
  }
  .hero-search select, .hero-search input[name=ville] { border-left: 0; border-top: 1px solid var(--line); }
  .hero-search .btn { flex: 1 1 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .specs div:nth-child(odd) { border-right: 0; }
  .my-listing { grid-template-columns: 84px minmax(0, 1fr); }
  .my-listing .thumb { width: 84px; height: 64px; }
  .my-listing .actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .stepper li { font-size: 0; justify-content: center; }
  .stepper li::before { font-size: .82rem; }
  .steps-band { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { columns: 1; }
  .prose { padding: 20px 16px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(16, 24, 40, .08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav__item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--muted); font-size: .7rem; font-weight: 600; text-decoration: none !important; }
  .bottom-nav__item.is-active { color: var(--brand); }
  .bottom-nav__icon { display: grid; place-items: center; width: 34px; height: 28px; border-radius: 999px; }
  .bottom-nav__item.is-active .bottom-nav__icon { background: var(--brand-soft); }
  .bottom-nav__item.is-cta .bottom-nav__icon { width: 46px; height: 46px; margin-top: -20px; background: var(--brand); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent); border: 3px solid #fff; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .header-actions { display: none; }
  .mobile-contact-bar { display: flex; position: fixed; bottom: calc(62px + env(safe-area-inset-bottom)); left: 0; right: 0; background: #fff; padding: 10px 16px; gap: 8px; border-top: 1px solid var(--line); z-index: 30; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
  .mobile-contact-bar .btn { flex: 1; }
  .has-contact-bar { padding-bottom: calc(136px + env(safe-area-inset-bottom)); }
  .card-body { padding: 16px; }
}
