﻿:root{
    --bg:#0b0f18;
    --card:#111a2b;
    --stroke:#26314b;
    --txt:#e8f0ff;
    --muted:#9fb0d3;
    --accent:#7c5cff;
    --accent2:#23d5ab;
    --danger:#ff3b6b;
    --shadow: 0 18px 60px rgba(0,0,0,.55);
    --r: 18px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
    margin:0;
    font-family: ui-sans-serif, system-ui, Segoe UI, Roboto, Arial;
    color:var(--txt);
    background:
            radial-gradient(900px 600px at 20% 10%, rgba(124,92,255,.25), transparent 60%),
            radial-gradient(800px 500px at 80% 20%, rgba(35,213,171,.18), transparent 60%),
            linear-gradient(180deg, #070a12, var(--bg));
}

/* ✅ centre vertical + horizontal */
.wrap{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}

/* ✅ X / card / X / card / X */
.row{
    width:min(1100px, 100%);
    display:flex;
    align-items: center;
    gap: 50px;
}
.spacer{
    flex: 1 1 0;
    min-width: 18px;
}
.spacer.mid{
    flex: 0.65 1 0;
    min-width: 14px;
}

.card{
    background: rgba(17,26,43,.92);
    border:1px solid rgba(38,49,75,.9);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    overflow:hidden;
    position:relative;
}
.card::before{
    content:"";
    position:absolute; inset:-1px;
    background: linear-gradient(135deg, rgba(124,92,255,.35), rgba(35,213,171,.18), transparent 60%);
    opacity:.28;
    pointer-events:none;
}

.cardHead{
    padding: 14px 16px;
    border-bottom: 1px solid rgba(38,49,75,.55);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    position:relative;
}
.cardHead .h{
    display:flex; flex-direction:column; gap:2px;
    min-width:0;
}
.cardHead .t{
    margin:0;
    font-size: 13px;
    letter-spacing:.2px;
    font-weight: 900;
}
.cardHead .s{
    margin:0;
    font-size: 12px;
    color: var(--muted);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width: 520px;
}
.cardBody{
    padding: 14px 16px 16px 16px;
    position:relative;
}

/* tailles */
.profileCard{ width: 420px; }
.lobbyCard{ width: min(560px, 100%); }

/* Profil */
.center{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:14px;
    margin-top:4px;
}

.ppBtn{
    width:92px;
    aspect-ratio:1/1;
    border-radius: 16px;
    border:1px solid rgba(38,49,75,.95);
    background: rgba(9,13,22,.72);
    overflow:hidden;
    cursor:pointer;
    transition: transform .06s ease, border .15s ease;
}
.ppBtn:hover{ border-color: rgba(124,92,255,.7); }
.ppBtn:active{ transform: translateY(1px); }
.ppBtn img{
    width:100%; height:100%;
    object-fit:cover;
    display:block;
    border-radius: 18px;
}
.ppHint{
    font-size:12px;
    color:var(--muted);
    margin-top:-6px;
}

.field{
    width:100%;
    display:grid;
    gap:8px;
}
.field label{
    font-size:12px;
    color:var(--muted);
    display:flex;
    justify-content:space-between;
}
input{
    width:100%;
    padding:12px 12px;
    border-radius: 14px;
    border:1px solid rgba(38,49,75,.95);
    background: rgba(9,13,22,.72);
    color:var(--txt);
    outline:none;
}
input:focus{
    border-color: rgba(124,92,255,.75);
    box-shadow: 0 0 0 4px rgba(124,92,255,.14);
}

.actions{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:10px;
    width:100%;
    margin-top:4px;
}
@media(max-width:460px){
    .actions{ grid-template-columns: 1fr; }
}

button{
    padding:12px 12px;
    border-radius: 14px;
    border:1px solid rgba(38,49,75,.95);
    background: rgba(9,13,22,.72);
    color:var(--txt);
    font-weight:900;
    letter-spacing:.2px;
    cursor:pointer;
    transition: transform .06s ease, filter .15s ease, border .15s ease;
}
button:hover{ border-color: rgba(124,92,255,.7); }
button:active{ transform: translateY(1px); }
.primary{
    border:none;
    background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(35,213,171,.65));
}
.primary:hover{ filter: brightness(1.05); }

