/* ============================================================
   SLIDESHOW — éléments communs
   ------------------------------------------------------------
   Barre de contrôles, position, verrou de défilement.
   Le balisage vient de partials/slideshow-controls.html.twig,
   le comportement de epa-slideshow.js.
   ============================================================ */

@import url("epa-base.css");

/* ---------- Contrôles ---------- */

.slideshow-controls {
  display: flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  margin: 1rem auto 0;
  padding: 0;

  border: var(--epa-action-br);
  border-radius: var(--epa-radius-pill);

  background: var(--epa-action-bg);
  overflow: hidden;
}

.slideshow-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 2.5rem;
  height: 2.25rem;
  min-width: 2.5rem;
  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 0;

  background: transparent;
  color: var(--epa-action-tx);

  cursor: pointer;

  transition:
    background var(--epa-duration-fast) var(--epa-ease),
    color var(--epa-duration-fast) var(--epa-ease);
}

.slideshow-controls button:hover {
  background: var(--epa-action-bg-hover);
  color: var(--epa-action-tx-hover);
}

.slideshow-controls button.active {
  background: var(--epa-action-bg-active);
}

.slideshow-controls button + button {
  border-left: var(--epa-action-br);
}

.slideshow-controls button:disabled {
  background: var(--epa-action-bg-disabled);
  color: var(--epa-action-tx-disabled);
  cursor: not-allowed;
}

/* Mode « pas à pas » (Espace = suivant) : le bouton Lecture disparaît.
   C’est l’indication visuelle du mode ; Maj + Espace bascule. */
.slideshow-controls[data-slideshow-keys="step"] [data-slideshow-action="play"] {
  display: none;
}

/* ---------- Position ---------- */

.slideshow-position {
  margin-top: .5rem;
  color: var(--epa-tx-muted);
  font-size: .875rem;
  line-height: 1.2;
  text-align: center;
}

/* ---------- Présentation ouverte ---------- */

html.slideshow-presenting {
  overflow: hidden;
}
/* ---------- Présentation : barre sur fond sombre ----------
   La classe slideshow-overlay est posée par le noyau sur la scène
   (visionneuse du carrousel, scène de la consultation). */

.slideshow-overlay .slideshow-controls {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 110;

  margin: 0;
  transform: translateX(-50%);

  background: var(--epa-green-darkest);
  border-color: var(--epa-green-darker);
  color: var(--epa-green-lightest);

  transition: opacity var(--epa-duration-fast) var(--epa-ease);
}

.slideshow-overlay .slideshow-controls button {
  background: transparent;
  color: var(--epa-violet-light);
}

.slideshow-overlay .slideshow-controls button:hover {
  background: var(--epa-green-darker);
  color: var(--epa-action-tx-hover);
}

.slideshow-overlay .slideshow-controls button.active {
  background: var(--epa-green-darker);
  color: var(--epa-violet-lighter);
}

.slideshow-overlay .slideshow-controls button + button {
  border-left-color: var(--epa-green-darker);
}

.slideshow-overlay .slideshow-controls button:disabled {
  background: transparent;
  color: var(--epa-violet-dark);
  cursor: not-allowed;
}

.slideshow-overlay.is-idle .slideshow-controls {
  opacity: 0;
  pointer-events: none;
}
