/* Reset de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

header {
  background: linear-gradient(135deg, #333, #222);
  color: #fff;
  padding: 40px 0;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  margin-bottom: 10px;
  animation: fadeInDown 1s ease-out;
}

header p {
  font-size: 1.2rem;
  color: #ccc;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  max-width: 800px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  animation: slideIn 1s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-section {
  position: relative;
  margin-bottom: 20px;
}

#searchInput {
  width: 100%;
  padding: 15px 50px 15px 20px;
  font-size: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#searchInput:focus {
  border-color: #ff6f61;
  box-shadow: 0 0 10px rgba(255, 111, 97, 0.5);
}

#searchInput::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  transition: color 0.3s ease;
}

#searchInput:focus + .search-icon {
  color: #ff6f61;
}

#results {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.result-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  animation: fadeIn 0.5s ease-out;
}

.result-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-item img {
  width: 100px;
  height: auto;
  border-radius: 8px;
  margin-right: 15px;
  transition: transform 0.3s ease;
}

.result-item:hover img {
  transform: scale(1.1);
}

.result-item .details {
  flex: 1;
}

.result-item .details h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.result-item .details p {
  margin: 5px 0 0;
  font-size: 14px;
  color: #bbb;
}

footer {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #333, #222);
  color: #ccc;
  margin-top: 40px;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5);
}

footer p {
  margin: 0;
  font-size: 14px;
}
/* Styles pour le pop-up (modal) */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.5s ease-out;
}

.modal-content {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: slideIn 0.5s ease-out;
}

.modal-image {
  width: 100%;
  max-height: 300px;
  border-radius: 10px;
  margin-bottom: 20px;
  object-fit: cover;
}

.modal h2 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #fff;
}

.modal p {
  font-size: 16px;
  color: #bbb;
  margin: 5px 0;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: #ff6f61;
}

/* Animation pour le modal */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
/* Bouton de bascule */
.toggle-btn {
  background: linear-gradient(135deg, #ff6f61, #ff3e4d);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
  margin-top: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 111, 97, 0.4);
}

/* Page de liste */
.hidden {
  display: none;
}

.list-title {
  text-align: center;
  margin-bottom: 20px;
  font-family: 'Orbitron', sans-serif;
  color: #ff6f61;
}

.engine-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.engine-name {
  font-size: 18px;
  color: #fff;
  margin-bottom: 10px;
  font-weight: bold;
}

.vehicle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.vehicle-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 8px;
  width: calc(50% - 5px);
  transition: transform 0.3s ease;
}

.vehicle-item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.15);
}

.vehicle-item img {
  width: 50px;
  height: 30px;
  border-radius: 4px;
  margin-right: 10px;
  object-fit: cover;
}

.vehicle-name {
  font-size: 14px;
  color: #bbb;
}
/* Transition fluide entre les pages */
#searchPage, #listPage {
  transition: opacity 0.3s ease;
}

.hidden {
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

#listPage:not(.hidden), 
#searchPage:not(.hidden) {
  opacity: 1;
  height: auto;
}
/* Popup de sélection de langue */
.language-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.5s ease-out;
}

.language-popup-content {
  background: #1e1e1e;
  border-radius: 10px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  border: 2px solid #e10600;
  box-shadow: 0 0 20px rgba(225, 6, 0, 0.3);
}

.language-popup h3 {
  color: white;
  text-align: center;
  margin-bottom: 1.5rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
}

.language-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.language-option {
  display: flex;
  align-items: center;
  padding: 0.8rem;
  background: #333;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #444;
}

.language-option:hover {
  background: #444;
  transform: translateY(-3px);
  border-color: #e10600;
}

.language-option img {
  width: 30px;
  height: 20px;
  object-fit: cover;
  margin-right: 10px;
  border: 1px solid #555;
}

.language-option span {
  color: white;
  font-weight: 500;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Cache le popup une fois la langue sélectionnée */
.language-popup.hidden {
  display: none;
}
.language-popup {
  display: none; /* Ajoutez cette ligne */
  position: fixed;
  top: 0;
  left: 0;
  /* ... reste du CSS existant ... */
}