/* ==========================================================================
   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;
}

/* Accroche du site */
.site-tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
}

.site-tagline strong {
    color: var(--text);
}

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

/* Pochette floutée en toile de fond du hero */
.hero-with-art::before {
    content: '';
    position: absolute;
    inset: -40px;
    background-image: var(--hero-art);
    background-size: cover;
    background-position: center;
    filter: blur(42px) saturate(1.2);
    opacity: 0.35;
}

.hero-with-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 10, 14, 0.25) 0%, rgba(11, 10, 14, 0.75) 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.5rem;
    padding: 1.5rem;
}

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

.hero .cover-lg {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1 / 1;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease;
}

.hero a:hover .cover-lg {
    transform: scale(1.02) rotate(-0.5deg);
}

.hero-kicker {
    font-family: var(--display);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: var(--accent-hover);
    margin: 0 0 0.5rem;
}

.hero-title {
    font-family: var(--display);
    text-transform: uppercase;
    font-size: clamp(1.4rem, 3.2vw, 2rem);
    line-height: 1.15;
    margin: 0.6rem 0;
}

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

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

/* Cartes de publication avec visuel */
.content-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.content-card-media {
    position: relative;
    display: block;
    aspect-ratio: 5 / 3;
    overflow: hidden;
    background: var(--surface-2);
}

.content-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.content-card:hover .content-card-media img {
    transform: scale(1.05);
}

.content-card-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    opacity: 0.5;
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--bg) 100%);
}

.content-card-score {
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    font-family: var(--display);
    font-size: 1.35rem;
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
    padding: 0.25rem 0.8rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.content-card-score small {
    font-size: 0.7em;
    opacity: 0.85;
}

.content-card-body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.content-card-meta {
    margin: 0;
}

.content-card-byline {
    margin-top: auto;
}

/* 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;
    }

    /* Pas de sidebar (article sans groupe lié) : pleine largeur */
    .content-layout.no-sidebar {
        display: block;
    }

    .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);
}

/* Bandeau de prévisualisation (brouillons) */
.preview-banner {
    background: repeating-linear-gradient(45deg, var(--accent-soft), var(--accent-soft) 12px, transparent 12px, transparent 24px);
    border: 1px dashed var(--accent);
    border-radius: var(--radius);
    color: var(--text);
    padding: 0.8rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
    font-weight: 600;
}

/* Chronique affichée sur la page album */
.inline-review {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.inline-review-head {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.inline-review-head .score {
    font-size: 2rem;
}

.inline-review-head h3 {
    margin: 0;
}

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

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

.rating-item-written {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-bottom: 0.6rem;
}

.rating-text {
    max-width: 42rem;
}

.score-inline {
    font-size: 1.1rem;
}

/* Petite mention « /10 » atténuée derrière chaque note */
.score-max {
    font-size: 0.55em;
    color: var(--text-muted);
    font-weight: 400;
}

.score-empty {
    color: var(--text-muted);
}

/* Intitulé de section discret (petite capitale accentuée) */
.eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-hover);
}

/* Scoreboard : rédaction vs lecteurs, côte à côte */
.scoreboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.score-tile {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
}

.score-tile-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.score-tile .score {
    font-size: 2.4rem;
    line-height: 1.1;
}

/* Chronique hero : le contenu éditorial mis en avant */
.chronique-hero {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border-strong);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.chronique-head {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.chronique-score {
    font-size: 2.6rem;
    line-height: 1;
}

.chronique-title {
    display: block;
    font-size: 1.6rem;
    margin: 0.1rem 0 0.35rem;
    padding: 0;
    border: 0;
}

.chronique-title::before {
    display: none;
}

.chronique-empty {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}

/* Accès rapide aux autres chroniques (cartes → ancres) */
.chronique-others {
    margin-bottom: 1.5rem;
}

.chronique-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.chronique-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s ease;
}

.chronique-card:hover {
    border-color: var(--accent);
}

.chronique-card-score {
    font-size: 1.5rem;
}

.chronique-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chronique-card-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 520px) {
    .scoreboard {
        grid-template-columns: 1fr;
    }
}

/* 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);
}

/* --------------------------------------------------------------------------
   Fiche groupe — l'artwork porte l'identité (pas de photo de groupe)
   -------------------------------------------------------------------------- */

.band-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: linear-gradient(145deg, var(--surface) 0%, var(--surface-2) 100%);
    margin-bottom: 2rem;
}

.band-hero-inner {
    position: relative;
    z-index: 1;
    padding: 2.75rem 2rem;
}

.band-hero-title {
    font-family: var(--display);
    text-transform: uppercase;
    font-size: clamp(2rem, 6vw, 3.6rem);
    line-height: 1;
    margin: 0.3rem 0 0.9rem;
}

.band-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1.1rem;
    color: var(--text-muted);
    margin: 0 0 0.9rem;
}

.band-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 1.25rem;
}

.band-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--text);
}

.band-layout {
    display: grid;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 900px) {
    .band-layout {
        grid-template-columns: 1fr 260px;
    }
}

.band-bio {
    max-width: 65ch;
}

/* Mur de pochettes : le cœur visuel de la page */
.discography-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.25rem;
}

.disc-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: var(--text);
    text-decoration: none;
}

.disc-cover {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

.disc-cover .cover {
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    transition: transform 0.25s ease;
}

.disc-item:hover .disc-cover .cover {
    transform: scale(1.06);
}

.disc-title {
    font-weight: 600;
    line-height: 1.25;
}

.disc-item:hover .disc-title {
    color: var(--accent-hover);
}

.lineup {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.lineup li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
}

.lineup-name {
    font-weight: 600;
}
