/* ============================================================================
   fai.world — Médiathèque FAI Masterclasses 2026 (/masterclasses/)
   Charte stricte du site :
     Couleurs : #03acdc · #317AB4 / #222222 · #276f7c -> #52adbb (survol #89a97e -> #31a9c3)
                #333333 / #666666 / #999999 · #eeeeee / #dddddd · #f5f5f5 · #ffffff · #000000
     Tailles  : 36 / 30 / 24 / 18 / 16 / 15 / 14 / 13 / 12 px
     Polices  : Montserrat (corps/titres) · Open Sans (boutons)
   ============================================================================ */

.fai-med-page {
  padding: 20px 0 48px;
}

.fai-med-retour {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.42857143;
}
.fai-med-retour a {
  color: #03acdc;
  text-decoration: none;
  font-weight: 600;
}
.fai-med-retour a:hover,
.fai-med-retour a:focus {
  color: #333333;
  text-decoration: underline;
}
.fai-med-retour i {
  margin-right: 6px;
}

.fai-med-entete {
  margin-bottom: 26px;
}
.fai-med-entete .sppb-title-heading {
  font-size: 30px;
  line-height: 1.2;
  color: #333333;
  margin: 0 0 10px;
}
.fai-med-entete .sppb-title-subheading {
  font-size: 15px;
  line-height: 1.42857143;
  color: #666666;
  max-width: 780px;
  margin: 0 auto 18px;
}

.fai-med-bilan {
  font-size: 14px;
  line-height: 1.42857143;
  color: #333333;
  margin: 0 auto 20px;
  max-width: 780px;
  text-align: center;
}
.fai-med-bilan strong {
  color: #03acdc;
}

