/* Lecteur Audio Accessible Li(b)re (FALC & RGAA) */
.assolibre-player-wrapper {
  margin: 2rem 0;
  font-family: var(--wp--preset--font-family--body, sans-serif);
}

.assolibre-player-card {
  background: var(--wp--preset--color--surface, #f8fafc);
  border: 2px solid var(--wp--preset--color--primary, #183b56);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* En-tête du lecteur */
.assolibre-player-header {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--wp--preset--color--border, #cbd5e1);
  padding-bottom: 1rem;
}

.assolibre-player-badge {
  display: inline-block;
  background: var(--wp--preset--color--primary, #183b56);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.assolibre-player-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--wp--preset--color--primary, #183b56);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.assolibre-player-current-track {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--wp--preset--color--contrast, #1e293b);
  background: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--wp--preset--color--accent, #d35400);
  margin: 0.75rem 0;
}

/* Barre de progression */
.assolibre-progress-container {
  margin: 1.25rem 0 0.5rem 0;
}

.assolibre-progress-bar {
  width: 100%;
  height: 12px;
  -webkit-appearance: none;
  appearance: none;
  background: #cbd5e1;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.assolibre-progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--wp--preset--color--primary, #183b56);
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.assolibre-progress-bar::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--wp--preset--color--primary, #183b56);
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.assolibre-progress-bar:focus-visible {
  outline: 3px solid var(--wp--preset--color--secondary, #0d639b);
  outline-offset: 3px;
}

.assolibre-time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--wp--preset--color--contrast-muted, #475569);
  margin-top: 0.35rem;
}

/* Commandes principales */
.assolibre-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.assolibre-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  border: 2px solid var(--wp--preset--color--primary, #183b56);
  background: #ffffff;
  color: var(--wp--preset--color--primary, #183b56);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.assolibre-btn:hover {
  background: var(--wp--preset--color--surface-alt, #eef2f6);
}

.assolibre-btn:focus-visible {
  outline: 3px solid var(--wp--preset--color--secondary, #0d639b);
  outline-offset: 3px;
}

.assolibre-btn-play {
  min-width: 64px;
  min-height: 64px;
  border-radius: 50%;
  background: var(--wp--preset--color--primary, #183b56);
  color: #ffffff;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(24, 59, 86, 0.25);
}

.assolibre-btn-play:hover {
  background: var(--wp--preset--color--secondary, #0d639b);
  color: #ffffff;
  transform: scale(1.04);
}

/* Barre d'options (Vitesse & Volume) */
.assolibre-options-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.assolibre-rate-btn {
  background: var(--wp--preset--color--surface, #f8fafc);
  border: 1px solid var(--wp--preset--color--border, #cbd5e1);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  color: var(--wp--preset--color--contrast, #1e293b);
}

.assolibre-rate-btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--secondary, #0d639b);
}

.assolibre-volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.assolibre-volume-slider {
  width: 90px;
  height: 6px;
  cursor: pointer;
}

/* Accordéon des chapitres */
.assolibre-chapters-accordion {
  border: 1px solid var(--wp--preset--color--border, #cbd5e1);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.assolibre-chapters-summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--wp--preset--color--primary, #183b56);
  background: var(--wp--preset--color--surface, #f8fafc);
  user-select: none;
}

.assolibre-chapters-summary:hover {
  background: var(--wp--preset--color--surface-alt, #eef2f6);
}

.assolibre-chapters-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  max-height: 380px;
  overflow-y: auto;
}

.assolibre-chapter-item {
  margin: 0;
  padding: 0;
}

.assolibre-chapter-btn {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--wp--preset--color--contrast, #1e293b);
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}

.assolibre-chapter-btn:hover {
  background: var(--wp--preset--color--surface, #f8fafc);
  color: var(--wp--preset--color--primary, #183b56);
}

.assolibre-chapter-btn.is-active {
  background: #eef7ff;
  font-weight: 700;
  color: var(--wp--preset--color--secondary, #0d639b);
  border-left: 4px solid var(--wp--preset--color--secondary, #0d639b);
}

.assolibre-chapter-btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--secondary, #0d639b);
  outline-offset: -2px;
}

/* Notice crédits et transcription */
.assolibre-credits-note {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--wp--preset--color--border, #cbd5e1);
  font-size: 0.875rem;
  color: var(--wp--preset--color--contrast-muted, #475569);
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 640px) {
  .assolibre-player-card {
    padding: 1.25rem 1rem;
  }
  .assolibre-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }
  .assolibre-btn-play {
    min-width: 56px;
    min-height: 56px;
    font-size: 1.25rem;
  }
  .assolibre-options-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
