/* =======================================
   1. VARIABLES CSS
   ======================================= */
:root {
  --primary-color: #1434c2;
  --secondary-color: #764ba2;
  --text-color: #333333; /* Changé pour une meilleure lisibilité sur fond clair */
  --light-bg: rgba(255, 255, 255, 0.95);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --border-radius-lg: 1.25rem; /* 20px */
  --border-radius-md: 0.9375rem; /* 15px */
  --border-radius-sm: 0.625rem; /* 10px */

  /* Nouvelles variables pour une meilleure gestion des transitions */
  --transition-duration: 0.3s;
  --transition-timing-function: ease-in-out;
  --fast-transition: 0.2s ease-out;

  /* Couleurs de fond spécifiques pour les sections */
  --section-bg-color: #2461bc84; /* Utilisé pour le formulaire et le calendrier */
  --section-shadow: var(--shadow); /* Réutilise la shadow générale */
}

/* =======================================
       2. STYLES DE BASE (Reset & Général)
       ======================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Supprime l'effet de surbrillance au toucher sur mobile */
}

html {
  scroll-behavior: smooth; /* Défilement fluide pour les ancres */
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: url("/image/fond.jpg") no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  color: var(--text-color);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 70px; /* Laisse de l'espace pour le header fixe */
}

.container {
  max-width: 75rem; /* 1200px */
  margin: 0 auto;
  padding: 1.25rem; /* 20px */
}

/* Classe partagée pour les éléments de type "carte" ou "panneau" */
.panel-card {
  background: var(--light-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Pour Safari */
  box-shadow: var(--shadow);
  border-radius: var(--border-radius-lg);
  will-change: transform, opacity;
}

/* =======================================
       3. HEADER & NAVIGATION
       ======================================= */
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: rgba(18, 48, 118, 0.705);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(21, 19, 19, 0.1);
  padding: 10px 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  color: #fff; /* Changé pour une meilleure lisibilité sur le fond bleu foncé */
}

/* Logo */
.logo {
  font-size: 1.5rem; /* 24px */
  font-weight: bold;
  color: #fff;
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-img {
  height: 60px;
  width: auto;
  vertical-align: middle;
  border-radius: 45%;
}
/* Nav Links (Desktop) */
.nav-links {
  display: flex;
  gap: 30px;
}
.nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 5px 0;
  position: relative;
  text-transform: uppercase;
}
.nav-link:hover,
.logo:hover {
  color: #0c09a3; /* Couleur de survol */
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width var(--transition-duration) var(--transition-timing-function);
}
.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}
/* Masque */
.menu-photo {
  display: none;
  width: 100%; /*prend la largeur disponible */
  max-width: 250px; /* Limite sa taille */
  height: auto; /* Maintenir les proportions */
  margin: 20px auto; /* Centré vertical */
  border-radius: var(--border-radius-sm);
  object-fit: cover; /*image couvre l'espace sans déformation */
  box-shadow: var(--shadow-md);
}

/* Hamburger Menu (Mobile) */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}
.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 5px 0;
  transition: all var(--transition-duration) var(--transition-timing-function);
}
.hamburger-menu.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.open span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =======================================
       4. SECTIONS PRINCIPALES (vue)
       ======================================= */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 1.875rem;
  padding: 1.25rem;
  margin-top: 0;
}

