/* ==========================================================================
   CDVR Community — Tableau Hebdomadaire des Studios (Vue Paysage Admin)
   Inspiré du tableau noir physique de l'école (Image 2)
   ========================================================================== */

.rentals-board-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  background: #111622;
  color: #f8fafc;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
}

/* En mode standard (TV, Desktop, écran large avec ou sans zoom navigateur) */
.rentals-board-container:not(.force-landscape):not(.manual-rotated) {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  transform: none !important;
}

/* Masquage imperméable de l'arrière-plan du cockpit lorsque le tableau hebdo est ouvert */
body.board-modal-open {
  overflow: hidden !important;
}

body.board-modal-open #app-container {
  visibility: hidden !important;
}

/* Forçage de l'orientation Paysage STRICTEMENT sur Mobile tactile tenu en Portrait */
@media (max-width: 900px) and (orientation: portrait) and (hover: none) and (pointer: coarse) {
  .rentals-board-container.force-landscape {
    right: auto !important;
    bottom: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    width: 100vh !important;
    width: 100dvh !important;
    height: 100vw !important;
    height: 100dvw !important;
    transform: rotate(90deg) translateY(-100%);
    transform-origin: top left;
  }
}

/* Rotation manuelle forcée */
.rentals-board-container.manual-rotated {
  right: auto !important;
  bottom: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 100vh !important;
  width: 100dvh !important;
  height: 100vw !important;
  height: 100dvw !important;
  transform: rotate(90deg) translateY(-100%);
  transform-origin: top left;
}

/* Les pop-ups modales et toasts restent STRICTEMENT au-dessus du tableau hebdomadaire */
.modal-overlay:not(.hidden),
body.board-modal-open #modal-overlay:not(.hidden) {
  z-index: 100020 !important;
  transform: none !important;
}

body.board-modal-open .toast-container,
body.board-modal-open #toast-container {
  z-index: 100050 !important;
}

/* ==========================================================================
   1. Barre d'outils supérieure (Chalkboard Toolbar) — Ultra compacte
   ========================================================================== */
.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 5px 12px;
  min-height: 44px;
  height: 44px;
  box-sizing: border-box;
  background: #141a24;
  border-bottom: 1.5px solid #283245;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  z-index: 20;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: #0284c7 rgba(255, 255, 255, 0.08);
  user-select: none;
  cursor: grab;
}

.board-toolbar::-webkit-scrollbar {
  height: 4px;
}

.board-toolbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}

.board-toolbar::-webkit-scrollbar-thumb {
  background: #0284c7;
  border-radius: 4px;
}

.board-toolbar::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}

.board-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.board-title-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 6px;
  background: transparent;
  border: none;
}

.board-title-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.board-title-text {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.38rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(56, 189, 248, 0.45);
}

.rentals-board-container.is-tv-fit .board-title-text,
.rentals-board-container.is-screen-kiosk .board-title-text {
  font-size: 1.62rem;
  letter-spacing: 2.5px;
}

.rentals-board-container.is-tv-fit .board-btn-rotate-compact,
.rentals-board-container.is-screen-kiosk .board-btn-rotate-compact {
  display: none !important;
}

.board-title-sub {
  display: none;
}

/* Navigation semaine adaptée au tactile */
.board-nav-group {
  display: flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 1px;
  gap: 2px;
  height: 34px;
  box-sizing: border-box;
}

.board-nav-btn {
  background: transparent;
  border: none;
  color: #e2e8f0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.board-nav-btn:hover,
.board-nav-btn:active {
  background: #1e293b;
  color: #38bdf8;
}

.board-nav-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #f8fafc;
  padding: 0 6px;
  white-space: nowrap;
}

.board-today-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0 10px;
  height: 34px;
  box-sizing: border-box;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.board-today-btn:hover,
.board-today-btn:active {
  background: #334155;
  color: #f8fafc;
}

/* Filtres Studios et Types (Centre de la toolbar) */
.board-toolbar-center {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.board-filter-pill {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid #334155;
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0 10px;
  height: 34px;
  box-sizing: border-box;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.board-filter-pill:hover,
.board-filter-pill:active {
  background: #1e293b;
  color: #ffffff;
}

.board-filter-pill.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.board-filter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

/* Actions Toolbar droite (ancrée tout à droite) */
.board-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
  padding-right: 4px;
}

/* Horloge temps réel HH:MM grand format dans le coin inférieur droit sur la hauteur des 2 lignes du bas (Mode TV) */
.board-live-clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  min-height: 76px;
  max-height: 76px;
  padding: 0 26px;
  background: linear-gradient(135deg, #1A63C9 0%, #0284c7 50%, #1A63C9 100%);
  border-top: 2.5px solid rgba(255, 255, 255, 0.92);
  border-left: 2.5px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    -6px 0 18px rgba(0, 0, 0, 0.55),
    inset 0 2px 5px rgba(255, 255, 255, 0.45),
    inset 2px 0 5px rgba(255, 255, 255, 0.35),
    0 0 14px rgba(255, 255, 255, 0.22);
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 30;
  user-select: none;
}

.board-live-clock-time {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 3.1rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow:
    0 2px 4px rgba(10, 35, 81, 0.75),
    0 0 12px rgba(255, 255, 255, 0.45);
}

.board-viewdays-group {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 1px;
  gap: 2px;
  height: 34px;
  box-sizing: border-box;
}

.board-viewdays-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0 10px;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.board-viewdays-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.board-viewdays-btn.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.board-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #f1f5f9;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0 10px;
  height: 34px;
  box-sizing: border-box;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.board-action-btn:hover,
.board-action-btn:active {
  background: #334155;
  color: #38bdf8;
  border-color: #475569;
}

.board-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
  border: 1px solid #ef4444;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0 12px;
  height: 34px;
  box-sizing: border-box;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.board-close-btn:hover,
.board-close-btn:active {
  background: #b91c1c;
}

.board-close-btn--compact {
  width: 34px;
  min-width: 34px;
  padding: 0;
  justify-content: center;
  font-size: 0.95rem;
}

.board-btn-rotate-compact {
  width: 34px;
  min-width: 34px;
  padding: 0;
  justify-content: center;
  font-size: 0.95rem;
}

/* ==========================================================================
   2. Grille du Tableau Noir (Chalkboard Matrix)
   ========================================================================== */
.board-viewport {
  flex: 1;
  overflow: auto;
  position: relative;
  background-color: #101520;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  scrollbar-width: thin;
  scrollbar-color: #0284c7 #0d121c;
  cursor: grab;
  touch-action: none;
  -webkit-overflow-scrolling: touch;
}

.board-viewport:active {
  cursor: grabbing;
}

.board-viewport::-webkit-scrollbar {
  width: 8px;
  height: 10px;
}

.board-viewport::-webkit-scrollbar-track {
  background: #0d121c;
  border-top: 1px solid #1e293b;
}

.board-viewport::-webkit-scrollbar-thumb {
  background: #0284c7;
  border-radius: 5px;
  border: 2px solid #0d121c;
}

.board-viewport::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}

