/* TAP'ANNONCES — Mobile-first, design épuré */
:root {
  --ink: #2c3a4d; --muted: #718096; --blue: #2563eb; --orange: #f59e0b;
  --pale: #f9fafb; --card: #ffffff; --line: #e5e7eb;
  --xs: clamp(.75rem,.7rem+.25vw,.8125rem); --sm: clamp(.875rem,.8rem+.35vw,.9375rem);
  --base: clamp(.9375rem,.85rem+.4vw,1.0625rem); --lg: clamp(1.0625rem,1rem+.35vw,1.25rem);
  --xl: clamp(1.25rem,1.1rem+.75vw,1.75rem); --2xl: clamp(1.75rem,1.4rem+1.75vw,2.5rem);
  --3xl: clamp(2rem,1.5rem+2.5vw,3.25rem); --4xl: clamp(2.25rem,1.75rem+2.5vw,3.5rem);
  --sp-xs: clamp(.5rem,1.5vw,.75rem); --sp-sm: clamp(.75rem,2vw,1rem);
  --sp-md: clamp(1rem,3vw,1.5rem); --sp-lg: clamp(1.5rem,4vw,2.5rem);
  --sp-xl: clamp(2rem,6vw,4rem); --sp-2xl: clamp(3rem,8vw,6rem);
  --max: 1336px; --cont: clamp(1rem,3vw,2rem); --rs: 6px; --r: 10px; --rl: 16px;
}
*, *::before, *::after { box-sizing: border-box }
html { scroll-behavior: smooth }
body { margin: 0; font-family: 'Poppins', system-ui, sans-serif; color: var(--ink);
  background: var(--card); font-size: var(--base); line-height: 1.6; -webkit-font-smoothing: antialiased }
button, input, select { font: inherit }
button { cursor: pointer; border: 0; background: none }
a { text-decoration: none; color: inherit }

.wrap { width: min(var(--max), calc(100% - var(--cont) * 2)); margin: auto; padding: 0 var(--cont) }
.eyebrow { display: inline-block; padding: .35rem .875rem; background: var(--pale); border-radius: 4px;
  color: var(--muted); font-size: var(--xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em }
.section-title { margin: .875rem 0 0; font-size: var(--3xl); line-height: 1.1; font-weight: 800; letter-spacing: -.02em }
.center { text-align: center }

.btn { background: var(--blue); color: #fff; font-weight: 600; padding: 14px 28px; border-radius: var(--rs);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; transition: background .2s, transform .15s }
.btn:hover { background: #1d4ed8; transform: translateY(-1px) }

header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20 }
header .wrap { height: 68px; display: flex; align-items: center }
.nav { display: flex; align-items: center; justify-content: space-between; width: 100% }
.logo { font-size: var(--xl); font-weight: 800; letter-spacing: -.03em; line-height: 1 }
.logo span { color: var(--blue) }

.links { display: none; flex-direction: column; gap: 0; position: absolute; top: 68px; left: 0; right: 0;
  background: var(--card); padding: .5rem 0; box-shadow: 0 8px 24px rgba(0,0,0,.06) }
.links.open { display: flex }
.links a { font-size: var(--base); font-weight: 600; padding: .875rem var(--cont); border-bottom: 1px solid var(--line); color: var(--ink) }
.links a:last-child { border: 0 }
.links a:hover { color: var(--blue) }

.account { display: flex; align-items: center; gap: .75rem }
.login { display: none; align-items: center; gap: .5rem; font-size: var(--sm); font-weight: 600 }
.login i { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center }
.post { display: none }
.menu-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--rs); color: var(--ink) }

.hero { background: var(--pale); padding: 2.5rem 0 3rem }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center }
.hero-copy h1 { font-size: var(--4xl); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; margin: 0 0 1rem }
.hero-copy p { color: var(--muted); font-size: var(--base); line-height: 1.75; margin: 0 0 1.5rem }

