* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f4f9;
  color: #222;
  line-height: 1.6;
}

/* HEADER */
header {
  background: linear-gradient(90deg, #0f172a, #1e293b);
  padding: 20px 0;
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  font-size: 20px;
  font-weight: bold;
}

nav {
  display: flex;
  gap: 10px;
}

nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 15px;
  transition: all 0.3s ease;
}

nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

nav a.active {
  color: white;
  background: rgba(255, 255, 255, 0.2);
}

/* BARRE DE RECHERCHE */
.search-bar {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.search-bar form {
  display: flex;
  gap: 10px;
  max-width: 600px;
}

.search-bar input[type="text"] {
  flex: 1;
  padding: 12px 15px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  transition: all 0.3s ease;
}

.search-bar input[type="text"]:focus {
  outline: none;
  background: white;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.3);
}

.search-bar button {
  padding: 12px 24px;
  background: #06b6d4;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-bar button:hover {
  background: #0891b2;
  transform: translateY(-2px);
}

/* CONTAINER */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 25px;
}

/* TITLE SECTION */
.timeline-title {
  text-align: center;
  margin: 30px 0 20px;
}

.timeline-title h1 {
  font-size: 32px;
  color: #0f172a;
  margin-bottom: 10px;
}

.timeline-title .subtitle {
  color: #64748b;
  font-size: 16px;
}

/* BUTTONS */
.buttons,
.bottom-buttons {
  display: flex;
  justify-content: space-between;
  margin: 25px 0;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 20px;
  background: #06b6d4;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(6, 182, 212, 0.3);
}

.btn:hover {
  background: #0891b2;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(6, 182, 212, 0.4);
}

/* TIMELINE */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 40px auto;
}

.generation-title {
  text-align: center;
  font-size: 24px;
  color: #0f172a;
  margin: 50px 0 30px;
  padding: 15px;
  background: linear-gradient(90deg, #e0f2fe, #dbeafe);
  border-radius: 10px;
  border-left: 5px solid #06b6d4;
  grid-column: 1 / -1;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.timeline-item {
  width: 100%;
}

/* FLIP CARDS */
.flip-card {
  width: 100%;
  height: 340px;
  perspective: 1200px;
  cursor: pointer;
}

.flip-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  position: relative;
}

.flip-card:hover .flip-inner {
  transform: rotateY(5deg);
}

.flip-card.flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-card:focus {
  outline: 3px solid #06b6d4;
  border-radius: 12px;
}

.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.flip-front {
  background: white;
  display: flex;
  flex-direction: column;
}

.flip-front img {
  width: 100%;
  height: 70%;
  object-fit: cover;
  border-bottom: 3px solid #06b6d4;
}

.flip-front h3 {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 15px;
  font-size: 18px;
  color: #0f172a;
  background: white;
}

.flip-back {
  transform: rotateY(180deg);
  padding: 25px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.flip-back p {
  font-size: 15px;
  line-height: 1.6;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 14px;
  margin-top: 40px;
  border-top: 1px solid #e2e8f0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline-title h1 {
    font-size: 26px;
  }

  .generation-title {
    font-size: 20px;
  }

  .flip-card {
    height: 320px;
  }

  .brand {
    font-size: 16px;
  }

  nav {
    margin-top: 10px;
  }

  nav a {
    font-size: 14px;
    padding: 6px 10px;
  }

  .buttons,
  .bottom-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .search-bar form {
    flex-direction: column;
  }

  .search-bar button {
    width: 100%;
  }
}