.board-matrix {
  display: flex;
  min-width: fit-content;
  position: relative;
}

/* Colonne Timeline (axe horaire gauche sticky) */
.board-time-axis {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 15;
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  background: #141a24;
  border-right: 1.5px solid #283245;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  user-select: none;
}

.board-time-axis-header {
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  box-sizing: border-box;
  background: #121822;
  border-bottom: 2px solid #283245;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.board-time-slots-col {
  position: relative;
}

.board-hour-label {
  height: 48px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 1px;
  font-size: 0.60rem;
  font-weight: 700;
  color: #94a3b8;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  font-family: monospace, sans-serif;
  letter-spacing: -0.3px;
}

/* Bandeau horaire vertical entre les jours (façon ruban adhésif toilé gris) */
.board-hour-strip {
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #141a24;
  border-left: 1px solid #242d3d;
  border-right: 1.5px solid #2d3748;
  position: relative;
  z-index: 4;
  user-select: none;
}

.board-hour-strip-header {
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #121822;
  border-bottom: 2px solid #283245;
  display: flex;
  flex-direction: column;
}

.board-hour-strip-body {
  position: relative;
  width: 100%;
}

.board-strip-hour {
  height: 48px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 1px;
  font-size: 0.60rem;
  font-weight: 700;
  color: #94a3b8;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  font-family: monospace, sans-serif;
  letter-spacing: -0.3px;
}

/* Jours (5 colonnes LUNDI à VENDREDI) */
.board-days-wrapper {
  display: flex;
  flex: 1;
}

.board-day-col {
  display: flex;
  flex-direction: column;
  border-right: 1.5px solid #242d3d;
  min-width: 270px;
  flex: 1;
  background: #101520;
  transition: background 0.15s ease;
}

/* Alternance de couleur 1 jour sur 2 (Mardi, Jeudi) */
.board-day-col.alt-day {
  background: #172132;
  border-right: 1.5px solid #2a374c;
}

.board-day-col.alt-day .board-day-header {
  background: #1c273a;
}

.board-day-col.alt-day .board-day-title-row {
  background: #223048;
  border-bottom-color: #2e3f5c;
}

.board-day-col.alt-day .board-studio-tab {
  background: #192437;
  border-right-color: #2a384e;
}

.board-day-col.alt-day .board-studio-column {
  border-right-color: #27354a;
}

