/* Les polices ne sont plus importées ici : elles sont déclarées dans le <head>
   de chaque page. Un @import obligeait le navigateur à découvrir cette ligne
   APRÈS avoir chargé et analysé la feuille, soit deux allers-retours de plus
   avant le premier texte lisible. Si tu ajoutes une page, pense à y recopier
   les trois <link> — sans eux, la page tombera sur les polices de secours. */

/* Même palette et mêmes typos que la home, pour que /music reste le même site */
:root {
    --card-bg: #ffffff;
    --text-main: #2d2d2d;
    --text-muted: #666666;
    --accent-rare: #3498db;
    --accent-legendary: #d4af37;
    --border-color: rgba(0, 0, 0, 0.08);
    --back-bg: #1a1a1a;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f8f9fa;
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text-main);
    min-height: 100vh;
    padding: 3rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

/* Réservé aux lecteurs d'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--text-main);
    color: white;
    padding: 8px;
    z-index: 2000;
    transition: top 0.3s;
    text-decoration: none;
}

.skip-link:focus { top: 0; }

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-rare);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- Retour vers le portfolio ---------------------------------------------
   Même position que le lien des protos, mais en clair : ici le fond est
   papier, pas encre. N'apparaît que si le visiteur vient de la home. */

.home-back {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 200;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.home-back:hover {
    color: var(--text-main);
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
}

.home-back[hidden] { display: none; }
.home-back i { font-size: 0.7rem; }

@media (max-width: 620px) {
    .home-back { top: 12px; left: 12px; font-size: 0.74rem; padding: 6px 12px; }
}

/* --- En-tête --- */

.profile {
    width: 100%;
    max-width: 560px;
    text-align: center;
    /* Même filet de séparation que la home sous ses liens sociaux : c'est ce
       trait qui referme l'en-tête et ouvre le contenu. */
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* La home retire son filet sous 768px (son en-tête y est déjà resserré) :
   /music fait pareil pour que les deux pages restent jumelles.
   À placer APRÈS la règle ci-dessus : à spécificité égale, c'est l'ordre
   d'écriture qui tranche, et le bloc arrivait avant. */
@media (max-width: 768px) {
    .profile {
        padding-bottom: 0.5rem;
        border-bottom: none;
    }
}

/* --- Les trois projets, en orbite -----------------------------------------
   Chaque cercle est un bouton ; ses plateformes sont posées au centre puis
   projetées sur un cercle par rotate(angle) translate(rayon) rotate(-angle).
   Les angles et le décalage de recentrage viennent de script.js. */

.artists {
    --r: 74px; /* rayon de l'orbite */
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(1.5rem, 8vw, 3.5rem);
    margin-bottom: 1.2rem;
    padding: 0.5rem 0;
    transition: padding 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* Quand un projet est ouvert, on dégage la place pour l'orbite */
.artists.is-focused { padding: calc(var(--r) - 20px) 0; }

.artist {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.35s;
}

/* Les projets non sélectionnés s'effacent pour laisser la scène */
.artists.is-focused .artist:not(.is-open) {
    opacity: 0;
    transform: scale(0.55);
    pointer-events: none;
}

/* Le projet sélectionné glisse au centre de la ligne */
.artist.is-open { transform: translateX(var(--dx, 0px)); }

.artist-stage {
    position: relative;
    width: 84px;
    height: 84px;
}

.artist-avatar {
    position: relative;
    z-index: 2;
    width: 84px;
    height: 84px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, border-color 0.2s;
}

.artist-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.artist-avatar:hover { transform: scale(1.06); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14); }
.artist.is-open .artist-avatar { border-color: var(--text-main); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16); }

.artist-name {
    font-family: 'Lora', serif;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.7rem;
    color: var(--text-main);
    white-space: nowrap;
    transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1), color 0.2s;
}

/* Ouvert, le nom passe sous l'orbite pour ne pas être recouvert */
.artist.is-open .artist-name { transform: translateY(calc(var(--r, 74px) - 34px)); }

