/* ════════════════════════════════════════════════════════
   Polyannonces.com — Feuille de style globale
   Police : Plus Jakarta Sans
   Thème  : Clair (défaut) + Sombre
   ════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ─ Couleurs light ─ */
  --bg:           #f4f5f7;
  --bg-alt:       #ffffff;
  --surface:      #ffffff;
  --card:         #ffffff;
  --card-hover:   #fafafe;
  --border:       #e2e5ec;
  --border-2:     #eceef4;
  --accent:       #ff6b35;
  --accent-h:     #e85c28;
  --accent2:      #7c5cfc;
  --accent2-h:    #6548e0;
  --text:         #0f1117;
  --text-2:       #3a3f4b;
  --muted:        #6b7380;
  --muted-2:      #a0a7b3;
  --green:        #10b981;
  --blue:         #3b82f6;
  --red:          #ef4444;
  --yellow:       #f59e0b;
  --gold:         #f59e0b;

  /* ─ Ombres ─ */
  --sh-xs:  0 1px 3px rgba(0,0,0,.06);
  --sh-sm:  0 2px 8px rgba(0,0,0,.08);
  --sh:     0 4px 20px rgba(0,0,0,.10);
  --sh-lg:  0 8px 40px rgba(0,0,0,.13);
  --sh-xl:  0 16px 60px rgba(0,0,0,.15);

  /* ─ Rayons ─ */
  --r-xs: 6px;
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* ─ Transitions ─ */
  --t: .18s ease;
  --t-slow: .3s ease;

  /* ─ Layout ─ */
  --header-h: 66px;
  --sidebar-w: 272px;
  --max-w: 1380px;
}

/* ── Dark mode ─────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:         #0d0d14;
  --bg-alt:     #13131e;
  --surface:    #13131e;
  --card:       #1c1c2c;
  --card-hover: #22223a;
  --border:     #2c2c44;
  --border-2:   #20202e;
  --text:       #edeff8;
  --text-2:     #c0c3d8;
  --muted:      #7a7d98;
  --muted-2:    #44465a;
  --sh-xs:  0 1px 3px rgba(0,0,0,.35);
  --sh-sm:  0 2px 8px rgba(0,0,0,.4);
  --sh:     0 4px 20px rgba(0,0,0,.5);
  --sh-lg:  0 8px 40px rgba(0,0,0,.6);
  --sh-xl:  0 16px 60px rgba(0,0,0,.7);
}

/* ── Base ──────────────────────────────────────────────── */
html { scroll-behavior: smooth; font-size: 15px; overflow-x: hidden; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--t-slow), color var(--t-slow);
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }

/* ════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════ */
.pa-header {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--sh-xs);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  transition: background var(--t-slow), border-color var(--t-slow);
}

.pa-logo {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -.5px;
  text-decoration: none;
}
.pa-logo span { color: var(--accent); }

/* ─ Nav principale ─ */
.pa-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: .5rem;
}

.pa-nav-item {
  position: relative;
}

.pa-nav-btn {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .45rem .75rem;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  color: var(--text-2);
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}
.pa-nav-btn:hover,
.pa-nav-btn.active {
  background: var(--border-2);
  color: var(--accent);
}
.pa-nav-btn svg { width: 14px; height: 14px; transition: transform var(--t); }
.pa-nav-item:hover .pa-nav-btn svg { transform: rotate(180deg); }

/* ─ Dropdown ─ */
.pa-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-lg);
  padding: .5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t), transform var(--t), visibility var(--t);
  z-index: 600;
}
.pa-nav-item:hover .pa-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pa-dropdown-section { padding: .4rem .6rem .2rem; }
.pa-dropdown-section-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  padding: .3rem .5rem .1rem;
}

.pa-dropdown a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .52rem .75rem;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-weight: 500;
  font-size: .88rem;
  transition: background var(--t), color var(--t);
  text-decoration: none;
}
.pa-dropdown a:hover {
  background: var(--bg);
  color: var(--accent);
}
.pa-dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: .4rem 0;
}

/* Dropdown emploi & services — 2 colonnes */
.pa-dropdown.wide {
  min-width: 420px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 .5rem;
}
.pa-dropdown.wide .pa-dropdown-section { grid-column: span 1; }

/* ─ Header search ─ */
.pa-header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.pa-header-search input {
  width: 100%;
  padding: .55rem 1rem .55rem 2.6rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: .88rem;
  font-weight: 500;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.pa-header-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,107,53,.12);
}
.pa-header-search .search-ico {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

/* ─ Header actions ─ */
.pa-header-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-left: auto;
}

/* Dark mode toggle */
.btn-theme {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1rem;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.btn-theme:hover { background: var(--border-2); color: var(--text); }

/* Sélecteur de zone dans le header */
.header-zone-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 0 .7rem 0 .65rem;
  gap: .3rem;
  transition: border-color var(--t), box-shadow var(--t);
  cursor: pointer;
}
.header-zone-wrap:hover,
.header-zone-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
.header-zone-ico {
  color: var(--accent);
  flex-shrink: 0;
  pointer-events: none;
}
.header-zone-chevron {
  color: var(--muted);
  flex-shrink: 0;
  pointer-events: none;
  transition: transform .2s;
}
.header-zone-wrap:focus-within .header-zone-chevron { transform: rotate(180deg); }
.mobile-zone-wrap { display: none; }
.header-zone-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  padding: .42rem 0;
  cursor: pointer;
  max-width: 140px;
  /* Étend la zone cliquable pour couvrir la flèche (pointer-events:none) */
  padding-right: 20px;
  margin-right: -20px;
}

/* Auth + CTA buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1.1rem; border-radius: 100px; font-weight: 600; font-size: .88rem; transition: background var(--t), color var(--t), box-shadow var(--t), transform var(--t); text-decoration: none; white-space: nowrap; cursor: pointer; }

.btn-ghost { background: transparent; border: 1.5px solid var(--border); color: var(--text-2); }
.btn-ghost:hover { background: var(--bg); border-color: var(--muted-2); color: var(--text); text-decoration: none; }

.btn-primary { background: var(--accent); color: #fff; border: 1.5px solid var(--accent); }
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,107,53,.35); }

.btn-accent2 { background: var(--accent2); color: #fff; border: 1.5px solid var(--accent2); }
.btn-accent2:hover { background: var(--accent2-h); text-decoration: none; }

.btn-outline { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; text-decoration: none; }

.btn-sm { padding: .38rem .85rem; font-size: .82rem; }
.btn-lg { padding: .75rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; border-radius: var(--r-sm); }

/* ─ Hamburger mobile ─ */
.btn-hamburger {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1.5px solid var(--border);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.btn-hamburger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

/* Bouton connexion mobile */
.btn-login-mobile {
  display: none;
  padding: .45rem .85rem;
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: var(--r-sm);
  text-decoration: none;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════
   HERO / BARRE DE RECHERCHE
   ════════════════════════════════════════════════════════ */
.pa-hero {
  background: linear-gradient(135deg, var(--accent) 0%, #ff9256 50%, var(--accent2) 100%);
  padding: 3rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pa-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(255,255,255,.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(0,0,0,.08) 0%, transparent 50%);
}
.pa-hero > * { position: relative; }
.pa-hero h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); color: #fff; font-weight: 800; margin-bottom: .5rem; letter-spacing: -.5px; min-height: 1.2em; }
.pa-hero p { color: rgba(255,255,255,.85); font-size: 1.2rem; margin-bottom: 1.75rem; animation: heroFadeUp .6s cubic-bezier(.22,1,.36,1) 2.2s both; }
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.pa-search-box {
  display: flex;
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 100px;
  padding: .35rem .35rem .35rem 1.25rem;
  box-shadow: var(--sh-xl);
  gap: .5rem;
  align-items: center;
}
.pa-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  outline: none;
  min-width: 0;
}
.pa-search-box input::placeholder { color: var(--muted); }

.pa-search-box select {
  border: none;
  background: transparent;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-2);
  outline: none;
  padding: 0 .75rem 0 .5rem;
  border-left: 1.5px solid var(--border);
  cursor: pointer;
}

.pa-search-box .btn { border-radius: 100px; }

/* ─ Pills de catégories ─ */
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: static;
  z-index: 100;
  transition: max-height .25s ease, opacity .25s ease, padding .25s ease;
  max-height: 500px;
  overflow: hidden;
}
@media (min-width: 901px) {
  .cat-pills {
    position: sticky;
    top: var(--header-h);
  }
}
.cat-bar-hidden .cat-pills,
.cat-bar-hidden .cat-mobile-wrap {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
  overflow: hidden;
}
.cat-pill {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.1rem;
  border-radius: 100px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  font-size: 1.26rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.cat-pill:hover { border-color: var(--accent); color: var(--accent); }
.cat-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-pill .cat-emoji { font-size: 1.43rem; }

/* ════════════════════════════════════════════════════════
   LAYOUT PRINCIPAL (sidebar + grille)
   ════════════════════════════════════════════════════════ */
/* Fil d'Ariane */
.pa-breadcrumb {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem;
  font-size: .82rem;
  color: var(--muted);
  padding: 0 0 .25rem;
}
.pa-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--t);
}
.pa-breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.pa-breadcrumb .bc-sep { margin: 0 .15rem; opacity: .5; font-size: .7rem; }
.pa-breadcrumb .bc-current { color: var(--text); font-weight: 600; }

.pa-main {
  max-width: none;
  margin: 0;
  width: 100%;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  align-items: start;
  transition: grid-template-columns .3s ease;
}
.pa-main.sidebar-collapsed {
  grid-template-columns: 0 1fr;
  gap: 0;
}
.pa-main.sidebar-collapsed .pa-left-col {
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.pa-left-col {
  transition: opacity .2s ease;
}

/* ─ Colonne gauche : filtres + pub séparée ─ */
.pa-left-col {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  align-self: flex-start;
}

/* ─ Sidebar filtres — toujours entièrement visible ─ */
.pa-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  overflow-y: visible;
}

/* ─ Pub sous le filtre — toujours visible ─ */
#adSlotSidebar {
  flex-shrink: 0;
}
/* Le bandeau mobile est caché sur desktop (via classe, spécificité inférieure à la media query) */
.ad-mobile-sticky {
  display: none;
}
#adReserveLink {
  flex-shrink: 0;
}

.filter-title {
  font-size: .92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: .75rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.filter-title::after {
  content: '▾';
  font-size: .7rem;
  flex-shrink: 0;
  transition: transform .18s ease;
}
.filter-section.collapsed .filter-title::after {
  transform: rotate(-90deg);
}
.filter-section.collapsed .filter-title {
  margin-bottom: 0;
}
.filter-section.collapsed > *:not(.filter-title) {
  display: none !important;
}
.filter-section { margin-bottom: 1.4rem; }
.filter-section:last-child { margin-bottom: 0; }

.filter-sep { height: 1px; background: var(--border); margin: 1.2rem 0; }

/* Range sliders */
.range-wrap { position: relative; padding-bottom: .25rem; }
.range-vals {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .4rem;
}
.range-val-accent { color: var(--accent); }

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 4px;
  cursor: pointer;
}

/* Boutons chambres */
.room-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.room-btn {
  padding: .35rem .75rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: .82rem;
  font-weight: 600;
  transition: all var(--t);
}
.room-btn:hover { border-color: var(--accent); color: var(--accent); }
.room-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Checkboxes */
.filter-checks { display: flex; flex-direction: column; gap: .5rem; }
.filter-group-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
  opacity: .8;
  margin-top: .4rem;
  padding-bottom: .1rem;
  border-bottom: 1px solid var(--border);
}
/* Accordéon prestataires */
.fg-accordion { margin-bottom: .15rem; }
.fg-accordion-hd {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; padding: .3rem .1rem;
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--accent); opacity: .85;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.fg-accordion-hd:hover { opacity: 1; }
.fg-chev {
  font-size: .85rem; color: var(--muted); transition: transform .18s ease;
  display: inline-block;
}
.fg-accordion.open .fg-chev { transform: rotate(90deg); }
.fg-accordion-bd { display: none; padding-top: .2rem; }
.fg-accordion.open .fg-accordion-bd { display: block; }
.filter-check {
  display: flex;
  align-items: center;
  gap: .55rem;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-2);
}
.filter-check input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Select filter */
.filter-select {
  width: 100%;
  padding: .52rem .75rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: .88rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t);
}
.filter-select:focus { border-color: var(--accent); }

/* Options select — dark mode */
[data-theme="dark"] .filter-select,
[data-theme="dark"] .header-zone-select,
[data-theme="dark"] .form-select {
  color-scheme: dark;
  background-color: #1c1c2c;
  color: #edeff8;
}
[data-theme="dark"] .filter-select option,
[data-theme="dark"] .header-zone-select option,
[data-theme="dark"] .form-select option,
[data-theme="dark"] select option {
  background-color: #1c1c2c;
  color: #edeff8;
}
[data-theme="dark"] .filter-select optgroup,
[data-theme="dark"] .header-zone-select optgroup,
[data-theme="dark"] .form-select optgroup,
[data-theme="dark"] select optgroup {
  background-color: #13131e;
  color: #7a7d98;
}

/* Bouton reset filtres */
.btn-reset-filters {
  width: 100%;
  padding: .52rem;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: .83rem;
  font-weight: 600;
  transition: all var(--t);
  margin-top: .5rem;
}
.btn-reset-filters:hover { border-color: var(--red); color: var(--red); }

/* ─ Zone contenu ─ */
.pa-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.pa-result-count { font-size: .9rem; font-weight: 600; color: var(--muted); }
.pa-result-count strong { color: var(--text); }