.board-day-col.alt-day .board-gridline {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

/* Mise en valeur renforcée du jour AUJOURD'HUI (Cadre bleu continu et fond bleu clair lumineux) */
.board-day-col.is-today,
.board-day-col.is-today.alt-day {
  box-shadow: inset 0 0 0 2px #38bdf8;
  position: relative;
  z-index: 6;
}

/* En-tête aujourd'hui : cadre bleu fermé (haut, gauche, droite) englobant titre et ligne des studios */
.board-day-col.is-today .board-day-header,
.board-day-col.is-today.alt-day .board-day-header {
  border-top: 2px solid #38bdf8 !important;
  border-left: 2px solid #38bdf8 !important;
  border-right: 2px solid #38bdf8 !important;
  border-bottom: 2px solid #0284c7 !important;
  box-sizing: border-box !important;
}

.board-day-col.is-today .board-day-title-row,
.board-day-col.is-today.alt-day .board-day-title-row {
  background: #7dd3fc !important;
  border-bottom: 1.5px solid #0284c7 !important;
}

.board-day-col.is-today .board-day-name,
.board-day-col.is-today.alt-day .board-day-name {
  color: #0f172a !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

.board-day-col.is-today .board-day-date,
.board-day-col.is-today.alt-day .board-day-date {
  color: #0c4a6e !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

/* Corps de colonne aujourd'hui : cadre bleu continu (gauche, droite, bas) */
.board-day-col.is-today .board-day-body {
  border-left: 2px solid #38bdf8 !important;
  border-right: 2px solid #38bdf8 !important;
  border-bottom: 2px solid #38bdf8 !important;
  box-sizing: border-box !important;
}

/* En-tête du jour — Lisibilité optimale (72px au total avec ligne matin + ligne studios) */
.board-day-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  box-sizing: border-box;
  background: #141b27;
  border-bottom: 2px solid #283245;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.board-day-title-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  background: #172030;
  border-bottom: 1px solid #242d3d;
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.board-day-title-center,
.board-day-title-left {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  text-align: center;
  min-width: 0;
}

.board-day-title-right {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
}

.board-day-name {
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
}

.board-day-date {
  font-size: 0.95rem;
  color: #38bdf8;
  font-weight: 700;
  line-height: 1;
}

/* 1ère ligne sous le jour (pastilles Vacances / Férié / W-E et "+N le matin" en vue 12h-22h) */
.board-day-morning-row {
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #111722;
  padding: 0 4px;
  border-bottom: 1px solid #242d3d;
  flex-shrink: 0;
}

.board-day-col.alt-day .board-day-morning-row {
  background: #172132;
  border-bottom-color: #2a384e;
}

.board-day-col.is-weekend .board-day-morning-row {
  border-bottom-color: #3b2a54;
}

.board-day-col.is-today .board-day-morning-row,
.board-day-col.is-today.alt-day .board-day-morning-row {
  background: rgba(2, 132, 199, 0.12) !important;
  border-bottom-color: #0284c7;
}

.board-permanent-col .board-day-morning-row {
  border-bottom-color: #4c3370;
}

.board-morning-badge {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: 1px solid #38bdf8;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 16px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.board-morning-badge:hover {
  background: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
}

.board-today-tag {
  background: #0284c7;
  color: #ffffff;
  font-size: 0.54rem;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 3px;
  letter-spacing: 0.2px;
  line-height: 13px;
  height: 13px;
}

.board-weekend-tag {
  background: #7c3aed;
  color: #ffffff;
  font-size: 0.54rem;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 3px;
  letter-spacing: 0.2px;
  line-height: 13px;
  height: 13px;
  display: inline-flex;
  align-items: center;
}

.board-day-col.is-weekend {
  border-right-color: #3b2a54;
}

.board-day-col.is-weekend .board-day-title-row {
  background: #231b34;
  border-bottom-color: #3b2a54;
}

.board-day-col.is-weekend .board-day-name {
  color: #c4b5fd;
}

/* 2nde ligne sous le jour : en-tête des sous-colonnes Studios (juste au-dessus des colonnes studios) */
.board-studios-header-row {
  display: flex;
  flex: 1;
  min-height: 20px;
  box-sizing: border-box;
  border-bottom: none;
}

.board-studio-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  border-right: 1px solid #242d3d;
  padding: 2px 2px;
  background: #121824;
  box-sizing: border-box;
}

.board-studio-tab:last-child {
  border-right: none;
}

.board-studio-tab-tag {
  width: 100%;
  height: 100%;
  min-height: 16px;
  box-sizing: border-box;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Corps des sous-colonnes Studios (Timeline) */
.board-day-body {
  display: flex;
  position: relative;
  flex: 1;
}

/* Lignes horizontales d'heures */
.board-hour-gridlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.board-gridline {
  height: 48px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  box-sizing: border-box;
}

/* Sous-colonne Studio individuelle */
.board-studio-column {
  flex: 1;
  position: relative;
  border-right: 1px solid #242c3d;
  min-width: 68px;
  z-index: 2;
}

.board-studio-column:last-child {
  border-right: none;
}

/* ==========================================================================
   3. Bandes Magnétiques — Événements Occupés (Magnetic Cards)
   ========================================================================== */
.board-event-card {
  position: absolute;
  left: 2px;
  right: 2px;
  box-sizing: border-box;
  border-radius: 5px;
  padding: 3px 5px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, z-index 0s;
  z-index: 3;
}

.board-event-card:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  z-index: 8;
}

.board-event-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1px;
}

.board-event-time {
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.15;
  opacity: 0.95;
  white-space: nowrap;
}

.board-event-tag {
  display: none !important;
}

.board-event-title {
  font-size: 0.64rem;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.board-event-sub {
  display: none !important;
}

/* Carte Location spécifique : éclatante, contrastée et immédiatement identifiable */
.board-event-card.event-rental {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: 2px solid #38bdf8 !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45) !important;
}

.board-event-card.event-rental .board-event-tag {
  background: #ffffff !important;
  color: #0369a1 !important;
  font-weight: 800 !important;
  font-size: 0.64rem !important;
  padding: 1px 6px !important;
  border-radius: 3px !important;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.board-event-card.event-rental .board-event-time {
  color: #e0f2fe !important;
  font-weight: 700 !important;
}

.board-event-card.event-rental .board-event-title {
  color: #ffffff !important;
  font-weight: 500 !important;
  text-shadow: none;
}

.board-event-card.event-rental .board-event-sub {
  color: #e0f2fe !important;
  font-weight: 600 !important;
}

/* Cartes atténuées / mises en avant par le filtre */
.board-event-card.card-dimmed {
  opacity: 0.15 !important;
  filter: grayscale(0.9) !important;
  pointer-events: none !important;
  transform: scale(0.98);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.board-event-card.card-highlighted {
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.85) !important;
  border-width: 2.5px !important;
  z-index: 10 !important;
}

/* Carte Bail Mensuel vertical (ex: Pole dance Waimea) */
.board-event-card.event-monthly {
  background: rgba(139, 92, 246, 0.15) !important;
  color: #e9d5ff !important;
  border: 2px dashed #a855f7 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 4px;
}

.board-event-card.event-monthly .board-event-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: #f5f3ff;
  letter-spacing: 0.3px;
}

.board-event-card.event-monthly .board-event-sub {
  font-size: 0.68rem;
  color: #c084fc;
}

/* Carte Blocage Admin */
.board-event-card.event-block {
  background: #334155 !important;
  color: #cbd5e1 !important;
  border: 1px solid #475569 !important;
}

/* ==========================================================================
   4. Créneaux Disponibles — Cliquer pour Réserver (Free Slots)
   ========================================================================== */
.board-free-slot {
  position: absolute;
  left: 2px;
  right: 2px;
  box-sizing: border-box;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.08);
  border: 1.5px dashed rgba(148, 163, 184, 0.42);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3px 2px;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
  overflow: hidden;
}

.board-free-slot:hover {
  background: rgba(148, 163, 184, 0.22);
  border: 1.5px solid #94a3b8;
  box-shadow: 0 0 12px rgba(148, 163, 184, 0.35);
  transform: scale(1.02);
  z-index: 7;
}

.board-free-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.board-free-time {
  font-size: 0.68rem;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
  margin-top: 1px;
}

.board-free-dur {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 600;
}

.board-free-action {
  margin-top: 3px;
  background: #475569;
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.board-free-slot:hover .board-free-action {
  opacity: 1;
}

/* ==========================================================================
   4b. Créneaux Occupés EN COURS (Cadre & Halo Doré Pulsant + Badge EN COURS)
   ========================================================================== */
.board-event-card.is-ongoing,
.board-event-card.event-rental.is-ongoing,
.board-event-card.event-monthly.is-ongoing {
  border: 2.5px solid #fde047 !important;
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.55),
    0 0 18px rgba(250, 204, 21, 0.85),
    0 0 32px rgba(245, 158, 11, 0.55),
    inset 0 0 10px rgba(254, 240, 138, 0.35) !important;
  z-index: 9 !important;
  animation: boardOngoingPulse 2.2s infinite ease-in-out;
}

@keyframes boardOngoingPulse {
  0%, 100% {
    border-color: #fde047 !important;
    box-shadow:
      0 0 0 1.5px rgba(250, 204, 21, 0.45),
      0 0 14px rgba(250, 204, 21, 0.75),
      0 0 26px rgba(245, 158, 11, 0.45),
      inset 0 0 8px rgba(254, 240, 138, 0.25);
  }
  50% {
    border-color: #ffffff !important;
    box-shadow:
      0 0 0 3px rgba(253, 224, 71, 0.85),
      0 0 24px rgba(253, 224, 71, 1),
      0 0 42px rgba(245, 158, 11, 0.8),
      inset 0 0 14px rgba(254, 240, 138, 0.5);
  }
}

/* ==========================================================================
   5. Modal Détail Événement & Popovers
   ========================================================================== */
.board-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
  z-index: 100010 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.board-detail-card {
  background: #1e293b;
  border: 1.5px solid #334155;
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: boardPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes boardPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.board-detail-header {
  padding: 14px 16px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.board-detail-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.board-detail-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
}

.board-detail-close:hover {
  color: #ffffff;
}

.board-detail-body {
  padding: 16px;
  font-size: 0.84rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.board-detail-row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #334155;
}

.board-detail-label {
  color: #94a3b8;
  font-weight: 600;
}

.board-detail-val {
  color: #f8fafc;
  font-weight: 700;
  text-align: right;
}

.board-detail-footer {
  padding: 12px 16px;
  background: #0f172a;
  border-top: 1px solid #334155;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   6. Bouton Déclencheur sur la page Locations
   ========================================================================== */
.btn-admin-board-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid #38bdf8;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-admin-board-trigger:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.45);
}

.btn-admin-board-trigger .board-trigger-icon {
  font-size: 1rem;
}

/* ==========================================================================
   7. Mode Réorganisation & Glisser-Déposer (Drag & Drop)
   ========================================================================== */

/* Bouton bascule toolbar Réorganiser */
.board-move-toggle-btn {
  border: 1.5px solid #f59e0b !important;
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.15) !important;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.board-move-toggle-btn:hover {
  background: rgba(245, 158, 11, 0.3) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.board-move-toggle-btn.is-active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  color: #ffffff !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.6) !important;
  animation: pulse-move-btn 2s infinite ease-in-out;
}

.board-sim-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.board-sim-btn {
  border: 1.5px dashed rgba(250, 204, 21, 0.65) !important;
  color: #fde047 !important;
  background: rgba(250, 204, 21, 0.12) !important;
  font-weight: 700;
}

.board-sim-btn:hover {
  background: rgba(250, 204, 21, 0.25) !important;
  color: #ffffff !important;
  border-style: solid !important;
}

.board-sim-btn.is-active {
  border: 1.5px solid #fde047 !important;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.35), rgba(202, 138, 4, 0.5)) !important;
  color: #fef08a !important;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.45);
}

.board-sim-stop-btn {
  background: #dc2626 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  padding: 0 8px !important;
  font-weight: 900 !important;
}

@keyframes pulse-move-btn {
  0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
  50% { box-shadow: 0 0 18px rgba(245, 158, 11, 0.85); }
}

/* Bandeau d'instruction sticky en haut du viewport */
.board-move-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1e1b4b;
  border-bottom: 2px solid #6366f1;
  padding: 6px 14px;
  font-size: 0.82rem;
  color: #e0e7ff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 15;
  flex-shrink: 0;
  animation: slide-down 0.2s ease;
}

@keyframes slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.board-move-banner-icon {
  font-size: 1.1rem;
}

.board-move-banner-text {
  flex: 1;
  line-height: 1.3;
}

.board-move-banner-cancel-btn {
  background: transparent;
  border: 1px solid #a5b4fc;
  color: #e0e7ff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.board-move-banner-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.board-move-banner-close-btn {
  background: #4f46e5;
  border: 1px solid #818cf8;
  color: #ffffff;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.board-move-banner-close-btn:hover {
  background: #4338ca;
}

/* Cartes en mode réorganisation */
.is-move-mode .board-event-card.is-movable,
.is-move-mode .board-event-card.is-movable * {
  user-select: none !important;
  -webkit-user-select: none !important;
  touch-action: none !important;
}

.is-move-mode .board-event-card.is-movable {
  cursor: grab !important;
  position: absolute;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.is-move-mode .board-event-card.is-movable:active {
  cursor: grabbing !important;
}

.is-move-mode .board-event-card.is-movable:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

.board-event-drag-handle {
  display: inline-block;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-left: 4px;
  cursor: grab !important;
  user-select: none !important;
}

/* Carte sélectionnée pour déplacement (Click-to-Move) */
.board-event-card.is-selected-for-move {
  box-shadow: 0 0 0 3px #f59e0b, 0 8px 24px rgba(245, 158, 11, 0.5) !important;
  z-index: 10 !important;
  animation: pulse-selected-card 1.2s infinite ease-in-out;
}

@keyframes pulse-selected-card {
  0%, 100% {
    box-shadow: 0 0 0 3px #f59e0b, 0 4px 14px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px #fbbf24, 0 8px 24px rgba(245, 158, 11, 0.7);
  }
}

.board-event-card.is-dragging {
  opacity: 0.35 !important;
}

/* Pendant le drag, tous les éléments intérieurs de la colonne sont transparents pour garantir un drop direct sur la colonne */
.is-drag-in-progress .board-free-slot,
.is-drag-in-progress .board-free-slot *,
.is-drag-in-progress .board-hour-gridlines,
.is-drag-in-progress .board-gridline,
.is-drag-in-progress .board-drop-indicator,
.is-drag-in-progress .board-drop-indicator *,
.is-drag-in-progress .board-event-card:not(.is-dragging),
.is-drag-in-progress .board-event-card *,
.is-drag-in-progress .board-strip-hour,
.is-drag-in-progress .board-pointer-drag-avatar {
  pointer-events: none !important;
}

.is-drag-in-progress,
.is-drag-in-progress body,
.is-drag-in-progress .rentals-board-container,
.is-drag-in-progress .board-viewport,
.is-drag-in-progress .board-matrix,
.is-drag-in-progress .board-days-wrapper,
.is-drag-in-progress .board-day-col,
.is-drag-in-progress .board-day-body,
.is-drag-in-progress .board-studio-column {
  cursor: move !important;
}

/* Colonnes studio prêtes à recevoir un drop */
.is-move-mode .board-studio-column {
  cursor: pointer;
}

/* Indicateur de drop (Ghost / Preview qui s'aimante aux 15 min) */
.board-drop-indicator {
  position: absolute;
  left: 2px;
  right: 2px;
  border: 2px dashed #38bdf8;
  background: rgba(56, 189, 248, 0.22);
  border-radius: 6px;
  z-index: 12;
  pointer-events: none !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 8px;
  box-sizing: border-box;
  animation: pulse-drop-ind 1s infinite alternate;
}

.board-drop-indicator * {
  pointer-events: none !important;
}

@keyframes pulse-drop-ind {
  from { background: rgba(56, 189, 248, 0.18); border-color: #38bdf8; }
  to { background: rgba(56, 189, 248, 0.32); border-color: #7dd3fc; }
}

.board-drop-time {
  font-size: 0.75rem;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1.1;
  pointer-events: none !important;
}

.board-drop-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none !important;
}

/* Avatar de glisser au toucher (mobile pointer) */
.board-pointer-drag-avatar {
  position: fixed;
  z-index: 100015;
  background: rgba(30, 41, 59, 0.95);
  border: 2px solid #38bdf8;
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  pointer-events: none !important;
  font-size: 0.8rem;
  line-height: 1.3;
  transform: translate(-50%, -50%);
  max-width: 180px;
}

/* Toast de confirmation avec bouton Annuler */
.board-move-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100020;
  background: #1e293b;
  border: 1.5px solid #0284c7;
  color: #f8fafc;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.86rem;
  animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-in {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.board-undo-btn {
  background: #0284c7;
  color: #ffffff;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.board-undo-btn:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.board-toast-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.board-toast-close-btn:hover {
  color: #ffffff;
}

/* ==========================================================================
   6. Options d'Affichage Dynamiques (Combo : Standard / Sans heures / Sans colonnes)
   ========================================================================== */

/* 1. Bouton Vue TV direct dans la Toolbar */
.board-tvfit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0 10px;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-family: inherit;
  flex-shrink: 0;
}

.board-tvfit-btn:hover {
  background: #1e293b;
  border-color: #38bdf8;
  color: #ffffff;
}

.board-tvfit-btn.is-active,
.board-tvfit-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
}

/* 2. Menu Déroulant d'Affichage (Custom HTML/CSS 100% compatible TV & télécommandes) */
.board-dropdown-wrapper {
  position: relative;
  display: inline-flex;
}

.board-display-mode-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0 10px;
  height: 34px;
  box-sizing: border-box;
  color: #38bdf8;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  user-select: none;
}

.board-display-mode-trigger:hover,
.board-display-mode-trigger:focus-visible {
  border-color: #38bdf8;
  background: #1e293b;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.board-caret {
  font-size: 0.65rem;
  color: #94a3b8;
  transition: transform 0.15s ease;
}

.board-dropdown-menu {
  position: fixed !important;
  top: 48px;
  right: 12px;
  min-width: 235px;
  background: #111827;
  border: 1.5px solid #334155;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 14px rgba(56, 189, 248, 0.25);
  padding: 6px;
  z-index: 100010 !important;
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: boardMenuFadeIn 0.12s ease-out;
}

.board-dropdown-menu.hidden {
  display: none !important;
}

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

.board-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: #f1f5f9;
  font-size: 0.74rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.1s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.board-dropdown-item:hover {
  background: #1e293b;
  color: #38bdf8;
}

.board-dropdown-item.is-active {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  font-weight: 700;
}

.board-dropdown-item-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
  line-height: 1;
}

