/* ============================================================
   Carrousels — L Forms
   ============================================================ */

/* ----- Carrousel clients (défilement infini CSS pur) ----- */
.trusted .trusted-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 64px;
  align-items: center;
  width: max-content;
  animation: lf-scroll-clients 40s linear infinite;
}
.trusted .trusted-row:hover {
  animation-play-state: paused;
}
.trusted .trusted-marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.trusted .trusted-row > .trusted-item {
  flex: 0 0 auto;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center;
  gap: 12px;
  width: 180px;       /* largeur fixe pour uniformiser tous les items */
  text-align: center;
}
/* Boîte normalisée pour tous les logos — taille identique quel que soit le format d'origine */
.trusted .trusted-logo {
  display: block;
  width: 160px;       /* boîte fixe : 160 × 70 px */
  height: 70px;
  object-fit: contain;       /* le logo conserve ses proportions, centré dans la boîte */
  object-position: center;
  padding: 10px 14px;        /* marge intérieure blanche autour du logo */
  background: #ffffff;       /* fond blanc plein (suppression du gris translucide) */
  border-radius: 4px;        /* coins légèrement adoucis */
  filter: none;              /* couleurs originales du logo (plus de grayscale) */
  transition: transform .25s ease, box-shadow .25s ease;
  /* surcharge les anciens styles inline éventuels */
  max-width: 160px !important;
  max-height: 70px !important;
}
.trusted .trusted-row .trusted-item:hover .trusted-logo {
  background: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(201, 169, 106, 0.25); /* halo doré subtil au survol */
}
.trusted .trusted-name {
  display: block;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #ddd;
  white-space: normal;
  line-height: 1.3;
  max-width: 170px;
  font-weight: 500;
}
/* Si pas de logo (juste le nom), garder la même hauteur globale pour cohérence du défilement */
.trusted .trusted-item:not(:has(.trusted-logo)) {
  min-height: 110px;
  justify-content: center;
}
/* Surcharge l'ancienne règle .trusted-row span { opacity: .85 } qui appliquait .85 sur tout */
.trusted .trusted-row .trusted-item { opacity: 1; }
@keyframes lf-scroll-clients {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (max-width: 768px) {
  .trusted .trusted-row { animation-duration: 25s; gap: 40px; }
}

/* ----- Carrousel photos (page d'accueil) ----- */
.photo-carousel {
  position: relative;
  margin-top: 32px;
}
.photo-carousel-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.photo-carousel-track::-webkit-scrollbar {
  height: 4px;
}
.photo-carousel-track::-webkit-scrollbar-thumb {
  background: var(--gold, #c9a96a);
  border-radius: 2px;
}
.photo-carousel-track > .photo-card {
  flex: 0 0 calc(33.333% - 16px);
  scroll-snap-align: start;
  margin: 0;
}
@media (max-width: 1024px) {
  .photo-carousel-track > .photo-card {
    flex: 0 0 calc(50% - 12px);
  }
}
@media (max-width: 640px) {
  .photo-carousel-track > .photo-card {
    flex: 0 0 calc(85% - 8px);
  }
}

/* Boutons de navigation */
.photo-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--gold, #c9a96a);
  color: var(--gold, #c9a96a);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  z-index: 5;
  user-select: none;
  font-family: inherit;
}
.photo-carousel-nav:hover {
  background: var(--gold, #c9a96a);
  color: #000;
}
.photo-carousel-nav.prev { left: -8px; }
.photo-carousel-nav.next { right: -8px; }
.photo-carousel-nav[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}
@media (max-width: 768px) {
  .photo-carousel-nav { width: 36px; height: 36px; font-size: 18px; }
  .photo-carousel-nav.prev { left: 4px; }
  .photo-carousel-nav.next { right: 4px; }
}

/* Indicateurs (petits points) */
.photo-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.photo-carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s ease, transform .2s ease;
}
.photo-carousel-dots .dot.active {
  background: var(--gold, #c9a96a);
  transform: scale(1.3);
}

/* Cas où il y a peu de photos : pas de carrousel */
.photo-carousel.few-items .photo-carousel-track {
  overflow: visible;
  flex-wrap: wrap;
}
.photo-carousel.few-items .photo-carousel-nav,
.photo-carousel.few-items .photo-carousel-dots {
  display: none;
}