.sort-select {
  padding: .45rem .85rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: .85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t);
}
.sort-select:focus { border-color: var(--accent); }

/* ─ Grille annonces ─ */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* ════════════════════════════════════════════════════════
   CARTE ANNONCE
   ════════════════════════════════════════════════════════ */
.listing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative;
}
.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
  border-color: var(--muted-2);
}
.listing-card.boosted {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(245,158,11,.15), var(--sh-sm);
}

/* Photo */
.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
  font-size: 3.5rem;
  color: var(--muted-2);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.card-img-placeholder { font-size: 3.5rem; text-align: center; line-height: 1; }

/* Badges */
.card-badges {
  position: absolute;
  top: .6rem;
  left: .6rem;
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .22rem .6rem;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-new      { background: var(--green); color: #fff; }
.badge-boost    { background: var(--gold); color: #fff; }
.badge-pro      { background: var(--accent2); color: #fff; }
.badge-exclu    { background: var(--accent); color: #fff; }
.badge-urgent   { background: var(--red); color: #fff; }
.badge-reserved { background: #fef08a; color: #854d0e; }

/* Fav button */
.btn-fav {
  position: absolute;
  top: .6rem;
  right: .6rem;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--t), transform var(--t);
  box-shadow: var(--sh-xs);
}
.btn-fav:hover { background: #fff; transform: scale(1.1); }
.btn-fav.active { color: var(--red); }
[data-theme="dark"] .btn-fav { background: rgba(28,28,44,.92); color: var(--text); }

/* Surface badge immo */
.card-surface-badge {
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent2);
}

/* Corps carte */
.card-body { padding: .9rem; }

.card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .4rem;
  margin-bottom: .25rem;
  flex-wrap: wrap;
}
.card-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -.3px;
  white-space: nowrap;
}
.card-mensualite {
  flex-basis: 100%;
  order: 2; /* après le prix (order par défaut 0) et le m² (explicite -> reste visuellement à droite de la 1re ligne) */
  display: block;
  cursor: pointer;
  opacity: .9;
  text-align: left;
  line-height: 1.3;
}
.card-mensualite:hover { opacity: 1; }
.card-mensualite-val {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent2);
  white-space: nowrap;
}
.card-mensualite-val small { font-weight: 600; margin-left: .1rem; font-size: .88rem; }
.card-mensualite-sub {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.card-price-sub {
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: .1rem;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  margin-bottom: .2rem;
  flex-wrap: wrap;
}
.card-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-location {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .92rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: .6rem;
}

.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .6rem;
}
.card-feat {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg);
  padding: .22rem .55rem;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .65rem;
  border-top: 1px solid var(--border-2);
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
}

/* Share button on card */
.btn-card-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: all var(--t);
  flex-shrink: 0;
}
.btn-card-share:hover { border-color: var(--blue); color: var(--blue); background: var(--bg-2); }

.card-view-tag {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .68rem;
  font-weight: 600;
  color: #1a6fb5;
  background: rgba(26,111,181,.10);
  border: 1px solid rgba(26,111,181,.22);
  border-radius: 20px;
  padding: .15rem .5rem;
  white-space: nowrap;
}
[data-theme="dark"] .card-view-tag { color: #7ec8f7; background: rgba(126,200,247,.12); border-color: rgba(126,200,247,.25); }

.card-loan-hint {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .76rem;
  font-weight: 700;
  color: var(--accent2);
  background: rgba(124,92,252,.09);
  border-radius: var(--r-xs);
  padding: .22rem .55rem;
  margin-top: .4rem;
  cursor: pointer;
  transition: background var(--t), transform var(--t);
  border: 1px solid rgba(124,92,252,.18);
}
.card-loan-hint:hover {
  background: rgba(124,92,252,.18);
  transform: translateY(-1px);
}

.pa-nav-btn-sim {
  color: var(--accent2) !important;
  font-weight: 700;
}
.pa-nav-btn-sim:hover {
  background: rgba(124,92,252,.1) !important;
  color: var(--accent2) !important;
}

/* ════════════════════════════════════════════════════════
   PAGE DÉTAIL
   ════════════════════════════════════════════════════════ */
.pa-detail {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  transition: color var(--t);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}
.detail-back:hover { color: var(--accent); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: start;
}
.detail-grid > div {
  min-width: 0;       /* empêche les enfants grid de forcer une largeur > container */
  overflow: hidden;    /* clip le contenu qui dépasse (images, iframes) */
}

/* Gallery */
.detail-gallery { position: relative; }
.gallery-main {
  width: 100%;
  max-height: 72vh;
  min-height: 220px;
  border-radius: var(--r);
  background: var(--bg-2);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  touch-action: pan-y;
}
.gallery-track {
  display: flex;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
  height: 100%;
}
.gallery-track.no-transition { transition: none; }
.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 220px;
  max-height: 72vh;
}
.gallery-slide img {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
/* Flèches carousel */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, opacity .15s;
  opacity: 0;
}
.gallery-main:hover .gallery-arrow { opacity: 1; }
.gallery-arrow:hover { background: rgba(0,0,0,.7); }
.gallery-arrow--prev { left: 10px; }
.gallery-arrow--next { right: 10px; }
/* Compteur photos */
.gallery-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: .22rem .7rem;
  border-radius: 20px;
  pointer-events: none;
}
/* Forcer les images inline (via style=) à respecter le container */
.detail-gallery img { max-width: 100% !important; }
.gallery-thumbs {
  display: flex;
  gap: .5rem;
  margin-top: .5rem;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 80px; height: 60px;
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--t);
  flex-shrink: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Caption overlay photo principale */
.gallery-caption {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: .55rem 1rem .7rem;
  background: linear-gradient(to bottom, rgba(0,0,0,.62) 0%, transparent 100%);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  letter-spacing: .01em;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

/* Détail contenu */
.detail-badges { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.detail-title { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; letter-spacing: -.4px; }
.detail-location { display: flex; align-items: center; gap: .4rem; font-size: .92rem; color: var(--muted); font-weight: 600; margin-bottom: 1rem; }

.detail-features { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.detail-feat { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 600; color: var(--text-2); background: var(--bg); padding: .4rem .85rem; border-radius: 100px; border: 1.5px solid var(--border); }

.detail-section { margin-bottom: 1.75rem; }
.detail-section-title { font-size: 1rem; font-weight: 700; margin: 0 0 .75rem; padding-bottom: .5rem; border-bottom: 1.5px solid var(--border); }
.detail-desc-title { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .6rem; }
.detail-desc-box { background: var(--card); border: 1.5px solid var(--border); border-left: 4px solid var(--accent); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 1rem 1.25rem; }
.detail-desc { line-height: 1.85; color: var(--text); font-size: .95rem; }
.detail-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }

.detail-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .6rem;
}
.detail-option-pill {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .6rem .9rem;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-2);
}
.detail-option-pill span { flex: 1; }
[data-theme="dark"] .detail-option-pill { background: rgba(255,255,255,.04); }
.spec-item { background: var(--bg); border-radius: var(--r-sm); padding: .85rem; border: 1px solid var(--border); }
.spec-label { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem; }
.spec-value { font-size: 1rem; font-weight: 700; color: var(--text); }

/* ── Immo : stats clés (surface, chambres, sdb, parking) ── */
.immo-key-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .65rem;
  margin: 1.1rem 0 1.5rem;
}
@media (max-width: 520px) { .immo-key-stats { grid-template-columns: repeat(2, 1fr); } }
.immo-key-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .9rem .5rem .8rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  text-align: center;
  gap: .15rem;
  transition: border-color var(--t), box-shadow var(--t);
}
.immo-key-stat:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.08); }
.immo-stat-icon { font-size: 1.4rem; line-height: 1; margin-bottom: .1rem; }
.immo-stat-value { font-size: 1.3rem; font-weight: 900; color: var(--text); line-height: 1.1; }
.immo-stat-label { font-size: .65rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: .1rem; }

/* ── Immo : groupes équipements ── */
.immo-equip-group { margin-bottom: 1.2rem; }
.immo-equip-group:last-child { margin-bottom: 0; }
.immo-equip-group-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .6rem;
  padding: .35rem .75rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1.5px solid currentColor;
  width: fit-content;
  opacity: .85;
}

/* ── Simulateur immo repensé ── */
.sim-field { display: flex; flex-direction: column; }
.sim-field label { font-size: .68rem; color: var(--muted); font-weight: 700; display: block; margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .04em; }
.sim-field input { width: 100%; padding: .42rem .6rem; border: 1.5px solid var(--border); border-radius: 8px; font-size: .9rem; background: var(--bg); color: var(--text); font-weight: 700; transition: border-color .15s; box-sizing: border-box; }
.sim-field input:focus { outline: none; border-color: var(--accent); }
.sim-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem .75rem; margin-bottom: .55rem; }
.sim-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .55rem .6rem; }
.sim-section-label {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: .25rem .6rem;
  display: inline-block;
  margin-bottom: .45rem;
  margin-top: .25rem;
}
.sim-breakdown {
  background: var(--bg);
  border-radius: 10px;
  border: 1.5px solid var(--border);
  padding: .65rem .9rem;
  margin-top: .65rem;
  font-size: .8rem;
}
.sim-bd-row { display: flex; justify-content: space-between; align-items: center; padding: .22rem 0; color: var(--text-2); gap: .5rem; }
.sim-bd-row span:last-child { font-weight: 700; color: var(--text); white-space: nowrap; }
.sim-bd-sep { border: none; border-top: 1.5px solid var(--border); margin: .4rem 0; }
.sim-bd-row.sim-total { font-weight: 800; font-size: .85rem; color: var(--text); }
.sim-bd-row.sim-total span:last-child { color: var(--accent2); }
.sim-mensualite-block { display: flex; align-items: baseline; gap: .4rem; margin-bottom: .85rem; }
.sim-mensualite { font-size: 2rem; font-weight: 900; color: var(--accent2); line-height: 1; }
.sim-mensualite-label { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* Sidebar détail */
.detail-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  box-shadow: var(--sh-sm);
}
.detail-price { font-size: 2rem; font-weight: 800; color: var(--accent); letter-spacing: -.5px; margin-bottom: .25rem; }
.detail-price-type { font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 1.25rem; }

.seller-card { display: flex; align-items: center; gap: .75rem; padding: .85rem; background: var(--bg); border-radius: var(--r-sm); border: 1px solid var(--border); margin-top: 1rem; }
.seller-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 1rem; flex-shrink: 0; }
.seller-name { font-weight: 700; font-size: .92rem; color: var(--text); }
.seller-since { font-size: .78rem; color: var(--muted); font-weight: 500; }

/* ── Étoiles vendeur ── */
.seller-star-widget {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: .1rem .5rem .1rem .3rem;
  font-size: .8rem;
  line-height: 1;
}
.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  color: var(--muted);
  transition: transform .15s, color .15s;
}
.star-btn:hover  { transform: scale(1.25); color: #f59e0b; }
.star-btn.starred { color: #f59e0b; }
.star-count {
  font-weight: 700;
  font-size: .78rem;
  color: var(--text-2);
  min-width: .8rem;
  text-align: center;
}

/* ── Liste d'attente ── */
.wl-box {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.wl-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1rem;
  background: linear-gradient(135deg, #fff7e6, #fff3cd);
  border-bottom: 1.5px solid #f5c842;
}
[data-theme="dark"] .wl-header { background: linear-gradient(135deg, #2d2500, #3a3000); border-bottom-color: #6b5a00; }
.wl-title { font-weight: 800; font-size: .85rem; color: #b8860b; display: flex; align-items: center; gap: .4rem; }
[data-theme="dark"] .wl-title { color: #f5c842; }
.wl-count-badge {
  background: #f5c842; color: #7a5c00;
  font-size: .72rem; font-weight: 800;
  padding: .15rem .5rem; border-radius: 20px;
}
.wl-body { padding: .75rem 1rem; }
.wl-empty { font-size: .82rem; color: var(--muted); text-align: center; padding: .5rem 0; }
.wl-position { font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: .6rem; }
.btn-wl-join {
  width: 100%; padding: .65rem; border-radius: 30px;
  background: linear-gradient(135deg, #f5c842, #e6a800);
  color: #5a3e00; border: none; font-weight: 800;
  font-size: .88rem; cursor: pointer; font-family: inherit;
  transition: opacity .15s;
}
.btn-wl-join:hover { opacity: .85; }
.btn-wl-leave {
  width: 100%; padding: .55rem; border-radius: 30px;
  background: none; border: 1.5px solid var(--border);
  color: var(--muted); font-size: .8rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all .15s; margin-top: .4rem;
}
.btn-wl-leave:hover { border-color: #e53e3e; color: #e53e3e; }
.wl-full { font-size: .82rem; color: var(--muted); text-align: center; font-weight: 600; }
.wl-person-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .45rem 0; border-bottom: 1px solid var(--border);
  gap: .5rem;
}
.wl-person-row:last-child { border-bottom: none; }
.wl-person-num { font-size: .72rem; font-weight: 800; color: var(--muted); min-width: 18px; }
.wl-person-name { font-size: .82rem; font-weight: 600; flex: 1; }
.btn-wl-contact {
  padding: .3rem .75rem; border-radius: 20px; font-size: .72rem; font-weight: 700;
  background: var(--accent2); color: #fff; border: none; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: opacity .15s;
}
.btn-wl-contact:hover { opacity: .85; }

.detail-actions { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.25rem; }
.detail-actions-row { display: flex; gap: .5rem; }
.btn-contact { width: 100%; padding: .85rem; font-size: 1rem; font-weight: 700; border-radius: var(--r-sm); }
.btn-share, .btn-fav-detail {
  flex: 1;
  padding: .7rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-2);
  font-size: .88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: all var(--t);
}
.btn-share:hover { border-color: var(--blue); color: var(--blue); }
.btn-fav-detail.active { border-color: var(--red); color: var(--red); }

/* ════════════════════════════════════════════════════════
   FORMULAIRE DÉPOSER ANNONCE
   ════════════════════════════════════════════════════════ */
.pa-form-page {
  max-width: 780px;
  margin: 2rem auto;
  padding: 0 1.5rem 3rem;
}

.form-page-title { font-size: 1.75rem; font-weight: 800; margin-bottom: .35rem; letter-spacing: -.4px; }
.form-page-sub { color: var(--muted); font-size: .95rem; margin-bottom: 2rem; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--sh-xs);
}
.form-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.form-card-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row.col3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .9rem; }
.form-group:last-child { margin-bottom: 0; }

label.form-label {
  font-size: .84rem;
  font-weight: 700;
  color: var(--text-2);
}
label.form-label span { color: var(--red); margin-left: .15rem; }

/* Champ désactivé : label + input grisés automatiquement */
.form-group:has(:disabled) label.form-label {
  color: var(--muted) !important;
}
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--border);
}

.form-input,
.form-select,
.form-textarea {
  padding: .62rem .9rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: .92rem;
  font-weight: 500;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,107,53,.1);
}
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.65; }

/* Upload photos */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  background: var(--bg);
}
.photo-upload-area:hover,
.photo-upload-area.drag-over {
  border-color: var(--accent);
  background: rgba(255,107,53,.04);
}
.photo-upload-area .upload-ico { font-size: 2.5rem; margin-bottom: .75rem; }
.photo-upload-area p { font-size: .92rem; color: var(--muted); font-weight: 500; }
.photo-upload-area strong { color: var(--text); }
.photo-upload-area small { font-size: .78rem; color: var(--muted-2); margin-top: .25rem; display: block; }
#photoInput { display: none; }

