/* ============================================
   LÉGUME SOUKOU – CSS COMPLET
   Palette: Vert maraîcher + Ambre + Terre
   ============================================ */

:root {
  --green-dark:    #1a6b2f;
  --green:         #2d9249;
  --green-light:   #4dbf6a;
  --green-pale:    #e8f5ec;
  --amber:         #f5a623;
  --amber-dark:    #d4880f;
  --blue:          #1a5278;
  --blue-light:    #2980b9;
  --earth:         #7d5a3c;
  --bg:            #f5f7f0;
  --bg2:           #ffffff;
  --text:          #1c2b1e;
  --text-muted:    #6b7c6e;
  --border:        #d4e0d6;
  --radius:        16px;
  --radius-sm:     10px;
  --shadow:        0 4px 20px rgba(0,0,0,0.10);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
  --font:          'Nunito', sans-serif;
  --font-display:  'Playfair Display', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  overflow-y: auto;
  animation: fadeIn 0.25s ease;
  -webkit-overflow-scrolling: touch;
}
.screen.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== SPLASH ===== */
#screen-splash {
  background: #0f3d1a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.splash-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(45,146,73,0.3) 0%, transparent 70%);
}
.splash-content {
  position: relative;
  text-align: center;
  padding: 2rem;
  width: 100%;
}
.splash-logo { margin-bottom: 2.5rem; }
.logo-img-wrap {
  width: 200px;
  height: 200px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 60px rgba(45,146,73,0.4);
  animation: logoPop 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards;
  transform: scale(0.6);
  opacity: 0;
}
@keyframes logoPop {
  to { transform: scale(1); opacity: 1; }
}
.splash-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo-slogan {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  margin-top: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.loader-bar {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
  margin: 0 auto;
  overflow: hidden;
}
.loader-fill {
  height: 100%;
  width: 0%;
  background: var(--amber);
  border-radius: 99px;
  animation: loadAnim 2s ease forwards;
}
@keyframes loadAnim { to { width: 100%; } }

.accueil-logo-img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  margin-bottom: 0.75rem;
  animation: logoPop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.avatar-preview-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}
.dash-logo-wrap {
  margin-left: auto;
  margin-right: 0.5rem;
}
.dash-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  opacity: 0.9;
}

/* ===== ACCUEIL ===== */
#screen-accueil {
  background: var(--green-dark);
}
.accueil-bg {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='28' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.accueil-content {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 3rem 1.5rem 2rem;
}
.accueil-header {
  text-align: center;
  margin-bottom: 2rem;
}
.logo-sm { font-size: 3rem; }
.accueil-header h2 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.8rem;
  margin-top: 0.5rem;
}
.accueil-header p { color: rgba(255,255,255,0.65); font-size: 0.9rem; }

.accueil-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
.role-card {
  background: rgba(255,255,255,0.10);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.role-card:active { transform: scale(0.96); }
.role-card.selected { background: rgba(255,255,255,0.22); border-color: var(--amber); }
.role-card .role-icon { font-size: 2.2rem; display: block; margin-bottom: 0.5rem; }
.role-card h3 { color: #fff; font-size: 0.95rem; font-weight: 800; }
.role-card p { color: rgba(255,255,255,0.6); font-size: 0.78rem; margin-top: 0.3rem; }

.accueil-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.9rem 1.5rem;
  font-family: var(--font);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(245,166,35,0.35);
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary.full { width: 100%; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: var(--radius);
  padding: 0.9rem 1.5rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:active { transform: scale(0.97); }

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.65);
  border: none;
  font-family: var(--font);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  padding: 0.5rem;
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.9rem 1.5rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  margin-top: 1.5rem;
}
.btn-wa {
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.9rem 1.5rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  flex: 1;
}

/* ===== SCREEN HEADER ===== */
.screen-header {
  display: flex;
  align-items: center;
  padding: 1rem 1rem 0.75rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 0.75rem;
}
.screen-header h2 {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}
.back-btn {
  background: var(--green-pale);
  border: none;
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--green-dark);
  font-weight: 700;
}
.add-btn, .edit-btn {
  background: var(--green-pale);
  border: none;
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ===== FORMS ===== */
.form-container {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 3rem;
}
.form-icon { font-size: 3rem; text-align: center; margin-bottom: 0.5rem; }
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--green); }
.form-row { display: flex; gap: 0.75rem; }
.form-group.half { flex: 1; }

