/* ============================================
   SECTION PRÉSENTATION VIDÉO
   ============================================ */
#presentation-video {
  background: var(--light-bg);
  background-image:
    radial-gradient(circle at 10% 15%, rgba(232,98,26,0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(107,15,26,0.07) 0%, transparent 45%);
  padding: 80px 0;
  min-height: auto;          /* la vidéo n'a pas besoin d'un plein écran */
}

#presentation-video .section-header h1 { color: var(--bordeaux-dark); }
#presentation-video .section-header > p { color: var(--text-muted); }

.vp-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Cadre du lecteur ---- */
.vp {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bordeaux-deep);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
}

.vp-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vp-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Gros bouton lecture (visible en pause) ---- */
.vp-bigplay {
  position: absolute;
  top: 50%; left: 50%;
  width: 76px; height: 76px;
  margin: -38px 0 0 -38px;
  border: none;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 0 0 10px rgba(232,98,26,0.22), var(--shadow-md);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}

.vp-bigplay svg { width: 34px; height: 34px; fill: currentColor; margin-left: 4px; }
.vp-bigplay:hover { background: var(--bordeaux); }

.vp.is-paused .vp-bigplay {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* ---- Barre de contrôles ---- */
.vp-controls {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 16px 14px;
  background: linear-gradient(to top, rgba(26,6,9,0.88), rgba(26,6,9,0));
  color: var(--white);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
}

/* Visible : en pause, au survol, au clavier, ou sur écran tactile */
.vp.is-paused .vp-controls,
.vp:hover .vp-controls,
.vp:focus-within .vp-controls {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .vp-controls { opacity: 1; transform: none; }
}

.vp-btn {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--transition);
}

.vp-btn svg { width: 20px; height: 20px; fill: currentColor; }
.vp-btn:hover { background: var(--orange); }

.vp-btn-play { background: var(--orange); }
.vp-btn-play:hover { background: var(--bordeaux-light); }

.vp-btn-play .vp-icon-pause { display: none; }
.vp:not(.is-paused) .vp-btn-play .vp-icon-play { display: none; }
.vp:not(.is-paused) .vp-btn-play .vp-icon-pause { display: block; }

.vp-btn:focus-visible,
.vp-bigplay:focus-visible,
.vp-progress:focus-visible,
.vp-chapters button:focus-visible {
  outline: 2px solid var(--orange-light);
  outline-offset: 2px;
}

/* ---- Barre de progression ---- */
.vp-progress {
  flex: 1;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  border-radius: 4px;
}

.vp-progress-track {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.25);
  transition: height 0.15s ease;
}

.vp-progress:hover .vp-progress-track,
.vp-progress.is-dragging .vp-progress-track { height: 8px; }

.vp-progress-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--orange);
  transform-origin: left center;
  transform: scaleX(0);
}

/* Repères de chapitres sur la barre */
.vp-tick {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: rgba(26,6,9,0.65);
  pointer-events: none;
}

.vp-time {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.85);
}

/* ---- Chapitres ---- */
.vp-chapters {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.vp-chapters button {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.vp-chapters button:hover { border-color: var(--orange); }

.vp-chapters button.is-active {
  background: var(--bordeaux);
  border-color: var(--bordeaux);
  color: var(--white);
}

/* ---- Responsive ---- */
@media screen and (max-width: 768px) {
  #presentation-video { padding: 56px 0; }

  .vp-wrap { padding: 0 16px; }

  .vp { border-radius: var(--radius-md); }

  .vp-controls { gap: 6px; padding: 20px 10px 8px; }

  .vp-btn { width: 34px; height: 34px; }
  .vp-btn svg { width: 17px; height: 17px; }

  .vp-bigplay { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .vp-bigplay svg { width: 26px; height: 26px; }

  /* Chapitres en bandeau défilant horizontal */
  .vp-chapters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .vp-chapters::-webkit-scrollbar { display: none; }
  .vp-chapters button { white-space: nowrap; }
}

@media screen and (max-width: 480px) {
  .vp-time { display: none; }
}

/* ---- Plein écran ---- */
.vp:fullscreen { border-radius: 0; }
.vp:fullscreen .vp-video { object-fit: contain; }
