/* ═══════════════════════════════════════════════════════════
   SLMTRAVEL — Espace Hôtelier
   Design : raffiné / professionnel / tonalité sable + vert saoudien
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600&family=DM+Serif+Display:ital@0;1&display=swap');

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --sand:      #F5F0E8;
  --sand-dark: #EAE3D3;
  --green:     #1A5C3A;
  --green-mid: #2D7A52;
  --green-lt:  #E8F2EC;
  --gold:      #C8963E;
  --gold-lt:   #FDF5E8;
  --ink:       #1C1C1E;
  --ink-mid:   #3D3D40;
  --ink-muted: #7A7A80;
  --white:     #FFFFFF;
  --border:    #DDD8CC;
  --danger:    #C0392B;
  --danger-lt: #FDEEEC;
  --warning:   #D4830A;
  --warning-lt:#FEF6E4;
  --success:   #1A5C3A;
  --success-lt:#E8F2EC;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);

  --sidebar-w: 240px;
  --header-h:  60px;
  --font-main: 'Sora', sans-serif;
  --font-disp: 'DM Serif Display', serif;
}

/* ── Reset & base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font-main);
  background: var(--sand);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Layout principal ────────────────────────────────────── */
.hb-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
.hb-sidebar {
  width: var(--sidebar-w);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .25s ease;
}
.hb-sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hb-sidebar-logo .logo-text {
  font-family: var(--font-disp);
  font-size: 1.3rem;
  color: var(--white);
  letter-spacing: .02em;
}
.hb-sidebar-logo .logo-sub {
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 2px;
}
.hb-sidebar-hotel {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hb-sidebar-hotel-avatar {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--green-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  color: var(--white);
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.hb-sidebar-hotel-name {
  font-size: .82rem;
  color: var(--white);
  font-weight: 500;
  line-height: 1.3;
}
.hb-sidebar-hotel-city {
  font-size: .72rem;
  color: rgba(255,255,255,.45);
}

/* Nav */
.hb-nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.hb-nav-section {
  padding: 14px 20px 4px;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}
.hb-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.65);
  font-size: .85rem;
  cursor: pointer;
  border-radius: 0;
  transition: background .15s, color .15s;
  position: relative;
}
.hb-nav-item:hover { background: rgba(255,255,255,.06); color: var(--white); }
.hb-nav-item.active {
  background: var(--green);
  color: var(--white);
}
.hb-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .8; }
.hb-nav-item.active svg { opacity: 1; }
.hb-nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--white);
  font-size: .65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.hb-sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.hb-sidebar-footer a {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}
.hb-sidebar-footer a:hover { color: var(--white); }

/* ── Contenu principal ───────────────────────────────────── */
.hb-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.hb-topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0;
  z-index: 50;
}
.hb-topbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.hb-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hb-topbar-notif {
  position: relative;
  cursor: pointer;
  color: var(--ink-muted);
}
.hb-topbar-notif svg { width: 20px; height: 20px; }
.hb-notif-dot {
  position: absolute;
  top: -2px; right: -2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--white);
}
.hb-topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .85rem;
  color: var(--ink-mid);
}
.hb-topbar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 600;
}

.hb-content { flex: 1; padding: 28px; max-width: 1200px; }

