@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --bg-dark: #0f0a07;
  --bg-card: rgba(26, 18, 13, 0.82);
  --gold-primary: #d4af37;
  --gold-light: #f3e5ab;
  --gold-dark: #aa7c11;
  --brown-dark: #1f140e;
  --brown-border: rgba(212, 175, 55, 0.35);
  --text-primary: #f5efe6;
  --text-muted: #b39d82;
  --font-title: 'Cinzel', serif;
  --font-body: 'Cormorant Garamond', serif;
}

body.light {
  --bg-dark: #f5efe6;
  --bg-card: rgba(235, 225, 212, 0.9);
  --gold-primary: #8c6d1f;
  --gold-light: #b89435;
  --gold-dark: #5c4510;
  --brown-dark: #3a281e;
  --brown-border: rgba(140, 109, 31, 0.35);
  --text-primary: #1c130d;
  --text-muted: #6e5742;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background-color: #050302;
  color: var(--text-primary);
  font-family: var(--font-body);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

/* Format Mobile Strict */
.app-container {
  width: 100vw;
  height: 100vh;
  max-width: 430px;
  max-height: 932px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--brown-border);
  background-color: var(--bg-dark);
  
  /* IMPORTEZ VOTRE IMAGE DE FOND ICI */
  background-image: linear-gradient(180deg, rgba(15, 10, 7, 0.85) 0%, rgba(26, 18, 13, 0.92) 100%), url('fond.jpg');
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* Barre de recherche supérieure */
.top-bar {
  padding: 16px 20px;
  background: rgba(15, 10, 7, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--brown-border);
}

.top-bar input {
  width: 100%;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--brown-border);
  border-radius: 2px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
  letter-spacing: 1px;
  outline: none;
  transition: all 0.3s ease;
}

.top-bar input:focus {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.05);
}

.top-bar input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

/* Zone de contenu principal */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
}

.content-area::-webkit-scrollbar {
  width: 3px;
}

.content-area::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
}

.page {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-title {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold-primary);
  text-align: center;
  margin-bottom: 24px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--brown-border);
  padding-bottom: 10px;
}

/* Carte du Lecteur Principal */
.player-card {
  background: var(--bg-card);
  border: 1px solid var(--brown-border);
  padding: 32px 20px;
  backdrop-filter: blur(16px);
  margin-top: 10px;
  text-align: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.track-info .title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.track-info .category {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--gold-primary);
  letter-spacing: 1px;
  margin-bottom: 32px;
}

.time-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.time-container input[type="range"] {
  flex: 1;
  height: 2px;
  background: rgba(212, 175, 55, 0.2);
  accent-color: var(--gold-primary);
  cursor: pointer;
}

.player-controls {
  display: flex;
  justify-content: space-around;
  gap: 12px;
}

.btn-ctrl {
  flex: 1;
  padding: 12px 0;
  background: transparent;
  border: 1px solid var(--brown-border);
  color: var(--gold-primary);
  font-family: var(--font-title);
  font-size: 0.75rem;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-ctrl:hover, .btn-ctrl:active {
  background: var(--gold-primary);
  color: var(--bg-dark);
  border-color: var(--gold-primary);
}

/* Liste des Morceaux */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.track-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.track-item:hover {
  border-color: var(--brown-border);
  background: rgba(35, 24, 18, 0.9);
}

.track-item .name {
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.btn-play-item {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--brown-border);
  color: var(--gold-primary);
  font-family: var(--font-title);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-play-item:hover, .btn-play-item:active {
  background: var(--gold-primary);
  color: var(--bg-dark);
}

/* Page des Paramètres */
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--brown-border);
  padding: 24px;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.setting-item label {
  font-family: var(--font-title);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
}

.setting-item.row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.setting-item select, 
.setting-item input[type="range"] {
  width: 100%;
  padding: 10px;
  background: rgba(15, 10, 7, 0.6);
  border: 1px solid var(--brown-border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
}

.setting-item select option {
  background: #1f140e;
  color: #f5efe6;
}

.btn-toggle {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--brown-border);
  color: var(--gold-primary);
  font-family: var(--font-title);
  font-size: 0.7rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle:hover {
  background: var(--gold-primary);
  color: var(--bg-dark);
}

.status-text {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--gold-light);
}

/* Navigation Inférieure */
.bottom-bar {
  display: flex;
  background: rgba(15, 10, 7, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--brown-border);
}

.nav-btn {
  flex: 1;
  padding: 16px 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn.active {
  color: var(--gold-primary);
  border-top: 2px solid var(--gold-primary);
}