/* ============================================
   NIVEAU 14 — LES VIDÉOS
   Styles spécifiques au chapitre des vidéos
   ============================================ */

/* ---------- VIDÉO RESPONSIVE DEMO ---------- */
.video-responsive-demo {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  border-radius: var(--rayon);
  overflow: hidden;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1e293b, #334155, #475569);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: var(--rayon);
}

.video-placeholder p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.play-icon-lg {
  font-size: 3rem;
  opacity: 0.7;
}

/* ---------- VIDEO 16:9 DEMO ---------- */
.video-16-9-demo {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  border-radius: var(--rayon);
  overflow: hidden;
}

.video-placeholder-wide {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0f172a, #1e293b, #334155);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: var(--rayon);
}

.video-placeholder-wide p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ---------- PLAY OVERLAY DEMO ---------- */
.play-overlay-demo {
  max-width: 400px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.play-btn-demo {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.play-btn-demo:hover {
  transform: scale(1.15);
  background: white;
}

.play-triangle {
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 16px 0 16px 28px;
  border-color: transparent transparent transparent #1e293b;
  margin-left: 6px;
}

.play-overlay-demo p {
  font-size: 0.85rem;
  color: var(--couleur-texte-clair);
}

/* ---------- VIDEO TITLE OVERLAY DEMO ---------- */
.video-title-demo {
  max-width: 500px;
  margin: 0 auto 1.5rem;
  position: relative;
  border-radius: var(--rayon);
  overflow: hidden;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
}

.video-title-bar-demo {
  width: 100%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.video-title-demo:hover .video-title-bar-demo {
  transform: translateY(0);
  opacity: 1;
}

.video-title-bar-demo strong {
  display: block;
  font-size: 1.1rem;
}

.video-title-bar-demo p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ---------- YOUTUBE CARDS ---------- */
.yt-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.yt-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.yt-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.yt-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.yt-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.yt-card:hover .yt-card-play {
  opacity: 1;
}

.yt-card-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.yt-card-info {
  padding: 0.75rem;
  display: flex;
  gap: 0.75rem;
}

.yt-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.yt-card-text {
  min-width: 0;
}

.yt-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.yt-card-meta {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.3;
}

/* ---------- VIDEO GRID DEMO ---------- */
.video-grid-demo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.thumb-demo-item {
  border-radius: var(--rayon);
  overflow: hidden;
}

.thumb-demo-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-demo-play {
  font-size: 2rem;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.thumb-demo-item:hover .thumb-demo-play {
  opacity: 1;
}

.thumb-demo-dur {
  position: absolute;
  bottom: 0.4rem;
  right: 0.4rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.75rem;
}

/* ---------- HERO VIDEO DEMO ---------- */
.hero-video-demo {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: var(--rayon);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f172a, #1e293b, #334155, #475569);
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 2rem;
  z-index: 2;
}

.hero-video-overlay h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.hero-video-overlay p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0;
}

/* ---------- IFRAME DEMO ---------- */
.iframe-demo-wrapper {
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.iframe-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  border: 2px dashed #94a3b8;
  border-radius: var(--rayon);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.iframe-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.iframe-placeholder p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.iframe-note {
  font-size: 0.8rem !important;
  font-weight: 400 !important;
  font-family: var(--police-code);
  color: #94a3b8 !important;
}

/* ---------- PROGRESS BAR DEMO ---------- */
.progress-demo {
  max-width: 500px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.progress-bar-demo {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  margin-bottom: 0.75rem;
  transition: height 0.2s ease;
}

.progress-bar-demo:hover {
  height: 8px;
}

.progress-fill-demo {
  height: 100%;
  background: #ef4444;
  width: 35%;
  border-radius: 3px;
  position: relative;
  transition: width 0.1s linear;
}

.progress-thumb-demo {
  position: absolute;
  top: 50%;
  left: 35%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #ef4444;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar-demo:hover .progress-thumb-demo {
  opacity: 1;
}

.progress-demo p {
  font-size: 0.85rem;
  color: var(--couleur-texte-clair);
}

/* ---------- LAZY LOADING DEMO ---------- */
.lazy-demo {
  max-width: 500px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.lazy-video-placeholder {
  width: 100%;
  border-radius: var(--rayon);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.lazy-poster {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1e293b, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rayon);
}

.lazy-demo p {
  font-size: 0.85rem;
  color: var(--couleur-texte-clair);
}

/* ---------- VIDEO FIT GRID (SCHEMA) ---------- */
.video-fit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.video-fit-item {
  text-align: center;
}

.video-fit-box {
  width: 200px;
  height: 200px;
  background: #e2e8f0;
  border-radius: 8px;
  margin: 0 auto 0.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-fit-fill {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-fit-contain {
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fit-icon {
  color: white;
  font-size: 1.5rem;
}

.fit-label {
  font-size: 0.8rem;
  font-family: var(--police-code);
  color: var(--couleur-texte-clair);
  background-color: #f1f5f9;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  display: inline-block;
}

/* ---------- OVERLAY DIAGRAM (SCHEMA) ---------- */
.overlay-diagram {
  margin-bottom: 1.5rem;
}

.overlay-demo {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 1rem;
  border-radius: 8px;
  overflow: hidden;
}

.overlay-layer {
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
}

.overlay-video {
  background: #1e293b;
}

.overlay-gradient {
  background: rgba(0, 0, 0, 0.5);
}

.overlay-play {
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.play-icon {
  font-size: 1.5rem;
}

.overlay-title {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.overlay-arrows {
  display: flex;
  justify-content: center;
  gap: 0;
}

.arrow-item {
  flex: 1;
  max-width: 100px;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-family: var(--police-code);
  color: var(--couleur-texte-clair);
  border: 1px solid var(--couleur-bordure);
}

/* ---------- THUMBNAIL GRID (SCHEMA) ---------- */
.thumb-grid-demo {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.thumb-item {
  text-align: center;
}

.thumb-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.thumb-play {
  font-size: 1.5rem;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.thumb-item:hover .thumb-play {
  opacity: 1;
}

.thumb-duration {
  position: absolute;
  bottom: 0.3rem;
  right: 0.3rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.7rem;
}

.thumb-meta {
  padding: 0.4rem 0;
}

.thumb-title {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumb-channel {
  font-size: 0.7rem;
  color: #64748b;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .video-fit-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .thumb-grid-demo {
    grid-template-columns: repeat(2, 1fr);
  }

  .yt-cards-grid {
    grid-template-columns: 1fr;
  }

  .video-grid-demo {
    grid-template-columns: 1fr;
  }
}