:root {
  --bs-primary: #B23A2E;
  --bs-primary-rgb: 178, 58, 46;
  --bs-body-bg: #FAF5EE;
  --bs-body-font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.font-display { font-family: 'Georgia', 'Times New Roman', serif; }

/* Sidebar */
.admin-sidebar {
  --bs-offcanvas-bg: #3A2A1E;
  background-color: #3A2A1E !important;
  min-height: 100vh;
  color: rgba(255,255,255,0.75);
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,0.7);
  border-radius: 8px;
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
}
.admin-sidebar .nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.admin-sidebar .nav-link.active { background: #B23A2E; color: #fff; }
.admin-sidebar .nav-link i { width: 1.2rem; }
.sidebar-brand-text { color: #C9974D; }
.sidebar-brand-text small { color: rgba(255,255,255,0.5); }

/* Boutons / accents */
.btn-primary { --bs-btn-bg: #B23A2E; --bs-btn-border-color: #B23A2E; --bs-btn-hover-bg: #8F2C22; --bs-btn-hover-border-color: #8F2C22; }
.text-gold { color: #C9974D; }
.bg-cream-tint { background: #F3E9DB; }

/* Avatar */
.avatar-circle {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #C9974D, #B23A2E);
  display: inline-block;
}

/* Login */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #3A2A1E 0%, #8F2C22 55%, #A9762E 100%);
}
.login-card { border-radius: 14px; max-width: 400px; }

@media (min-width: 992px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    overflow-y: auto;
    z-index: 100;
  }
  .admin-main {
    margin-left: 260px;
  }
}

/* ===== Tableaux responsive (mobile-first) ===== */
/* Base = cartes empilées (mobile) */
.table-mobile-cards thead { display: none; }
.table-mobile-cards, .table-mobile-cards tbody, .table-mobile-cards tr, .table-mobile-cards td {
  display: block;
  width: 100%;
}
.table-mobile-cards tr {
  margin-bottom: 1rem;
  border: 1px solid rgba(58,42,30,0.1);
  border-radius: 10px;
  padding: 0.9rem;
}
.table-mobile-cards tr:last-child { margin-bottom: 0; }
.table-mobile-cards td {
  border: none !important;
  padding: 0.35rem 0 !important;
}
.table-mobile-cards td::before {
  content: attr(data-label);
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6B5D51;
  font-weight: 600;
  margin-bottom: 2px;
}

/* ===== Notifications ===== */
.notif-wrapper { position: relative; }
.notif-bell {
  background: none;
  border: none;
  position: relative;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--ink, #333);
  padding: 6px;
}
.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #B23A2E;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.notif-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  width: 320px;
  max-height: 380px;
  overflow-y: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: none;
  z-index: 500;
}
.notif-dropdown.show { display: block; }
.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.notif-item {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.notif-item:last-child { border-bottom: none; }
.notif-unread { background: #FDF3E0; }


/* À partir de la tablette : tableau classique restauré */
@media (min-width: 768px) {
  .table-mobile-cards thead { display: table-header-group; }
  .table-mobile-cards { display: table; width: 100%; }
  .table-mobile-cards tbody { display: table-row-group; }
  .table-mobile-cards tr { display: table-row; margin-bottom: 0; border: none; border-radius: 0; padding: 0; }
  .table-mobile-cards td { display: table-cell; padding: 0.9rem 1.3rem !important; }
  .table-mobile-cards td::before { content: none; }
}
.photo-apercu {
  max-height: 100px;
  border-radius: 6px;
  display: block;
}

.btn-supprimer-photo {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #dc3545;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.btn-supprimer-photo:hover {
  background: #b02a37;
}

/* Rappel "son en attente" */
.sound-hint {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1080;
  background: #3A2A1E;
  color: #fff;
  font-size: 0.82rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}