/* ----------- BASE ----------- */

body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #121212;
    color: #f1f1f1;
    margin: 0;
    padding: 20px;
    transition: background-color 0.5s, color 0.5s;
}

h1 {
    color: #f8f8f8;
}

form {
    margin-bottom: 20px;
}

input[type="text"] {
    padding: 10px;
    width: 300px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    background-color: #1e1e1e;
    color: #f1f1f1;
}

/* ----------- BOUTONS ----------- */

button,
.toggle-mode {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

button {
    background-color: #2e7d32;
    color: white;
    border: none;
}

button:hover {
    background-color: #1b5e20;
}

.toggle-mode {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 2px solid #f1f1f1;
    color: #f1f1f1;
}

.toggle-mode:hover {
    background-color: #f1f1f1;
    color: #121212;
}

/* ----------- CARTES VINYLES ----------- */

.vinyl-card {
    position: relative;
    margin: 15px auto;
    padding: 15px;
    max-width: 600px;
    background-color: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.vinyl-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.1);
}

.vinyl-card:hover .discogs-link {
    opacity: 1;
    pointer-events: auto;
}

.vinyl-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #333;
}

/* ----------- INFOS VINYLES ----------- */

.vinyl-info {
    margin-left: 20px;
    text-align: left;
    flex: 1;
}

.vinyl-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #ffffff;
}

.vinyl-artist {
    font-size: 1rem;
    color: #bbbbbb;
}

.vinyl-meta {
    font-size: 0.9rem;
    color: #999;
    margin-top: 4px;
}

.vinyl-prices {
    font-size: 0.85rem;
    color: #bbb;
    margin-top: 4px;
}

/* ----------- LIENS ----------- */

a {
    color: #b22222;
    text-decoration: none;
}

a:hover {
    color: #800000;
    text-decoration: underline;
}

/* ----------- LOGO DISCOGS ----------- */

.discogs-link {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.discogs-logo {
    width: 20px;
    height: auto;
    object-fit: contain;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    display: block;
}

.discogs-link:hover .discogs-logo {
    transform: scale(1);
}

.discogs-link::after {
    content: "Lien vers Discogs";
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    transform: translateY(-10px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.discogs-link:hover::after {
    opacity: 1;
    transform: translateY(-6px);
}


/* ----------- MODE CLAIR ----------- */

body.light-mode {
    background-color: #ffffff;
    color: #121212;
}

body.light-mode h1 {
    color: #121212;
}

body.light-mode input[type="text"] {
    background-color: #f1f1f1;
    color: #121212;
    border: 1px solid #ccc;
}

body.light-mode .vinyl-card {
    background-color: #fdfdfd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #ddd;
}

body.light-mode .vinyl-title {
    color: #121212;
}

body.light-mode .vinyl-artist {
    color: #444444;
}

body.light-mode a {
    color: #6200ea;
}

body.light-mode .toggle-mode {
    background-color: #f1f1f1;
    border: 2px solid #121212;
    color: #121212;
}

body.light-mode .toggle-mode:hover {
    background-color: #121212;
    color: #ffffff;
}


/* ----------- FILTRES ----------- */

.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.filters label {
    margin-right: 5px;
    font-weight: bold;
}

.filters select {
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #1e1e1e;
    color: #f1f1f1;
}

body.light-mode .filters select {
    background-color: #f1f1f1;
    color: #121212;
    border: 1px solid #ccc;
}


/* ----------- COMPTEUR ----------- */

#counter {
    margin: 15px auto;
    font-size: 1rem;
    font-weight: bold;
    color: #b22222;
}



/* ----------- TRACKLIST ----------- */

.tracklist {
    margin-top: 0.5em;
    font-size: 0.9em;
    color: #444;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
}

.tracklist.open {
    max-height: 1000px;
    opacity: 1;
}

.tracklist-ul {
    list-style-type: none;
    padding-left: 0;
}

.tracklist-ul li {
    margin-bottom: 0.3em;
}

.show-tracks-btn {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

/* Bouton réduit en bas à droite */
.show-tracks-btn.minimized {
    left: auto;
    right: 10px;
    bottom: 10px;
    transform: none;
    font-size: 0.65rem;
    padding: 4px 8px;
    opacity: 0.7;
}


/* ----------- BOUTON WISHLIST ----------- */


.button-wishlist {
    background-color: #b22222;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.button-wishlist:hover {
    background-color: #7a1212;
}



/* ----------- BOUTON COLLECTION (RETOUR) ----------- */


.button-return {
    background-color: #b22222; /* rouge foncé */
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.button-return:hover {
    background-color: #7a1212;
}
