/* —— Admin (paramètres) —— */
.tc-panel-lead {
  margin: 0 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
}

.tc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.tc-empty {
  padding: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.tc-theme-card {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.tc-theme-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.tc-theme-card-meta,
.tc-theme-card-segs {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.tc-theme-card-segs {
  margin-top: 4px;
}

.tc-theme-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tc-form-block {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.15);
}

.tc-form-block h4 {
  margin: 0 0 14px;
}

.tc-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 720px) {
  .tc-form-grid {
    grid-template-columns: 1fr;
  }
}

.tc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.tc-field span {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.tc-field input[type="text"],
.tc-field input[type="number"],
.tc-field textarea,
.tc-field select,
.tc-field input[type="file"] {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
}

.tc-field--full {
  grid-column: 1 / -1;
}

.tc-field--check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.tc-segments-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 10px;
}

.tc-segments-head h5 {
  margin: 0;
  font-size: 14px;
}

.tc-segments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tc-seg-row {
  display: grid;
  grid-template-columns: auto 1.4fr 0.75fr 0.65fr auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tc-seg-order {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 2px;
}

.tc-seg-move {
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.tc-seg-move:hover:not(:disabled) {
  background: rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.35);
}

.tc-seg-move:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .tc-seg-row {
    grid-template-columns: auto 1fr 1fr;
  }
  .tc-seg-field--label {
    grid-column: 2 / -1;
  }
  .tc-seg-remove {
    grid-column: 3;
    justify-self: end;
  }
}

.tc-seg-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.tc-seg-field span {
  color: rgba(255, 255, 255, 0.7);
}

.tc-seg-custom--hidden {
  display: none;
}

.tc-segments-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.45;
}

.tc-seg-remove {
  min-width: 36px;
  padding: 8px;
}

.tc-audio-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.tc-upload-progress {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tc-upload-progress-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.tc-upload-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  transition: width 0.2s ease;
}

.tc-upload-progress-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  min-width: 36px;
}

.tc-preview-admin {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tc-preview-admin audio {
  width: 100%;
  margin-top: 8px;
}

.tc-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tc-msg {
  margin-top: 10px;
  font-size: 13px;
}

.tc-msg.err {
  color: #fca5a5;
}

.tc-msg.ok {
  color: #86efac;
}

/* —— Espace client —— */
.ec-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tc-cover-preview {
  display: block;
  max-width: 220px;
  max-height: 140px;
  margin-top: 10px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tc-hidden-audio {
  display: none !important;
}

.ec-theme-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.ec-theme-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.ec-theme-card-cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: rgba(255, 255, 255, 0.2);
}

.ec-theme-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.ec-theme-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.ec-theme-segments {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.ec-theme-segments li + li {
  margin-top: 4px;
}

.ec-theme-player-wrap {
  margin-top: auto;
}

.ec-theme-player-wrap audio {
  display: none !important;
}

.ec-theme-listen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  box-shadow: 0 4px 18px rgba(236, 72, 153, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.ec-theme-listen-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(236, 72, 153, 0.35);
}

.ec-theme-listen-btn[hidden] {
  display: none !important;
}

.ec-theme-listen-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fff;
  margin-left: 2px;
}

.ec-theme-player-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  animation: ec-theme-bar-in 0.25s ease;
}

.ec-theme-player-bar[hidden] {
  display: none !important;
}

@keyframes ec-theme-bar-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ec-theme-pp-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #ec4899, #8b5cf6);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08), 0 4px 16px rgba(139, 92, 246, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ec-theme-pp-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.ec-theme-pp-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ec-theme-pp-icon {
  display: none;
  width: 18px;
  height: 18px;
  position: relative;
}

.ec-theme-pp-btn--playing .ec-theme-pp-icon--pause,
.ec-theme-pp-btn--loading .ec-theme-pp-icon--pause {
  display: block;
}

.ec-theme-pp-btn--paused .ec-theme-pp-icon--play {
  display: block;
}

.ec-theme-pp-icon--play {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

.ec-theme-pp-icon--pause {
  position: relative;
}

.ec-theme-pp-icon--pause::before,
.ec-theme-pp-icon--pause::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 14px;
  border-radius: 2px;
  background: #fff;
}

