/* ── RESET & BASE ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: white !important;
  color: #333;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }

/* ── CSS VARIABLES ─────────────────────────────────────────────────── */
:root {
  --primary: #E65C00;
  --primary-hover: #CC5200;
  --dark: #1A1A2E;
  --dark-light: #2A2A4A;
  --grey-light: #F5F5F5;
  --grey-medium: #E0E0E0;
  --grey-dark: #999;
  --success: #43A047;
  --info: #1565C0;
  --warning: #FFA726;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.18);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --max-width: 1200px;
  --header-height: 64px;
  --sidebar-width: 360px;
}

/* ── UTILITY CLASSES ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 20px; }
.gap-xl { gap: 32px; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ── BUTTONS ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--white);
  color: var(--dark);
  border: 2px solid var(--dark);
}
.btn-secondary:hover {
  background: var(--dark);
  color: var(--white);
}
.btn-ghost {
  background: var(--white);
  color: #555;
  border: 1.5px solid #CCC;
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-green {
  background: var(--success);
  color: var(--white);
}
.btn-green:hover {
  background: #388E3C;
}
.btn-blue {
  background: var(--info);
  color: var(--white);
}
.btn-blue:hover {
  background: #0D47A1;
}
.btn-sm {
  padding: 8px 18px;
  font-size: 12px;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}
.btn-full {
  width: 100%;
}

/* ── BADGES ────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}
.badge-level { background: #E3F2FD; color: #1565C0; }
.badge-level-inter { background: #FFF3E0; color: #E65100; }
.badge-level-adv { background: #FCE4EC; color: #880E4F; }
.badge-cat { background: #F3E5F5; color: #6A1B9A; }
.badge-new { background: #E8F5E9; color: #2E7D32; }
.badge-free { background: #FFF9C4; color: #F57F17; }
.badge-hot { background: #FFEBEE; color: #B71C1C; }

/* ── HEADER STICKY ─────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 2px solid #CCCCCC;
  height: var(--header-height);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 24px;
  padding: 0 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo {
  width: 130px;
  height: 40px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.nav-items {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}
.nav-item {
  font-size: 13px;
  color: #555;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}
.nav-item:hover,
.nav-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.nav-item.ext::after {
  content: " ↗";
  font-size: 10px;
  color: #999;
}
.nav-cta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--dark);
  padding: 4px;
}

/* ── BREADCRUMB ────────────────────────────────────────────────────── */
.breadcrumb {
  background: #FAFAFA;
  border-bottom: 1px solid #EEEEEE;
  padding: 14px 0;
}
.breadcrumb-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #999;
  flex-wrap: wrap;
}
.breadcrumb-list a {
  color: var(--info);
  transition: color 0.2s;
}
.breadcrumb-list a:hover {
  color: var(--primary);
}
.breadcrumb-current {
  color: #333;
  font-weight: 600;
}

/* ── MAIN CONTENT LAYOUT ───────────────────────────────────────────── */
.content-section {
  padding: 40px 0 64px;
}
.content-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.content-main {
  flex: 1;
  min-width: 0;
}
.content-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

/* ── COURSE HEADER ─────────────────────────────────────────────────── */
.course-header {
  margin-bottom: 32px;
}
.course-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.course-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 16px;
}
.course-meta-row {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #888;
}
.stars { color: #FFA726; font-size: 14px; }
.meta-strong { font-weight: 700; color: var(--dark); }
.instructor-info {
  margin-top: 14px;
  font-size: 13px;
  color: #666;
}
.instructor-name {
  color: var(--primary);
  font-weight: 600;
}

/* ── TABS ──────────────────────────────────────────────────────────── */
.tabs-wrapper {
  margin-bottom: 24px;
}
.tabs {
  display: flex;
  border-bottom: 2px solid #E0E0E0;
  gap: 0;
  overflow-x: auto;
}
.tab-item {
  padding: 12px 24px;
  font-size: 14px;
  color: #888;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-weight: 500;
}
.tab-item:hover {
  color: var(--primary);
}
.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

/* ── ACCORDION (SYLLABUS) ─────────────────────────────────────────── */
.syllabus-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.syllabus-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}
.syllabus-meta {
  font-size: 12px;
  color: #888;
}
.accordion {
  border: 1px solid #E0E0E0;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.2s;
}
.accordion:hover {
  border-color: var(--primary);
}
.accordion-open {
  border-color: var(--primary);
}
.accordion-hd {
  background: #F5F5F5;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: background 0.2s;
  gap: 12px;
  flex-wrap: wrap;
}
.accordion-hd:hover {
  background: #EEEEEE;
}
.accordion-open .accordion-hd {
  background: #FFF8F0;
  color: var(--primary);
}
.accordion-hd-meta {
  font-size: 12px;
  font-weight: 400;
  color: #888;
}
.accordion-toggle {
  color: #888;
  font-size: 12px;
  transition: transform 0.2s;
}
.accordion-open .accordion-toggle {
  color: var(--primary);
  transform: rotate(180deg);
}
.accordion-bd {
  padding: 8px 18px 14px;
}
.lesson-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F5F5F5;
  font-size: 13px;
  color: #555;
}
.lesson-row:last-child {
  border-bottom: none;
}
.lesson-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #E0E0E0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #666;
  flex-shrink: 0;
}
.lesson-icon.done {
  background: #C8E6C9;
  color: #2E7D32;
}
.lesson-icon.video {
  background: #E3F2FD;
  color: #1565C0;
}
.lesson-icon.quiz {
  background: #FFF3E0;
  color: #E65100;
}
.lesson-name {
  flex: 1;
}
.lesson-duration {
  font-size: 11px;
  color: #AAA;
  white-space: nowrap;
}
.lesson-more {
  font-size: 11px;
  color: #888;
  text-align: right;
  margin-top: 8px;
}

