/* ============================================================================
   TRACKFLY — Design System
   ----------------------------------------------------------------------------
   Référence visuelle validée : /Users/nostra/claude/trackfly-template.html
   (mockup de page producteur — thème mono-dark + accent ambre, wordmark en
   Fraunces italic, UI en Inter/système, hero éditorial + grille de cartes +
   lecteur sticky).

   Ce fichier est LA feuille que toute page Trackfly doit charger pour
   partager la même identité visuelle.

   STRUCTURE
     1. Tokens (variables CSS)   — couleurs, forme, easing. Globales, sans
                                    danger à charger sur n'importe quelle page :
                                    ce sont de simples variables, elles ne
                                    stylent rien tant qu'aucune règle ne les
                                    utilise.
     2. Composants « .tf-page »  — bibliothèque de blocs réutilisables extraite
                                    de trackfly-template.html (topbar/wordmark,
                                    boutons, hero producteur, grille de cartes
                                    de beats, lecteur sticky, stats, tabs,
                                    footer).

   PORTÉE DES COMPOSANTS (important)
     Toutes les classes de la section 2 sont scopées sous l'ancêtre
     « .tf-page » (ex. « .tf-page .avatar », « .tf-page .play »). Une page qui
     construit sa mise en page à partir de zéro sur le modèle de
     trackfly-template.html enveloppe son contenu dans un élément
     class="tf-page" (par ex. <body class="tf-page">) pour les activer.

     Ce choix est volontaire : certaines pages existantes (profil.html, par
     exemple) génèrent déjà leur propre HTML dynamiquement en JavaScript avec
     des noms de classes courants (.avatar, .socials, .play, .track…) qui sont
     des ACCROCHES DE CODE — le script les cible directement, on ne doit
     jamais les modifier. Sans le scope « .tf-page », charger cette feuille
     sur une telle page écraserait silencieusement son style (pire : certaines
     règles ci-dessous comme « .play{opacity:0} » attendent un survol de
     « .card », absent ailleurs, ce qui rendrait un bouton invisible). Avec le
     scope, ces pages peuvent charger trackfly.css sans risque : elles ne
     profitent que des TOKENS (section 1), et stylent leurs propres classes
     avec ces tokens dans leur propre feuille.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. TOKENS — palette + forme, valeurs validées dans trackfly-template.html
   ---------------------------------------------------------------------------- */
:root{
  /* Fond / surfaces (mono-dark) */
  --bg:#09090b;
  --surface:#141417;
  --surface-2:#1b1b20;
  --line:#26262c;
  --line-2:#33333b;

  /* Texte */
  --text:#ededf0;
  --dim:#8f8f98;
  --faint:#5f5f68;

  /* Accent de marque (ambre) + ton crème pour les titres éditoriaux */
  --amber:#e0a63a;
  --amber-2:#f0b855;
  --amber-ink:#170f02;
  --cream:#efe7d6;

  /* Forme */
  --radius:14px;
  --ease:cubic-bezier(.16,.84,.28,1);
}

/* ----------------------------------------------------------------------------
   2. COMPOSANTS « .tf-page » — extraits de trackfly-template.html
   ---------------------------------------------------------------------------- */

/* -- Base : fond, typo, conteneur, italique éditorial -- */
.tf-page{background:var(--bg);color:var(--text);
  font-family:Inter,system-ui,-apple-system,sans-serif;font-size:15px;line-height:1.5;
  -webkit-font-smoothing:antialiased}
.tf-page a{color:inherit;text-decoration:none}
.tf-page .wrap{max-width:1080px;margin:0 auto;padding:0 22px}
.tf-page .serif{font-family:Fraunces,Georgia,serif;font-style:italic}

