/**
 * Décor commun aux protos d'écoute
 * ============================================================================
 * À charger AVANT le style.css du proto, qui ne garde que sa mécanique :
 *   <link rel="stylesheet" href="../css/proto.css">
 *   <link rel="stylesheet" href="style.css">
 *
 * Le parti pris : les protos restent sombres, c'est leur sujet (on révèle
 * quelque chose de caché). Mais ils passent du noir générique au #1a1a1a du
 * dos des cartes du site, avec les mêmes typos, les mêmes filets fins et la
 * même trame de points, simplement inversée.
 */

/* 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. */

:root {
    --dark: #1a1a1a;          /* le dos des cartes du site */
    --panel: #212121;
    --paper: #f8f9fa;
    --ink: #2d2d2d;
    --line: rgba(255, 255, 255, 0.12);
    --text: #f0f0f0;
    --muted: rgba(255, 255, 255, 0.45);
    --gold: #d4af37;
    --blue: #3498db;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark);
    /* même trame que la home, en négatif */
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text);
    min-height: 100vh;
    overflow: hidden;
    /* les protos posent un conteneur centré : sans ça il se cale en haut à
       gauche et recouvre le lien de retour */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden { display: none !important; }

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

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

/* --- Retour vers la page musique ------------------------------------------
   Il n'y en avait aucun : on arrivait sur un proto sans pouvoir en sortir. */

.proto-back {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 200;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.55);
    transition: color 0.2s, background 0.2s;
}

.proto-back:hover { color: #fff; background: rgba(0, 0, 0, 0.8); }
.proto-back i { font-size: 0.7rem; }

/* --- Écran de départ : une carte, comme partout ailleurs sur le site --- */

.start-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 50;
}

.start-card {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 2.4rem 2rem 2rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
}

/* Micro-titre : exactement la convention des sections de /music */
.proto-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.start-card h1 {
    font-family: 'Lora', serif;
    font-size: clamp(1.7rem, 6vw, 2.1rem);
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.2;
    margin-bottom: 0.8rem;
}

.proto-intro {
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.8rem;
}

/* Bouton papier sur fond encre : le contraste le plus fort du site */
#startBtn {
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    background: var(--paper);
    border: none;
    border-radius: 6px;
    padding: 12px 26px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, background 0.2s;
}

#startBtn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

#startBtn:active { transform: translateY(0); }

/* --- Panneau de révélation ------------------------------------------------
   Les protos nomment ce bloc .reward ou .reward-info selon les cas. */

.reward,
.reward-info {
    font-family: 'Outfit', sans-serif;
}

.track-title {
    font-family: 'Lora', serif;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.track-artist {
    font-weight: 300;
    color: var(--muted);
}

.photo-credit {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.28);
    letter-spacing: 0.3px;
}

.photo-credit a { color: inherit; text-decoration: underline; }
.photo-credit a:hover { color: var(--text); }

/* Panneau de révélation posé sur une photo : sans fond, le texte blanc
   devient illisible dès que l'image est claire. */
.reward-panel,
.reward-info {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 1.5rem 1.6rem;
    max-width: min(340px, 86vw);
}

/* Ce qui suit la révélation : on ne laisse plus le visiteur dans une impasse */
.reward-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.1rem;
    padding: 9px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.reward-cta:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
