/* ============================================
   BOOKING FORM - ULTRA COMPACT MOBILE
   Styles pour réduire la taille du formulaire
   sur les écrans mobiles
   ============================================ */

/* Tablettes et petits écrans (768px et moins) */
@media (max-width: 768px) {
  .sd-booking-widget {
    padding: 0.75rem;
    margin: 0 auto;
  }

  .sd-booking-body {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .sd-form-field {
    margin-bottom: 0.375rem;
  }

  .sd-form-label {
    font-size: 0.65rem;
    margin-bottom: 0.2rem;
    padding-left: 0;
  }

  .sd-input {
    padding: 0.5rem 0.625rem;
    font-size: 0.8rem;
    min-height: 38px;
  }

  .sd-service-selector {
    gap: 0.25rem;
    margin-bottom: 0.5rem;
  }

  .sd-service-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
  }

  .sd-btn {
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
    min-height: 40px;
  }

  /* Réduire les marges des groupes */
  .sd-form-row {
    gap: 0.5rem;
    margin-bottom: 0.375rem;
  }

  .sd-form-row--2,
  .sd-form-row--3 {
    gap: 0.5rem;
  }

  /* Passagers et bagages plus compacts */

  .sd-luggage-sizes {
    gap: 0.375rem;
  }

  .sd-luggage-btn {
    width: 38px;
    height: 38px;
    padding: 0.375rem;
  }

  /* Véhicules plus compacts */
  .sd-vehicle-card {
    padding: 0.5rem 0.55rem;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
  }

  .sd-vehicle-image {
    width: 52px;
    height: 34px;
  }

  .sd-vehicle-name {
    font-size: 0.72rem;
    margin-bottom: 0.1rem;
  }

  .sd-vehicle-details {
    font-size: 0.58rem;
  }

  .sd-vehicle-price {
    font-size: 0.78rem;
  }

  /* Checkbox plus compact */
  .sd-checkbox-wrapper {
    padding: 0.375rem 0;
  }

  .sd-checkbox-label {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  .sd-checkbox-custom {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  /* Prix et total */
  .sd-price-display {
    padding: 0.625rem;
    margin: 0.5rem 0;
  }

  .sd-price-label {
    font-size: 0.7rem;
  }

  .sd-price-value {
    font-size: 1.25rem;
  }

  /* Steps header */
  .sd-step-header {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .sd-step-title {
    font-size: 0.85rem;
  }

  /* Champs optionnels */
  .sd-optional-field {
    padding: 0.5rem;
    margin-bottom: 0.375rem;
  }

  /* Notices et avertissements */
  .sd-waiting-notice {
    padding: 0.5rem;
    font-size: 0.65rem;
    margin: 0.375rem 0;
  }

  /* Durée mise à disposition */
  .sd-duration-inputs {
    gap: 0.375rem;
  }

  .sd-duration-input {
    padding: 0.375rem 0.5rem;
  }

  .sd-duration-input input {
    font-size: 1rem;
    width: 45px;
  }

  .sd-duration-label {
    font-size: 0.7rem;
  }
}

/* Mobiles standard (480px et moins) */
@media (max-width: 480px) {

  .sd-booking-widget {
    padding: 0.625rem;
    border-radius: 12px;
  }

  .sd-booking-body {
    padding: 0.375rem;
  }

  .sd-form-field {
    margin-bottom: 0.25rem;
  }

  .sd-form-label {
    font-size: 0.6rem;
    margin-bottom: 0.15rem;
  }

  .sd-input {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    min-height: 34px;
    border-radius: 6px;
  }

  .sd-service-selector {
    gap: 0.2rem;
    padding: 0.25rem;
    margin-bottom: 0.375rem;
  }

  .sd-service-tab {
    padding: 0.4rem 0.5rem;
    font-size: 0.6rem;
    border-radius: 6px;
  }

  .sd-service-tab svg {
    width: 12px;
    height: 12px;
  }

  .sd-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-height: 36px;
    border-radius: 8px;
  }

  .sd-btn svg {
    width: 14px;
    height: 14px;
  }

  .sd-form-row,
  .sd-form-row--2,
  .sd-form-row--3 {
    gap: 0.375rem;
    margin-bottom: 0.25rem;
  }

  /* 2 colonnes sur mobile au lieu d'une seule pour certains champs */
  .sd-form-row--2 {
    grid-template-columns: 1fr 1fr;
  }

  .sd-form-row--3 {
    grid-template-columns: 1fr;
  }

  /* Passagers/bagages compacts */

  .sd-luggage-sizes {
    gap: 0.25rem;
    justify-content: center;
  }

  .sd-luggage-btn {
    width: 32px;
    height: 32px;
    padding: 0.25rem;
  }

  .sd-luggage-btn svg {
    width: 16px;
    height: 16px;
  }

  /* Véhicules ultra compacts */
  .sd-vehicles-grid {
    gap: 0.4rem;
  }

  .sd-vehicle-card {
    padding: 0.45rem 0.5rem;
    gap: 0.4rem;
    border-radius: 8px;
  }

  .sd-vehicle-icon {
    width: 46px;
    height: 32px;
  }

  .sd-vehicle-image {
    width: 46px;
    height: 32px;
  }

  .sd-vehicle-name {
    font-size: 0.68rem;
  }

  .sd-vehicle-details {
    font-size: 0.6rem;
    gap: 0.2rem;
  }

  .sd-vehicle-details span {
    padding: 0.1rem 0.25rem;
  }

  .sd-vehicle-price {
    font-size: 0.85rem;
  }

  /* Checkbox compact */
  .sd-checkbox-wrapper {
    padding: 0.25rem 0;
    gap: 0.375rem;
  }

  .sd-checkbox-label {
    font-size: 0.65rem;
    line-height: 1.25;
  }

  .sd-checkbox-custom {
    width: 16px;
    height: 16px;
    border-radius: 3px;
  }

  /* Prix compact */
  .sd-price-display {
    padding: 0.5rem;
    margin: 0.375rem 0;
    border-radius: 8px;
  }

  .sd-price-label {
    font-size: 0.65rem;
  }

  .sd-price-value {
    font-size: 1.1rem;
  }

  /* Step header compact */
  .sd-step-header {
    padding: 0.375rem;
    margin-bottom: 0.375rem;
  }

  .sd-step-title {
    font-size: 0.75rem;
  }

  /* Navigation entre étapes */

  /* Champs optionnels */
  .sd-optional-field {
    padding: 0.375rem;
    border-radius: 6px;
  }

  .sd-return-field,
  #sdFlightTrainField {
    margin-top: 0.25rem;
  }

  /* Notices compact */
  .sd-waiting-notice {
    padding: 0.375rem;
    font-size: 0.6rem;
    border-radius: 6px;
  }

  .sd-waiting-notice svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  /* Durée compact */
  .sd-duration-inputs {
    flex-direction: column;
    gap: 0.25rem;
  }

  .sd-duration-input {
    padding: 0.25rem 0.375rem;
  }

  .sd-duration-input input {
    font-size: 0.9rem;
    width: 40px;
  }

  .sd-duration-label {
    font-size: 0.6rem;
  }

  /* Form hint */
  .sd-form-hint {
    font-size: 0.55rem;
    margin-top: 0.15rem;
  }

  /* Gender buttons compact */
  .sd-gender-selector {
    gap: 0.25rem;
  }

  .sd-gender-btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.65rem;
    border-radius: 6px;
  }

  /* Transport type compact */

  .sd-transport-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.6rem;
    gap: 0.25rem;
  }

  .sd-transport-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* Petits mobiles (375px et moins) */
