:root{
  --bg: rgba(22, 22, 23);
  --panel: rgba(46, 47, 46);
  --card: rgba(38, 38, 38);
  --muted: #9b9b9b;
  --accent: #ff6a1a; /* orange accent if needed */
  --radius-lg: 14px;
  --radius-md: 12px;
  --gap: 14px;
}

/* Basic reset */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  background:var(--bg);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* App wrapper to simulate mobile app interior */
.app {
  max-width: 430px; /* like iPhone width */
  margin: 0 auto;
  min-height: calc(100vh - 32px);
  display:flex;
  flex-direction:column;
  gap: 12px;
  padding: 0 16px;
  padding-top: 50px;
}

/* Fixed header zone */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: var(--bg);
  z-index: 20;
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 12px;
}

/* Header */
.header {
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 6px 6px;
}
.hamburger {
  width:36px;height:36px;border-radius:10px;background:transparent;border:none;
  display:inline-flex;align-items:center;justify-content:center;
  cursor:pointer;
}
.hamburger .lines{
  width:18px;
  height:2px;
  background:rgba(134, 134, 134);
  box-shadow: 0 5px 0 rgba(134, 134, 134), 0 -5px 0 rgba(134, 134, 134);
  border-radius:2px;
}
/* Title styles */
.title-main {
  font-size:28px;
  font-weight:700;
  line-height:1;
  margin: 16px 0;
  text-align: left;
}

.title-inline {
  font-size:18px;
  font-weight:600;
  line-height:1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.title-inline.visible {
  opacity: 1;
}

.title-section {
  padding: 0 6px;
  margin-top: -12px;
}

/* Search bar */
.search-wrap{
  padding:0 4px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.search {
  flex: 1;
  background: var(--panel);
  border-radius: 12px;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  gap:10px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.01);
}
.search input{
  background:transparent;border:0;outline:0;color:#cfcfcf;font-size:16px;
  width:100%;
  font-weight:500;
}
.search input::placeholder{ color:rgba(134, 134, 134); }

/* Filter button */
.filter-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--panel);
  border: none;
  color: rgba(134, 134, 134);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
}

/* Loader pour le chargement des salles */
.rooms-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.rooms-loader.hidden {
  display: none;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loader-text {
  color: rgba(134, 134, 134);
  font-size: 14px;
  margin: 0;
}

/* Grid */
.grid {
  margin-top:6px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding-bottom: 80px; /* to give space at bottom */
  overflow:auto;
}

/* Card */
.card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.room-number{
  font-weight:700;
  font-size:18px;
  letter-spacing: 0.6px;
}
.room-state{
  font-size:12px;
  font-weight:500;
  margin-top:2px;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-block;
  width: fit-content;
}

.card[data-status="libre"] .room-state {
  background: rgba(34, 197, 94, 0.12);
  color: rgba(34, 197, 94, 0.7);
}

.card[data-status="occupé"] .room-state {
  background: rgba(239, 68, 68, 0.12);
  color: rgba(239, 68, 68, 0.7);
}

/* Bouton de réservation sur les cartes */
.reserve-btn {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.reserve-btn:active {
  transform: translateY(0);
}

.reserve-btn svg {
  flex-shrink: 0;
}

/* Message d'erreur API */
.api-error-message {
  margin: 20px 24px;
  padding: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  animation: fadeIn 0.3s ease;
}

.error-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.error-content svg {
  color: rgba(239, 68, 68, 0.8);
  flex-shrink: 0;
  margin-top: 2px;
}

.error-text h3 {
  margin: 0 0 4px 0;
  color: rgba(239, 68, 68, 0.9);
  font-size: 16px;
  font-weight: 600;
}

.error-text p {
  margin: 0;
  color: rgba(239, 68, 68, 0.7);
  font-size: 14px;
  line-height: 1.4;
}

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

/* Modal de message */
.message-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overscroll-behavior: contain;
  touch-action: none;
}

.message-modal.open {
  opacity: 1;
  visibility: visible;
}

.message-modal-content {
  background: var(--bg);
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  margin: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.message-modal.open .message-modal-content {
  transform: scale(1);
}

.message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(134, 134, 134, 0.2);
}

.message-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.message-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: rgba(134, 134, 134);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-body {
  padding: 16px 20px 20px;
}

.message-body p {
  margin: 0;
  color: rgba(134, 134, 134);
  font-size: 16px;
  line-height: 1.5;
}

/* Responsive tweaks - keep 3 columns on narrow screens down to ~360px */
@media (max-width: 380px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 680px) {
  .app{ max-width:900px; }
  .grid{ grid-template-columns: repeat(4, 1fr); }
}

/* ensure scroll bar is unobtrusive */
.grid::-webkit-scrollbar{ width:6px }
.grid::-webkit-scrollbar-thumb{ background: rgba(255,255,255,0.06); border-radius:6px }

/* Menu overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 25;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overscroll-behavior: contain;
  touch-action: none;
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.menu-content {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  padding: 80px 24px 24px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.menu-overlay.open .menu-content {
  transform: translateX(0);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(134, 134, 134, 0.2);
  cursor: pointer;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-header {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #fff;
}

/* Hamburger animation */
.hamburger.active .lines {
  background: transparent;
}

.hamburger.active .lines::before,
.hamburger.active .lines::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  background: rgba(134, 134, 134);
  border-radius: 2px;
  top: 0;
  left: 0;
  transform-origin: center;
  transition: transform 0.3s ease;
}