.pwd-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.form-link {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.form-link a {
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.role-selector {
  display: flex;
  gap: 0.5rem;
  background: var(--green-pale);
  border-radius: var(--radius);
  padding: 4px;
}
.role-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  padding: 0.65rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.role-btn.active {
  background: var(--green-dark);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ===== PHOTO PICKER ===== */
.photo-picker {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
  background: #fafff9;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.photo-picker:active { border-color: var(--green); }
.photo-picker img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.photo-picker.big {
  flex-direction: column;
  padding: 2rem;
  font-size: 1rem;
}
.photo-picker.big img { width: 100%; height: 180px; border-radius: var(--radius-sm); object-fit: cover; }
#p-photo-placeholder { text-align: center; line-height: 2; font-size: 2rem; }

/* ===== AUDIO RECORDER ===== */
.audio-recorder {
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.btn-record {
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.25rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
}
.btn-record.recording {
  background: #e74c3c;
  animation: pulse 1.2s ease infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.75; } }
.audio-status { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

/* ===== DASHBOARD ===== */
.dash-header {
  padding: 3rem 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-header.green { background: var(--green-dark); }
.dash-header.blue { background: var(--blue); }
.dash-user { display: flex; align-items: center; gap: 0.9rem; }
.dash-avatar { width: 52px; height: 52px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.4); object-fit: cover; }
.dash-user h3 { color: #fff; font-size: 1.1rem; font-weight: 800; }
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge.maraicher { background: var(--amber); color: #fff; }
.badge.grossiste { background: rgba(255,255,255,0.25); color: #fff; }
.notif-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 42px; height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
  color: #fff;
  position: relative;
}
.notif-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: var(--amber);
  border-radius: 50%;
}

.stats-row {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem 0;
  margin-top: -1rem;
}
.stat-card {
  flex: 1;
  background: #fff;
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num { display: block; font-size: 1.6rem; font-weight: 900; color: var(--green-dark); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1rem 1.25rem 2rem;
}
.menu-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s;
  border: 1.5px solid transparent;
}
.menu-item:active { transform: scale(0.96); border-color: var(--green-light); }
.menu-item span { font-size: 2rem; display: block; margin-bottom: 0.4rem; }
.menu-item p { font-size: 0.85rem; font-weight: 700; color: var(--text); }

/* ===== SEARCH BAR ===== */
.search-bar-wrap { padding: 1rem 1.25rem 0; }
.search-bar {
  position: relative;
}
.search-bar input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  font-family: var(--font);
  font-size: 1rem;
  background: #fff;
  outline: none;
}
.search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%; transform: translateY(-50%);
  font-size: 1rem;
}

/* ===== PRODUITS LIST ===== */
.produits-list {
  padding: 1rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.produit-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  gap: 0;
  cursor: pointer;
  transition: box-shadow 0.2s;
  border: 1.5px solid var(--border);
}
.produit-card:active { box-shadow: var(--shadow); }
.produit-card-img {
  width: 100px; height: 100px;
  object-fit: cover;
  flex-shrink: 0;
}
.produit-card-img-placeholder {
  width: 100px; height: 100px;
  background: var(--green-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}
.produit-card-body {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.produit-card-nom { font-weight: 800; font-size: 1rem; }
.produit-card-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.tag {
  background: var(--green-pale);
  color: var(--green-dark);
  border-radius: 99px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.tag.prix { background: #fff8e6; color: var(--amber-dark); }
.tag.dispo { background: #e6f0ff; color: var(--blue); }
.produit-card-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.btn-sm {
  background: var(--green-pale);
  color: var(--green-dark);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.7rem;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-sm.amber { background: #fff3d6; color: var(--amber-dark); }
.btn-sm.danger { background: #ffe8e6; color: #c0392b; }

/* ===== FILTER BAR ===== */
.filter-bar {
  padding: 0.75rem 1.25rem;
  display: flex;
  gap: 0.5rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.filter-bar input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
}
.filter-bar select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  font-family: var(--font);
  font-size: 0.85rem;
  background: #fff;
  outline: none;
  appearance: none;
}

/* ===== DEMANDES LIST ===== */
.demandes-list { padding: 1rem 1.25rem 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.demande-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--blue-light);
}
.demande-card h4 { font-weight: 800; font-size: 1rem; margin-bottom: 0.35rem; }
.demande-card .meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.demande-card .actions { display: flex; gap: 0.5rem; }

/* ===== VENDEURS LIST ===== */
.vendeurs-list { padding: 1rem 1.25rem 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.vendeur-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}
.vendeur-card img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--green-light); }
.vendeur-card-info { flex: 1; }
.vendeur-card-info h4 { font-weight: 800; }
.vendeur-card-info p { font-size: 0.85rem; color: var(--text-muted); }

/* ===== MESSAGERIE ===== */
.conversations-list { padding: 0.5rem 0 2rem; }
.conversation-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.conversation-item:active { background: var(--green-pale); }
.conv-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.conv-body { flex: 1; min-width: 0; }
.conv-body h4 { font-weight: 800; font-size: 0.95rem; }
.conv-body p { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { text-align: right; flex-shrink: 0; }
.conv-time { font-size: 0.75rem; color: var(--text-muted); }
.conv-badge { background: var(--green); color: #fff; border-radius: 99px; padding: 0.15rem 0.55rem; font-size: 0.75rem; font-weight: 700; margin-top: 0.25rem; display: inline-block; }

/* ===== CHAT ===== */
.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 10;
}
.chat-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.4); }
.chat-info { flex: 1; }
.chat-info h3 { color: #fff; font-size: 1rem; font-weight: 800; }
.chat-info span { color: rgba(255,255,255,0.65); font-size: 0.8rem; }
.chat-actions { display: flex; gap: 0.5rem; }
.chat-actions button { background: rgba(255,255,255,0.15); border: none; border-radius: 50%; width: 38px; height: 38px; font-size: 1rem; cursor: pointer; color: #fff; }
.chat-messages {
  flex: 1;
  padding: 1rem 1rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: calc(100vh - 130px);
}
.chat-bubble {
  max-width: 75%;
  padding: 0.65rem 0.9rem;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.5;
  position: relative;
}
.chat-bubble.sent {
  background: var(--green-dark);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-bubble.received {
  background: #fff;
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.bubble-time { font-size: 0.7rem; opacity: 0.6; margin-top: 0.25rem; text-align: right; }
.chat-input-bar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
}
.chat-input-bar input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 0.65rem 1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
}
.audio-btn, .send-btn {
  background: var(--green);
  border: none;
  border-radius: 50%;
  width: 42px; height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
}
.send-btn { background: var(--green-dark); }

/* ===== PROFIL ===== */
.profil-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem 3rem;
  text-align: center;
}
.profil-avatar-wrap {
  position: relative;
  margin-bottom: 1rem;
}
.profil-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--green-light);
}
.profil-badge {
  position: absolute;
  bottom: 0; right: 0;
  background: var(--amber);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  border: 3px solid #fff;
}
.profil-container h3 { font-size: 1.4rem; font-weight: 900; }
.profil-container > p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.3rem; }
.profil-info {
  width: 100%;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.info-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  text-align: left;
}
.info-row:last-child { border-bottom: none; }

/* ===== HISTORIQUE ===== */
.historique-list { padding: 1rem 1.25rem 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.historique-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hist-icon { font-size: 1.5rem; }
.hist-body { flex: 1; }
.hist-body p { font-size: 0.85rem; color: var(--text-muted); }
.hist-date { font-size: 0.78rem; color: var(--text-muted); }

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
}
.modal.hidden { display: none; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
}
.modal-content {
  position: relative;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 1.5rem;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--green-pale);
  border: none;
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 1rem;
  cursor: pointer;
}
.modal-photo { width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1rem; }
.modal-content h3 { font-size: 1.3rem; font-weight: 800; }
.modal-meta { display: flex; gap: 0.75rem; margin-top: 0.5rem; flex-wrap: wrap; }
.modal-vendeur {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}
.vendeur-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.modal-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
.modal-actions .btn-primary { flex: 1; }
.btn-audio-play {
  background: var(--green-pale);
  color: var(--green-dark);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 0.75rem;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: toastIn 0.3s ease;
  white-space: nowrap;
}
.toast.success { background: var(--green-dark); }
.toast.error { background: #e74c3c; }
.toast.hidden { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) none; } }

/* ===== LOADER ===== */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.8);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader-overlay.hidden { display: none; }
.spinner {
  width: 42px; height: 42px;
  border: 4px solid var(--green-pale);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3.5rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.empty-state p { font-size: 0.9rem; margin-top: 0.4rem; }
