/* ──────────────────────────────────────────────────────────
   INSTRUCTOR SECTION – Communauté premium
   Background bleu profond + carte stats vitrée
   ────────────────────────────────────────────────────────── */

.instructor-hero-wrapper {
  padding: 24px 16px 28px;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

/* ── Banner background ──────────────────────────────── */
.instructor-elite-banner {
  position: relative;
  width: 100%;
  min-height: 340px;
  background:
    linear-gradient(rgba(18,9,51,0.75), rgba(26,14,74,0.65)) no-repeat,
    url('../assets/img/instructor-bg.jpg') center/cover no-repeat;
  border-radius: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-shadow:
    0 40px 100px rgba(0, 7, 34, 0.25),
    0 0 0 1px rgba(0, 71, 255, 0.08);
  padding-bottom: 0;

  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.instructor-elite-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: bgKenBurns 20s ease-in-out infinite;
}

@keyframes bgKenBurns {
  0%, 100% { background-size: auto, 110% 110%; background-position: 0 0, center; }
  50% { background-size: auto, 130% 130%; background-position: 0 0, center 45%; }
}

.instructor-elite-banner.is-exiting {
  opacity: 0;
  transform: translateY(-30px) scale(0.97);
  transition:
    opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── Deep circular glows ────────────────────────────── */
.instructor-elite-banner::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 71, 255, 0.2) 0%,
    rgba(99, 102, 241, 0.08) 30%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  animation: iccOrbPulse 6s ease-in-out infinite;
}

.instructor-elite-banner::after {
  content: "";
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.12) 0%,
    rgba(0, 71, 255, 0.05) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  animation: iccOrbPulse 8s ease-in-out infinite 2s;
}

@keyframes iccOrbPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; }
}

/* Subtle grid texture */
.instructor-halo {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 1;
}



/* ── Contenu texte ──────────────────────────────────── */
.instructor-elite-content {
  position: relative;
  z-index: 10;
  width: 48%;
  padding-left: 3rem;
}

.instructor-elite-title {
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
  color: #ffffff;
  margin: 0 0 0.8rem 0;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(15px);
  animation: instructorFadeInUp 0.6s ease 0.5s forwards;
}

.instructor-accent {
  color: #ff222d;
  font-weight: 600;
}

.instructor-elite-title .instructor-typewriter-wrap {
  display: inline;
}

.instructor-typewriter {
  color: #60a5fa;
  font-weight: 500;
}

.instructor-cursor {
  display: inline-block;
  color: #60a5fa;
  font-size: 1.2em;
  animation: instructorCursorBlink 0.8s step-end infinite;
  margin-left: 1px;
  vertical-align: baseline;
}

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

.instructor-elite-subtitle {
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 0.8rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(15px);
  animation: instructorFadeInUp 0.6s ease 0.7s forwards;
}

/* ── CTA Button ──────────────────────────────────────── */
.instructor-elite-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #0047ff, #6366f1);
  background-size: 200% 200%;
  color: #fff !important;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  transition:
    background-position 0.4s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 71, 255, 0.3);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(15px);
  animation: instructorFadeInUp 0.6s ease 0.9s forwards;
  margin-bottom: 0;
}

.instructor-elite-btn:hover {
  background-position: 100% 50%;
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 71, 255, 0.4);
}

