:root {
  --blue: #1e88e5;
  --blue-dark: #0d47a1;
  --blue-light: #e3f2fd;
  --white: #ffffff;
  --gray: #6b7280;
  --shadow: 0 0 25px rgba(0,0,0,0.1);
  --yellow: #f9a825;
  --green: #2e7d32;
  --orange: #ef6c00;
  --purple: #5e35b1;
}

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

body {
  font-family: "Inter", sans-serif;
  background: #f5f9ff;
  color: #1f2937;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ================= NAVBAR ================= */

.nav-container {
  background-color: #285aaa;
  color: var(--white);
  padding: 24px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
}

.brand img {
  width: 64px;
  height: px;
  border-radius: 50%;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px
}

nav a {
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}

nav a:hover {
  color: #7dc4ff;
}

nav a.card {
  display: flex;
  align-items: center;
  padding: 2px 6px;
  background-color: #fff;
  border-radius: 8px;
}

nav a.card img {
  max-height: 25px;
}

nav a.card:hover {
  background-color: #ededed;
}

/* ================= HERO ================= */
.hero {
  height: 380px;
  background: linear-gradient(to bottom, #0d48a1e6, #1e88e5b3), url("https://images.unsplash.com/photo-1501630834273-4b5604d2ee31") center/cover no-repeat;
  position: relative;
  margin-bottom: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}

.hero.small { height: 180px }

.hero h1 {
  font-size: 42px;
  margin-bottom: 12px;
  animation: fadeInDown 1s ease forwards;
}
.hero.small h1 { font-size: 36px; }

.hero p {
  font-size: 18px;
  opacity: 0.95;
  animation: fadeInUp 1s ease forwards;
}
.hero.small p { font-size: 16px; }

/* ================= SECTIONS ================= */
section { padding: 70px 24px; max-width: 1200px; margin: auto; }
section h2 { font-size: 32px; margin-bottom: 40px; text-align: center; }
section.light { background: var(--blue-light); border-radius: 20px; padding: 16px 24px; }

/* ================= SLIDESHOW ================= */

#slideshow {
  display: flex;
  gap: 40px;
  align-items: center;
  width: 100%;
  margin: auto;
  justify-content: center;
}

.table {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 20px 0;
  border-radius: 12px;
  background-color: var(--blue-light);
  color: black;
  box-shadow: var(--shadow);
}

.table li {
  padding: 12px 20px;
  font-size: 16px;
  width: 100%;
  transition-duration: 0.1s;
  background-color: #ecf7ff;
}

.slideSelector.selected {
  background-color: #90caf9;
}

.table li:hover {
  background-color: #bbdefb;
  cursor: pointer;
}

/* Slideshow container */
.slideshow-container {
  max-width: 700px;
  position: relative;
  margin: auto;
}

/* Hide the images by default */
.slide {
  display: none;
  box-shadow: var(--shadow);
  border-radius: 12px;
}

.slide img { width: 100%; }

/* Next & previous buttons */
.prev, .next {
  cursor: pointer;
  position: absolute;
  bottom: 10px;
  left: 5px;
  width: 50px;
  height: 50px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 50%;
  user-select: none;
  text-align: center;
  align-content: center;
  background-color: #00000030;
}

/* Position the "next button" to the right */
.next {
  left: unset;
  right: 5px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
  background-color: #000000cc;
}

/* Caption text */
.text {
  color: #f2f2f2;
  font-size: 14px;
  position: absolute;
  top: 42px;
  left: 42px;
  width: 225px;
  max-height: calc(100% - 84px);
  overflow-y: auto;
  text-align: left;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 12px;
  background-color: #333333ab;
  border-radius: 8px;
}

.text h1 {
  font-size: 22px;
  margin-bottom: 8px;
}

.text::-webkit-scrollbar {
  display: none;
}


.active {
  background-color: #717171;
}

/* Fading animation */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

/*  TEAM GRID  */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

/*  MEMBER CARD  */
.member-card {
  background: var(--white);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.member-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 16px 30px rgba(0,0,0,0.15);
  transform: scale(1.08)
}

.member-card img {
  width: 100%;
  max-width: 120px;
  border-radius: 50%;
  margin-bottom: 12px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.member-card:hover img { transform: scale(1.05) rotate(-3deg); }

.member-card h3 { font-size: 18px; margin-bottom: 6px; }

/* ROLE BADGE */
.role {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 25px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* WEATHER TAG */
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.sunny { background: #fff8e1; color: var(--yellow); }
.cloudy { background: #eceff1; color: #546e7a; }
.rain { background: #bbdefb; color: var(--blue); }
.storm { background: #ede7f6; color: var(--purple); }
.wind { background: #ffe0b2; color: var(--orange); }
.clear { background: #e8f5e9; color: var(--green); }

/*  ROLES GRID  */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.role-card {
  background: var(--white);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.role-card:hover {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 0 20px 35px rgba(0,0,0,0.18);
}

.role-card h3 { font-size: 20px; margin-bottom: 10px; }
.role-card p { color: var(--gray); }

/*  FOOTER  */
footer {
  height: 200px;
  background: linear-gradient(to bottom, #1e88e5b3, #0d48a1e6), url("https://images.unsplash.com/photo-1501630834273-4b5604d2ee31") center/cover no-repeat;
  color: var(--white);
  text-align: center;
  padding-top: 30px;
  padding-bottom: 20px;
  margin-top: 60px;
  font-size: 14px;
  border-radius: 12px 12px 0 0;
}

.logos {
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: space-evenly;
  flex-shrink: 0;
  background-color: transparent;
}

.circle {
  border-radius: 50%;
}

.logos img {
  max-height: 100px;
}

.copyright {
  margin-top: 25px;
}

/*  MODAL  */
.member-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 16px;
}

.member-modal.active { display: flex; }

.member-modal-content {
  background: var(--white);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 24px;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow);
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.member-modal-content img {
  width: 120px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.member-modal-content h3 { font-size: 20px; margin-bottom: 6px; }
.modal-role { font-weight: 600; margin-bottom: 6px; }
.modal-3words { font-style: italic; margin-bottom: 12px; }
.modal-info p { margin-bottom: 6px; text-align: left; }
.modal-desc { margin-top: 12px; }
blockquote { font-style: italic; color: var(--gray); margin-top: 12px; }

/*  TIMELINE  */
.timeline {
  position: relative;
  margin: 40px 0;
  padding-left: 40px;
  border-left: 3px solid var(--blue-light);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease, transform 0.3s ease, height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

/* Animation d'entrée */
.timeline-item.animate-in {
  opacity: 0;
  transform: translateX(-50px);
  animation: slideIn 0.8s ease forwards;
}

/* État masqué pour filtre */
.timeline-item.hidden {
  opacity: 0;
  transform: translateX(-30px);
  pointer-events: none;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Delays animation */
.timeline-item.animate-in:nth-child(1) { animation-delay: 0.1s; }
.timeline-item.animate-in:nth-child(2) { animation-delay: 0.3s; }
.timeline-item.animate-in:nth-child(3) { animation-delay: 0.5s; }
.timeline-item.animate-in:nth-child(4) { animation-delay: 0.7s; }
.timeline-item.animate-in:nth-child(5) { animation-delay: 0.9s; }

/* Icone */
.timeline-icon {
  position: absolute;
  left: -30px;
  top: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  box-shadow: var(--shadow);
  animation: bounce 2s infinite;
}

/* Contenu */
.timeline-content {
  background: var(--white);
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 700px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 0 20px 35px rgba(0,0,0,0.15);
}

.timeline-content h3 {
  margin-bottom: 6px;
  font-size: 18px;
  color: var(--blue-dark);
}

.timeline-content .date {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 8px;
  display: block;
}

.timeline-content p {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

/* Catégorie (badge) */
.category {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

/* Couleurs par catégorie */
.category.mecanique {
  background: rgba(21, 101, 192, 0.12);
  color: #1565c0;
}

.category.kiosque {
  background: rgba(173, 20, 87, 0.12);
  color: #ad1457;
}

/* Accent border selon catégorie */
.timeline-item[data-category="mecanique"] .timeline-content {
  border-left: 5px solid #1565c0;
}

.timeline-item[data-category="kiosque"] .timeline-content {
  border-left: 5px solid #ad1457;
}

/* Image simple */
.timeline-image {
  width: auto;
  max-width: 250px;
  height: auto;
  margin-top: 12px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: block;
}

/* Galerie d'images */
.timeline-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.timeline-gallery img {
  width: 120px;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.timeline-gallery img:hover {
  transform: scale(1.05);
}

/* Timeline step status */
.timeline-item.done .timeline-icon { animation: pulseDone 2s infinite; }
.timeline-item.in-progress .timeline-icon { animation: pulseInProgress 2s infinite; }
.timeline-item.upcoming .timeline-icon { animation: pulseUpcoming 2s infinite; }

/* ===== FILTERS ===== */
.timeline-filters {
  display: flex;
  gap: 12px;
  margin: 30px 0 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--blue-light);
  background: var(--white);
  color: var(--blue-dark);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow);
}

.filter-btn:hover {
  transform: translateY(-2px);
  background: var(--blue-light);
}

.filter-btn.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}


/*  Language Buttons  */
.lang-buttons {
  display: flex;
  gap: 8px;
}

.lang-btn {
  padding: 6px 12px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  background-color: var(--white);
  color: var(--blue-dark);
}

.lang-btn:hover {
  background-color: #e3f2fd; /* léger bleu clair */
}

.lang-btn.active {
  background-color: var(--blue-dark);
  color: var(--white);
}


/* ================= ANIMATIONS ================= */

@keyframes slideIn {
  to { opacity: 1; transform: translateX(0); }
}

@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); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  60% { transform: translateY(-3px); }
}

@keyframes pulseDone {
  0%,100% { box-shadow: 0 0 0 0 rgba(255, 235, 59, 0.4); }
  50% { box-shadow: 0 0 15px 5px rgba(255, 235, 59, 0.6); }
}

@keyframes pulseInProgress {
  0%,100% { box-shadow: 0 0 0 0 rgba(30,136,229,0.3); }
  50% { box-shadow: 0 0 10px 5px rgba(30,136,229,0.5); }
}

@keyframes pulseUpcoming {
  0%,100% { box-shadow: 0 0 0 0 rgba(158,158,158,0.3); }
  50% { box-shadow: 0 0 8px 4px rgba(158,158,158,0.5); }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .hero { height: 260px; }
  .hero.small { height: 200px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .hero.small p { font-size: 14px; padding: 0 20px; }

  header .container { flex-direction: column; gap: 12px; }

  .timeline { padding-left: 16px; }
  .timeline-item { flex-direction: column; align-items: flex-start; }
  .timeline-icon { margin-bottom: 12px; }
  .timeline-content { max-width: 100%; }
  
  .nav-container {
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  nav a {
    font-size: 14px;
  }

  /* SLIDESHOW ADJUSTMENTS */
  .text {
    top: 20px;
    left: 20px;
    width: 180px;
  }

  #slideshow {
    flex-direction: column;
    gap: 20px;
  }

  .table {
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
    width: 100%;
    padding: 12px;
  }
  .table li {
    white-space: nowrap;
    border-radius: 12px;
  }
  .prev, .next { font-size: 16px; width: 40px; height: 40px;}
  .text {font-size : 12px; width: 180px; }
  .text h1 { font-size: 16px; }
}

@media (max-width: 480px) {
  .timeline-content h3 { font-size: 16px; }
  .timeline-content p { font-size: 13px; }
  .member-card h3 { font-size: 16px; }
  .timeline-image { max-width: 100%; }
  .logos img { max-height: 64px; }
  .text {
    width: 140px;
    top: 15px;
    left: 15px;
  }
}