.board-dropdown-item-text {
  flex: 1;
}

.board-dropdown-check {
  color: #38bdf8;
  font-weight: 900;
  font-size: 0.85rem;
}

.board-dropdown-divider {
  height: 1px;
  background: #283245;
  margin: 4px 0;
}

/* 3. Mode : Sans heures dans les créneaux (gain de place vertical) */
.rentals-board-container[data-display-mode="no_slot_times"] .board-event-time,
.rentals-board-container[data-display-mode="compact"] .board-event-time,
.rentals-board-container[data-display-mode="no_slot_times"] .board-free-time,
.rentals-board-container[data-display-mode="compact"] .board-free-time {
  display: none !important;
}

/* En-tête de carte sans handle : masquer pour que le titre commence tout en haut */
.rentals-board-container[data-display-mode="no_slot_times"]:not(.is-move-mode) .board-event-header,
.rentals-board-container[data-display-mode="compact"]:not(.is-move-mode) .board-event-header {
  display: none !important;
}

/* Le titre profite de tout l'espace vertical libéré */
.rentals-board-container[data-display-mode="no_slot_times"] .board-event-title,
.rentals-board-container[data-display-mode="compact"] .board-event-title {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  -webkit-line-clamp: 4;
}

/* Créneaux libres : le badge et la durée s'affichent proprement sans l'intervalle horaire */
.rentals-board-container[data-display-mode="no_slot_times"] .board-free-badge,
.rentals-board-container[data-display-mode="compact"] .board-free-badge {
  font-size: 0.64rem;
}

