/* 
 * Studies Learning - Eduma Style Formations 
 * ===========================================
 */

/* ====================================================================
   RESET GLOBAL PAGE — Supprime l'image de fond du body sur cette page
==================================================================== */
.page-template-page-formations {
  background-image: none !important;
  background: #f0f4ff !important;
}

/* ====================================================================
   LAYOUT GLOBAL — Conteneur centré avec marges généreuses
==================================================================== */
.studies-p-main {
  max-width: 100%;
  overflow-x: hidden;
}

.studies-p-courses-section {
  max-width: 1400px;
  margin: auto 8rem;
  padding: 0 3rem 5rem;
}

@media (max-width: 1100px) {
  .studies-p-courses-section {
    padding: 0 2rem 4rem;
  }
}
@media (max-width: 768px) {
  .studies-p-courses-section {
    padding: 0 1.2rem 3rem;
  }
}

/* ====================================================================
   HERO BANNER — Identique à l'accueil (couleurs indigo/violet restaurées)
==================================================================== */
.eduma-hero-banner {
  background: linear-gradient(135deg, #2e1d65 0%, #3730a3 55%, #1e3a8a 100%);
  border-radius: 2.5rem;
  padding: 4rem 5rem;
  position: relative;
  overflow: hidden;
  margin: 120px 5rem 2rem; /* 110px du haut pour le header fixe ; 3rem L/R */
  height: 380px;
  display: flex;
  align-items: center;
  gap: 3rem;
  color: #fff;
  box-shadow: 0 28px 70px rgba(46, 29, 101, 0.4);
}

/* Blob décoratif haut-droite */
.eduma-hero-banner::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 500px;
  height: 380px;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.55) 0%,
    transparent 70%
  );
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Blob décoratif bas-gauche */
.eduma-hero-banner::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.4) 0%,
    transparent 70%
  );
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.eduma-hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
}

.eduma-hero-content .hero-title,
.eduma-hero-content h1 {
  font-family: "Plus Jakarta Sans", "Outfit", sans-serif;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: #fff;
}

.eduma-hero-content .hero-subtitle,
.eduma-hero-content p {
  font-family: "Plus Jakarta Sans", "Outfit", sans-serif;
  font-size: 1.05rem;
  opacity: 0.85;
  max-width: 500px;
  color: #e0e7ff;
  line-height: 1.7;
  margin-bottom: 0;
}

