/* ==========================================================================
   QUAI 36 BOOKING — mobile.css
   Mobile-First Responsive Layer
   Chargé après components.css — surcharge propre sans !important abusif
   ========================================================================== */

/* ──────────────────────────────────────────────────────────────────────────
   1. TOKENS MOBILES & SAFE AREA
   ────────────────────────────────────────────────────────────────────────── */
:root {
  /* Espacements fluides */
  --space-xs: clamp(0.25rem, 1vw, 0.5rem);
  --space-sm: clamp(0.5rem, 2vw, 0.75rem);
  --space-md: clamp(0.75rem, 3vw, 1.25rem);
  --space-lg: clamp(1rem, 4vw, 2rem);
  --space-xl: clamp(1.5rem, 6vw, 3rem);

  /* Container mobile */
  --container-px: clamp(0.75rem, 4vw, 1.5rem);
  --bottom-nav-h: 64px;

  /* Safe area iOS */
  --safe-top:    env(safe-area-inset-top,    0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left,   0px);
  --safe-right:  env(safe-area-inset-right,  0px);

  /* Touch target minimum */
  --touch-min: 44px;
}

/* ──────────────────────────────────────────────────────────────────────────
   2. RESET MOBILE GLOBAL
   ────────────────────────────────────────────────────────────────────────── */

/* Empêche tout débordement horizontal */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

/* Touch targets accessibles */
button, a, [role="button"], input[type="checkbox"], input[type="radio"], select {
  min-height: var(--touch-min);
}

/* Inputs : taille de police ≥16px pour éviter le zoom iOS */
input, select, textarea {
  font-size: max(16px, 0.85rem);
}

/* Images responsives par défaut */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* ──────────────────────────────────────────────────────────────────────────
   3. BOTTOM NAVIGATION ADMIN (mobile ≤768px)
   Barre de navigation fixe en bas — remplace le hamburger
   ────────────────────────────────────────────────────────────────────────── */