.quick-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; max-width: 100% }
.quick-cat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem .75rem;
  font-size: var(--sm); font-weight: 500; color: var(--ink); min-width: 0; height: 110px; cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s, background .2s }
.quick-cat:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(44,58,77,.07); background: #fff7ed }
.quick-cat i { width: 30px; height: 30px; color: var(--orange); stroke-width: 1.75 }
.quick-cat span { text-align: center; line-height: 1.3; color: var(--ink) }

.search-box { background: var(--card); border-radius: var(--rl); padding: 1.5rem; box-shadow: 0 12px 36px rgba(44,58,77,.07) }
.search-box h2 { text-align: center; margin: 0 0 1.5rem; font-size: var(--xl); font-weight: 700 }

.field, .price input { height: 60px; border: 1px solid var(--line); background: var(--card); border-radius: var(--rs);
  display: flex; align-items: center; gap: .75rem; padding: 0 1rem; width: 100%; transition: border-color .2s, box-shadow .2s }
.field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1) }
.field i { width: 32px; height: 32px; display: grid; place-items: center; color: #fff; background: var(--orange); border-radius: var(--rs); flex-shrink: 0 }
.field input, .field select { border: 0; outline: 0; width: 100%; background: transparent; font-size: var(--base) }
.search-box form { display: grid; gap: 1rem }

.price { display: grid; grid-template-columns: 1fr; gap: .625rem; text-align: center }
.price input { padding: 0 1rem; outline: 0 }
.price span { color: var(--muted); font-weight: 600 }
.search-box .btn { height: 60px; font-size: var(--base) }

.listings { padding: var(--sp-2xl) 0 }
.heading-row { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; margin-bottom: var(--sp-xl) }
.listing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem }
.listing-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  transition: box-shadow .25s, transform .25s }
.listing-card:hover { box-shadow: 0 10px 32px rgba(44,58,77,.09); transform: translateY(-3px) }
.listing-card.hidden { display: none }
.listing-image { width: 100%; height: 190px; object-fit: cover; display: block; transition: transform .4s }
.listing-card:hover .listing-image { transform: scale(1.03) }
.listing-body { padding: 1.125rem }
.listing-body h3 { font-size: var(--lg); line-height: 1.3; margin: 0 0 .375rem; font-weight: 700 }
.location { display: flex; align-items: center; gap: .375rem; color: var(--muted); font-size: var(--sm) }
.location i { color: var(--orange); width: 16px }
.price-tag { font-size: var(--lg); font-weight: 700; margin: .625rem 0 0 }
.card-actions { border-top: 1px solid var(--line); display: flex; align-items: center; gap: .625rem; padding: .75rem 1.125rem }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--card); border-radius: 50%;
  display: grid; place-items: center; transition: border-color .2s, color .2s, background .2s }
.icon-btn:hover, .icon-btn.active { border-color: var(--orange); color: var(--orange); background: #fff7ed }
.icon-btn i { width: 15px }
.views { margin-left: auto; color: var(--muted); font-size: var(--xs) }

.categories, .features { background: var(--pale); padding: var(--sp-2xl) 0 }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-top: var(--sp-xl) }
.category-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden }
.cat-head { height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .625rem; border-bottom: 1px solid var(--line); font-weight: 700; font-size: var(--lg) }
.cat-head i { width: 38px; height: 38px; color: var(--blue) }
.cat-list { list-style: none; margin: 0; padding: 1.25rem 1.5rem }
.cat-list li { display: flex; justify-content: space-between; align-items: center; color: var(--ink);
  padding: .625rem 0; border-bottom: 1px dashed var(--line); font-size: var(--sm) }
.cat-list li:last-child { border: 0 }
.count { color: #fff; background: var(--orange); border-radius: 20px; min-width: 26px; text-align: center;
  font-size: .6875rem; font-weight: 700; padding: 2px 8px }