@media (max-width: 375px) {

  .sd-booking-widget {
    padding: 0.5rem;
    border-radius: 10px;
  }

  .sd-booking-body {
    padding: 0.25rem;
  }

  .sd-form-label {
    font-size: 0.55rem;
  }

  .sd-input {
    padding: 0.35rem 0.4rem;
    font-size: 0.7rem;
    min-height: 32px;
  }

  .sd-service-tab {
    padding: 0.35rem 0.4rem;
    font-size: 0.55rem;
  }

  .sd-btn {
    padding: 0.45rem 0.625rem;
    font-size: 0.7rem;
    min-height: 34px;
  }

  /* Date et heure sur 2 colonnes */
  .sd-form-row--2 {
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
  }

  /* Passagers/bagages en ligne */

  .sd-luggage-btn {
    width: 28px;
    height: 28px;
  }

  .sd-luggage-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Véhicules très compacts */
  .sd-vehicle-card {
    padding: 0.4rem 0.45rem;
    gap: 0.35rem;
    border-radius: 7px;
  }

  .sd-vehicle-icon {
    width: 40px;
    height: 28px;
  }

  .sd-vehicle-image {
    width: 40px;
    height: 28px;
  }

  .sd-vehicle-name {
    font-size: 0.63rem;
  }

  .sd-vehicle-details {
    font-size: 0.5rem;
  }

  .sd-vehicle-price {
    font-size: 0.65rem;
  }

  .sd-checkbox-label {
    font-size: 0.6rem;
  }

  .sd-checkbox-custom {
    width: 15px;
    height: 15px;
  }

  .sd-price-display {
    padding: 0.375rem;
  }

  .sd-price-value {
    font-size: 1rem;
  }

  .sd-step-title {
    font-size: 0.7rem;
  }

  .sd-waiting-notice {
    padding: 0.3rem;
    font-size: 0.55rem;
  }
}