.rentals-board-container[data-display-mode="no_slot_times"] .board-free-dur,
.rentals-board-container[data-display-mode="compact"] .board-free-dur {
  font-size: 0.64rem;
  font-weight: 700;
  margin-top: 2px;
}

/* 4. Mode : Sans colonnes heures entre les jours (gain de place horizontal) */
.rentals-board-container[data-display-mode="no_hour_columns"] .board-hour-strip,
.rentals-board-container[data-display-mode="compact"] .board-hour-strip {
  display: none !important;
}

/* Bordure plus nette entre jours lorsque les bandes horaires sont masquées */
.rentals-board-container[data-display-mode="no_hour_columns"] .board-day-col,
.rentals-board-container[data-display-mode="compact"] .board-day-col {
  border-right: 2px solid #2d3748;
}

/* ==========================================================================
   7. MODE VUE TV (Plein écran sans défilement horizontal)
   Adapte automatiquement les 5 ou 7 jours à 100% de la largeur de l'écran TV.
   Ne s'applique JAMAIS sur mobile en orientation forcée paysage afin de préserver la navigation fluide.
   ========================================================================== */
.rentals-board-container.is-tv-fit:not(.force-landscape):not(.manual-rotated) .board-viewport {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}

.rentals-board-container.is-tv-fit:not(.force-landscape):not(.manual-rotated) .board-matrix {
  width: 100% !important;
  min-width: 0 !important;
}