.cat-foot { border-top: 1px solid var(--line); padding: .875rem; text-align: center }
.cat-foot button { background: #eef2ff; color: var(--blue); font-weight: 600; padding: .625rem 1.75rem; border-radius: var(--rs); cursor: pointer; transition: background .2s, color .2s }
.cat-foot button:hover { background: var(--blue); color: #fff }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-top: var(--sp-xl) }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.75rem;
  text-align: center; transition: box-shadow .25s, transform .25s }
.feature:hover { box-shadow: 0 8px 28px rgba(44,58,77,.06); transform: translateY(-2px) }
.feature i { width: 40px; height: 40px; margin: 0 auto .875rem; color: var(--blue) }
.feature h3 { font-size: var(--lg); margin: 0 0 .5rem; font-weight: 700 }
.feature p { color: var(--muted); line-height: 1.75; margin: 0; font-size: var(--sm) }

/* ============================================
   REGIONS MODERNE — Design UX amélioré
   ============================================ */

.regions-modern {
  background: #f8fafc;
  padding: var(--sp-2xl) 0;
}

.region-header {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.region-intro {
  color: var(--muted);
  max-width: 600px;
  margin: .75rem auto 0;
  font-size: var(--base);
  line-height: 1.8;
}

/* Titres de sections */
.regions-title {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: var(--sp-lg);
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--line);
}

.regions-title h3 {
  margin: 0;
  font-size: var(--xl);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}

.regions-subtitle {
  margin: 0;
  font-size: var(--sm);
  color: var(--muted);
  font-weight: 500;
}

/* Grille principale */
.regions-metro {
  margin-bottom: var(--sp-2xl);
}

.regions-outremer {
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  border-radius: var(--rl);
  padding: var(--sp-xl);
  margin: 0 calc(-1 * var(--cont));
  padding-left: var(--cont);
  padding-right: var(--cont);
}

.regions-outremer .regions-title {
  border-bottom-color: #bbf7d0;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* ============================================
   CARTE RÉGION — Design moderne
   ============================================ */
.region-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rl);
  padding: 1.5rem;
  cursor: pointer;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

.region-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--orange) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.region-card:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 30px rgba(37, 99, 235, .12);
  transform: translateY(-4px);
}

.region-card:hover::before {
  transform: scaleX(1);
}

/* Icône */
.region-icon-wrap {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  margin-bottom: 1rem;
  color: var(--blue);
  transition: all .3s ease;
}

.region-icon-wrap i {
  width: 26px;
  height: 26px;
}

.region-card:hover .region-icon-wrap {
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  border-color: var(--blue);
  color: #fff;
  transform: scale(1.05);
}

/* Contenu */
.region-content {
  margin-bottom: .75rem;
}

.region-name {
  margin: 0 0 .25rem;
  font-size: var(--base);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
  line-height: 1.3;
}

.region-code {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  background: #eff6ff;
  padding: .2rem .5rem;
  border-radius: 4px;
  margin-bottom: .5rem;
}

.region-count {
  display: block;
  font-size: var(--xs);
  color: var(--muted);
  font-weight: 500;
}

/* Bouton d'action */
.region-actions {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}

.region-actions .icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: all .25s ease;
  opacity: 0;
  transform: translateX(8px);
}

.region-card:hover .region-actions .icon-btn {
  opacity: 1;
  transform: translateX(0);
}

.region-actions .icon-btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: scale(1.1) !important;
}

.region-actions .icon-btn i {
  width: 16px;
  height: 16px;
}

/* Tags départements */
.region-deps {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: .5rem;
}

.dep-tag {
  font-size: .6875rem;
  color: var(--ink);
  background: var(--pale);
  padding: .2rem .5rem;
  border-radius: 4px;
  font-weight: 500;
  transition: all .2s ease;
  cursor: default;
}

.region-deps .dep-tag:hover {
  background: #fff;
  border: 1px solid var(--blue);
  color: var(--blue);
}

/* ============================================
   RESPONSIVE — Régions
   ============================================ */
