/* ==========================================================================
   assets/calendar.css
   --------------------------------------------------------------------------
   0) RESET & CACHE
   ========================================================================== */
/* Cacher définitivement tous les pop-overs et messages d’erreur FullCalendar */
.fc-popover,
.fc .fc-popover,
.fc-message,
.fc .fc-message,
.fc-message-list,
.fc .fc-message-list * {
  display: none !important;
}
/* Masquer le “Loading…” natif de FullCalendar */
.fc .fc-loading {
  visibility: hidden !important;
}


/* ==========================================================================
   1) TYPOGRAPHIE & IMPORT
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

body, input, button, select, textarea {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* ==========================================================================
   2) CONTENEUR CALENDRIER
   ========================================================================== */
#bm-calendar {
  position: relative;
  margin: 1rem auto;
  max-width: 1200px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 2px 4px rgba(60, 64, 67, 0.15),
    0 1px 3px rgba(60, 64, 67, 0.15);
}


/* ==========================================================================
   3) BARRE D’OUTILS FULLCALENDAR
   ========================================================================== */
.fc .fc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}
.fc .fc-toolbar-chunk {
  display: flex;
  gap: 0.5rem;
}
.fc .fc-toolbar-title {
  flex: 1;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 500;
  color: #202124;
}
.fc .fc-button {
  background: #f1f3f4;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  color: #3c4043;
  transition: background 0.2s, color 0.2s;
}
.fc .fc-button:hover,
.fc .fc-button:focus,
.fc .fc-button.fc-button-active {
  background: rgba(95, 99, 104, 0.1);
  color: #202124;
  outline: none;
}
.fc .fc-prev-button,
.fc .fc-next-button {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fc .fc-icon {
  font-size: 1.2rem;
}


/* ==========================================================================
   4) GRILLE HORAIRE
   ========================================================================== */
.fc .fc-timegrid-slot {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.fc .fc-timegrid-slot-minor {
  border-top: 1px solid rgba(0, 0, 0, 0.02);
}
.fc .fc-col-header-cell-cushion,
.fc .fc-timegrid-col-frame.fc-timegrid-current-time {
  background: #f1f3f4;
}


/* ==========================================================================
   5) ÉVÉNEMENTS
   ========================================================================== */
/* Désactiver le style FullCalendar par défaut */
.fc-event {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
/* Wrapper personnalisé */
.fc-event-free,
.fc-event-booked {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.5rem !important;
  border-left: 4px solid !important;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #202124 !important;
  transition: background 0.2s;
}
.fc-event-free {
  background-color: #e8f0fe !important;
  border-left-color: #4285f4 !important;
}
.fc-event-booked {
  background-color: #fdecea !important;
  border-left-color: #d93025 !important;
}
.fc-event-free:hover {
  background-color: #d2e3fc !important;
}
.fc-event-booked:hover {
  background-color: #f9dbda !important;
}
.fc-event-time {
  font-weight: 500;
  color: #5f6368;
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
}
.fc-event-title {
  font-weight: 600;
  color: #202124;
  font-size: 0.9rem;
}


/* ==========================================================================
   6) INDICATEUR “NOW”
   ========================================================================== */
.fc .fc-now-indicator-line,
.fc .fc-timegrid-now-indicator-dot {
  background-color: #d93025 !important;
}


/* ==========================================================================
   7) OVERLAY SPINNER GLOBAL
   ========================================================================== */
#bm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#bm-overlay .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: bm-spin 1s linear infinite;
}
@keyframes bm-spin {
  to { transform: rotate(360deg); }
}


/* ==========================================================================
   8) BOÎTE DE DIALOGUE MODALE
   ========================================================================== */
#bm-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 10000;
}
#bm-dialog {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 360px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 10001;
}
/* En-tête */
#bm-dialog .bm-dialog-header {
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: #202124;
  border-bottom: 1px solid #e0e0e0;
}
/* Corps */
#bm-dialog .bm-dialog-body {
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
  line-height: 1.4;
}
/* Champs de saisie */
#bm-dialog .bm-dialog-body input,
#bm-dialog .bm-dialog-body textarea {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1.5rem; /* espace augmenté */
  font-size: 1rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;
  color: #212529;
  resize: vertical;
  box-sizing: border-box;
}
/* Read-only pour alertes */
#bm-dialog .bm-dialog-body textarea[readonly] {
  border: none;
  background: transparent;
  pointer-events: none;
  resize: none;
  font-style: italic;
  color: #202124;
  margin: 0;
  padding: 0;
}
/* Pied de boîte */
#bm-dialog .bm-dialog-footer {
  padding: 0.75rem 1.5rem;
  text-align: right;
  border-top: 1px solid #e0e0e0;
}
#bm-dialog .btn-cancel,
#bm-dialog .btn-ok {
  background: none;
  border: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
  cursor: pointer;
  color: #007bff;
  transition: color 0.2s;
}
#bm-dialog .btn-cancel:hover {
  color: #495057;
}
#bm-dialog .btn-ok:hover {
  color: #0056b3;
}


/* ==========================================================================
   9) FORMULAIRE MOT DE PASSE
   ========================================================================== */
.bm-login-box {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2rem 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.bm-login-box h2 {
  font-size: 1.75rem;
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 1.5rem;
}
.bm-login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bm-login-form input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ccd1d9;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bm-login-form input[type="password"]:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 4px rgba(74,144,226,0.2);
  outline: none;
}
.bm-login-form button {
  padding: 0.75rem 1rem;
  background: #4a90e2;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.bm-login-form button:hover {
  background: #357ab8;
}
.bm-login-form button:active {
  transform: translateY(1px);
}


/* ==========================================================================
   10) RÉACTIVITÉ
   ========================================================================== */
@media (max-width: 768px) {
  #bm-calendar {
    margin: 0.5rem;
  }
  .fc .fc-toolbar-title {
    font-size: 1rem;
  }
  .fc .fc-button,
  .fc .fc-prev-button,
  .fc .fc-next-button {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }
}
