/* =========================
   GALERIE « EN ACTION »
   Onglets contrôlables + défilement automatique facultatif
========================= */

.showcase-section {
  --showcase-panel: #f4fafe; /* fond natif des captures */
  --showcase-line: #dfe8ee;
  --showcase-muted: #5b6b63;
  padding: 100px 0;
  background: #fff;
}

.showcase-container {
  width: 92%;
  max-width: 1040px;
  margin: auto;
}

.showcase-header {
  text-align: center;
  margin-bottom: 32px;
}

.showcase-header h2 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--text-dark);
}

.showcase-header p {
  font-size: 1.05rem;
  color: var(--showcase-muted);
  margin: 0;
}

/* ---------- Onglets ---------- */

.showcase-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px;
}

.showcase-tabs::-webkit-scrollbar {
  display: none;
}

.showcase-tab {
  position: relative;
  flex: none;
  overflow: hidden;
  padding: 10px 20px;
  border: 1px solid var(--showcase-line);
  border-radius: 40px;
  background: #fff;
  color: var(--text-dark);
  font: 600 .95rem/1 'Montserrat', sans-serif;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

.showcase-tab:hover {
  border-color: var(--green-light);
}

.showcase-tab.is-active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

.showcase-tab:focus-visible,
.showcase-nav:focus-visible,
.showcase-play:focus-visible {
  outline: 3px solid var(--green-light);
  outline-offset: 2px;
}

/* minuterie : se remplit dans l'onglet actif tant que le défilement tourne */
.showcase-tab-timer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--green-light);
  transform: scaleX(0);
  transform-origin: left;
}

.showcase-section.is-playing .showcase-tab.is-active .showcase-tab-timer {
  animation: showcase-timer var(--showcase-delay, 6s) linear forwards;
}

.showcase-section.is-paused .showcase-tab.is-active .showcase-tab-timer {
  animation-play-state: paused;
}

@keyframes showcase-timer {
  to { transform: scaleX(1); }
}

/* ---------- Scène ---------- */

.showcase-panel[hidden] {
  display: none;
}

.showcase-panel.is-active {
  animation: showcase-in .45s ease;
}

@keyframes showcase-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.showcase-frame {
  background: var(--showcase-panel);
  border-radius: 20px;
  overflow: hidden;
  touch-action: pan-y;
}

.showcase-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.showcase-caption {
  max-width: 640px;
  padding: 24px 4px 0;
}

.showcase-caption h3 {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--text-dark);
}

.showcase-caption p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--showcase-muted);
  margin: 0;
}

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

.showcase-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--showcase-line);
}

.showcase-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--showcase-line);
  border-radius: 40px;
  background: #fff;
  color: var(--text-dark);
  font: 600 .9rem/1 'Montserrat', sans-serif;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.showcase-nav:hover {
  border-color: var(--green-dark);
  color: var(--green-dark);
}

.showcase-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.showcase-count {
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
  color: var(--showcase-muted);
}

.showcase-play {
  width: 34px;
  height: 34px;
  border: 1px solid var(--showcase-line);
  border-radius: 50%;
  background: #fff;
  color: var(--green-dark);
  font-size: .75rem;
  cursor: pointer;
}

.showcase-play:hover {
  border-color: var(--green-dark);
}

/* ---------- Responsive ---------- */

@media (max-width: 700px) {
  .showcase-section {
    padding: 70px 0;
  }

  .showcase-header h2 {
    font-size: 1.9rem;
  }

  .showcase-tabs {
    justify-content: flex-start;
  }

  .showcase-frame {
    border-radius: 12px;
  }

  .showcase-caption h3 {
    font-size: 1.15rem;
  }

  /* boutons réduits à leur flèche */
  .showcase-nav {
    width: 42px;
    height: 42px;
    padding: 0;
    gap: 0;
    justify-content: center;
    font-size: 0;
  }

  .showcase-nav i {
    font-size: .9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-panel.is-active {
    animation: none;
  }
}