.rentals-board-container.is-tv-fit:not(.force-landscape):not(.manual-rotated) .board-days-wrapper {
  width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 0 !important;
}

.rentals-board-container.is-tv-fit:not(.force-landscape):not(.manual-rotated) .board-day-col {
  min-width: 0 !important;
  flex: 1 1 0 !important;
  border-right: 1.5px solid #242d3d;
}

.rentals-board-container.is-tv-fit:not(.force-landscape):not(.manual-rotated) .board-studio-column {
  min-width: 0 !important;
  flex: 1 1 0 !important;
  border-right: 1px solid #242c3d;
}

.rentals-board-container.is-tv-fit .board-studio-column:last-child {
  border-right: none;
}

/* Masquer les bandeaux horaires intermédiaires pour gagner tout l'espace utile */
.rentals-board-container.is-tv-fit .board-hour-strip {
  display: none !important;
}

/* Typographie et cartes ultra-ajustées pour affichage TV */
.rentals-board-container.is-tv-fit .board-day-header {
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
}

.rentals-board-container.is-tv-fit .board-day-title-row {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 2px 6px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
}

.rentals-board-container.is-tv-fit .board-day-title-center,
.rentals-board-container.is-tv-fit .board-day-title-left {
  display: flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 0 auto !important;
  text-align: center !important;
}

.rentals-board-container.is-tv-fit .board-day-title-right {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.rentals-board-container.is-tv-fit .board-day-name {
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.3px !important;
}

.rentals-board-container.is-tv-fit .board-day-date {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
}

.rentals-board-container.is-tv-fit .board-studios-header-row {
  flex: 1 !important;
  height: auto !important;
  min-height: 20px !important;
  max-height: none !important;
}

.rentals-board-container.is-tv-fit .board-studio-tab {
  padding: 2px 1px !important;
}

.rentals-board-container.is-tv-fit .board-studio-tab-tag {
  width: 100% !important;
  height: 100% !important;
  font-size: 0.66rem !important;
  padding: 0 4px !important;
  white-space: nowrap !important;
  letter-spacing: 0.25px;
}

.rentals-board-container.is-tv-fit .board-event-card {
  left: 1px;
  right: 1px;
  width: auto;
  padding: 2px 4px;
}

.rentals-board-container.is-tv-fit .board-event-title {
  font-size: 0.70rem;
  font-weight: 700;
  line-height: 1.2;
}

.rentals-board-container.is-tv-fit .board-event-time {
  font-size: 0.60rem;
  font-weight: 600;
}

.rentals-board-container.is-tv-fit .board-free-slot {
  left: 1px;
  right: 1px;
  width: auto;
  padding: 2px 3px;
}

.rentals-board-container.is-tv-fit .board-free-badge {
  font-size: 0.64rem;
  font-weight: 700;
}

.rentals-board-container.is-tv-fit .board-free-dur {
  font-size: 0.60rem;
}

.rentals-board-container.is-tv-fit .board-hour-label {
  font-size: 0.68rem;
  font-weight: 800;
}

/* ==========================================================================
   8. MODE KIOSQUE ÉCRAN TV (Compte 'cdvr' / role 'screen')
   ========================================================================== */
body.is-screen-mode #bottom-nav,
body.is-screen-mode #top-bar,
body.is-screen-mode #app-container > main {
  display: none !important;
}

