/**
 * Ohmnibus Player - Styles
 */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --bg-color: #1a1a1a;
    --card-bg: #2c2c2c;
    --text-color: #ffffff;
    --text-muted: #888;
    --border-color: #3a3a3a;
    --shadow: 0 2px 10px rgba(0,0,0,0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.main-header {
    background: #2c2c2c;
    border-bottom: 1px solid #3a3a3a;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.header-nav {
    display: flex;
    gap: 1rem;
}

.header-nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.header-nav a:hover {
    background: #404040;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.badge {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.badge-success {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.text-danger {
    color: var(--error-color);
    font-weight: 500;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-box {
    background: #2c2c2c;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #3a3a3a;
}

.login-box h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: #aaa;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #888;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #fff;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 1rem;
    color: #fff;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #404040;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn:hover {
    background: #505050;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-success {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.btn-error {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-danger {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-icon:hover {
    opacity: 1;
}

.icon {
    font-size: 1.2rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(39, 174, 96, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(39, 174, 96, 0.4);
}

.alert-error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.4);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.4);
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

.dashboard-header h1 {
    margin: 0;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #888;
    background: #2c2c2c;
    border-radius: 8px;
}

/* Artists Grid - Mode Liste */
.artists-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-left: -2rem;
    margin-right: -2rem;
}

.artist-card {
    background: #2c2c2c;
    border-bottom: 1px solid #3a3a3a;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    gap: 2rem;
}

.artist-card:first-child {
    border-top: 1px solid #3a3a3a;
}

.artist-card:hover {
    background: #333;
}

.artist-card-header {
    flex: 0 0 350px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.artist-card-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
}

.artist-card-header h3 a {
    color: #ffffff;
    text-decoration: none;
}

.artist-card-header h3 a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.artist-card-body {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.artist-description {
    flex: 1;
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artist-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
    white-space: nowrap;
}

.artist-card-footer {
    flex: 0 0 auto;
    display: flex;
    gap: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #2c2c2c;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid #3a3a3a;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #3a3a3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #3a3a3a;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .artists-grid {
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .artist-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .artist-card-header {
        flex: 1;
        width: 100%;
    }

    .artist-card-body {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .artist-description {
        white-space: normal;
    }

    .artist-card-footer {
        width: 100%;
        justify-content: flex-start;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Footer */
.main-footer {
    background: #2c2c2c;
    border-top: 1px solid #3a3a3a;
    margin-top: 2rem;
    padding: 0.75rem 0;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* Layout pour footer sticky - appliqué sur TOUTES les pages */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > .container,
body > main,
.player-page {
    flex: 1;
}

.main-footer {
    margin-top: auto; /* Colle le footer en bas */
}

/* ========================================
   MENU BURGER MOBILE
   ======================================== */

.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background-color: #fff !important;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}


@media (max-width: 768px) {
    .burger-menu {
        display: flex;
        background: rgba(0, 0, 0, 0.5) !important;
        border-radius: 4px;
    }
    
    .burger-menu span {
        background-color: #fff !important;
    }
    
    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100%;
        width: 280px;
        background: #2c2c2c;
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0;
        transition: right 0.3s;
        z-index: 999;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    }
    
    .header-nav.active {
        right: 0;
    }
    
    .header-nav a {
        padding: 1.2rem 1rem;
        margin-bottom: 0.5rem;
        border-radius: 6px;
    }
    
    .header-container {
        position: relative;
    }
}
    .container {
        min-width: 700px;
    }
}

@media (max-width: 992px) {
    .container {
        min-width: auto;
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

/* Menu burger - version finale sans overlay séparé */
@media (max-width: 768px) {
    /* Assombrir le body quand le menu est ouvert */
}

/* Backdrop simple sans bloquer les clics */
@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
    }
}

/* Burger menu visible sur tous les fonds */
@media (max-width: 768px) {
    .burger-menu {
        background: rgba(0, 0, 0, 0.5);
        border-radius: 4px;
    }
    
    .burger-menu span {
        background-color: #fff !important;
    }
}

/* BURGER MENU - CSS ultra-spécifique pour surcharger tout CSS inline */
.burger-menu span,
.burger-menu > span,
div.burger-menu span,
.header-right .burger-menu span,
.burger-menu span:nth-child(1),
.burger-menu span:nth-child(2),
.burger-menu span:nth-child(3) {
    background-color: #fff !important;
    background: #fff !important;
}

@media (max-width: 768px) {
    .burger-menu,
    div.burger-menu {
        background: rgba(0, 0, 0, 0.5) !important;
        border-radius: 4px !important;
    }
    
    .burger-menu span,
    .burger-menu > span,
    div.burger-menu span {
        background-color: #fff !important;
        background: #fff !important;
    }
}
