/* ============================================
   Comptines — style.css
   Thème : Bibliothèque de Nuit
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap");

/* ---- Variables ---- */
:root {
  --bg: #0c0e15;
  --bg-card: #131620;
  --bg-elevated: #1a1e2c;
  --bg-input: #1e2233;
  --border: #262c3e;
  --border-light: #2e3550;

  --text: #ede8dc;
  --text-muted: #8892aa;
  --text-faint: #4a5268;

  --gold: #d4a843;
  --gold-light: #e8c472;
  --gold-dim: rgba(212, 168, 67, 0.12);
  --teal: #4ecdc4;
  --teal-dim: rgba(78, 205, 196, 0.1);
  --rose: #e07575;
  --rose-dim: rgba(224, 117, 117, 0.1);
  --green: #5ec97a;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --radius: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);

  --transition: 0.18s ease;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(
      ellipse 80% 40% at 50% -10%,
      rgba(78, 205, 196, 0.06) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 30% at 80% 100%,
      rgba(212, 168, 67, 0.05) 0%,
      transparent 50%
    );
  background-attachment: fixed;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--gold-light);
}

img {
  display: block;
  max-width: 100%;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- Header ---- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 14, 21, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: -0.01em;
}
.site-logo:hover {
  color: var(--gold-light);
}
.logo-icon {
  font-size: 1.2rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}
nav a:hover,
nav a.active {
  color: var(--text);
  background: var(--bg-elevated);
}

/* ---- Hero ---- */
.hero {
  padding: 4rem 0 2.5rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.hero p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.75rem;
}

.search-bar {
  display: flex;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  padding: 0.25rem 0.25rem 0.25rem 1.25rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}
.search-bar:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

#searchInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
#searchInput::placeholder {
  color: var(--text-faint);
}

.btn-search {
  background: var(--gold);
  border: none;
  border-radius: 50px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.btn-search:hover {
  background: var(--gold-light);
}

/* ---- Filters ---- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.25rem 0;
}

.filter-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.825rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  transition: all var(--transition);
}
.filter-chip small {
  color: var(--text-faint);
  font-size: 0.75em;
}
.filter-chip:hover {
  border-color: var(--border-light);
  color: var(--text);
}
.filter-chip.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================
   Comptine List — disposition horizontale compacte
   Chaque carte = une ligne : vignette + titre + meta
   ============================================ */
.comptine-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: 3rem;
}

