.ta-tirage-du-jour {
  --ta-bg: #fff;
  --ta-bg-soft: #faf7ff;
  --ta-border: rgba(49, 5, 80, 0.10);
  --ta-border-strong: rgba(106, 55, 148, 0.18);
  --ta-text: #2f1d3f;
  --ta-muted: #7a6a88;
  --ta-title: #310550;
  --ta-accent: #5f21a7;
  --ta-accent-soft: #efe5ff;
  --ta-shadow: 0 20px 44px rgba(49, 5, 80, 0.09);
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(154, 98, 255, 0.10), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fcf9ff 100%);
  border: 1px solid var(--ta-border);
  box-shadow: var(--ta-shadow);
  margin: 26px 0;
  overflow: hidden;
}

.ta-card-shell {
  position: sticky;
  top: 24px;
}

.ta-card-back,
.ta-card-image,
.ta-card-fallback {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
}

.ta-card-back,
.ta-card-fallback {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  isolation: isolate;
}

.ta-card-back {
  padding: 22px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.12), transparent 32%),
    linear-gradient(180deg, #5d1e8a 0%, #310550 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.14),
    0 18px 36px rgba(49, 5, 80, 0.22);
}

.ta-card-back::before,
.ta-card-back::after,
.ta-card-fallback::before,
.ta-card-fallback::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 16px;
  pointer-events: none;
}

.ta-card-back::before,
.ta-card-fallback::before {
  border: 1px solid rgba(255,255,255,0.20);
}

.ta-card-back::after,
.ta-card-fallback::after {
  inset: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  opacity: 0.9;
}

.ta-card-back span,
.ta-card-fallback-inner {
  position: relative;
  z-index: 1;
}

.ta-card-back span {
  max-width: 120px;
  font-size: 1.1rem;
  line-height: 1.3;
}

.ta-content {
  min-width: 0;
}

.ta-eyebrow {
  margin: 0 0 10px;
  color: #9b8aa8;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ta-title {
  margin: 0 0 12px;
  color: var(--ta-title);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.ta-subtitle {
  max-width: 720px;
  margin: 0 0 20px;
  color: var(--ta-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.ta-draw-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #4a0b83 0%, #310550 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.97rem;
  padding: 15px 24px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  box-shadow: 0 12px 26px rgba(49, 5, 80, 0.18);
}

.ta-draw-button:hover,
.ta-draw-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(49, 5, 80, 0.24);
}

.ta-draw-button:disabled {
  cursor: wait;
  opacity: 0.82;
}

.ta-status {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: #7a6691;
  font-size: 0.96rem;
}

.ta-result {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fbf9ff 100%);
  border: 1px solid var(--ta-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.ta-result.is-visible {
  animation: taFadeIn 0.35s ease;
}

.ta-result-visual {
  min-width: 0;
}

.ta-card-image {
  display: block;
  object-fit: cover;
  background: #f7f1ff;
  box-shadow: 0 16px 32px rgba(49, 5, 80, 0.14);
}

.ta-card-fallback {
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.18), transparent 30%),
    linear-gradient(180deg, #6a2cab 0%, #3a075c 100%);
  box-shadow: 0 16px 32px rgba(49, 5, 80, 0.16);
}

.ta-card-fallback::before {
  border-color: rgba(255,255,255,0.22);
}

.ta-card-fallback::after {
  border-color: rgba(255,255,255,0.16);
}

.ta-fallback-inner {
  display: grid;
  gap: 10px;
  place-items: center;
}

.ta-fallback-kicker {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ta-fallback-name {
  max-width: 140px;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 800;
}

.ta-card-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ta-accent-soft);
  color: #5b30a2;
  font-size: 0.88rem;
  font-weight: 700;
}

.ta-card-name {
  margin: 0 0 12px;
  color: var(--ta-title);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.18;
}

.ta-card-keywords,
.ta-card-message,
.ta-card-advice,
.ta-domain-box p {
  margin: 0 0 16px;
  color: var(--ta-text);
  line-height: 1.72;
}

.ta-card-keywords {
  color: #6d5490;
  font-weight: 700;
}

.ta-card-message {
  font-size: 1.02rem;
}

.ta-card-domains {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.ta-domain-box {
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--ta-border-strong);
  box-shadow: 0 10px 24px rgba(49, 5, 80, 0.05);
}

.ta-domain-box strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--ta-title);
  font-size: 0.98rem;
}

.ta-card-advice {
  margin-top: 10px;
  padding: 18px 20px;
  border: 1px solid rgba(122, 77, 224, 0.16);
  border-left: 4px solid #7b4de0;
  background: linear-gradient(180deg, #ffffff 0%, #f8f2ff 100%);
  border-radius: 18px;
}

.ta-card-advice::before {
  content: "Conseil du jour";
  display: block;
  margin-bottom: 8px;
  color: #6b42b5;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

@media (max-width: 900px) {
  .ta-tirage-du-jour,
  .ta-result {
    grid-template-columns: 1fr;
  }

  .ta-card-shell {
    position: static;
    max-width: 230px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .ta-tirage-du-jour {
    gap: 20px;
    padding: 20px;
    border-radius: 22px;
  }

  .ta-result {
    padding: 16px;
    gap: 16px;
    border-radius: 20px;
  }

  .ta-title {
    font-size: clamp(1.7rem, 8vw, 2.15rem);
  }

  .ta-subtitle,
  .ta-card-message,
  .ta-card-keywords,
  .ta-card-advice,
  .ta-domain-box p {
    line-height: 1.65;
  }

  .ta-draw-button {
    width: 100%;
    justify-content: center;
  }
}