@media (min-width: 768px) {
  .regions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .regions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .regions-outremer .regions-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1280px) {
  .regions-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .regions-outremer .regions-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

footer { background: #1e293b; color: #e2e8f0 }
.footer-main { padding: var(--sp-2xl) 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem }
.footer-main h3 { font-size: var(--base); margin: 0 0 1rem; color: #fff; font-weight: 700 }
.footer-main ul { list-style: none; margin: 0; padding: 0 }
.footer-main li { margin: 0 0 .5rem; font-size: var(--sm) }
.footer-main a { color: #94a3b8; transition: color .2s }
.footer-main a:hover { color: var(--orange) }
.footer-contact { color: #cbd5e1; line-height: 1.7; margin-bottom: 1.5rem }
.footer-contact .logo { color: #fff; margin-bottom: .75rem; display: block }
.footer-contact p { margin: 0 0 .75rem }
.social { display: flex; gap: .625rem }
.social a { width: 36px; height: 36px; border: 1px solid #475569; border-radius: 50%; display: grid; place-items: center;
  font-size: var(--xs); transition: background .2s, border-color .2s }
.social a:hover { background: var(--orange); border-color: var(--orange) }
.copyright { background: #0f172a; text-align: center; padding: 1.25rem; color: #94a3b8; font-size: var(--xs) }

.toast { position: fixed; right: 1rem; bottom: 1rem; background: var(--ink); color: #fff; padding: .75rem 1.25rem;
  border-radius: var(--rs); box-shadow: 0 8px 24px rgba(0,0,0,.18); transform: translateY(80px); opacity: 0; z-index: 100;
  transition: transform .3s, opacity .3s; font-size: var(--sm) }
.toast.show { transform: none; opacity: 1 }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s }
.reveal.visible { opacity: 1; transform: none }

/* MODALE CONNEXION/INSCRIPTION */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 58, 77, .55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
  padding: 1rem;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--card);
  border-radius: var(--rl);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .25);
  overflow: hidden;
  transform: translateY(20px) scale(.98);
  transition: transform .3s;
}
.modal-overlay.open .modal {
  transform: none;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.modal-header h3 {
  margin: 0;
  font-size: var(--lg);
  font-weight: 700;
}
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background .2s, color .2s;
}
.modal-close:hover {
  background: var(--pale);
  color: var(--ink);
}
.modal-close i { width: 18px; height: 18px; }
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: var(--pale);
}
.modal-tab {
  flex: 1;
  padding: 1rem;
  font-weight: 600;
  font-size: var(--sm);
  color: var(--muted);
  position: relative;
  transition: color .2s;
}
.modal-tab.active {
  color: var(--blue);
  background: var(--card);
}
.modal-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blue);
}
.modal-body {
  padding: 1.75rem 1.5rem;
}
.modal-form { display: none; }
.modal-form.active { display: block; }
.modal-form .field {
  margin-bottom: 1rem;
}
.modal-form .field:last-of-type {
  margin-bottom: 1.5rem;
}
.modal-form .btn {
  width: 100%;
  height: 50px;
}
.modal-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: var(--sm);
  color: var(--muted);
}
.modal-footer a {
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
}
.modal-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: var(--xs);
}
.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.social-buttons {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
}
.social-btn {
  flex: 1;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--rs);
  display: grid;
  place-items: center;
  font-size: var(--sm);
  font-weight: 500;
  color: var(--ink);
  transition: border-color .2s, background .2s;
}
.social-btn:hover {
  border-color: var(--blue);
  background: var(--pale);
}
.social-btn i { width: 18px; height: 18px; }