/* ── REVIEWS SECTION ───────────────────────────────────────────────── */
.reviews-section {
  margin-top: 40px;
}
.reviews-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
}
.reviews-summary {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.reviews-score {
  text-align: center;
}
.reviews-score-num {
  font-size: 52px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
}
.reviews-score-stars {
  margin-top: 8px;
}
.reviews-score-label {
  font-size: 11px;
  color: #888;
  margin-top: 6px;
}
.reviews-bars {
  flex: 1;
  min-width: 200px;
}
.rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}
.rating-label {
  width: 20px;
  text-align: right;
}
.rating-bar {
  flex: 1;
  height: 6px;
  background: #E0E0E0;
  border-radius: 3px;
}
.rating-bar-fill {
  height: 100%;
  background: #FFA726;
  border-radius: 3px;
}
.rating-pct {
  width: 36px;
  text-align: right;
}

/* Review Card */
.review-card {
  background: var(--white);
  border: 1.5px solid #E0E0E0;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
}
.review-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E0E0E0, #F5F5F5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.review-name { font-size: 13px; font-weight: 700; color: var(--dark); }
.review-date { font-size: 11px; color: #999; margin-top: 2px; }
.review-text {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* ── SIDEBAR BOX ───────────────────────────────────────────────────── */
.sidebar-box {
  border: 2px solid #E0E0E0;
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}
.sidebar-thumb {
  height: 170px;
  background: linear-gradient(135deg, #C8C8C8 60%, #B0B0B0 100%);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 24px;
  color: #999;
  margin-bottom: 18px;
}
.sidebar-thumb-label {
  font-size: 11px;
  color: #AAA;
  margin-top: 6px;
}

/* Price */
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}
.price-current {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
}
.price-original {
  font-size: 13px;
  color: #888;
  text-decoration: line-through;
  margin-bottom: 4px;
}
.price-discount {
  font-size: 12px;
  color: #E53935;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Currency Switcher */
.currency-switch {
  display: inline-flex;
  background: #F0F0F0;
  border-radius: 24px;
  overflow: hidden;
}
.cs-opt {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}
.cs-opt.active {
  background: var(--dark);
  color: var(--white);
  border-radius: 24px;
}

/* CTA Versions */
.cta-version {
  margin-bottom: 16px;
}
.cta-version-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #AAA;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cta-version-label::before,
.cta-version-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #E0E0E0;
}
.guarantee {
  font-size: 11px;
  color: #888;
  text-align: center;
  margin-top: 10px;
}
.guarantee::before { content: "🛡️ "; }

/* Conditional CTA Box */
.cond-cta-box {
  background: #E3F2FD;
  border: 1px solid #90CAF9;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 11px;
  color: #0D47A1;
  margin-top: 14px;
  line-height: 1.6;
}

/* Quick Info */
.quick-info {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #F0F0F0;
}
.quick-info-title {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}
.qi-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #555;
  padding: 8px 0;
  border-bottom: 1px solid #F0F0F0;
}
.qi-row:last-child {
  border-bottom: none;
}
.qi-label { color: #999; }
.qi-value { font-weight: 600; color: var(--dark); }
.qi-value.success { color: var(--success); }

/* Share / Favorite */
.sidebar-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

/* ── RELATED COURSES ───────────────────────────────────────────────── */
.related-section {
  padding: 48px 0 64px;
  background: var(--grey-light);
}
.related-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.related-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}
.related-subtitle {
  color: #888;
  font-size: 14px;
  margin-bottom: 32px;
}
.related-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.related-card {
  flex: 1 1 calc(33.333% - 16px);
  min-width: 260px;
  max-width: calc(33.333% - 16px);
  border: 1.5px solid #DDDDDD;
  border-radius: var(--radius-md);
  padding: 18px;
  background: var(--white);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.2s;
}
.related-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.related-thumb {
  width: 80px;
  height: 70px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #C8C8C8, #E0E0E0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #999;
  flex-shrink: 0;
}
.related-info { flex: 1; }
.related-badge {
  margin-bottom: 8px;
  display: inline-block;
}
.related-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 6px;
}
.related-meta {
  font-size: 11px;
  color: #888;
  margin-top: 6px;
}
.related-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.related-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
}

