/* ================================== */
/* SLIDER PROFESSIONNEL CSS INFINI */
/* ================================== */

/* Wrapper */
.mathematicians-slider-wrapper {
  overflow: hidden;
  position: relative;
  padding: 1rem 0;
}

/* Slider animé */
.mathematicians-slider {
  display: flex;
  gap: 2rem;
  animation: slide-left 40s linear infinite;
  will-change: transform;
}

@keyframes slide-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Cartes */
.mathematician-card {
  flex: 0 0 auto;
  width: 180px;
  scroll-snap-align: start;
  background: #111111;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Image et texte */
.mathematician-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: transform 0.5s ease;
}

.mathematician-card p {
  font-weight: 600;
  font-size: 0.95rem;
  color: #00aaff;
  margin-bottom: 0.25rem;
}

.mathematician-card .credit {
  font-size: 0.7rem;
  color: #999999;
}

/* Hover pro */
.mathematician-card:hover {
  transform: translateY(-10px) scale(1.08) rotateZ(-1deg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  z-index: 10;
}

.mathematician-card:hover img {
  transform: scale(1.05) rotateZ(-1deg);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .mathematicians-slider {
    animation-duration: 30s;
  }
  .mathematician-card {
    width: 140px;
  }
}


.mathematician-card img {
  width: 100%;
  height: 200px; /* hauteur fixe pour toutes les cartes */
  object-fit: cover; /* garde les proportions et crop si nécessaire */
  object-position: center top; /* centre verticalement ou top selon besoin */
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: transform 0.5s ease;
}


.mathematicians-slider-wrapper {
  overflow: hidden;
  position: relative;
  padding: 3rem 0 1rem 0; /* plus d’espace en haut */
}


.mathematicians-slider {
  display: flex;
  gap: 2rem;
  animation: slide-left 40s linear infinite;
  will-change: transform;
  margin-top: 2rem; /* décale le slider en dessous du header */
}



.mathematician-card img {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}


/* Boutons */
.btn {
  background: #8d8d8d;
  color: white;
  padding: 0.8rem 1.8rem;
  border-radius: 0px;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Effet hover sur bouton */
.btn:hover {
  background: #0088cc;
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}