/* =============================================================
   SINGLE COURSE — Studies Learning
   Design : premium, épuré, académique contemporain
   ============================================================= */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --ec-dark: #1c1d1f;
  --ec-mid: #3d3d3d;
  --ec-light: #6a6f73;
  --ec-border: #e5e7eb;
  --ec-bg: #f7f9fa;
  --ec-white: #ffffff;
  --ec-accent: #0047ff;
  --ec-green: #1e8c45;
  --ec-gold: #f4b403;
  --ec-warn-bg: #fff4e5;
  --ec-warn-bd: #ffc780;
  --ec-warn-tx: #b05c05;
  --ec-font: "Plus Jakarta Sans", "Inter", sans-serif;
  --ec-radius: 8px;
  --ec-shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
  --ec-nav-height: 80px;
}

/* ── Reset wrapper ──────────────────────────────────────────── */
#ec-course-page {
  font-family: var(--ec-font);
  color: var(--ec-dark);
  background: #222325; /* Black background behind header/hero */
  line-height: 1.6;
  padding-top: var(--ec-nav-height);
}

/* ── Conteneur centré ───────────────────────────────────────── */
.ec-hero-inner,
.ec-body-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================================
   HERO BANNER — Premium compact
   ============================================================= */
.ec-hero {
  background: #222325; /* Dark gray charcoal as in screenshot */
  padding: 80px 0 20px;
  color: #fff;
  position: relative;
}

.ec-hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: stretch;
}

/* Texte gauche */
.ec-hero-text {
  padding-bottom: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ec-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ec-breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.ec-breadcrumb a:hover {
  color: #fff;
}

.ec-hero-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.ec-hero-excerpt {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 620px;
  margin: 0 0 28px;
  line-height: 1.7;
}

/* Meta row (teacher | category | rating) */
.ec-hero-meta {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.ec-meta-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 0 0;
  margin-right: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}
.ec-meta-block:last-child {
  border-right: none;
}

.ec-avatar {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  object-fit: cover;
}

.ec-meta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ec-meta-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ec-meta-value {
  font-size: 0.93rem;
  font-weight: 600;
  color: #fff;
}

.ec-stars {
  display: flex;
  gap: 3px;
  color: var(--ec-gold);
  font-size: 0.95rem;
}

/* Vignette hero — Hidden on desktop, shown on mobile if needed */
.ec-hero-thumb {
  display: none; /* In the capture, the main image is in the floating sidebar */
}

@media (max-width: 1100px) {
    .ec-hero-thumb {
        display: block;
        border-radius: 12px;
        overflow: hidden;
        margin-top: 2rem;
        max-height: 250px;
    }
}

/* =============================================================
   CORPS DE PAGE
   ============================================================= */
.ec-body {
  background: #f8fafc;
  min-height: 800px;
}

.ec-body-inner {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  padding-top: 48px;
  padding-bottom: 80px;
  align-items: start;
}

/* ── Table des matières flottante ── */
.ec-toc {
  background: var(--ec-white);
  border: 1px solid var(--ec-border);
  border-radius: 12px;
  padding: 1.5rem 1.8rem;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.ec-toc-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ec-light);
  margin-bottom: 1rem;
}

.ec-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ec-toc-list li a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ec-mid);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.ec-toc-list li a:hover,
.ec-toc-list li a.active {
  color: var(--ec-accent);
  background: rgba(0, 71, 255, 0.06);
  border-color: rgba(0, 71, 255, 0.12);
}

.ec-toc-list li a i {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ── Section titre ──────────────────────────────────────────── */
.ec-section-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #333;
  padding: 12px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ec-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
}

.ec-content-area {
    padding: 20px 25px;
}

.ec-content-area ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.ec-content-area li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.ec-content-area li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--ec-accent);
    font-weight: bold;
}

.ec-content-area p {
  margin: 0 0 14px;
}
.ec-content-area a {
  color: var(--ec-accent);
  text-decoration: underline;
}
.ec-content-area h2,
.ec-content-area h3 {
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--ec-dark);
}