.photos-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

/* ── Miniature photo (drag & drop + caption) ── */
.photo-thumb {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-sm);
  border: 2px dashed var(--muted-2);
  background: var(--bg);
  overflow: hidden;
  cursor: grab;
  transition: border-color var(--t), box-shadow var(--t), opacity var(--t);
  user-select: none;
}
.photo-thumb:hover    { border-color: var(--muted); box-shadow: var(--sh-xs); }
.photo-thumb:active   { cursor: grabbing; }
.photo-thumb.main-photo { border-color: var(--accent); border-style: solid; }
.photo-thumb.dragging   { opacity: .45; border-style: dashed; border-color: var(--muted-2); }
.photo-thumb.drag-target {
  border-color: var(--accent2);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(124,92,252,.22);
}

/* Zone image */
.photo-img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  flex-shrink: 0;
}
.photo-img-wrap img { width: 100%; height: 100%; object-fit: contain; background: var(--bg-2); }

/* Bouton recadrer */
.photo-crop-btn {
  position: absolute; bottom: 5px; left: 5px;
  background: rgba(0,0,0,.55); color: #fff;
  border: none; border-radius: 6px; padding: 3px 7px;
  font-size: .68rem; font-weight: 700; cursor: pointer;
  opacity: 0; transition: opacity var(--t); z-index: 3;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; gap: .25rem;
}
.photo-thumb:hover .photo-crop-btn,
.photo-crop-btn:focus { opacity: 1; }
@media (hover: none) { .photo-crop-btn { opacity: .85; } }

/* Bouton supprimer */
.photo-remove {
  position: absolute;
  top: .3rem; right: .3rem;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  color: #fff;
  border: none;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--t);
  z-index: 3;
}
.photo-thumb:hover .photo-remove { opacity: 1; }

/* Badge numéro photo — en haut à gauche (ne bloque pas le champ titre) */
.photo-num-badge {
  position: absolute;
  top: .28rem; left: .28rem;
  background: rgba(0,0,0,.52);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  padding: .13rem .42rem;
  border-radius: 100px;
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  white-space: nowrap;
}
.photo-thumb.main-photo .photo-num-badge { background: var(--accent); }

/* Placeholder de chargement */
.photo-img-loading {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.photo-spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  opacity: .65;
}

/* Poignée de déplacement (en haut à droite pour ne pas chevaucher le badge) */
.drag-handle {
  position: absolute;
  top: .28rem; right: .28rem;
  width: 22px; height: 22px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  opacity: 0;
  transition: opacity var(--t);
  z-index: 2;
  touch-action: none; /* important : désactive le scroll natif sur la poignée */
}
.photo-thumb:hover .drag-handle { opacity: 1; }
.photo-thumb:active .drag-handle { cursor: grabbing; }
/* Sur mobile : toujours visible pour indiquer que le drag est possible */
@media (hover: none) {
  .drag-handle { opacity: .8; width: 30px; height: 30px; }
}

/* Champ titre de la photo */
.photo-caption-input {
  width: 100%;
  border: none;
  border-top: 1px solid var(--border-2);
  padding: .32rem .45rem;
  font-size: .72rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  cursor: text;
}
.photo-caption-input:focus { background: rgba(124,92,252,.05); }
.photo-caption-input::placeholder { color: var(--muted-2); }

/* ── Contact visibility toggles ── */
.contact-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.contact-label-row .form-label { margin-bottom: 0; }
.contact-show-label {
  display: flex;
  align-items: center;
  gap: .28rem;
  font-size: .74rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}
.contact-show-label input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
  width: 14px;
  height: 14px;
}
.contact-field-off {
  pointer-events: none;
  background: var(--bg) !important;
  color: var(--muted) !important;
  -webkit-text-fill-color: var(--muted) !important;
  border-color: var(--border-2) !important;
}
/* Label grisé automatiquement quand la case "Afficher" est décochée */
.contact-label-row:has(input[type="checkbox"]:not(:checked)) .form-label {
  color: var(--muted) !important;
  font-weight: 500;
}

.photo-compress-status {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: .5rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* Options / checkboxes grille */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .5rem;
}
.option-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .75rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-2);
  transition: all var(--t);
}
.option-check input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.option-check:has(input:checked) { border-color: var(--accent); background: rgba(255,107,53,.06); color: var(--accent); }

.options-group-sep {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0 0;
}
.options-group-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin: .75rem 0 .4rem;
}

/* Progress bar upload */
.upload-progress { margin-top: .75rem; }
.progress-bar { height: 6px; background: var(--border); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 100px; transition: width .3s ease; width: 0; }
.progress-text { font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: .4rem; }

/* ════════════════════════════════════════════════════════
   COMPTE UTILISATEUR
   ════════════════════════════════════════════════════════ */
.pa-account {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.account-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.account-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.account-avatar-area {
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
}
.account-avatar-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto .75rem;
  cursor: pointer;
}
.account-avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 800;
  border: 3px solid rgba(255,255,255,.55);
  overflow: hidden;
  transition: filter var(--t);
}
.account-avatar-wrap:hover .account-avatar { filter: brightness(.78); }
/* Badge caméra en bas à droite */
.avatar-cam-badge {
  position: absolute;
  bottom: 0; right: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.28);
  pointer-events: none;
  font-size: .75rem;
}

/* Preview avatar dans le formulaire profil */
.profile-avatar-preview {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.account-name { font-weight: 700; font-size: 1rem; }
.account-email { font-size: .8rem; opacity: .8; }
.account-nav { padding: .5rem; }
.account-nav-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem .9rem;
  border-radius: var(--r-sm);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.account-nav-item:hover { background: var(--bg); color: var(--accent); }
.account-nav-item.active { background: rgba(255,107,53,.1); color: var(--accent); }
.account-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Sections compte */
.account-section { display: none; overflow-x: hidden; }
.account-section.active { display: block; }
/* Consent boxes : responsive */
.consent-box {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
  background: #fef9f0;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: .75rem .9rem;
  margin-bottom: .75rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.consent-box > input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: .15rem;
  width: 16px;
  height: 16px;
  accent-color: #7c5cfc;
}
.consent-box > span {
  flex: 1 1 0%;
  min-width: 0;
  font-size: .8rem;
  color: #78350f;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: break-word;
}

.account-section-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 1.25rem; letter-spacing: -.3px; }

/* Mes annonces table */
.my-listings { display: flex; flex-direction: column; gap: .75rem; }
.my-listing-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: .9rem;
  transition: box-shadow var(--t), border-color var(--t);
  cursor: pointer;
}
.my-listing-row:hover { box-shadow: var(--sh-sm); border-color: var(--accent); }

/* ── Flèches carrousel ── */
.card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0,0,0,.38);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, background .2s;
  padding: 0;
}
.card-arrow-left  { left: .45rem; }
.card-arrow-right { right: .45rem; }
.listing-card:hover .card-arrow { opacity: 1; }
.card-arrow:hover { background: rgba(0,0,0,.62); }
@media (hover: none) {
  .card-arrow { opacity: .75; width: 34px; height: 34px; font-size: 1.45rem; }
}

/* ── Carrousel carte annonce ── */
.card-carousel-dots {
  position: absolute;
  bottom: .5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .3rem;
  z-index: 2;
  pointer-events: none;
}
.card-carousel-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  transition: background .25s, transform .25s;
}
.card-carousel-dots span.active {
  background: #fff;
  transform: scale(1.35);
}

/* ── Badge compteur photos ── */
.badge-photo-count {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  background: rgba(0,0,0,.58);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .12rem .42rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  margin-left: .25rem;
}
/* ── Bouton play sur les cartes vidéo ── */
.card-play-btn:hover > div,
.card-play-btn:focus > div {
  transform: scale(1.12);
  background: rgba(220,38,38,1) !important;
}
.card-video-wrap iframe {
  border: none;
}

.my-listing-img {
  width: 80px; height: 64px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.my-listing-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .18rem; }