.card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  position: relative;
  padding: 0.55rem 2.5rem 0.55rem 0.55rem; /* right padding pour la flèche */
  min-height: 62px;
}
.card:hover {
  border-color: var(--border-light);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

/* Badge audio en haut à droite */
.card-has-audio::after {
  content: "♪";
  position: absolute;
  top: 0.5rem;
  right: 2rem;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Vignette carrée compacte — masquée sur mobile */
.card-thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.no-img-emoji {
  font-size: 1.4rem;
  opacity: 0.45;
}

@media (max-width: 680px) {
  .card-thumb {
    display: none;
  }
  .card {
    min-height: 0;
    padding: 0.6rem 2.2rem 0.6rem 0.85rem;
    gap: 0;
  }
  .card-title {
    font-size: 0.9rem;
  }
}

/* Corps de la carte */
.card-body {
  flex: 1;
  min-width: 0; /* évite le débordement de texte */
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.card-lang-badge {
  font-size: 0.9rem;
}

.card-duration {
  color: var(--text-faint);
  font-size: 0.72rem;
  margin-left: auto;
}

.card-arrow {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 1.2rem;
  transition: all var(--transition);
}
.card:hover .card-arrow {
  color: var(--gold);
  transform: translateY(-50%) translateX(2px);
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.1rem 0.45rem;
}
.badge-cat {
  background: var(--teal-dim);
  border: 1px solid rgba(78, 205, 196, 0.2);
  color: var(--teal);
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state .emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.5;
}
.empty-state p {
  font-size: 1rem;
}

/* ---- Detail page ---- */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  padding: 2rem 0 3rem;
}
@media (max-width: 760px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
  /* Sidebar APRÈS le contenu principal sur mobile */
  .detail-sidebar {
    order: 1;
  }

  /* Image/placeholder réduit en bannière horizontale sur mobile */
  .detail-image {
    aspect-ratio: 3/1;
    max-height: 110px;
    border-radius: var(--radius);
  }
  .detail-image-placeholder {
    aspect-ratio: 3/1;
    max-height: 110px;
    font-size: 2rem;
    border-radius: var(--radius);
  }
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  transition: color var(--transition);
}
.btn-back:hover {
  color: var(--text);
}

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.detail-subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---- Audio Player ---- */
.audio-player {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.player-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.player-tab {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.9rem;
  transition: all var(--transition);
}
.player-tab:hover {
  border-color: var(--border-light);
  color: var(--text);
}
.player-tab.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}

.player-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-play {
  background: var(--gold);
  border: none;
  border-radius: 50%;
  color: var(--bg);
  cursor: pointer;
  font-size: 0.9rem;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.btn-play:hover {
  background: var(--gold-light);
  transform: scale(1.05);
}
.btn-play.playing {
  background: var(--teal);
}

.player-time {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.player-progress {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-card);
  outline: none;
  cursor: pointer;
}
.player-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.player-progress::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: pointer;
}

.player-time-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.btn-volume {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  opacity: 0.6;
  transition: opacity var(--transition);
}
.btn-volume:hover {
  opacity: 1;
}

.player-no-audio {
  text-align: center;
  padding: 0.5rem 0;
}
.no-audio-notice {
  color: var(--text-faint);
  font-size: 0.875rem;
  font-style: italic;
}

/* ---- Notes ---- */
.notes-section {
  background: var(--gold-dim);
  border: 1px solid rgba(212, 168, 67, 0.2);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
  padding: 0.9rem 1.1rem;
  white-space: pre-wrap;
}

/* ---- Partition ---- */
.partition-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: 1.75rem;
  overflow: hidden;
}

.partition-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.partition-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.partition-controls {
  display: flex;
  gap: 0.35rem;
}

.btn-partition-ctrl {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  height: 28px;
  min-width: 28px;
  padding: 0 0.5rem;
  transition: all var(--transition);
}
.btn-partition-ctrl:hover {
  border-color: var(--border-light);
  color: var(--text);
  background: var(--bg-elevated);
}

#partitionContainer {
  padding: 1.25rem;
  background: #ffffff;
  min-height: 80px;
}
#partitionContainer svg {
  max-width: 100%;
}

/* ============================================
   Correctif contraste ABC (abcjs)
   abcjs génère des SVG avec des couleurs claires
   héritées du thème sombre — on force le noir
   ============================================ */
#abcPartition svg text,
#abcPartition svg tspan {
  fill: #1a1a1a !important;
}
#abcPartition svg path,
#abcPartition svg rect,
#abcPartition svg line,
#abcPartition svg polyline,
#abcPartition svg polygon,
#abcPartition svg ellipse {
  fill: #1a1a1a !important;
  stroke: #1a1a1a !important;
}
/* Exception : les éléments vides (fond transparent) */
#abcPartition svg path[fill="none"],
#abcPartition svg rect[fill="none"] {
  fill: none !important;
}
/* Lignes de portée */
#abcPartition svg line {
  stroke: #333 !important;
}

/* ---- Lyrics ---- */
.lyrics-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 1.75rem;
}

.lyrics-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.lyrics-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: -1px;
  padding: 0.75rem 1.25rem;
  transition: all var(--transition);
}
.lyrics-tab:hover {
  color: var(--text);
}
.lyrics-tab.active {
  border-bottom-color: var(--gold);
  color: var(--gold);
}

.lyrics-content {
  display: none;
  padding: 1.5rem;
}
.lyrics-content.active {
  display: block;
}

.lyrics-text,
.pinyin-text {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 2;
  white-space: pre-wrap;
  margin: 0;
}
.lyrics-zh {
  font-size: 1.25rem;
  line-height: 2.2;
}
.pinyin-text {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-muted);
}

/* ---- Ruby / Pinyin inline ---- */
ruby {
  ruby-align: center;
}
rt {
  color: var(--teal);
  font-family: var(--font-body);
  font-size: 0.55em;
  font-style: normal;
}
.ruby-block {
  line-height: 2.6;
}