.fai-med-actions-entete {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

/* ----------------------------------------------------- barre de filtres */
.fai-med-filtres {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.fai-med-filtre {
  appearance: none;
  background-color: #f5f5f5;
  border: 1px solid #dddddd;
  border-radius: 4px;
  color: #333333;
  cursor: pointer;
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding: 9px 14px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.fai-med-filtre:hover,
.fai-med-filtre:focus {
  background-color: #eeeeee;
  border-color: #03acdc;
  color: #222222;
}
.fai-med-filtre.is-active {
  background-color: #317AB4;
  border-color: #317AB4;
  color: #ffffff;
}

/* ----------------------------------------------------- groupes par session */
.fai-med-session {
  margin-bottom: 38px;
}
.fai-med-session.is-hidden {
  display: none;
}

.fai-med-session-entete {
  border-bottom: 1px solid #eeeeee;
  margin-bottom: 20px;
  padding-bottom: 10px;
}
.fai-med-session-entete h2 {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: #333333;
}
.fai-med-session-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: #03acdc;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 10px;
}
.fai-med-session-mod {
  margin: 0;
  font-size: 13px;
  color: #999999;
}

/* -------------------------------------------------- grille des capsules */
.fai-med-grille {
  display: flex;
  flex-wrap: wrap;
}
.fai-med-grille > [class*="col-"] {
  display: flex;
  margin-bottom: 24px;
}

.fai-med-carte {
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.fai-med-carte:hover {
  border-color: #03acdc;
  transform: translateY(-2px);
}

/* Zone d'aperçu 16:9 cliquable */
.fai-med-apercu {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  padding-top: 56.25%;
  border: none;
  background-color: #222222;
  background-image: linear-gradient(45deg, #276f7c 0%, #52adbb 100%);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}
.fai-med-apercu:focus {
  outline: 2px solid #03acdc;
  outline-offset: -2px;
}

.fai-med-capsule {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fai-med-apercu-fond {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  color: #ffffff;
  background-image: linear-gradient(45deg, #276f7c 0%, #52adbb 100%);
}
.fai-med-apercu-fond-top {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.9;
}
.fai-med-apercu-fond-nom {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  opacity: 0.95;
}

.fai-med-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: rgba(34, 34, 34, 0.78);
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.fai-med-play i {
  margin-left: 2px;
}
.fai-med-apercu:hover .fai-med-play,
.fai-med-apercu:focus .fai-med-play {
  background-color: #03acdc;
  transform: translate(-50%, -50%) scale(1.08);
}

.fai-med-badge-duree {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 3px 7px;
  border-radius: 2px;
}

.fai-med-corps {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 16px;
}

.fai-med-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.2;
}
.fai-med-heure {
  font-weight: 700;
  color: #03acdc;
  font-size: 13px;
}
.fai-med-type {
  background-color: #f5f5f5;
  color: #666666;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
}

.fai-med-titre {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  color: #333333;
}

.fai-med-orateur {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.42857143;
  color: #666666;
}
.fai-med-orateur strong {
  color: #333333;
  font-weight: 600;
}

.fai-med-pied {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eeeeee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fai-med-btn-voir {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  color: #317AB4;
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fai-med-btn-voir:hover,
.fai-med-btn-voir:focus {
  color: #03acdc;
  text-decoration: underline;
}

/* ----------------------------------------------------------- Lightbox */
.fai-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.fai-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.fai-lightbox-dialog {
  position: relative;
  width: 100%;
  max-width: 980px;
  background-color: #222222;
  border: 1px solid #333333;
  border-radius: 4px;
  color: #ffffff;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.22s ease;
}
.fai-lightbox.is-open .fai-lightbox-dialog {
  transform: scale(1);
}

.fai-lightbox-dialog:fullscreen,
.fai-lightbox-dialog:-webkit-full-screen {
  max-width: none;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
  display: flex;
  flex-direction: column;
}

.fai-lb-entete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #333333;
  background-color: #222222;
}

.fai-lb-infos {
  min-width: 0;
}
.fai-lb-session {
  margin: 0 0 3px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #03acdc;
}
.fai-lb-titre {
  margin: 0 0 3px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: #ffffff;
}
.fai-lb-orateur {
  margin: 0;
  font-size: 13px;
  color: #999999;
}

.fai-lb-outils {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fai-lb-btn {
  appearance: none;
  background-color: #333333;
  border: 1px solid #666666;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  line-height: 1;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.fai-lb-btn:hover,
.fai-lb-btn:focus {
  background-color: #317AB4;
  border-color: #317AB4;
  color: #ffffff;
}
.fai-lb-btn--fermer {
  padding: 8px 11px;
}

.fai-lb-stage {
  position: relative;
  background-color: #000000;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fai-lightbox-dialog:fullscreen .fai-lb-stage,
.fai-lightbox-dialog:-webkit-full-screen .fai-lb-stage {
  flex: 1 1 auto;
  aspect-ratio: auto;
  min-height: 0;
}

.fai-lb-video {
  width: 100%;
  height: 100%;
  max-height: 72vh;
  display: block;
  background-color: #000000;
}
.fai-lightbox-dialog:fullscreen .fai-lb-video,
.fai-lightbox-dialog:-webkit-full-screen .fai-lb-video {
  max-height: none;
}

.fai-lb-indispo {
  padding: 20px 24px;
  text-align: center;
  max-width: 640px;
}
.fai-lb-indispo-img {
  display: block;
  max-width: 100%;
  max-height: 44vh;
  margin: 0 auto 14px;
  border-radius: 4px;
}
.fai-lb-indispo i {
  font-size: 36px;
  color: #03acdc;
  margin-bottom: 12px;
  display: block;
}
.fai-lb-indispo p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.42857143;
  color: #ffffff;
}
.fai-lb-indispo .fai-lb-indispo-detail {
  font-size: 13px;
  color: #999999;
}

.fai-lb-pied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid #333333;
  background-color: #222222;
}
.fai-lb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fai-lb-compteur {
  font-size: 13px;
  color: #999999;
}

body.fai-lb-bloque {
  overflow: hidden;
}

@media (max-width: 767px) {
  .fai-lightbox {
    padding: 10px;
  }
  .fai-lb-entete {
    flex-direction: column;
  }
  .fai-lb-outils {
    width: 100%;
    justify-content: flex-end;
  }
  .fai-lb-pied {
    flex-wrap: wrap;
  }
}
