:root {
  --primary: #1b54f2;
  --primary-soft: #e7eeff;
  --accent: #21c48a;
  --accent-soft: #dcf7ee;
  --warning: #ffb937;
  --bg: #f4f4f6;
  --text: #131313;
  --muted: #7a7a8c;
  --border: #e0e0e5;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --shadow-soft: 0 18px 40px rgba(9, 15, 46, 0.12);
  --shadow-card: 0 10px 25px rgba(14, 25, 60, 0.08);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top left, #e7eeff 0, #f4f4f6 40%, #ffffff 80%);
  color: var(--text);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Layout global */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(244, 244, 246, 0.88);
  border-bottom: 1px solid rgba(224, 224, 229, 0.8);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}

.logo-badge {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #4c8dff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.3rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-outline {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

.btn-outline:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4c8dff);
  color: #fff;
  box-shadow: 0 16px 40px rgba(21, 84, 242, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 18px 45px rgba(21, 84, 242, 0.5);
}

/* Hero */
.hero {
  padding: 3rem 0 2.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(33, 196, 138, 0.08);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}

.hero-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.hero-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: clamp(2.3rem, 3vw + 1.6rem, 3.1rem);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.hero-title span.highlight {
  background: linear-gradient(120deg, var(--accent), var(--primary));
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 440px;
  margin-bottom: 1.4rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.3rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-meta strong {
  color: var(--text);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 185, 55, 0.14);
  color: #9a6000;
  font-weight: 600;
}

.hero-badge-star {
  font-size: 0.9rem;
}

.hero-illustration {
  position: relative;
}

.hero-card {
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}

.hero-card-title {
  font-weight: 600;
  font-size: 0.98rem;
}

.hero-card-chip {
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
}

.hero-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.1rem;
}

.hero-stat {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-lg);
  background: #f7f7fb;
}

.hero-stat-label {
  font-size: 0.73rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.hero-stat-value {
  font-size: 0.95rem;
  font-weight: 600;
}

.hero-progress {
  margin-bottom: 1.1rem;
}

.hero-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.hero-progress-bar {
  height: 7px;
  border-radius: 999px;
  background: #e4e4f0;
  overflow: hidden;
}

.hero-progress-fill {
  height: 100%;
  width: 68%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #4ce2a7);
}

.hero-students-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.avatars {
  display: flex;
  align-items: center;
}

.avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--primary);
  margin-left: -6px;
}

.avatar-circle:first-child {
  margin-left: 0;
}

.hero-note {
  position: absolute;
  right: -6px;
  top: -12px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #131313;
  color: #fff;
  font-size: 0.75rem;
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.hero-note-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #21c48a;
}

/* Sections */
.section {
  padding: 1.75rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.section-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.25rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 400px;
}

.chip-pill {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
}

/* Domaines */
.domains-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.domain-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.domain-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
}

.domain-title {
  font-weight: 600;
  font-size: 0.98rem;
}

.domain-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.domain-pill {
  margin-top: 0.4rem;
  align-self: flex-start;
  font-size: 0.75rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(27, 84, 242, 0.07);
  color: var(--primary);
  font-weight: 500;
}

.domain-icon.maths {
  background: #e9f0ff;
  color: #1b54f2;
}
.domain-icon.physique {
  background: #fff4df;
  color: #c27a00;
}
.domain-icon.info {
  background: #dcf7ee;
  color: #1a8f63;
}
.domain-icon.economie {
  background: #ffe8f4;
  color: #c2185b;
}
.domain-icon.ia {
  background: #efe5ff;
  color: #6a1bb9;
}
.domain-icon.pro {
  background: #e5f0ff;
  color: #0b65c2;
}

/* Pourquoi */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.why-card {
  border-radius: var(--radius-lg);
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
}

.why-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(27, 84, 242, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--primary);
}

.why-title {
  font-weight: 600;
  margin-bottom: 0.15rem;
  font-size: 0.92rem;
}

