@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --bg: #100f16;
    --bg-alt: #1a1826;
    --bg-card: #1f1d2e;
    --line: #322e45;
    --text: #EDEAE3;
    --text-muted: #93909f;
    --accent: #F2B94B;
    --accent-2: #3FBFB0;
    --danger: #e2574c;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
}

h1, h2, h3, .display {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 .4em;
}

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

.wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-alt), transparent);
}

.top-nav .brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.top-nav nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 22px;
    font-size: .92rem;
    font-weight: 500;
    transition: color .15s;
}
.top-nav nav a:hover, .top-nav nav a.active { color: var(--text); }

.card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

label {
    display: block;
    font-size: .82rem;
    color: var(--text-muted);
    margin: 14px 0 6px;
    font-weight: 500;
}
label:first-child { margin-top: 0; }

input[type=text], input[type=number], input[type=url], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
    outline: none;
    transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    transition: transform .1s, filter .15s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #16130a; }
.btn-secondary { background: var(--bg-alt); color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    font-size: .78rem;
    color: var(--text-muted);
}

.chip-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-alt);
    color: var(--text-muted);
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all .15s;
}
.chip.selected {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: #0c1f1c;
}

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--text-muted); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
tr:hover td { background: rgba(255,255,255,.02); }

.row-actions { display: flex; gap: 8px; }
.icon-btn {
    background: none; border: none; cursor: pointer; color: var(--text-muted);
    padding: 4px 8px; border-radius: 6px; font-size: .85rem;
}
.icon-btn:hover { color: var(--text); background: var(--bg-alt); }

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.toast {
    position: fixed;
    bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: opacity .2s, transform .2s;
    pointer-events: none;
    z-index: 999;
    font-size: .9rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--danger); color: var(--danger); }

/* ---- Écran de jeu : anneau projecteur ---- */
.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 90px);
    text-align: center;
    padding: 30px 20px;
}

.spotlight {
    position: relative;
    width: 260px; height: 260px;
    margin-bottom: 26px;
}

.spotlight svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.spotlight .ring-bg { stroke: var(--line); fill: none; stroke-width: 8; }
.spotlight .ring-fg {
    stroke: var(--accent); fill: none; stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset .18s linear, stroke .3s;
}
.spotlight.reveal .ring-fg { stroke: var(--accent-2); }

.spotlight-center {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, var(--bg-card), var(--bg-alt));
    margin: 14px;
    overflow: hidden;
}

.spotlight-center .vinyl {
    width: 70%; height: 70%;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, #0a0a0f 0px, #0a0a0f 2px, #16141f 3px, #16141f 6px);
    display: flex; align-items: center; justify-content: center;
    animation: spin 3.2s linear infinite;
}
.spotlight.paused .vinyl { animation-play-state: paused; }
.vinyl .label { width: 32%; height: 32%; border-radius: 50%; background: var(--accent); }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.timer-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

.category-tag {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    font-size: .8rem;
    margin-bottom: 6px;
}

.reveal-info { min-height: 70px; }
.reveal-info h2 { font-size: 1.6rem; }
.reveal-info p { color: var(--text-muted); margin: 0; }

.progress-track {
    width: 100%; max-width: 420px;
    height: 4px; background: var(--line); border-radius: 4px;
    margin: 22px 0 8px; overflow: hidden;
}
.progress-track .fill { height: 100%; background: var(--accent-2); width: 0%; transition: width .3s; }

.stage-controls { display: flex; gap: 12px; margin-top: 22px; }

.yt-player-shell {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.helper-text { color: var(--text-muted); font-size: .85rem; margin-top: 4px; }
