/* ═══════════════════════════════════════════════════════════
   HOTELPRO — Design System
   Palette: Vert Forêt #1a3a2a · Orange #F97316 · Blanc #ffffff
   ═══════════════════════════════════════════════════════════ */

:root {
  --navy:       #1a3a2a;
  --navy-light: #1f4533;
  --navy-mid:   #255a40;
  --gold:       #F97316;
  --gold-light: #fb923c;
  --gold-pale:  rgba(249,115,22,.12);
  --cream:      #f0fdf4;
  --white:      #ffffff;
  --text:       #e8edf5;
  --text-muted: #7a8da8;
  --text-dim:   #4a5c72;
  --border:     rgba(255,255,255,.07);
  --surface:    rgba(255,255,255,.04);
  --surface2:   rgba(255,255,255,.07);
  --shadow:     0 4px 24px rgba(0,0,0,.35);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.2);
  --sidebar-w:  260px;
  --radius:     12px;
  --radius-sm:  8px;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans:  'DM Sans', sans-serif;
  --transition: .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }

body {
  font-family: var(--font-sans);
  background: #0a1f12;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--navy-mid); border-radius: 3px; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: var(--navy);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100;
  border-right: 1px solid rgba(249,115,22,.15);
  transition: transform var(--transition);
}
.sidebar-header { padding: 28px 24px 20px; border-bottom: 1px solid var(--border); }
.hotel-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--gold), #c2410c);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(249,115,22,.3);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-family: var(--font-serif); font-size: 17px; font-weight: 600; color: var(--white); }
.logo-sub  { font-family: var(--font-serif); font-size: 13px; color: var(--gold); font-style: italic; }

.sidebar-nav { flex: 1; padding: 20px 12px; overflow-y: auto; }
.nav-section { margin-bottom: 24px; }
.nav-section-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-dim); padding: 0 12px;
  margin-bottom: 6px; display: block;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text-muted); text-decoration: none;
  font-size: 13.5px; font-weight: 400;
  transition: all var(--transition); margin-bottom: 2px;
  position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; }
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item:active { transform: scale(.98); }
.nav-item.active {
  background: rgba(249,115,22,.18);
  color: var(--gold);
  font-weight: 600;
  border-left: 3px solid var(--gold);
  padding-left: 11px;
}
.nav-item.active i { color: var(--gold); }
.nav-item.active::before { display: none; }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.user-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px;
}
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--navy-mid), #0a1e0e);
  border: 2px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 15px; color: var(--gold);
  font-weight: 600; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { display: block; font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 10px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.5px; }