/* Styles pour les colonnes individuelles */
.booking-form,
.calendar-container {
  width: 100%;
}
/* Cache l'heure par défaut de FullCalendar dans les pop-ups des événements */
.fc-popover .fc-event .fc-event-time {
  display: none !important;
}
/* Cache l'heure par défaut de FullCalendar dans les vues de liste (par précaution) */
.fc-list-event .fc-list-event-time {
  display: none !important;
}
/* Media query pour les grands écrans (lg: 1024px et plus) */
@media (min-width: 64rem) {
  .main-content {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .booking-form,
  .calendar-container {
    flex: 1;
    width: calc(50% - (1.875rem / 2));
  }
}
/* =======================================
       5. FORMULAIRE DE RÉSERVATION
       ======================================= */
.booking-form {
  padding: 1.875rem;
  background: var(--section-bg-color); /* Utilisation de la variable */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--section-shadow); /* Utilisation de la variable */
  border-radius: var(--border-radius-lg);
}
#reservationForm {
  background: none;
  border-radius: 0;
}
.form-group {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.form-label {
  min-width: 150px;
  max-height: 1.5rem;
  margin-bottom: 0;
  color: #ffffff;
  font-weight: bold;
  background-color: rgba(17, 43, 100, 0.402);
  border-radius: 5%;
}
.form-input {
  width: 100%;
  padding: 0.9375rem;
  border: 0.125rem solid #e1e5e9;
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  transition: border-color var(--transition-duration),
    box-shadow var(--transition-duration);
}

.input-with-button {
  display: flex;
  flex: 1;
  gap: 8px;
}

.geo-button-inline {
  background: #4caf50;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.geo-button-inline:hover {
  background: #45a049;
  background-color: #0056b3;
  transform: scale(1.05);
}
/* Conteneur principal de la section escale (ceci est l'original #waypoints-container) */
.form-group.horizontal-field {
  display: flex;
  font-display: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.add-waypoint-button {
  width: 40px;
  height: 40px;
  background-color: #bbdbe4;
  color: white;
  border: none;
  font-size: 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.add-waypoint-button:hover {
  background-color: #0c68cb;
}

/* Conteneur pour toutes les lignes d'escales générées dynamiquement (le #waypoint-group) */
/* C'est ce div qui devient visible et contiendra les 'waypoint-full-line' empilés */
#waypoint-group {
  /* display: none; sera géré par JS */
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1rem;
}

/* Conteneur pour CHAQUE ligne d'escale (label "Escale X :", input, bouton X) */
.waypoint-full-line {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* Style du label "Escale X :" */
.waypoint-item-label {
  color: white; /* C'est la couleur que vous voulez */
  font-weight: bold;
  font-size: 12px;
  min-width: 80px;
  text-align: right; /* Aligne le texte à droite dans son min-width */
  flex-shrink: 0; /* Empêche le label de rétrécir */
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}

/* Groupe input et bouton X */
.waypoint-input-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  flex-grow: 1;
}

/* L'input du point d'escale */
.waypoint-input-group .form-input {
  flex: 1;
  min-width: 150px;
  box-sizing: border-box;
}

/* Bouton de suppression du point d'escale "X" */
.remove-waypoint-btn {
  background-color: #dc3545; /* Rouge vif */
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 20px;
  width: 38px;
  height: 38px;
  flex-shrink: 0; /* Empêche le bouton de rétrécir même si l'espace est limité */
  transition: background-color 0.3s ease;
  cursor: pointer;
  display: flex; /* Pour centrer le "X" */
  align-items: center;
  justify-content: center;
}

.remove-waypoint-btn:hover {
  background-color: #c82333;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.1875rem rgba(102, 126, 234, 0.1);
}
.datetime-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9375rem;
}
.horizontal-field {
  display: flex;
  align-items: center;
  gap: 12px;
}
.horizontal-field .form-label {
  margin-bottom: 0;
  min-width: 150px;
}
.horizontal-field .form-input {
  flex: 1;
}
/* ===Message conducteur== */
.horizontal-textarea {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.horizontal-textarea .form-label {
  margin-bottom: 0;
  min-width: 1px;
}
.horizontal-textarea textarea {
  flex: 1;
}
/* Info Véhicule (dans le formulaire) */
.vehicle-info {
  background: #f8f9fa;
  border: 0.125rem solid var(--primary-color);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-top: 0.625rem;
  will-change: transform, box-shadow; /* Optimisation */
}
.vehicle-icon {
  font-size: 2.5rem;
  margin-bottom: 0.625rem;
}
.vehicle-name {
  font-weight: 600;
  margin-bottom: 0.3125rem;
  font-size: 1.125rem;
}

.vehicle-price {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.25rem;
}

/* Boutons du formulaire */
.calculate-btn,
.book-btn {
  /* Regroupement des propriétés communes */
  width: 40%;
  color: white;
  border: none;
  font-weight: bold;
  border-radius: var(
    --border-radius-sm
  ); /* Utilise la plus petite par défaut */
  cursor: pointer;
  transition: transform var(--transition-duration),
    box-shadow var(--transition-duration), background var(--transition-duration);
  margin-top: 0.9375rem;
  touch-action: manipulation;
}

.calculate-btn {
  background: #27ae60;
  padding: 0.75rem;
  font-size: 1rem;
  position: relative;
}

.calculate-btn:hover {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.book-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  padding: 1.125rem;
  font-size: 1.125rem;
  border-radius: var(--border-radius-md); /* Taille de bordure spécifique */
  margin-top: 1.5625rem;
}

.book-btn:hover {
  background: linear-gradient(135deg, #4f6ed1 0%, #613e8e 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Estimation du prix */
.price-estimate {
  background: var(--light-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  margin-top: 1.25rem;
  border-left: 0.25rem solid var(--primary-color);
  will-change: transform, box-shadow;
}

.price-title {
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 0.625rem;
}

.price-amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* =======================================
       6. CALENDRIER FULLCALENDAR
       ======================================= */
.calendar-container {
  display: flex;
  flex-direction: column;
  padding: 1.5625rem;
  margin-bottom: 1.875rem;
  border-radius: var(--border-radius-lg);
  background: var(--section-bg-color); /* Utilisation de la variable */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--section-shadow); /* Utilisation de la variable */
  height: auto;
  will-change: transform, opacity;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.calendar-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
}

.calendar-views {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.view-btn {
  padding: 0.5rem 1rem;
  background: #f8f9fa;
  border: 0.125rem solid #e1e5e9;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-duration);
  touch-action: manipulation;
}

.view-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

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

#calendar {
  width: 100%;
  height: 25rem; /*La hauteur du calendrier*/
  min-height: 25rem;
}
#calendar:hover {
  /* Exemple*/
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(
    -2px
  ); /* Léger déplacement vers le haut pour un effet subtil */
  transition: box-shadow 0.3s ease, transform 0.3s ease; /* Rend la transition plus douce */
}

/* Customisation FullCalendar */
.fc {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.fc-header-toolbar {
  margin-bottom: 1.25rem !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
}

/* Règles pour les boutons FullCalendar */
.fc-button-primary,
.fc-today-button {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  font-weight: 600 !important;
  transition: background-color var(--transition-duration),
    border-color var(--transition-duration);
  touch-action: manipulation;
}
.fc-today-button {
  background: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
}

.fc-button-primary:hover,
.fc-today-button:hover {
  background: #5a6fd8 !important; /* Couleur de survol */
  border-color: #5a6fd8 !important;
  transform: translateY(-1px);
}

.fc-daygrid-day-number {
  color: white !important;
  font-weight: 600 !important;
}

.fc-col-header-cell {
  background-color: #eaf3ff !important; /* Couleur spécifique */
  color: #0e5ba8 !important; /* Couleur spécifique */
  font-weight: 600;
  border-bottom: 1px solid #ccddee;
}
.fc-daygrid-day.fc-day-today {
  background: rgba(102, 126, 234, 0.1) !important;
}
.fc-daygrid-day.fc-day-valid:hover {
  background-color: var(--color-blue-dark, #0d3b66);
  color: var(--color-white, #ffffff);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.fc-event {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  border-radius: 0.5rem !important;
  transition: background-color var(--fast-transition),
    border-color var(--fast-transition), opacity var(--fast-transition),
    box-shadow var(--fast-transition), transform var(--fast-transition);
  touch-action: manipulation;
}
/* Effets de survol et de sélection pour FullCalendar */
.fc .fc-timegrid-slot-lane,
.fc .fc-daygrid-day-frame {
  transition: background-color var(--fast-transition),
    border-color var(--fast-transition), box-shadow var(--fast-transition);
}
.fc .fc-timegrid-slot-lane:hover {
  background-color: rgba(0, 123, 255, 0.15) !important;
  cursor: pointer !important;
}
.fc .fc-daygrid-day-frame:hover {
  background-color: rgba(0, 123, 255, 0.05) !important;
  cursor: pointer !important;
}
.fc .fc-selected-cell {
  background-color: rgba(0, 123, 255, 0.4) !important;
  border: 1px solid #007bff !important;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2) !important;
}

.fc .fc-timegrid-event:hover {
  opacity: 0.9 !important;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3) !important;
  transform: translateY(-1px);
  cursor: pointer;
}

.fc .fc-selected-event {
  background-color: #0056b3 !important;
  border-color: #0056b3 !important;
  color: white !important;
  font-weight: bold !important;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4) !important;
}

.fc .fc-button-group .fc-button {
  transition: background-color var(--fast-transition),
    border-color var(--fast-transition), color var(--fast-transition);
  touch-action: manipulation;
}

.fc .fc-button-group .fc-button:hover {
  background-color: #0056b3;
  border-color: #004085;
  color: #fff;
}

/* =======================================
       7. SÉLECTEUR DE CRÉNEAUX HORAIRES PERSONNALISÉS
       ======================================= */
.time-selector {
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  margin-top: 1.25rem;
  border-left: 0.25rem solid var(--primary-color);
  will-change: transform, opacity;
}

.time-title {
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 0.9375rem;
}

.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
  max-height: 26rem;
  overflow-y: auto;
  padding-right: 5px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.time-slot-button {
  /* Renommée pour clarté, était .time-slot */
  flex: 0 0 calc(33.333% - 10px);
  max-width: calc(33.333% - 10px);
  cursor: pointer;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  text-align: center;
  background-color: #f9f9f9;
  color: #333;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: background-color var(--fast-transition),
    color var(--fast-transition), border-color var(--fast-transition),
    transform var(--fast-transition);
  touch-action: manipulation;
}

.time-slot-button:hover:not(.unavailable) {
  background-color: #e0e0e0;
  border-color: #a0a0a0;
  transform: translateY(-2px) scale(1.02);
}

.time-slot-button.selected-time-slot {
  /* Renommée pour clarté, était .time-slot.selected */
  background-color: #007bff;
  color: white;
  border-color: #007bff;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}

.time-slot-button.unavailable {
  background-color: #f0f0f0;
  color: #aaa;
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: 0.7;
  box-shadow: none;
}
.notice-message {
  background-color: white;
  color: #2dd204;
  font-weight: bold;
  text-align: center;
  padding: 0.5rem;
  border-radius: 0.3rem;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.notice-message.hidden {
  display: none !important;
}

/* =======================================
       8. INFORMATIONS SUR LA DISTANCE / CARTE
       ======================================= */
.distance-info {
  border-radius: var(--border-radius-md);
  padding: 0.9375rem;
  margin-top: 0.9375rem;
  border-left: 0.25rem solid #27ae60;
  display: none;
  will-change: transform, opacity;
}

.distance-details {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.9375rem;
  text-align: center;
}

.distance-item {
  font-size: 0.875rem;
}

.distance-value {
  font-size: 1.125rem;
  font-weight: bold;
  color: #27ae60;
}

.distance-label {
  color: #666;
  margin-top: 0.3125rem;
}

.map-bordered {
  width: 100%;
  height: 25rem;
  border-radius: var(--border-radius-md);
  border: 0.125rem solid #0e5ba8;
  overflow: hidden;
}

/* =======================================
       9. SECTION CARACTÉRISTIQUES (Features)
       ======================================= */
.features {
  padding: 1.875rem;
  will-change: transform, opacity;
}

.features-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 1.5625rem;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: #f8f9fa;
  border-radius: var(--border-radius-md);
  padding: 1.5625rem;
  text-align: center;
  transition: transform var(--transition-duration);
  touch-action: manipulation;
  will-change: transform, box-shadow;
}

.feature-card:hover {
  transform: translateY(-0.3125rem);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 0.9375rem;
  color: var(--primary-color);
}

.feature-title {
  font-size: 1.125rem;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 0.625rem;
}

.feature-desc {
  color: #666;
  line-height: 1.5;
  font-size: 0.9375rem;
}

/* =======================================
       10. FOOTER
       ======================================= */
footer {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem 0;
  text-align: center;
  border-radius: 0;
}

footer p,
footer a {
  font-size: 0.875rem;
  margin: 0;
  padding: 0;
}

footer .mt-2 {
  margin-top: 0.5rem;
}

footer .text-sm {
  font-size: 0.875rem;
}
footer .underline {
  text-decoration: underline;
  color: hsl(43, 95%, 47%);
  font-weight: bold;
}

footer .hover\:text-gray-300:hover {
  color: #d1d5db;
}

/* =======================================
       11. RESPONSIVE DESIGN (Media Queries)
       ======================================= */
@media (max-width: 64rem) {
  .container {
    padding: 1rem;
  }

  .header {
    padding: 1rem 0;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .nav-links.open {
    background-color: #fff;
  }
  .nav-links .nav-link {
    color: #4a5568;
  }
  .nav-links .nav-link:hover {
    color: var(--primary-color);
  }

  .main-content {
    gap: 1.5rem;
  }

  .booking-form,
  .calendar-container {
    padding: 1.5rem;
  }

  .form-title {
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
  }

  #calendar,
  .map-bordered {
    height: 22rem;
    min-height: 22rem;
  }

  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  }

  .feature-card {
    padding: 1.25rem;
  }
}

/* Pour les écrans jusqu'à 768px (48rem) */
@media (max-width: 48rem) {
  body {
    background-color: #f0f2f5;
  }

  .nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
  }

  .hamburger-menu {
    display: block;
    z-index: 1001;
  }

  .hamburger-menu span {
    background-color: #fff;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    z-index: 999;
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--transition-duration)
      var(--transition-timing-function);
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 100vh;
    padding: 20px;
    background-image: url("/image/burger.jpg");
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-color: rgb(65, 92, 188);
    background-blend-mode: overlay;
    z-index: 1;
  }

  .nav-links.open .menu-photo {
    display: block;
  }

  .nav-links.open .nav-link {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-link:hover {
    color: var(--primary-color);
  }

  .main-content {
    margin-top: 0;
    padding: 0;
  }

  .form-group.horizontal-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .form-group.horizontal-field .form-label {
    min-width: auto;
    margin-bottom: 0;
    background-color: transparent;
    border-radius: 0;
    color: #ffffff;
    text-align: left;
    flex-shrink: 0;
  }

  .form-group .add-waypoint-button {
    width: 40px;
    height: 40px;
    margin-top: 0;
    align-self: auto;
    flex-shrink: 0;
  }

  .waypoint-full-line {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 8px;
  }

  .waypoint-item-label {
    color: white;
    font-weight: bold;
    font-size: 12px;
    min-width: 60px;
    text-align: right;
    flex-shrink: 0;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
  }

  .waypoint-input-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: nowrap;
    flex-grow: 1;
  }

  .waypoint-input-group .form-input {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.75rem;
    font-size: 0.9375rem;
  }

  .remove-waypoint-btn {
    width: 38px;
    height: 38px;
    font-size: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .remove-waypoint {
    display: none;
  }

  .datetime-group {
    grid-template-columns: 1fr;
    gap: 0.625rem;
    flex-direction: column;
    align-items: stretch;
  }

  .distance-details {
    grid-template-columns: 1fr;
  }

  .calendar-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
  }

  .calendar-views {
    width: 100%;
    justify-content: center;
  }

  .fc-header-toolbar .fc-button-group {
    flex-wrap: wrap;
    justify-content: center;
  }

  #calendar {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .map-bordered {
    width: 100%;
    aspect-ratio: 1/1;
    border: 2px solid #091ad7;
    box-sizing: border-box;
    margin: 0 auto;
    overflow-x: hidden;
  }

  .fc-scroller {
    overflow: visible !important;
    max-height: none !important;
  }

  .fc .fc-daygrid-body,
  .fc .fc-daygrid-body-natural {
    max-height: none !important;
    overflow: visible !important;
  }

  .fc-scrollgrid {
    overflow: visible !important;
  }

  .fc .fc-daygrid {
    max-height: none !important;
  }

  .fc-daygrid-body {
    display: grid !important;
    grid-template-rows: repeat(6, 1fr) !important;
    min-height: unset !important;
    grid-template-rows: repeat(6, minmax(2rem, auto)) !important;
  }

  .fc-daygrid-day {
    height: auto !important;
    min-height: 3.5rem !important;
    padding: 2px !important;
    box-sizing: border-box;
  }

  .fc-daygrid-day-number {
    font-size: 0.7rem !important;
  }

  .fc-event-title {
    font-size: 0.65rem !important;
    line-height: 1.1;
  }

  .fc-daygrid-day-frame {
    min-height: auto !important;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
  .notice-message {
    font-size: 0.85rem;
    padding: 0.4rem;
    margin-top: 0.5rem;
    background-color: white;
    color: #2dd204;
    font-weight: bold;
    text-align: center;
  }
  .notice-message.hidden {
    display: none !important;
  }
}
/* Petit ecran */
@media (max-width: 30rem) {
  .header {
    padding: 0.625rem;
  }

  .main-content {
    margin-top: 0;
  }

  .logo {
    font-size: 1.3rem;
  }

  .logo-img {
    height: 30px;
  }

  .booking-form,
  .calendar-container,
  .features {
    padding: 1rem;
  }

  .form-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    font-size: 0.9375rem;
  }

  .calculate-btn,
  .book-btn {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
  }

  .distance-details {
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }

  .fc-popover .fc-event-time,
  .fc-list-event-time {
    display: none !important;
  }

  #calendar {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .map-bordered {
    width: 100%;
    aspect-ratio: 1/1;
    border: 2px solid #091ad7;
    box-sizing: border-box;
    margin: 0 auto;
    overflow-x: hidden;
  }
  .calendar-container,
  #calendar {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }

  .fc-scroller {
    overflow: visible !important;
    max-height: none !important;
  }

  .fc .fc-daygrid-body,
  .fc .fc-daygrid-body-natural {
    max-height: none !important;
    overflow: visible !important;
  }

  .fc-scrollgrid {
    overflow: visible !important;
  }

  .fc .fc-daygrid {
    max-height: none !important;
  }

  .fc-daygrid-body {
    display: grid !important;
    grid-template-rows: repeat(6, 1fr) !important;
    min-height: 100% !important;
  }

  .fc-daygrid-day {
    height: auto !important;
    min-height: 3.5rem !important;
    padding: 2px !important;
    box-sizing: border-box;
  }

  .fc-daygrid-day-number {
    font-size: 0.7rem !important;
  }

  .fc-event-title {
    font-size: 0.65rem !important;
    line-height: 1.1;
  }

  .fc-daygrid-day-frame {
    min-height: auto !important;
  }

  .feature-card {
    padding: 1rem;
  }

  .feature-icon {
    font-size: 2rem;
    margin-bottom: 0.625rem;
  }

  .feature-title {
    font-size: 1rem;
  }

  .feature-desc {
    font-size: 0.875rem;
  }
  .notice-message {
    font-size: 0.8rem;
    padding: 0.3rem;
    margin-top: 0.4rem;
    background-color: white;
    color: #2dd204;
    font-weight: bold;
    text-align: center;
  }
  .notice-message.hidden {
    display: none !important;
  }
}