.why-text {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Forum block */
.forum-wrapper {
  border-radius: var(--radius-xl);
  background: #13131b;
  color: #f5f5ff;
  padding: 1.3rem 1.4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.4rem;
}

.forum-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.forum-text {
  font-size: 0.86rem;
  color: #c7c7f5;
  margin-bottom: 0.8rem;
}

.forum-meta {
  font-size: 0.8rem;
  color: #9e9ef0;
  margin-bottom: 0.5rem;
}

.forum-btn {
  background: #f5f5ff;
  color: #13131b;
  box-shadow: none;
  padding-inline: 1.15rem;
}

.forum-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.84rem;
}

.forum-item {
  padding: 0.55rem 0.6rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.forum-item-title {
  font-weight: 500;
  margin-bottom: 0.1rem;
}

.forum-item-meta {
  font-size: 0.78rem;
  color: #a2a2d8;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 600;
  margin-top: 0.45rem;
  font-size: 0.85rem;
}

.testimonial-country {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Footer */
.footer {
  border-top: 1px solid rgba(210, 210, 220, 0.9);
  margin-top: 2rem;
  padding: 1.6rem 0 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(248, 248, 252, 0.9);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-social {
  display: flex;
  gap: 0.6rem;
  font-size: 1.1rem;
}

.footer-social a {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--muted);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-illustration {
    order: -1;
  }

  .forum-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .domains-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .navbar-inner {
    gap: 0.75rem;
  }

  .nav-links {
    display: none;
  }

  .nav-actions .btn-outline {
    display: none;
  }

  .hero {
    padding-top: 2rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .domains-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .why-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* --------- Auth (connexion / inscription) --------- */

.auth-section {
  padding: 3rem 0 2.5rem;
}

.auth-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.auth-header h1 {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.9rem;
  margin-bottom: 0.4rem;
}

.auth-header p {
  font-size: 0.95rem;
  color: var(--muted);
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.auth-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow-card);
}

.auth-card h2 {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}

.auth-subtext {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group select {
  border-radius: 11px;
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(27, 84, 242, 0.15);
  background: #fbfbff;
}

.form-row {
  display: flex;
  gap: 0.75rem;
}

.form-row.between {
  justify-content: space-between;
  align-items: center;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.checkbox input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}

.auth-link {
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  margin-top: 0.4rem;
}

.auth-footer-text {
  font-size: 0.83rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* Responsive pour la page auth */
@media (max-width: 900px) {
  .auth-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .auth-section {
    padding-top: 2.2rem;
  }

  .auth-card {
    padding: 1.3rem 1.2rem;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row.between {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }
}
/* --------- Liste des cours --------- */

.courses-section {
  padding: 3rem 0 2.5rem;
}

.courses-header {
  margin-bottom: 1.5rem;
}

.courses-header .section-title {
  font-size: 1.7rem;
}

.courses-search-row {
  margin-top: 1rem;
  display: flex;
  gap: 0.9rem;
  align-items: flex-end;
}

.courses-search-row .courses-search {
  flex: 1;
}

.courses-search-row .courses-search input {
  width: 100%;
}

.courses-search-row .courses-sort {
  min-width: 210px;
}

.courses-layout {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: flex-start;
}

/* Filtres */
.courses-filters {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  padding: 1.2rem 1.2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-group {
  border-bottom: 1px solid rgba(224, 224, 229, 0.7);
  padding-bottom: 0.8rem;
  margin-bottom: 0.7rem;
}

.filter-group:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.filter-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
  cursor: pointer;
}

.filter-option input {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}

.courses-reset {
  margin-top: 0.3rem;
  width: 100%;
  font-size: 0.85rem;
}

/* Liste des cours */
.courses-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.course-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.course-header-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.course-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.05rem;
}

.course-meta-row {
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.course-level-badge {
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
}

.course-category {
  font-size: 0.8rem;
  color: var(--muted);
}

.course-tag-popular,
.course-tag-new,
.course-tag-advanced {
  font-size: 0.78rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

.course-tag-popular {
  background: rgba(255, 185, 55, 0.16);
  color: #9a6000;
}

.course-tag-new {
  background: rgba(33, 196, 138, 0.16);
  color: #0f7b54;
}

.course-tag-advanced {
  background: rgba(106, 27, 185, 0.13);
  color: #6a1bb9;
}

.course-description {
  font-size: 0.9rem;
  color: var(--muted);
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.course-progress {
  margin-top: 0.2rem;
}

.course-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.course-progress-bar {
  height: 7px;
  border-radius: 999px;
  background: #e4e4f0;
  overflow: hidden;
}

.course-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #4ce2a7);
}

.course-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.tag-pill {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(27, 84, 242, 0.06);
  color: var(--primary);
  font-weight: 500;
  font-size: 0.78rem;
}

.course-btn {
  font-size: 0.85rem;
}

/* Pagination */
.courses-pagination {
  margin-top: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(224, 224, 229, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.page-pill {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 0.82rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

.page-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.page-ellipsis {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Responsive pour la liste des cours */
@media (max-width: 900px) {
  .courses-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .courses-section {
    padding-top: 2.2rem;
  }

  .courses-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .course-header-row {
    flex-direction: column;
  }

  .course-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .courses-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .courses-pagination .btn {
    width: 100%;
    justify-content: center;
  }
}
/* --------- Forum : liste des sujets --------- */

.forum-section {
  padding: 3rem 0 2.5rem;
}

.forum-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.forum-header-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.forum-header-actions .forum-search {
  min-width: 260px;
}

.forum-header-actions .forum-search input {
  width: 100%;
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: flex-start;
}

.forum-sidebar {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  padding: 1.2rem 1.2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.forum-cat {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  padding: 0.25rem 0;
}

.forum-cat.active {
  color: var(--primary);
  font-weight: 600;
}

.forum-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Liste côté droit */
.forum-list-main {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-card);
}

.forum-list-header-row {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 0.9fr) 80px 140px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid rgba(224, 224, 229, 0.9);
  padding-bottom: 0.4rem;
  margin-bottom: 0.5rem;
}

.forum-topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 0.9fr) 80px 140px;
  gap: 0.5rem;
  font-size: 0.86rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(224, 224, 229, 0.5);
}

.forum-topic-row:last-of-type {
  border-bottom: none;
}

.forum-topic-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.forum-topic-title {
  font-weight: 500;
  color: var(--text);
}

.forum-topic-title:hover {
  color: var(--primary);
}

.forum-topic-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.forum-author strong {
  font-weight: 600;
}

.forum-topic-category {
  display: flex;
  align-items: center;
}

.forum-category-pill {
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.forum-category-pill.general {
  background: rgba(27, 84, 242, 0.08);
  color: var(--primary);
}

.forum-category-pill.second {
  background: rgba(255, 185, 55, 0.18);
  color: #9a6000;
}

.forum-category-pill.univ {
  background: rgba(106, 27, 185, 0.12);
  color: #6a1bb9;
}

.forum-category-pill.dev {
  background: rgba(33, 196, 138, 0.18);
  color: #0f7b54;
}

.forum-category-pill.ia {
  background: rgba(19, 19, 27, 0.12);
  color: #13131b;
}

.forum-topic-count {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  justify-content: center;
}

.forum-topic-last {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.forum-last-user {
  font-size: 0.78rem;
}

/* Pagination forum */
.forum-pagination {
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(224, 224, 229, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

/* --------- Forum : page topic --------- */

.topic-section {
  padding: 3rem 0 2.5rem;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-current {
  color: var(--text);
}

.topic-header {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.topic-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
}

.topic-meta {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Posts */
.topic-post {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 0.7rem;
}

.topic-post-main {
  border: 1px solid var(--primary-soft);
}

.topic-post-header {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.topic-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.topic-post-author {
  font-size: 0.9rem;
  font-weight: 600;
}

.topic-post-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.topic-post-body {
  font-size: 0.9rem;
  color: var(--text);
}

.topic-post-body p + p {
  margin-top: 0.45rem;
}

/* Réponse form */
.topic-reply {
  margin-top: 1.2rem;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-card);
}

.topic-reply h2 {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.topic-reply-subtext {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.topic-reply-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.topic-reply-form textarea {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0.7rem 0.8rem;
  min-height: 140px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topic-reply-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(27, 84, 242, 0.12);
}

.topic-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* Responsive forum */
@media (max-width: 900px) {
  .forum-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .forum-list-header-row,
  .forum-topic-row {
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  }

  .forum-topic-count,
  .forum-topic-last {
    display: none;
  }

  .topic-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .forum-section,
  .topic-section {
    padding-top: 2.2rem;
  }

  .forum-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .forum-header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .forum-header-actions .forum-search {
    width: 100%;
  }

  .forum-list-main {
    padding: 1rem 0.9rem;
  }

  .topic-post {
    padding: 0.9rem 0.9rem;
  }

  .topic-reply-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .topic-reply-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
/* --------- Détail du cours --------- */

.course-detail-section {
  padding: 3rem 0 2.5rem;
}

.course-detail-header {
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius-xl);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.3rem;
}

.course-detail-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.course-detail-meta {
  font-size: 0.83rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.course-detail-level {
  background: var(--primary-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
}

.course-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
}

.course-detail-video {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #000;
  height: 260px;
  margin-bottom: 1rem;
  display: flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:600;
}

.video-placeholder {
  opacity: 0.6;
  font-size: 1.1rem;
}

/* Onglets */
.course-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.course-tab {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.83rem;
  padding: 0.4rem 1rem;
  cursor: pointer;
}

.course-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Programme */
.programme-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.programme-item {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.programme-left h4 {
  font-size: 0.95rem;
  margin: 0;
}

.programme-duration {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Avis */
.review {
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0;
}

.review:last-of-type {
  border-bottom: none;
}

.review-header {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.review-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:600;
}

.review-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Sidebar */
.course-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.course-sidebar-card {
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius-xl);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-card);
}

.sidebar-progress{
  margin:0.5rem 0;
}

.sidebar-progress-bar{
  height:7px;
  background:#e4e4f0;
  border-radius:999px;
  overflow:hidden;
}

.sidebar-progress-fill{
  height:100%;
  background:var(--accent);
}

.sidebar-stats{
  font-size:0.82rem;
  color:var(--muted);
  display:flex;
  flex-direction:column;
  gap:0.2rem;
  margin-bottom:0.7rem;
}

.sidebar-includes{
  font-size:0.85rem;
  display:flex;
  flex-direction:column;
  gap:0.3rem;
}

/* Responsive */
@media (max-width: 900px) {
  .course-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-btn-enroll {
    width:100%;
  }
}

@media (max-width: 640px) {
  .course-tabs {
    flex-wrap: wrap;
  }

  .course-detail-section {
    padding-top: 2.2rem;
  }
}

/* =========================================================
   DASHBOARD — design "de dingue" (ajout non destructif)
   ========================================================= */

.dash {
  padding: 32px 0 56px;
}

.dash-hero {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  background: radial-gradient(1200px 600px at 10% 10%, rgba(79, 70, 229, .22), transparent 55%),
              radial-gradient(900px 500px at 90% 20%, rgba(59, 130, 246, .18), transparent 60%),
              linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  box-shadow:
    0 30px 80px rgba(15, 23, 42, .18),
    0 1px 0 rgba(255,255,255,.16) inset;
}

.dash-hero-bg {
  position: absolute;
  inset: -40px;
  background:
    radial-gradient(circle at 20% 15%, rgba(99,102,241,.35), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(56,189,248,.25), transparent 45%),
    radial-gradient(circle at 55% 90%, rgba(34,197,94,.10), transparent 50%);
  filter: blur(6px);
  opacity: .85;
  pointer-events: none;
}

.dash-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 18px;
  padding: 26px;
}

.dash-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: .2px;
  color: rgba(15, 23, 42, .78);
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
  padding: 8px 12px;
  width: fit-content;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

.dash-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(99,102,241,1), rgba(59,130,246,1));
  box-shadow: 0 0 0 4px rgba(99,102,241,.14);
}

.dash-title {
  margin: 14px 0 6px;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.04;
  letter-spacing: -.5px;
}

.dash-subtitle {
  margin: 0 0 16px;
  color: rgba(15, 23, 42, .72);
  font-size: 16px;
}

.dash-chips {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.dash-chip {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .10);
  backdrop-filter: blur(10px);
}

.dash-chip-glow {
  position: relative;
}
.dash-chip-glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 20%, rgba(99,102,241,.35), transparent 55%),
              radial-gradient(circle at 80% 70%, rgba(56,189,248,.25), transparent 60%);
  opacity: .75;
  pointer-events: none;
  z-index: -1;
}

.chip-icon {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .06);
  color: rgba(15, 23, 42, .85);
}
.chip-icon svg {
  width: 18px;
  height: 18px;
}

.chip-label {
  font-size: 12px;
  color: rgba(15, 23, 42, .55);
}
.chip-value {
  font-weight: 700;
  color: rgba(15, 23, 42, .92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-cta {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-hero-right {
  display: grid;
  gap: 12px;
}

.dash-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dash-metric {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .10);
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 72px;
}

.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(99,102,241,.10);
  color: rgba(55,48,163,1);
}
.metric-icon svg {
  width: 22px;
  height: 22px;
}

.metric-value {
  font-weight: 800;
  font-size: 18px;
  line-height: 1.1;
}
.metric-label {
  font-size: 12px;
  color: rgba(15, 23, 42, .60);
}

.dash-tip {
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .86), rgba(15, 23, 42, .72));
  color: rgba(255,255,255,.92);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
  border: 1px solid rgba(255,255,255,.12);
}

.dash-tip-title {
  font-weight: 800;
  letter-spacing: .2px;
  margin-bottom: 6px;
}
.dash-tip-text {
  color: rgba(255,255,255,.80);
  font-size: 13px;
  line-height: 1.4;
}

/* Grid cards */
.dash-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.45fr .55fr;
  gap: 16px;
  align-items: start;
}

.dash-card {
  border-radius: 24px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 22px 60px rgba(15, 23, 42, .12);
  backdrop-filter: blur(10px);
  padding: 18px;
}

.dash-card-wide {
  padding: 18px;
}

.dash-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.dash-card-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.2px;
}
.dash-card-subtitle {
  margin: 6px 0 0;
  color: rgba(15, 23, 42, .62);
  font-size: 13px;
  line-height: 1.35;
}

.dash-card-actions {
  display: flex;
  gap: 10px;
}

/* Course list */
.dash-course-list {
  display: grid;
  gap: 12px;
}

.dash-course {
  border-radius: 20px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, .06);
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.72));
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.dash-course-title {
  font-weight: 800;
  letter-spacing: -.2px;
  margin-bottom: 6px;
}
.dash-course-meta {
  color: rgba(15, 23, 42, .60);
  font-size: 12px;
  margin-bottom: 10px;
}
.dash-course-desc {
  color: rgba(15, 23, 42, .72);
  font-size: 14px;
  margin-bottom: 12px;
}

.dash-course-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 170px;
}

.dash-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(15, 23, 42, .62);
  margin-bottom: 8px;
}
.dash-progress-value {
  font-weight: 800;
  color: rgba(15, 23, 42, .85);
}

.dash-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
  overflow: hidden;
}
.dash-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(99,102,241,1), rgba(59,130,246,1));
  box-shadow: 0 10px 24px rgba(99,102,241,.25);
}

/* Quick actions */
.dash-quick {
  display: grid;
  gap: 10px;
}

.dash-quick-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, .06);
  background: rgba(255,255,255,.72);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dash-quick-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .12);
  border-color: rgba(99,102,241,.28);
}