.rentals-board-container.is-screen-kiosk .board-close-btn,
.rentals-board-container.is-screen-kiosk .board-move-toggle-btn,
.rentals-board-container.is-screen-kiosk button[onclick*="ConflictDetector"],
.rentals-board-container.is-screen-kiosk .board-dropdown-wrapper {
  display: none !important;
}

.board-screen-logout-btn {
  background: #1e293b;
  border: 1px solid #475569;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 10px;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.board-screen-logout-btn:hover {
  background: #ef4444;
  border-color: #f87171;
  color: #ffffff;
}




/* ==========================================================================
   9. NOUVELLES FONCTIONNALITÉS TABLEAU HEBDO
   - Plage horaire Après-Midi (12h-22h par défaut) vs Jour Entier (07h-22h)
   - Location permanente Studio 1B Waimea POLE DANCE (Case coin & Colonne unique)
   ========================================================================== */

/* Filtre Plage Horaire */
.board-timerange-group {
  display: flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 1px;
  gap: 2px;
  height: 34px;
  box-sizing: border-box;
}

.board-timerange-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0 9px;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.board-timerange-btn:hover {
  background: #1e293b;
  color: #f8fafc;
}

.board-timerange-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.4);
}

/* Case permanente Studio 1B Waimea POLE DANCE dans la barre d'outils / coin */
.board-permanent-corner-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(124, 58, 237, 0.28));
  border: 1px solid rgba(139, 92, 246, 0.55);
  border-radius: 6px;
  padding: 2px 10px 2px 4px;
  height: 34px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}

.board-permanent-corner-pill:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(124, 58, 237, 0.45));
  border-color: #a78bfa;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.board-permanent-corner-tag {
  background: #8b5cf6;
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 900;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  line-height: 1;
}

.board-permanent-corner-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.board-permanent-corner-name {
  font-size: 0.76rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}

.board-permanent-corner-desc {
  font-size: 0.60rem;
  color: #c4b5fd;
  font-weight: 600;
}

.board-permanent-corner-lock {
  font-size: 0.80rem;
  margin-left: 2px;
  opacity: 0.85;
}

/* Colonne unique Studio 1B Permanent (si activée) */
.board-permanent-col {
  width: 140px;
  min-width: 140px;
  max-width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #141124;
  border-right: 2px solid #3b2a54;
  position: relative;
  z-index: 5;
}

.board-permanent-col-header {
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  background: #1e1733 !important;
  border-bottom-color: #4c3370 !important;
}

.board-permanent-title-row {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  background: #281d45 !important;
  border-bottom-color: #4c3370 !important;
  padding: 3px 6px;
}

.board-permanent-tag-status {
  background: #8b5cf6;
  color: #ffffff;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}

.board-permanent-col-body {
  padding: 4px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.board-permanent-card-block {
  flex: 1;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.25) 0%, rgba(91, 33, 182, 0.35) 100%);
  border: 1.5px solid #8b5cf6;
  border-radius: 6px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: inset 0 0 12px rgba(139, 92, 246, 0.2);
}

.board-permanent-card-block:hover {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.35) 0%, rgba(91, 33, 182, 0.5) 100%);
  border-color: #c4b5fd;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.board-permanent-block-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #c4b5fd;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.board-permanent-block-title {
  font-size: 0.85rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
}

.board-permanent-block-sub {
  font-size: 0.70rem;
  color: #e2e8f0;
  font-weight: 600;
}

