/* ============================================================
   COCOLOVE — Mes annonces
   Fichier : MesAnnonces/mesannonces.css
   Reprend la charte de acces/Profil/profil.css
   ============================================================ */

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

:root {
  --bg-dark:        #0d0d14;
  --bg-card:        #161622;
  --bg-card-hover:  #1c1c2a;
  --primary-pink:   #ff3366;
  --primary-orange: #ff6666;
  --text-light:     #ffffff;
  --text-secondary: #b8b8c8;
  --text-muted:     #8e8e9f;
  --border-color:   #2a2a35;
  --success:        #10B981;
  --danger:         #ff5577;
  --warning:        #F59E0B;
  --radius:         10px;
  --radius-md:      14px;
  --radius-lg:      18px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  min-height: 100vh;
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Inter', sans-serif;
}

/* ─── Header ─────────────────────────────────────────────────── */
.ma-header {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-dark);
  z-index: 50;
}
.ma-back-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 50%;
}
.ma-back-btn:hover { background: rgba(255,255,255,.06); }
.ma-back-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ma-header h1 { font-size: 17px; font-weight: 800; }

/* ─── Contenu ────────────────────────────────────────────────── */
.ma-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 14px 90px;
}

.ma-summary {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.ma-summary strong { color: var(--text-light); }

/* ─── Etats vides / chargement ──────────────────────────────── */
.ma-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 70px 20px;
  color: var(--text-muted);
}
.ma-state svg { width: 52px; height: 52px; stroke: var(--text-muted); fill: none; stroke-width: 1.5; }
.ma-state-title { font-size: 15.5px; font-weight: 700; color: var(--text-secondary); }
.ma-state-text { font-size: 13px; max-width: 280px; line-height: 1.5; }
.ma-state-cta {
  margin-top: 4px;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(90deg, var(--primary-pink), var(--primary-orange));
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.ma-loader {
  width: 34px; height: 34px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-pink);
  border-radius: 50%;
  animation: ma-spin .7s linear infinite;
}
@keyframes ma-spin { to { transform: rotate(360deg); } }

/* ─── Liste des annonces ─────────────────────────────────────── */
.ma-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ma-card {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  position: relative;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.ma-card:hover { background: var(--bg-card-hover); border-color: rgba(255,51,102,.25); }

.ma-card-thumb {
  width: 78px; height: 78px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card-hover);
  display: flex; align-items: center; justify-content: center;
}
.ma-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ma-card-thumb svg { width: 26px; height: 26px; stroke: var(--text-muted); fill: none; stroke-width: 1.6; }

.ma-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ma-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.ma-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ma-card-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(255,51,102,.14);
  color: var(--primary-pink);
  flex-shrink: 0;
  white-space: nowrap;
}

.ma-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.ma-card-meta-item { display: flex; align-items: center; gap: 5px; }
.ma-card-meta-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

.ma-card-tarif {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-light);
  margin-top: 2px;
}

.ma-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.ma-btn-delete {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,85,119,.35);
  background: rgba(255,85,119,.08);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background .15s;
}
.ma-btn-delete:hover { background: rgba(255,85,119,.16); }
.ma-btn-delete:disabled { opacity: .5; cursor: not-allowed; }
.ma-btn-delete svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Modale de confirmation universelle (identique à Profil) ── */
.ma-confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(5,5,10,.72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
  z-index: 600;
}
.ma-confirm-overlay.open { opacity: 1; pointer-events: auto; }
.ma-confirm {
  width: 100%; max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  transform: scale(.94);
  transition: transform .2s;
}
.ma-confirm-overlay.open .ma-confirm { transform: scale(1); }
.ma-confirm-title { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.ma-confirm-text { font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px; }
.ma-confirm-actions { display: flex; gap: 10px; }
.ma-confirm-cancel, .ma-confirm-ok {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: opacity .15s, background .15s;
}
.ma-confirm-cancel { background: rgba(255,255,255,.06); color: var(--text-light); }
.ma-confirm-cancel:hover { background: rgba(255,255,255,.1); }
.ma-confirm-ok { background: var(--danger); color: #fff; }
.ma-confirm-ok:hover { opacity: .9; }
.ma-confirm-ok:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Toast ──────────────────────────────────────────────────── */
.ma-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 999;
  max-width: 90vw;
  text-align: center;
}
.ma-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.ma-toast.success { border-color: var(--success); }
.ma-toast.error   { border-color: var(--danger); }
.ma-toast.info    { border-color: var(--warning); }

@media (min-width: 720px) {
  .ma-header { padding: 0 24px; }
  .ma-content { padding: 24px 20px 100px; }
}
