/* ============================================================================
   CONSEIL DU JOUR - Styles améliorés avec design attrayant et carrousel
   ============================================================================ */

/* ---- Conteneur principal du conseil ---------------------------------------- */
.bottom-insight {
  position: relative;
  background: linear-gradient(135deg, #7661dc 0%, #5f4fb8 50%, #9d7ed9 100%);
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(118, 97, 220, 0.2), 
              0 4px 20px rgba(118, 97, 220, 0.1);
  transition: all 0.3s ease;
  margin-top: 27px;
  padding: 20px;
  min-height: 140px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Background animé avec motif */
.bottom-insight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* ---- Icône du conseil ------------------------------------------------------- */
.bottom-insight .insight-icon {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
  animation: pulse-icon 3s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.bottom-insight .insight-icon svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ---- Contenu du conseil ---------------------------------------------------- */
.bottom-insight-content {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  color: #fff;
}

/* Couleur imposée : la règle d'origine « .bottom-insight p { color: var(--ink-soft) } »
   l'emportait sur le blanc hérité et laissait un texte gris illisible sur le dégradé. */
.bottom-insight strong {
  color: #fff;
}

.bottom-insight p {
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: fadeInSlide 0.5s ease-out;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ---- Bouton de navigation du carrousel ------------------------------------- */
.bottom-insight button,
.bottom-insight .round-arrow {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-size: 18px;
  padding: 0;
}

.bottom-insight button:hover,
.bottom-insight .round-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1) rotate(0deg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.bottom-insight button:active,
.bottom-insight .round-arrow:active {
  transform: scale(0.95);
}

/* Focus clavier visible (remplace les écouteurs JavaScript qui s'accumulaient). */
.bottom-insight button:focus-visible,
.bottom-insight .round-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---- Indicateur de carrousel ------------------------------------------------ */
.tip-carousel-indicator {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  margin-left: 8px;
}

.tip-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.tip-carousel-dot.active {
  width: 20px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tip-carousel-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* ---- Mode sombre ------------------------------------------------------------ */
html[data-gf-theme="dark"] .bottom-insight {
  background: linear-gradient(135deg, #4a3f7d 0%, #3d3366 50%, #6b5a99 100%);
  box-shadow: 0 10px 40px rgba(64, 48, 120, 0.3),
              0 4px 20px rgba(64, 48, 120, 0.15);
}

html[data-gf-theme="dark"] .bottom-insight::before {
  background: 
    radial-gradient(circle at 20% 50%, rgba(200, 180, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(200, 180, 255, 0.04) 0%, transparent 50%);
}

html[data-gf-theme="dark"] .bottom-insight .insight-icon {
  background: rgba(200, 180, 255, 0.15);
  box-shadow: inset 0 1px 2px rgba(200, 180, 255, 0.1);
}

html[data-gf-theme="dark"] .bottom-insight button,
html[data-gf-theme="dark"] .bottom-insight .round-arrow {
  background: rgba(200, 180, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

html[data-gf-theme="dark"] .bottom-insight button:hover,
html[data-gf-theme="dark"] .bottom-insight .round-arrow:hover {
  background: rgba(200, 180, 255, 0.25);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* ---- Responsive ------------------------------------------------------------ */
@media (max-width: 600px) {
  .bottom-insight {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    min-height: auto;
  }

  .bottom-insight .insight-icon {
    align-self: center;
  }

  .bottom-insight-content {
    width: 100%;
  }

  .bottom-insight p {
    font-size: 13px;
  }

  .bottom-insight button,
  .bottom-insight .round-arrow {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .tip-carousel-indicator {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}

/* ---- États de chargement --------------------------------------------------- */
.bottom-insight.is-loading {
  opacity: 0.7;
}

.bottom-insight.is-loading p {
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ---- Transitions fluides --------------------------------------------------- */
.bottom-insight {
  animation: cardSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Effet hover du card --------------------------------------------------- */
@media (hover: hover) {
  .bottom-insight:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 48px rgba(118, 97, 220, 0.25),
                0 6px 24px rgba(118, 97, 220, 0.15);
  }

  html[data-gf-theme="dark"] .bottom-insight:hover {
    box-shadow: 0 14px 48px rgba(64, 48, 120, 0.4),
                0 6px 24px rgba(64, 48, 120, 0.2);
  }
}