.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  /* Afficher la bottom nav */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: rgba(10, 15, 28, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: var(--safe-bottom);
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
    align-items: flex-start;
    justify-content: space-around;
    padding-top: 8px;
  }

  .bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    min-width: 0;
    min-height: var(--touch-min);
    color: rgba(148, 163, 184, 0.8);
    text-decoration: none;
    font-size: 0.53rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    transition: color 0.15s ease;
    padding: 2px 1px 0;
  }

  .bottom-nav__item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .bottom-nav__item svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
    flex-shrink: 0;
  }

  .bottom-nav__item.active,
  .bottom-nav__item:hover {
    color: #E5A93C;
  }

  .bottom-nav__badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 20px);
    background: #EF4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
  }

  .bottom-nav__item { position: relative; }

  /* Espace sous le contenu pour la bottom nav */
  .manager-container,
  .portal-content,
  body > main {
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 1rem);
  }

  /* Masquer la navbar top sur mobile manager */
  .site-header:not(.site-header-portal) .nav-links-wrapper {
    display: none !important;
  }

  .site-header:not(.site-header-portal) .nav-toggle-btn {
    display: none !important;
  }

  /* Header admin mobile : compact */
  .site-header:not(.site-header-portal) {
    padding: 0 0.75rem;
    height: 52px;
  }

  /* Menu profil & déconnexion admin & portail sur petits écrans */
  .site-header .admin-profile-btn .admin-profile-name,
  .site-header-portal .portal-profile-btn .portal-profile-name {
    display: none;
  }

  .site-header .admin-profile-btn,
  .site-header-portal .portal-profile-btn {
    padding: 0.3rem 0.5rem;
    gap: 0.25rem;
  }

  .site-header .admin-badge-user {
    display: none;
  }

  #btnAdminLogoutTop,
  #btnPortalLogout {
    display: none;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   4. BOTTOM SHEET — Remplace le drawer latéral sur mobile
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Drawer latéral → bottom sheet (uniquement pour les tiroirs latéraux purs, pas les modales) */
  .booking-drawer:not(#bookingDrawer):not(#myBookingsDrawer),
  .room-drawer,
  #roomEditDrawer {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 92dvh !important;
    max-height: 92dvh !important;
    border-radius: 20px 20px 0 0 !important;
    transform: translateY(100%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: calc(1rem + var(--safe-bottom)) !important;
  }

  .booking-drawer:not(#bookingDrawer):not(#myBookingsDrawer).active,
  .room-drawer.active,
  #roomEditDrawer.active {
    transform: translateY(0) !important;
  }

  /* Poignée de glissement (handle) */
  .booking-drawer:not(#bookingDrawer):not(#myBookingsDrawer)::before,
  #roomEditDrawer::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 12px auto 4px;
    flex-shrink: 0;
  }

  .drawer-header {
    padding: 0.75rem 1rem 0.5rem !important;
  }

  .drawer-body {
    padding: 0.75rem 1rem !important;
  }

  /* Formulaire réservation : 1 col sur mobile */
  .drawer-form-grid-2,
  .drawer-form-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   5. TABLES → CARDS MOBILE (Réservations, Inventaire)
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  /* Pattern "table to cards" */
  .mobile-card-table {
    display: block !important;
  }

  .mobile-card-table thead {
    display: none !important;
  }

  .mobile-card-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .mobile-card-table tr {
    display: block !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 12px !important;
    padding: 0.85rem !important;
    position: relative;
  }

  .mobile-card-table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.35rem 0 !important;
    border: none !important;
    font-size: 0.82rem !important;
    border-bottom: 1px solid rgba(255,255,255,0.04) !important;
  }

  .mobile-card-table td:last-child {
    border-bottom: none !important;
  }

  .mobile-card-table td[data-label]::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    margin-right: 0.5rem;
  }

  /* Tables classiques overflow */
  table:not(.mobile-card-table) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   6. MANAGER — LAYOUT & SECTIONS
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Container principal */
  .manager-container {
    padding: 0.75rem var(--container-px) !important;
  }

  /* En-têtes de section */
  .view-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    margin: 1rem 0 1.25rem 0 !important;
  }

  .view-header .view-actions {
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .view-header .view-actions button,
  .view-header .view-actions a {
    flex: 1 1 auto !important;
    min-width: 120px !important;
    justify-content: center !important;
  }

  .view-title {
    font-size: clamp(1.1rem, 4vw, 1.4rem) !important;
  }

  .view-subtitle {
    font-size: 0.8rem !important;
  }

  /* Luxury cards */
  .luxury-card {
    border-radius: 12px !important;
    margin-bottom: 0.85rem !important;
  }

  .luxury-card-body {
    padding: 1rem !important;
  }

  /* KPI / Stats cards : 2 cols sur mobile */
  .kpi-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  /* KPI en dessous 375px : 1 col */
}

