/* ============================================
   CARD OPTIONS — SAV Services Panel
   Compatible avec le layout landing page
   ============================================ */

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

.options {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  max-width: 900px;
  height: 380px;
  margin: 48px auto 0;
  overflow: hidden;
  border-radius: 20px;
}

/* ---- Option item ---- */
.option {
  position: relative;
  overflow: hidden;
  min-width: 60px;
  margin: 8px;
  background: var(--optionBackground, #0080a0);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  border-radius: 24px;
  transition: flex-grow 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              border-radius 0.4s ease,
              margin 0.4s ease;
}


/* couleurs de repli si pas de background inline */
.option:nth-child(1) { --defaultBackground: #04316f; }
.option:nth-child(2) { --defaultBackground: #0080a0; }
.option:nth-child(3) { --defaultBackground: #006080; }

/* ---- Active ---- */
.option.active {
  flex-grow: 10000;
  max-width: 600px;
  margin: 0;
  border-radius: 32px;
  background-size: cover;
}

.option.active .shadow {
  box-shadow:
    inset 0 -120px 120px -120px rgba(0, 0, 0, 0.7),
    inset 0 -120px 120px -100px rgba(0, 0, 0, 0.5);
}

.option.active .label {
  bottom: 24px;
  left: 24px;
}

.option.active .label .info > div {
  left: 0;
  opacity: 1;
}

/* ---- Inactive ---- */
.option:not(.active) {
  flex-grow: 1;
  border-radius: 24px;
}

.option:not(.active) .shadow {
  bottom: -40px;
  box-shadow:
    inset 0 -120px 0 -120px rgba(0,0,0,0.5),
    inset 0 -120px 0 -100px rgba(0,0,0,0.3);
}

.option:not(.active) .label {
  bottom: 12px;
  left: 12px;
}

.option:not(.active) .label .info > div {
  left: 20px;
  opacity: 0;
}

/* ---- Shadow overlay ---- */
.option .shadow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  transition: box-shadow 0.6s ease, bottom 0.6s ease;
}

/* ---- Label ---- */
.option .label {
  display: flex;
  position: absolute;
  right: 0;
  height: 48px;
  align-items: center;
  transition: bottom 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

/* ---- Icône ronde ---- */
.option .label .icon {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  border-radius: 100%;
  background-color: white;
  color: #0080a0;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: transform 0.4s ease;
}

.option.active .label .icon {
  transform: scale(1.08);
}

/* ---- Info texte ---- */
.option .label .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 12px;
  color: white;
  overflow: hidden;
}

/* Animation d'apparition du texte */
@keyframes textSlideIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.option .label .info > div {
  position: relative;
  transition: opacity 0.35s ease, left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.option.active .label .info .main {
  animation: textSlideIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both;
}

.option.active .label .info .sub {
  animation: textSlideIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.option .label .info .main {
  font-weight: 700;
  font-size: 1rem;
  white-space: normal;
  max-width: 340px;
  line-height: 1.3;
}

.option .label .info .sub {
  font-size: 0.8rem;
  opacity: 0.85;
  transition-delay: 0.1s;
  white-space: normal;
  max-width: 340px;
  margin-top: 4px;
  line-height: 1.4;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* 5 options → cacher la 5e */
@media screen and (max-width: 780px) {
  .options { height: 340px; }
  .option:nth-child(5) { display: none; }
}

/* cacher la 4e aussi */
@media screen and (max-width: 640px) {
  .options { height: 300px; }
  .option:nth-child(4) { display: none; }
}

/* cacher la 3e aussi */
@media screen and (max-width: 500px) {
  .option:nth-child(3) { display: none; }
}

/* Sur mobile : basculer en colonne */
@media screen and (max-width: 520px) {
  .options {
    flex-direction: column;
    height: auto;
    max-width: 100%;
    gap: 0;
    border-radius: 20px;
    overflow: visible;
    margin: 32px 0 0;
  }

  .option,
  .option.active,
  .option:not(.active) {
    display: block !important;
    flex-grow: unset;
    min-width: unset;
    max-width: 100%;
    width: 100%;
    height: 72px;
    margin: 5px 0;
    border-radius: 18px;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .option.active {
    height: 200px;
  }

  .option .label,
  .option.active .label,
  .option:not(.active) .label {
    bottom: 14px;
    left: 14px;
    right: 14px;
    height: auto;
  }

  .option.active .label .info > div {
    left: 0;
    opacity: 1;
  }

  .option:not(.active) .label .info > div {
    left: 0;
    opacity: 0;
  }

  .option .label .info .main {
    font-size: 0.85rem;
  }

  .option .label .info .sub {
    font-size: 0.72rem;
  }
}