/* Très petits écrans (moins de 320px) */
@media (max-width: 319px) {

  .sd-booking-widget {
    padding: 0.375rem;
    border-radius: 8px;
  }

  .sd-form-label {
    font-size: 0.5rem;
  }

  .sd-input {
    padding: 0.3rem 0.35rem;
    font-size: 0.65rem;
    min-height: 30px;
  }

  .sd-service-tab {
    font-size: 0.5rem;
    padding: 0.3rem;
  }

  .sd-btn {
    font-size: 0.65rem;
    padding: 0.4rem 0.5rem;
    min-height: 32px;
  }

  .sd-vehicle-card {
    padding: 0.35rem 0.4rem;
    border-radius: 6px;
  }

  .sd-vehicle-icon {
    width: 36px;
    height: 24px;
  }

  .sd-vehicle-image {
    width: 36px;
    height: 24px;
  }

  .sd-vehicle-name {
    font-size: 0.58rem;
  }

  .sd-vehicle-price {
    font-size: 0.6rem;
  }

  .sd-price-value {
    font-size: 0.95rem;
  }
}

/* ============================================
   OPTIMISATIONS TACTILES
   Améliorer l'expérience au doigt
   ============================================ */

@media (max-width: 768px) {
  /* Zone de tap minimale de 44px recommandée par Apple */
  .sd-btn,
  .sd-service-tab,
  .sd-vehicle-card,
  .sd-checkbox-wrapper,
  .sd-luggage-btn,
  .sd-gender-btn,
  .sd-transport-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Inputs plus grands pour le toucher */
  .sd-input {
    touch-action: manipulation;
  }

  /* Espacement entre éléments cliquables */
  .sd-vehicles-grid .sd-vehicle-card {
    margin-bottom: 0.25rem;
  }

  /* Boutons de navigation espacés */

  /* Zone de checkbox plus grande */
  .sd-checkbox-wrapper {
    min-height: 36px;
    display: flex;
    align-items: center;
  }

  /* Améliorer le scroll sur les listes longues */
  .sd-vehicles-grid {
    max-height: none;
    overflow-y: visible;
  }
}

/* ============================================
   MODE PAYSAGE MOBILE
   ============================================ */

@media (max-height: 500px) and (orientation: landscape) {

  .sd-booking-widget {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .sd-booking-body {
    padding: 0.375rem;
  }

  .sd-form-field {
    margin-bottom: 0.25rem;
  }

  .sd-vehicle-card {
    padding: 0.35rem 0.4rem;
  }

  .sd-step-header {
    padding: 0.25rem;
  }
}