.my-listing-title { font-weight: 700; font-size: .93rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-listing-meta { font-size: .78rem; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-listing-bottom { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .1rem; }
.my-listing-price { font-weight: 800; font-size: .95rem; color: var(--accent); white-space: nowrap; }
.my-listing-actions { display: flex; gap: .4rem; flex-shrink: 0; align-items: center; flex-wrap: nowrap; }
.listing-status-indicator { display: flex; align-items: center; gap: .4rem; margin-right: .25rem; }
.listing-action-btns { display: flex; align-items: center; gap: .4rem; }
.status-live-right { display: flex; align-items: center; gap: .3rem; margin-left: auto; padding-left: .5rem; white-space: nowrap; }
.status-label { font-size: .72rem; font-weight: 700; }
.label-active   { color: #22c55e; }
.label-reserved { color: #f59e0b; }
.label-sold     { color: #ef4444; }
.label-paused   { color: #9ca3af; }
.btn-icon { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--bg); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .9rem; transition: all var(--t); }
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-icon.danger:hover { background: #c0392b; border-color: #c0392b; color: #fff; }
.btn-icon.play { background: #22c55e; border-color: #22c55e; color: #fff; }
.btn-icon.play:hover { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn-icon.pause { background: var(--bg); border-color: var(--border); color: var(--muted); }
.btn-icon.edit { background: #ff6b00; border-color: #ff6b00; color: #fff; }
.btn-icon.edit:hover { background: #e05e00; border-color: #e05e00; color: #fff; }
.btn-icon.duplicate { background: #6366f1; border-color: #6366f1; color: #fff; }
.btn-icon.duplicate:hover { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.btn-action.duplicate {
  height: 34px; padding: 0 .75rem; border-radius: var(--r-sm);
  background: #6366f1; border: 1.5px solid #6366f1; color: #fff;
  font-size: .8rem; font-weight: 700; font-family: inherit;
  display: flex; align-items: center; gap: .3rem;
  cursor: pointer; white-space: nowrap; transition: all var(--t);
}
.btn-action.duplicate:hover { background: #4f46e5; border-color: #4f46e5; }

/* Boost card */
.boost-card {
  background: linear-gradient(135deg, #fff8f0, #fff0e8);
  border: 1.5px solid rgba(255,107,53,.25);
  border-radius: var(--r);
  padding: 1.25rem;
  margin-top: .6rem;
}
[data-theme="dark"] .boost-card { background: rgba(255,107,53,.08); border-color: rgba(255,107,53,.2); }
.boost-card-title { font-weight: 700; font-size: .95rem; color: var(--accent); margin-bottom: .75rem; display: flex; align-items: center; gap: .4rem; }
.boost-options { display: flex; gap: .6rem; flex-wrap: wrap; }
.boost-option {
  flex: 1;
  min-width: 100px;
  padding: .85rem .65rem;
  border-radius: var(--r-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
}
.boost-option:hover { border-color: var(--accent); }
.boost-option.selected { border-color: var(--accent); background: rgba(255,107,53,.08); }
.boost-option .boost-days { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.boost-option .boost-label { font-size: .72rem; font-weight: 600; color: var(--muted); }
.boost-option .boost-price { font-size: .9rem; font-weight: 700; color: var(--accent); margin-top: .25rem; }

/* Stats cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem; text-align: center; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--accent); letter-spacing: -.5px; }
.stat-label { font-size: .78rem; font-weight: 600; color: var(--muted); margin-top: .2rem; }

/* ════════════════════════════════════════════════════════
   PAGE LOGIN / REGISTER
   ════════════════════════════════════════════════════════ */
.pa-auth-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: var(--bg);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--sh-lg);
}
.auth-logo { text-align: center; margin-bottom: 1.75rem; }
.auth-logo .logo-text { font-size: 1.6rem; font-weight: 800; }
.auth-logo .logo-text span { color: var(--accent); }
.auth-tabs { display: flex; background: var(--bg); border-radius: var(--r-sm); padding: .3rem; margin-bottom: 1.75rem; }
.auth-tab {
  flex: 1;
  padding: .5rem;
  border-radius: calc(var(--r-sm) - 2px);
  border: none;
  background: transparent;
  font-size: .9rem;
  font-weight: 700;
  color: var(--muted);
  transition: all var(--t);
}
.auth-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--sh-xs); }
.auth-form { display: flex; flex-direction: column; gap: .85rem; }
.auth-divider { text-align: center; font-size: .8rem; color: var(--muted); font-weight: 600; margin: .5rem 0; position: relative; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--border); }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ════════════════════════════════════════════════════════
   MODAL
   ════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-slow), visibility var(--t-slow);
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 2rem;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--sh-xl);
  transform: scale(.95) translateY(16px);
  transition: transform var(--t-slow);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.modal-title { font-size: 1.15rem; font-weight: 800; }
.modal-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--muted);
  transition: all var(--t);
}
.modal-close:hover { background: var(--border); color: var(--text); }

/* Modal simulateur de crédit */
.sim-tabs { display: flex; background: var(--bg); border-radius: var(--r-sm); padding: .25rem; margin-bottom: 1.25rem; }
.sim-tab { flex: 1; padding: .5rem; border-radius: calc(var(--r-sm) - 2px); border: none; background: transparent; font-size: .88rem; font-weight: 700; color: var(--muted); transition: all var(--t); cursor: pointer; }
.sim-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--sh-xs); }

.sim-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
.sim-label { font-size: .83rem; font-weight: 600; color: var(--text-2); }
.sim-val { font-size: .88rem; font-weight: 700; color: var(--accent); }
.sim-section { margin-bottom: 1.25rem; }

.sim-results { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: 1.25rem; }
.sim-result-card { background: var(--bg); border-radius: var(--r-sm); padding: .85rem; border: 1px solid var(--border); }
.sim-result-label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2rem; }
.sim-result-value { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.sim-result-value.accent { color: var(--accent); }
.sim-result-value.green { color: var(--green); }

/* ════════════════════════════════════════════════════════
   TOAST
   ════════════════════════════════════════════════════════ */
.toast-container { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; width: calc(100% - 2rem); max-width: 420px; }
.toast {
  background: var(--text);
  color: var(--bg-alt);
  padding: .7rem 1.25rem;
  border-radius: 16px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: var(--sh-lg);
  white-space: normal;
  word-break: break-word;
  text-align: center;
  animation: toastIn .25s ease;
}
.toast.success { background: var(--green); color: #fff; }
.toast.error   { background: var(--red);   color: #fff; }
.toast.info    { background: var(--accent); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════ */
.pa-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 1.5rem;
  margin-top: 3rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2rem; max-width: var(--max-w); margin: 0 auto 2rem; }
.footer-col-title { font-weight: 700; font-size: .88rem; margin-bottom: .75rem; color: var(--text); }
.footer-col a { display: block; font-size: .85rem; color: var(--muted); font-weight: 500; margin-bottom: .4rem; transition: color var(--t); }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); flex-wrap: wrap; gap: .5rem; }
.footer-logo { font-weight: 800; font-size: 1.1rem; color: var(--text); }
.footer-logo span { color: var(--accent); }

/* ════════════════════════════════════════════════════════
   UTILITAIRES
   ════════════════════════════════════════════════════════ */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--muted); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.font-bold    { font-weight: 700; }
.font-extra   { font-weight: 800; }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: .5rem; }
.mb-2  { margin-bottom: 1rem; }
.hidden { display: none !important; }
.flex { display: flex; align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, var(--border-2) 25%, var(--border) 50%, var(--border-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { height: 320px; border-radius: var(--r); }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state .empty-ico { font-size: 3.5rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.empty-state p { color: var(--muted); font-size: .92rem; }

/* Loader spinner */
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Status badge */
.status-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 100px; font-size: .75rem; font-weight: 700; }
.status-active   { background: rgba(16,185,129,.12); color: var(--green); }
.status-paused   { background: rgba(107,115,128,.12); color: var(--muted); }
.status-sold     { background: rgba(239,68,68,.12); color: var(--red); }
.status-boosted  { background: rgba(245,158,11,.12); color: var(--gold); }
.status-reserved { background: rgba(234,179,8,.15); color: #b45309; }

/* ── Badge numéro spot ── */
.pub-spot-badge {
  display: inline-flex; align-items: center;
  font-size: .7rem; font-weight: 800; padding: 2px 10px; border-radius: 20px;
  background: var(--accent2); color: #fff; flex-shrink: 0; white-space: nowrap;
}

/* ── Mini carte visuelle emplacement pub ── */
.admap-wrap {
  margin: .5rem 0 .1rem; border: 1.5px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.admap-title {
  font-size: .7rem; font-weight: 700; color: var(--muted);
  padding: .35rem .7rem; border-bottom: 1px solid var(--border);
  background: var(--bg); text-transform: uppercase; letter-spacing: .05em;
}
.admap-browser { background: var(--bg); }
.admap-topbar {
  display: flex; align-items: center; gap: .4rem;
  padding: .3rem .5rem; background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
}
[data-theme="dark"] .admap-topbar { background: #1e293b; border-color: #334155; }
.admap-dots { display: flex; gap: 4px; }
.admap-dots span { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.admap-url {
  flex: 1; font-size: .6rem; color: #94a3b8;
  background: #fff; border-radius: 4px; padding: 1px 6px; font-family: monospace;
}
[data-theme="dark"] .admap-url { background: #0f172a; }
.admap-page { padding: .4rem .5rem; }
.admap-nav {
  height: 10px; background: var(--accent2); border-radius: 4px; margin-bottom: .35rem;
}
.admap-spot {
  display: flex; align-items: center; gap: .35rem;
  border-radius: 5px; padding: .25rem .5rem; font-size: .68rem; font-weight: 700;
  margin-bottom: .3rem; border: 1.5px solid;
}
.admap-mine  { background: rgba(16,185,129,.12); border-color: #10b981; color: #065f46; }
.admap-other { background: rgba(239,68,68,.07);  border-color: #ef4444; color: #991b1b; opacity: .75; }
[data-theme="dark"] .admap-mine  { color: #6ee7b7; }
[data-theme="dark"] .admap-other { color: #fca5a5; }
.admap-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.admap-mine  .admap-dot { background: #10b981; }
.admap-other .admap-dot { background: #ef4444; }
.admap-layout { display: flex; gap: .35rem; align-items: flex-start; }
.admap-sidebar { width: 52px; flex-shrink: 0; }
.admap-filter { height: 5px; background: var(--border); border-radius: 2px; margin-bottom: .2rem; }
.admap-main { flex: 1; min-width: 0; }
.admap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem; }
.admap-card { height: 18px; background: var(--card); border: 1px solid var(--border); border-radius: 3px; }
.admap-detail-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 5px; padding: .4rem; margin-bottom: .3rem;
}
.admap-detail-img { height: 30px; background: var(--border); border-radius: 3px; margin-bottom: .25rem; }

/* ── Cartes publicités compte ── */
.pub-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 14px; overflow: hidden;
  margin-bottom: .75rem; display: flex; flex-direction: column;
}
/* Bannière au ratio réel du slot */
.pub-card-banner {
  position: relative; width: 100%; overflow: hidden;
  background: var(--bg-2);
}
.pub-card-banner img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.pub-card-banner-empty {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem; color: var(--muted); font-size: .82rem; font-weight: 600;
}
.pub-promo-label {
  position: absolute; top: 6px; left: 8px;
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  color: var(--muted); background: var(--bg);
  padding: 1px 6px; border-radius: 4px; z-index: 2;
}
.pub-card-body {
  padding: .9rem 1.1rem 1rem;
  display: flex; flex-direction: column; gap: .35rem;
}
.pub-card-title { font-weight: 800; font-size: .95rem; white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.pub-card-slot { font-size: .75rem; color: var(--muted); font-weight: 600; }
.pub-card-status { display:inline-flex;align-items:center;gap:.3rem;font-size:.72rem;font-weight:700;padding:2px 8px;border-radius:20px; }
.pub-status-active   { background:#d1fae5;color:#065f46; }
.pub-status-live     { background:#d1fae5;color:#065f46;animation:pub-live-pulse 1.6s ease-in-out infinite; gap:.35rem; }
.pub-live-dot {
  display:inline-block; width:7px; height:7px; border-radius:50%;
  background:#10b981; flex-shrink:0;
  box-shadow:0 0 0 2px rgba(16,185,129,.3);
  animation:pub-live-pulse 1.6s ease-in-out infinite;
}
.pub-status-soon     { background:#fef3c7;color:#92400e; }
.pub-status-pending  { background:#fef3c7;color:#92400e; }
.pub-status-rejected { background:#fee2e2;color:#991b1b; }
.pub-status-expired  { background:var(--bg-2);color:var(--muted); }
@keyframes pub-live-pulse {
  0%,100% { opacity:1; }
  50%     { opacity:.65; }
}
.pub-card-countdown { font-size:.8rem;font-weight:700;color:#c0392b; }
.pub-card-preview {
  border: 1.5px dashed var(--border); border-radius: 8px;
  padding: .5rem .75rem;
  font-size: .78rem; color: var(--muted); font-style: italic;
}

/* ── Sections spot publicités (page compte → pubs) ── */
.spots-sections { display: flex; flex-direction: column; gap: 1rem; }
.spot-section {
  border: 1.5px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--card);
}
.spot-section-header {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1.1rem; border-bottom: 1.5px solid var(--border);
  background: var(--bg);
}
.spot-num-badge {
  flex-shrink: 0; background: var(--accent2); color: #fff;
  font-size: .7rem; font-weight: 800; padding: .22rem .65rem;
  border-radius: 20px; letter-spacing: .04em;
}
.spot-section-info { flex: 1; min-width: 0; }
.spot-section-name { font-weight: 800; font-size: .9rem; }
.spot-section-desc { font-size: .73rem; color: var(--muted); margin-top: .1rem; }
.spot-section-price {
  flex-shrink: 0; font-size: .78rem; font-weight: 800;
  color: var(--accent2); white-space: nowrap; text-align: right;
}
/* État vide */
.spot-empty-body {
  padding: 1.5rem; display: flex; flex-direction: column;
  align-items: center; gap: .6rem; text-align: center;
}
.spot-empty-ico { font-size: 1.8rem; }
.spot-empty-txt { font-size: .82rem; color: var(--muted); font-weight: 600; }
/* Liste d'annonces dans la section */
.spot-ads-list { display: flex; flex-direction: column; }
.spot-ad-item { border-top: 1px solid var(--border); }
.spot-ad-item:first-child { border-top: none; }
.spot-media-panel {
  position: relative; overflow: hidden; background: var(--bg-2);
}
.spot-media-panel img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Bannière cliquable */
.spot-media-panel-clickable { cursor: pointer; }
.spot-media-panel-hover {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45); color: #fff;
  font-size: .82rem; font-weight: 700; letter-spacing: .03em;
  opacity: 0; transition: opacity .18s;
}
.spot-media-panel-clickable:hover .spot-media-panel-hover { opacity: 1; }
.spot-media-panel-empty {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem; color: var(--muted); font-size: .82rem; font-weight: 600;
  min-height: 60px; padding: 1rem;
}

/* Quick status buttons */
.my-listing-actions { flex-direction: column; align-items: stretch; gap: .4rem; }
.quick-status-row { display: flex; gap: .3rem; }
.qs-btn {
  flex: 1; padding: .28rem .2rem; border-radius: 6px; font-size: .7rem; font-weight: 700;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--muted);
  cursor: pointer; font-family: inherit; transition: all .12s; white-space: nowrap;
}
.qs-btn:hover { border-color: var(--accent2); color: var(--accent2); }
.qs-btn.qs-active { background: var(--accent2); color: #fff; border-color: var(--accent2); }
.listing-action-btns { display: flex; gap: .3rem; justify-content: flex-end; }
.boost-days-left { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700; color: var(--gold); background: rgba(245,158,11,.1); padding: .2rem .55rem; border-radius: 100px; margin-left: .35rem; }

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-active    { background: #22c55e; }
.dot-reserved  { background: #f59e0b; }
.dot-paused    { background: #9ca3af; }

/* ── Card reserved overlay ───────────────────────────── */
.card-reserved-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: .05em;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  z-index: 2;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════ */

/* ── Grands écrans intermédiaires (laptop étroit, écran portrait) ── */
@media (max-width: 1280px) {
  /* Masquer les liens secondaires qui surchargent le header */
  .pa-nav-btn-sim, #navMarche { display: none; }
  /* Afficher le hamburger pour y accéder quand même */
  .btn-hamburger { display: flex; }
}

@media (max-width: 1100px) {
  :root { --sidebar-w: 220px; }

  /* Header : réduire l'encombrement */
  .pa-header { padding: 0 1.1rem; gap: .6rem; }
  .pa-header-search { max-width: 280px; }

  /* Masquer la nav principale, afficher le hamburger à la place */
  .pa-nav { display: none; }
  .btn-hamburger { display: flex; }

  /* Masquer le lien Publicité (moins prioritaire) */
  .btn-pub-cta { display: none !important; }

  /* Cat pills : scroll horizontal → évite le retour à la ligne sur 2 rangées */
  .cat-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: .7rem 1.25rem;
  }
  .cat-pills::-webkit-scrollbar { display: none; }

  /* Grille annonces : minmax 240px → 3 colonnes possibles à 1080px */
  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 900px) {
  #btnCloseSidebar { display: flex !important; }
  .pa-nav { display: none; }
  .pa-header-search { display: none; }
  .btn-hamburger { display: flex; }

  /* Empêche le header de dépasser la largeur de l'écran */
  .pa-header { overflow: hidden; padding: 0 .75rem; gap: .4rem; }
  .pa-logo { font-size: 1.15rem; flex-shrink: 0; }

  /* Cache le bouton Se connecter desktop / Mon compte desktop (accessible via menu) */
  #btn-login, #btn-account { display: none !important; }
  /* Affiche le bouton connexion mobile */
  .btn-login-mobile:not(.hidden) { display: inline-flex !important; }
  .pa-header-actions { gap: .35rem; }

  #btnCloseSidebar { display: flex !important; }

  .pa-main { grid-template-columns: 1fr; }
  .pa-left-col { position: static; height: auto; display: none; }
  .pa-left-col.open { display: flex; }
  .pa-sidebar { flex: none; }

  /* ── Spot 3 — pied de page mobile (visible au scroll) ── */
  .ad-mobile-sticky {
    display: block;
    width: 100%;
    padding: 1.25rem .75rem 1.5rem;
    border-top: 1.5px solid var(--border);
    background: var(--surface);
    text-align: center;
  }
  /* Ad réelle : centrée, format normal */
  .ad-mobile-sticky .ad-sidebar {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
  }
  .ad-mobile-sticky .ad-sidebar img {
    max-height: 200px;
    width: 100%;
    object-fit: cover;
    border-radius: var(--r-sm);
  }
  /* Slot vide : centré */
  .ad-mobile-sticky .ad-empty {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
  }

  /* Bouton Filtres mobile */
  .btn-filters-mobile {
    display: none; /* affiché via JS */
    align-items: center; gap: .4rem;
    padding: .45rem .8rem;
    border-radius: var(--r-sm);
    background: var(--surface); border: 1.5px solid var(--border);
    color: var(--text); font-size: .82rem; font-weight: 700;
    font-family: inherit; cursor: pointer; white-space: nowrap;
    transition: border-color var(--t), background var(--t);
  }
  .btn-filters-mobile:hover { border-color: var(--accent); color: var(--accent); }
  .btn-filters-mobile.active { background: var(--accent); color: #fff; border-color: var(--accent); }
  .btn-filters-mobile.has-filters { background: #16a34a; color: #fff; border-color: #16a34a; }
  .btn-filters-mobile.active.has-filters { background: #15803d; border-color: #15803d; }
  .btn-filters-mobile .chevron-filters { transition: transform .2s; }
  .btn-filters-mobile.active .chevron-filters { transform: rotate(180deg); }

  .detail-grid { grid-template-columns: 1fr; }
  .detail-sidebar-card { position: static; }

  /* ════ COMPTE — MOBILE ════ */
  .pa-account { padding: 0; }

  .account-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  /* La sidebar devient un header sticky compact */
  .account-sidebar {
    position: sticky;
    top: var(--header-h);
    z-index: 50;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    overflow: hidden;           /* empêche le débordement horizontal */
    width: 100%;
    max-width: 100vw;
  }

  /* Bannière profil : horizontale compacte */
  .account-avatar-area {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1rem;
    text-align: left;
    border-radius: 0;
  }
  .account-avatar-wrap { margin: 0; flex-shrink: 0; }
  .account-avatar { width: 40px; height: 40px; font-size: .85rem; }
  .avatar-cam-badge { width: 16px; height: 16px; bottom: -2px; right: -2px; }
  .account-avatar-wrap:hover .account-avatar { filter: none; }
  .account-name { font-size: .88rem; font-weight: 700; margin-bottom: .05rem; }
  .account-email { font-size: .7rem; opacity: .7; }

  /* ── Nav mobile : barre slide ────────────── */
  .account-nav-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  /* Gradient indicateur "encore des onglets →" */
  .account-nav-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 36px;
    background: linear-gradient(to right, transparent, var(--surface));
    pointer-events: none;
    z-index: 1;
  }

  .account-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    padding: .4rem .75rem .5rem;
    gap: .3rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
  }
  .account-nav::-webkit-scrollbar { display: none; }
  .account-nav > div { display: none !important; }

  .account-nav > *,
  .account-nav > button,
  .account-nav > a {
    /* flex: 0 0 auto force la taille sur le contenu, annule width:100% */
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: unset !important;
    max-width: none !important;
  }

  .account-nav-item {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: unset !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    padding: .4rem .6rem;
    border-radius: 18px;
    border: none;
    background: var(--bg);
    font-size: .62rem;
    font-weight: 700;
    white-space: nowrap;
    min-height: 46px;
    color: var(--muted);
    text-align: center;
    transition: background .15s, color .15s;
    cursor: pointer;
  }
  .account-nav-item svg {
    display: block;
    width: 18px; height: 18px;
    margin: 0 auto;
    flex-shrink: 0;
  }
  .account-nav-item.active {
    background: var(--accent) !important;
    color: #fff !important;
  }
  .account-nav-item:hover { background: var(--bg-2); color: var(--text); }

  /* Sections contenu */
  .account-section { padding: 1.1rem .9rem; }
  .account-section-title { font-size: 1.15rem; margin-bottom: 1rem; }

  /* Stats : 2 colonnes, 5ème card pleine largeur */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .stats-grid .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat-value { font-size: 1.4rem; }
  .stat-card { padding: .75rem; }

  /* Raccourcis dashboard : 1 colonne */
  .account-shortcuts { grid-template-columns: 1fr !important; }

  /* Marché aux Puces : titre + bouton en colonne sur mobile */
  .marche-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .6rem !important;
  }
  .marche-header > button,
  #btnToggleStand { width: 100%; text-align: center; }

  /* Photo de profil : passe en colonne */
  .form-group[style*="flex-direction:row"] {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .form-row { grid-template-columns: 1fr; }
  .form-row.col3 { grid-template-columns: 1fr 1fr; }

  /* ─── Crédits boost ─────────────────────── */
  /* Packs : 2 colonnes sur tablette/mobile */
  #creditPacksContainer { grid-template-columns: repeat(2,1fr) !important; }

  /* Solde : passe en colonne */
  .credit-balance-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .5rem !important;
  }
  .credit-balance-row #activeBoostsDisplay {
    text-align: left !important;
  }
  .credit-balance-card {
    padding: .9rem 1rem !important;
  }

  /* Liste des boosts actifs : texte plus compact */
  #activeBoostsList { font-size: .82rem; }
  #activeBoostsList > div {
    flex-wrap: wrap !important;
  }

  /* Modal boost : packs 2 colonnes */
  #boostOptionsContainer { grid-template-columns: repeat(2,1fr) !important; }

  /* Consent box : empêcher débordement */
  .consent-box {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .consent-box span {
    flex: 1 !important;
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }

  /* ─── Marché aux Puces ──────────────────── */
  #section-dashboard [style*="align-items:center"][style*="justify-content:space-between"] {
    flex-direction: column;
    align-items: flex-start !important;
    gap: .6rem;
  }

  /* ─── En-tête "Mes annonces" ────────────── */
  #section-mes-annonces > div:first-child {
    flex-direction: column;
    align-items: flex-start;
  }

  /* ─── Formulaire profil ─────────────────── */
  #section-profil .form-card { padding: 1rem; }
  #section-profil .form-row { grid-template-columns: 1fr; }

  /* ─── Champ montant crédits ─────────────── */
  #creditsCustomAmount { font-size: .95rem; }

  /* ════ FAVORIS ════════════════════════════ */
  #section-favoris .my-listings {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  #section-favoris .my-listing-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: .75rem 0 !important;
    gap: .85rem !important;
    overflow: visible !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 1px solid var(--border) !important;
  }
  #section-favoris .my-listing-img {
    width: 76px !important;
    height: 62px !important;
    aspect-ratio: unset !important;
    border-radius: var(--r-sm) !important;
    border: 1px solid var(--border) !important;
    flex-shrink: 0 !important;
  }
  #section-favoris .my-listing-info {
    padding: 0 !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  #section-favoris .my-listing-title {
    font-size: .88rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }
  #section-favoris .my-listing-meta {
    font-size: .74rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  #section-favoris .my-listing-price { font-size: .9rem !important; }

  /* ════ MON PROFIL ══════════════════════════ */
  #section-profil .btn.btn-primary,
  #section-profil .btn.btn-outline:not(.btn-sm) {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
  }
  /* Form cards : pleine largeur, style iOS (pas de bords latéraux) */
  #section-profil .form-card {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    margin-left: -.9rem !important;
    margin-right: -.9rem !important;
    padding: 1rem .9rem !important;
    margin-bottom: 2px !important;
    box-shadow: none !important;
  }

  /* ════ MES PUBLICITÉS ══════════════════════ */
  .pub-card-title { white-space: normal !important; }
  #section-pubs > div:last-child .btn,
  #section-pubs > div:last-child a.btn {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
  }

  /* ════ CRÉDITS BOOST ═══════════════════════ */
  /* Forcer tout le contenu à rester dans les limites */
  #section-credits {
    padding-left: .35rem !important;
    padding-right: .35rem !important;
    overflow: hidden !important;
  }
  #section-credits > div,
  #section-credits label {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Packs : 2 colonnes */
  #creditPacksContainer {
    grid-template-columns: repeat(2, 1fr) !important;
    overflow-x: unset !important;
  }

  /* Solde card : passer en colonne */
  .credit-balance-card {
    padding: .85rem .75rem !important;
  }
  .credit-balance-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .5rem !important;
  }
  #section-credits #activeBoostsDisplay {
    text-align: left !important;
  }
  #section-credits #creditBalanceDisplay {
    font-size: 1.5rem !important;
  }

  /* Boosts actifs : passer en colonne sur mobile */
  #activeBoostsList > div {
    flex-wrap: wrap !important;
    padding: .6rem .65rem !important;
    gap: .5rem !important;
  }
  #activeBoostsList > div > button {
    margin-left: auto !important;
    margin-top: .25rem !important;
  }

  /* Montant libre */
  #section-credits #creditsCustomAmount {
    width: 100% !important;
    font-size: .95rem !important;
  }

  /* Consent checkbox : empêcher débordement texte */
  .consent-box {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .consent-box span {
    flex: 1 !important;
    min-width: 0 !important;
    font-size: .73rem !important;
    line-height: 1.4 !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }

  /* Bouton submit */
  #section-credits #creditsSubmitBtn {
    font-size: .85rem !important;
    padding: .7rem .8rem !important;
  }

  /* Historique achats : flex-wrap + colonne */
  #creditRequestsList > div {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .5rem !important;
    padding: .65rem .7rem !important;
  }
  #creditRequestsList > div > div:last-child {
    align-items: flex-start !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: .35rem !important;
  }

  /* ── Modal Boost responsive ─────────────── */
  #boostModal .modal {
    max-width: 95vw !important;
    margin: .5rem !important;
    padding: .85rem !important;
    overflow-x: hidden !important;
  }
  #boostOptionsContainer {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .4rem !important;
  }
  /* Solde dans modal : colonne */
  .boost-modal-balance {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .5rem !important;
    padding: .7rem .8rem !important;
  }
  .boost-modal-balance > div:last-child {
    text-align: left !important;
  }
  /* Input montant libre modal */
  #boostCustomAmount {
    width: 100% !important;
    font-size: .9rem !important;
  }
  /* Consent modal */
  #boostModal label {
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  #boostModal label span {
    font-size: .73rem !important;
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }
  /* Bouton boost dans modal */
  #boostModal .btn {
    font-size: .85rem !important;
    padding: .65rem .8rem !important;
  }

  /* ════ MESSAGES ════════════════════════════ */
  .chat-account-open-btn {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
  }

  /* ════ GÉNÉRAL : sections responsive ═══════ */
  /* Empêche tout débordement horizontal dans les sections */
  .account-section * { max-width: 100%; box-sizing: border-box; }
  .account-section img { max-width: 100%; height: auto; }

  /* Formulaires : inputs et selects pleine largeur */
  .account-section .form-input,
  .account-section .form-select { width: 100% !important; }

  /* Cartes form-card : padding réduit */
  .form-card { padding: 1rem !important; }

  /* Mes annonces : header titre + bouton en colonne */
  #section-mes-annonces > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .5rem !important;
  }
  #section-mes-annonces > div:first-child a.btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center;
  }
  /* Onglets statut : scroll horizontal si beaucoup */
  #section-mes-annonces > div:nth-child(2) {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
    padding-bottom: .2rem;
  }

  /* Crédits : solde + éléments internes */
  #section-credits .form-input,
  #section-credits input { width: 100% !important; }
  #creditPacksContainer > div { min-height: 70px; }
}