/* TABLETTE */
@media (min-width: 768px) {
  .links { position: static; display: flex; flex-direction: row; gap: 2rem; padding: 0; box-shadow: none }
  .links a { padding: 0; border: 0 } .links a:hover { color: var(--blue) }
  .login { display: flex } .post { display: inline-flex } .menu-btn { display: none }
  .hero { padding: 3.5rem 0 4rem } .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 2.5rem }
  .heading-row { flex-direction: row; align-items: flex-end } .heading-row .btn { width: auto }
  .price { grid-template-columns: 1fr auto 1fr; text-align: left } .price span { display: block }
  .footer-main { grid-template-columns: repeat(4, 1fr) }
  .quick-cats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) }
  .region-grid { grid-template-columns: repeat(2, 1fr) }
  #dromGrid { grid-template-columns: repeat(3, 1fr) }
}
/* DESKTOP */
@media (min-width: 1024px) {
  .hero { padding: 4rem 0 5rem } .hero-inner { grid-template-columns: 1.15fr 1fr; gap: 4rem }
  .quick-cats { grid-template-columns: repeat(5, 1fr) }
  .region-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem }
  #dromGrid { grid-template-columns: repeat(5, 1fr) }
}
@media (min-width: 1280px) {
  .region-grid { grid-template-columns: repeat(4, 1fr) }
}