/* Stats badges */
.eduma-hero-stats {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.eduma-hero-stat {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.6rem 1.4rem;
  text-align: center;
}

.eduma-hero-stat strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.eduma-hero-stat span {
  font-size: 0.75rem;
  opacity: 0.7;
  color: #c7d2fe;
}

/* ---- Robot image & speech bubble (reprend les classes de l'accueil) ---- */
.eduma-hero-image {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  width: 450px;
}

/* Le robot réutilise .robot-image de style.css (floatRobot animation) */
.eduma-hero-image .robot-image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Speech bubble reprend .speech-bubble-modern de style.css */
.eduma-hero-image .speech-bubble-modern {
  top: 60px;
  right: 60px;
  z-index: 15;
}

/* ---- Sphères flottantes (reprennent les classes de style.css) ---- */
/* Les animations sphere-X sont déjà définies dans style.css */
.eduma-hero-banner .floating-sphere {
  z-index: 1 !important; /* Derrière le texte */
}
.eduma-hero-content {
  position: relative;
  z-index: 10;
}

@media (max-width: 1100px) {
  .eduma-hero-banner {
    margin: 110px 2rem 3rem;
    padding: 3.5rem 3rem;
    gap: 2rem;
  }
  .eduma-hero-image {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .eduma-hero-banner {
    flex-direction: column;
    text-align: center;
    padding: 3rem 2rem;
    margin: 90px 1.2rem 2.5rem;
    gap: 1.5rem;
  }
  .eduma-hero-content .hero-subtitle {
    margin: 0 auto;
  }
  .eduma-hero-stats {
    justify-content: center;
  }
  .eduma-hero-image {
    width: 180px;
    margin: 0 auto;
  }
  .eduma-hero-image .speech-bubble-modern {
    right: 0;
  }
}

/* ====================================================================
   EN-TÊTE DE SECTION — Centré
==================================================================== */
.studies-p-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.studies-p-section-title-block h2 {
  font-family: "Plus Jakarta Sans", "Outfit", sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.studies-p-section-title-block p {
  font-size: 1rem;
  color: #64748b;
  margin: 0 auto;
  max-width: 540px;
}

.accent-line {
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 4px;
  margin: 0.7rem auto 0;
}

/* ====================================================================
   BARRE DE RECHERCHE — Centrée
==================================================================== */
.eduma-filter-wrapper {
  margin: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eduma-search-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-bottom: 1.8rem;
}

.eduma-search-container .ph-magnifying-glass {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.2rem;
  pointer-events: none;
}

.eduma-search-input {
  width: 100%;
  padding: 0.9rem 1.2rem 0.9rem 3.2rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  font-family: "Plus Jakarta Sans", "Outfit", sans-serif;
  font-size: 0.95rem;
  background: #fff;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

.eduma-search-input::placeholder {
  color: #94a3b8;
}

.eduma-search-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Dropdown masqué par défaut */
.eduma-search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  z-index: 100;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}
.eduma-search-results.active {
  display: block;
}
.eduma-search-results.hidden {
  display: none !important;
}

/* ====================================================================
   BULLES DE CATÉGORIES — Centrées
==================================================================== */
.eduma-categories-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.eduma-bubble {
  padding: 0.5rem 1.1rem;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  color: #475569;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}

.eduma-bubble:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.eduma-bubble.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

/* ====================================================================
   FILTRES PRIX / NIVEAU — Centrés
==================================================================== */
.studies-p-filter-toggles {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1rem 1.6rem;
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.studies-p-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.studies-p-filter-label {
  font-weight: 700;
  font-size: 0.78rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.studies-p-filter-toggle {
  padding: 0.4rem 1rem;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 50px;
  color: #475569;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  cursor: pointer;
  white-space: nowrap;
}

.studies-p-filter-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.studies-p-filter-toggle.active {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #4338ca;
}

/* ====================================================================
   GRID HEADER — Compteur + Toggle Vues
==================================================================== */
.eduma-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-top: 2rem;
  border-top: 1.5px solid #f1f5f9;
}

.eduma-results-count {
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
}

.eduma-results-count strong {
  color: #0f172a;
  font-size: 1.05rem;
}

/* Toggle Grille / Liste */
.eduma-view-toggle {
  display: flex;
  gap: 0.3rem;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 0.3rem;
}

.view-btn {
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
}

.view-btn:hover {
  color: #475569;
}

.view-btn.active {
  background: #fff;
  color: #4f46e5;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* ====================================================================
   COURSE GRID — Mode Grille (défaut)
==================================================================== */
.eduma-courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

@media (max-width: 1100px) {
  .eduma-courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .eduma-courses-grid {
    grid-template-columns: 1fr;
  }
}

/* ====================================================================
   COURSE GRID — Mode Liste
==================================================================== */
.eduma-courses-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.eduma-courses-grid.list-view .eduma-course-card {
  flex-direction: row;
  max-height: 200px; /* Hauteur fixe pour éviter déformation */
}

.eduma-courses-grid.list-view .eduma-course-img-wrap {
  width: 240px;
  min-width: 240px;
  height: 200px;
  flex-shrink: 0;
  border-radius: 16px 0 0 16px;
}

.eduma-courses-grid.list-view .eduma-course-content {
  flex: 1;
  min-width: 0; /* Empêche le débordement du texte */
  padding: 1.2rem 1.5rem;
  overflow: hidden;
}

.eduma-courses-grid.list-view .eduma-course-title {
  padding-bottom: 0.5rem;
  /* Tronquer si trop long */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .eduma-courses-grid.list-view .eduma-course-card {
    flex-direction: column;
    max-height: none;
  }
  .eduma-courses-grid.list-view .eduma-course-img-wrap {
    width: 100%;
    min-width: 0;
    border-radius: 16px 16px 0 0;
  }
}

/* ====================================================================
   COURSE CARD — Design général
==================================================================== */
.eduma-course-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1.5px solid #f1f5f9;
}

.eduma-course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.12);
  border-color: #c7d2fe;
}

.eduma-course-img-wrap {
  position: relative;
  height: 210px;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  background: #f1f5f9;
}

.eduma-course-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.eduma-course-card:hover .eduma-course-img-wrap img {
  transform: scale(1.06);
}

.eduma-course-img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}

.eduma-course-img-fallback i {
  font-size: 3rem;
  color: #a5b4fc;
}

.eduma-course-content {
  padding: 1.4rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.eduma-course-author {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.eduma-course-title {
  font-family: "Plus Jakarta Sans", "Outfit", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 auto;
  line-height: 1.45;
  padding-bottom: 1rem;
}

.eduma-course-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.eduma-course-title a:hover {
  color: #4f46e5;
}

.eduma-course-footer {
  padding-top: 1rem;
  border-top: 1.5px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.eduma-course-meta-icons {
  display: flex;
  gap: 0.8rem;
  color: #64748b;
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.eduma-course-meta-icons span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.eduma-course-meta-icons i {
  color: #a5b4fc;
  font-size: 1rem;
}

.eduma-course-price {
  font-weight: 800;
  font-size: 1rem;
  color: #0f172a;
  white-space: nowrap;
}

.eduma-course-price.is-free {
  color: #16a34a;
  background: #f0fdf4;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  border: 1px solid #bbf7d0;
  font-size: 0.82rem;
}

/* ====================================================================
   ÉTAT VIDE
==================================================================== */
.studies-p-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: #64748b;
}

.studies-p-empty-icon {
  font-size: 4rem;
  color: #c7d2fe;
  margin-bottom: 1.5rem;
}

.studies-p-empty p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.studies-p-btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 0.75rem 1.8rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.studies-p-btn-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
  color: #fff;
}

/* ====================================================================
   PAGINATION — WordPress génère <ul> quand type='list'
==================================================================== */
.eduma-pagination {
  margin: 3.5rem auto 1rem;
  display: flex;
  justify-content: center;
}

.eduma-pagination ul {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.eduma-pagination ul li {
  display: flex;
}

.eduma-pagination ul li a,
.eduma-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.7rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  background: #fff;
}

.eduma-pagination ul li a:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #4338ca;
}

.eduma-pagination ul li span.current {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.eduma-pagination ul li span.dots {
  background: transparent;
  border-color: transparent;
  color: #94a3b8;
  cursor: default;
}
