/* Styles pour la section Solutions */
.solutions-section {
  padding: 50px 0;
  background-color: #000;
  color: #fff;
  position: relative;
}

.solutions-section .container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px 0px 14%;
}

/* Titre de la section */
.solutions-header {
  margin-bottom: 60px;
  text-align: left;
}

.solutions-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.solutions-title .title-line,
.solutions-title .subtitle-line {
  display: block;
}

.solutions-cards-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Cartes de solutions - transformées en slider horizontal */
.solutions-cards {
  padding: 20px 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  margin-bottom: 30px;
  overflow-x: auto;
  scroll-behavior: smooth;

  /* Ces propriétés sont toujours utiles pour Firefox et Edge */
  scrollbar-width: none;
  -ms-overflow-style: none;

  /* Technique avancée: ajouter du padding en bas puis le masquer avec le wrapper */
  padding-bottom: 20px; /* Espace pour la scrollbar */
  margin-bottom: -20px; /* Compenser l'espace ajouté */

  scroll-snap-type: x mandatory;
}

.solutions-cards::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.solutions-cards::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.solution-card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease, background-color 0.3s ease;
  min-width: 300px;
  flex: 0 0 300px;
  scroll-snap-align: start;
  max-width: 350px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scroll-snap-type: x mandatory;
}

.solutions-cards::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.solution-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.1);
}

.card-icon {
  margin-bottom: 20px;
}

.card-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2.3rem;
  margin: 0 0 10px 0;
}

.card-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 10px 0;
  opacity: 0.8;
}

.card-description {
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-description p {
  font-weight: 400;
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.6;
  opacity: 0.8;
}

.card-link {
  margin-top: auto;
}

.card-link a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  padding-top: 15px;
  transition: opacity 0.3s ease;
}

.card-link a:hover {
  opacity: 0.7;
}

.solutions-cards.draggable {
  cursor: grab;
  user-select: none;
}

.solutions-cards.draggable:active {
  cursor: grabbing;
}

/* Empêcher la sélection de texte lors du glissement */
.solutions-cards.draggable .solution-card * {
  user-select: none;
}

/* S'assurer que les éléments cliquables restent utilisables */
.solutions-cards.draggable .card-link a {
  pointer-events: auto;
}

.card-link svg {
  transition: transform 0.3s ease;
}

.card-link a:hover svg {
  transform: translateX(5px);
}

/* Navigation des cartes */
.solutions-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 50px;
  margin-right: 14%;
}

.nav-prev,
.nav-next {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  color: #fff;
}

.nav-prev:hover,
.nav-next:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .solutions-section {
    padding: 10px 0;
  }

  .solutions-title {
    font-size: 2rem;
  }

  .solution-card {
    min-width: calc(85% - 20px);
    max-width: calc(85% - 20px);
    flex: 0 0 calc(85% - 20px);
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .solution-card {
    min-width: calc(50% - 20px);
    max-width: calc(50% - 20px);
    flex: 0 0 calc(50% - 20px);
  }
}

/* Styles spécifiques pour le mode éditeur */
.block-editor-block-list__block .solutions-section {
  padding: 10px 20px;
}