.status{
    margin-top:10px;
    font-size:12px;
    color:var(--muted);
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding-top:10px;
    border-top: 1px solid rgba(38,49,75,.55);
    width: 100%;
}
.pill{
    display:flex; align-items:center; gap:8px;
    white-space:nowrap;
}
.dot{
    width:8px; height:8px; border-radius:999px;
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(255,59,107,.14);
}
.dot.ok{
    background: var(--accent2);
    box-shadow: 0 0 0 4px rgba(35,213,171,.14);
}

/* Lobbies */
.lobbyTop{
    display:flex;
    gap:10px;
    align-items:center;
    justify-content:space-between;
    width:100%;
}
.smallBtn{
    padding: 9px 10px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 12px;
}
.lobbyList{
    height: 520px;
    overflow-y: auto;
    border-top: 1px solid rgba(38,49,75,.45);
}
.lobbyList::-webkit-scrollbar{ width:10px; }
.lobbyList::-webkit-scrollbar-thumb{
    background: rgba(124,92,255,.25);
    border: 2px solid rgba(9,13,22,.55);
    border-radius: 999px;
}
.lobbyRow{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid rgba(38,49,75,.35);
    background: transparent;
    cursor:pointer;
    text-align:left;
}
.lobbyRow:hover{ background: rgba(124,92,255,.07); }
.lobbyRow:last-child{ border-bottom: 0; }
.lobbyLeft{
    min-width: 0;
    display:flex;
    flex-direction:column;
    gap:2px;
}
.lobbyName{
    font-weight: 900;
    font-size: 13px;
    color: var(--txt);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width: 520px;
}
.lobbyMeta{
    font-size: 12px;
    color: var(--muted);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width: 520px;
}
.lobbyCount{
    font-weight: 900;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(38,49,75,.85);
    background: rgba(9,13,22,.65);
    color: var(--txt);
    white-space: nowrap;
}

/* Modal PP */
.modalBack{
    position:fixed; inset:0;
    background: rgba(0,0,0,.55);
    display:none;
    place-items:center;
    padding:18px;
    z-index:50;
}
.modal{
    width:min(640px, 100%);
    background: rgba(17,26,43,.96);
    border:1px solid rgba(38,49,75,.95);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow:hidden;
}
.modalHead{
    padding:14px 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid rgba(38,49,75,.65);
}
.modalHead h3{
    margin:0;
    font-size:14px;
    color:var(--txt);
    letter-spacing:.2px;
    font-weight: 900;
}
.close{
    width:38px; height:38px;
    border-radius: 12px;
    display:grid; place-items:center;
}
.grid{
    padding:16px;
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap:12px;
}
.ppTile{
    width:100%;
    aspect-ratio:1/1;
    border-radius: 16px;
    border:1px solid rgba(38,49,75,.95);
    background: rgba(9,13,22,.72);
    overflow:hidden;
    cursor:pointer;
    transition: transform .06s ease, border .15s ease;
}
.ppTile:hover{ border-color: rgba(124,92,255,.75); }
.ppTile:active{ transform: translateY(1px); }
.ppTile img{
    width:100%; height:100%;
    object-fit:cover;
    display:block;
    border-radius: 16px;
}

/* responsive: en colonne */
@media (max-width: 980px){
    .row{ flex-direction:column; gap:14px; }
    .spacer{ display:none; }
    .profileCard, .lobbyCard{
        width: min(560px, 100%);
        margin: 0 auto;
    }
    .lobbyList{ max-height: 360px; }
}