@media (max-width: 375px) {
  .kpi-grid,
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   6B. DASHBOARD EN DIRECT — Cockpit Live
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .live-dashboard-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
    padding: 1rem 0.85rem !important;
    text-align: center !important;
  }

  .live-header-info {
    min-width: 0 !important;
    text-align: center !important;
  }

  .live-brand-title {
    justify-content: center !important;
    font-size: clamp(1.1rem, 4vw, 1.35rem) !important;
  }

  .live-clock-container {
    min-width: 0 !important;
    width: 100% !important;
  }

  .live-clock-display {
    font-size: clamp(2rem, 8vw, 2.6rem) !important;
  }

  .live-clock-display .clock-seconds {
    font-size: clamp(1.3rem, 5vw, 1.8rem) !important;
  }

  .live-header-actions {
    justify-content: center !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .live-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  .live-kpi-card.kpi-card-occupancy {
    grid-column: 1 / -1 !important;
  }

  .live-kpi-card {
    padding: 0.85rem 1rem !important;
  }

  .live-timeline-card,
  .live-timeline-body {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .live-timeline-grid {
    min-width: 580px !important;
  }
}

@media (max-width: 480px) {
  .live-kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   7. INDICATEURS — Graphiques et KPIs
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Graphiques : hauteur adaptée */
  canvas {
    max-height: 220px !important;
  }

  /* Filtres de dates : stack vertical */
  .stats-filters,
  .date-range-filters {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .stats-filters input[type="date"],
  .stats-filters select {
    width: 100% !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   8. PLANNING — Calendrier mobile
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Calendrier : scroll horizontal + compact */
  .planning-calendar-wrapper,
  .calendar-outer {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .planning-controls {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .planning-controls .date-nav {
    order: -1 !important;
    width: 100% !important;
    justify-content: center !important;
  }

  /* Date picker mobile */
  #mgrTimelineDateInput,
  #portalTimelineDateInput {
    font-size: 16px !important; /* évite zoom iOS */
    max-width: 160px !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   9. RÉSERVATIONS — Pipeline & Liste mobile
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* En-tête des actions de réservations */
  .reservations-header-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }

  .reservations-header-actions > .btn-action-gold {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.88rem !important;
  }

  .reservations-secondary-actions {
    display: flex !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .reservations-secondary-actions .nav-link-btn {
    flex: 1 1 50% !important;
    justify-content: center !important;
    font-size: 0.74rem !important;
    padding: 0.5rem 0.35rem !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Onglets de statut (Toutes, Options, Confirmées, Annulées, Refusées, Terminées) */
  #view-reservations .room-type-tabs {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
    padding: 4px 6px !important;
    gap: 4px !important;
  }

  #view-reservations .room-type-tabs::-webkit-scrollbar {
    display: none !important;
  }

  #view-reservations .room-type-tabs .tab-btn {
    flex-shrink: 0 !important;
    padding: 0.4rem 0.65rem !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
  }

  /* Barre de filtres temporels réservations */
  .reservations-temporal-filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    padding: 0.75rem !important;
  }

  .reservations-temporal-filter-bar > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .temporal-date-wrap {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }

  .temporal-date-wrap input[type="date"] {
    flex: 1 !important;
    max-width: 145px !important;
  }

  .temporal-presets-wrap {
    display: flex !important;
    width: 100% !important;
    gap: 0.35rem !important;
  }

  .temporal-presets-wrap button {
    flex: 1 1 0 !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.35rem 0.2rem !important;
    font-size: 0.72rem !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 640px) {
  /* Filtres réservations : colonnes */
  .reservations-filters,
  .booking-filters {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  .reservations-filters select,
  .reservations-filters input {
    width: 100% !important;
  }

  /* Recherche : pleine largeur */
  .search-bar-wrapper {
    grid-column: 1 / -1 !important;
  }

  /* Actions réservation : boutons icon seuls */
  .booking-action-btn span {
    display: none !important;
  }

  .booking-action-btn {
    padding: 0.4rem !important;
    min-width: var(--touch-min) !important;
    justify-content: center !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   9B. COMPTES UTILISATEURS — Guide & Légende mobile
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  #view-utilisateurs .view-header > div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  #view-utilisateurs .view-header .btn-action-gold,
  #view-utilisateurs .view-header .btn-action-primary {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.85rem !important;
  }

  .users-tabs-container {
    margin-bottom: 1rem !important;
    padding-bottom: 0.65rem !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .users-subtabs-nav {
    width: 100% !important;
    min-width: 320px !important;
    display: flex !important;
  }

  .users-nav-tab {
    flex: 1 1 50% !important;
    justify-content: center !important;
    padding: 0.45rem 0.4rem !important;
    font-size: 0.73rem !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .users-nav-tab svg {
    font-size: 0.95rem !important;
  }

  .users-legend-card {
    border-radius: var(--radius-md) !important;
    margin-bottom: 1rem !important;
  }

  .users-legend-header {
    padding: 0.75rem 0.85rem !important;
    gap: 0.5rem !important;
  }

  .users-legend-title {
    font-size: 0.85rem !important;
    flex-wrap: wrap !important;
  }

  .users-legend-subtitle {
    font-size: 0.72rem !important;
  }

  .users-legend-body {
    padding: 0.75rem !important;
  }

  .users-legend-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .users-legend-section {
    padding: 0.7rem 0.75rem !important;
  }

  .users-legend-item {
    gap: 0.5rem !important;
  }

  .users-legend-badge-col {
    min-width: 72px !important;
  }

  .users-legend-desc {
    font-size: 0.73rem !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   10. PORTAIL PUBLIC — Responsive
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Catalogue de salles : 1 col */
  .rooms-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    padding: 0 var(--container-px) !important;
  }

  /* Room card */
  .room-card {
    max-width: 100% !important;
  }

  /* Section expo */
  #expo-section {
    padding: 1.5rem var(--container-px) 3rem !important;
  }

  /* Section planning portail */
  #planning-section {
    padding: 0 0 2rem !important;
  }

  /* Grille expo : 1 col */
  .expo-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   11. AUTH MODAL — Fullscreen mobile
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .luxury-auth-modal,
  #authModal .modal-content,
  .auth-modal-inner {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .luxury-auth-tabs {
    gap: 0.5rem !important;
    padding: 0 1rem !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   12. GRILLES GÉNÉRIQUES 2 COLS → 1 COL
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  /* Tous les grids 2 colonnes → 1 col */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: repeat(2"],
  .grid-2-cols,
  .form-grid-2 {
    grid-template-columns: 1fr !important;
  }

  /* Settings SMTP : 2 cols → 1 col */
  #view-settings .luxury-card-body > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   13. SALLES — Formulaire paramétrage
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  #view-salles .luxury-card,
  #view-salles form {
    padding: 0.75rem !important;
  }

  /* Aménités : grille 2 cols au lieu de 3+ */
  .amenity-grid,
  .amenities-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   14. PASSERELLES, API, BRANDING — Pages Settings
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  #view-passerelles .luxury-card-body,
  #view-api .luxury-card-body,
  #view-branding .luxury-card-body,
  #view-settings .luxury-card-body {
    padding: 0.85rem !important;
  }

  /* Boutons d'action → pleine largeur dans les formulaires de configuration */
  #view-passerelles .btn-action-gold,
  #view-api .btn-action-gold,
  #view-branding .btn-action-gold,
  #view-settings .btn-action-gold {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   15. VERIFY EMAIL PAGE
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .verify-card {
    padding: 1.75rem 1rem !important;
    border-radius: 16px !important;
    margin: 0.75rem !important;
    width: calc(100% - 1.5rem) !important;
  }

  .otp-input {
    width: 40px !important;
    height: 50px !important;
    font-size: 1.3rem !important;
  }

  .otp-inputs {
    gap: 0.4rem !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   16. MODAL GÉNÉRIQUE — Responsive
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .modal-overlay,
  .drawer-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .modal-content:not(.auth-modal-inner) {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
    max-height: 92dvh !important;
    overflow-y: auto !important;
  }

  .swal2-popup {
    width: calc(100vw - 2rem) !important;
    max-width: 100% !important;
    padding: 1.25rem !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   17. LOGIN PAGE — manager_login.php
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .login-card,
  .manager-login-card {
    margin: 1rem !important;
    padding: 1.5rem 1.25rem !important;
    border-radius: 16px !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   18. HEADER — Ajustements finaux
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .brand-title {
    font-size: 0.95rem !important;
  }

  .brand-subtitle {
    display: none !important;
  }

  /* Logo : plus petit */
  .brand-logo img {
    height: 34px !important;
    width: 34px !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   19. SCROLLBAR MOBILE — Masquer sur touch
   ────────────────────────────────────────────────────────────────────────── */

@media (hover: none) and (pointer: coarse) {
  /* Périphériques touch : scrollbar invisible */
  ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  /* Caret visible sur inputs */
  input, textarea {
    caret-color: var(--gold-400);
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   20. UTILITAIRES MOBILES
   ────────────────────────────────────────────────────────────────────────── */

/* Masquer sur mobile */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
}
/* Masquer sur desktop */
@media (min-width: 641px) {
  .show-mobile-only { display: none !important; }
}

/* Texte centré mobile */
@media (max-width: 640px) {
  .mobile-text-center { text-align: center !important; }
}

/* Full width mobile */
@media (max-width: 640px) {
  .mobile-full { width: 100% !important; }
}

/* ──────────────────────────────────────────────────────────────────────────
   21. PWA — INSTALLED MODE
   ────────────────────────────────────────────────────────────────────────── */

@media (display-mode: standalone) {
  /* App installée : header avec safe area top */
  .site-header {
    padding-top: max(var(--safe-top), 8px);
    height: calc(60px + var(--safe-top));
  }

  /* Cacher les boutons "Installer" */
  .pwa-install-banner,
  #pwaInstallBanner,
  .pwa-install-trigger,
  .btn-hero-pwa-install,
  .btn-pwa-header-cta {
    display: none !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   22. PRINT
   ────────────────────────────────────────────────────────────────────────── */

@media print {
  .site-header,
  .bottom-nav,
  .booking-drawer,
  .nav-links-wrapper,
  .header-actions {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}