@media (max-width: 900px) {
  /* Éléments groupés dans le drawer hamburger */
  .btn-post-cta       { display: none !important; }
  .btn-theme          { display: none !important; }
  .btn-pub-cta        { display: none !important; }
  .header-zone-wrap   { display: none !important; }
  .mobile-zone-wrap   { display: flex !important; }
  /* Bouton "Déposer" centré dans le hero visible uniquement sur mobile */
  .hero-post-btn { display: flex !important; }

  /* Pub top-listing sur mobile : taille réduite */
  .ad-top {
    border-radius: var(--r-sm);
    margin-bottom: .75rem;
  }
  .ad-top img,
  #spotTop img {
    min-height: unset !important;
    max-height: none !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: unset !important;
    object-fit: contain !important;
    display: block;
  }
  .ad-top .spot-text-inner { min-height: 70px; font-size: .85rem; }
  .spot-info-bar {
    padding: .4rem .65rem;
    gap: .2rem .05rem;
  }
  .spot-info-chip { font-size: .75rem; }
}

/* ── Wrapper barre sous-filtres (flèches desktop) ── */
.sub-bar-scroll-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--surface);
}

/* Flèches de défilement — masquées par défaut et sur mobile */
.sub-bar-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  padding: 0;
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: color .15s, opacity .15s;
  z-index: 2;
}
.sub-bar-arrow:hover { color: var(--accent); }
.sub-bar-arrow.disabled { opacity: .25; pointer-events: none; }