.ec-theme-pp-icon--pause::before {
  left: 3px;
}

.ec-theme-pp-icon--pause::after {
  right: 3px;
}

.ec-theme-pp-btn--loading .ec-theme-pp-icon--pause::before,
.ec-theme-pp-btn--loading .ec-theme-pp-icon--pause::after {
  display: none;
}

.ec-theme-pp-btn--loading .ec-theme-pp-icon--pause {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ec-theme-spin 0.7s linear infinite;
}

@keyframes ec-theme-spin {
  to {
    transform: rotate(360deg);
  }
}

.ec-theme-player-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ec-theme-player-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ec-theme-player-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.ec-theme-player-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ec4899, #a855f7);
  transition: width 0.12s linear;
}

.ec-theme-player-status {
  min-height: 1.2em;
  margin: 6px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.ec-theme-empty {
  padding: 28px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 14px;
}

/* —— Admin studio (timeline extraits) —— */
.tc-studio-outer {
  margin-top: 20px;
  padding: 18px 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(236, 72, 153, 0.22);
  background: linear-gradient(165deg, rgba(236, 72, 153, 0.06), rgba(139, 92, 246, 0.04));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.tc-studio-intro {
  margin: 0 0 14px;
}

.tc-studio-panel {
  margin-top: 4px;
}

.tc-studio-cards-title {
  margin: 18px 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.tc-seg-block__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  background: rgba(0, 0, 0, 0.2);
}

.tc-seg-block__handle--l {
  left: 0;
  border-radius: 7px 0 0 7px;
}

.tc-seg-block__handle--r {
  right: 0;
  border-radius: 0 7px 7px 0;
}

.tc-seg-block--active {
  outline: 2px solid #fff;
  z-index: 6;
}

.tc-studio-lead {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.25);
}

.tc-studio-lead[hidden] {
  display: none !important;
}

.tc-studio-empty {
  margin: 0 0 12px;
  padding: 28px 16px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.tc-studio-empty[hidden],
.tc-studio-wave-wrap[hidden] {
  display: none !important;
}

.tc-studio-timeline-shell {
  padding: 2px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(120, 70, 110, 0.35), rgba(80, 65, 120, 0.32));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.tc-studio-wave-viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 12px;
  min-height: 160px;
}

.tc-studio-wave-viewport canvas {
  display: block;
  cursor: crosshair;
  min-width: 100%;
}

.tc-studio-segments-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.tc-seg-block {
  position: absolute;
  top: 28px;
  height: 52px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  cursor: grab;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-width: 24px;
}

.tc-seg-block--active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 6px 20px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.tc-seg-block__label {
  flex: 1;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.tc-seg-block__handle {
  width: 8px;
  align-self: stretch;
  flex-shrink: 0;
  cursor: ew-resize;
  background: rgba(0, 0, 0, 0.25);
}

.tc-seg-block__handle--l {
  border-radius: 6px 0 0 6px;
}

.tc-seg-block__handle--r {
  border-radius: 0 6px 6px 0;
}

.tc-studio-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  pointer-events: none;
  z-index: 8;
}

.tc-studio-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.tc-studio-card {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tc-studio-card--active {
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.2);
}

.tc-studio-card--dragging {
  opacity: 0.45;
}

.tc-studio-card--drop-target {
  border-color: rgba(139, 92, 246, 0.6);
}

.tc-studio-card-grip {
  cursor: grab;
  color: rgba(255, 255, 255, 0.35);
  font-size: 14px;
  letter-spacing: -2px;
  user-select: none;
}

.tc-studio-card-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tc-studio-card-name {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font: inherit;
  font-weight: 600;
}

.tc-studio-card-times {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

.tc-studio-card-dur-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.tc-studio-card-dur {
  flex: 1;
  accent-color: #ec4899;
}

.tc-studio-card-tip {
  margin: 8px 0 0;
  font-size: 11px;
  color: rgba(236, 72, 153, 0.9);
}

.tc-studio-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

@media (max-width: 820px) {
  .tc-studio-card {
    grid-template-columns: auto 1fr;
  }
  .tc-studio-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