/* ── Objectifs / Prérequis (bullet cards) ── */
.ec-bullet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.ec-bullet-item {
  background: var(--ec-white);
  border: 1px solid var(--ec-border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ec-mid);
  transition: all 0.3s ease;
}

.ec-bullet-item:hover {
  transform: translateY(-3px);
  border-color: var(--ec-accent);
  box-shadow: 0 8px 20px rgba(0, 71, 255, 0.06);
}

.ec-bullet-item i {
  font-size: 1.2rem;
  color: var(--ec-accent);
  flex-shrink: 0;
}

/* ── Infos pratiques (grille) ── */
.ec-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.ec-info-card {
  background: var(--ec-white);
  border: 1px solid var(--ec-border);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ec-info-card-icon {
  font-size: 1.3rem;
  color: var(--ec-accent);
}

.ec-info-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ec-light);
}

.ec-info-card-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ec-dark);
}

/* ── Curriculum ─────────────────────────────────────────────── */
.ec-curriculum {
  border: 1px solid var(--ec-border);
  border-radius: 12px;
  overflow: hidden;
}

.ec-curr-section {
  border-bottom: 1px solid var(--ec-border);
}
.ec-curr-section:last-child {
  border-bottom: none;
}

.ec-curr-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  background: var(--ec-white);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.ec-curr-header:hover {
  background: #f1f5f9;
}

.ec-curr-toggle {
  display: flex;
  align-items: center;
}

.ec-caret {
  font-size: 1rem;
  color: var(--ec-light);
  transition: transform 0.3s;
}
.ec-curr-section.is-open .ec-caret {
  transform: rotate(90deg);
}

.ec-curr-title {
  flex: 1;
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--ec-dark);
  margin: 0;
}

.ec-curr-count {
  font-size: 0.78rem;
  color: var(--ec-light);
  background: #f1f5f9;
  border-radius: 20px;
  padding: 2px 10px;
  white-space: nowrap;
  font-weight: 600;
}

.ec-curr-body {
  display: none;
  padding: 0;
}
.ec-curr-section.is-open .ec-curr-body {
  display: block;
}

.ec-curr-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ec-curr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.92rem;
  color: var(--ec-mid);
  transition: background 0.2s;
}
.ec-curr-item:last-child {
  border-bottom: none;
}
.ec-curr-item:hover {
  background: #f8fafc;
}

.ec-curr-item .ph-play-circle {
  color: var(--ec-accent);
  font-size: 1.1rem;
}
.ec-curr-item .ph-question {
  color: var(--ec-gold);
  font-size: 1.1rem;
}

.ec-item-title {
  flex: 1;
}

.ec-item-lock {
  color: #d1d5db;
  font-size: 0.9rem;
}

/* ── Instructeur ────────────────────────────────────────────── */
.ec-instructor {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--ec-white);
  border: 1px solid var(--ec-border);
  border-radius: 14px;
  padding: 2rem;
}

.ec-instructor-avatar {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.ec-instructor-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ec-dark);
}

.ec-instructor-bio {
  font-size: 0.92rem;
  color: var(--ec-light);
  line-height: 1.65;
  margin: 0;
}

.ec-instructor-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--ec-light);
}

.ec-instructor-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ec-instructor-meta i {
  color: var(--ec-accent);
}

/* =============================================================
   SIDEBAR
   ============================================================= */
.ec-sidebar {
  position: sticky;
  top: 100px;
  z-index: 100;
  margin-top: -240px; /* Overlap effect */
}

.ec-sidebar-card {
  border: none;
  border-radius: 4px; 
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  background: var(--ec-white);
  margin-top: 10px; /* Gap between image and card */
}

.ec-sidebar-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

.ec-sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ec-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background 0.3s;
}

.ec-video-overlay:hover {
    background: rgba(0, 0, 0, 0.4);
}

.ec-video-overlay i {
    font-size: 4rem;
    color: #fff;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.ec-sidebar-body {
  padding: 24px 24px 28px;
}