.logout-btn { color: var(--text-muted); font-size: 14px; text-decoration: none; padding: 4px; transition: color var(--transition); }
.logout-btn:hover { color: #e74c3c; }

/* TOPBAR */
.main-wrapper { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 64px; background: rgba(15,45,25,.8);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
  position: sticky; top: 0; z-index: 50;
}
.sidebar-toggle { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; padding: 6px; display: none; }
.topbar-breadcrumb { display: flex; align-items: center; gap: 8px; flex: 1; }
.breadcrumb-hotel { font-family: var(--font-serif); color: var(--gold); font-style: italic; }
.breadcrumb-sep { color: var(--text-dim); font-size: 10px; }
.breadcrumb-page { color: var(--text); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date { font-size: 12px; color: var(--text-muted); }

.content-area { padding: 28px; flex: 1; }

/* PAGE HEADER */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.page-title { font-family: var(--font-serif); font-size: 32px; font-weight: 500; color: var(--white); line-height: 1.1; }
.page-subtitle { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* KPI CARDS */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi-card { border-radius: var(--radius); padding: 22px 24px; display: flex; align-items: center; gap: 16px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.kpi-blue  { background: linear-gradient(135deg, #1a4a8a, #0f2d5c); border: 1px solid rgba(26,74,138,.4); }
.kpi-red   { background: linear-gradient(135deg, #8a1a2d, #5c0f1a); border: 1px solid rgba(138,26,45,.5); }
.kpi-gold  { background: linear-gradient(135deg, #7c2d12, #431407); border: 1px solid rgba(249,115,22,.3); }
.kpi-green { background: linear-gradient(135deg, #1a6b3a, #0f4225); border: 1px solid rgba(26,107,58,.5); }
.kpi-icon { width: 50px; height: 50px; background: rgba(255,255,255,.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: rgba(255,255,255,.85); flex-shrink: 0; }
.kpi-body { flex: 1; }
.kpi-value { display: block; font-size: 28px; font-weight: 600; color: #fff; line-height: 1; }
.kpi-label { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 4px; }
.kpi-bg-icon { position: absolute; right: -10px; bottom: -10px; font-size: 72px; color: rgba(255,255,255,.04); pointer-events: none; }

.metrics-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 24px; }
.metric-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.metric-icon { font-size: 18px; flex-shrink: 0; }
.metric-val { display: block; font-size: 18px; font-weight: 600; color: var(--white); }
.metric-lbl { display: block; font-size: 11px; color: var(--text-muted); }

/* CARDS */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-family: var(--font-serif); font-size: 17px; font-weight: 500; color: var(--white); display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--gold); font-size: 14px; }
.card-body { padding: 20px; }
.card-body.p-0 { padding: 0; }

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 16px; }
.donut-wrapper { display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; }
.donut-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -5px); text-align: center; }
.donut-pct { display: block; font-size: 22px; font-weight: 700; color: var(--gold); }
.donut-sub { display: block; font-size: 10px; color: var(--text-muted); }
.donut-legend { display: flex; flex-direction: column; gap: 6px; align-self: flex-start; width: 100%; margin-top: 8px; }
.dl-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.dl-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* DATA TABLE */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr { background: rgba(15,45,25,.6); border-bottom: 2px solid rgba(249,115,22,.2); }
.data-table th { padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); white-space: nowrap; }
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--surface2); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table td { padding: 13px 16px; font-size: 13px; color: var(--text); vertical-align: middle; }
.empty-state { text-align: center; padding: 40px !important; color: var(--text-muted); font-style: italic; }

/* BADGES */
.ref-badge { font-family: 'Courier New', monospace; font-size: 11px; font-weight: 600; background: rgba(249,115,22,.1); color: var(--gold); padding: 3px 8px; border-radius: 4px; border: 1px solid rgba(249,115,22,.2); white-space: nowrap; }
.ref-sm { font-size: 10px; padding: 2px 6px; }
.nights-badge { background: rgba(255,255,255,.08); color: var(--text); padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.status-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.status-lg { font-size: 13px; padding: 6px 14px; }
.status-disponible   { background: rgba(39,174,96,.15); color: #6ee09e; border: 1px solid rgba(39,174,96,.3); }
.status-occupee      { background: rgba(231,76,60,.15); color: #e87e74; border: 1px solid rgba(231,76,60,.3); }
.status-ennettoyage  { background: rgba(241,196,15,.15); color: #f5d85f; border: 1px solid rgba(241,196,15,.3); }
.status-horsservice  { background: rgba(149,165,166,.15); color: #9ab; border: 1px solid rgba(149,165,166,.3); }
.status-enattente    { background: rgba(241,196,15,.15); color: #f5d85f; border: 1px solid rgba(241,196,15,.3); }
.status-confirmee    { background: rgba(52,152,219,.15); color: #7ec8f0; border: 1px solid rgba(52,152,219,.3); }
.status-checkin      { background: rgba(39,174,96,.15); color: #6ee09e; border: 1px solid rgba(39,174,96,.3); }
.status-checkout     { background: rgba(149,165,166,.15); color: #9ab; border: 1px solid rgba(149,165,166,.3); }
.status-encours      { background: rgba(241,196,15,.15); color: #f5d85f; border: 1px solid rgba(241,196,15,.3); }
.status-annulee      { background: rgba(231,76,60,.15); color: #e87e74; border: 1px solid rgba(231,76,60,.3); }
.status-nonpayee     { background: rgba(231,76,60,.15); color: #e87e74; border: 1px solid rgba(231,76,60,.3); }
.status-partielpayee { background: rgba(241,196,15,.15); color: #f5d85f; border: 1px solid rgba(241,196,15,.3); }
.status-payee        { background: rgba(39,174,96,.15); color: #6ee09e; border: 1px solid rgba(39,174,96,.3); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: var(--radius-sm); font-family: var(--font-sans); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; border: 1px solid transparent; transition: all var(--transition); white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, var(--gold), #c2410c); color: #fff; border-color: var(--gold); box-shadow: 0 2px 12px rgba(249,115,22,.25); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(249,115,22,.35); }
.btn-primary:disabled { opacity: .5; pointer-events: none; }
.btn-secondary { background: var(--navy-light); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--navy-mid); }
.btn-outline { background: transparent; color: var(--gold); border-color: rgba(249,115,22,.4); }
.btn-outline:hover { background: var(--gold-pale); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--surface2); }

/* Bouton Retour (arrow-left) — orange partout dans l'appli */
.btn-ghost:has(.fa-arrow-left),
.btn-secondary:has(.fa-arrow-left) {
  color: #e67e22;
  border-color: rgba(230,126,34,.3);
  background: rgba(230,126,34,.06);
}
.btn-ghost:has(.fa-arrow-left):hover,
.btn-secondary:has(.fa-arrow-left):hover {
  background: rgba(230,126,34,.15);
  border-color: rgba(230,126,34,.55);
  color: #f39c12;
}
.btn-success { background: rgba(39,174,96,.2); color: #6ee09e; border-color: rgba(39,174,96,.4); }
.btn-success:hover { background: rgba(39,174,96,.3); }
.btn-danger { background: rgba(231,76,60,.2); color: #e87e74; border-color: rgba(231,76,60,.4); }
.btn-danger:hover { background: rgba(231,76,60,.3); }
.btn-warning { background: rgba(241,196,15,.2); color: #f5d85f; border-color: rgba(241,196,15,.4); }
.btn-warning:hover { background: rgba(241,196,15,.3); }
.btn-sm { padding: 5px 12px; font-size: 12px; gap: 5px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--surface2); color: var(--text-muted); text-decoration: none; border: 1px solid var(--border); transition: all var(--transition); font-size: 13px; }
.btn-icon:hover { background: var(--gold-pale); color: var(--gold); border-color: rgba(249,115,22,.3); }
.action-btns { display: flex; gap: 6px; }

/* FORMS */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; max-width: 900px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.form-control, .form-select { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); color: var(--text); padding: 10px 14px; font-family: var(--font-sans); font-size: 14px; transition: border-color var(--transition), background var(--transition); width: 100%; }
.form-control::placeholder { color: var(--text-dim); }
.form-control:focus, .form-select:focus { outline: none; border-color: rgba(249,115,22,.5); background: rgba(255,255,255,.07); box-shadow: 0 0 0 3px rgba(249,115,22,.1); }
.form-select option { background: var(--navy); }
textarea.form-control { resize: vertical; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-section-title { font-family: var(--font-serif); font-size: 17px; color: var(--gold); display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid rgba(249,115,22,.2); }
.form-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.field-error { font-size: 12px; color: #e87e74; }
.validation-summary { background: rgba(231,76,60,.1); border: 1px solid rgba(231,76,60,.3); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; color: #e87e74; font-size: 13px; }
.validation-summary ul { list-style: none; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text); }
.checkbox-label input[type="checkbox"] { accent-color: var(--gold); width: 16px; height: 16px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 14px; pointer-events: none; }
.input-icon .form-control { padding-left: 40px; }
.pwd-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; }
.pwd-toggle:hover { color: var(--text); }

/* FILTER BAR */
.filter-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; }
.filter-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-search { position: relative; flex: 1; min-width: 200px; }
.filter-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.filter-search .form-control { padding-left: 36px; }
.filter-form .form-select { min-width: 160px; }

/* ROOMS GRID */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.room-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform var(--transition), box-shadow var(--transition); }
.room-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.status-card-disponible  { border-top: 3px solid #27ae60; }
.status-card-occupee     { border-top: 3px solid #e74c3c; }
.status-card-ennettoyage { border-top: 3px solid #f1c40f; }
.status-card-horsservice { border-top: 3px solid #636e72; }
.room-card-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 0; }
.room-number { font-family: var(--font-serif); font-size: 24px; font-weight: 600; color: var(--white); }
.room-number-sm { font-family: var(--font-serif); font-size: 18px; font-weight: 600; color: var(--gold); }
.room-card-body { padding: 12px 16px; }
.room-type-badge { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 3px 8px; border-radius: 4px; margin-bottom: 10px; }
.type-simple         { background: rgba(52,152,219,.2); color: #7ec8f0; }
.type-double         { background: rgba(142,68,173,.2); color: #c49fda; }
.type-deluxe         { background: rgba(249,115,22,.2); color: var(--gold); }
.type-suite          { background: rgba(231,76,60,.2); color: #e87e74; }
.type-presidentielle { background: linear-gradient(90deg, rgba(249,115,22,.3), rgba(231,76,60,.3)); color: #fb923c; }
.room-details { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.room-details span { display: flex; align-items: center; gap: 4px; }
.room-details i { color: var(--gold); font-size: 11px; }
.room-price { font-size: 16px; font-weight: 600; color: var(--gold); }
.room-price span { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.room-equip { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.equip-tag { background: rgba(255,255,255,.07); color: var(--text-muted); font-size: 10px; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }
.room-card-footer { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--border); background: rgba(0,0,0,.1); }
.room-status-menu { position: relative; }
.statut-dropdown { position: absolute; right: 0; bottom: calc(100% + 4px); background: #1a4a30; border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 160px; z-index: 10; display: none; box-shadow: var(--shadow); }
.statut-dropdown.open { display: block; }
.statut-dropdown button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 14px; background: none; border: none; color: var(--text-muted); font-size: 13px; cursor: pointer; text-align: left; transition: background var(--transition); }
.statut-dropdown button:hover { background: var(--surface2); color: var(--text); }
.statut-dropdown button.active { color: var(--gold); }

.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-disponible  { background: #27ae60; }
.dot-occupee     { background: #e74c3c; }
.dot-ennettoyage { background: #f1c40f; }
.dot-horsservice { background: #636e72; }

/* CLIENTS */
.client-cell { display: flex; align-items: center; gap: 10px; }
.client-avatar-sm { width: 32px; height: 32px; background: linear-gradient(135deg, var(--navy-mid), #14532d); border: 1px solid rgba(249,115,22,.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--gold); flex-shrink: 0; }
.client-avatar-lg { width: 64px; height: 64px; background: linear-gradient(135deg, var(--navy-mid), #14532d); border: 2px solid var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 24px; font-weight: 600; color: var(--gold); flex-shrink: 0; }
.client-name { font-weight: 500; color: var(--text); }
.client-profile-header { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.client-profile-header h2 { font-family: var(--font-serif); font-size: 24px; }

/* DETAIL VIEWS */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.di { display: flex; flex-direction: column; gap: 3px; }
.di-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
.di-val { font-size: 13px; color: var(--text); }
.chambre-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.chambre-item:last-child { border-bottom: none; }
.ci-left { display: flex; align-items: center; gap: 10px; }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; }
.statut-actions { display: flex; flex-direction: column; gap: 10px; }

/* RESERVATION FORM */
.client-search-wrapper { position: relative; }
.client-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #1a4a30; border: 1px solid var(--border); border-radius: var(--radius-sm); z-index: 20; max-height: 200px; overflow-y: auto; box-shadow: var(--shadow); }
.client-dropdown.hidden { display: none; }
.dd-item { padding: 10px 14px; cursor: pointer; transition: background var(--transition); }
.dd-item:hover { background: var(--surface2); }
.dd-item strong { display: block; color: var(--text); font-size: 13px; }
.dd-item small { color: var(--text-muted); font-size: 11px; }
.dd-empty { padding: 12px 14px; color: var(--text-muted); font-style: italic; }
.selected-client-card { background: rgba(39,174,96,.1); border: 1px solid rgba(39,174,96,.3); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 8px; }
.selected-client-card.hidden { display: none; }
.sc-info { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.chambres-select-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.chambre-select-card { border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; transition: all var(--transition); display: block; }
.chambre-select-card:has(input:checked) { border-color: var(--gold); background: var(--gold-pale); }
.chambre-select-card input { display: none; }
.csc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.csc-price { font-size: 15px; font-weight: 600; color: var(--gold); }
.csc-price span { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.csc-cap { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.resume-box { background: rgba(249,115,22,.08); border: 1px solid rgba(249,115,22,.2); border-radius: var(--radius-sm); padding: 16px; margin-top: 12px; }
.resume-box.hidden { display: none; }
.resume-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; color: var(--text-muted); }
.resume-total { border-top: 1px solid rgba(249,115,22,.2); margin-top: 6px; padding-top: 8px; font-size: 15px; color: var(--text); }
.info-hint { background: rgba(52,152,219,.08); border: 1px solid rgba(52,152,219,.2); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }

/* FACTURES */
.invoice-totals { float: right; min-width: 280px; margin-top: 16px; }
.it-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; color: var(--text-muted); }
.it-grand-total { border-top: 2px solid rgba(249,115,22,.3); border-bottom: 2px solid rgba(249,115,22,.3); padding: 10px 0; font-size: 16px; font-weight: 700; color: var(--white); }
.fm-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.fm-row:last-child { border-bottom: none; }
.fm-total { font-weight: 700; color: var(--white); }
.facture-mini { margin-bottom: 16px; }
.paiement-form { border-top: 1px solid var(--border); padding-top: 16px; }

/* ALERTS */
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 13px; animation: slideIn .25s ease; transition: opacity .4s; }
.alert-success { background: rgba(39,174,96,.15); border: 1px solid rgba(39,174,96,.3); color: #6ee09e; }
.alert-error, .alert-danger { background: rgba(231,76,60,.15); border: 1px solid rgba(231,76,60,.3); color: #e87e74; }
.alert-close { margin-left: auto; background: none; border: none; color: inherit; cursor: pointer; opacity: 0.7; font-size: 12px; }
.alert-close:hover { opacity: 1; }
@keyframes slideIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* ══════════════════════════════════════════════════════
   LOGIN — Centré
   ══════════════════════════════════════════════════════ */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 30% 40%, #0b3320 0%, #0a1f12 60%);
  overflow: hidden;
}
.login-page {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 100vh; padding: 24px; position: relative;
}

/* Orbes décoratifs en arrière-plan */
.login-bg-orb {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(80px);
}
.login-bg-orb1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(249,115,22,.07) 0%, transparent 70%);
  top: -100px; left: -100px;
}
.login-bg-orb2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(26,107,58,.15) 0%, transparent 70%);
  bottom: -80px; right: -80px;
}

/* Carte centrale */
.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  background: rgba(13, 35, 20, 0.85);
  border: 1px solid rgba(249,115,22,.15);
  border-radius: 20px;
  padding: 40px 40px 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(12px);
}

/* Branding hôtel */
.login-brand { text-align: center; margin-bottom: 28px; }
.login-crown {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--gold), #c2410c);
  border-radius: 16px; font-size: 28px; color: #fff;
  box-shadow: 0 8px 24px rgba(249,115,22,.35);
  margin-bottom: 16px;
}
.login-hotel-name {
  font-family: var(--font-serif); font-size: 2rem; font-weight: 400;
  color: var(--white); line-height: 1.15; margin: 0 0 6px;
  letter-spacing: .5px;
}
.login-tagline {
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 2.5px; text-transform: uppercase;
}

/* Séparateur doré */
.login-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(249,115,22,.3), transparent);
  margin-bottom: 28px;
}

/* En-tête du formulaire */
.login-form-header { text-align: center; margin-bottom: 28px; }
.lf-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: var(--gold-pale); border: 1px solid rgba(249,115,22,.25);
  border-radius: 12px; font-size: 18px; color: var(--gold); margin-bottom: 12px;
}
.login-form-header h2 { font-family: var(--font-serif); font-size: 1.5rem; color: var(--white); margin: 0 0 4px; }
.login-form-header p  { color: var(--text-muted); font-size: 13px; margin: 0; }

/* Formulaire */
.login-form .form-group { margin-bottom: 16px; }
.form-check-row { margin-bottom: 20px; }

/* Bouton */
.btn-login {
  width: 100%; justify-content: center;
  background: linear-gradient(135deg, var(--gold), #c2410c);
  color: #fff; padding: 13px; font-size: 14px; font-weight: 600;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition); box-shadow: 0 4px 16px rgba(249,115,22,.3);
  display: flex; align-items: center; gap: 8px;
}
.btn-login:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249,115,22,.4); }

/* Info démo */
.login-demo-hint {
  margin-top: 20px; padding: 10px 14px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-sm); font-size: 11.5px; color: var(--text-muted);
  display: flex; gap: 8px; align-items: flex-start;
}

/* UTILITIES */
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; } .py-4 { padding-top: 24px; padding-bottom: 24px; }
.p-3 { padding: 16px; }
.fw-600 { font-weight: 600; } .d-block { display: block; } .d-inline { display: inline; }
.text-muted { color: var(--text-muted) !important; } .text-gold { color: var(--gold) !important; }
.text-success { color: #6ee09e !important; } .text-warning { color: #f5d85f !important; }
.text-danger { color: #e87e74 !important; } .text-info { color: #7ec8f0 !important; }
.text-primary { color: #7ec8f0 !important; } .text-secondary { color: var(--text-muted) !important; }
.text-small { font-size: 12px; } .text-center { text-align: center; }
.rounded { border-radius: var(--radius-sm); } .bg-subtle { background: rgba(255,255,255,.04); }
.hidden { display: none !important; }
.link-small { font-size: 12px; color: var(--gold); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.link-small:hover { text-decoration: underline; }
.empty-card { grid-column: 1/-1; text-align: center; padding: 48px; color: var(--text-muted); }
.empty-card i { font-size: 32px; display: block; margin-bottom: 12px; opacity: .4; }

@media (max-width: 1200px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } .metrics-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .login-card { padding: 28px 24px 24px; max-width: 100%; }
}
@media (max-width: 600px) { .kpi-grid { grid-template-columns: 1fr; } .metrics-row { grid-template-columns: repeat(2, 1fr); } .content-area { padding: 16px; } }

/* ══════════════════════════════════════════════════════
   PLANNING GRID
   ══════════════════════════════════════════════════════ */
.planning-legend {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-bottom: 16px; font-size: 12px; color: var(--text-muted);
}
.pl-item { display: flex; align-items: center; gap: 6px; }
.pl-dot  { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.pl-checkin     { background: rgba(39,174,96,.5); }
.pl-checkin-out { background: rgba(52,152,219,.5); }
.pl-checkout    { background: rgba(241,196,15,.5); }
.pl-dispo       { background: rgba(255,255,255,.07); border: 1px solid var(--border); }

.planning-wrapper { overflow-x: auto; }

.planning-grid {
  display: grid;
  min-width: max-content;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.pg-header-col {
  background: rgba(15,45,25,.8);
  padding: 10px 16px;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 1px; position: sticky; left: 0;
  border-bottom: 2px solid rgba(249,115,22,.2);
  z-index: 2;
}

.pg-day-header {
  background: rgba(15,45,25,.8);
  padding: 6px 4px; text-align: center;
  border-bottom: 2px solid rgba(249,115,22,.2);
  border-left: 1px solid var(--border);
  min-width: 36px;
}
.pg-day-header.today    { background: rgba(249,115,22,.15); }
.pg-day-header.weekend  { background: rgba(255,255,255,.02); }
.day-num  { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.day-name { display: block; font-size: 9px; color: var(--text-muted); text-transform: uppercase; }

.pg-room-label {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 8px 14px; gap: 2px;
  border-bottom: 1px solid var(--border);
  position: sticky; left: 0;
  background: var(--navy); z-index: 1;
  min-width: 100px;
}


.pg-cell {
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-width: 36px; min-height: 40px;
  position: relative; cursor: default;
  transition: opacity .15s;
  overflow: hidden;
}

.pg-free      { background: transparent; }
.pg-free:hover{ background: rgba(255,255,255,.03); }
.pg-confirmed { background: rgba(52,152,219,.2); border-left-color: rgba(52,152,219,.4); }
.pg-occupied  { background: rgba(39,174,96,.2); border-left-color: rgba(39,174,96,.4); }
.pg-checkout  { background: rgba(241,196,15,.15); border-left-color: rgba(241,196,15,.4); }
.today-cell   { background: rgba(249,115,22,.05); }
.pg-start     { border-left: 3px solid rgba(255,255,255,.5) !important; }
.pg-end       { border-right: 2px solid rgba(255,255,255,.3); }

.pg-guest-name {
  position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  font-size: 9px; color: rgba(255,255,255,.8); white-space: nowrap;
  overflow: hidden; max-width: 80px;
}

/* ══════════════════════════════════════════════════════
   UTILISATEURS / ROLES
   ══════════════════════════════════════════════════════ */
.role-badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
}
.role-admin          { background: rgba(249,115,22,.15); color: var(--gold); border: 1px solid rgba(249,115,22,.3); }
.role-receptionniste { background: rgba(52,152,219,.15); color: #7ec8f0; border: 1px solid rgba(52,152,219,.3); }
.role-caissier       { background: rgba(39,174,96,.15);  color: #6ee09e; border: 1px solid rgba(39,174,96,.3); }
.role-gouvernante    { background: rgba(155,89,182,.15); color: #c49fda; border: 1px solid rgba(155,89,182,.3); }
.role-economat       { background: rgba(230,126,34,.15); color: #f0a06a; border: 1px solid rgba(230,126,34,.3); }
.role-comptabilite   { background: rgba(231,76,60,.15);  color: #e87e74; border: 1px solid rgba(231,76,60,.3); }

/* ══════════════════════════════════════════════════════
   RAPPORTS — RANK BADGES
   ══════════════════════════════════════════════════════ */
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 11px; font-weight: 700;
}
.rank-1 { background: linear-gradient(135deg,#F97316,#c2410c); color: #fff; }
.rank-2 { background: rgba(149,165,166,.3); color: var(--text); }
.rank-3 { background: rgba(180,120,60,.2); color: #d4956a; }
.rank-4, .rank-5 { background: var(--surface2); color: var(--text-muted); }

/* ══════════════════════════════════════════════════════
   PLANNING GRID COLUMNS (dynamic, set via JS or inline)
   ══════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════ */
.pagination {
  display: flex; align-items: center; gap: 6px;
  padding: 16px 20px; border-top: 1px solid var(--border);
  justify-content: center;
}
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--surface2); color: var(--text-muted);
  text-decoration: none; font-size: 13px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.page-btn:hover  { background: var(--gold-pale); color: var(--gold); border-color: rgba(249,115,22,.3); }
.page-btn.active { background: var(--gold-pale); color: var(--gold); border-color: rgba(249,115,22,.5); font-weight: 600; }
.page-info { font-size: 12px; color: var(--text-muted); margin-left: 8px; }

/* ══════════════════════════════════════════════════════
   ADDITIONAL FORM & DETAIL STYLES
   ══════════════════════════════════════════════════════ */
.ms-auto { margin-left: auto; }
.mt-0    { margin-top: 0; }

/* Invoice print */
@media print {
  body { background: white !important; color: #000 !important; }
  .sidebar, .topbar, .no-print, .filter-bar, .page-header .btn, .page-header form { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
  .content-area { padding: 0 !important; }
  .card { border: 1px solid #ddd !important; box-shadow: none !important; background: white !important; break-inside: avoid; }
  .card-header { background: #f5f5f5 !important; }
  .data-table th { background: #eee !important; color: #000 !important; }
  .data-table td, .data-table th { color: #000 !important; border-color: #ddd !important; }
  .kpi-card { background: #f9f9f9 !important; border: 1px solid #ddd !important; break-inside: avoid; }
  .kpi-value, .kpi-label, .metric-val, .metric-lbl { color: #000 !important; }
  .status-badge, .badge-service { border: 1px solid #ccc !important; background: #eee !important; color: #333 !important; }
  .print-header { display: block !important; text-align: center; padding: 16px 0 8px; border-bottom: 2px solid #000; margin-bottom: 16px; }
  .print-header h2 { font-size: 1.3rem; margin: 0 0 4px; }
  .print-header p  { font-size: .85rem; color: #555; margin: 0; }
  .print-footer { display: block !important; text-align: center; padding: 12px 0 0; border-top: 1px solid #ccc; margin-top: 24px; font-size:.8rem; color:#555; }
  .page-header { flex-wrap: wrap; }
  .page-header h1 { font-size: 1.2rem; }
  a[href]:after { content: none !important; }
}

/* Print-only elements hidden by default */
.print-header, .print-footer { display: none; }

/* Quick action buttons in reservation detail */
.btn-block + .btn-block { margin-top: 8px; }

/* Table row with quick actions on hover */
.data-table tbody tr .action-btns { opacity: 0.4; transition: opacity var(--transition); }
.data-table tbody tr:hover .action-btns { opacity: 1; }

/* ══════════════════════════════════════════════════════
   CHAMBRE DETAILS GRID FIX
   ══════════════════════════════════════════════════════ */
.detail-grid.detail-single { grid-template-columns: 1fr; }

/* ══════════════════════════════════════════════════════
   NOTIFICATION TOAST
   ══════════════════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999;
}
.toast {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  min-width: 280px; max-width: 360px;
  font-size: 13px; color: var(--text);
  box-shadow: var(--shadow);
  animation: toastIn .3s ease;
}
.toast.success { border-left-color: #27ae60; }
.toast.error   { border-left-color: #e74c3c; }
@keyframes toastIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* ══════════════════════════════════════════════════════
   EMPTY PAGE STATE
   ══════════════════════════════════════════════════════ */
.empty-page {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 80px 40px; text-align: center;
}
.empty-page i    { font-size: 48px; color: var(--text-dim); margin-bottom: 16px; opacity: .5; }
.empty-page h3   { font-family: var(--font-serif); font-size: 22px; color: var(--text-muted); }
.empty-page p    { color: var(--text-dim); margin-top: 6px; font-size: 13px; }
.empty-page .btn { margin-top: 20px; }

/* ══════════════════════════════════════════════════════
   QUICK STATS INLINE
   ══════════════════════════════════════════════════════ */
.inline-stat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px;
}
.inline-stat i { font-size: 11px; color: var(--gold); }

/* ══════════════════════════════════════════════════════
   RESPONSIVE TABLE (horizontal scroll on small screens)
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .card { overflow-x: auto; }
  .data-table { min-width: 600px; }
  .rooms-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .kpi-grid   { grid-template-columns: 1fr 1fr; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .page-title { font-size: 24px; }
  .filter-form { flex-direction: column; align-items: stretch; }
  .filter-search, .filter-form .form-select { width: 100% !important; }
}

/* ══════════════════════════════════════════════════════
   OPTIONS SÉJOUR — toggles
   ══════════════════════════════════════════════════════ */
.options-toggle-grid {
  display: flex; flex-wrap: wrap; gap: 12px;
}
.option-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 10px;
  border: 2px solid var(--border); background: var(--surface2);
  cursor: pointer; font-size: 14px; color: var(--text-muted);
  transition: all .2s; user-select: none;
}
.option-card input[type="checkbox"],
.option-card input[type="radio"] { display: none; }
.option-card:hover { border-color: var(--gold); color: var(--text-primary); }
.option-card.active,
.option-card:has(input:checked) {
  border-color: var(--gold); background: rgba(249,115,22,.12);
  color: var(--gold); font-weight: 600;
}
.option-card i { font-size: 16px; }

/* Options summary (lecture seule) */
.options-summary { display: flex; flex-wrap: wrap; gap: 10px; }
.option-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 20px; font-size: 13px;
  border: 1px solid var(--border); background: var(--surface2); color: var(--text-dim);
}
.option-pill.active { background: rgba(249,115,22,.15); border-color: var(--gold); color: var(--gold); }

/* ══════════════════════════════════════════════════════
   CHECK-IN SUMMARY BAR
   ══════════════════════════════════════════════════════ */
.checkin-summary {
  display: flex; flex-wrap: wrap; gap: 16px;
  padding: 16px 20px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 12px;
}
.cs-item { display: flex; align-items: center; gap: 12px; }
.cs-item i { font-size: 20px; color: var(--gold); }
.cs-item small { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.cs-item strong { font-size: 14px; color: var(--text-primary); }

/* ══════════════════════════════════════════════════════
   SERVICES — badge
   ══════════════════════════════════════════════════════ */
.badge-service {
  display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px;
  background: rgba(249,115,22,.15); color: var(--gold); border: 1px solid rgba(249,115,22,.3);
  font-weight: 600;
}
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-info    { background: rgba(99,179,237,.15); color: #63b3ed; border: 1px solid rgba(99,179,237,.3); }
.badge-success { background: rgba(104,211,145,.15); color: #68d391; border: 1px solid rgba(104,211,145,.3); }

/* ══════════════════════════════════════════════════════
   FACTURATION TOGGLE (sur facture / paiement immédiat)
   ══════════════════════════════════════════════════════ */
.facturation-toggle { display: flex; gap: 12px; flex-wrap: wrap; }

/* form-grid-3 */
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ══════════════════════════════════════════════════════
   RESTAURANT / BAR MODULE
   ══════════════════════════════════════════════════════ */

/* Alias for filter bars used in Restaurant module */
.filters-bar  { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.filters-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.filters-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Tab bar */
.tab-bar { display: flex; gap: 6px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tab-item {
  padding: 8px 18px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  text-decoration: none; color: var(--text-muted); font-size: 13px; font-weight: 500;
  border: 1px solid transparent; border-bottom: none; transition: var(--transition);
}
.tab-item:hover { color: var(--text); background: var(--surface); }
.tab-item.active { color: var(--gold); background: var(--surface2); border-color: var(--border); }

/* Section title inline */
.section-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border);
}

/* Produit grid */
.produits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.produit-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition);
}
.produit-card:hover { border-color: rgba(249,115,22,.3); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.produit-inactif { opacity: .55; }
.produit-img { height: 130px; overflow: hidden; background: var(--surface2); display: flex; align-items: center; justify-content: center; }
.produit-img img { width: 100%; height: 100%; object-fit: cover; }
.produit-img-placeholder { font-size: 36px; color: var(--text-dim); }
.produit-body { padding: 12px; }
.produit-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.produit-nom { font-weight: 700; font-size: 14px; }
.produit-desc { font-size: 12px; color: var(--text-muted); margin: 4px 0; line-height: 1.4; }
.produit-prix-row { display: flex; align-items: baseline; gap: 4px; margin: 8px 0 4px; }
.produit-prix { font-size: 16px; font-weight: 700; color: var(--gold); }
.produit-stock { margin-bottom: 8px; }
.stock-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 2px 8px;
  border-radius: 20px; font-weight: 600;
}
.stock-ok    { background: rgba(104,211,145,.12); color: #68d391; }
.stock-alerte { background: rgba(252,129,74,.12); color: #fc814a; }
.produit-actions { display: flex; gap: 4px; }

/* Empty state card */
.empty-state-card {
  text-align: center; padding: 60px 20px; background: var(--surface);
  border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-muted);
}
.empty-state-card p { margin-top: 16px; font-size: 14px; }

/* badge-danger & badge-muted */
.badge-danger { background: rgba(252,129,74,.15); color: #fc814a; border: 1px solid rgba(252,129,74,.3); }
.badge-muted  { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); }

/* row-alerte */
.row-alerte td { background: rgba(252,129,74,.05); }
.row-annulee td { opacity: .5; text-decoration: line-through; }

/* Stock alerte badge inline */
.ms-2 { margin-left: 8px; }

/* ── CAISSE LAYOUT ───────────────────────────────────── */
.caisse-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  height: calc(100vh - 160px);
  min-height: 600px;
}

/* Produits panel */
.caisse-products {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.caisse-cat-bar {
  display: flex; gap: 6px; padding: 12px; overflow-x: auto; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.cat-btn {
  padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  cursor: pointer; white-space: nowrap; transition: var(--transition);
}
.cat-btn.active, .cat-btn:hover { background: var(--gold-pale); color: var(--gold); border-color: rgba(249,115,22,.4); }

.caisse-grid {
  flex: 1; overflow-y: auto; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; padding: 12px; align-content: start;
}

.caisse-card {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition); overflow: hidden;
  display: flex; flex-direction: column;
}
.caisse-card:hover:not(.caisse-epuise) { border-color: var(--gold); transform: scale(1.02); }
.caisse-card.cc-added { border-color: var(--gold); box-shadow: 0 0 12px rgba(249,115,22,.4); }
.caisse-epuise { opacity: .4; cursor: not-allowed; }

.cc-img { height: 80px; overflow: hidden; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.cc-img img { width: 100%; height: 100%; object-fit: cover; }
.cc-img-ph { font-size: 24px; color: var(--text-dim); }
.cc-nom  { padding: 6px 8px 2px; font-size: 12px; font-weight: 700; line-height: 1.3; }
.cc-prix { padding: 0 8px 2px; font-size: 13px; color: var(--gold); font-weight: 600; }
.cc-stock { padding: 0 8px 6px; font-size: 11px; color: var(--text-muted); }

/* Panier */
.caisse-panier {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
}
.panier-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.panier-header h3 { font-size: 14px; font-weight: 700; }
.panier-client { padding: 12px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }

.input-with-btn { display: flex; gap: 6px; }
.input-with-btn .form-control { flex: 1; }

.resa-info { margin-top: 6px; font-size: 12px; }
.resa-found { color: #68d391; }
.resa-not-found { color: #fc814a; }

.panier-lignes {
  flex: 1; overflow-y: auto; padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.panier-vide { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; color: var(--text-muted); }

.panier-ligne {
  display: flex; align-items: center; gap: 8px; padding: 8px;
  background: var(--surface2); border-radius: var(--radius-sm); font-size: 12px;
}
.pl-info { flex: 1; min-width: 0; }
.pl-nom  { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-prix { color: var(--text-muted); }
.pl-qte  { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.qte-btn {
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.qte-btn:hover { background: var(--gold-pale); color: var(--gold); }
.qte-val { font-weight: 700; min-width: 20px; text-align: center; }
.pl-sous { font-size: 13px; flex-shrink: 0; }
.btn-icon-sm { background: none; border: none; cursor: pointer; padding: 3px 5px; border-radius: 4px; }
.btn-icon-sm:hover { background: var(--surface2); }

.panier-total {
  padding: 12px 16px; border-top: 1px solid var(--border); flex-shrink: 0;
  background: var(--surface2);
}
.pt-row { display: flex; justify-content: space-between; font-size: 13px; padding: 2px 0; }
.pt-grand { font-size: 16px; font-weight: 700; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--border); }

.panier-facturation { padding: 12px 16px; border-top: 1px solid var(--border); flex-shrink: 0; }
.ft-opt {
  flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: pointer;
  font-size: 12px; font-weight: 600; transition: var(--transition);
}
.ft-opt input { display: none; }
.ft-opt.active { background: var(--gold-pale); border-color: var(--gold); color: var(--gold); }
.facturation-toggle { display: flex; gap: 8px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; padding: 12px 20px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; z-index: 9999;
  animation: toastIn .3s ease; box-shadow: var(--shadow);
}
.toast-error   { background: #2d1515; color: #fc814a; border: 1px solid rgba(252,129,74,.3); }
.toast-success { background: #152d1f; color: #68d391; border: 1px solid rgba(104,211,145,.3); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Modal overlay */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal-card {
  background: var(--navy-light); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px 32px; text-align: center; max-width: 380px; width: 90%; box-shadow: var(--shadow);
}
.modal-icon { font-size: 48px; margin-bottom: 12px; }
.modal-card h3 { font-size: 22px; margin-bottom: 8px; }
.modal-card p  { margin-bottom: 4px; }
.modal-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.text-lg { font-size: 22px; }

/* col-span-full */
.col-span-full { grid-column: 1 / -1; }

/* ── MATIÈRES PREMIÈRES ──────────────────────────────── */
.mp-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: rgba(249,115,22,.1); border: 1px solid rgba(249,115,22,.3);
  border-radius: var(--radius-sm); color: var(--gold); font-size: 13px;
}
.mp-banner i { font-size: 20px; flex-shrink: 0; }

.mp-resume-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.mp-stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-align: center;
}
.mp-stat-val   { display: block; font-size: 22px; font-weight: 700; }
.mp-stat-label { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }

.mp-nom small.d-block { display: block; }
.btn-group-sm { display: flex; gap: 4px; }

@media (max-width: 900px) {
  .caisse-layout { grid-template-columns: 1fr; height: auto; }
  .caisse-panier { height: 500px; }
  .produits-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .mp-resume-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) { .form-grid-3 { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════
   BOUTON TOGGLE THÈME
   ══════════════════════════════════════════════════════ */
.theme-toggle {
  width: 36px; height: 36px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all var(--transition); flex-shrink: 0;
}
.theme-toggle:hover { color: var(--gold); background: var(--gold-pale); border-color: rgba(249,115,22,.3); }

/* ══════════════════════════════════════════════════════
   MODE CLAIR — html[data-theme="light"]
   ══════════════════════════════════════════════════════ */
html[data-theme="light"] {
  --text:       #1e3a58;
  --text-muted: #5a7896;
  --text-dim:   #90adc0;
  --border:     rgba(0,0,0,.1);
  --surface:    #ffffff;
  --surface2:   rgba(0,0,0,.04);
  --shadow:     0 4px 24px rgba(0,0,0,.1);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
}

/* Fond principal */
html[data-theme="light"] body { background: #edf1f7; color: var(--text); }

/* Scrollbar */
html[data-theme="light"] ::-webkit-scrollbar-track { background: #e8edf4; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); }

/* ── Topbar ──────────────────────────────────────────── */
html[data-theme="light"] .topbar {
  background: rgba(255,255,255,.92);
  border-bottom-color: rgba(0,0,0,.1);
}
html[data-theme="light"] .breadcrumb-page { color: #1e3a58; }

/* ── Titres de page ──────────────────────────────────── */
html[data-theme="light"] .page-title { color: #1e3a58; }

/* ── Cards ───────────────────────────────────────────── */
html[data-theme="light"] .card { background: #ffffff; border-color: rgba(0,0,0,.09); }
html[data-theme="light"] .card-header { border-bottom-color: rgba(0,0,0,.08); }
html[data-theme="light"] .card-title { color: #1e3a58; }

html[data-theme="light"] .form-card { background: #ffffff; border-color: rgba(0,0,0,.09); }

/* ── Data table ──────────────────────────────────────── */
html[data-theme="light"] .data-table thead tr { background: #f4f7fb; border-bottom-color: rgba(249,115,22,.25); }
html[data-theme="light"] .data-table th { color: #5a7896; }
html[data-theme="light"] .data-table td { color: #1e3a58; }
html[data-theme="light"] .data-table tbody tr:hover { background: #f8fafd; }
html[data-theme="light"] .data-table tbody tr { border-bottom-color: rgba(0,0,0,.07); }

/* ── Formulaires ─────────────────────────────────────── */
html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select {
  background: #ffffff; border-color: rgba(0,0,0,.15); color: #1e3a58;
}
html[data-theme="light"] .form-control::placeholder { color: #90adc0; }
html[data-theme="light"] .form-select option { background: #ffffff; color: #1e3a58; }
html[data-theme="light"] .form-control:focus,
html[data-theme="light"] .form-select:focus {
  border-color: rgba(249,115,22,.6); background: #ffffff;
}
html[data-theme="light"] .form-footer { border-top-color: rgba(0,0,0,.08); }

/* ── Boutons ─────────────────────────────────────────── */
html[data-theme="light"] .btn-secondary { background: #f0f4f8; color: #1e3a58; border-color: rgba(0,0,0,.12); }
html[data-theme="light"] .btn-secondary:hover { background: #e4eaf2; }
html[data-theme="light"] .btn-ghost { color: #5a7896; }
html[data-theme="light"] .btn-ghost:hover { color: #1e3a58; background: rgba(0,0,0,.05); }
html[data-theme="light"] .btn-icon { background: #f0f4f8; border-color: rgba(0,0,0,.1); color: #5a7896; }

/* ── Métriques / KPI ─────────────────────────────────── */
html[data-theme="light"] .metric-item { background: #ffffff; border-color: rgba(0,0,0,.09); }
html[data-theme="light"] .metric-val  { color: #1e3a58; }

/* ── Chambres grid ───────────────────────────────────── */
html[data-theme="light"] .room-card { background: #ffffff; border-color: rgba(0,0,0,.09); }
html[data-theme="light"] .room-card-footer { background: rgba(0,0,0,.03); border-top-color: rgba(0,0,0,.08); }
html[data-theme="light"] .room-number { color: #1e3a58; }
html[data-theme="light"] .equip-tag { background: #f0f4f8; border-color: rgba(0,0,0,.1); }

/* ── Client dropdown ─────────────────────────────────── */
html[data-theme="light"] .client-dropdown,
html[data-theme="light"] .statut-dropdown { background: #ffffff; border-color: rgba(0,0,0,.12); }
html[data-theme="light"] .dd-item:hover { background: #f4f7fb; }
html[data-theme="light"] .dd-item strong { color: #1e3a58; }

/* ── Filter / Filters bar ────────────────────────────── */
html[data-theme="light"] .filter-bar  { background: #ffffff; border-color: rgba(0,0,0,.09); }
html[data-theme="light"] .filters-bar { background: #ffffff; border-color: rgba(0,0,0,.09); }

/* ── Info hint ───────────────────────────────────────── */
html[data-theme="light"] .info-hint { background: rgba(52,152,219,.06); border-color: rgba(52,152,219,.18); }

/* ── Pagination ──────────────────────────────────────── */
html[data-theme="light"] .page-btn { background: #f0f4f8; border-color: rgba(0,0,0,.1); color: #5a7896; }
html[data-theme="light"] .page-btn:hover { background: var(--gold-pale); }
html[data-theme="light"] .pagination { border-top-color: rgba(0,0,0,.08); }

/* ── Options séjour ──────────────────────────────────── */
html[data-theme="light"] .option-card { border-color: rgba(0,0,0,.12); background: #f4f7fb; color: #5a7896; }

/* ── Résumé réservation ──────────────────────────────── */
html[data-theme="light"] .checkin-summary { background: #f4f7fb; border-color: rgba(0,0,0,.09); }
html[data-theme="light"] .resume-box      { background: rgba(249,115,22,.07); }

/* ── Chambre select ──────────────────────────────────── */
html[data-theme="light"] .chambre-select-card { border-color: rgba(0,0,0,.12); }

/* ── Toast ───────────────────────────────────────────── */
html[data-theme="light"] .toast { background: #ffffff; color: #1e3a58; border-color: rgba(0,0,0,.1); }
html[data-theme="light"] .toast-error   { background: #fff5f5; color: #c0392b; border: 1px solid rgba(231,76,60,.3); }
html[data-theme="light"] .toast-success { background: #f0faf4; color: #1e8449; border: 1px solid rgba(39,174,96,.3); }

/* ── Modal ───────────────────────────────────────────── */
html[data-theme="light"] .modal-overlay { background: rgba(0,0,0,.5); }
html[data-theme="light"] .modal-card { background: #ffffff; border-color: rgba(0,0,0,.1); color: #1e3a58; }

/* ── Planning ────────────────────────────────────────── */
html[data-theme="light"] .planning-grid { background: #ffffff; }
html[data-theme="light"] .pg-header-col,
html[data-theme="light"] .pg-day-header { background: #f4f7fb; border-bottom-color: rgba(249,115,22,.2); }
html[data-theme="light"] .pg-room-label { background: #f8fafd; border-bottom-color: rgba(0,0,0,.07); }
html[data-theme="light"] .pg-cell { border-color: rgba(0,0,0,.07); }
html[data-theme="light"] .day-num  { color: #1e3a58; }
html[data-theme="light"] .pg-guest-name { color: rgba(0,0,0,.7); }
html[data-theme="light"] .pg-free:hover { background: rgba(0,0,0,.03); }

/* ── Restaurant / Caisse ─────────────────────────────── */
html[data-theme="light"] .produit-card { background: #ffffff; border-color: rgba(0,0,0,.09); }
html[data-theme="light"] .produit-img  { background: #f4f7fb; }
html[data-theme="light"] .caisse-products,
html[data-theme="light"] .caisse-panier { background: #ffffff; border-color: rgba(0,0,0,.09); }
html[data-theme="light"] .caisse-cat-bar,
html[data-theme="light"] .panier-header,
html[data-theme="light"] .panier-client { border-bottom-color: rgba(0,0,0,.08); }
html[data-theme="light"] .cat-btn { background: #f0f4f8; border-color: rgba(0,0,0,.1); color: #5a7896; }
html[data-theme="light"] .caisse-card { background: #f4f7fb; border-color: rgba(0,0,0,.1); }
html[data-theme="light"] .cc-img  { background: #edf1f7; }
html[data-theme="light"] .cc-nom  { color: #1e3a58; }
html[data-theme="light"] .panier-ligne { background: #f4f7fb; }
html[data-theme="light"] .panier-total { background: #f4f7fb; border-top-color: rgba(0,0,0,.08); }
html[data-theme="light"] .panier-facturation { border-top-color: rgba(0,0,0,.08); }
html[data-theme="light"] .ft-opt { border-color: rgba(0,0,0,.12); color: #5a7896; }
html[data-theme="light"] .qte-btn { background: #edf1f7; border-color: rgba(0,0,0,.1); color: #1e3a58; }
html[data-theme="light"] .mp-stat { background: #ffffff; border-color: rgba(0,0,0,.09); }

/* ── Tab bar ─────────────────────────────────────────── */
html[data-theme="light"] .tab-bar { border-bottom-color: rgba(0,0,0,.1); }
html[data-theme="light"] .tab-item { color: #5a7896; }
html[data-theme="light"] .tab-item:hover { background: #f4f7fb; color: #1e3a58; }
html[data-theme="light"] .tab-item.active { background: #f4f7fb; border-color: rgba(0,0,0,.1); color: var(--gold); }

/* ── Section title ───────────────────────────────────── */
html[data-theme="light"] .section-title { border-bottom-color: rgba(0,0,0,.08); }

/* ── Alerts ──────────────────────────────────────────── */
html[data-theme="light"] .alert-warning { background: rgba(241,196,15,.12); border-color: rgba(241,196,15,.3); color: #b7860d; }

/* ── Inline stat ─────────────────────────────────────── */
html[data-theme="light"] .inline-stat { background: #f0f4f8; border-color: rgba(0,0,0,.1); }

/* ── Empty states ────────────────────────────────────── */
html[data-theme="light"] .empty-state-card { background: #ffffff; border-color: rgba(0,0,0,.1); }
html[data-theme="light"] .empty-page h3 { color: #5a7896; }

/* ── Badge muted ─────────────────────────────────────── */
html[data-theme="light"] .badge-muted { background: #f0f4f8; border-color: rgba(0,0,0,.1); }
html[data-theme="light"] .nights-badge { background: #f0f4f8; color: #1e3a58; }