.board-permanent-block-foot {
  font-size: 0.62rem;
  color: #a78bfa;
  font-weight: 700;
  background: rgba(139, 92, 246, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

/* Modale détails Bail Permanent Studio 1B */
.board-permanent-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.board-permanent-modal-card {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: boardModalFadeIn 0.15s ease-out;
  font-family: inherit;
}

@keyframes boardModalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.board-permanent-modal-header {
  padding: 16px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
}

.board-permanent-modal-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.board-permanent-modal-badge {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.board-permanent-modal-titles {
  flex: 1;
}

.board-permanent-modal-titles h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
}

.board-permanent-modal-titles p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.board-permanent-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.board-permanent-modal-close:hover {
  background: #334155;
  color: #ffffff;
}

.board-permanent-modal-body {
  padding: 16px;
}

.board-permanent-modal-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.board-permanent-info-item {
  display: flex;
  flex-direction: column;
  background: #0f172a;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #334155;
}

.board-permanent-info-label {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.board-permanent-info-val {
  font-size: 0.88rem;
  color: #f1f5f9;
  font-weight: 700;
}

.board-permanent-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #334155;
}


/* ==========================================================================
   MODE TV + VUE APRÈS-MIDI (12h–22h) : Typographie habituelle & épuration
   Taille habituelle conservée sur TV ; masquage du sous-titre professeur/loueur
   ========================================================================== */
.rentals-board-container.is-tv-fit.is-range-afternoon .board-event-sub {
  display: none !important;
}


/* Segments d'alignement vertical pour l'axe horaire (72px) */
.board-time-axis-header-top {
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.70rem;
  color: #64748b;
  font-weight: 800;
  border-bottom: 1px solid #242d3d;
  box-sizing: border-box;
  flex-shrink: 0;
}

.board-time-axis-header-mid {
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  background: #111722;
  border-bottom: 1px solid #242d3d;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  color: #c4b5fd;
  font-weight: 900;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.board-time-axis-header-bot {
  flex: 1;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
  box-sizing: border-box;
}

/* Spacer dans l'en-tête du jour réservant l'espace du bandeau Studio 1B (26px) */
.board-permanent-banner-spacer {
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  box-sizing: border-box;
}

/* Ligne en toute largeur Studio 1B positionnée sous la ligne des JOURS */
.board-days-wrapper {
  position: relative;
}

.board-permanent-banner-row {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  background: linear-gradient(90deg, #1c112b 0%, #35145c 20%, #2e0f52 80%, #1c112b 100%);
  border-top: 1px solid rgba(167, 139, 250, 0.45);
  border-bottom: 1.5px solid rgba(139, 92, 246, 0.7);
  box-sizing: border-box;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.board-permanent-banner-row:hover {
  background: linear-gradient(90deg, #28173d 0%, #461b7a 20%, #3c156b 80%, #28173d 100%);
  border-bottom-color: #a78bfa;
}

.board-perm-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.board-perm-badge {
  background: #8b5cf6;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.board-perm-title {
  font-size: 0.72rem;
  color: #c4b5fd;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.board-perm-name {
  font-size: 0.80rem;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.board-perm-banner-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.board-perm-pill {
  background: rgba(139, 92, 246, 0.22);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #e2e8f0;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.board-perm-lock {
  font-size: 0.68rem;
  color: #a78bfa;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}


/* ==========================================================================
   Ligne permanente Studio 1B en toute largeur tout en bas (Centrée)
   Police agrandie & mention explicite "STUDIO 1B"
/* ==========================================================================
   Les 2 lignes du bas (bail permanent et contact CDVR) sont réservées exclusivement au mode Vue TV
   ========================================================================== */
.board-tv-footer-dock,
.board-permanent-footer-row,
.board-school-footer-row {
  display: none !important;
}

.rentals-board-container.is-tv-fit .board-tv-footer-dock,
.rentals-board-container.is-screen-kiosk .board-tv-footer-dock,
.rentals-board-container.is-tv-fit .board-permanent-footer-row,
.rentals-board-container.is-tv-fit .board-school-footer-row,
.rentals-board-container.is-screen-kiosk .board-permanent-footer-row,
.rentals-board-container.is-screen-kiosk .board-school-footer-row {
  display: flex !important;
}

.board-tv-footer-dock {
  width: 100%;
  height: 76px;
  min-height: 76px;
  max-height: 76px;
  flex-shrink: 0;
  align-items: stretch;
  position: relative;
  z-index: 26;
  box-sizing: border-box;
}

.board-tv-footer-rows {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 76px;
}

.board-permanent-footer-row {
  width: 100%;
  min-height: 38px;
  height: 38px;
  max-height: 38px;
  background: linear-gradient(90deg, #1c112b 0%, #35145c 20%, #2e0f52 80%, #1c112b 100%);
  border-top: 1.5px solid rgba(139, 92, 246, 0.75);
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.board-permanent-footer-row.is-playing-ticker {
  background: linear-gradient(90deg, #161028 0%, #2d124d 50%, #161028 100%);
  border-top-color: #f59e0b;
}

.board-perm-ticker-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
}

.board-perm-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  will-change: transform;
}

.board-perm-ticker-badge {
  background: #f59e0b;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 4px;
  line-height: 1.1;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.board-perm-ticker-text {
  font-size: 1.12rem;
  font-weight: 800;
  color: #fef08a;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.board-permanent-footer-row:hover {
  background: linear-gradient(90deg, #28173d 0%, #461b7a 20%, #3c156b 80%, #28173d 100%);
  border-top-color: #a78bfa;
}

.board-perm-footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
}

.board-permanent-footer-row .board-perm-badge {
  background: #8b5cf6;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.board-permanent-footer-row .board-perm-title {
  font-size: 0.90rem;
  color: #c4b5fd;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.board-permanent-footer-row .board-perm-name {
  font-size: 1.05rem;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.board-perm-sep {
  opacity: 0.5;
  color: #c4b5fd;
  font-size: 0.88rem;
}

.board-permanent-footer-row .board-perm-pill {
  background: rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: #e2e8f0;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.board-permanent-footer-row .board-perm-lock {
  font-size: 0.86rem;
  color: #a78bfa;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Ligne Publicité & Contact Direction tout en bas du tableau (BLANC sur BLEU)
   CENTRE DE DANSE VANESSA ROCHE avec Logo CDVR, Téléphone & Email Direction (Centrée)
   ========================================================================== */
.board-school-footer-row {
  width: 100%;
  min-height: 38px;
  height: 38px;
  max-height: 38px;
  background: linear-gradient(90deg, #1A63C9 0%, #0284c7 50%, #1A63C9 100%);
  color: #ffffff;
  border-top: 1.5px solid rgba(255, 255, 255, 0.35);
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 26;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-family: inherit;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
}

.board-school-footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 100%;
  white-space: nowrap;
}

.board-school-icon-svg {
  fill: #ffffff !important;
  color: #ffffff !important;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.board-school-logo {
  height: 28px;
  width: auto;
  max-width: 32px;
  object-fit: contain;
  border-radius: 4px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
  flex-shrink: 0;
}

.board-school-title {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #ffffff;
  text-transform: uppercase;
}

.board-school-tag {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.12rem;
  font-weight: 400;
  font-style: italic;
  padding: 0;
  border-radius: 0;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.board-school-link {
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s ease;
}

.board-school-link:hover {
  text-decoration: underline;
  opacity: 0.9;
}

.board-school-phone-link {
  font-size: 1.22rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.4px;
}

.board-school-phone-val {
  font-size: 1.22rem !important;
  font-weight: 900 !important;
  color: #ffffff;
}

.board-school-email-link {
  font-size: 1.14rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px;
}

.board-school-email-val {
  font-size: 1.14rem !important;
  font-weight: 800 !important;
  color: #ffffff;
}

.board-school-sep {
  opacity: 0.65;
  font-size: 1.05rem;
  color: #ffffff;
}