/* Flèches visibles uniquement sur desktop quand il y a débordement */
@media (min-width: 901px) {
  .sub-bar-scroll-wrap.has-overflow .sub-bar-arrow { display: flex; }
  /* Dégradé sur les bords pour indiquer le défilement */
  .sub-bar-scroll-wrap.has-overflow .sub-bar-arrow.left  {
    box-shadow: 3px 0 6px -2px var(--border);
  }
  .sub-bar-scroll-wrap.has-overflow .sub-bar-arrow.right {
    box-shadow: -3px 0 6px -2px var(--border);
  }
  /* Quand overflow : aligner à gauche pour que le scroll démarre en début */
  .sub-bar-scroll-wrap.has-overflow .mobile-sub-bar { justify-content: flex-start; }
}

/* ── Barre sous-filtres (sous les catégories) ── */
.mobile-sub-bar {
  display: none;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: .4rem;
  padding: .45rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}
@media (max-width: 900px) {
  .mobile-sub-bar { justify-content: flex-start; }
}
.mobile-sub-bar::-webkit-scrollbar { display: none; }
.cat-bar-hidden .mobile-sub-bar { opacity: 0; pointer-events: none; overflow: hidden; }
.mobile-sub-bar.visible { display: flex; }

/* ── Recherche mobile par catégorie ────────────────── */
.mobile-cat-search {
  display: none;
  margin-bottom: .75rem;
}
.mobile-cat-search.visible { display: block; }
.mobile-cat-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.mobile-cat-search-wrap > svg {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  z-index: 1;
}
.mobile-cat-search input[type="search"] {
  width: 100%;
  padding: .48rem 2.4rem .48rem 2.35rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .83rem;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t, .15s), box-shadow var(--t, .15s);
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
.mobile-cat-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.mobile-cat-search input[type="search"]::placeholder { color: var(--muted); font-weight: 500; }
.mobile-cat-search input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,107,53,.12);
}
.mobile-cat-search-clear {
  position: absolute;
  right: .7rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--border);
  border: none;
  cursor: pointer;
  color: var(--text);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background var(--t, .15s);
}
.mobile-cat-search-clear:hover { background: var(--muted); color: #fff; }
.mobile-cat-search-clear.visible { display: flex; }
.subpill {
  flex-shrink: 0;
  padding: .55rem 1.3rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: 1.52rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
  font-family: inherit;
  transition: all var(--t, .15s);
}
.subpill:hover { border-color: var(--accent); color: var(--accent); }
.subpill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Mobile cat select ─────────────────────────────── */
.cat-mobile-wrap {
  display: none;
  padding: .6rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: static;
  z-index: 100;
  transition: max-height .25s ease, opacity .25s ease, padding .25s ease;
  max-height: 80px;
  overflow: hidden;
}
.cat-mobile-select {
  width: 100%;
  padding: .55rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  appearance: auto;
}

@media (max-width: 600px) {
  .pa-hero { padding: 2rem 1rem; }
  .pa-search-box { flex-direction: column; border-radius: var(--r); padding: .75rem; }
  .pa-search-box input { width: 100%; padding: .6rem .85rem; }
  .pa-search-box select { border-left: none; border-top: 1.5px solid var(--border); width: 100%; padding: .6rem .85rem; }
  .pa-search-box .btn { width: 100%; justify-content: center; }

  /* Pub hero cachée sur mobile */
  #adSlotHero { display: none !important; }

  /* Barre catégories non-sticky sur mobile — défile avec la page */
  .cat-pills {
    position: static;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    padding: .6rem 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: .4rem;
  }
  .cat-pills::-webkit-scrollbar { display: none; }
  .cat-pill { flex-shrink: 0; }

  /* ── Réduire le padding du conteneur principal ── */
  .pa-main { padding: .75rem; }

  /* ── Grille annonces : 1 seule colonne sur petit mobile ── */
  .listings-grid { grid-template-columns: 1fr; gap: .65rem; }

  /* ── Barre tri/filtres : wrap propre ── */
  .pa-content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
  }
  .pa-content-header > div {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .sort-select { flex: 1; min-width: 0; font-size: .82rem; }
  .btn-filters-mobile { flex-shrink: 0; }


  /* ═══ DETAIL PAGE MOBILE ═══ */

  /* Réduire le padding global du conteneur détail */
  .pa-detail { padding: .75rem .6rem; }

  /* Grille détail : single column */
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Sidebar card : pas sticky, padding réduit */
  .detail-sidebar-card {
    position: static;
    padding: 1rem;
    border-radius: 12px;
  }

  /* Barre contact fixe en bas sur mobile (ajoutée via JS) */
  .detail-mobile-contact-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem .75rem;
    padding-bottom: calc(.6rem + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1.5px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0,0,0,.1);
  }
  .detail-mobile-contact-bar .btn { flex: 1; justify-content: center; padding: .65rem .5rem; font-size: .82rem; gap: .35rem; }
  .detail-mobile-contact-bar .btn-primary { flex: 1.2; }

  /* Galerie photo carousel */
  .gallery-main {
    max-height: 55vh;
    min-height: 180px;
    border-radius: 10px;
  }
  .gallery-slide { max-height: 55vh; }
  .gallery-slide img { max-height: 55vh; }
  .gallery-arrow { opacity: .7; width: 36px; height: 36px; font-size: 1rem; }
  .gallery-arrow--prev { left: 6px; }
  .gallery-arrow--next { right: 6px; }
  .gallery-thumbs { gap: .35rem; }
  .gallery-thumb { width: 60px; height: 45px; }

  /* Titres et textes */
  .detail-title { font-size: 1.25rem; letter-spacing: -.3px; }
  .detail-price { font-size: 1.5rem; }
  .detail-location { font-size: .84rem; margin-bottom: .75rem; }
  .detail-desc { font-size: .88rem; line-height: 1.75; }
  .detail-desc-box { padding: .75rem 1rem; }
  .detail-section { margin-bottom: 1.25rem; }
  .detail-section-title { font-size: .92rem; }

  /* Badges */
  .detail-badges { margin-top: .75rem; }

  /* Seller card compact */
  .seller-card { padding: .65rem; gap: .6rem; margin-top: .75rem; }
  .seller-avatar { width: 38px; height: 38px; font-size: .88rem; }
  .seller-name { font-size: .85rem; }

  /* Actions */
  .detail-actions { gap: .45rem; margin-top: .75rem; }
  .detail-actions-row { gap: .4rem; }
  .detail-actions-row > * { flex: 1; font-size: .78rem; }

  /* Simulateur crédit */
  .sim-grid-3 { grid-template-columns: 1fr 1fr 1fr; gap: .4rem; }
  .sim-mensualite { font-size: 1.6rem; }
  .sim-field input { font-size: .82rem; padding: .38rem .5rem; }
  .sim-field label { font-size: .64rem; }

  /* Immo key stats */
  .immo-key-stats { gap: .5rem; }
  .immo-key-stat { padding: .55rem .5rem; }

  /* Features */
  .detail-features { gap: .35rem; margin-bottom: 1rem; }
  .detail-feat { font-size: .8rem; padding: .3rem .65rem; }

  /* Boutons share/fav */
  .btn-share, .btn-fav-detail { font-size: .78rem; padding: .45rem .7rem; }

  .form-card { padding: 1.25rem; }
  .form-row.col3 { grid-template-columns: 1fr; }

  .auth-card { padding: 1.75rem 1.25rem; }

  .boost-options { flex-direction: column; }

  /* ─── Listing cards style (inspiré de index.html) ──── */
  .my-listings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
  }

  .my-listing-row {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    overflow: hidden;
  }

  /* Image pleine largeur avec ratio 4/3 comme listing-card */
  .my-listing-img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }

  .my-listing-info {
    padding: .55rem .6rem .3rem;
    gap: .22rem;
  }

  .my-listing-title {
    font-size: .82rem;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
  }

  .my-listing-meta {
    font-size: .7rem;
    white-space: normal;
    line-height: 1.3;
  }

  .my-listing-price { font-size: .88rem; }

  /* Actions : pleine largeur sous l'info */
  .my-listing-actions {
    flex-direction: column;
    gap: .3rem;
    padding: .3rem .6rem .55rem;
  }

  .quick-status-row { flex-wrap: wrap; gap: .25rem; }
  .qs-btn { font-size: .65rem; padding: .25rem .15rem; }

  .listing-action-btns {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: .25rem;
  }

  .my-listing-actions .btn-icon { width: 28px; height: 28px; font-size: .78rem; }
  .status-live-right { margin-left: auto; font-size: .7rem; }
  .btn-action.duplicate { height: 28px; font-size: .72rem; padding: 0 .5rem; }

}

/* ════════════════════════════════════════════════════════
   Chat — Panneau messagerie temps réel
   ════════════════════════════════════════════════════════ */

/* ── Badge non-lus ──────────────────────────────────────── */
.chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 100px;
  line-height: 1;
}

/* ── Bouton header ──────────────────────────────────────── */
.chat-header-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--text);
  transition: background .15s, border-color .15s;
}
.chat-header-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
}
.chat-header-btn .chat-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  font-size: .6rem;
  padding: 0 4px;
}

/* ── Overlay ────────────────────────────────────────────── */
.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .3);
  z-index: 999;
  backdrop-filter: blur(2px);
}

/* ── Panel principal (modal centré 3 colonnes) ──────────── */
.chat-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(980px, 96vw);
  height: min(88vh, 820px);
  z-index: 1000;
  background: var(--surface);
  box-shadow: 0 8px 40px rgba(0, 0, 0, .18);
  border-radius: 14px;
  transform: translate(-50%, -48%) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1), opacity .25s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* ── 3 colonnes ─────────────────────────────────────────── */
.chat-3col {
  display: grid;
  grid-template-columns: 230px 195px 1fr;
  flex: 1;
  overflow: hidden;
}
.chat-col-1 {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-col-2 {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-col-3 {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
#chatNewMsgPill {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  padding: .38rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
  z-index: 20;
  user-select: none;
  animation: pillFadeIn .18s ease;
}
@keyframes pillFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.chat-col-hd {
  padding: .5rem .75rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.chat-col-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.chat-col-section-hd {
  padding: .4rem .75rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-listing-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem .85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-2);
  transition: background .15s;
}
.chat-listing-item:hover { background: var(--bg); }
.chat-listing-item.active {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-left: 3px solid var(--accent);
}

/* ── En-tête panel ──────────────────────────────────────── */
.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  background: var(--surface);
}

/* ── Corps du panel (legacy, gardé pour compatibilité) ─── */
.chat-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ── Liste conversations ────────────────────────────────── */
.chat-conv-list {
  width: 100%;
  overflow-y: auto;
  flex-shrink: 0;
}
.chat-conv-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-2);
  transition: background .15s;
}
.chat-conv-item:hover {
  background: var(--bg);
}
.chat-conv-item.active {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-left: 3px solid var(--accent);
}
.chat-conv-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.chat-conv-preview {
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.chat-conv-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .15rem;
  gap: .5rem;
}

/* ── Panneau messages ───────────────────────────────────── */
.chat-messages-pane {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.chat-messages-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  flex-shrink: 0;
  background: var(--surface);
}
.chat-messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

/* ── Bulles de messages ─────────────────────────────────── */
.chat-msg {
  max-width: 75%;
  padding: .6rem .9rem;
  border-radius: 18px;
  font-size: .88rem;
  line-height: 1.45;
  word-break: break-word;
}
/* Empêcher sélection texte + menu natif mobile sur les bulles et contacts */
.chat-msg, .chat-msg-received-wrap, .chat-conv-item, .chat-listing-item {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.chat-msg.sent {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
}
.chat-msg.received {
  align-self: flex-start;
  background: var(--bg);
  color: var(--text);
  border-radius: 18px 18px 18px 4px;
  border: 1px solid var(--border-2);
}
.chat-msg-footer {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: .25rem;
  justify-content: flex-end;
}
.chat-msg.received .chat-msg-footer { justify-content: flex-start; }
.chat-msg-time {
  font-size: .65rem;
  opacity: .75;
}
.chat-msg-edited {
  font-size: .62rem;
  opacity: .6;
  font-style: italic;
}
/* Bouton modifier message */
.chat-msg-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .7rem;
  padding: 0 .1rem;
  opacity: 0;
  transition: opacity .15s;
  line-height: 1;
}
.chat-msg.sent:hover .chat-msg-edit-btn { opacity: .8; }

