/* 
* PlanYourDrive - Style général
*/

:root {
  --primary-color: #4a90e2;
  --primary-dark: #3a7bc8;
  --primary-light: #e5f6ff;
  --gray-light: #e0e0e0;
  --gray-medium: #757575;
  --gray-dark: #333333;
  --success-color: #2ecc71;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --warning-light: #e0a800;
  --warning-dark: #d39e00;
  --footer-color: #333333;
  --white: #fff;
  --black: #000;
  --text-light: #777777;
  --text-medium: #444444;
  --background-panel: #f8f9fa;
  --background-white: #ffffff;
  --background-cta: #ffffff;
  --border-light: #ddd;
  --alert-danger-bg: #ffeaea;
  --alert-danger-border: #ffcdd2;
  --alert-danger-text: #e53935;
  --alert-success-bg: #eafaf1;
  --alert-success-border: #d5f5e3;
  --alert-warning-bg: #fff3cd;
  --alert-warning-border: #ffeeba;
  --color-pickup: #4CAF50;
  --color-destination: #F44336;
  --box-shadow-light: 0 2px 5px rgba(0, 0, 0, 0.05);
  --box-shadow-hover: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* --- RESET & BASE --- */
html, body, * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

/* Police de caractères Poppins locale */
@font-face {
  font-family: 'Poppins';
  src: url('../Poppins/Poppins-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('../Poppins/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('../Poppins/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('../Poppins/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('../Poppins/Poppins-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: 'Poppins', sans-serif !important;
  font-size: 16px;
  color: var(--gray-dark);
  background-color: var(--background-panel);
}


/* Style spécifique pour tous les placeholders */
::placeholder {
  font-family: 'Poppins', sans-serif;
  color: var(--text-light);
  opacity: 1;
}

:-ms-input-placeholder {
  font-family: 'Poppins', sans-serif;
  color: var(--text-light);
}

::-ms-input-placeholder {
  font-family: 'Poppins', sans-serif;
  color: var(--text-light);
}

/* Styles pour Flatpickr */
.flatpickr-calendar {
  font-family: 'Poppins', sans-serif !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year,
.numInputWrapper input,
.flatpickr-time input {
  font-family: 'Poppins', sans-serif !important;
}

span.flatpickr-weekday {
  font-family: 'Poppins', sans-serif !important;
}

.flatpickr-day {
  font-family: 'Poppins', sans-serif !important;
}

.flatpickr-time .flatpickr-am-pm {
  font-family: 'Poppins', sans-serif !important;
}

/* Styles spécifiques pour les champs de date flatpickr */
input.flatpickr {
  font-family: 'Poppins', sans-serif !important;
}

input.flatpickr::placeholder {
  font-family: 'Poppins', sans-serif !important;
  color: var(--text-light);
}

/* Pour le date picker flatpickr affiché */
.flatpickr-input.active {
  font-family: 'Poppins', sans-serif !important;
}



/* --- CONTAINER --- */
.site-content {
  padding: 0px;
}

.booking-container {
  background-color: var(--background-white);
  padding: 15px;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

/* --- TYPOGRAPHY --- */
h1 {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 1rem;
  text-align: center;
}

h2 {
  font-size: 22px;
  font-weight: 500;
  color: var(--gray-dark);
  margin-bottom: 20px;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 15px;
  margin-top: 5px;
}

p {
  margin-bottom: 5px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* --- FORMS --- */
.form-group {
  margin-bottom: 15px;
}

/* Styles pour l'auto-remplissage des champs */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--background-white) inset !important;
  -webkit-text-fill-color: var(--text-medium) !important;
  transition: background-color 5000s ease-in-out 0s;
  background-color: var(--background-white) !important;
}

/* Styles pour les sections du formulaire */
.form-section {
  margin-bottom: 25px;
  background-color: var(--background-white);
  border-radius: 10px;
  border: 1px solid var(--gray-light);
  box-shadow: var(--box-shadow-light);
  overflow: hidden;
}

.form-section h3 {
  background-color: var(--background-panel);
  padding: 12px 15px;
  margin: 0;
  font-size: 18px;
  border-bottom: 1px solid var(--gray-light);
  color: var(--gray-dark);
}

.form-section .section-content {
  padding: 15px;
}



.form-section h3 i {
  color: var(--primary-color);
  margin-right: 8px;
}

label {
  display: block;
  margin: 5px 0;
  font-weight: 500;
  color: var(--gray-dark);
}


.form-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

/* --- BUTTONS --- */
.form-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  gap: 10px;
}

/* Nouveau style de bouton moderne */
.btn-modern {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  /* box-shadow: var(--box-shadow-hover); */
  /* text-transform: uppercase; */
  letter-spacing: 0.5px;
  display: inline-block;
  text-align: center;
  min-width: 120px;
}

.btn-modern:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-hover);
  text-decoration: none;
  color: var(--white);
}

.btn-modern:active {
  transform: translateY(0);
}





/* --- MAPS & VISUALS --- */
#map {
  width: 100%;
  height: 300px;
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow-light);
}