/* -- Topbar plateforme (wordmark + nav) -- */
.tf-page .top{position:sticky;top:0;z-index:40;background:rgba(9,9,11,.78);
  backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
.tf-page .top .wrap{display:flex;align-items:center;justify-content:space-between;height:56px}
.tf-page .brand{font-family:Fraunces,Georgia,serif;font-style:italic;font-weight:600;
  font-size:17px;color:var(--cream);letter-spacing:.01em}
.tf-page .brand b{color:var(--amber);font-style:normal}
.tf-page .top nav{display:flex;gap:6px;align-items:center}
.tf-page .pill{font-size:13px;color:var(--dim);padding:8px 13px;border-radius:100px;transition:.15s}
.tf-page .pill:hover{color:var(--text);background:var(--surface)}

/* -- Boutons -- */
.tf-page .btn{font:inherit;font-size:13px;font-weight:500;padding:8px 15px;border-radius:100px;
  border:1px solid var(--line-2);background:transparent;color:var(--text);cursor:pointer;transition:.15s}
.tf-page .btn:hover{border-color:var(--dim)}
.tf-page .btn.amber{background:var(--amber);color:var(--amber-ink);border-color:var(--amber);font-weight:600}
.tf-page .btn.amber:hover{background:var(--amber-2)}

/* -- Hero producteur (bannière + avatar + identité) -- */
.tf-page .hero{position:relative;margin-top:22px}
.tf-page .cover{height:210px;border-radius:20px;background:
   radial-gradient(120% 160% at 15% 0%, #2a2118 0%, rgba(42,33,24,0) 55%),
   radial-gradient(120% 160% at 100% 100%, #17181f 0%, rgba(23,24,31,0) 60%),
   #101013;border:1px solid var(--line);overflow:hidden}
.tf-page .head{display:flex;align-items:flex-end;gap:20px;margin-top:-52px;padding:0 8px;position:relative}
.tf-page .avatar{width:112px;height:112px;border-radius:26px;background:#211c15;
  border:3px solid var(--bg);flex-shrink:0;overflow:hidden;box-shadow:0 10px 40px rgba(0,0,0,.5)}
.tf-page .avatar img{width:100%;height:100%;object-fit:cover}
.tf-page .head .id{flex:1;min-width:0;padding-bottom:6px}
.tf-page .head h1{font-family:Fraunces,Georgia,serif;font-style:italic;font-weight:600;
  font-size:34px;line-height:1;color:var(--cream)}
.tf-page .tag{color:var(--dim);font-size:14px;margin-top:7px;display:flex;flex-wrap:wrap;
  gap:6px 14px;align-items:center}
.tf-page .dot{width:3px;height:3px;border-radius:50%;background:var(--faint);display:inline-block}
.tf-page .verified{color:var(--amber);font-size:13px}
.tf-page .actions{display:flex;gap:8px;padding-bottom:8px}
.tf-page .socials{display:flex;gap:14px;margin:16px 8px 0;color:var(--faint)}
.tf-page .socials a{font-size:13px;transition:.15s}
.tf-page .socials a:hover{color:var(--amber)}

.tf-page .stats{display:flex;gap:28px;margin:22px 8px 0}
.tf-page .stat b{font-size:19px;font-weight:600;color:var(--text)}
.tf-page .stat span{display:block;font-size:12px;color:var(--dim);margin-top:1px}

/* -- Barre de section + onglets -- */
.tf-page .bar{display:flex;align-items:baseline;justify-content:space-between;margin:38px 8px 16px}
.tf-page .bar h2{font-size:16px;font-weight:600;letter-spacing:.02em}
.tf-page .bar .more{font-size:13px;color:var(--dim)}
.tf-page .tabs{display:flex;gap:5px;margin:0 8px 18px}
.tf-page .tab{font-size:13px;color:var(--dim);padding:7px 14px;border-radius:100px;
  cursor:pointer;transition:.15s}
.tf-page .tab.on{background:var(--surface);color:var(--text);border:1px solid var(--line)}
.tf-page .tab:not(.on):hover{color:var(--text)}

/* -- Grille de cartes (beats / packs) -- */
.tf-page .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
  gap:16px;padding:0 8px}
.tf-page .card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;transition:.16s;cursor:pointer}
.tf-page .card:hover{border-color:var(--line-2);transform:translateY(-2px)}
.tf-page .art{position:relative;aspect-ratio:1;background:#191922;overflow:hidden}
.tf-page .art img{width:100%;height:100%;object-fit:cover;transition:.3s}
.tf-page .card:hover .art img{transform:scale(1.04)}
.tf-page .play{position:absolute;left:12px;bottom:12px;width:42px;height:42px;border-radius:50%;
  background:var(--amber);color:var(--amber-ink);display:flex;align-items:center;justify-content:center;
  font-size:16px;opacity:0;transform:translateY(6px);transition:.16s;box-shadow:0 6px 20px rgba(224,166,58,.35)}
.tf-page .card:hover .play{opacity:1;transform:none}
.tf-page .badge{position:absolute;right:10px;top:10px;font-size:11px;font-weight:600;color:var(--cream);
  background:rgba(9,9,11,.6);backdrop-filter:blur(6px);padding:4px 9px;border-radius:100px}
.tf-page .meta{padding:12px 13px 13px}
.tf-page .meta .t{font-weight:500;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tf-page .meta .s{color:var(--dim);font-size:12px;margin-top:3px}
.tf-page .buy{display:flex;align-items:center;justify-content:space-between;margin-top:11px;
  padding-top:11px;border-top:1px solid var(--line)}
.tf-page .price{font-weight:600;font-size:15px;color:var(--cream)}
.tf-page .add{font-size:12px;font-weight:600;color:var(--amber);padding:6px 12px;
  border:1px solid var(--line-2);border-radius:100px;transition:.15s}
.tf-page .card:hover .add{border-color:var(--amber);background:rgba(224,166,58,.08)}

/* -- Lecteur sticky (barre de lecture en bas d'écran) -- */
.tf-page .player{position:fixed;left:0;right:0;bottom:0;z-index:50;background:rgba(20,20,23,.92);
  backdrop-filter:blur(18px);border-top:1px solid var(--line)}
.tf-page .player .wrap{display:flex;align-items:center;gap:16px;height:72px}
.tf-page .np{display:flex;align-items:center;gap:12px;min-width:0;width:240px}
.tf-page .np .mini{width:46px;height:46px;border-radius:9px;background:#23232b;overflow:hidden;flex-shrink:0}
.tf-page .np .mini img{width:100%;height:100%;object-fit:cover}
.tf-page .np .txt{min-width:0}
.tf-page .np .txt .a{font-weight:500;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tf-page .np .txt .b{color:var(--dim);font-size:12px}
.tf-page .ctrls{display:flex;align-items:center;gap:14px}
.tf-page .ctrls .c{color:var(--dim);font-size:15px;cursor:pointer}
.tf-page .ctrls .pp{width:40px;height:40px;border-radius:50%;background:var(--cream);color:#0a0a0a;
  display:flex;align-items:center;justify-content:center;font-size:15px;cursor:pointer}
.tf-page .prog{flex:1;display:flex;align-items:center;gap:10px;color:var(--dim);font-size:11px}
.tf-page .prog .track{flex:1;height:4px;border-radius:3px;background:var(--line-2);position:relative;overflow:hidden}
.tf-page .prog .track i{position:absolute;left:0;top:0;bottom:0;width:34%;background:var(--amber);border-radius:3px}
.tf-page .pbuy{font-size:13px;font-weight:600;color:var(--amber-ink);background:var(--amber);
  padding:9px 16px;border-radius:100px;cursor:pointer}

/* -- Pied de page -- */
.tf-page footer{border-top:1px solid var(--line);margin-top:56px;padding:26px 0 34px;
  color:var(--dim);font-size:13px}
.tf-page footer .wrap{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}
.tf-page footer .tf{font-family:Fraunces,Georgia,serif;font-style:italic}
.tf-page footer .tf b{color:var(--amber);font-style:normal}

@media(max-width:640px){
  .tf-page .head{flex-direction:column;align-items:flex-start;gap:12px;margin-top:-44px}
  .tf-page .head h1{font-size:27px}
  .tf-page .stats{gap:20px;flex-wrap:wrap}
  .tf-page .np{width:auto;flex:1}
  .tf-page .prog{display:none}
  .tf-page .top nav .pill{display:none}
}