.quick-ico {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(59,130,246,.10);
  display: grid;
  place-items: center;
  font-size: 18px;
}
.quick-title {
  font-weight: 800;
  display: block;
  line-height: 1.15;
}
.quick-sub {
  display: block;
  font-size: 12px;
  color: rgba(15, 23, 42, .62);
  margin-top: 4px;
}
.quick-arrow {
  color: rgba(15, 23, 42, .35);
  font-weight: 800;
}

/* Teacher */
.dash-teacher {
  display: grid;
  gap: 12px;
}

.dash-banner {
  border-radius: 20px;
  padding: 14px;
  background: radial-gradient(800px 300px at 20% 20%, rgba(99,102,241,.20), transparent 50%),
              linear-gradient(180deg, rgba(255,255,255,.80), rgba(255,255,255,.68));
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .09);
}
.dash-banner-title {
  font-weight: 800;
  margin-bottom: 6px;
}
.dash-banner-text {
  color: rgba(15, 23, 42, .68);
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 10px;
}

/* Buttons sizing helpers (si pas déjà présents) */
.btn.btn-sm {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 980px) {
  .dash-hero-content {
    grid-template-columns: 1fr;
  }
  .dash-chips {
    grid-template-columns: 1fr;
  }
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .dash-course {
    grid-template-columns: 1fr;
  }
  .dash-course-actions {
    flex-direction: row;
    min-width: auto;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .dash {
    padding: 18px 0 42px;
  }
  .dash-hero-content {
    padding: 18px;
  }
  .dash-card {
    padding: 14px;
  }
}



/* =========================================================
   FORUM & TOPIC — DESIGN BOOST (non destructif)
   Ajout : améliore l'esthétique sans casser ton layout actuel
   ========================================================= */

.forum-section, .topic-section{
  position: relative;
}

.forum-list-main, .forum-sidebar,
.topic-header, .topic-post, .topic-reply{
  border: 1px solid rgba(224,224,229,0.90);
  background: rgba(255,255,255,0.97);
}

/* --- Forum: header --- */
.forum-header .section-title{
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}

.forum-header-actions .btn{
  box-shadow: 0 12px 30px rgba(21, 84, 242, 0.14);
}

.forum-header-actions .forum-search input{
  border-radius: 999px;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(224,224,229,0.95);
  background: rgba(255,255,255,0.92);
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

.forum-header-actions .forum-search input:focus{
  border-color: rgba(27, 84, 242, 0.55);
  box-shadow: 0 16px 38px rgba(21, 84, 242, 0.18);
  transform: translateY(-1px);
}

/* --- Forum: sidebar premium --- */
.forum-sidebar{
  position: sticky;
  top: 84px;
  overflow: hidden;
}

.forum-sidebar::before{
  content:"";
  position:absolute;
  inset: -60px -80px auto -80px;
  height: 180px;
  background: radial-gradient(circle at 30% 30%, rgba(27,84,242,0.14), transparent 60%);
  pointer-events:none;
}

.forum-sidebar > *{
  position: relative;
  z-index: 1;
}

.forum-sidebar .filter-title{
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.forum-cat{
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.5rem;
  border-radius: 14px;
  transition: background .15s ease, transform .15s ease, color .15s ease;
}

.forum-cat:hover{
  background: rgba(27, 84, 242, 0.06);
  transform: translateY(-1px);
  color: var(--primary);
}

.forum-cat.active{
  background: rgba(27, 84, 242, 0.10);
  color: var(--primary);
  font-weight: 700;
}

/* --- Forum: list container --- */
.forum-list-main{
  padding: 1.15rem 1.25rem;
  box-shadow: 0 22px 60px rgba(14, 25, 60, 0.10);
}

.forum-list-header-row{
  position: sticky;
  top: 78px;
  background: rgba(244, 244, 246, 0.94);
  backdrop-filter: blur(16px);
  z-index: 2;
  border-bottom: 1px solid rgba(224,224,229,0.90);
  padding-bottom: 0.55rem;
  margin-bottom: 0.4rem;
}

.forum-topic-row{
  border-bottom: 1px solid rgba(224,224,229,0.55);
  border-radius: 14px;
  padding: 0.7rem 0.55rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.forum-topic-row:hover{
  background: rgba(27, 84, 242, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(14, 25, 60, 0.10);
}

.forum-topic-title{
  font-weight: 700;
  letter-spacing: -0.01em;
}

.forum-topic-meta{
  gap: 0.5rem;
}

.forum-topic-count{
  border-radius: 999px;
  background: rgba(27, 84, 242, 0.08);
  color: var(--primary);
  padding: 0.22rem 0.55rem;
  font-weight: 700;
  justify-content: center;
  align-self: center;
}

/* --- Category pills : un peu plus “premium” --- */
.forum-category-pill{
  border: 1px solid rgba(224,224,229,0.85);
  box-shadow: 0 10px 22px rgba(14, 25, 60, 0.06);
}

.forum-pagination{
  padding-top: 1rem;
}

.forum-pagination .btn{
  box-shadow: none;
}

/* =========================================================
   TOPIC — page discussion
   ========================================================= */

.breadcrumb{
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(224,224,229,0.95);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  width: fit-content;
}

.topic-header{
  position: relative;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(14, 25, 60, 0.10);
}

.topic-header::before{
  content:"";
  position:absolute;
  inset:-40px -40px auto -40px;
  height: 180px;
  background:
    radial-gradient(circle at 20% 30%, rgba(27,84,242,0.16), transparent 60%),
    radial-gradient(circle at 80% 25%, rgba(33,196,138,0.12), transparent 62%);
  pointer-events:none;
}

.topic-header > *{
  position: relative;
  z-index: 1;
}

.topic-title{
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.topic-post{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(224,224,229,0.90);
  box-shadow: 0 18px 45px rgba(14, 25, 60, 0.08);
}

.topic-post::before{
  content:"";
  position:absolute;
  top: 14px;
  bottom: 14px;
  left: 12px;
  width: 4px;
  border-radius: 999px;
  background: rgba(27, 84, 242, 0.20);
}

.topic-post-main::before{
  background: rgba(27, 84, 242, 0.55);
}

.topic-post-header{
  margin-left: 10px;
}

.topic-post-body{
  margin-left: 10px;
}

.topic-avatar{
  box-shadow: 0 14px 30px rgba(21, 84, 242, 0.22);
}

/* Reply card */
.topic-reply{
  box-shadow: 0 22px 60px rgba(14, 25, 60, 0.10);
}

.topic-reply-form textarea{
  background: rgba(255,255,255,0.96);
}

.topic-reply-actions .btn-primary{
  box-shadow: 0 16px 40px rgba(21, 84, 242, 0.35);
}

/* Mobile improvements */
@media (max-width: 900px){
  .forum-list-header-row{
    position: static;
    backdrop-filter: none;
  }
}

@media (max-width: 640px){
  .forum-topic-row{
    padding: 0.75rem 0.65rem;
  }
  .topic-title{
    font-size: 1.25rem;
  }
}


/* =========================================================
   HOME HERO DECOR — outils écoliers/étudiants (animé)
   ========================================================= */
body[data-page="home"] .hero{
  position: relative;
  overflow: hidden;
}

body[data-page="home"] .hero-decor{
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body[data-page="home"] .hero-inner{
  position: relative;
  z-index: 1;
}

body[data-page="home"] .hero-decor-item{
  position: absolute;
  width: 150px;
  height: 150px;
  color: rgba(88,120,255,.22);
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.06));
  transition: transform 120ms ease-out;
  animation: heroFloat 7.5s ease-in-out infinite;
}

body[data-page="home"] .hero-decor-svg{ width:100%; height:100%; }

body[data-page="home"] .hero-decor-item.h1{ top: 16%; left: 6%;  animation-duration: 9s; }
body[data-page="home"] .hero-decor-item.h2{ bottom: 14%; left: 10%; animation-duration: 10.5s; }
body[data-page="home"] .hero-decor-item.h3{ top: 18%; right: 8%; animation-duration: 8s; }
body[data-page="home"] .hero-decor-item.h4{ bottom: 16%; right: 10%; animation-duration: 11s; }

@keyframes heroFloat{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-16px); }
}

@media (max-width: 900px){
  body[data-page="home"] .hero-decor-item{ display:none; }
}

@media (prefers-reduced-motion: reduce){
  body[data-page="home"] .hero-decor-item{ animation: none; transition: none; }
}
