body {
  font-family: Arial, sans-serif;
  margin: 0;
  display: flex;
  flex-direction: column;
  background-color: #cdcacf;
}

.train-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  width: 99vw;
}

.time {
  background-color: #7b8e94;
  color: white;
  padding: 5px 10px;
  margin: 10px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 30px;
}

.details {
  flex-grow: 1;
  margin: 0 100px;
  font-size: 16px;
  color: #728387;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 40px;
  font-weight: bold;
}

.track {
  background-color: #0e1436;
  color: white;
  padding: 5px 10px;
  margin: 10px;
  border-radius: 18px;
  font-weight: bold;
  font-size: 30px;
}
.city {
  font-size: 25px;
  color: #728387;
  padding: 0px 100px;
}

.city input {
  font-size: 20px;
  color: #728387;
  border: 1px solid #728387;
}
.train-item {
  display: flex;
  align-items: center;
  background-color: #0e1436;
  color: white;
  padding: 10px;
  border-radius: 8px;
  margin: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.train-item .logo {
  display: flex;
  align-items: center;
  color: #728387;
}

.train-item .logo img {
  width: 50px;
  height: 50px;
  margin-right: 10px;
  border-radius: 4px;
}
.train-item .logo span {
  width: 11.9vw;
}

.train-item .destination {
  font-weight: bold;
  width: 340px;
}

.destination {
  margin-right: auto;
  font-size: 30px;
}

.train-item .time-info {
  font-size: 25px;
}
.time-info {
  margin-left: auto;
  width: 10vw;
  text-align: right;
}

.time-station {
  font-size: 20px;
  color: #728387;
}

.platform {
  background-color: white;
  color: #0e1436;
  padding: 5px 10px;
  margin-right: 10px;
  margin-top: 10px;
  border-radius: 18px;
  font-weight: bold;
  font-size: 30px;
  text-align: center;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0e1436;
}

.trainContainer {
  display: flex;
  width: 99vw;
  max-width: 99vw;
  justify-content: space-between;
}

.loaderDiv {
  display: flex;
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: white;
}

.loader {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  position: relative;
  animation: rotate 1s linear infinite;
}
.loader::before,
.loader::after {
  content: "";
  box-sizing: border-box;
  position: absolute;
  inset: 0px;
  border-radius: 50%;
  border: 5px solid #fff;
  animation: prixClipFix 8s linear infinite;
}
.loader::after {
  border-color: #ff3d00;
  animation: prixClipFix 8s linear infinite, rotate 0.5s linear infinite reverse;
  inset: 6px;
}

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

@keyframes prixClipFix {
  0% {
    clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);
  }
  25% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);
  }
  50% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);
  }
  75% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);
  }
  100% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);
  }
}

.suggestionContainer {
  display: flex;
  flex-direction: column;
  position: absolute;
  background-color: orange;
  z-index: 1000;
  width: 257.6px;
}

.suggestion {
  border: 1px solid #728387;
  background-color: white;
  color: #728387;
  cursor: pointer;
  font-size: 20px;
  transition: 0.5s;
}

.suggestion:hover {
  background-color: #728387;
  color: white;
  transition: 0.5s;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  width: 300px;
  max-width: 90%;
  padding: 20px;
  text-align: center;
}

.popup-content p {
  font-size: 18px;
  color: #333;
  margin-bottom: 20px;
}

.popup-content button {
  background-color: #0e1436;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin: 0 10px;
  transition: background-color 0.3s;
}

.popup-content button:hover {
  background-color: #728387;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

/* Styles pour les écrans de taille normale (par défaut) */
/* Aucun changement nécessaire, le site conserve son apparence actuelle */

/* Écrans plus petits (tablettes et petits ordinateurs portables, max 1024px) */
@media (max-width: 1024px) {
  .train-info {
    width: 95%;
    margin: auto;
  }

  .details {
    font-size: 30px;
    margin: 0 20px;
    text-align: center;
  }

  .city {
    padding: 0 20px;
  }
}

.dropdown {
  position: relative;
  width: 250px;
}
.dropdown-button {
  width: 100%;
  padding: 10px;
  text-align: left;
  background: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
}
.dropdown-menu {
  position: absolute;
  left: 0;
  width: 100%;
  margin-top: 5px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: none;
  max-height: 150px;
  overflow-y: auto;
  z-index: 1000;
}
.dropdown-menu.active {
  display: block;
}
.dropdown-menu li {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
}
.dropdown-menu li:hover {
  background-color: #f0f0f0;
}
.dropdown-menu input {
  margin-right: 10px;
}

/* Écrans moyens (tablettes, max 768px) */
@media (max-width: 768px) {
  .train-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 5px auto;
    padding: 10px;
  }

  .time,
  .track {
    font-size: 24px;
    margin: 10px 0;
  }
  .track {
    display: none;
  }

  .details {
    font-size: 24px;
  }

  .city {
    padding: 0;
    font-size: 20px;
  }

  .city input {
    width: 90%;
    font-size: 16px;
  }

  .trainContainer {
    padding: 0;
    margin: 0;
  }

  .train-item {
    padding: 10px;
    margin: 5px;
    margin-left: 5px;
  }

  .train-item .time-info {
    font-size: 15px;
    margin-right: 15px;
  }

  .time-station {
    font-size: 13px;
  }

  .destination {
    font-size: 20px;
    margin-right: 10px;
    width: 130px;
  }

  .platform {
    font-size: 20px;
    margin: 10px auto;
  }

  .train-item .logo span {
    font-size: 14px;
    margin-right: 5px;
  }
}

/* Écrans très petits (téléphones, max 480px) */
@media (max-width: 480px) {
  .time {
    font-size: 20px;
  }

  .details {
    font-size: 18px;
  }

  .city {
    font-size: 18px;
  }

  .city input {
    font-size: 14px;
    width: 100%;
  }

  .trainContainer {
    flex-direction: column;
    align-items: center;
  }

  .train-item {
    width: 95%;
    font-size: 16px;
  }

  .destination {
    font-size: 16px;
  }

  .time-info {
    font-size: 14px;
  }

  .platform {
    font-size: 16px;
    width: 93vw;
    margin: 0 10px;
    margin-bottom: 15px;
  }
}
