/* Source d'un apprentissage importé depuis une vidéo YouTube ou un lien (demande du 27/10/2026) :
   type + lien sous le titre, dans le catalogue (views/qcm-du-jour.html, renderExploreItemHtml) et
   dans les fiches (buildFicheModalHtml, public/mon-univers.js). */
.qcm-learning-source {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}
.qcm-learning-source-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.qcm-learning-source-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: #e5e7eb;
}
.qcm-learning-source-kind {
  font-weight: 700;
  color: #374151;
}
.qcm-learning-source-kind i {
  margin-right: 2px;
  color: #516776;
}
.qcm-learning-source.is-youtube .qcm-learning-source-kind i {
  color: #e62117;
}
.qcm-learning-source-details {
  font-weight: 600;
  color: #6b7280;
}
.qcm-learning-source-title {
  color: #111827;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.qcm-learning-source-link {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qcm-learning-source-link:hover,
.qcm-learning-source-link:focus-visible {
  color: #1d4ed8;
}

/* Catalogue : la carte reste un bouton (ajout de l'apprentissage) ; la source est posée par-dessus
   son bas. Seul le lien capte le clic, le reste du bloc laisse passer le clic vers le bouton. */
.qcm-explore-card {
  position: relative;
}
/* Mini-fiche vidéo dépliable juste sous la carte du catalogue. */
.qcm-explore-entry > .qcm-video-info {
  margin: 4px 0 0;
}
.qcm-explore-item.has-source {
  padding-bottom: 52px;
}
.qcm-explore-item-source {
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 11px;
  pointer-events: none;
}
.qcm-explore-item-source .qcm-learning-source-link {
  align-self: flex-start;
  pointer-events: auto;
}

/* Fiche : juste sous le titre. */
.qcm-fiche-source {
  margin: 4px 0 12px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  font-size: 13px;
}

/* Mini-fiche « En savoir plus sur la vidéo » (sourceDetail.videoInfo), repliée par défaut. */
.qcm-video-info {
  margin: -4px 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  font-size: 13px;
  text-align: left;
}
.qcm-video-info-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 9px 12px;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.qcm-video-info-toggle::-webkit-details-marker {
  display: none;
}
.qcm-video-info-toggle::after {
  content: "\f078";
  font: var(--fa-font-solid, 900 1em "Font Awesome 6 Free");
  font-size: 11px;
  color: #6b7280;
  transition: transform .15s ease;
}
.qcm-video-info[open] > .qcm-video-info-toggle::after {
  transform: rotate(180deg);
}
.qcm-video-info-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px 12px;
}
.qcm-video-info-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  background: #111827;
}
.qcm-video-info-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qcm-video-info-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 36px;
  border-radius: 10px;
  background: rgba(230, 33, 23, .92);
  color: #ffffff;
  font-size: 15px;
  transform: translate(-50%, -50%);
}
.qcm-video-info-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 700;
  color: #111827;
}
.qcm-video-info-channel a {
  color: inherit;
  text-decoration: underline;
}
.qcm-video-info-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.qcm-video-info-muted {
  font-weight: 600;
  color: #6b7280;
}
.qcm-video-info-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  color: #374151;
  font-weight: 600;
}
.qcm-video-info-facts i {
  margin-right: 3px;
  color: #6b7280;
}
.qcm-video-info-heading {
  margin: 4px 0 -4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #516776;
}
.qcm-video-info-summary {
  margin: 0;
  color: #111827;
  line-height: 1.5;
}
.qcm-video-info-chapters {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.qcm-video-info-chapters a {
  display: flex;
  gap: 10px;
  padding: 5px 6px;
  border-radius: 6px;
  color: #111827;
  text-decoration: none;
}
.qcm-video-info-chapters a:hover,
.qcm-video-info-chapters a:focus-visible {
  background: #f3f4f6;
}
.qcm-video-info-time {
  flex: 0 0 auto;
  min-width: 52px;
  color: #2563eb;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.qcm-video-info-description summary {
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
}
.qcm-video-info-description p {
  margin: 6px 0 0;
  color: #374151;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.qcm-video-info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.qcm-video-info-tags span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
}
.qcm-video-info-note {
  margin: 0;
  color: #6b7280;
  font-size: 11px;
}

/* Origine de l'apprentissage (demande du 27/10/2026) : petit logo en bas à gauche des vignettes
   (Mes apprentissages, Apprentissages proposés, bilan, Mon fil, profil). Le conteneur de la
   vignette est positionné ; le libellé reste lisible par les lecteurs d'écran uniquement. */
/* Sans fond (demande du 27/10/2026) : un léger halo autour de l'icône elle-même la garde lisible
   sur une image claire comme sur une image sombre. */
.learning-origin-badge {
  position: absolute;
  left: 9px;
  bottom: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #243038;
  font-size: 19px;
  line-height: 1;
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, .95)) drop-shadow(0 0 3px rgba(255, 255, 255, .7)) drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
  pointer-events: none;
}
.learning-origin-badge.is-youtube { color: #e62117; }
.learning-origin-badge.is-ai { color: #000000; }
.learning-origin-badge.is-manual { color: #8a5a00; }
.learning-origin-badge.is-pdf { color: #c62828; }
.learning-origin-badge-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.mon-fil-card-learning-thumb,
.profil-learning-thumb {
  position: relative;
}

/* Lecture des vignettes sur toutes les surfaces d’apprentissage. */
button :is(.qcm-mesqcm-name-thumb, .qcm-comprehension-images, .profil-learning-thumb, .mon-fil-card-learning-thumb) { position: relative; }
    /* Le bouton de la vignette conserve son action et son accès clavier existants. */
    button :is(.qcm-mesqcm-name-thumb, .qcm-comprehension-images, .profil-learning-thumb, .mon-fil-card-learning-thumb)::before,
    button :is(.qcm-mesqcm-name-thumb, .qcm-comprehension-images, .profil-learning-thumb, .mon-fil-card-learning-thumb)::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      z-index: 2;
      pointer-events: none;
    }
    button :is(.qcm-mesqcm-name-thumb, .qcm-comprehension-images, .profil-learning-thumb, .mon-fil-card-learning-thumb)::before {
      width: 48px;
      height: 48px;
      border: 1px solid rgba(255, 255, 255, 0.65);
      border-radius: 50%;
      background: rgba(15, 23, 42, 0.38);
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
      transform: translate(-50%, -50%);
    }
    button :is(.qcm-mesqcm-name-thumb, .qcm-comprehension-images, .profil-learning-thumb, .mon-fil-card-learning-thumb)::after {
      width: 0;
      height: 0;
      border-top: 10px solid transparent;
      border-bottom: 10px solid transparent;
      border-left: 16px solid rgba(255, 255, 255, 0.9);
      transform: translate(-40%, -50%);
    }
    button:is(:hover, :focus-visible) :is(.qcm-mesqcm-name-thumb, .qcm-comprehension-images, .profil-learning-thumb, .mon-fil-card-learning-thumb)::before {
      background: rgba(15, 23, 42, 0.55);
    }

/* Même visuel que le bouton Masquer des rubriques d'apprentissage. */
body [data-mesqcm-close-target][data-mesqcm-close-target] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: auto;
  margin: 16px auto 0;
  padding: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #6b7280;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
body [data-mesqcm-close-target][data-mesqcm-close-target]:is(:hover, :focus-visible) {
  background: none;
  color: #243038;
}
