/*
Theme Name: Nasubatv Music
Theme URI: https://nasubatv.com
Author: Nasubatv
Author URI: https://nasubatv.com
Description: Thème WordPress élégant et moderne pour partage de musique et playlists. Design mobile-first avec lecteur audio intégré.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nasubatv-music
*/

/* ==========================================
   RESET ET BASE
   ========================================== */

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

:root {
    --primary-color: #1db954;
    --secondary-color: #191414;
    --text-color: #ffffff;
    --text-muted: #b3b3b3;
    --bg-dark: #121212;
    --bg-card: #181818;
    --hover-bg: #282828;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.4);
}

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

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

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   HEADER
   ========================================== */

.site-header {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--bg-dark) 100%);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

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

.site-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), #1ed760);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-navigation ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.site-navigation a {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
}

.site-navigation a:hover {
    background-color: var(--hover-bg);
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero-section {
    padding: 3rem 1rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(29, 185, 84, 0.1) 0%, transparent 100%);
}

.hero-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   CONTAINER
   ========================================== */

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

.main-content {
    padding: 2rem 0 4rem;
}

/* ==========================================
   CATEGORY SECTION
   ========================================== */

.category-section {
    margin-bottom: 3rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--hover-bg);
}

.category-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.view-all-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.view-all-link:hover {
    color: var(--primary-color);
}

/* ==========================================
   PLAYLIST GRID
   ========================================== */

.playlist-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.playlist-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.playlist-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    background-color: var(--hover-bg);
}

.playlist-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background-color: var(--secondary-color);
}

.playlist-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.playlist-card:hover .playlist-thumbnail img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.5);
}

.playlist-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 18px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

.playlist-info {
    padding: 1.25rem;
}

.playlist-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.track-count::before {
    content: '♪ ';
}

.btn-voir-plus {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-voir-plus:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: scale(1.02);
}

/* ==========================================
   FOOTER
   ========================================== */

.site-footer {
    background-color: var(--secondary-color);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--hover-bg);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================
   RESPONSIVE - TABLET
   ========================================== */

@media (min-width: 640px) {
    .playlist-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-section h2 {
        font-size: 2.5rem;
    }
}

/* ==========================================
   RESPONSIVE - DESKTOP
   ========================================== */

@media (min-width: 1024px) {
    .playlist-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .hero-section {
        padding: 4rem 1rem;
    }

    .hero-section h2 {
        font-size: 3rem;
    }

    .category-header h3 {
        font-size: 1.75rem;
    }
}

@media (min-width: 1280px) {
    .playlist-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */

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

.playlist-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.playlist-card:nth-child(1) { animation-delay: 0.1s; }
.playlist-card:nth-child(2) { animation-delay: 0.2s; }
.playlist-card:nth-child(3) { animation-delay: 0.3s; }
.playlist-card:nth-child(4) { animation-delay: 0.4s; }

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ==========================================
   SINGLE PLAYLIST PAGE
   ========================================== */

.single-playlist-content {
    padding-top: 2rem;
}

.playlist-header {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(180deg, var(--hover-bg) 0%, transparent 100%);
    border-radius: var(--border-radius);
}

.playlist-cover {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.playlist-cover img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
}

.playlist-details {
    text-align: center;
}

.playlist-type {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.playlist-details .playlist-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.playlist-meta-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meta-item strong {
    color: var(--text-color);
}

.meta-separator {
    color: var(--text-muted);
}

.playlist-content {
    margin-bottom: 3rem;
    line-height: 1.8;
}

.playlist-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.playlist-content audio {
    width: 100%;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
}

.playlist-content h2,
.playlist-content h3 {
    color: var(--text-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.playlist-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--hover-bg);
    border-bottom: 1px solid var(--hover-bg);
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.playlist-navigation a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.playlist-navigation a:hover {
    color: var(--primary-color);
    background-color: var(--hover-bg);
}

.related-playlists {
    margin-top: 4rem;
}

.related-playlists h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--hover-bg);
}

/* ==========================================
   ARCHIVE PAGE
   ========================================== */

.archive-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 1rem;
    background: linear-gradient(180deg, rgba(29, 185, 84, 0.1) 0%, transparent 100%);
    border-radius: var(--border-radius);
}

.archive-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.archive-description {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================
   PAGINATION
   ========================================== */

.pagination {
    margin: 3rem 0;
    text-align: center;
}

.pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 0.5rem;
    padding: 0;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination .active {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--bg-card);
    color: var(--text-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.pagination .active {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* ==========================================
   NO CONTENT MESSAGE
   ========================================== */

.no-content {
    padding: 4rem 2rem;
}

.no-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.no-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ==========================================
   RESPONSIVE - SINGLE PAGE
   ========================================== */

@media (min-width: 768px) {
    .playlist-header {
        flex-direction: row;
        align-items: flex-end;
        text-align: left;
    }

    .playlist-cover {
        margin: 0;
    }

    .playlist-details {
        text-align: left;
        flex: 1;
    }

    .playlist-details .playlist-title {
        font-size: 3rem;
    }

    .playlist-meta-info {
        justify-content: flex-start;
    }
}

@media (min-width: 1024px) {
    .playlist-details .playlist-title {
        font-size: 3.5rem;
    }
}