.orbit {
    list-style: none;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.orbit li {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    /* fermé : rangé sous l'avatar */
    transform: rotate(var(--a)) translate(0) rotate(calc(-1 * var(--a))) scale(0.3);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease,
                visibility 0s 0.5s;
}

.artist.is-open .orbit li {
    transform: rotate(var(--a)) translate(var(--r, 74px)) rotate(calc(-1 * var(--a))) scale(1);
    opacity: 1;
    visibility: visible;
    /* départ en cascade : les icônes se déploient l'une après l'autre */
    transition-delay: calc(var(--i, 0) * 45ms), calc(var(--i, 0) * 45ms), 0s;
}

.orbit a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, color 0.2s, border-color 0.2s;
}

.orbit a:hover {
    transform: scale(1.18);
    border-color: var(--text-main);
}

.tagline {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* --- Sections --- */

main {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #bbb;
    margin-bottom: 0.9rem;
    padding-left: 2px;
}

.section-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: -0.6rem 0 0.9rem 2px;
}

.block {
    display: flex;
    flex-direction: column;
}

/* --- Discographie : pochettes retournables --------------------------------
   La face avant est un bouton (l'action), la face arrière contient les liens
   plateformes. On masque en "visibility" la face non visible, sinon ses liens
   restent atteignables au clavier. */

.release-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.release {
    display: flex;
    flex-direction: column;
}

/* Sans cette règle, le display:flex ci-dessus l'emporte sur le [hidden]
   du navigateur et les sorties "en plus" restent visibles. */
.release[hidden] { display: none; }

.flip {
    perspective: 900px;
    margin-bottom: 0.6rem;
}

.flip-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.release.is-open .flip-inner { transform: rotateY(180deg); }

.flip-front,
.flip-back {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    visibility: visible;
    transition: visibility 0s;
}

.release:not(.is-open) .flip-back,
.release.is-open .flip-front {
    visibility: hidden;
    transition: visibility 0s 0.3s;
}

/* Face avant : la pochette */
.flip-front {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    background: var(--card-bg);
    cursor: pointer;
}

.flip-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.flip-front:hover img { transform: scale(1.04); }

/* Pastille "écoutez-moi" : indique que la pochette est cliquable */
.flip-hint {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.68rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
}

.flip-front:hover .flip-hint {
    opacity: 1;
    transform: scale(1.12);
}

/* Face arrière : le choix de plateforme */
.flip-back {
    transform: rotateY(180deg);
    background: var(--back-bg);
    border-color: rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.flip-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s, color 0.2s;
}

.flip-close:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.platform-pad {
    list-style: none;
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 5px;
    padding: 22px 6px 5px;
}

/* 32px : quatre par rangée, donc deux rangées suffisent même pour les
   sorties qui comptent sept plateformes. */
