:root {
  --primary: #2d6a4f;
  --primary-light: #74c69d;
  --primary-dark: #1b4332;
  --secondary: #dda15e;
  --secondary-light: #faedcd;
  --tertiary: #bc6c25;
  --light: #fefae0;
  --dark: #283618;
  --gray-light: #f8f9fa;
  --gray: #e9ecef;
  --gray-dark: #6c757d;
  --shadow: rgba(0, 0, 0, 0.05);
  --radius: 1rem;
  --radius-sm: 0.5rem;
  --transition: all 0.3s ease;
}

body {
  background-color: var(--light);
  background-image: linear-gradient(
    135deg,
    rgba(45, 106, 79, 0.03) 0%,
    rgba(221, 161, 94, 0.03) 100%
  );
  color: var(--dark);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

.page-header {
  background-color: var(--primary);
  background-image: linear-gradient(
    to right,
    var(--primary-dark),
    var(--primary)
  );
  color: white;
  padding: 3rem 1.5rem;
  margin-bottom: 3rem;
  text-align: center;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 4px 20px var(--shadow);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://images.pexels.com/photos/273935/pexels-photo-273935.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750");
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 2.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  border: 1px solid var(--gray);
  box-shadow: 0 8px 24px var(--shadow);
  transition: var(--transition);
}

.glass-card:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.calendar-card {
  padding: 1.5rem;
  overflow: visible;
  background: rgba(243, 215, 182, 0.98);  
}

.info-card {
  padding: 2rem;
  background: rgba(243, 215, 182, 0.98);  
  border: 1px solid var(--gray);
  box-shadow: 0 2px 8px var(--shadow);
}

.info-card h4 {
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
}

/* --------------------------------------------- */
/* 1) Variables et réglages de base pour FullCalendar */
/* --------------------------------------------- */
.fc {
  --fc-border-color: rgba(0, 0, 0, 0.08);
  --fc-today-bg-color: rgba(45, 106, 79, 0.1);
  --fc-event-bg-color: var(--gray-dark);
  --fc-event-border-color: var(--gray-dark);
  font-family: inherit;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--shadow);
}

/* Titre du calendrier (mois) */
.fc .fc-toolbar-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-dark);
}

/* Espace sous la toolbar (boutons Prev/Next/Today) */
.fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  box-shadow: 0 2px 6px var(--shadow);
}

/* Boutons “Primaires” (Prev/Next/Today) */
.fc .fc-button-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: none;
  transition: var(--transition);
}

.fc .fc-button-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Quand un bouton est actif */
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* En-tête de chaque jour (lun, mar, etc.) */
.fc .fc-col-header-cell-cushion {
  font-weight: 600;
  color: var(--primary-dark);
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 0.8rem 0;
  text-decoration: none;
}

/* Numéro du jour (1, 2, 3…) */
.fc .fc-daygrid-day-top {
  display: flex;
  justify-content: center;
  padding-top: 0.2rem;
}
.fc .fc-daygrid-day-number {
  position: relative;
  z-index: 5;
  font-weight: 500;
  color: var(--dark);
  font-size: 0.95rem;
  text-decoration: none;
}

/* Style du jour “aujourd’hui” */
.fc-day-today .fc-daygrid-day-number {
  color: var(--primary);
  font-weight: 600;
}
.fc .fc-daygrid-day.fc-day-today {
  background-color: rgba(45, 106, 79, 0.1);
  position: relative;
}
.fc .fc-daygrid-day.fc-day-today::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--primary);
}

/* Hover sur un jour futur (non réservé) */
.fc-day-future:not(.fc-day-other):not(.fc-day-today):hover {
  background-color: rgba(9, 54, 34, 0.05);
  cursor: pointer;
}

/* Cadre des cellules pour pouvoir y placer des badges */
.fc .fc-daygrid-day-frame {
  position: relative;
  padding: 0.2rem;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--gray);
  box-shadow: 0 2px 4px var(--shadow);
  margin: 2px;
}

/* Bordures des cases (FullCalendar v6) */
.fc-theme-standard td,
.fc-theme-standard th {
  border: none;
}

