:root {
    /* Palette vintage moderne */
    --coral: #E16B5A;
    --orange: #F39C63;
    --gold: #F5C563;
    --mint: #93C7A8;
    --turquoise: #5BA89F;
    --teal: #4A758C;
    --navy: #3C5872;
    
    /* Couleurs principales */
    --primary: #5BA89F;
    --secondary: #F39C63;
    --accent: #E16B5A;
    
    /* Backgrounds ultra modernes */
    --bg-dark: #1a1d24;
    --bg-card: #22252e;
    --bg-elevated: #2a2d38;
    --bg-light: rgba(255, 255, 255, 0.03);
    
    /* Textes */
    --text-primary: #ffffff;
    --text-secondary: #b8bac1;
    --text-muted: #737580;
    
    /* Effets */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.35);
    --radius: 16px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Gradient moderne subtil */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(91, 168, 159, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(243, 156, 99, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 29, 36, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.vinyl-icon {
    font-size: 1.8em;
    filter: drop-shadow(0 2px 8px rgba(91, 168, 159, 0.3));
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .vinyl-icon {
    transform: rotate(180deg);
}

.logo-text {
    background: linear-gradient(135deg, var(--turquoise) 0%, var(--mint) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vinyl-count {
    color: var(--text-secondary);
    font-size: 0.95em;
    font-weight: 600;
    padding: 8px 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-icon {
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Panneau de recherche */
.search-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 29, 36, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 200;
    padding: 120px 24px 24px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-container {
    max-width: 800px;
    margin: 0 auto 40px;
    position: relative;
}

#search-input {
    width: 100%;
    padding: 20px 60px 20px 24px;
    font-size: 1.1em;
    background: var(--bg-elevated);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(91, 168, 159, 0.1);
    background: var(--bg-card);
}

#search-input::placeholder {
    color: var(--text-muted);
}

.btn-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3em;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: rgba(225, 107, 90, 0.15);
    color: var(--coral);
    transform: translateY(-50%) rotate(90deg);
}

.search-results {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* Grille de collection */
.collection-grid {
    max-width: 1400px;
    margin: 48px auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    position: relative;
    z-index: 1;
}

/* Carte vinyle moderne */
.vinyl-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.vinyl-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--coral), var(--orange), var(--gold), var(--mint), var(--turquoise));
    opacity: 0;
    transition: opacity 0.3s;
}

.vinyl-card:hover::before {
    opacity: 1;
}

.vinyl-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(91, 168, 159, 0.2);
    background: var(--bg-elevated);
}

.vinyl-cover {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: linear-gradient(135deg, var(--teal), var(--navy));
}

.vinyl-info {
    padding: 16px;
}

.vinyl-title {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.vinyl-artist {
    color: var(--primary);
    font-size: 0.9em;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.vinyl-meta {
    color: var(--text-muted);
    font-size: 0.85em;
    font-weight: 400;
}

.vinyl-location {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.8em;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 29, 36, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 32px;
    padding: 32px;
}

.modal-cover img {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-md);
}

.modal-info h2 {
    font-size: 2em;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.modal-artist {
    font-size: 1.3em;
    color: var(--primary);
    margin-bottom: 16px;
    font-weight: 600;
}

.modal-meta {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 0.95em;
}

.dot {
    margin: 0 8px;
    opacity: 0.5;
}

/* Formulaires */
.edit-section h3,
.view-section h3 {
    color: var(--text-primary);
    margin: 28px 0 16px;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: -0.01em;
}

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

.form-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.9em;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    font-size: 0.95em;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(91, 168, 159, 0.1);
    background: var(--bg-card);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select {
    cursor: pointer;
}

/* Boutons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--turquoise), var(--mint));
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-obs {
    background: linear-gradient(135deg, var(--coral), var(--orange));
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-obs:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(225, 107, 90, 0.15);
    border: 1px solid rgba(225, 107, 90, 0.3);
    color: var(--coral);
}

.btn-danger:hover {
    background: var(--coral);
    color: #fff;
    border-color: var(--coral);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 120px 24px;
    position: relative;
    z-index: 1;
}

.empty-icon {
    font-size: 96px;
    margin-bottom: 24px;
    opacity: 0.3;
    filter: grayscale(1);
}

.empty-state h2 {
    color: var(--text-primary);
    font-size: 1.8em;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.05em;
    max-width: 400px;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
        padding: 0 16px;
        margin: 32px auto;
    }
    
    .logo-text {
        font-size: 0.9em;
    }
    
    .header-content {
        padding: 16px 20px;
    }
    
    .vinyl-count {
        font-size: 0.85em;
        padding: 6px 12px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        border-radius: var(--radius-sm);
    }
    
    .modal-body {
        padding: 24px;
        gap: 24px;
    }
    
    .empty-state {
        padding: 80px 24px;
    }
    
    .empty-icon {
        font-size: 72px;
    }
    
    .empty-state h2 {
        font-size: 1.5em;
    }
}