@keyframes instructorFadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Right side: community card ──────────────────────── */
.instructor-face-wrap {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.instructor-community-card {
  position: relative;
  width: 280px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.icc-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(96, 165, 250, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
  animation: iccGlowPulse 4s ease-in-out infinite;
}

@keyframes iccGlowPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
  50% { transform: translateX(-50%) scale(1.3); opacity: 1; }
}

/* Avatar cluster */
.icc-avatar-cluster {
  position: relative;
  width: 80px;
  height: 56px;
  z-index: 1;
}

.icc-avatar {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.instructor-community-card:hover .icc-avatar {
  animation-play-state: paused;
  transform: scale(1.08);
}

.icc-a1 {
  left: 0; top: 4px; z-index: 4;
  animation: iccCarouselTop 12s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
.icc-a2 {
  left: 18px; top: 0; z-index: 3;
  animation: iccCarouselTop2 12s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
.icc-a3 {
  left: 36px; top: 4px; z-index: 2;
  animation: iccCarouselTop3 12s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
.icc-a4 {
  left: 10px; top: 26px; z-index: 1;
  animation: iccCarouselBottom 12s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
.icc-a5 {
  left: 30px; top: 28px; z-index: 0;
  animation: iccCarouselBottom2 12s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
.icc-a6 {
  left: 50px; top: 22px; z-index: 0;
  animation: iccCarouselBottom3 12s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}

/* ── Shuffle carousel: top row (a1↔a2↔a3) ── */
@keyframes iccCarouselTop {
  0%, 40% { left: 0; top: 4px; }
  48%, 88% { left: 18px; top: 0; }
  96%, 100% { left: 0; top: 4px; }
}
@keyframes iccCarouselTop2 {
  0%, 40% { left: 18px; top: 0; }
  48%, 88% { left: 36px; top: 4px; }
  96%, 100% { left: 18px; top: 0; }
}
@keyframes iccCarouselTop3 {
  0%, 40% { left: 36px; top: 4px; }
  48%, 88% { left: 0; top: 4px; }
  96%, 100% { left: 36px; top: 4px; }
}

/* ── Shuffle carousel: bottom row (a4↔a5↔a6) ── */
@keyframes iccCarouselBottom {
  0%, 40% { left: 10px; top: 26px; }
  48%, 88% { left: 30px; top: 28px; }
  96%, 100% { left: 10px; top: 26px; }
}
@keyframes iccCarouselBottom2 {
  0%, 40% { left: 30px; top: 28px; }
  48%, 88% { left: 50px; top: 22px; }
  96%, 100% { left: 30px; top: 28px; }
}
@keyframes iccCarouselBottom3 {
  0%, 40% { left: 50px; top: 22px; }
  48%, 88% { left: 10px; top: 26px; }
  96%, 100% { left: 50px; top: 22px; }
}

@keyframes iccMorePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.icc-more {
  position: absolute;
  right: -4px;
  bottom: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0047ff;
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
  z-index: 5;
  animation: iccMorePulse 4s ease-in-out infinite;
}

/* Stats */
.icc-stats {
  display: flex;
  gap: 12px;
  width: 100%;
  z-index: 1;
}

.icc-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.icc-num-wrap {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  line-height: 1;
}

.icc-num {
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.icc-plus {
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: #60a5fa;
  margin-left: 1px;
}

.icc-label {
  font-family: "Inter", sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ── Avatar scrolling strip ──────────────────────────── */
.instructor-avatar-strip {
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 6;
}

.instructor-avatar-track {
  display: flex;
  gap: 8px;
  animation: scrollAvatars 20s linear infinite;
  width: max-content;
}

.instructor-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes scrollAvatars {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .instructor-elite-banner {
    height: auto;
    min-height: 320px;
    flex-direction: column;
    padding: 2rem 2rem 1.5rem;
  }
  .instructor-elite-content {
    width: 100%;
    padding-left: 0;
    text-align: center;
    z-index: 10;
  }
  .instructor-elite-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .instructor-face-wrap {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    margin: 0.5rem auto 0;
  }
  .instructor-community-card {
    width: 220px;
    padding: 18px 16px 16px;
  }
  .icc-num { font-size: 1.1rem; }
  .icc-plus { font-size: 0.7rem; }
  .instructor-avatar-strip {
    margin-top: 0;
  }
  .instructor-avatar {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .instructor-hero-wrapper {
    padding: 8px 12px 16px;
  }
  .instructor-elite-title {
    font-size: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .instructor-elite-banner.is-visible { animation: none; }
}