/* -------------------------------------------------------- */
/* 2) Styles pour la sélection “start” / “range” / “end”     */
/* -------------------------------------------------------- */
.selected-start,
.selected-end {
  background-color: var(--primary) !important;
  color: var(--dark);
  z-index: 5 !important;
}

.selected-start .fc-daygrid-day-number,
.selected-end .fc-daygrid-day-number {
  color: var(--dark) !important;
  z-index: 5 !important;
}

.selected-range {
  position: relative;
  background-color: var(--primary-light) !important;
  z-index: 5 !important;
}

/* -------------------------------------------------------- */
/* 3) Badge “Réservé” (en rouge) – centré en bas de la case */
/* -------------------------------------------------------- */

.booked-badge {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #dc3545; /* rouge Bootstrap */
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  z-index: 3; /* au-dessus du badge prix */
  pointer-events: none; /* pour que le clic passe sous le badge */
}

.fc-daygrid-day[data-booked="1"] .fc-daygrid-day-frame {
  background-color: rgba(220, 53, 69, 0.4) !important;
}

/* -------------------------------------------------------- */
/* 4) Badge Prix (petit carré blanc semi-transparent) – en bas et centré */
/* -------------------------------------------------------- */

.day-price {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  border: 1px solid var(--gray);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

/* -------------------------------------------------------- */
/* 5) Styles pour l’affichage de la date sélectionnée (sidebar) */
/* -------------------------------------------------------- */
.selected-date-display {
  background-color: var(--secondary-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.selected-date-display .date-value {
  font-weight: 600;
  color: var(--tertiary);
}

/* -------------------------------------------------------- */
/* 6) Légende en bas du calendrier                          */
/* -------------------------------------------------------- */
.calendar-legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--dark);
}
.calendar-legend .legend-dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  margin-right: 0.3rem;
  z-index: 5;
}
.available-dot {
  background-color: #28a745; /* vert */
}
.booked-dot {
  background-color: #dc3545; /* rouge */
}


/* Form styles */
.form-control {
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 0.2rem rgba(45, 106, 79, 0.15);
}

.btn {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.btn-success {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-success:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Price box */
.price-summary {
  background-color: var(--secondary-light);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-top: 3px solid var(--secondary);
  animation: fadeIn 0.4s ease-in-out;
}

.price-summary .total-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--tertiary);
  margin-top: 1rem;
  text-align: right;
}

.price-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.price-row:last-of-type {
  border-bottom: none;
}

.price-label {
  font-weight: 500;
}

.price-value {
  font-weight: 600;
}

/* Form section */
.form-section {
  animation: fadeIn 0.5s ease-in-out;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 1.5rem;
  margin-top: 1rem;
}

.form-section h5 {
  margin-bottom: 1rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.form-text {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--gray-dark);
}

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

/* Mobile optimizations */
@media (max-width: 991px) {
  .page-header {
    padding: 2rem 1rem;
    margin-bottom: 1.5rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .glass-card {
    margin-bottom: 1.5rem;
  }

  .fc .fc-toolbar.fc-header-toolbar {
    flex-direction: column;
    gap: 1rem;
  }

  .fc .fc-toolbar-title {
    font-size: 1.2rem;
  }
}

/* Tree icon for brand identity */
.tree-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  background-color: var(--secondary);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 19h8'/%3E%3Cpath d='m8 19-3-3.45C3.58 13.77 4.74 11 7.2 11H7c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4h.2c3.94 0 5.55 5.02 2.8 7.55'/%3E%3Cpath d='M16 19c-3.39 0-5.65-3.53-4.24-6.55'/%3E%3Cpath d='M20 8c0-2.21-1.79-4-4-4s-4 1.79-4 4 1.79 4 4 4h-.2c-3.94 0-5.55 5.02-2.8 7.55'/%3E%3Cpath d='M12 19v3'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}


.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
}

.available-dot {
  background-color: var(--primary-light);
}

.booked-dot {
  background-color: var(--gray-dark);
}