/* ----- Configuration sections page ----- */
.navbar {
  position: relative;
}
section {
  min-height: 100vh;
  width: 100%;
  display: flex;
}
#sec-1 {
  background-color: var(--blanc);
  background-size: cover;
  color: var(--noir);
  justify-content: center;
  padding: 2rem 0rem;
}
.sec1-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.error-message,
.text-red-800 {
  color: #df0404;
}

.cadre-menu {
  width: 100%;
  height: max-content;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bg-white {
  background-color: var(--bleuc);
  border-radius: 40px;
}
.text-blue-600 {
  color: var(--bleuf);
}
.arrow {
  position: relative;
  padding: 0rem 2.5rem;
  top: -3px;
  transform: translate(-50%, -50%);
  transform: rotate(-90deg);
}
.arrow span {
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  border-bottom: 5px solid var(--bleuf);
  border-right: 5px solid var(--bleuf);
  transform: rotate(45deg);
  margin: -10px;
  animation: animate 2s infinite;
}
.arrow span:nth-child(2) {
  animation-delay: -0.2s;
}
.arrow span:nth-child(3) {
  animation-delay: -0.4s;
}
@keyframes animate {
  0% {
    opacity: 0;
    transform: rotate(45deg) translate(-20px, -20px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translate(20px, 20px);
  }
}

.cadre {
  width: 90vw;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  border-radius: 1.5625rem;
  position: relative;
  gap: 0.8rem;
}
.cadre-ct {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 63rem;
}
.cadre-ville {
  height: max-content;
  padding: 2rem;
  background-color: #f4f4f4;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cadre-list {
  display: flex;
  flex-direction: row;
  width: 100%;
  flex-wrap: wrap;
  gap: 1rem;
}
.cadre-listh {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex-wrap: wrap;
  gap: 1rem;
}
.cadre-list-ville {
  display: flex;
  width: 10.4375rem;
  height: 3.6875rem;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
  border-radius: 0.625rem;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
}
.cadre-list-ville img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cadre-list-ville-v {
  display: flex;
  position: absolute;
  color: var(--blanc);
  text-align: center;
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.5);
  font-family: "Product Sans", sans-serif;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}
.radio-ville {
  width: 10.4375rem;
  height: 3.6875rem;
  border-radius: 0.625rem;
  position: absolute;
  z-index: 3;
  background: transparent;
  border: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
  top: 0;
  left: 0;
}
.radio-ville:checked {
  width: 10.4375rem;
  height: 3.6875rem;
  border-radius: 0.625rem;
  position: absolute;
  z-index: 3;
  background: transparent;
  border: 3px solid var(--bleuf);
  top: 0;
  left: 0;
}

.cadre-recap {
      display: flex-end;
      width: 23rem;
      height: 100%;
      flex-direction: column-reverse;
      justify-content: center;
}
.cadre-recap hr {
  border-top: 2px solid var(--bleuf);
}
.cadre-recap-ct {
  background: var(--bleuc);
  border-radius: 0.625rem;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  width: inherit;
  gap: 1rem;
}
.cadre-recap-ct h2 {
  color: var(--noir);
  font-family: "Product Sans", sans-serif;
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}
.cadre-recap-ct h3 {
  color: var(--noir);
  font-family: "Product Sans", sans-serif;
  font-size: 1rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}
.cadre-recap-ct-gp {
  display: flex;
  flex-direction: column;
}
.cadre-recap-ct-gp-txt {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.cadre-recap-ct-bt {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
}
.cadre-recap-ct-bt-ann {
  background-color: var(--blanc);
  color: #df0404;
}
.cadre-recap-ct-bt-sui {
  background-color: var(--bleuf);
  color: var(--blanc);
}

/* STEPS 2 */
.cadre-list-boxt {
  display: flex;
  width: 12.5rem;
  /*height: 8.25rem;*/
  padding: 1.375rem 2.375rem 1.40625rem 2.3125rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.34375rem;
  flex-shrink: 0;
  border-radius: 0.625rem;
  background: var(--blanc);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}
.cadre-list-boxt-txt {
  display: flex;
  flex-direction: column;
}
.cadre-list-boxt-txt-ty {
  color: var(--noir);
  text-align: center;
  font-family: "Product Sans", sans-serif;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}
.cadre-list-boxt-txt-ta {
  color: var(--noir);
  text-align: center;
  font-family: "Product Sans", sans-serif;
  font-size: 0.9375rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}
.cadre-list-boxt-qua {
  display: flex;
  flex-direction: row;
}
.card-produit {
  border: 1px solid #ccc;
  padding: 10px;
}
.quantite {
  display: flex;
  align-items: center;
}
.quantite-value {
  width: 20px;
  text-align: center;
}
.border-gray-300 {
  --tw-border-opacity: 0;
}
.hover\:bg-gray-200:hover {
  border-radius: 30px;
}
.focus\:ring-gray-100:focus {
  --tw-border-opacity: 0;
}

.cadre-recap-ct-gp-txt-total {
  color: #000;
  font-family: "Product Sans", sans-serif;
  font-size: 1rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

/* STEPS 3 */
.cadre-list-boxh {
  display: flex;
  width: 100%;
  /*height: 8.25rem;*/
  flex-direction: row;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0.625rem;
  background: var(--blanc);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
}
.radio-trajet {
  width: 100%;
  height: 100%;
  border-radius: 0.625rem;
  position: absolute;
  z-index: 3;
  background: transparent;
  border: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
  top: 0;
  left: 0;
}
.radio-trajet:checked {
  width: 100%;
  height: 100%;
  border-radius: 0.625rem;
  position: absolute;
  z-index: 3;
  background: transparent;
  border: 3px solid var(--bleuf);
  top: 0;
  left: 0;
}
.cadre-list-boxh-heure {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 10rem;
  background-color: var(--bleuc);
  padding: 1.375rem 2.375rem 1.40625rem 2.3125rem;
}
.cadre-list-boxh-txt {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1.375rem 2.375rem 1.40625rem 2.3125rem;
}
.cadre-list-boxh-txt-dur {
  display: flex;
  flex-direction: row;
}

/* STEPS 4 */
.form-info1 {
  display: flex;
  gap: 1rem;
}
.relative {
  width: -webkit-fill-available;
}

/* ----- Media Queries for Responsive Design ----- */

/* Large tablets and small desktops */
@media screen and (max-width: 1700px) {
  .cadre {
    width: 95vw;
    flex-direction: column;
    gap: 1.5rem;
  }

  .cadre-ct {
    width: 100%;
  }

  .cadre-recap {
    width: 100%;
  }

  /* Amélioration de la navigation */
  .cadre-menu {
    padding: 0.5rem;
  }

  /* Meilleure gestion des images */
  .cadre-list-ville img {
    height: 100%;
    object-position: center;
  }
}

/* Tablets */
@media screen and (max-width: 768px) {
  .cadre-menu ol {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .cadre-menu li {
    width: 100%;
    justify-content: center;
  }

  .cadre-menu svg {
    display: none;
  }

  .cadre-list {
    justify-content: center;
  }

  .cadre-list-ville {
    width: calc(50% - 0.5rem);
  }

  .cadre-list-boxt {
    width: calc(50% - 0.5rem);
  }

  .form-info1 {
    flex-direction: column;
  }

  .cadre-recap-ct-bt {
    flex-direction: column;
  }

  .cadre-recap-ct-bt button {
    width: 100%;
  }

  /* Amélioration de la lisibilité */
  .cadre-ville p {
    text-align: center;
    font-size: 1rem;
  }

  /* Meilleure adaptation des boîtes de sélection */
  .cadre-list-boxt {
    padding: 1rem;
  }

  .cadre-list-boxh {
    margin: 0 0.5rem;
  }

  /* Ajustement des inputs */
  .relative input {
    font-size: 1rem;
    padding: 0.75rem;
  }

  /* Configuration du récapitulatif */
  .cadre-recap {
    position: fixed;
    top: 93%;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 85vh;
    background: transparent;
    z-index: 1000;
    /* Position initiale : montrer juste le haut du récap */
    transform: translateY(calc(100% - 5rem));
    transition: transform 0.3s ease-in-out;
    touch-action: pan-y;
    user-select: none;
  }

  /* Style du contenu */
  .cadre-recap-ct {
    background: var(--bleuc);
    width: 100%;
    height: auto;
    min-height: 12rem;
    padding: 3.5rem 1rem 1rem 1rem;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    margin: 0;
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Poignée du slider */
  .cadre-recap-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3rem;
    background: var(--blanc);
    border-radius: 1.25rem 1.25rem 0 0;
    cursor: grab;
    z-index: 1001;
  }

  /* Indicateur visuel pour le slide */
  .cadre-recap-handle::after {
    content: '';
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3.5rem;
    height: 0.25rem;
    background: var(--bleuc);
    border-radius: 1rem;
    transition: background-color 0.2s;
  }

  /* Style quand on attrape la poignée */
  .cadre-recap.dragging .cadre-recap-handle::after {
    background: var(--bleuf);
  }

  /* Animation pendant le slide */
  .cadre-recap.animating {
    transition: transform 0.3s ease-in-out;
  }

  /* État ouvert du récap */
  .cadre-recap.open {
    transform: translateY(15vh); /* Laisse un peu d'espace en haut */
  }

  /* Ajustement du footer */
  #footer {
    margin-bottom: 5rem;
  }
}

/* Mobile phones */
@media screen and (max-width: 480px) {
  section {
    padding: 1rem;
  }

  .cadre-ville {
    padding: 1rem;
  }

  .cadre-list-ville {
    width: 100%;
  }

  .cadre-list-boxt {
    width: 100%;
  }

  .cadre-list-boxh {
    flex-direction: column;
  }

  .cadre-list-boxh-heure {
    width: 100%;
    padding: 1rem;
  }

  .cadre-list-boxh-txt {
    padding: 1rem;
  }

  .cadre-recap-ct {
    padding: 3rem 1rem 1rem 1rem;
    min-height: 10rem;
  }

  .cadre-recap-ct-gp-txt {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  /* Amélioration de la navigation entre étapes */
  .cadre-menu ol {
    font-size: 0.8rem;
  }

  .cadre-menu span {
    width: 1.5rem;
    height: 1.5rem;
  }

  /* Optimisation des sélections */
  .cadre-list-ville {
    height: 3rem;
  }

  .cadre-list-boxt-txt-ty {
    font-size: 0.8rem;
  }

  .cadre-list-boxt-txt-ta {
    font-size: 0.85rem;
  }

  /* Amélioration des horaires */
  .cadre-list-boxh-heure {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Optimisation des formulaires */
  .form-info1 input {
    font-size: 0.9rem;
  }

  /* Ajustement des boutons */
  .cadre-recap-ct-bt button {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  /* Amélioration de la lisibilité du récapitulatif */
  .cadre-recap-ct-gp {
    gap: 0.5rem;
  }

  /* Optimisation des zones de clic pour les boutons radio */
  .radio-ville:checked, .radio-trajet:checked {
    border-width: 2px;
  }

  .cadre-recap::before {
    width: 2.5rem;
  }

  .cadre-recap-ct {
    padding-top: 2rem;
  }

  .cadre-recap-handle {
    height: 2.5rem;
  }

  .cadre-recap-handle::after {
    top: 0.75rem;
    width: 2.5rem;
  }
}

/* Fix for arrow animation on mobile */
@media screen and (max-width: 768px) {
  .arrow {
    display: none;
  }
  .radio-ville:checked {
    width: 100%;
  }
}

/* Adjust font sizes for better readability on mobile */
@media screen and (max-width: 480px) {
  .cadre-list-ville-v {
    font-size: 0.75rem;
  }

  .cadre-recap-ct h2 {
    font-size: 1rem;
  }

  .cadre-recap-ct h3 {
    font-size: 0.875rem;
  }

  .cadre-recap-ct-gp-txt-total {
    font-size: 0.875rem;
  }
  .radio-ville:checked {
    width: 100%;
  }
}

/* Très petits écrans */
@media screen and (max-width: 320px) {
  .cadre {
    padding: 0.5rem;
  }

  .cadre-ville {
    padding: 0.5rem;
  }

  .cadre-list-ville-v {
    font-size: 0.7rem;
  }

  .cadre-recap-ct {
    padding: 0.75rem;
  }

  .cadre-recap-ct h2 {
    font-size: 0.9rem;
  }

  .cadre-recap-ct-gp-txt {
    font-size: 0.8rem;
  }

  /* Ajustement des boutons radio pour les très petits écrans */
  .radio-ville:checked, .radio-trajet:checked {
    border-width: 1.5px;
  }
  .radio-ville:checked {
    width: 100%;
  }

  .cadre-list-ville:has(.radio-ville:checked),
  .cadre-list-boxh:has(.radio-trajet:checked) {
    box-shadow: 0 0 0 1.5px var(--bleuf);
  }
}
