/* ═══════════════════════════════════════════════════════════
   ADMIN MODE — visible only when sessionStorage adr_admin === '1'
   ═══════════════════════════════════════════════════════════ */

/* ── Body offset when admin bar is showing ── */
body.admin-mode { padding-top: 48px; }
body.admin-mode nav.top-bar {
  top: 48px !important;
  z-index: 500 !important;  /* keep nav above page sections that have z-index:1 (e.g. avis page) */
}

/* ── ADMIN BAR (sticky top) ── */
.admin-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: linear-gradient(90deg, #1a1010, #2a1818 50%, #1a1010);
  color: #f4e0a8;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 9999;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  font-family: 'Tenor Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 1.5px;
}
body.admin-mode .admin-bar { display: flex; }

.admin-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-bar-badge {
  background: linear-gradient(135deg, #c9a961, #8b6914);
  color: #1a1010;
  padding: 5px 12px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 11px;
}
.admin-bar-title { opacity: 0.85; }

.admin-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-bar-btn {
  background: transparent;
  color: #f4e0a8;
  border: 1px solid rgba(244, 224, 168, 0.4);
  border-radius: 8px;
  padding: 6px 14px;
  font-family: 'Tenor Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-bar-btn:hover {
  background: rgba(244, 224, 168, 0.12);
  border-color: rgba(244, 224, 168, 0.7);
}
.admin-bar-btn.logout {
  border-color: rgba(255, 120, 120, 0.5);
  color: #ff9090;
}
.admin-bar-btn.logout:hover {
  background: rgba(255, 120, 120, 0.12);
  border-color: rgba(255, 120, 120, 0.8);
}

/* ── EDIT BUBBLES on editable items ── */
.editable {
  position: relative;
}
.edit-bubbles {
  display: none;
  position: absolute;
  top: 12px; right: 12px;
  gap: 6px;
  z-index: 10;
}
body.admin-mode .editable .edit-bubbles { display: flex; }

.edit-bubble {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid #1a1010;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.15s, box-shadow 0.2s;
  padding: 0;
}
.edit-bubble:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.edit-bubble.bubble-delete:hover {
  background: #ffe5e5;
  border-color: #c0392b;
}

/* Subtle outline on editable cards in admin mode */
body.admin-mode .editable {
  outline: 1px dashed rgba(201, 169, 97, 0);
  outline-offset: 4px;
  transition: outline-color 0.25s;
}
body.admin-mode .editable:hover {
  outline-color: rgba(201, 169, 97, 0.6);
}

/* ── ADD BUTTON (for adding new items to a list) ── */
.admin-add-btn {
  display: none;
  margin: 24px auto 8px;
  background: rgba(255,255,255,0.92);
  border: 1px dashed #1a1010;
  border-radius: 14px;
  padding: 18px 28px;
  font-family: 'Tenor Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #1a1010;
  cursor: pointer;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
body.admin-mode .admin-add-btn { display: inline-flex; }
.admin-add-btn:hover {
  background: linear-gradient(135deg, #f4e0a8, #c9a961);
  border-style: solid;
  border-color: #1a1010;
  transform: translateY(-2px);
}
.admin-add-btn .plus { font-size: 18px; line-height: 1; }
.admin-add-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ── MODAL (edit form) ── */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 7, 5, 0.7);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.admin-modal-overlay.show { display: flex; }

.admin-modal {
  background: #ffffff;
  border: 1px solid #1a1010;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px 36px 30px;
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 20px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.admin-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #8b6914, #c9a961 40%, #f4e0a8 50%, #c9a961 60%, #8b6914);
  border-radius: 0 0 4px 4px;
}

.admin-modal h2 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 24px;
  color: #1a1010;
  margin: 0 0 6px;
  text-align: center;
}
.admin-modal .modal-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(30, 15, 10, 0.6);
  text-align: center;
  margin-bottom: 24px;
}

.admin-modal .field-group { margin-bottom: 16px; }
.admin-modal .field-group label {
  display: block;
  font-family: 'Tenor Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(30, 15, 10, 0.75);
  margin-bottom: 6px;
}
.admin-modal .field-group input,
.admin-modal .field-group textarea,
.admin-modal .field-group select {
  width: 100%;
  background: #fff;
  border: 1px solid #1a1010;
  border-radius: 8px;
  padding: 11px 14px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: #1a1010;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-modal .field-group input:focus,
.admin-modal .field-group textarea:focus,
.admin-modal .field-group select:focus {
  border-color: #8b6914;
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
}
.admin-modal .field-group textarea { min-height: 80px; }
.admin-modal .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Image uploader inside modal */
.image-uploader {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.image-preview {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #faf5ec, #f0e6d2);
  border: 1px dashed rgba(26, 16, 16, 0.4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-preview .img-placeholder {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: rgba(30, 15, 10, 0.45);
  font-size: 15px;
}
.image-pick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #c9a961, #8b6914);
  color: #1a1010;
  border: 1px solid #1a1010;
  border-radius: 10px;
  font-family: 'Tenor Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.image-pick-btn:hover {
  background: linear-gradient(135deg, #f4e0a8, #c9a961);
}
.image-hint {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: rgba(30, 15, 10, 0.55);
  text-align: center;
}

.admin-modal .modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed rgba(26, 16, 16, 0.15);
}
.admin-modal .modal-actions .btn {
  padding: 11px 22px;
  border-radius: 10px;
  font-family: 'Tenor Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.2s;
}
.admin-modal .btn-cancel {
  background: #fff;
  color: #1a1010;
  border-color: #1a1010;
}
.admin-modal .btn-cancel:hover { background: #f5f5f5; }
.admin-modal .btn-save {
  background: linear-gradient(135deg, #c9a961, #8b6914);
  color: #1a1010;
  border-color: #1a1010;
  font-weight: 600;
}
.admin-modal .btn-save:hover {
  background: linear-gradient(135deg, #f4e0a8, #c9a961);
}

/* ── TOAST (small confirmation) ── */
.admin-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: linear-gradient(135deg, #c9a961, #8b6914);
  color: #1a1010;
  padding: 14px 26px;
  border: 1px solid #1a1010;
  border-radius: 12px;
  font-family: 'Tenor Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.admin-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
  .admin-bar { padding: 0 14px; font-size: 11px; height: 52px; }
  body.admin-mode { padding-top: 52px; }
  body.admin-mode nav.top-bar { top: 52px !important; }
  .admin-bar-title { display: none; }
  .admin-bar-btn { padding: 5px 10px; font-size: 10px; }
  .admin-modal { padding: 24px 20px; }
  .admin-modal .field-row { grid-template-columns: 1fr; gap: 0; }
}