/* Prix */
.ec-price-row {
  margin-bottom: 16px;
  text-align: center;
}

.ec-price-free,
.ec-price-value {
  font-size: 2rem;
  font-weight: 800;
}

.ec-price-free {
  color: #55b62a; /* Green as in screenshot */
  text-transform: capitalize;
}
.ec-price-value {
  color: var(--ec-dark);
}

/* Enrollment Notice (Screenshot Style) */
.ec-enroll-notice {
    display: flex;
    gap: 12px;
    background: #fff8e5;
    border: 1px solid transparent;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    font-size: 0.88rem;
    color: #b05c05;
    line-height: 1.5;
}

.ec-enroll-notice i {
    font-size: 1.2rem;
    margin-top: 2px;
}

/* LearnPress override — bouton natif */
.ec-cta-wrap .lp-button,
.ec-cta-wrap .learn-press-purchase-course-button,
.ec-cta-wrap a.lp-button {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  padding: 16px !important;
  border-radius: 10px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  background: var(--ec-accent) !important;
  color: #fff !important;
  border: none !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  margin-bottom: 12px !important;
}
.ec-cta-wrap .lp-button:hover {
  background: #0036cc !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(0, 71, 255, 0.2) !important;
}

/* Bouton fallback maison */
.ec-btn-enroll {
  display: block;
  width: 100%;
  text-align: center;
  padding: 16px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  background: var(--ec-accent);
  color: #fff;
  text-decoration: none;
  border: none;
  transition: all 0.3s;
  margin-bottom: 12px;
}
.ec-btn-enroll:hover {
  background: #0036cc;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 71, 255, 0.2);
}

.ec-btn-enroll.btn-free-campus {
    background: #55b62a !important;
}
.ec-btn-enroll.btn-free-campus:hover {
    background: #46a020 !important;
    box-shadow: 0 8px 20px rgba(85, 182, 42, 0.2) !important;
}

/* Notice warning */
.ec-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f0f7ff;
  border: 1px solid rgba(0, 71, 255, 0.1);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}
.ec-notice .ph {
  font-size: 1.15rem;
  margin-top: 1px;
  flex-shrink: 0;
  color: var(--ec-accent);
}
.ec-notice p {
  margin: 0;
}

/* Features list */
.ec-features {
  margin-top: 24px;
}

.ec-features-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ec-light);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ec-border);
}

.ec-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Features Icons with colors from screenshot */
.ec-features-list li {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.92rem;
  color: #333;
}

.ec-feature-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.icon-orange { color: #ff222d; }
.icon-yellow { color: #f6c427; }
.icon-blue   { color: #279cf6; }
.icon-indigo { color: #6e27f6; }

.ec-features-list li strong {
  color: #333;
  margin-left: auto;
}

/* ── Partager ── */
.ec-share {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ec-border);
  text-align: center;
}

.ec-share-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ec-light);
  margin-bottom: 0.8rem;
}

.ec-share-icons {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}

.ec-share-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ec-mid);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.ec-share-icon:hover {
  background: var(--ec-accent);
  color: #fff;
  transform: translateY(-3px);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1100px) {
  .ec-body-inner {
    grid-template-columns: 1fr;
  }

  .ec-sidebar {
    position: static;
    max-width: 400px;
    margin: 0 auto;
  }

  .ec-hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 768px) {
  .ec-hero {
    padding: 40px 0 0;
  }

  .ec-hero-title {
    font-size: 1.5rem;
  }
  .ec-hero-meta {
    flex-direction: column;
    gap: 12px;
  }
  .ec-meta-block {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
  }

  .ec-hero-thumb {
    border-radius: 12px;
    margin-top: 20px;
    max-height: 200px;
  }

  .ec-toc-list li a {
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
  }

  .ec-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ec-bullet-grid {
    grid-template-columns: 1fr;
  }

  .ec-instructor {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .ec-instructor-avatar {
    margin: 0 auto;
  }
}

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