/**
 * VOYAGE FORM CSS - Styles pour la modale de création de voyage
 * Design moderne et UX-friendly pour desktop
 */

/* ===========================
   MODALE CRÉATION VOYAGE
   =========================== */

.voyage-form-modal {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 16px;
  padding: 0;
}

.voyage-form-modal .modal-dialog {
  max-width: 720px;
  margin: 2rem auto;
}

.voyage-form-modal .modal-header {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  border-radius: 16px 16px 0 0;
  padding: 1.5rem 2rem;
  border: none;
  position: relative;
  overflow: hidden;
}

.voyage-form-modal .modal-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(180deg);
  }
}

.voyage-form-modal .modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
  color: white;
}

.voyage-form-modal .modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  right: 40px;
}

.voyage-form-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.voyage-form-modal .modal-body {
  padding: 1.5rem;
  background: white;
  max-height: calc(90vh - 140px);
  overflow-y: auto;
}

/* ===========================
   FORMULAIRE MODERNE
   =========================== */

.voyage-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* ===========================
   PARTICIPANTS OPTIMISÉS
   =========================== */

.participants-container {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
}

.participants-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #2c3e50;
}

.participants-count {
  background: #3498db;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.participants-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.participant-item {
  display: flex;
  align-items: center;
}

.participant-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.participant-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.participant-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.participant-input.warning {
  border-color: #f39c12;
  background-color: #fef9e7;
}

.btn-remove-participant {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}

.btn-remove-participant:hover {
  background: #fee2e2;
  transform: scale(1.1);
}

