/* FLUXAIN - Styles études de cas / case studies */

/* Variables spécifiques case study - alignées sur la charte Fluxain */
:root {
  --case-accent: #8B4DAF;
  --case-accent-soft: rgba(93, 45, 121, 0.15);
  --case-accent-glow: rgba(93, 45, 121, 0.25);
  --case-dark-card: rgba(255, 255, 255, 0.04);
  --case-text-muted: rgba(248, 249, 250, 0.6);
  --case-ai-blue: #5b8def;
  --case-ai-blue-soft: rgba(91, 141, 239, 0.1);
}

/* ─── HERO ─── */
.case-hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
}

.case-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--case-accent-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.case-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--case-accent-soft);
  color: var(--case-accent);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 32px;
  animation: caseUp 0.6s ease-out;
}

.case-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--case-accent);
  border-radius: 50%;
}

.case-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: #FFFFFF;
  margin-bottom: 24px;
  animation: caseUp 0.6s ease-out 0.1s both;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.case-hero h1 span {
  color: var(--case-accent);
}

.case-hero h1 .ai-highlight {
  color: var(--case-ai-blue);
}

.case-hero .subtitle {
  font-size: 1.15rem;
  color: var(--case-text-muted);
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 48px;
  animation: caseUp 0.6s ease-out 0.2s both;
}

/* ─── BACK LINK ─── */
.case-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--case-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 32px;
  transition: color 0.3s ease;
  animation: caseUp 0.6s ease-out;
}

.case-back:hover {
  color: #FFFFFF;
}

.case-back .arrow {
  transition: transform 0.3s ease;
}

.case-back:hover .arrow {
  transform: translateX(-4px);
}

/* ─── META BAR ─── */
.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  animation: caseUp 0.6s ease-out 0.3s both;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--case-accent);
  font-weight: 600;
}

.meta-value {
  font-size: 1rem;
  color: var(--color-light);
  font-weight: 500;
}

/* ─── BODY ─── */
.case-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md) 100px;
}

/* ─── CHALLENGE / SOLUTION ─── */
.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 80px;
}

.case-card {
  background: var(--case-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}

.case-card:hover {
  border-color: rgba(93, 45, 121, 0.25);
  transform: none;
  box-shadow: none;
}

.case-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--case-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.case-card:hover::before {
  opacity: 1;
}

.case-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 24px;
  background: var(--case-accent-soft);
}

.case-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: #FFFFFF;
  margin-bottom: 16px;
  font-weight: 600;
}

.case-card p {
  color: var(--case-text-muted);
  line-height: 1.75;
  font-size: 0.95rem;
}

/* ─── MARY SPOTLIGHT ─── */
.mary-spotlight {
  position: relative;
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.06) 0%, var(--case-dark-card) 40%, rgba(93, 45, 121, 0.06) 100%);
  border: 1px solid rgba(91, 141, 239, 0.15);
  border-radius: 20px;
  padding: 64px 56px;
  margin-bottom: 80px;
  overflow: hidden;
}

.mary-spotlight::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(91, 141, 239, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.mary-spotlight::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--case-accent-glow) 0%, transparent 70%);
  opacity: 0.15;
  pointer-events: none;
}

.mary-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.mary-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--case-ai-blue), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 4px 24px rgba(91, 141, 239, 0.25);
}

.mary-title-group h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.mary-title-group h2 span {
  color: var(--case-ai-blue);
}

.mary-title-group .mary-tagline {
  color: var(--case-text-muted);
  font-size: 0.95rem;
}

.mary-description {
  position: relative;
  z-index: 1;
  color: var(--color-light);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 720px;
  margin-bottom: 40px;
}

.mary-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.mary-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  transition: border-color 0.3s, background 0.3s;
}

.mary-feature:hover {
  border-color: rgba(91, 141, 239, 0.2);
  background: rgba(91, 141, 239, 0.04);
}

.mary-feature .feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--case-ai-blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-text h4 {
  font-size: 0.92rem;
  color: #FFFFFF;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-text p {
  font-size: 0.83rem;
  color: var(--case-text-muted);
  line-height: 1.55;
}

