/* ---------------------- POLICES ---------------------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;600&display=swap');

/* ---------------------- GLOBAL ---------------------- */

/* 🌐 Reset global pour éviter les débordements */
html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}


body {
  font-family: 'Poppins', sans-serif;
  color: #2c2c2c;
  background: linear-gradient(120deg, #f9fbff, #e6f0ff);
  background-size: 400% 400%;
  animation: bgAnim 15s ease infinite;
  overflow-x: hidden;
}

@keyframes bgAnim {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

main {
  margin-top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------------------- MODULES ---------------------- */
.module {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 30px;
  width: 55%;
  border-radius: 120px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease-in-out;
  margin-bottom: 70px;
  transform: scale(1);
  opacity: 1; /* les modules sont toujours visibles */
  background-color: #f8f8f8;
}


.module.active-module {
  transform: translateY(0) scale(1.05) !important;
  z-index: 1;
  box-shadow: 0 10px 40px rgba(0, 84, 173, 0.3);
}

.module.expanded {
  transform: none !important;
}

.module.left {
  flex-direction: row;
}

.module.right {
  flex-direction: row-reverse;
}

.module img {
  width: 190px;
  height: 190px;
  border-radius: 100px;
  margin: auto;
  transition: transform 0.4s ease;
}

.module:hover img {
  transform: scale(1.05);
  transform-origin: center center;
}

/* ---------------------- CONTENU ---------------------- */
.module .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  margin: 0 20px;
  font-size: 14px;
  line-height: 1.5;
  font-family: 'Poppins', sans-serif;
}

.module .content h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 20px;
}

.module .content p {
  text-align: center;
}

.short-text {
  color: #222 !important;
  font-weight: 500;
}

.long-text {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.5s ease;
  width: 100%;
  text-align: left;
}

.long-text h4 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 18px;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #2b2b2b;
}


.module.expanded .long-text {
  max-height: 3000px;
  opacity: 1;
}

.long-text ul li {
  opacity: 0;
  transform: translateX(-20px);
  animation: none;
  text-align: left;
  margin: 0 0 0 1em;
  list-style: disc;
}

.module.expanded .long-text ul li {
  animation: fadeInList 0.5s ease forwards;
}

.module.expanded .long-text ul li:nth-child(1) { animation-delay: 0.3s; }
.module.expanded .long-text ul li:nth-child(2) { animation-delay: 0.6s; }
.module.expanded .long-text ul li:nth-child(3) { animation-delay: 0.9s; }
.module.expanded .long-text ul li:nth-child(4) { animation-delay: 1.2s; }
.module.expanded .long-text ul li:nth-child(5) { animation-delay: 1.5s; }

@keyframes fadeInList {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---------------------- BOUTONS MODULE ---------------------- */
.module-button-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: nowrap; /* Empêche les retours à la ligne */
}

.module-button {
  padding: 10px 20px;
  font-size: 14px;
  line-height: 1;
  font-family: 'Montserrat', sans-serif;
  display: inline-flex;
  align-items: center;
  border-radius: 30px;
  border: 1px solid #353535;
  background-color: #fff;
  color: #353535;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none; /* Supprime le soulignement même si c'est un lien */
}

/* Style spécifique pour "Demander un devis" */
.ask-quote-button {
  display: none;
  background-color: #005dd4;
  color: #fff;
  border-color: #005dd4;
}

/* Le bouton devis apparaît uniquement quand le module est déployé */
.module.expanded .ask-quote-button {
  display: inline-flex;
  animation: slideUpBounce 0.5s ease-out;
  animation-delay: 0.4s;
animation-fill-mode: both;

}

/* Hover effets */
.module-button:hover,
.ask-quote-button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 10px rgba(0, 93, 180, 0.4);
}

/* Animation de clic */
.module-button.clicked {
  animation: clickBounce 0.4s ease;
}

@keyframes clickBounce {
  0% { transform: scale(1); }
  30% { transform: scale(0.95); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes slideUpBounce {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}



/* ---------------------- TITRE ---------------------- */
.page-title-section {
  margin-top: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 200px;
  max-width: 60%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  animation: fadeSlideDown 1s ease-out;
}

.page-title-section h1 {
  font-size: 28px;
  font-family: 'Gobold', sans-serif;
}

.page-title-section p {
  font-size: 17px;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------------- END SECTION ---------------------- */
.end {
  text-align: center;
  width: 90%;
  font-size: 17px;
  margin-top: 100px;
  font-family: 'Poppins', sans-serif;
}

strong {
  color: black;
  font-weight: bold;
}

/* ---------------------- RESPONSIVE ---------------------- */
@media (max-width: 1100px) {
  .module {
    flex-direction: column;
    width: 80%;
    min-width: 0;
    border-radius: 80px;
  }

  .module img {
    width: 50%;
    max-width: 300px;
    height: auto;
    margin-bottom: 20px;
  }

  .button-container {
    width: 50%;
  }

  .button {
    width: 100%;
    padding: 15px 0;
  }

  .module.left, .module.right {
    flex-direction: column;
  }

  .module.left img, .module.right img {
    order: 1;
    margin-top: 50px;
  }

  .module.left .content, .module.right .content {
    order: 2;
  }
}


@media (max-width: 768px) {
  .page-title-section {
    margin-top: 160px;
    padding: 30px 15px 10px;
  }

  .page-title-section h1 {
    font-size: 22px;
    line-height: 1.4;
  }

  .page-title-section p {
    font-size: 15px;
  }
}
