/* ==========================================================================
   Metal Eternel — design system
   Sombre éditorial : l'énergie metal, la lisibilité d'un magazine.
   ========================================================================== */

@font-face {
    font-family: 'Archivo Black';
    src: url("../fonts/archivo-black-VgUkuOr.woff2") format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0b0a0e;
    --surface: #141218;
    --surface-2: #1b1822;
    --border: #262330;
    --border-strong: #363144;
    --text: #ece9f1;
    --text-muted: #9c96a9;
    --accent: #e5382f;
    --accent-hover: #ff5a4f;
    --accent-soft: rgba(229, 56, 47, 0.12);
    --radius: 10px;
    --radius-sm: 6px;
    --display: 'Archivo Black', system-ui, sans-serif;
    --body: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

p a,
.article-body a {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --------------------------------------------------------------------------
   Typographie
   -------------------------------------------------------------------------- */

h1,
h2,
.brand {
    font-family: var(--display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1.15;
}

h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin: 0.5rem 0 1rem;
}

h2 {
    font-size: 1.05rem;
    color: var(--text);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

h2::before {
    content: '';
    width: 1.4rem;
    height: 3px;
    background: var(--accent);
    align-self: center;
    flex-shrink: 0;
}

h3 {
    font-size: 1.05rem;
    line-height: 1.3;
    margin: 0 0 0.3rem;
}

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

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 10, 14, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding: 0.85rem 0;
}

.brand {
    font-size: 1.15rem;
    color: var(--text);
    letter-spacing: 0.02em;
}

.brand:hover {
    color: var(--text);
}

.brand::after {
    content: '.';
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nav-links a {
    color: var(--text-muted);
    padding: 0.2rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.nav-account {
    margin-left: auto;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.nav-user {
    color: var(--text-muted);
}

.nav-search {
    margin-left: auto;
}

.nav-search + .nav-account {
    margin-left: 0;
}

.nav-search input {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font: inherit;
    font-size: 0.88rem;
    width: 11rem;
    max-width: 38vw;
    transition: border-color 0.15s ease, width 0.2s ease;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--accent);
    width: 14rem;
}

/* --------------------------------------------------------------------------
   Contenu
   -------------------------------------------------------------------------- */

main.container {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Hero (une de la home) */
.hero {
    display: grid;
    gap: 1.5rem;
    background: linear-gradient(145deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 720px) {
    .hero {
        grid-template-columns: 220px 1fr;
        align-items: center;
        padding: 2rem;
    }
}

.hero .cover-lg {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1 / 1;
}

.hero-title {
    font-size: clamp(1.4rem, 3.2vw, 2rem);
    margin: 0.6rem 0;
}

.hero-title a {
    color: var(--text);
}

.hero-title a:hover {
    color: var(--accent-hover);
}

/* Cartes */
.card-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    padding: 0;
    list-style: none;
}

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

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.card-album {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.card-album h3 {
    margin-top: 0;
}

/* Badges */
.badge {
    display: inline-block;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.08rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.3rem;
}

a.badge:hover {
    color: var(--text);
    border-color: var(--accent);
}

.badge-accent {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-hover);
}

/* Note */
.score {
    font-family: var(--display);
    font-size: 1.5rem;
    color: var(--accent-hover);
}

/* Pochettes */
.cover {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--bg);
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.cover-sm {
    width: 72px;
    height: 72px;
}

.cover-lg {
    width: 180px;
    height: 180px;
}

.cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
    font-size: 1.5rem;
    opacity: 0.6;
    box-shadow: none;
}

.cover-placeholder.cover-lg {
    font-size: 3rem;
}

.album-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.album-header h1 {
    margin: 0;
}

/* Tracklist */
.tracklist {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: track;
}

.tracklist li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--border);
}

.tracklist li:nth-child(odd) {
    background: var(--surface);
}

.tracklist .duration {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Article */
.article-body {
    white-space: pre-line;
    font-size: 1.06rem;
    max-width: 42rem;
}

.article-body h2::before {
    display: none;
}

/* Layout chronique : sidebar discographie */
.content-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.content-layout .sidebar {
    order: 2;
}

.content-layout .content-main {
    order: 1;
    min-width: 0;
}

@media (min-width: 800px) {
    .content-layout {
        display: grid;
        grid-template-columns: 230px 1fr;
        align-items: start;
        gap: 2.5rem;
    }

    .content-layout .sidebar {
        order: 0;
        position: sticky;
        top: 4.5rem;
    }
}

.sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem;
    font-size: 0.9rem;
}

.sidebar-title {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.6rem;
}

.sidebar-albums {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
}

.sidebar-albums li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-albums li:last-child {
    border-bottom: none;
}

.sidebar-albums li.current {
    font-weight: 700;
}

.sidebar-albums .badge {
    font-size: 0.62rem;
    padding: 0.02rem 0.45rem;
    margin-left: 0.25rem;
}

/* --------------------------------------------------------------------------
   Formulaires
   -------------------------------------------------------------------------- */

form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 0.92rem;
}

form input[type='text'],
form input[type='email'],
form input[type='password'],
form input[type='search'],
form select,
form textarea {
    width: 100%;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
    font: inherit;
    transition: border-color 0.15s ease;
}

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

button,
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1.4rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s ease;
}

button:hover,
.btn:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* Flash */
.flash {
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.flash-success {
    background: rgba(46, 125, 74, 0.15);
    border: 1px solid rgba(46, 125, 74, 0.5);
}

.flash-error {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
}

/* Avis / commentaires */
.rating-item {
    border-top: 1px solid var(--border);
    padding: 0.85rem 0;
}

.rating-item .who {
    font-weight: 700;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

/* Page d'erreur */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page .error-code {
    font-family: var(--display);
    font-size: clamp(4rem, 15vw, 8rem);
    color: var(--accent);
    line-height: 1;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 2rem 0;
    background: var(--surface);
}