/* Bouton supprimer conversation */
.chat-conv-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .8rem;
  padding: .1rem .2rem;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .15s;
  line-height: 1;
}
.chat-conv-item:hover .chat-conv-delete-btn { opacity: .7; }
.chat-conv-delete-btn:hover { opacity: 1 !important; background: rgba(239,68,68,.1); }

/* Avatar conversation */
.chat-conv-avatar {
  width: 42px; height: 42px; min-width: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem;
  overflow: hidden;
}
.chat-conv-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── Swipe-to-delete ─────────────────────────────────────── */
.swipe-wrap {
  position: relative;
  overflow: hidden;
}
.swipe-inner {
  position: relative;
  z-index: 1;
  will-change: transform;
  background: var(--bg-card, var(--bg));
}
.swipe-del-reveal {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 80px;
  background: #ef4444;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  z-index: 0;
  border: none;
  padding: 0;
}
.swipe-del-reveal:active { background: #dc2626; }

/* Wrapper bulle reçue avec avatar */
.chat-msg-received-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: .4rem;
  align-self: flex-start;
  max-width: 85%;
}
.chat-bubble-avatar {
  width: 24px; height: 24px; min-width: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 800;
  overflow: hidden; flex-shrink: 0;
}
.chat-bubble-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Edition inline de message */
.chat-edit-form { width: 100%; }
.chat-edit-input {
  width: 100%;
  padding: .4rem .65rem;
  border: 1.5px solid rgba(255,255,255,.6);
  border-radius: 8px;
  font-size: .88rem;
  background: rgba(255,255,255,.15);
  color: #fff;
  outline: none;
  margin-bottom: .4rem;
  box-sizing: border-box;
}
.chat-edit-btns {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
}
.chat-edit-cancel {
  padding: .22rem .6rem;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  font-size: .78rem;
}
.chat-edit-save {
  padding: .22rem .6rem;
  border: none;
  border-radius: 6px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
}

/* ── Barre émojis rapides ───────────────────────────────── */
.chat-emoji-bar {
  display: flex;
  gap: .4rem;
  padding: .4rem .75rem .1rem;
}
.chat-emoji-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .25rem .5rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform .1s, background .15s;
  line-height: 1;
}
.chat-emoji-btn:hover { background: var(--border); transform: scale(1.15); }

/* ── Zone de saisie ─────────────────────────────────────── */
.chat-input-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  padding: .6rem .9rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  font-size: .9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.chat-input:focus {
  border-color: var(--accent);
}
.chat-send-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  min-width: 38px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .1s;
}
.chat-send-btn:hover {
  background: var(--accent-h);
}
.chat-send-btn:active {
  transform: scale(.93);
}

/* ── Swipe-left pour répondre ───────────────────────────── */
.chat-swipe-hint {
  position: absolute;
  right: -28px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  font-size: 1.15rem;
  color: var(--accent);
  pointer-events: none;
  transition: opacity .1s;
}
.chat-msg[data-msg-id],
.chat-msg-received-wrap[data-msg-id] {
  position: relative;
  overflow: visible;
}
/* Conteneur des messages : clip horizontal pendant swipe */
.chat-messages-list { overflow-x: hidden; }
/* Permettre le scroll tactile à l'intérieur du panel même si body est bloqué */
#chatPanel, #chatPanel * {
  touch-action: pan-y pinch-zoom;
}

/* ── Indicateur de frappe (typing dots) ─────────────────── */
.chat-typing-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: typingBounce 1.2s infinite ease-in-out;
}
.chat-typing-dot:nth-child(1) { animation-delay: 0s; }
.chat-typing-dot:nth-child(2) { animation-delay: .2s; }
.chat-typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

/* ── Menu contextuel message ────────────────────────────── */
.chat-ctx-menu {
  position: fixed;
  z-index: 2000;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  min-width: 160px;
  padding: .3rem 0;
  animation: ctxFadeIn .12s ease;
}
@keyframes ctxFadeIn {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
.chat-ctx-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .65rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .88rem;
  color: var(--text);
  text-align: left;
  transition: background .1s;
}
.chat-ctx-item:hover { background: var(--bg); }
#ctxDelete { color: #ef4444; }

/* ── Barre de réponse ───────────────────────────────────── */
.chat-reply-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-reply-preview {
  flex: 1;
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-reply-preview::before {
  content: '↩ ';
  color: var(--accent);
  font-weight: 700;
}

/* ── Citation dans la bulle ─────────────────────────────── */
.chat-msg-reply {
  font-size: .75rem;
  opacity: .75;
  border-left: 2px solid rgba(255,255,255,.6);
  padding: .2rem .5rem;
  margin-bottom: .35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.chat-msg.received .chat-msg-reply {
  border-left-color: var(--accent);
}

/* ── Bouton retour (mobile seulement) ──────────────────── */
.chat-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  flex-shrink: 0;
}
.chat-back-btn:hover {
  background: var(--bg);
}

/* ── Section messages dans compte.html ─────────────────── */
.chat-account-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.chat-account-open-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r, 12px);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.chat-account-open-btn:hover {
  background: var(--accent-h);
}

/* ── Dark mode ──────────────────────────────────────────── */
[data-theme="dark"] .chat-panel {
  background: #1a1d23;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
}
[data-theme="dark"] .chat-panel-header,
[data-theme="dark"] .chat-messages-header,
[data-theme="dark"] .chat-input-row {
  background: #1a1d23;
  border-color: #2d3140;
}
[data-theme="dark"] .chat-conv-item {
  border-color: #2d3140;
}
[data-theme="dark"] .chat-conv-item:hover {
  background: #22262f;
}
[data-theme="dark"] .chat-conv-item.active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
[data-theme="dark"] .chat-msg.received {
  background: #22262f;
  border-color: #2d3140;
}
[data-theme="dark"] .chat-input {
  background: #22262f;
  border-color: #2d3140;
  color: #e8eaf0;
}
[data-theme="dark"] .chat-input:focus {
  border-color: var(--accent);
}
[data-theme="dark"] .chat-header-btn {
  border-color: #2d3140;
}

/* ── Tablet (2 colonnes) ────────────────────────────────── */
@media (max-width: 860px) {
  .chat-panel {
    width: 96vw;
    height: min(90vh, 820px);
  }
  .chat-3col {
    grid-template-columns: 220px 1fr;
  }
  .chat-col-2 { display: none; }
  .chat-3col[data-step="2"] .chat-col-1 { display: none; }
  .chat-3col[data-step="2"] .chat-col-2 { display: flex; }
  .chat-3col[data-step="2"] .chat-col-3 { display: flex; }
  .chat-3col[data-step="3"] .chat-col-1 { display: none; }
  .chat-3col[data-step="3"] .chat-col-2 { display: none; }
  .chat-3col[data-step="3"] .chat-col-3 { display: flex; grid-column: 1/-1; }
}

/* ── Mobile (1 colonne à la fois) ───────────────────────── */
@media (max-width: 600px) {
  .chat-panel {
    width: 100vw;
    height: 100dvh;
    top: 0;
    left: 0;
    border-radius: 0;
    transform: translateY(3%) scale(.98);
    opacity: 0;
    pointer-events: none;
  }
  .chat-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  .chat-3col {
    grid-template-columns: 1fr;
  }
  .chat-col-1 { display: flex; }
  .chat-col-2 { display: none; }
  .chat-col-3 { display: none; }
  .chat-3col[data-step="2"] .chat-col-1 { display: none; }
  .chat-3col[data-step="2"] .chat-col-2 { display: flex; }
  .chat-3col[data-step="3"] .chat-col-1 { display: none; }
  .chat-3col[data-step="3"] .chat-col-2 { display: none; }
  .chat-3col[data-step="3"] .chat-col-3 { display: flex; }
  .chat-back-btn { display: flex; }
  .chat-conv-name { max-width: 140px; }
  .chat-conv-preview { max-width: 160px; }
  .chat-msg { max-width: 88%; }
}

/* ════════════════════════════════════════
   Espaces Publicitaires
════════════════════════════════════════ */
.media-panel {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card);
  transition: border-color var(--t);
}
.media-panel:hover { border-color: var(--accent2); }

.promo-label {
  position: absolute;
  top: 6px; left: 8px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  z-index: 2;
}

.media-panel a { display: block; text-decoration: none; }
.media-panel img {
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: calc(var(--r) - 2px);
}
.spot-text-inner {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  min-height: 80px;
  display: flex;
  align-items: center;
}

/* Slot hero (bannière pleine largeur sous la barre de recherche) */
.ad-hero {
  max-width: var(--max-w);
  margin: .75rem auto 0;
  padding: 0 1rem;
}
.ad-hero img { max-height: 120px; border-radius: var(--r); }

/* Slot top-listing (au-dessus de la grille) */
.ad-top {
  margin-bottom: 1rem;
  border-radius: var(--r);
  overflow: hidden;
  max-width: 1200px;
  width: 100%;
}
.ad-top img {
  max-height: 500px;
  min-height: 200px;
  width: 100%;
  object-fit: cover;
  aspect-ratio: 12 / 5;
  display: block;
}

/* Barre d'info sous l'image du spot 1 */
.spot-info-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .1rem;
  padding: .55rem .9rem;
  background: var(--card);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--r) var(--r);
}
.spot-info-chip {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  padding: .15rem .3rem;
  border-radius: 4px;
}
.spot-info-sep {
  font-size: .75rem;
  color: var(--text-muted, #999);
  padding: 0 .15rem;
  user-select: none;
}
.spot-info-link {
  color: var(--accent);
  text-decoration: none;
}
.spot-info-link:hover {
  text-decoration: underline;
}
[data-theme="light"] .spot-info-bar {
  background: #fff;
  border-top-color: #e8e8e8;
}
[data-theme="light"] .spot-info-chip {
  color: #1a1a1a;
}
[data-theme="light"] .spot-info-sep {
  color: #bbb;
}

/* Slot sidebar */
.ad-sidebar { border-radius: var(--r-sm); }
.ad-sidebar img { max-height: 200px; }
.ad-sidebar .spot-text-inner { font-size: .85rem; min-height: 60px; }

/* Slot in-feed vide (bannière pleine largeur, hors grille) */
.ad-infeed {
  border-radius: var(--r);
}
.ad-infeed img { max-height: 100px; }

/* Wrapper in-feed : occupe une case de grille comme une carte normale */
.promo-wrap {
  /* Pas de grid-column spécial : s'intègre dans la grille */
}
/* Quand aucune vraie pub : banner pleine largeur centré */
.promo-wrap--empty {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: .25rem 0;
}
/* La carte pub in-feed hérite de listing-card — marquage discret */
.promo-card {
  width: 100%;
  outline: 2px solid rgba(124,92,252,.20); /* liseré violet discret */
  outline-offset: -2px;
}

/* Slot détail page */
.ad-detail {
  border-radius: var(--r);
  max-width: 700px;
}
.ad-detail img { max-height: 120px; }

/* Slot vide (invitation) */
.ad-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .85rem;
  text-align: center;
  border-radius: var(--r);
  background: transparent;
}
.ad-empty-ico { font-size: 1.4rem; }
.ad-empty-txt { font-size: .75rem; color: var(--muted); font-weight: 600; }
.ad-empty-cta {
  font-size: .7rem;
  color: var(--accent2);
  font-weight: 700;
  text-decoration: none;
}
.ad-empty-cta:hover { text-decoration: underline; }

/* ════════════════════════════════════════
   Spot placeholders — light & minimaliste
════════════════════════════════════════ */

@keyframes sp-shimmer {
  0%   { transform: translateX(-180%) skewX(-18deg); }
  100% { transform: translateX(240%) skewX(-18deg); }
}
@keyframes sp-pulse-ico {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.12); opacity: .75; }
}
@keyframes sp-ring {
  0%   { transform: scale(.7); opacity: .5; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes sp-dot {
  0%, 80%, 100% { transform: scale(0); opacity: 0; }
  40%           { transform: scale(1); opacity: 1; }
}

/* ── Conteneur ── */
.spot-holder {
  position: relative;
  overflow: hidden;
  border: 1.5px dashed var(--border, #e2e5ec) !important;
  background: var(--surface, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  border-radius: var(--r, 14px) !important;
}

/* Sweep shimmer très doux sur fond blanc */
.spot-holder::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(124,92,252,.06), transparent);
  animation: sp-shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}

/* ── Contenu ── */
.spot-holder-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: 1.4rem 1.5rem;
  text-align: center;
  width: 100%;
}

/* Badge label "Sponsorisé" */
.spot-holder-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(124,92,252,.08);
  border: 1px solid rgba(124,92,252,.18);
  border-radius: 999px;
  padding: .2rem .75rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent2, #7c5cfc);
}