/* ── FOOTER ────────────────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  padding: 48px 32px 24px;
  color: #CCC;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-brand {
  flex: 2;
  min-width: 250px;
}
.footer-col {
  flex: 1;
  min-width: 150px;
}
.footer-logo {
  width: 130px;
  height: 40px;
  background: var(--dark-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #CCC;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-desc {
  font-size: 13px;
  color: #777;
  line-height: 1.6;
}
.footer-title {
  color: #CCC;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  color: #777;
  font-size: 13px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: color 0.2s;
}
.footer-links li:hover {
  color: var(--primary);
}
.footer-bottom {
  border-top: 1px solid #2E2E4A;
  margin-top: 36px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  color: #555;
  font-size: 12px;
}
.footer-location {
  color: var(--primary);
  font-size: 12px;
}

/* ── RESPONSIVE ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .content-inner {
    flex-direction: column;
  }
  .content-sidebar {
    width: 100%;
    position: static;
  }
  .related-card {
    flex-basis: calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }
  .header-inner {
    padding: 0 16px;
  }
  .nav-items {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    gap: 12px;
    border-bottom: 2px solid #CCC;
    box-shadow: var(--shadow-md);
  }
  .nav-items.open {
    display: flex;
  }
  .nav-cta {
    width: 100%;
    justify-content: center;
  }
  .mobile-toggle {
    display: block;
    margin-left: auto;
  }
  .container,
  .breadcrumb-inner,
  .content-inner,
  .related-inner {
    padding: 0 16px;
  }
  .content-section {
    padding: 24px 0 48px;
  }
  .course-title {
    font-size: 22px;
  }
  .course-meta-row {
    gap: 12px;
  }
  .tabs {
    overflow-x: auto;
  }
  .tab-item {
    padding: 10px 16px;
    font-size: 13px;
  }
  .reviews-summary {
    flex-direction: column;
    align-items: flex-start;
  }
  .related-card {
    flex-basis: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .footer-grid {
    flex-direction: column;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .course-title {
    font-size: 20px;
  }
  .accordion-hd {
    font-size: 13px;
  }
  .sidebar-box {
    padding: 18px;
  }
  .price-current {
    font-size: 22px;
  }
}



/* --- 1. Onglets Sticky et Ancres --- */
.tabs-wrapper {
    position: sticky;
    top: 100px; 
    z-index: 100;
    background-color: #F8F8F8;
    padding: 10px 0;
}

.course-section {
    /* Évite que le titre de la section soit caché sous les onglets sticky lors du clic */
    scroll-margin-top: 70px; 
}

/* --- 2. Design de la Carte Instructeur --- */
.lcf-instructor-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.lcf-instructor-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.lcf-instructor-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.lcf-instructor-title h4 {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a202c;
}

.lcf-instructor-subtitle {
    color: #718096;
    font-size: 0.9rem;
}

.lcf-instructor-bio {
    color: #4a5568;
    /* font-size: 1.2rem; */
    line-height: 1.6;
    font-style: normal; /* Mets 'italic' si tu veux insister sur l'effet citation */
}



/* --- Correction de l'image de la sidebar --- */
.sidebar-thumb {
    width: 100%;
    overflow: hidden;
    /* Optionnel : Si ta carte (.sidebar-box) a des bords arrondis, 
       décommente la ligne ci-dessous en ajustant la valeur */
    /* border-radius: 8px 8px 0 0; */
}

.sidebar-thumb img {
    max-width: 100%;      /* Force l'image à ne jamais dépasser 100% de la largeur de la box */
    height: auto;         /* Garde les proportions de l'image */
    display: block;       /* Supprime la petite marge fantôme sous les images */
    width: 100%;          /* S'assure qu'elle prend toute la largeur disponible */
    object-fit: cover;    /* Permet un rendu propre même si le ratio de l'image varie */
}