/* ============================================
   BANDEAU COOKIES RGPD
   ============================================ */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
  transform: translateY(110%);
  transition: transform .45s cubic-bezier(.22,1,.36,1);
  font-family: 'Poppins', system-ui, sans-serif;
}
.cookie-banner.show {
  transform: translateY(0);
}
.cookie-inner {
  width: min(1180px, calc(100% - var(--cont) * 2));
  margin: auto;
  padding: 1.25rem var(--cont);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
}
.cookie-text {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
}
.cookie-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(245, 158, 11, .3);
}
.cookie-icon i { width: 22px; height: 22px; }
.cookie-content h3 {
  margin: 0 0 .25rem;
  font-size: var(--base);
  font-weight: 700;
  color: var(--ink);
}
.cookie-content p {
  margin: 0;
  font-size: var(--sm);
  color: var(--muted);
  line-height: 1.5;
}
.cookie-content a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.cookie-btn {
  height: 42px;
  padding: 0 1.125rem;
  border-radius: var(--rs);
  font-size: var(--sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  transition: background .2s, color .2s, transform .15s, border-color .2s;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn i { width: 16px; height: 16px; }
.cookie-btn-primary {
  background: var(--blue);
  color: #fff;
}
.cookie-btn-primary:hover { background: #1d4ed8; }
.cookie-btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.cookie-btn-ghost:hover { background: var(--pale); border-color: var(--blue); color: var(--blue); }
.cookie-btn-text {
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  padding: 0 .5rem;
}
.cookie-btn-text:hover { color: var(--ink); text-decoration: underline; }

@media (min-width: 768px) {
  .cookie-inner {
    grid-template-columns: 1fr auto;
    gap: 2rem;
  }
  .cookie-actions { justify-content: flex-end; }
}

/* PANEL DE PARAMETRAGE */
.cookie-prefs {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity .25s;
}
.cookie-prefs.show {
  display: flex;
  opacity: 1;
}
.cookie-prefs-card {
  background: var(--card);
  border-radius: var(--rl);
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  transform: scale(.96);
  transition: transform .25s;
}
.cookie-prefs.show .cookie-prefs-card { transform: scale(1); }
.cookie-prefs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.cookie-prefs-head h2 {
  margin: 0;
  font-size: var(--xl);
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cookie-prefs-head h2 i { width: 24px; height: 24px; color: var(--blue); }
.cookie-prefs-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background .2s, color .2s;
}
.cookie-prefs-close:hover { background: var(--pale); color: var(--ink); }
.cookie-prefs-close i { width: 20px; height: 20px; }
.cookie-prefs-intro {
  color: var(--muted);
  font-size: var(--sm);
  line-height: 1.6;
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.cookie-pref-item {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.cookie-pref-item:last-of-type { border-bottom: 0; }
.cookie-pref-info { flex: 1; }
.cookie-pref-info h4 {
  margin: 0 0 .25rem;
  font-size: var(--base);
  font-weight: 700;
  color: var(--ink);
}
.cookie-pref-info p {
  margin: 0;
  font-size: var(--xs);
  color: var(--muted);
  line-height: 1.5;
}
.cookie-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  margin-top: .25rem;
}
.cookie-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-toggle .slider {
  position: absolute;
  inset: 0;
  background: var(--line);
  border-radius: 999px;
  transition: background .2s;
  cursor: pointer;
}
.cookie-toggle .slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.cookie-toggle input:checked + .slider { background: var(--blue); }
.cookie-toggle input:checked + .slider::before { transform: translateX(20px); }
.cookie-toggle input:disabled + .slider {
  background: #cbd5e1;
  cursor: not-allowed;
  opacity: .7;
}
.cookie-prefs-foot {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.cookie-prefs-foot .cookie-btn { flex: 1; min-width: 140px; justify-content: center; }

@media (min-width: 640px) {
  .cookie-prefs-card { padding: 2rem 2rem 1.5rem; }
}

/* ============================================
   ESPACE PERSONNEL (compte.html)
   ============================================ */
.account-page {
  background: var(--pale);
  min-height: calc(100vh - 80px);
  padding: var(--sp-xl) 0;
}
.account-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .account-layout { grid-template-columns: 280px 1fr; gap: 2rem; }
}

/* SIDEBAR */
.account-sidebar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rl);
  padding: 1.25rem;
  height: fit-content;
  position: sticky;
  top: 80px;
}
.account-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.account-avatar-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
}
.account-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-avatar-wrap i { width: 28px; height: 28px; }
.account-avatar-edit {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--card);
}
.account-avatar-edit i { width: 11px; height: 11px; }
.account-avatar-edit input { display: none; }
.account-user-info { flex: 1; min-width: 0; }
.account-user-name {
  font-weight: 700;
  font-size: var(--base);
  margin: 0 0 .125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-user-email {
  font-size: var(--xs);
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-nav { display: flex; flex-direction: column; gap: .25rem; }
.account-nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .875rem;
  border-radius: var(--r);
  font-size: var(--sm);
  font-weight: 500;
  color: var(--ink);
  transition: background .2s, color .2s;
  text-align: left;
  width: 100%;
}
.account-nav-item:hover { background: var(--pale); color: var(--blue); }
.account-nav-item.active {
  background: var(--blue);
  color: #fff;
}
.account-nav-item.active .account-nav-icon { color: #fff; }
.account-nav-icon { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.account-nav-item.active .account-nav-badge {
  background: rgba(255,255,255,.25);
  color: #fff;
}
.account-nav-badge {
  margin-left: auto;
  background: var(--pale);
  color: var(--blue);
  font-size: var(--xs);
  font-weight: 700;
  padding: .125rem .5rem;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}
.account-logout {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: #ef4444;
}
.account-logout:hover { background: #fef2f2; color: #dc2626; }

/* CONTENU */
.account-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.account-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rl);
  padding: 1.5rem;
}
@media (min-width: 768px) {
  .account-panel { padding: 2rem; }
}
.account-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.account-panel-title {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: var(--xl);
  font-weight: 800;
  margin: 0;
}
.account-panel-title i { width: 24px; height: 24px; color: var(--blue); }
.account-panel-subtitle {
  font-size: var(--sm);
  color: var(--muted);
  margin: .25rem 0 0;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rl);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow .25s, transform .25s;
}
.stat-tile:hover { box-shadow: 0 6px 20px rgba(44,58,77,.07); transform: translateY(-2px); }
.stat-tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.stat-tile-icon i { width: 24px; height: 24px; }
.stat-tile-icon.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-tile-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-tile-icon.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-tile-icon.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stat-tile-icon.pink { background: linear-gradient(135deg, #ec4899, #be185d); }
.stat-tile-info { min-width: 0; }
.stat-tile-value {
  display: block;
  font-size: var(--xl);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}
.stat-tile-label {
  display: block;
  font-size: var(--xs);
  color: var(--muted);
  margin-top: .25rem;
}

/* MES ANNONCES */
.listings-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.listing-search {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.listing-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.listing-search input {
  width: 100%;
  height: 44px;
  padding: 0 1rem 0 2.75rem;
  border: 1.5px solid var(--line);
  border-radius: var(--rs);
  font-size: var(--sm);
  background: var(--pale);
  transition: border-color .2s, background .2s;
}
.listing-search input:focus {
  outline: 0;
  border-color: var(--blue);
  background: var(--card);
}
.listing-filters {
  display: flex;
  gap: .375rem;
  flex-wrap: wrap;
}
.listing-filter {
  height: 44px;
  padding: 0 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--rs);
  font-size: var(--sm);
  font-weight: 500;
  color: var(--muted);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  transition: all .2s;
}
.listing-filter:hover { border-color: var(--blue); color: var(--blue); }
.listing-filter.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.listing-filter i { width: 14px; height: 14px; }

.listings-table {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.listings-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  padding: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition: background .2s;
}
.listings-row:hover { background: var(--pale); }
.listings-row:last-child { border-bottom: 0; }
.listing-thumb {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  background: var(--pale);
  display: grid;
  place-items: center;
  color: var(--muted);
  overflow: hidden;
  flex-shrink: 0;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-thumb i { width: 24px; height: 24px; }
.listing-info { min-width: 0; }
.listing-title {
  font-weight: 700;
  font-size: var(--sm);
  margin: 0 0 .25rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listing-meta {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  font-size: var(--xs);
  color: var(--muted);
}
.listing-meta span { display: inline-flex; align-items: center; gap: .25rem; }
.listing-meta i { width: 12px; height: 12px; }
.listing-price {
  font-weight: 800;
  color: var(--blue);
  font-size: var(--base);
  margin-top: .25rem;
  display: block;
}
.listing-status {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .125rem .5rem;
  border-radius: 4px;
  font-size: var(--xs);
  font-weight: 600;
}
.listing-status.active { background: #d1fae5; color: #065f46; }
.listing-status.pending { background: #fef3c7; color: #92400e; }
.listing-status.paused { background: #e5e7eb; color: #4b5563; }
.listing-status.sold { background: #dbeafe; color: #1e40af; }
.listing-status i { width: 12px; height: 12px; }

.listing-actions {
  display: flex;
  gap: .375rem;
  flex-wrap: wrap;
}
.listing-action {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--pale);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
.listing-action:hover { background: var(--blue); color: #fff; }
.listing-action.danger:hover { background: #ef4444; }
.listing-action i { width: 16px; height: 16px; }
.listing-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.listing-empty i { width: 48px; height: 48px; opacity: .4; }
.listing-empty h3 { margin: 1rem 0 .5rem; color: var(--ink); }
.listing-empty p { font-size: var(--sm); margin: 0 0 1.25rem; }

/* STATISTIQUES (charts) */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .charts-grid { grid-template-columns: 1.4fr 1fr; }
}
.chart-card { background: var(--pale); border-radius: var(--r); padding: 1.25rem; }
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.chart-title { font-size: var(--base); font-weight: 700; margin: 0; }
.chart-legend { display: flex; gap: .875rem; font-size: var(--xs); color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: .375rem; }
.chart-legend i { width: 10px; height: 10px; border-radius: 2px; display: block; }

.bar-chart { display: flex; align-items: flex-end; gap: .5rem; height: 180px; padding: 1rem 0; }
.bar-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .375rem; }
.bar-chart-bar {
  width: 100%;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: opacity .2s;
  min-height: 4px;
}
.bar-chart-bar:hover { opacity: .8; }
.bar-chart-bar.views { background: linear-gradient(180deg, #f59e0b, #d97706); }
.bar-chart-bar .bar-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.bar-chart-label { font-size: var(--xs); color: var(--muted); font-weight: 600; }

.donut-chart {
  width: 160px;
  height: 160px;
  margin: 0 auto 1rem;
  position: relative;
}
.donut-chart svg { transform: rotate(-90deg); }
.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}
.donut-center strong { display: block; font-size: var(--xl); font-weight: 800; }
.donut-center span { font-size: var(--xs); color: var(--muted); }

.top-list { list-style: none; padding: 0; margin: 0; }
.top-list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
}
.top-list li:last-child { border: 0; }
.top-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--pale);
  color: var(--muted);
  font-size: var(--xs);
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.top-list li:nth-child(1) .top-rank { background: #fef3c7; color: #92400e; }
.top-list li:nth-child(2) .top-rank { background: #e5e7eb; color: #4b5563; }
.top-list li:nth-child(3) .top-rank { background: #fed7aa; color: #9a3412; }
.top-name { flex: 1; font-size: var(--sm); font-weight: 500; }
.top-count { font-size: var(--xs); color: var(--muted); font-weight: 600; }

/* FORMULAIRES */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) {
  .form-row.cols-2 { grid-template-columns: 1fr 1fr; }
}
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: var(--sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .375rem;
}
.form-label .req { color: #ef4444; }
.form-input {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--line);
  border-radius: var(--rs);
  padding: 0 1rem;
  font-size: var(--base);
  color: var(--ink);
  background: var(--card);
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-textarea { height: auto; padding: .75rem 1rem; min-height: 100px; resize: vertical; font-family: inherit; }
.form-help { font-size: var(--xs); color: var(--muted); margin-top: .25rem; }

.password-strength {
  margin-top: .5rem;
  display: flex;
  gap: .25rem;
  align-items: center;
}
.password-strength-bar {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.password-strength-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--strength, 0%);
  background: var(--strength-color, #ef4444);
  transition: width .3s, background .3s;
}
.password-strength-label { font-size: var(--xs); font-weight: 600; min-width: 60px; text-align: right; }

.form-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.btn-danger {
  background: #ef4444;
  color: #fff;
}
.btn-danger:hover { background: #dc2626; }

/* ZONES DANGEREUSES */
.danger-zone {
  border: 1.5px solid #fecaca;
  background: #fef2f2;
  border-radius: var(--rl);
  padding: 1.5rem;
}
.danger-zone-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #dc2626;
  font-size: var(--base);
  font-weight: 700;
  margin: 0 0 .5rem;
}
.danger-zone-title i { width: 20px; height: 20px; }
.danger-zone p { color: #7f1d1d; font-size: var(--sm); margin: 0 0 1rem; }

/* MODAL EDIT */
.edit-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity .25s;
}
.edit-modal-overlay.show { display: flex; opacity: 1; }
.edit-modal {
  background: var(--card);
  border-radius: var(--rl);
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  transform: scale(.96);
  transition: transform .25s;
}
.edit-modal-overlay.show .edit-modal { transform: scale(1); }
.edit-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.edit-modal-head h3 {
  margin: 0;
  font-size: var(--xl);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.edit-modal-head h3 i { width: 22px; height: 22px; color: var(--blue); }
.edit-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background .2s, color .2s;
}
.edit-modal-close:hover { background: var(--pale); color: var(--ink); }
.edit-modal-close i { width: 20px; height: 20px; }

/* TOGGLE SWITCH */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  gap: 1rem;
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-info { flex: 1; }
.toggle-info h4 { margin: 0 0 .25rem; font-size: var(--base); font-weight: 700; }
.toggle-info p { margin: 0; font-size: var(--xs); color: var(--muted); line-height: 1.5; }
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch .slider {
  position: absolute;
  inset: 0;
  background: var(--line);
  border-radius: 999px;
  transition: background .2s;
  cursor: pointer;
}
.toggle-switch .slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.toggle-switch input:checked + .slider { background: var(--blue); }
.toggle-switch input:checked + .slider::before { transform: translateX(22px); }

/* MOBILE NAV TOGGLE */
@media (max-width: 899px) {
  .account-sidebar { position: static; }
}
