:root {
    --ink:#080b10;
    --panel:#121923;
    --line:#293545;
    --acid:#d6ff3f;
    --cyan:#63e6e2;
    --muted:#a6b0bc;
    --danger:#ff6b6b
}
* {
    box-sizing:border-box
}
body {
    margin:0;
    background:radial-gradient(circle at 80% 0,#1a2633 0,#080b10 45%);
    color:#f5f7fa;
    font:16px ui-sans-serif,system-ui,sans-serif;
    min-height:100vh
}
body:before {
    content:"";
    position:fixed;
    inset:0;
    opacity:.04;
    pointer-events:none;
    background-image:linear-gradient(120deg,#fff 1px,transparent 1px);
    background-size:26px 26px
}
.top {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:26px clamp(18px,5vw,72px);
    border-bottom:1px solid var(--line)
}
nav {
    display:flex;
    gap:20px
}
a {
    color:var(--cyan);
    text-decoration:none
}
.eyebrow {
    color:var(--acid);
    font-size:12px;
    font-weight:800;
    letter-spacing:.2em
}
.layout {
    max-width:1250px;
    margin:34px auto;
    padding:0 22px;
    display:grid;
    grid-template-columns:1.4fr 1fr;
    gap:22px
}
.layout.two {
    grid-template-columns:1fr 1fr
}
.card {
    background:linear-gradient(145deg,#16212d,#0f151e);
    border:1px solid var(--line);
    border-radius:22px;
    padding:28px;
    box-shadow:0 20px 70px #0004
}
.hero {
    grid-row:span 2
}
h1 {
    font-size:clamp(36px,6vw,76px);
    line-height:.95;
    margin:16px 0 30px;
    letter-spacing:-.06em
}
h2 {
    font-size:26px;
    margin-top:0
}
.now {
    font-size:26px;
    color:var(--cyan);
    min-height:74px
}
label {
    display:grid;
    gap:8px;
    margin:15px 0;
    color:var(--muted);
    font-weight:700
}
input,select {
    background:#090e15;
    color:#fff;
    border:1px solid var(--line);
    padding:15px;
    border-radius:10px;
    font:inherit
}
button,.pill {
    border:1px solid #718191;
    background:#1c2937;
    color:#fff;
    border-radius:12px;
    padding:15px 18px;
    font-weight:900;
    cursor:pointer;
    transition:.2s
}
button:hover {
    transform:translateY(-2px);
    border-color:var(--acid);
    color:var(--acid)
}
button.big {
    width:100%;
    min-height:58px;
    background:var(--acid);
    color:#0b100c;
    border:0
}
.actions {
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:22px
}
.danger {
    border-color:var(--danger);
    color:var(--danger)
}
audio {
    width:100%;
    margin:18px 0
}
.songlist {
    display:grid;
    gap:9px
}
.song {
    text-align:left;
    display:flex;
    justify-content:space-between;
    gap:12px
}
.song span,.row small {
    display:block;
    color:var(--muted);
    font-weight:400
}
.row,.scoreline {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 0;
    border-bottom:1px solid var(--line)
}
.scoreline input {
    width:100px
}
.alert {
    color:#ffb4b4;
    border-left:3px solid var(--danger);
    padding:10px
}
.ok {
    color:var(--acid)
}
.muted {
    color:var(--muted)
}
.login {
    display:grid;
    place-items:center
}
.login .card {
    width:min(500px,calc(100% - 30px))
}
.public {
    background:#060a0f
}
.stage {
    min-height:100vh;
    display:grid;
    place-content:center;
    text-align:center;
    padding:8vw;
    transition:.5s
}
.stage h1 {
    font-size:clamp(70px,14vw,220px);
    color:var(--acid);
    margin:22px 0
}
.stage p {
    font-size:clamp(24px,4vw,64px);
    color:var(--cyan)
}
.fullscreen {
    position:fixed;
    right:18px;
    bottom:18px;
    opacity:.35;
    border:0
}
.tablet main {
    max-width:1000px;
    margin:auto;
    padding:30px 22px
}
.tablet h1 {
    font-size:clamp(40px,7vw,86px)
}
.teamgrid,.pointgrid {
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:18px
}
.team,.pointgrid button {
    min-height:150px;
    font-size:clamp(22px,4vw,42px);
    display:grid;
    place-content:center
}
.team strong {
    font-size:1.3em;
    color:var(--acid)
}
.pointgrid {
    margin-top:25px
}
.feedback {
    text-align:center;
    color:var(--cyan);
    font-size:22px
}
@media(max-width:750px) {
    .layout,.layout.two {
        display:block
    }
    .card {
        margin-bottom:18px
    }
    .top {
        align-items:flex-start;
        gap:15px;
        flex-direction:column
    }
    .teamgrid,.pointgrid {
        grid-template-columns:1fr 1fr
    }
}
.inline {
    display:flex;
    gap:6px;
    align-items:center
}
.inline input {
    max-width:130px;
    padding:8px
}
.stage {
    opacity:1;
    transform:translateY(0);
    transition:opacity .55s ease,transform .55s ease
}
.stage[data-mode="attente"] {
    opacity:.9
}
.stage[data-mode="ecoute"] {
    transform:translateY(-4px)
}
.public {
    overflow:hidden
}
.public .fullscreen {
    transition:opacity .4s
}
.public .fullscreen:hover {
    opacity:1
}
.tablet .team,.tablet .pointgrid button {
    min-width:70px;
    min-height:150px
}
@media(max-width:650px) {
    .tablet .team,.tablet .pointgrid button {
        min-height:110px
    }
}
/* Projecteur : activation audio, pochette et animation de révélation */
.sound-overlay {
    position:fixed;
    inset:0;
    z-index:10;
    display:grid;
    place-items:center;
    padding:24px;
    background:rgb(6 10 15 / 92%)
}
.sound-overlay[hidden] {
    display:none
}
.sound-box {
    width:min(560px,100%);
    padding:34px;
    text-align:center;
    background:#121923;
    border:1px solid var(--line);
    border-radius:22px;
    box-shadow:0 20px 70px #0006
}
.sound-box p {
    color:var(--muted);
    line-height:1.5
}
.cover-wrap {
    width:min(38vw,420px);
    max-height:38vh;
    margin:0 auto;
    animation:cover-appear .55s ease both
}
.cover {
    display:block;
    width:100%;
    max-height:38vh;
    object-fit:contain;
    border-radius:18px;
    box-shadow:0 20px 70px #0007
}
@keyframes cover-appear {
    from {
        opacity:0;
        transform:translateY(18px) scale(.96)
    }
    to {
        opacity:1;
        transform:translateY(0) scale(1)
    }
}
@media(max-width:650px) {
    .cover-wrap,.cover {
        max-width:70vw;
        max-height:30vh
    }
}


/* Projecteur : le contenu reste dans le viewport, sans défilement. */
html, body { min-height: 100%; }
body.public { min-height: 100dvh; overflow: hidden; }
.public .stage {
    min-height: 100dvh;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(6px, 1.2vh, 18px);
    padding: clamp(18px, 4vh, 54px) clamp(18px, 5vw, 90px);
    overflow: hidden;
}
.public .stage h1 { margin: 0; font-size: clamp(2.4rem, 10vw, 9rem); line-height: .95; }
.public .stage p { margin: 0; font-size: clamp(1.1rem, 3.2vw, 3rem); line-height: 1.1; }
.public .cover-wrap {
    width: min(38vw, 420px);
    max-width: 70vw;
    max-height: min(36dvh, 420px);
    margin: 0 auto;
    flex: 0 1 auto;
}
.public .cover {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(36dvh, 420px);
    object-fit: contain;
}

/* Pupitre : commandes regroupées, lisibles et distinguées par rôle. */
.actions { align-items: stretch; gap: 14px; }
.actions button { min-height: 52px; flex: 1 1 185px; padding: 14px 16px; line-height: 1.15; }
.actions .action-primary { background: var(--acid); color: #0b100c; border-color: var(--acid); }
.actions .action-secondary { background: #26384a; border-color: #8aa0b4; }
.actions .action-warning { background: #41331f; color: #ffd27a; border-color: #d99c35; }
.actions .action-mode { background: #172e38; color: var(--cyan); border-color: #3c9ea2; }
.actions .action-danger { background: #401f27; color: #ffb0b0; border-color: var(--danger); }
.actions button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.actions button:focus-visible, button:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
@media (max-width: 750px) {
    .actions button { flex-basis: 100%; }
    .public .cover-wrap, .public .cover { max-height: min(30dvh, 280px); }
}
@media (min-aspect-ratio: 2/1) {
    .public .cover-wrap, .public .cover { max-height: min(30dvh, 330px); }
}
