.tilted-offers-widget {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  padding: 20px 20px;
  --tilted-active-border-color: #f5a623;
  --tilted-active-button-gradient-light: #f5a623;
  --tilted-active-button-gradient-dark: #f5a623;
}

.tilted-offers-container {
  /* Container avec padding et max-width */
  max-width: 765px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}

.tilted-offers-title {
  /* Titre principal centré */
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.tilted-offers-stack {
  /* Container pour l'empilement des cartes */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: column;
  width: 100%;
}

/* Cartes individuelles */
.tilted-offer-card {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background-color: #17191d;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  width: 100%;
  padding: 20px;
  max-width: 765px !important;
  max-height: 120px;
  border: 2px solid transparent;
  position: relative;
  z-index: 0;
}

.light-mode .tilted-offer-card {
  border: 1px solid #ececec;
  background-color: #fff;
}

/* Animation de bordure et bouton pour chaque carte */
.tilted-offer-card.active-highlight {
  transform: rotate(0deg) !important;
  z-index: 50;
  border-color: var(--tilted-active-border-color, #f5a623);
  border-width: 3.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.tilted-offer-card.active-highlight .tilted-offer-card__button {
  background: linear-gradient(
    to right,
    var(--tilted-active-button-gradient-light, var(--button-gradient-light, #4db8ff)),
    var(--tilted-active-button-gradient-dark, var(--button-gradient-dark, #0056b3))
  ) !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15),
              0 0 16px var(--tilted-active-button-gradient-dark, rgba(0, 86, 179, 0.35));
}
.tilted-offer-card.active-highlight .tilted-offer-card__button:hover,
.tilted-offer-card.active-highlight .tilted-offer-card__button:focus-visible {
  background: linear-gradient(
    to left,
    var(--tilted-active-button-gradient-light, var(--button-gradient-light, #4db8ff)),
    var(--tilted-active-button-gradient-dark, var(--button-gradient-dark, #0056b3))
  ) !important;
}

.tilted-offer-card:nth-of-type(1) {
  transform: rotate(0deg);
}
.tilted-offer-card:nth-of-type(2) {
  transform: rotate(-2deg);
}
.tilted-offer-card:nth-of-type(3) {
  transform: rotate(2deg);
}
.tilted-offer-card:nth-of-type(4) {
  transform: rotate(-2deg);
}
.tilted-offer-card:nth-of-type(5) {
  transform: rotate(2deg);
}
.tilted-offer-card:nth-of-type(6) {
  transform: rotate(5deg);
}

.tilted-offer-card__descriptions {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 24px;
  overflow: visible;
  z-index: 2;
}

.tilted-offer-card .tilted-offer-card__description {
  margin: 0 !important;
  position: absolute;
  inset: 0;
  width: 100%;
  line-height: 1.4;
  font-size: 14px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 2;
}

.tilted-offer-card .tilted-offer-card__description.is-active {
  position: static;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 3;
}

.tilted-offer-card .tilted-offer-card__description.is-active.is-leaving {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 4;
  pointer-events: none;
}

.tilted-offer-card .tilted-offer-card__description.is-entering {
  animation: tiltedDescriptionEnter 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.tilted-offer-card .tilted-offer-card__description.is-leaving {
  animation: tiltedDescriptionLeave 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes tiltedDescriptionEnter {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tiltedDescriptionLeave {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-32px);
  }
}

.tilted-offer-card__logo {
  /* Container du logo */
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border: 4px solid #E0E0E0 !important;
  border-radius: 10px;
  padding:0;
  overflow: hidden;
  background:transparent;
}

.tilted-offer-card__logo-image {
  /* Image du logo */
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tilted-offer-card__logo-placeholder {
  /* Placeholder si pas de logo */
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #666;
  font-size: 12px;
  text-align: center;
}

.tilted-offer-card__logo-text {
  font-size: 10px;
  line-height: 1.2;
}

.tilted-offer-card__content {
  display: flex;
  align-items: stretch;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.tilted-offer-card__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  position: relative;
}

.tilted-offer-card .tilted-offer-card__title,
.single-post .content .tilted-offer-card__title {
  /* Titre du casino */
  font-size: 16px !important;
  font-weight: normal !important;
  color: #0E0E10 !important;
  margin: 0 0 8px 0 !important;
  position: relative;
  z-index: 1;
}

body.dark-mode .tilted-offers-widget .tilted-offer-card .tilted-offer-card__title {
  color: #ffffff !important;
}

.tilted-offer-card__description {
  /* Description */
  font-size: 16px !important;
  font-weight: bold;
  color: #0E0E10;
  margin: 0;
  line-height: 1.4;
}

body.dark-mode .tilted-offers-widget .tilted-offer-card__description {
  color: #E0E0E0;
}

.tilted-offer-card__action {
  /* Container du bouton */
  flex-shrink: 0;
}

.tilted-offer-card__button {
  /* Bouton d'action */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 9px;
  width: 200px;
  height: 46px;
  color: var(--button-text-color, #ffffff) !important;
  text-decoration: none;
  border-radius: 20px;
  font-weight: bold;
  font-size: 16px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  white-space: nowrap;
  background: linear-gradient(to right, var(--button-gradient-dark, #0056b3), var(--button-gradient-light, #4db8ff));
}

.tilted-offer-card__button:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  .tilted-offers-widget {
    padding: 20px 15px;
  }

  .tilted-offers-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  .tilted-offers-stack {
    /* Sur mobile, désactiver l'effet de basculement */
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: auto;
  }

  .tilted-offer-card--stacked {
    position: static;
    transform: none;
    z-index: auto;
    left: auto;
  }

  .tilted-offer-card:hover {
    transform: translateY(-5px) scale(1.02);
  }

  .tilted-offer-card__content {
    padding: 16px;
    gap: 16px;
  }

  .tilted-offer-card__logo {
    width: 60px;
    height: 60px;
  }

  .tilted-offer-card__title {
    font-size: 16px;
  }


  .tilted-offer-card__button {
    padding: 12px 24px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .tilted-offer-card {
    padding: 5px;
    width: 400px;
    height: 100px;
    margin: 0 auto;
    align-items: flex-start !important;
    justify-content: flex-start;
  }

  .tilted-offer-card__content {
    gap: 10px;
    align-items: stretch;
    padding: 0;
  }

  .tilted-offer-card__logo {
    width: 34px;
    height: 34px;
    border: 1px solid #E0E0E0 !important;
    border-radius: 5px;
  }

  .tilted-offer-card__title {
    margin-top: 0 !important;
  }

  .tilted-offer-card__button {
    width: 157px;
    height: 45px;
  }

  .tilted-offer-card__action {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin-left: auto;
  }

  .tilted-offers-stack {
    gap: 0;
  }
}

@media (max-width: 450px) {
  .tilted-offer-card {
    width: 100% !important;
    max-width: calc(100vw - 20px);
    height: auto;
    min-height: 90px;
    padding: 8px;
  }

  .tilted-offer-card__content {
    gap: 8px;
    flex: 1;
  }

  .tilted-offer-card__logo {
    width: 30px;
    height: 30px;
  }

  .tilted-offer-card__title {
    font-size: 14px !important;
  }

  .tilted-offer-card__description {
    line-height: 1.3;
  }

  .tilted-offer-card__button {
    width: 130px;
    height: 40px;
    font-size: 11px;
    padding: 6px 10px;
    white-space: normal !important;
    line-height: 1.2;
    text-align: center;
  }

  .tilted-offers-widget {
    padding: 15px 10px;
  }
}