/* Icône avec anneau pulsant */
.spot-holder-ico-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.spot-holder-ico-ring {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,107,53,.35);
  animation: sp-ring 2s ease-out infinite;
  pointer-events: none;
}
.spot-holder-ico {
  font-size: 1.8rem;
  line-height: 1;
  animation: sp-pulse-ico 2.8s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

/* Titre */
.spot-holder-txt {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text, #0f1117);
  letter-spacing: -.01em;
  line-height: 1.3;
}

/* Prix */
.spot-holder-price {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted, #6b7380);
}

/* Trois points animés après le prix */
.spot-holder-price::after {
  content: '';
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
  vertical-align: middle;
}

/* CTA bouton orange du site */
.spot-holder-cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem 1.2rem;
  background: var(--accent, #ff6b35);
  color: #fff;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .01em;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 2px 10px rgba(255,107,53,.25);
  white-space: nowrap;
}
.spot-holder-cta:hover {
  background: var(--accent-h, #e85c28);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,107,53,.35);
  text-decoration: none;
  color: #fff;
}

/* ── Adaptations par spot ── */

/* Spot 1 — grand bandeau */
.spot-holder.spot-top { min-height: 100px; }
.spot-holder.spot-top .spot-holder-content { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: .6rem 1.4rem; padding: 1.2rem 2rem; }
.spot-holder.spot-top .spot-holder-ico  { font-size: 2rem; }
.spot-holder.spot-top .spot-holder-ico-ring { width: 56px; height: 56px; }
.spot-holder.spot-top .spot-holder-txt  { font-size: 1rem; }
.spot-holder.spot-top .spot-holder-cta  { padding: .55rem 1.4rem; font-size: .82rem; }

/* Spot 2 — in-feed carte */
.spot-holder.spot-inline .spot-holder-content { gap: .4rem; padding: 1rem; }
.spot-holder.spot-inline .spot-holder-ico  { font-size: 1.5rem; }
.spot-holder.spot-inline .spot-holder-ico-ring { width: 40px; height: 40px; }
.spot-holder.spot-inline .spot-holder-txt  { font-size: .85rem; }
.spot-holder.spot-inline .spot-holder-cta  { padding: .42rem .95rem; font-size: .73rem; }

/* Spot 3 — sidebar */
.spot-holder.spot-side .spot-holder-content { gap: .45rem; padding: 1rem .8rem; }
.spot-holder.spot-side .spot-holder-ico  { font-size: 1.5rem; }
.spot-holder.spot-side .spot-holder-ico-ring { width: 40px; height: 40px; }
.spot-holder.spot-side .spot-holder-txt  { font-size: .82rem; }
.spot-holder.spot-side .spot-holder-cta  { padding: .42rem .95rem; font-size: .73rem; }

/* Spot 4 — bannière détail horizontale */
.spot-holder.spot-detail { min-height: 76px; }
.spot-holder.spot-detail .spot-holder-content { flex-direction: row; flex-wrap: wrap; gap: .4rem .9rem; padding: .85rem 1.2rem; }
.spot-holder.spot-detail .spot-holder-ico  { font-size: 1.4rem; }
.spot-holder.spot-detail .spot-holder-ico-ring { width: 36px; height: 36px; }
.spot-holder.spot-detail .spot-holder-txt  { font-size: .85rem; }
.spot-holder.spot-detail .spot-holder-badge { display: none; }
.spot-holder.spot-detail .spot-holder-cta  { padding: .38rem .85rem; font-size: .72rem; }

/* Dark mode */
[data-theme="dark"] .spot-holder {
  background: var(--card, #1c1c2c);
  border-color: var(--border, #2c2c44) !important;
}
[data-theme="dark"] .spot-holder::after {
  background: linear-gradient(90deg, transparent, rgba(124,92,252,.08), transparent);
}
[data-theme="dark"] .spot-holder-badge {
  background: rgba(124,92,252,.12);
  border-color: rgba(124,92,252,.25);
}

/* Reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .spot-holder::after,
  .spot-holder-ico,
  .spot-holder-ico-ring { animation: none !important; }
}

/* Lien "réserver" sous sidebar */
.spot-reserve {
  display: block;
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: .4rem;
  border-radius: 8px;
  margin-top: .5rem;
  transition: color var(--t);
}
.spot-reserve:hover { color: var(--accent2); }

/* Footer pub — lien réserver dans bannière */
.ad-footer-link {
  display: block;
  text-align: right;
  font-size: .65rem;
  color: var(--muted);
  text-decoration: none;
  padding: .2rem .6rem .35rem;
  transition: color var(--t);
}
.ad-footer-link:hover { color: var(--accent2); }

/* ════════════════════════════════════════
   Signalement d'annonces
════════════════════════════════════════ */
.btn-report {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .3rem .7rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.btn-report:hover { color: var(--red); border-color: var(--red); }
.btn-report.reported { color: var(--red); border-color: var(--red); background: rgba(239,68,68,.07); }

.report-count-badge {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--border);
  border-radius: 20px;
  padding: 2px 9px;
}

/* ── Modal signalement ── */
.report-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.report-modal-overlay.open { display: flex; }
.report-modal {
  background: var(--surface);
  border-radius: 18px;
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--sh-xl);
}
.report-modal-title { font-size: 1.05rem; font-weight: 800; margin-bottom: .25rem; }
.report-modal-sub   { font-size: .82rem; color: var(--muted); margin-bottom: 1rem; line-height: 1.5; }
.report-reasons     { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.report-reason-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  color: var(--text);
  text-align: left;
}
.report-reason-btn:hover, .report-reason-btn.selected {
  border-color: var(--red);
  background: rgba(239,68,68,.07);
  color: var(--red);
}
.report-modal-actions { display: flex; gap: .5rem; }
.btn-report-cancel {
  flex: 1;
  padding: .7rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: none;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  transition: border-color .15s;
}
.btn-report-cancel:hover { border-color: var(--muted); }
.btn-report-submit {
  flex: 2;
  padding: .7rem;
  border: none;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  opacity: .45;
  pointer-events: none;
  transition: opacity .15s;
}
.btn-report-submit.ready { opacity: 1; pointer-events: auto; }

/* ════════════════════════════════════════
   Admin — Utilisateurs & Annonces
════════════════════════════════════════ */
.admin-search {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: .9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  margin-bottom: .85rem;
}
.admin-search:focus { outline: none; border-color: var(--accent2); }

.admin-user-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: .45rem;
  background: var(--bg);
}
.admin-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent2);
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.admin-user-avatar img { width:100%;height:100%;object-fit:cover;border-radius:50%; }
.admin-user-info  { flex: 1; min-width: 0; }
.admin-user-name  { font-size: .88rem; font-weight: 700; white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.admin-user-meta  { font-size: .72rem; color: var(--muted); margin-top: .1rem; }
.admin-user-banned{ color: var(--red); font-weight: 700; }
.btn-ban {
  padding: .3rem .75rem;
  border-radius: 7px;
  border: none;
  font-size: .75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity .15s;
}
.btn-ban:hover { opacity: .8; }
.btn-ban-do   { background: #fee2e2; color: #b91c1c; }
.btn-ban-undo { background: #d1fae5; color: #065f46; }

.admin-listing-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: .45rem;
  background: var(--bg);
}
.admin-listing-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border-2);
}
.admin-listing-info  { flex: 1; min-width: 0; }
.admin-listing-title { font-size: .85rem; font-weight: 700; white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.admin-listing-meta  { font-size: .72rem; color: var(--muted); margin-top: .1rem; }
.admin-listing-reports {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: .35rem;
}
.admin-listing-reports.high { background:#fee2e2;color:#b91c1c; }
.admin-listing-reports.med  { background:#fef3c7;color:#92400e; }
.btn-admin-del {
  padding: .3rem .65rem;
  border-radius: 7px;
  border: 1.5px solid #fca5a5;
  background: #fff;
  color: #ef4444;
  font-size: .8rem;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: background .15s;
}
.btn-admin-del:hover { background: #fee2e2; }

/* ════════════════════════════════════════
   Marché — Mon stand (fermé)
════════════════════════════════════════ */
.mp-my-stand-panel {
  background: #fffaf3;
  border: 1.5px solid #e8d5b0;
  border-radius: 18px;
  padding: 1.25rem 1.25rem 1rem;
  text-align: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(100,60,10,.1);
}
.mp-my-stand-panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #2d1a06;
  margin-bottom: .5rem;
}
.mp-my-stand-status {
  font-size: .85rem;
  color: #7a5c38;
  margin-bottom: .85rem;
}
.mp-my-stand-btns {
  display: flex;
  gap: .6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: .85rem;
}
.btn-my-stand-view {
  padding: .55rem 1.1rem;
  border-radius: 30px;
  border: 1.5px solid #c0392b;
  background: #fff;
  color: #c0392b;
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.btn-my-stand-view:hover { background: #fee2e2; }
.btn-my-stand-toggle {
  padding: .55rem 1.1rem;
  border-radius: 30px;
  border: none;
  background: #c0392b;
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
}
.btn-my-stand-toggle:hover { opacity: .85; }
.btn-my-stand-toggle.is-open { background: #2d6a4f; }
.mp-customize-toggle {
  background: none;
  border: 1.5px dashed #c0392b;
  color: #c0392b;
  font-size: .8rem;
  font-weight: 700;
  padding: .45rem 1rem;
  border-radius: 30px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
  width: 100%;
}
.mp-customize-toggle:hover { background: #fff0ee; }
.mp-customize-panel {
  margin-top: .85rem;
  text-align: left;
}
.mp-customize-label {
  font-size: .78rem;
  font-weight: 700;
  color: #7a5c38;
  margin-bottom: .4rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mp-customize-colors {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.mp-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.mp-color-swatch:hover { transform: scale(1.15); }
.mp-color-swatch.selected { border-color: #2d1a06; transform: scale(1.2); }
.mp-slogan-input {
  width: 100%;
  padding: .55rem .85rem;
  border-radius: 10px;
  border: 1.5px solid #e8d5b0;
  background: #fffaf3;
  font-family: inherit;
  font-size: .85rem;
  color: #2d1a06;
  outline: none;
}
.mp-slogan-input:focus { border-color: #c0392b; }
.btn-save-customize {
  margin-top: .75rem;
  width: 100%;
  padding: .6rem;
  border-radius: 30px;
  border: none;
  background: linear-gradient(135deg,#c0392b,#8b1a10);
  color: #fff;
  font-weight: 800;
  font-size: .88rem;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
}
.btn-save-customize:hover { opacity: .88; }

/* Barre propriétaire en boutique (marché ouvert) */
.mp-boutique-owner-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  background: #fffaf3;
  border: 1.5px solid #e8d5b0;
  border-radius: 14px;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
}
.btn-boutique-toggle {
  padding: .5rem 1rem;
  border-radius: 30px;
  border: none;
  background: #2d6a4f;
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-boutique-toggle.closed { background: #c0392b; }
.btn-boutique-customize {
  padding: .5rem 1rem;
  border-radius: 30px;
  border: 1.5px dashed #c0392b;
  background: none;
  color: #c0392b;
  font-weight: 700;
  font-size: .8rem;
  cursor: pointer;
  font-family: inherit;
}

/* ── Mes messages (layout 3 colonnes) ───────────────── */
.msgs-layout {
  display: grid;
  grid-template-columns: 220px 190px 1fr;
  grid-template-rows: 1fr;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  height: 580px;
}
.msgs-col-header {
  padding: .55rem .75rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}
.msgs-listings-col {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.msgs-contacts-col {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.msgs-items-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.msgs-thread-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.msgs-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .85rem;
  padding: 2rem 1rem;
  text-align: center;
}
.msgs-listing-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .6rem .75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
  min-width: 0;
}
.msgs-listing-item:hover { background: var(--bg-alt); }
.msgs-listing-item.active { background: rgba(124,92,252,.08); border-right: 2px solid var(--accent); }
.msgs-listing-thumb {
  width: 44px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.msgs-listing-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msgs-contact-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .6rem .75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
  min-width: 0;
}
.msgs-contact-item:hover { background: var(--bg-alt); }
.msgs-contact-item.active { background: rgba(124,92,252,.08); border-right: 2px solid var(--accent); }
.msgs-contact-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}
.msgs-contact-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Avatar miniature dans les bulles (compte.html thread) */
.msgs-bubble-avatar {
  width: 22px; height: 22px; min-width: 22px;
  border-radius: 50%;
  background: var(--accent2);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .58rem; font-weight: 800;
  overflow: hidden; flex-shrink: 0;
}
.msgs-bubble-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.msgs-unread-badge {
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  flex-shrink: 0;
}
.msgs-thread {
  flex: 1;
  overflow-y: auto;
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.msgs-bubble {
  max-width: 78%;
  padding: .45rem .75rem;
  border-radius: 14px;
  font-size: .85rem;
  line-height: 1.45;
  word-break: break-word;
}
.msgs-bubble.mine {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msgs-bubble.theirs {
  align-self: flex-start;
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msgs-input-row {
  padding: .55rem .75rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-shrink: 0;
}
.msgs-input-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .42rem .9rem;
  font-size: .88rem;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  outline: none;
  min-width: 0;
}
.msgs-input-row input:focus { border-color: var(--accent); }
.msgs-input-row button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}
/* Badge message sur les cartes d'annonces */
.my-listing-msg-badge {
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  margin-left: .3rem;
  vertical-align: middle;
}
/* Responsive messages — navigation step mobile */
@media (max-width: 900px) {
  .msgs-layout {
    grid-template-columns: 1fr 1fr;
    height: 480px;
  }
  /* Par défaut : 2 colonnes (annonces + contacts) visibles */
  .msgs-listings-col { border-right: 1px solid var(--border); }
  .msgs-contacts-col { display: flex; }
  .msgs-thread-col   { display: none; }

  /* Step 3 : thread plein écran */
  .msgs-layout[data-step="3"] { height: 390px; }
  .msgs-layout[data-step="3"] .msgs-listings-col { display: none; }
  .msgs-layout[data-step="3"] .msgs-contacts-col { display: none; }
  .msgs-layout[data-step="3"] .msgs-thread-col   { display: flex; grid-column: 1 / -1; }

  /* Bouton retour mobile dans les entêtes */
  .msgs-col-header { display: flex; align-items: center; gap: .5rem; }
  .msgs-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: .95rem;
    color: var(--text);
    flex-shrink: 0;
  }
}