/* --- SUMMARIES & RESULTS --- */
.booking-summary {

  padding: 10px;

}

.booking-summary h3 {
  color: var(--gray-dark);
  margin-top: 0;
  margin-bottom: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-light);
}

.booking-summary p {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--text-medium);
  font-size: 15px;
}

.booking-summary span {
  text-align: right;
  color: var(--gray-dark);
  font-weight: 500;
}

/* .booking-summary p:last-child {
  margin-bottom: 0;
  padding-top: 10px;
  border-top: 1px solid var(--gray-light);
  font-weight: 600;
} */

/* #estimateResult {
  background-color: var(--background-panel);
  padding: 20px;
  border-radius: 10px;
  box-shadow: var(--box-shadow-light);
  margin: 20px 0;
} */

/* #estimateResult h3 {
  color: var(--gray-dark);
  margin-top: 0;
  font-weight: 600;
} */

.hidden {
  display: none;
}

#estimateResult .form-section .section-content i {
  color: var(--primary-color);
}

/* Style pour les détails entre parenthèses */
.price_detail_ar {
  font-size: 0.85em;
  color: var(--text-light);
  font-weight: normal;
}

/* --- PAYMENT ELEMENTS --- */
#card-element {
  padding: 12px 15px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--white);
  margin-bottom: 15px;
  box-shadow: var(--box-shadow-light);
}


.payment-methods {
  margin-bottom: 25px;
}

.terms-conditions {
  margin-top: 25px;
}

.terms-conditions label {
  display: inline;
  margin-left: 8px;
}

/* --- CONFIRMATION PAGE --- */
.confirmation-box {
  text-align: center;
  padding: 20px;
}

.confirmation-icon {
  font-size: 60px;
  color: var(--success-color);
  margin: 20px 0;
}

.confirmation-details {
  text-align: left;
  background-color: var(--background-panel);
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  box-shadow: var(--box-shadow-light);
}

/* --- UTILITIES --- */
.text-danger {
  color: var(--danger-color);
}

.text-success {
  color: var(--success-color);
}

.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert-danger {
  background-color: var(--alert-danger-bg);
  color: var(--alert-danger-text);
  border: 1px solid var(--alert-danger-border);
}

.alert-success {
  background-color: var(--alert-success-bg);
  color: var(--success-color);
  border: 1px solid var(--alert-success-border);
}

/* Styles modernes pour les champs avec icônes */
.modern-input .input-with-icon {
  position: relative;
  margin-bottom: 15px;
}

.modern-input .input-with-icon i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 18px;
}

.modern-input .input-with-icon input,
.modern-input .input-with-icon textarea {
  padding-left: 45px;
  height: 50px;
  border-radius: 10px;
  border: 1px solid var(--gray-light);
  box-shadow: var(--box-shadow-light);
  transition: all 0.3s ease;
  font-size: 16px;
  width: 100%;
  color: var(--text-medium);
  background-color: var(--background-white);
}

.modern-input .input-with-icon textarea {
  padding-top: 15px;
  resize: vertical; 
  height: auto;
  min-height: 100px;
}

.modern-input .input-with-icon input::placeholder,
.modern-input .input-with-icon textarea::placeholder {
  color: var(--text-light);
}

.modern-input .input-with-icon input:focus,
.modern-input .input-with-icon textarea:focus{
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow-hover);
  outline: none;
}

/* Couleurs des icônes */
.location-icon.pickup-icon {
  color: var(--color-pickup); /* Vert pour le départ */
}

.location-icon.destination-icon {
  color: var(--color-destination); /* Rouge pour la destination */
}

/* Sélecteur de type de trajet */
.trip-type-selector {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  background: var(--background-panel);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow-light);
}

.trip-option {
  flex: 1;
  text-align: center;
  padding: 5px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.trip-option:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.trip-option.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.hidden-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Modern checkbox and radio styles */
.modern-checkbox,
.modern-radio {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  cursor: pointer;
}

.modern-checkbox input[type="checkbox"],
.modern-radio input[type="radio"] {
  margin-right: 10px;
  margin-left: 5px;
  transform: scale(1.2);
  cursor: pointer;
}

.modern-checkbox label,
.modern-radio label {
  cursor: pointer;
  /* display: flex; */
  align-items: center;
  /* margin-left: 5px; */
  font-weight: normal;
}

.modern-checkbox label i,
.modern-radio label i {
  margin-right: 8px;
  color: var(--text-medium);
  font-size: 16px;
}

/* Nouveau style pour les checkboxes modernes avec icônes */
.modern-input .modern-checkbox {
  height: 50px;
  border-radius: 10px;
  border: 1px solid var(--gray-light);
  box-shadow: var(--box-shadow-light);
  background-color: var(--background-white);
  padding: 0 15px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  width: 100%;
}


.modern-input .modern-checkbox:focus {
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow-hover);
}