/* ── Page header ─────────────────────────────────────────── */
.hb-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.hb-page-title {
  font-family: var(--font-disp);
  font-size: 1.6rem;
  color: var(--ink);
  line-height: 1.2;
}
.hb-page-subtitle {
  font-size: .85rem;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* ── Stats cards ─────────────────────────────────────────── */
.hb-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.hb-stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.hb-stat-label {
  font-size: .78rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.hb-stat-value {
  font-family: var(--font-disp);
  font-size: 1.8rem;
  color: var(--ink);
  line-height: 1;
}
.hb-stat-delta {
  font-size: .78rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hb-stat-delta.up   { color: var(--success); }
.hb-stat-delta.down { color: var(--danger); }
.hb-stat-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  float: right;
}
.hb-stat-icon.green { background: var(--green-lt); color: var(--green); }
.hb-stat-icon.gold  { background: var(--gold-lt);  color: var(--gold);  }

/* ── Card ────────────────────────────────────────────────── */
.hb-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.hb-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hb-card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
}
.hb-card-body { padding: 22px; }

/* ── Table ───────────────────────────────────────────────── */
.hb-table { width: 100%; border-collapse: collapse; }
.hb-table th {
  text-align: left;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--sand);
}
.hb-table td {
  padding: 14px 16px;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.hb-table tr:last-child td { border-bottom: none; }
.hb-table tr:hover td { background: var(--sand); }
.hb-table-ref {
  font-family: monospace;
  font-size: .82rem;
  color: var(--ink-mid);
  background: var(--sand);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ── Badges statut ───────────────────────────────────────── */
.hb-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .74rem;
  font-weight: 500;
  white-space: nowrap;
}
.hb-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .6;
}
.hb-badge.pending   { background: var(--warning-lt); color: var(--warning); }
.hb-badge.confirmed { background: var(--success-lt); color: var(--success); }
.hb-badge.cancelled { background: var(--sand-dark);  color: var(--ink-muted); }
.hb-badge.refused   { background: var(--danger-lt);  color: var(--danger); }
.hb-badge.checked_in{ background: #E8F0FE;            color: #1A56DB; }
.hb-badge.completed { background: var(--success-lt); color: var(--success); }
.hb-badge.draft     { background: var(--sand-dark);  color: var(--ink-muted); }
.hb-badge.active    { background: var(--success-lt); color: var(--success); }
.hb-badge.suspended { background: var(--danger-lt);  color: var(--danger); }

/* ── Boutons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-mid); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-mid);
}
.btn-outline:hover { border-color: var(--ink-mid); background: var(--sand); }
.btn-danger {
  background: var(--danger-lt);
  color: var(--danger);
  border: 1px solid rgba(192,57,43,.15);
}
.btn-danger:hover { background: var(--danger); color: var(--white); }
.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-ghost { background: transparent; color: var(--ink-muted); border: none; }
.btn-ghost:hover { color: var(--ink); background: var(--sand); }

/* ── Formulaires ─────────────────────────────────────────── */
.hb-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.hb-form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.hb-form-grid.cols-1 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink-mid);
}
label .required { color: var(--danger); margin-left: 2px; }
input[type=text],
input[type=email],
input[type=tel],
input[type=number],
input[type=password],
input[type=date],
input[type=time],
input[type=url],
select,
textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-size: .88rem;
  transition: border .15s, box-shadow .15s;
  width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45,122,82,.12);
}
textarea { resize: vertical; min-height: 90px; }
.form-hint {
  font-size: .75rem;
  color: var(--ink-muted);
}
.form-error { font-size: .78rem; color: var(--danger); margin-top: 3px; }

/* ── Toggles & checkboxes ────────────────────────────────── */
.hb-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.hb-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: .83rem;
  transition: all .15s;
  user-select: none;
}
.hb-toggle-label:has(input:checked) {
  background: var(--green-lt);
  border-color: var(--green-mid);
  color: var(--green);
}
.hb-toggle-label input { display: none; }

/* ── Alertes ─────────────────────────────────────────────── */
.hb-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: .86rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.hb-alert.success { background: var(--success-lt); color: var(--success); border: 1px solid rgba(26,92,58,.15); }
.hb-alert.error   { background: var(--danger-lt);  color: var(--danger);  border: 1px solid rgba(192,57,43,.15); }
.hb-alert.warning { background: var(--warning-lt); color: var(--warning); border: 1px solid rgba(212,131,10,.15); }
.hb-alert.info    { background: #EFF6FF;            color: #1A56DB;        border: 1px solid rgba(26,86,219,.15); }

/* ── Upload photo ────────────────────────────────────────── */
.hb-photo-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border .15s, background .15s;
  color: var(--ink-muted);
  font-size: .85rem;
}
.hb-photo-upload:hover {
  border-color: var(--green-mid);
  background: var(--green-lt);
}
.hb-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.hb-photo-thumb {
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: var(--sand);
}
.hb-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hb-photo-del {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.5);
  color: white;
  border: none; border-radius: 50%;
  width: 22px; height: 22px;
  cursor: pointer;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Calendrier disponibilité ────────────────────────────── */
.hb-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 12px;
}
.hb-cal-day-header {
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 6px 0;
  text-transform: uppercase;
}
.hb-cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .1s;
  position: relative;
}
.hb-cal-day.available {
  background: var(--green-lt);
  color: var(--green);
}
.hb-cal-day.booked {
  background: var(--sand-dark);
  color: var(--ink-muted);
  cursor: default;
}
.hb-cal-day.blocked {
  background: var(--danger-lt);
  color: var(--danger);
}
.hb-cal-day.other-month { opacity: .3; }
.hb-cal-day:hover:not(.booked):not(.other-month) {
  border-color: var(--green-mid);
}
.hb-cal-day .day-price {
  font-size: .62rem;
  opacity: .7;
  margin-top: 1px;
}
.hb-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.hb-cal-nav-btn {
  background: var(--sand);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  cursor: pointer;
  color: var(--ink-mid);
  font-size: .85rem;
}
.hb-cal-month {
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
}

/* ── Empty state ─────────────────────────────────────────── */
.hb-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-muted);
}
.hb-empty-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  background: var(--sand-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
}
.hb-empty-title { font-size: 1rem; font-weight: 600; color: var(--ink-mid); margin-bottom: 6px; }
.hb-empty-text  { font-size: .85rem; max-width: 320px; margin: 0 auto 16px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .hb-sidebar { transform: translateX(-240px); }
  .hb-sidebar.open { transform: translateX(0); --sidebar-w: 240px; }
  .hb-main { margin-left: 0; }
  .hb-form-grid { grid-template-columns: 1fr; }
  .hb-form-grid.cols-3 { grid-template-columns: 1fr; }
  .hb-stats { grid-template-columns: 1fr 1fr; }
}