.hamburger.active .lines::before {
  transform: rotate(45deg);
}

.hamburger.active .lines::after {
  transform: rotate(-45deg);
}

.hamburger .lines {
  position: relative;
  transition: background 0.3s ease;
}

/* Room details modal */
.room-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overscroll-behavior: contain;
  touch-action: none;
}

.room-modal.open {
  opacity: 1;
  visibility: visible;
}

.room-modal-content {
  background: var(--bg);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  height: auto;
  max-height: 100vh;
  max-height: 100dvh; /* Dynamic viewport height pour mobile */
  overflow-y: auto;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.3s ease, border-radius 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  overscroll-behavior: contain;
  touch-action: pan-y;
}

/* État expanded du modal (plein écran sans border-radius) */
.room-modal-content.expanded {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.room-modal-content::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.room-modal.open .room-modal-content {
  transform: translateY(0);
}

.room-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.room-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.room-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: rgba(134, 134, 134);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-info-grid {
  display: grid;
  gap: 16px;
}

.room-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.room-info-label {
  font-size: 14px;
  color: rgba(134, 134, 134);
  font-weight: 500;
}

.room-info-value {
  font-size: 16px;
  color: #fff;
  font-weight: 600;
}

.room-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  width: fit-content;
}

.room-status.libre {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.room-status.occupe {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Section emploi du temps dans le modal */
.room-schedule-section {
  padding: 20px 0 0;
  border-top: 1px solid rgba(134, 134, 134, 0.2);
  margin-top: 20px;
}

.room-schedule-section h4 {
  margin: 0 0 16px 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.room-modal-actions {
  padding: 20px 0 0;
  margin-top: 20px;
  border-top: 1px solid rgba(134, 134, 134, 0.2);
}

.reserve-btn-modal {
  width: 100%;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.reserve-btn-modal:active {
  transform: translateY(0);
}

.schedule-empty,
.schedule-error {
  color: rgba(134, 134, 134, 0.8);
  font-style: italic;
  text-align: center;
  padding: 20px;
  margin: 0;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-item {
  background: rgba(46, 47, 46, 0.6);
  border-radius: 8px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
}

.schedule-time {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.schedule-course {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

.schedule-item.schedule-current {
  background: rgba(255, 106, 26, 0.15);
  border-left-color: var(--accent);
  animation: pulse 2s infinite;
}

.schedule-item.schedule-current .schedule-time {
  color: var(--accent);
}

.schedule-item.schedule-current .schedule-course {
  color: var(--accent);
  font-weight: 600;
}

@keyframes pulse {
  0%, 100% {
    background: rgba(255, 106, 26, 0.15);
  }
  50% {
    background: rgba(255, 106, 26, 0.25);
  }
}

/* Filter modal */
.filter-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overscroll-behavior: contain;
  touch-action: none;
}

.filter-modal.open {
  opacity: 1;
  visibility: visible;
}

.filter-modal-content {
  background: var(--bg);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  height: auto;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.3s ease, border-radius 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.filter-modal.open .filter-modal-content {
  transform: translateY(0);
}

/* État expanded du modal filtre (plein écran sans border-radius) */
.filter-modal-content.expanded {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Handle bar pour le modal filtre */
.filter-modal-content::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.filter-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.filter-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: rgba(134, 134, 134);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-group-label {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.filter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 0;
}

.filter-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-label {
  font-size: 15px;
  color: rgba(200, 200, 200);
  cursor: pointer;
  user-select: none;
}


.filter-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-reset,
.filter-apply {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.filter-reset {
  background: var(--panel);
  color: rgba(134, 134, 134);
}

.filter-apply {
  background: var(--accent);
  color: #fff;
}

/* Profile page */
.profile-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 35;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 0;
}

.profile-page.open {
  transform: translateX(0);
}

.profile-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 16px;
}

.profile-back {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: rgba(134, 134, 134);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

/* Not logged in state */
.profile-not-logged {
  padding: 40px 20px;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.profile-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: rgba(134, 134, 134);
}

.profile-welcome {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px 0;
}

.profile-description {
  font-size: 16px;
  color: rgba(134, 134, 134);
  line-height: 1.5;
  margin: 0 0 32px 0;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}

.profile-btn {
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
}

.profile-btn-primary {
  background: var(--accent);
  color: #fff;
}

.profile-btn-google {
  background: var(--card);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}


.profile-btn-secondary {
  background: var(--panel);
  color: rgba(134, 134, 134);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--panel);
  border-radius: 12px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(134, 134, 134);
  flex-shrink: 0;
}

.feature-text h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px 0;
}

.feature-text p {
  font-size: 14px;
  color: rgba(134, 134, 134);
  margin: 0;
}

/* Logged in state */
.profile-logged {
  padding: 20px;
}

.profile-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--panel);
  border-radius: 16px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar svg {
  width: 100%;
  height: 100%;
}

.profile-user-details {
  flex: 1;
}

.profile-username {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
}

.profile-email {
  font-size: 14px;
  color: rgba(134, 134, 134);
  margin: 0 0 8px 0;
}

.profile-badge {
  background: var(--accent);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--panel);
  cursor: pointer;
  transition: background 0.2s ease;
}

.profile-menu-item:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.profile-menu-item:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.menu-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(134, 134, 134);
  flex-shrink: 0;
}

.menu-item-content {
  flex: 1;
}

.menu-item-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.menu-item-subtitle {
  font-size: 13px;
  color: rgba(134, 134, 134);
}

.profile-menu-item svg:last-child {
  color: rgba(134, 134, 134);
  flex-shrink: 0;
}

/* ===== RÉSERVATIONS SECTION ===== */
.reservations-section {
  margin: 24px 0 24px 0;
  border-radius: 16px;
  background: var(--panel);
  border: none;
  overflow: hidden;
}

.reservations-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reservations-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reservations-title svg {
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.reservations-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.reservations-count {
  background: var(--card);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  min-width: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.reservations-content {
  padding: 0;
}

/* État vide */
.no-reservations {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
}

.no-reservations-icon {
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-reservations-icon svg {
  color: rgba(255, 255, 255, 0.4);
}

.no-reservations p {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.no-reservations span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

/* Carte de réservation */
.reservation-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 16px;
  margin: 0 12px 12px 12px;
}

.reservation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.reservation-room {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.reservation-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reservation-status.active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.reservation-status.upcoming {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.reservation-status.past {
  background: rgba(156, 163, 175, 0.15);
  color: #9ca3af;
}

.reservation-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reservation-time {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
}

.reservation-time svg {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.reservation-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-start;
}

.reservation-btn {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  width: auto;
}

.reservation-btn.cancel {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Message plus de réservations */
.more-reservations-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin: 0 12px 12px 12px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.more-reservations-message svg {
  width: 16px;
  height: 16px;
  color: #3b82f6;
  flex-shrink: 0;
}

/* ===== MODAL DE RÉSERVATION ===== */
.reservation-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.reservation-modal.open {
  opacity: 1;
  visibility: visible;
}

.reservation-modal-content {
  background: var(--bg);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding: 20px;
}

.reservation-modal.open .reservation-modal-content {
  transform: translateY(0);
}

.reservation-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.reservation-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.reservation-modal-close {
  background: transparent;
  border: none;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reservation-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.form-group input,
.form-group select {
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.reservation-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.reservation-info svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
}

.reservation-warning {
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  color: #ef4444;
  font-size: 13px;
}

.reservation-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--panel);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* =============================================================================
   POPUPS PERSONNALISÉS
   ============================================================================= */

.custom-alert-overlay,
.custom-confirm-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.custom-alert-overlay.show,
.custom-confirm-overlay.show {
  display: flex;
}

.custom-alert-modal,
.custom-confirm-modal {
  background: var(--panel);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  text-align: center;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-alert-icon,
.custom-confirm-icon {
  color: var(--accent);
  margin: 0 auto 20px;
  width: 48px;
  height: 48px;
}

.custom-alert-title,
.custom-confirm-title {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.custom-alert-message,
.custom-confirm-message {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 24px 0;
}

.custom-alert-actions,
.custom-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.custom-alert-btn {
  padding: 12px 32px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.custom-confirm-btn-cancel,
.custom-confirm-btn-confirm {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.custom-confirm-btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.custom-confirm-btn-confirm {
  background: var(--accent);
  color: #fff;
}

/* Footer */
.footer {
  max-width: 430px;
  margin: 0 auto;
  padding: 20px 16px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 16px));
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.footer-text {
  margin: 0;
  color: rgba(134, 134, 134, 0.8);
  font-size: 14px;
  line-height: 1.5;
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.footer-link:hover {
  opacity: 0.8;
}

.footer-support {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 106, 26, 0.1);
  color: var(--accent);
  border: 1px solid rgba(255, 106, 26, 0.2);
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.footer-support:hover {
  background: rgba(255, 106, 26, 0.15);
  border-color: rgba(255, 106, 26, 0.3);
}

.footer-support svg {
  flex-shrink: 0;
}

@media (min-width: 680px) {
  .footer {
    max-width: 900px;
  }
}