/* ---- Detail sidebar ---- */
.detail-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}
.detail-image-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  opacity: 0.35;
  margin-bottom: 1rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.825rem;
}
.info-row:last-child {
  border-bottom: none;
}
.info-label {
  color: var(--text-faint);
}
.info-value {
  color: var(--text);
  font-weight: 500;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.6rem 1.1rem;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: #0c0e15;
}
.btn-primary:hover {
  background: var(--gold-light);
  color: #0c0e15;
}
.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-light);
  color: var(--text-muted);
}
.btn-secondary:hover {
  border-color: var(--border-light);
  color: var(--text);
}
.btn-danger {
  background: var(--rose-dim);
  border-color: rgba(224, 117, 117, 0.3);
  color: var(--rose);
}
.btn-danger:hover {
  background: rgba(224, 117, 117, 0.2);
}
.btn-sm {
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
}

/* ---- Alerts ---- */
.alert {
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
}
.alert-success {
  background: rgba(94, 201, 122, 0.1);
  border: 1px solid rgba(94, 201, 122, 0.25);
  color: var(--green);
}
.alert-error {
  background: var(--rose-dim);
  border: 1px solid rgba(224, 117, 117, 0.25);
  color: var(--rose);
}

/* ---- Admin ---- */
.admin-page {
  padding: 2rem 0 3rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.admin-header h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table th {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.65rem 1rem;
  text-align: left;
  text-transform: uppercase;
}
.admin-table td {
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1rem;
  vertical-align: middle;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table tbody tr:hover {
  background: var(--bg-elevated);
}

/* Admin stats cards */
.stats-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  min-width: 110px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Forms ---- */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
}

.form-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin: 1.75rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.form-section-title:first-child {
  margin-top: 0;
}

.form-row {
  display: flex;
  gap: 1rem;
}
.form-row.cols-2 > * {
  flex: 1;
  min-width: 0;
}
@media (max-width: 580px) {
  .form-row.cols-2 {
    flex-direction: column;
  }
}

.form-group {
  margin-bottom: 1rem;
}
.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.form-hint {
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-top: 0.3rem;
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  padding: 0.55rem 0.85rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  width: 100%;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.form-control::placeholder {
  color: var(--text-faint);
}
textarea.form-control {
  resize: vertical;
  line-height: 1.55;
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238892aa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}
input[type="file"].form-control {
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}

/* ABC preview box (admin) */
.abc-preview {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  min-height: 60px;
  padding: 0.75rem;
  margin-top: 0.5rem;
}
.abc-preview-empty {
  color: #999;
  font-style: italic;
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}
/* Correctif contraste ABC dans l'aperçu admin aussi */
.abc-preview svg text,
.abc-preview svg tspan {
  fill: #1a1a1a !important;
}
.abc-preview svg path,
.abc-preview svg rect,
.abc-preview svg line,
.abc-preview svg polyline,
.abc-preview svg polygon,
.abc-preview svg ellipse {
  fill: #1a1a1a !important;
  stroke: #1a1a1a !important;
}
.abc-preview svg path[fill="none"],
.abc-preview svg rect[fill="none"] {
  fill: none !important;
}
.abc-preview svg line {
  stroke: #333 !important;
}

/* ---- Footer ---- */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}
footer p {
  color: var(--text-faint);
  font-size: 0.8rem;
  text-align: center;
}
footer a {
  color: var(--text-faint);
}
footer a:hover {
  color: var(--text-muted);
}

/* ---- Login ---- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 2rem;
}
.login-logo .emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.4rem;
}

/* ---- Responsive ---- */
@media (max-width: 680px) {
  .header-inner {
    height: 52px;
  }
  .site-logo {
    font-size: 1.15rem;
  }
  nav a {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
  }
  .hero {
    padding: 2.5rem 0 1.5rem;
  }
  .admin-header {
    flex-wrap: wrap;
  }
  .admin-table-wrap {
    overflow-x: auto;
  }
  .form-card {
    padding: 1.25rem;
  }
}

@media print {
  header,
  footer,
  nav,
  .btn-back,
  .filters,
  .search-bar,
  .player-controls,
  .lyrics-tabs,
  .partition-controls {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .lyrics-content {
    display: block !important;
  }
}