.btn-add-participant {
  background: #10b981;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

.btn-add-participant:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* ===========================
   MISE EN PAGE DESKTOP
   =========================== */

@media (min-width: 768px) {
  .voyage-form-modal .modal-body {
    padding: 1.25rem;
    max-height: calc(95vh - 120px);
  }
  
  .voyage-form {
    gap: 0.75rem;
  }
  
  /* Réduire l'espacement des sections */
  .form-section {
    padding: 0.75rem;
  }
  
  .form-section-title {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
  }
  
  .form-group {
    margin-bottom: 0.75rem;
  }
  
  /* Champs côte à côte pour les dates */
  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  
  /* Participants plus compacts sur desktop */
  .participants-container {
    padding: 0.75rem;
  }
  
  .participants-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .btn-add-participant {
    width: auto;
    align-self: flex-start;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  /* Textarea plus compact */
  .textarea {
    min-height: 60px;
  }
}

.form-section {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.form-section:hover {
  border-color: #3498db;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
}

.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1rem;
  position: relative;
}

/* Assurer que l'autocomplétion s'aligne correctement */
.form-group .form-control {
  position: relative;
  z-index: 1;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-label .emoji {
  font-size: 1.1rem;
}

.form-label .required {
  color: #e74c3c;
  font-weight: 700;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: #94a3b8;
  font-style: italic;
}

.form-control.is-invalid {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-control.is-valid {
  border-color: #27ae60;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Styles spécifiques pour les types d'input */
.form-control[type="date"] {
  color: #2c3e50;
}

.form-control[type="number"] {
  text-align: right;
}

.textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.5;
}

/* ===========================
   LAYOUT RESPONSIVE
   =========================== */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row .form-group:last-child {
  margin-bottom: 0;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.form-group-full {
  grid-column: 1 / -1;
}

/* ===========================
   CHECKBOX MODERNE
   =========================== */

.form-checkbox {
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
}

.form-checkbox:hover {
  border-color: #3498db;
  background: #eff6ff;
}

.form-checkbox label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin: 0;
  font-weight: 500;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  position: relative;
  appearance: none;
  transition: all 0.3s ease;
}

.form-checkbox input[type="checkbox"]:checked {
  background: #3498db;
  border-color: #3498db;
}

.form-checkbox input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 12px;
}

.form-checkbox .checkbox-text {
  color: #2c3e50;
  font-size: 0.95rem;
}

.form-checkbox .checkbox-highlight {
  color: #e67e22;
  font-weight: 600;
}

/* ===========================
   BOUTONS D'ACTION
   =========================== */

.modal-footer {
  background: #f8fafc;
  border-radius: 0 0 16px 16px;
  padding: 1.5rem 2rem;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.btn-cancel {
  background: #6c757d;
  color: white;
  border: 2px solid #6c757d;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-cancel:hover {
  background: #5a6268;
  border-color: #5a6268;
  transform: translateY(-1px);
}

.btn-create {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  color: white;
  border: 2px solid #27ae60;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-create:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.btn-create:active {
  transform: translateY(0);
}

.btn-create::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-create:hover::before {
  left: 100%;
}

/* ===========================
   VALIDATION VISUELLE
   =========================== */

.form-feedback {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.form-feedback.invalid {
  color: #e74c3c;
}

.form-feedback.valid {
  color: #27ae60;
}

.form-feedback::before {
  content: '⚠️';
}

.form-feedback.valid::before {
  content: '✅';
}

/* ===========================
   ANIMATIONS ET TRANSITIONS
   =========================== */

.form-group {
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-section {
  animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
  .voyage-form-modal .modal-dialog {
    margin: 0;
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .voyage-form-modal .modal-content {
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    border-radius: 0;
  }

  .voyage-form-modal .modal-header {
    padding: 1rem 1.25rem;
    flex-shrink: 0;
    border-radius: 0;
  }

  .voyage-form-modal .modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
  }

  .voyage-form-modal .modal-close {
    margin-left: -25px;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .voyage-form-modal .modal-body {
    padding: 0.75rem 1.25rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: #f8fafc;
  }

  .voyage-form-modal .modal-footer {
    padding: 1rem 1.25rem;
    flex-shrink: 0;
    flex-direction: column-reverse;
    gap: 0.5rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  }

  /* Layout mobile optimisé */
  .voyage-form {
    gap: 0.75rem;
  }

  .form-section {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .form-section:last-child {
    margin-bottom: 0.5rem;
  }

  .form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
  }

  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .form-row .form-group {
    margin-bottom: 0.75rem;
  }

  .form-row .form-group:last-child {
    margin-bottom: 0;
  }

  .form-group {
    margin-bottom: 0.875rem;
  }

  .form-group:last-child {
    margin-bottom: 0;
  }

  .form-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: #374151;
  }

  .form-control {
    font-size: 16px;
    /* Évite le zoom automatique sur iOS */
    padding: 0.75rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: white;
  }

  .form-control:focus {
    transform: none;
    /* Désactiver l'animation de lift sur mobile */
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
  }

  .textarea {
    min-height: 80px;
    resize: vertical;
  }

  /* Checkbox mobile optimisé */
  .form-checkbox {
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.875rem;
  }

  .form-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 0.9rem;
    min-height: 24px;
  }

  .form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  /* Boutons mobile optimisés */
  .btn-cancel,
  .btn-create {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    min-height: 48px;
    border: none;
  }

  .btn-cancel {
    background: #6b7280;
    color: white;
    margin-bottom: 0;
  }

  .btn-cancel:hover {
    background: #5b6470;
  }

  .btn-create {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
  }

  .btn-create:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  }
}

@media (max-width: 480px) {
  .voyage-form-modal .modal-header {
    padding: 0.875rem 1rem;
  }

  .voyage-form-modal .modal-body {
    padding: 0.625rem 1rem;
  }

  .voyage-form-modal .modal-footer {
    padding: 0.875rem 1rem;
  }

  .voyage-form-modal .modal-title {
    font-size: 1rem;
    line-height: 1.3;
  }

  .voyage-form {
    gap: 0.625rem;
  }

  .form-section {
    padding: 0.875rem;
    margin-bottom: 0.625rem;
  }

  .form-section-title {
    font-size: 0.95rem;
    margin-bottom: 0.625rem;
  }

  .form-group {
    margin-bottom: 0.75rem;
  }

  .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }

  .form-control {
    padding: 0.625rem;
    font-size: 16px;
  }

  .textarea {
    min-height: 70px;
  }

  .form-checkbox {
    padding: 0.75rem;
  }

  .btn-cancel,
  .btn-create {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* ===========================
   ÉTATS DE CHARGEMENT
   =========================== */

.btn-create.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-create.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ===========================
   AUTO-COMPLÉTION
   =========================== */
.autocomplete-items {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 999;
  background: white;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  animation: slideDown 0.2s ease-out;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.autocomplete-item {
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s;
  font-size: 0.9rem;
  background: white;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  display: block;
}

.autocomplete-item:hover {
  background: #f8fafc !important;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item strong {
  color: #3498db;
  font-weight: 600;
}

/* ===========================
   AMÉLIORATIONS UX
   =========================== */

/* Animation de focus sur les inputs */
.form-control:focus {
  animation: focusPulse 0.3s ease-out;
}

@keyframes focusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(52, 152, 219, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
  }
}

/* Indicateur de caractères restants pour les champs avec limite */
.form-group.has-counter {
  position: relative;
}

.form-group.has-counter::after {
  content: attr(data-counter);
  position: absolute;
  bottom: -20px;
  right: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  transition: color 0.3s ease;
}

.form-group.has-counter.near-limit::after {
  color: #f39c12;
}

.form-group.has-counter.at-limit::after {
  color: #e74c3c;
}

/* Amélioration des tooltips pour les labels */
.form-label[title] {
  cursor: help;
  position: relative;
}

.form-label[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 0;
  background: #2c3e50;
  color: white;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  z-index: 1000;
  animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Indicateur de progression du formulaire */
.form-progress {
  position: sticky;
  top: 0;
  background: white;
  padding: 1rem 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1rem;
  z-index: 10;
}

.form-progress-bar {
  width: 100%;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.form-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

.form-progress-text {
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.5rem;
}

/* États de validation améliorés */
.form-control.is-valid {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2327ae60' d='m2.3 6.73.94-.94 2.94 2.94L7.83 7.09 8.77 8.03 5.24 11.56z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.form-control.is-invalid {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.5 5.5 1 1m0-1-1 1'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/* Amélioration de l'accessibilité */
@media (prefers-reduced-motion: reduce) {

  .form-control:focus,
  .autocomplete-items,
  .form-section,
  .form-group {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive amélioré pour très petits écrans */
@media (max-width: 360px) {
  .voyage-form-modal .modal-dialog {
    margin: 0.25rem;
    max-width: calc(100vw - 0.5rem);
  }

  .form-section {
    padding: 0.75rem;
  }

  .form-control {
    font-size: 16px;
    /* Évite le zoom sur iOS */
  }

  .modal-footer {
    padding: 1rem;
  }
}

/* ===========================
   OPTIMISATIONS MOBILE SPÉCIFIQUES
   =========================== */

/* Optimisations mobile avancées */
@media (max-width: 768px) {
  .modal.voyage-form-modal {
    align-items: flex-start;
    padding: 0;
  }

  .voyage-form-modal .modal-dialog {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .voyage-form-modal .modal-content {
    height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .voyage-form-modal .modal-header {
    border-radius: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    padding: 1rem 1.25rem;
  }

  .voyage-form-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 1.25rem 0.5rem;
    background: #f8fafc;
  }

  .voyage-form-modal .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: white;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
  }

  /* Amélioration de l'auto-complétion sur mobile */
  .form-group {
    position: relative;
  }

  .autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    background: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 120px;
    overflow-y: auto;
    font-size: 16px;
    /* Éviter le zoom sur iOS */
    margin: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .autocomplete-item {
    padding: 12px;
    font-size: 16px;
    border-bottom: 1px solid #f3f4f6;
    background: white;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    display: block;
  }

  .autocomplete-item:hover {
    background: #f8fafc !important;
  }

  .autocomplete-item:last-child {
    border-bottom: none;
  }

  /* Feedback de validation mobile */
  .form-feedback {
    font-size: 0.8rem;
    margin-top: 0.25rem;
  }

  /* Amélioration des placeholders */
  .form-control::placeholder {
    color: #9ca3af;
    font-size: 0.9rem;
  }

  /* Optimisation des dates sur mobile */
  .form-control[type="date"] {
    padding: 0.75rem;
    color: #374151;
  }

  .form-control[type="number"] {
    text-align: left;
    /* Alignement à gauche sur mobile */
  }
}

/* Très petits écrans (iPhone SE, etc.) */
@media (max-width: 375px) {
  .voyage-form-modal .modal-header {
    padding: 0.75rem 1rem;
  }

  .voyage-form-modal .modal-body {
    padding: 0.75rem 1rem;
  }

  .voyage-form-modal .modal-footer {
    padding: 0.75rem 1rem;
  }

  .voyage-form-modal .modal-title {
    font-size: 1rem;
  }

  .form-section {
    padding: 0.75rem;
  }

  .form-section-title {
    font-size: 0.95rem;
  }

  .form-label {
    font-size: 0.85rem;
  }

  .form-control {
    padding: 0.625rem;
  }
}

/* Mode paysage sur mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .voyage-form-modal .modal-body {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .form-section {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .form-row {
    gap: 0.75rem;
  }
}

/* Correction pour les claviers virtuels */
@media (max-width: 768px) {
  .voyage-form-modal .modal-content {
    min-height: 100vh;
  }

  /* Quand un input est focus, ajuster la vue */
  .form-control:focus {
    scroll-margin-top: 100px;
  }
}

/* Amélioration de l'accessibilité tactile */
@media (max-width: 768px) {

  .btn-cancel,
  .btn-create {
    min-height: 48px;
    /* Taille minimum recommandée pour le tactile */
    font-weight: 600;
  }

  .form-checkbox label {
    min-height: 48px;
    align-items: center;
  }

  .form-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
  }
}

/* Animation d'ouverture optimisée pour mobile */
@media (max-width: 768px) {
  .modal.voyage-form-modal.modal-show .modal-dialog {
    animation: slideUpMobile 0.3s ease-out;
  }

  @keyframes slideUpMobile {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }
}

/* Correction du problème de viewport sur iOS */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    .voyage-form-modal .modal-dialog {
      height: 100vh;
      height: -webkit-fill-available;
    }

    .voyage-form-modal .modal-content {
      height: 100vh;
      height: -webkit-fill-available;
    }
  }
}