:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --danger: #ef4444;
}

body {
    background-color: var(--bg-color);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 15px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-placeholder img {
    max-height: 40px;
}

.logo-placeholder h2 {
    margin: 0;
    font-size: 1.4em;
}

.lang-switch button {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.lang-switch button.active {
    background: var(--accent);
}

.card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #fff;
    box-sizing: border-box;
    font-size: 1em;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.alert {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95em;
    text-align: center;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.hidden {
    display: none !important;
}

/* Auto-complétion Spotify */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    margin-top: 4px;
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #334155;
    gap: 10px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #334155;
}

.suggestion-item img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
}

.suggestion-info {
    display: flex;
    flex-direction: column;
}

.suggestion-title {
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
}

.suggestion-artist {
    font-size: 0.8em;
    color: var(--accent);
}

/* Admin Styles */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-header h2 {
    margin: 0;
    font-size: 1.3em;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.limit-form {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
}

.limit-form input {
    width: 50px;
    padding: 4px;
    border-radius: 4px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #fff;
    text-align: center;
}

.limit-form button, .btn-clear, .btn-logout {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: 0.85em;
    text-decoration: none;
}

.btn-clear {
    background: #64748b;
}

.btn-logout {
    background: #dc2626;
}

.request-card {
    background: var(--card-bg);
    border-left: 6px solid #ccc;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.req-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* Nom d'utilisateur lisible dans l'admin */
.user-tag, .user-name, span.user {
    background-color: #fef08a !important; /* Fond jaune doux */
    color: #854d0e !important;           /* Texte brun foncé lisible */
    font-weight: 600 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    display: inline-block !important;
}

.req-time {
    font-size: 0.8em;
    color: var(--text-muted);
}

.req-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
}

.req-artist {
    color: var(--accent);
    font-size: 0.95em;
    margin-bottom: 10px;
}

.req-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    margin-right: 5px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: bold;
}

.btn-play { background: var(--success); color: #fff; }
.btn-reject { background: var(--danger); color: #fff; }
.status-tag {
    font-size: 0.85em;
    font-weight: bold;
    text-transform: uppercase;
}
.status-played { color: var(--success); }
.status-rejected { color: var(--danger); }

.user-history {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
}

.user-history h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

/* --- FIX LISIBILITÉ NOM D'UTILISATEUR & BADGES ADMIN --- */
.request-card .user-name,
.request-item .user,
.user-badge,
.badge-user,
.requests-list .user {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #fef08a !important; /* Jaune clair */
    color: #854d0e !important;           /* Texte brun foncé très lisible */
    font-weight: bold !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
}