/* ─── CHAT DEMO ─── */
.chat-demo {
  max-width: 560px;
  margin: 48px auto 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.chat-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--case-ai-blue), #8b5cf6);
  animation: casePulse 2s infinite;
}

.chat-titlebar span {
  font-size: 0.82rem;
  color: var(--case-text-muted);
  font-weight: 500;
}

.chat-titlebar .online {
  color: #4ade80;
  font-size: 0.75rem;
  margin-left: auto;
}

.chat-messages {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.55;
  animation: caseUp 0.4s ease-out both;
}

.chat-msg.user {
  align-self: flex-end;
  background: rgba(93, 45, 121, 0.15);
  color: var(--color-light);
  border-bottom-right-radius: 4px;
  animation-delay: 0.5s;
}

.chat-msg.mary {
  align-self: flex-start;
  background: rgba(91, 141, 239, 0.1);
  color: var(--color-light);
  border-bottom-left-radius: 4px;
}

.chat-msg.mary:nth-child(1) { animation-delay: 0s; }
.chat-msg.mary:nth-child(3) { animation-delay: 1s; }

.chat-msg .msg-name {
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chat-msg.mary .msg-name { color: var(--case-ai-blue); }
.chat-msg.user .msg-name { color: var(--case-accent); }

/* ─── RESULTS ─── */
.results-section {
  text-align: center;
  margin-bottom: 80px;
}

.results-section h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: #FFFFFF;
  margin-bottom: 16px;
}

.results-section .section-sub {
  color: var(--case-text-muted);
  margin-bottom: 56px;
  font-size: 1rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.result-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 36px 20px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.result-card:hover {
  transform: translateY(-4px);
  border-color: rgba(93, 45, 121, 0.2);
}

.result-number {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--case-accent);
  line-height: 1;
  margin-bottom: 10px;
}

.result-label {
  font-size: 0.85rem;
  color: var(--case-text-muted);
  line-height: 1.5;
}

/* ─── TAGS ─── */
.services-delivered {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 64px;
}

.service-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--case-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  font-size: 0.88rem;
  color: var(--color-light);
  font-weight: 500;
  transition: border-color 0.3s, background 0.3s;
}

.service-tag:hover {
  border-color: var(--case-accent);
  background: var(--case-accent-soft);
}

.service-tag .tag-dot {
  width: 6px;
  height: 6px;
  background: var(--case-accent);
  border-radius: 50%;
}

.service-tag.ai-tag:hover {
  border-color: var(--case-ai-blue);
  background: var(--case-ai-blue-soft);
}

.service-tag.ai-tag .tag-dot {
  background: var(--case-ai-blue);
}

/* ─── QUOTE ─── */
.case-quote {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(93, 45, 121, 0.06) 100%);
  border: 1px solid rgba(93, 45, 121, 0.15);
  border-radius: var(--radius-md);
  padding: 56px 48px;
  text-align: center;
}

.case-quote::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 6rem;
  color: var(--case-accent);
  opacity: 0.2;
  position: absolute;
  top: 8px;
  left: 32px;
  line-height: 1;
}

.case-quote blockquote {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-light);
  line-height: 1.8;
  max-width: 680px;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
}

.case-quote cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--case-accent);
  font-weight: 600;
}

/* ─── CTA CASE ─── */
.case-cta {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  max-width: 700px;
  margin: 0 auto;
}

.case-cta h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: #FFFFFF;
  margin-bottom: 16px;
}

.case-cta p {
  color: var(--case-text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ─── ANIMATIONS ─── */
@keyframes caseUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes casePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .case-hero {
    padding: 120px 0 60px;
  }

  .case-grid {
    grid-template-columns: 1fr;
  }

  .results-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .mary-features {
    grid-template-columns: 1fr;
  }

  .case-meta {
    gap: 24px;
  }

  .case-card {
    padding: 36px 28px;
  }

  .mary-spotlight {
    padding: 40px 28px;
  }

  .case-quote {
    padding: 40px 28px;
  }
}

@media (max-width: 480px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}