/* Style pour le select quand une valeur est sélectionnée */
.modern-input:is([value=""]):not(:invalid) {
  color: var(--gray-dark);
}

.modern-input .modern-checkbox label {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding-left: 30px;
  position: relative;
  font-size: 16px;
  color: var(--text-light);
}

.modern-input .modern-checkbox i {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 18px;
}

.modern-input .modern-checkbox input[type="checkbox"] {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%) scale(1.2);
  margin: 0;
}

/* Style pour le select de véhicule */
.modern-select {
  height: 45px;
  border-radius: 10px;
  border: 1px solid var(--gray-light);
  padding: 0 15px;
  box-shadow: var(--box-shadow-light);
  background-color: var(--background-white);
  font-size: 16px;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 15px;
  color: var(--text-light);

}

/* Style pour l'option par défaut non-sélectionnée */
.modern-select option:first-child {
  color: var(--text-light);
}

/* Style pour les options normales */
.modern-select option:not(:first-child) {
  color: var(--text-medium);
}

/* Style pour le select quand une valeur est sélectionnée */
.modern-select:not([value=""]):not(:invalid) {
  color: var(--text-medium);
}

.modern-select:focus {
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow-hover);
  outline: none;
}

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.form-check-input{
  margin-right: 5px;
}

.form-check-label {
  margin: 0;
  margin-right: 10px;
}

/* --- PAYMENT DETAILS --- */
.payment-details {
  margin: 40px 0;
  padding: 15px;
  border: 1px solid var(--border-light);
  background-color: var(--background-panel);
  border-radius: 10px;
  box-shadow: var(--box-shadow-light);
}

.payment-row {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
}

.amount.paid {
  color: var(--success-color);
}

.amount.remaining {
  color: var(--danger-color);
  font-weight: bold;
}

.payment-notice {
  margin-top: 15px;
  padding: 10px;
  /* background-color: var(--alert-warning-bg); */
  border: 1px solid var(--alert-warning-border);
  border-radius: 6px;
}

.loading {
  text-align: center;
  color: var(--text-light);
  padding: 20px;
}

.error-message {
  color: var(--danger-color);
  text-align: center;
  padding: 10px;
}

.payment-receipt {
  margin-top: 20px;
}

/* --- ICONS --- */
.fas, .far, .fab, .fa {
  vertical-align: middle;
  margin-right: 0.2rem;
}

.alert .fas,
.alert .far,
.alert .fab,
.alert .fa {
  font-size: 1.1em;
}


/* Rotation animation pour les icônes de chargement */
.fa-spin {
  animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.vehicle-infos span.infos {
  padding-left: 12px;
}

.vehicle-note {
  font-size: 0.85em;
  color: var(--text-light);
  font-style: italic;
  padding-top: 6px;
}

.vehicle-note .fa-info-circle {
  color: var(--primary-color);
  font-size: 1.1em;
}

/* --- LANGUAGE SELECTOR --- */
.language-selector {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px;
  z-index: 100;
}

.language-selector .lang-btn {
  min-width: 30px; 
  padding: 4px 4px;
  font-size: 12px;
}

.language-selector .lang-btn.active {
  background-color: var(--gray-medium);
}


/* Styles pour le modal du mode vacances */
#vacationModeModal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  overflow: auto;
}

#vacationModeModal .modal-dialog {
  max-width: 500px;
  margin: 30% auto;
}

#vacationModeModal .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 0.3rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#vacationModeModal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
}

#vacationModeModal .modal-title {
  margin: 0;
  line-height: 1.5;
  font-size: 1.25rem;
  font-weight: 500;
}

#vacationModeModal .close {
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.5;
}

#vacationModeModal .close:hover {
  opacity: 1;
}

#vacationModeModal .modal-body {
  padding: 1rem;
}

#vacationModeModal .modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid #dee2e6;
}

#vacationModeModal .btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  cursor: pointer;
}

#vacationModeModal .btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

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









/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  
  .booking-container {
    padding: 10px;
  }

  .form-section .section-content {
    padding: 10px;
  }
  
  .modern-input .input-with-icon input , .modern-select , .modern-input .modern-checkbox label{
    font-size: 14px;
    height: 45px;
  }

  .btn-modern {
    font-size: 14px;
  }
  
  .form-buttons {
    flex-direction: column-reverse;
    gap: 10px;
  }
  
  .booking-summary p {
    flex-direction: column;
    margin-bottom: 15px;
  }
  
  .booking-summary span {
    text-align: left;
    margin-top: 5px;
  }
  

  h1 {
    font-size: 22px;
    margin-bottom: 15px;
  }

  h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }
}

/* Ajustements pour les très petits écrans */
@media (max-width: 320px) {

  .trip-type-selector {
    flex-direction: column;
  }
  .booking-container {
    padding: 10px;
  }

  h1 {
    font-size: 20px;
  }

  .booking-summary {
    padding: 12px;
  }

  .booking-summary p {
    gap: 2px;
    margin-bottom: 7px;
  }
}