.platform-pad a {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #f0f0f0;
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.platform-pad a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Tidal n'a pas d'icône dans Font Awesome : on passe par le mot */
.platform-text {
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.platform-all {
    display: block;
    text-align: center;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    padding: 8px 4px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    transition: color 0.2s;
}

.platform-all:hover { color: #fff; }

/* Bouton "voir plus" : repris du style des boutons de la home */
.more-btn {
    align-self: center;
    margin-top: 1.3rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.more-btn:hover {
    background: #fcfcfc;
    border-color: #ccc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.more-btn i {
    font-size: 0.7rem;
    color: #bbb;
    transition: transform 0.3s;
}

.more-btn[aria-expanded="true"] i { transform: rotate(180deg); }

.release-title {
    font-family: 'Lora', serif;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
}

.release-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 2px;
}

/* --- Cartes de liens simples --- */

.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.7rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.2s, border-color 0.2s;
}

.link-card:last-child { margin-bottom: 0; }

.link-card:hover {
    transform: translateY(-2px);
    border-color: #ccc;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
}

.link-card:active { transform: translateY(0) scale(0.99); }

.link-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.link-title {
    font-family: 'Lora', serif;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
}

.link-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.link-arrow {
    color: #ccc;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: color 0.2s, transform 0.2s;
}

.link-card:hover .link-arrow {
    color: var(--text-main);
    transform: translateX(3px);
}

.link-card.support:hover { border-color: #e2a6a0; }

/* Le proto : dé qui roule, pour inviter à recliquer */
.link-card.experiment {
    border-style: dashed;
    background: transparent;
    box-shadow: none;
}

.link-card.experiment:hover {
    background: var(--card-bg);
    border-style: solid;
    border-color: var(--accent-rare);
}

.link-card.experiment .link-arrow {
    color: var(--accent-rare);
    font-size: 1.1rem;
    transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s;
}

.link-card.experiment:hover .link-arrow {
    transform: rotate(-25deg) scale(1.2);
}

/* --- Pied de page --- */

.page-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: #bbb;
    text-align: center;
    padding-bottom: 1rem;
}

.page-footer[hidden] { display: none; }

.page-footer a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.page-footer a:hover {
    color: var(--text-main);
    border-color: var(--text-main);
}

@media (max-width: 480px) {
    body { padding-top: 2rem; gap: 2rem; }
    .release-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; }
    .flip-inner { transition: none; }
    .link-card:hover, .flip-front:hover img { transform: none; }
}

/* --- Bouton d'écoute sur la pochette ---------------------------------------
   La pochette contient deux actions : retourner (toute la surface) et
   écouter (la pastille). D'où le conteneur, un bouton ne pouvant en
   contenir un autre. */

.flip-front {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    background: var(--card-bg);
}

.cover-flip {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.cover-play {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.62rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s, background 0.2s;
}

.cover-play i { transform: translateX(1px); } /* le triangle paraît décentré sinon */
.cover-play:hover { opacity: 1; transform: scale(1.12); background: rgba(0, 0, 0, 0.8); }
.release.is-playing .cover-play { background: var(--accent-legendary); color: #1a1a1a; opacity: 1; }

/* --- Player sticky ---------------------------------------------------------
   Même matière que les cartes du site : fond clair, filet fin, ombre douce.
   L'esprit "instrument" de la référence est gardé — micro-libellés, onde en
   traits fins, compteur aligné — mais écrit avec la typo et la palette du
   site plutôt qu'avec les siennes. */

.player {
    --wave-idle: rgba(0, 0, 0, 0.16);
    --wave-played: #2d2d2d;
    --wave-head: #3498db;

    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-main);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.07);
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.player.is-visible { transform: translateY(0); }
.player[hidden] { display: none; }

.player-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 8px max(1rem, calc((100vw - 900px) / 2)) 0;
}

/* Reprend exactement la convention de micro-titre des sections */
.player-label,
.player-source {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #bbb;
    white-space: nowrap;
}

.player-source { font-weight: 400; letter-spacing: 1px; }

.player-body {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.55rem max(1rem, calc((100vw - 900px) / 2)) 0.85rem;
}

.player-cover {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background: #f2f2f2;
}

.player-meta { min-width: 0; width: 150px; flex-shrink: 0; }

.player-track {
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-release {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.player-controls button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    color: #bbb;
    font-size: 0.78rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s, transform 0.2s;
}

.player-controls button:hover { color: var(--text-main); background: rgba(0, 0, 0, 0.05); }

/* Le bouton central reprend le relief des boutons de la home */
.player-controls .is-main {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
    color: var(--text-main);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.player-controls .is-main:hover {
    background: #fcfcfc;
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* L'onde sert aussi de barre de progression : on clique dedans pour se déplacer */
.player-wave {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 42px;
    cursor: pointer;
}

.player-wave canvas { display: block; width: 100%; height: 100%; }

.player-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    /* chiffres de largeur fixe : le compteur ne tressaute pas en défilant */
    font-variant-numeric: tabular-nums;
}

.player-close {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    color: #ccc;
    font-size: 0.75rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
}

.player-close:hover { color: var(--text-main); background: rgba(0, 0, 0, 0.05); }

/* On dégage la hauteur du player pour ne rien masquer en bas de page */
body.has-player { padding-bottom: 118px; }

@media (max-width: 700px) {
    .player-body {
        flex-wrap: wrap;
        gap: 0.6rem 0.7rem;
        padding-bottom: 0.75rem;
    }
    .player-meta { flex: 1; width: auto; }
    .player-wave { order: 10; flex: 1 0 100%; height: 32px; }
    .player-time { order: 11; }
    body.has-player { padding-bottom: 148px; }
}
