/* ==========================================================================
   Visio — styles. Les couleurs de base viennent des variables du thème
   (définies dans base.html.twig depuis l'admin /admin/theme) ; tout le reste
   (verre, bordures, halos) en est dérivé avec color-mix().
   Inspiration visuelle : StockPulse (nuit, vert « ember », touches crème).
   ========================================================================== */
:root {
    /* Valeurs de secours (remplacées par le thème) */
    --c-primary: #10b981;
    --c-on-primary: #03140d;
    --c-bg: #071225;
    --c-surface: #0c1a33;
    --c-text: #edf2fa;
    --c-room-bg: #030916;
    --c-tile: #0f1f3a;
    --c-danger: #ef4444;
    --radius: 16px;
    --font: "Inter", system-ui, sans-serif;

    /* Dérivés */
    --font-display: "Oswald", var(--font);
    --c-accent: #ecdfbb;
    --c-amber: #fbbf24;
    --c-muted: color-mix(in srgb, var(--c-text) 62%, transparent);
    --c-faint: color-mix(in srgb, var(--c-text) 40%, transparent);
    --c-border: color-mix(in srgb, var(--c-text) 10%, transparent);
    --c-border-strong: color-mix(in srgb, var(--c-text) 18%, transparent);
    --c-hover: color-mix(in srgb, var(--c-text) 7%, transparent);
    --c-glass: color-mix(in srgb, var(--c-surface) 72%, transparent);
    --c-primary-soft: color-mix(in srgb, var(--c-primary) 16%, transparent);
    --c-primary-light: color-mix(in srgb, var(--c-primary) 65%, #fff);
    --c-danger-soft: color-mix(in srgb, var(--c-danger) 16%, transparent);
    --c-danger-light: color-mix(in srgb, var(--c-danger) 65%, #fff);
    --r-sm: calc(var(--radius) * .6);
    --r-md: calc(var(--radius) * .8);
    --shadow: 0 24px 60px -28px rgb(0 0 0 / .7), 0 0 0 1px color-mix(in srgb, var(--c-text) 4%, transparent);
    --shadow-primary: 0 18px 40px -16px color-mix(in srgb, var(--c-primary) 70%, transparent);
    --blur: blur(18px) saturate(140%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
    position: relative; min-height: 100dvh;
    font-family: var(--font); font-size: 15px; line-height: 1.55;
    color: var(--c-text);
    background:
        radial-gradient(55% 35% at 88% 6%, color-mix(in srgb, var(--c-accent) 12%, transparent) 0%, transparent 60%),
        radial-gradient(50% 40% at 8% 72%, color-mix(in srgb, var(--c-primary) 10%, transparent) 0%, transparent 60%),
        radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--c-surface) 85%, var(--c-bg)) 0%, var(--c-bg) 60%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}
/* Quadrillage discret façon console */
body::before {
    content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
    background-image:
        linear-gradient(var(--c-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--c-border) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: .35;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
a { color: var(--c-primary-light); text-decoration-color: color-mix(in srgb, var(--c-primary) 40%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--c-primary); }
h1, h2, h3, h4 {
    font-family: var(--font-display); font-weight: 600; line-height: 1.15;
    letter-spacing: .01em; margin: 0 0 .5em;
}
h1 { font-size: 2rem; text-transform: uppercase; }
h2 { font-size: 1.35rem; text-transform: uppercase; letter-spacing: .03em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 .75em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
::selection { background: color-mix(in srgb, var(--c-primary) 40%, transparent); }
.muted { color: var(--c-muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* Halo flou décoratif */
.glow {
    position: absolute; pointer-events: none; z-index: -1; border-radius: 50%;
    filter: blur(80px);
}
.glow-a {
    width: min(42rem, 90vw); aspect-ratio: 1; left: 50%; top: -14rem; transform: translateX(-50%);
    background: radial-gradient(circle, color-mix(in srgb, var(--c-primary) 30%, transparent), transparent 65%);
}

/* Pastille « en direct » */
.live-dot {
    position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--c-primary); flex: 0 0 auto;
}
.live-dot::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit;
    animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
.live-dot-amber { background: var(--c-amber); }
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.eyebrow {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .35rem .85rem; border-radius: 99px;
    font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--c-primary-light); background: var(--c-primary-soft);
    border: 1px solid color-mix(in srgb, var(--c-primary) 30%, transparent);
    margin-bottom: 1rem;
}
.text-gradient {
    background: linear-gradient(120deg, var(--c-primary-light) 0%, var(--c-accent) 50%, var(--c-amber) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Barre du haut ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--c-bg) 60%, transparent);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--c-border);
}
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: .7rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand, .prejoin-brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--c-text); text-decoration: none; }
.brand:hover { color: var(--c-text); }
.brand-logo {
    display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto;
    border-radius: var(--r-md); background: var(--c-hover); border: 1px solid var(--c-border);
    overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
.brand-logo img { width: 78%; height: 78%; object-fit: contain; }
.brand:hover .brand-logo { border-color: color-mix(in srgb, var(--c-primary) 50%, transparent); box-shadow: 0 0 24px -6px var(--c-primary); }
.brand-logo-sm { width: 32px; height: 32px; border-radius: var(--r-sm); }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .04em; }
.topbar-nav { display: flex; align-items: center; gap: .9rem; }
.nav-link { color: var(--c-muted); text-decoration: none; font-weight: 500; font-size: .92rem; }
.nav-link:hover { color: var(--c-text); }
.user-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .2rem .7rem .2rem .25rem; border-radius: 99px; background: var(--c-hover); border: 1px solid var(--c-border); font-size: .88rem; font-weight: 500; }
@media (max-width: 640px) { .user-chip-name, .nav-link { display: none; } .user-chip { padding: .2rem; } }

/* ---------- Mise en page ---------- */
.page { position: relative; max-width: 1120px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }
.page.narrow { max-width: 440px; padding-top: 4.5rem; }
.card {
    position: relative;
    background: var(--c-glass);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--c-border); border-radius: var(--radius);
    padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.card-accent::before {
    content: ""; position: absolute; left: 10%; right: 10%; top: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-primary), transparent);
}
.hero { position: relative; text-align: center; padding: 3.5rem 0 3rem; }
.hero-title { font-size: clamp(2.6rem, 7vw, 4.6rem); margin-bottom: .25em; letter-spacing: .02em; }
.lead { font-size: 1.15rem; color: var(--c-muted); margin: 0 auto; max-width: 36rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.section-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; margin: 2.25rem 0 1rem; }
.list-head h2 { margin: 0; }
.icon-tile {
    display: inline-grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto;
    border-radius: var(--r-md); font-size: 1.35rem;
    color: var(--c-primary-light);
    background: linear-gradient(135deg, color-mix(in srgb, var(--c-primary) 30%, transparent), color-mix(in srgb, var(--c-primary) 10%, transparent));
    border: 1px solid color-mix(in srgb, var(--c-primary) 30%, transparent);
}

/* ---------- Formulaires ---------- */
label { display: flex; flex-direction: column; gap: .4rem; font-weight: 500; font-size: .9rem; color: var(--c-muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], select {
    font: inherit; font-size: .95rem; color: var(--c-text);
    background: color-mix(in srgb, var(--c-text) 4%, transparent);
    padding: .7rem .9rem; border: 1px solid var(--c-border-strong); border-radius: var(--r-md);
    width: 100%; transition: border-color .15s, box-shadow .15s, background .15s;
}
select option { background: var(--c-surface); color: var(--c-text); }
input::placeholder { color: var(--c-faint); }
input:hover, select:hover { border-color: color-mix(in srgb, var(--c-text) 28%, transparent); }
input:focus, select:focus {
    outline: none; border-color: var(--c-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 22%, transparent);
    background: color-mix(in srgb, var(--c-text) 6%, transparent);
}
button:focus-visible, a:focus-visible, .btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
input[type=color] { width: 56px; height: 38px; padding: 3px; border: 1px solid var(--c-border-strong); border-radius: var(--r-sm); background: transparent; cursor: pointer; }
input[type=checkbox] { accent-color: var(--c-primary); }

/* Interrupteur (checkbox stylée) */
label.switch, label.check {
    flex-direction: row; align-items: center; gap: .6rem; cursor: pointer;
    font-weight: 500; color: var(--c-text); white-space: nowrap; user-select: none;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui {
    position: relative; width: 38px; height: 22px; flex: 0 0 auto; border-radius: 99px;
    background: var(--c-border-strong); transition: background .2s;
}
.switch-ui::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .4); transition: transform .2s;
}
.switch input:checked + .switch-ui { background: var(--c-primary); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--c-primary); outline-offset: 2px; }

.row-form { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.2rem; }
.row-form input[type=text] { flex: 1 1 240px; width: auto; }
.join-code {
    position: relative; display: flex; gap: .5rem; max-width: 560px; margin: 2rem auto 0;
    padding: .4rem; border-radius: calc(var(--radius) + 4px);
    background: var(--c-glass); border: 1px solid var(--c-border-strong);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
.join-code .join-icon { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--c-faint); }
.join-code input { border: 0; background: transparent; padding-left: 2.6rem; }
.join-code input:focus { box-shadow: none; background: transparent; }
.join-code:focus-within { border-color: var(--c-primary); box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--c-primary) 18%, transparent); }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; cursor: pointer;
    padding: .65rem 1.15rem; border-radius: var(--r-md);
    border: 1px solid var(--c-border-strong); background: var(--c-hover); color: var(--c-text);
    transition: transform .15s, filter .15s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: color-mix(in srgb, var(--c-text) 12%, transparent); color: var(--c-text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-primary { background: var(--c-primary); color: var(--c-on-primary); border-color: transparent; box-shadow: var(--shadow-primary); }
.btn-primary:hover { background: var(--c-primary); color: var(--c-on-primary); filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--c-danger); color: #fff; border-color: transparent; }
.btn-danger:hover { background: var(--c-danger); color: #fff; filter: brightness(1.1); }
.btn-danger-soft { background: var(--c-danger-soft); color: var(--c-danger-light); border-color: color-mix(in srgb, var(--c-danger) 35%, transparent); }
.btn-danger-soft:hover { background: var(--c-danger); color: #fff; }
.btn-sm { padding: .4rem .8rem; font-size: .82rem; border-radius: var(--r-sm); }
.btn-lg { padding: .85rem 1.3rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: .6rem; aspect-ratio: 1; }

/* ---------- Badges & pastilles ---------- */
.badge {
    display: inline-flex; align-items: center; gap: .4rem; vertical-align: middle;
    font-family: var(--font); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: .22rem .6rem; border-radius: 99px;
}
.badge-live { background: var(--c-primary-soft); color: var(--c-primary-light); border: 1px solid color-mix(in srgb, var(--c-primary) 35%, transparent); }
.pill {
    display: inline-flex; align-items: center; padding: .15rem .6rem; border-radius: 99px;
    font-size: .76rem; font-weight: 500; color: var(--c-muted);
    background: var(--c-hover); border: 1px solid var(--c-border);
}
.pill-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--c-accent); letter-spacing: .03em; }
.pill-accent { color: var(--c-primary-light); background: var(--c-primary-soft); border-color: color-mix(in srgb, var(--c-primary) 35%, transparent); }

/* ---------- Avatars (initiales + teinte propre à chaque personne) ---------- */
.avatar {
    --av-size: 40px;
    display: inline-grid; place-items: center; flex: 0 0 auto;
    width: var(--av-size); height: var(--av-size); border-radius: 50%;
    font-family: var(--font); font-weight: 700; font-size: calc(var(--av-size) * .38); letter-spacing: .02em; line-height: 1;
    color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .35);
    background: linear-gradient(135deg, hsl(var(--av-h, 160) 72% 58%), hsl(calc(var(--av-h, 160) + 40) 68% 36%));
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22), 0 6px 16px -8px hsl(var(--av-h, 160) 70% 40%);
    user-select: none;
}
.avatar-sm { --av-size: 28px; }
.avatar-md { --av-size: 36px; }
.avatar-lg { --av-size: 52px; }
.avatar-xl { --av-size: 112px; }
.avatar-square { border-radius: var(--r-md); }

/* ---------- Messages flash ---------- */
.flashes { max-width: 1120px; margin: 1rem auto 0; padding: 0 1.5rem; }
.flashes:empty { display: none; }
.flash { padding: .8rem 1rem; border-radius: var(--r-md); margin-bottom: .6rem; border: 1px solid; font-size: .92rem; backdrop-filter: var(--blur); }
.flash-success { background: color-mix(in srgb, #10b981 14%, transparent); border-color: color-mix(in srgb, #10b981 40%, transparent); color: #a7f3d0; }
.flash-error { background: var(--c-danger-soft); border-color: color-mix(in srgb, var(--c-danger) 40%, transparent); color: var(--c-danger-light); }
.flash-info { background: color-mix(in srgb, #3b82f6 14%, transparent); border-color: color-mix(in srgb, #3b82f6 40%, transparent); color: #bfdbfe; }

/* ---------- Accueil ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.feature { margin: 0; transition: transform .2s, border-color .2s; }
.feature:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c-primary) 35%, transparent); }
.feature .icon-tile { margin-bottom: 1rem; }
.feature p { margin: 0; }
.empty { text-align: center; padding: 2.5rem 1.5rem; }

/* Liste des réunions */
.room-list { display: flex; flex-direction: column; gap: .9rem; }
.room-card { margin: 0; padding: 1.15rem 1.25rem; transition: border-color .2s, box-shadow .2s; }
.room-card:hover { border-color: var(--c-border-strong); }
.room-card.is-live { border-color: color-mix(in srgb, var(--c-primary) 40%, transparent); box-shadow: var(--shadow), 0 0 40px -12px color-mix(in srgb, var(--c-primary) 55%, transparent); }
.room-card-head { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; }
.room-card-info { min-width: 0; }
.room-card h3 { margin: 0 0 .4rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: 1.2rem; }
.room-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.room-card .actions { justify-content: flex-end; }
.room-card details { margin-top: 1rem; border-top: 1px solid var(--c-border); padding-top: .85rem; }
.room-card details summary { cursor: pointer; color: var(--c-muted); font-size: .88rem; font-weight: 500; margin-bottom: .85rem; list-style: none; }
.room-card details summary::-webkit-details-marker { display: none; }
.room-card details summary::before { content: "⚙"; margin-right: .45rem; }
.room-card details:not([open]) summary { margin-bottom: 0; }
.room-card details form + form { margin-top: .85rem; }
@media (max-width: 760px) {
    .room-card-head { grid-template-columns: auto 1fr; }
    .room-card .actions { grid-column: 1 / -1; justify-content: stretch; }
    .room-card .actions .btn { flex: 1; }
}

/* Connexion */
.auth-card { padding: 2rem; text-align: left; }
.auth-logo { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1.25rem; border-radius: var(--radius); background: var(--c-hover); border: 1px solid var(--c-border); box-shadow: 0 0 40px -10px var(--c-primary); }
.auth-logo img { width: 78%; height: 78%; object-fit: contain; }
.auth-card .flash { margin-top: .5rem; }

/* ---------- Admin thème ---------- */
.theme-layout { display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
.theme-form fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.theme-form legend { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; font-size: 1.05rem; margin-bottom: .9rem; color: var(--c-text); }
.theme-form .help-text, .theme-form .form-text { font-size: .8rem; color: var(--c-faint); font-weight: 400; }
.theme-form > div, .theme-form fieldset > div { display: flex; flex-direction: column; gap: .4rem; }
.color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.theme-form ul { color: var(--c-danger-light); margin: 0; padding-left: 1rem; font-size: .85rem; }
.logo-current { display: flex; align-items: center; gap: 1rem; }
.logo-current img { max-height: 52px; max-width: 160px; border: 1px solid var(--c-border); border-radius: var(--r-sm); padding: 6px; background: var(--c-hover); }
.theme-preview { position: sticky; top: 5.5rem; }
.theme-preview .card .btn { margin: .25rem .25rem 0 0; }
.preview-room {
    background: var(--c-room-bg); border: 1px solid var(--c-border); border-radius: var(--radius); padding: .6rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; box-shadow: var(--shadow);
}
.preview-room .tile { aspect-ratio: 4 / 3; }
.preview-room .tile .avatar { --av-size: 46px; }
.preview-room .tile-footer { font-size: .72rem; padding: .15rem .45rem; }
.preview-bar { grid-column: 1 / -1; display: flex; justify-content: center; gap: .45rem; padding: .25rem 0 .1rem; }
.preview-bar .ctrl { width: 34px; height: 34px; }
.preview-bar .ctrl-wide { width: 48px; }
@media (max-width: 860px) {
    .theme-layout { grid-template-columns: 1fr; }
    .theme-preview { position: static; }
}

/* ==========================================================================
   Salle de réunion
   ========================================================================== */
body.room-page {
    overflow: hidden;
    background:
        radial-gradient(60% 40% at 85% 0%, color-mix(in srgb, var(--c-primary) 10%, transparent), transparent 60%),
        radial-gradient(50% 40% at 0% 100%, color-mix(in srgb, var(--c-accent) 6%, transparent), transparent 60%),
        var(--c-room-bg);
}
body.room-page::before { opacity: .18; }
.room { height: 100dvh; display: flex; flex-direction: column; }
.screen { position: relative; flex: 1; min-height: 0; }

/* -- Accueil / aperçu -- */
.prejoin { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; gap: 2.25rem; overflow: auto; }
.prejoin-grid { display: grid; grid-template-columns: minmax(0, 660px) 360px; gap: 2rem; align-items: center; width: 100%; max-width: 1060px; }
.preview {
    position: relative; aspect-ratio: 16 / 9; overflow: hidden;
    background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c-primary) 14%, transparent), transparent 65%), var(--c-tile);
    border: 1px solid var(--c-border); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow);
}
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; }
.preview-controls { position: absolute; bottom: 1rem; left: 0; right: 0; display: flex; justify-content: center; gap: .75rem; }
.prejoin-form { display: flex; flex-direction: column; gap: 1rem; margin: 0; padding: 1.75rem; }
.prejoin-form .eyebrow { align-self: flex-start; margin-bottom: 0; }
.prejoin-form h1 { margin: 0; font-size: 1.9rem; word-break: break-word; }
.prejoin-form p { margin: 0; }
.prejoin-form .error { color: var(--c-danger-light); }
.host-line { display: flex; align-items: center; gap: .55rem; }
@media (max-width: 900px) { .prejoin-grid { grid-template-columns: 1fr; } .prejoin { justify-content: flex-start; } }

.center-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; gap: .25rem; overflow: hidden; }
.center-screen h2 { font-size: 1.8rem; }
.ended-card { max-width: 460px; padding: 2rem; }
.ended-card .actions { margin-top: 1rem; }

.waiting-avatar { position: relative; display: grid; place-items: center; width: 220px; height: 220px; margin-bottom: 1.5rem; }
.waiting-avatar .avatar { position: relative; z-index: 1; }
.ripple {
    position: absolute; width: 112px; height: 112px; border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--c-primary) 60%, transparent);
    animation: ripple 2.4s cubic-bezier(.2, .6, .3, 1) infinite;
}
.ripple-2 { animation-delay: 1.2s; }
@keyframes ripple { from { transform: scale(1); opacity: .9; } to { transform: scale(1.95); opacity: 0; } }

/* -- Scène -- */
.stage { display: flex; flex-direction: column; }
.stage-top { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem 0; min-width: 0; }
.room-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-main { flex: 1; min-height: 0; display: flex; gap: .75rem; padding: .75rem .75rem 0; }
.video-area { flex: 1; min-width: 0; display: flex; gap: .75rem; }
.grid {
    flex: 1; min-height: 0; display: grid; gap: .65rem;
    grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows, 1), minmax(0, 1fr));
}
.video-area.has-spotlight .grid { flex: 0 0 230px; grid-template-columns: 1fr; grid-auto-rows: 140px; grid-template-rows: none; overflow-y: auto; align-content: start; }
.spotlight { flex: 1; min-width: 0; display: grid; gap: .65rem; }

/* Vignettes */
.tile {
    /* --av-h : teinte du participant, posée par le JS */
    position: relative; overflow: hidden; min-height: 0;
    display: grid; place-items: center;
    background: var(--c-tile);
    border: 1px solid var(--c-border); border-radius: var(--radius);
    transition: border-color .2s, box-shadow .2s;
}
.tile.video-off {
    background:
        radial-gradient(circle at 50% 42%, hsl(var(--av-h, 160) 65% 45% / .38), transparent 62%),
        linear-gradient(160deg, color-mix(in srgb, var(--c-tile) 92%, #fff), var(--c-tile));
}
.tile.speaking {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 1px var(--c-primary), 0 0 34px -8px color-mix(in srgb, var(--c-primary) 70%, transparent);
}
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile.tile-screen { background: #000; }
.tile.tile-screen video { object-fit: contain; }
.tile.mirror video { transform: scaleX(-1); }
.tile.video-off video { display: none; }
.tile-avatar { display: none; place-items: center; width: 100%; height: 100%; }
.tile.video-off .tile-avatar { display: grid; }
.tile:not(.tile-screen) { container-type: size; }
.tile .tile-avatar .avatar { --av-size: clamp(44px, 36cqmin, 140px); }
.tile.speaking .tile-avatar .avatar { animation: speak 1.2s ease-out infinite; }
@keyframes speak {
    0% { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22), 0 0 0 0 color-mix(in srgb, var(--c-primary) 70%, transparent); }
    100% { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22), 0 0 0 22px transparent; }
}
.tile-footer {
    position: absolute; left: .55rem; bottom: .55rem; display: flex; align-items: center; gap: .35rem;
    max-width: calc(100% - 1.1rem);
    background: rgb(3 9 22 / .62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgb(255 255 255 / .08);
    color: #fff; padding: .25rem .6rem; border-radius: 99px; font-size: .82rem; font-weight: 500;
}
.tile-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-mic:empty { display: none; }
.tile-mic svg { width: 15px; height: 15px; color: var(--c-danger-light); display: block; }
.tile.is-host .tile-footer::after {
    content: "Orga"; font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: .05rem .4rem; border-radius: 99px; color: var(--c-on-primary); background: var(--c-primary);
}

/* -- Barre de contrôle -- */
.controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: .8rem 1rem 1rem; }
.controls-left { font-variant-numeric: tabular-nums; padding-left: .25rem; }
.controls-center { display: flex; align-items: center; gap: .55rem; }
.dock {
    padding: .45rem; border-radius: 99px;
    background: var(--c-glass); border: 1px solid var(--c-border);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
.dock-sep { width: 1px; height: 26px; background: var(--c-border-strong); margin: 0 .15rem; }
.dock .btn { border-radius: 99px; }
.controls-right { display: flex; justify-content: flex-end; gap: .55rem; }
.ctrl {
    position: relative; width: 46px; height: 46px; border-radius: 50%; border: 1px solid transparent; cursor: pointer;
    display: inline-grid; place-items: center; background: var(--c-hover); color: var(--c-text);
    transition: background .15s, transform .15s, box-shadow .15s, color .15s;
}
.ctrl:hover { background: color-mix(in srgb, var(--c-text) 14%, transparent); transform: translateY(-1px); }
.ctrl.off { background: var(--c-danger-soft); color: var(--c-danger-light); border-color: color-mix(in srgb, var(--c-danger) 35%, transparent); }
.ctrl.active { background: var(--c-primary); color: var(--c-on-primary); box-shadow: var(--shadow-primary); }
.ctrl.alert { box-shadow: 0 0 0 2px var(--c-amber), 0 0 24px -4px var(--c-amber); }
.ctrl-danger, .ctrl-danger:hover { background: var(--c-danger); color: #fff; }
.ctrl-danger:hover { filter: brightness(1.1); }
.ctrl-wide { width: 64px; border-radius: 99px; }
.controls-right .ctrl { background: var(--c-glass); border-color: var(--c-border); backdrop-filter: var(--blur); }
.ctrl .count {
    position: absolute; top: -5px; right: -7px; min-width: 20px; padding: 0 .35rem;
    font-size: .68rem; font-weight: 700; line-height: 20px; text-align: center;
    background: var(--c-primary); color: var(--c-on-primary); border-radius: 99px;
}
.ctrl .count:empty { display: none; }
.ctrl .badge-dot { position: absolute; top: 7px; right: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--c-amber); border: 2px solid var(--c-room-bg); }
.preview-controls .ctrl { background: rgb(3 9 22 / .55); color: #fff; backdrop-filter: blur(10px); border-color: rgb(255 255 255 / .12); }
.preview-controls .ctrl.off { background: var(--c-danger); color: #fff; }
.preview-bar .ctrl { background: color-mix(in srgb, var(--c-text) 14%, transparent); }
.preview-bar .ctrl-danger { background: var(--c-danger); }

@media (max-width: 760px) {
    .controls { grid-template-columns: 1fr; justify-items: center; padding-top: .6rem; }
    .controls-left { display: none; }
    .controls-right { position: absolute; top: .55rem; right: .75rem; }
    .controls-right .ctrl { width: 38px; height: 38px; }
    .stage-top { padding-right: 6.5rem; }
    .ctrl { width: 42px; height: 42px; }
    .ctrl-wide { width: 54px; }
    .dock .btn, .dock-sep { display: none; }
    .video-area.has-spotlight { flex-direction: column; }
    .video-area.has-spotlight .grid { flex: 0 0 120px; grid-auto-flow: column; grid-auto-columns: 160px; grid-template-columns: none; overflow-x: auto; }
}

/* -- Panneau latéral -- */
.sidepanel {
    width: 350px; flex: 0 0 350px; display: flex; flex-direction: column; overflow: hidden;
    background: var(--c-glass); border: 1px solid var(--c-border); border-radius: var(--radius);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
@media (max-width: 760px) { .sidepanel { position: absolute; inset: 3.4rem .75rem 84px; width: auto; z-index: 5; background: color-mix(in srgb, var(--c-surface) 94%, transparent); } }
.sidepanel-head { display: flex; justify-content: space-between; align-items: center; padding: .6rem; border-bottom: 1px solid var(--c-border); }
.tabs { display: flex; gap: .2rem; padding: .2rem; border-radius: var(--r-md); background: var(--c-hover); }
.tabs button { font: inherit; font-size: .86rem; font-weight: 600; border: 0; background: none; color: var(--c-muted); padding: .4rem .8rem; border-radius: var(--r-sm); cursor: pointer; transition: background .15s, color .15s; }
.tabs button:hover { color: var(--c-text); }
.tabs button.active { background: var(--c-primary-soft); color: var(--c-primary-light); }
.icon-btn { border: 0; background: none; font-size: 1rem; cursor: pointer; color: var(--c-muted); padding: .35rem .55rem; border-radius: var(--r-sm); }
.icon-btn:hover { background: var(--c-hover); color: var(--c-text); }
.panel { flex: 1; min-height: 0; overflow-y: auto; padding: .75rem; }
.panel h4 { margin: .25rem 0 .6rem; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-amber); }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.people li { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: .5rem; border-radius: var(--r-md); transition: background .15s; }
.people li:hover { background: var(--c-hover); }
.person-name { flex: 1; min-width: 0; font-weight: 500; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-status { display: flex; gap: .3rem; color: var(--c-faint); }
.person-status svg { width: 16px; height: 16px; }
.person-actions { width: 100%; display: flex; gap: .4rem; justify-content: flex-end; }
.pending-row {
    display: flex; align-items: center; gap: .5rem; padding: .55rem; margin-bottom: .45rem;
    background: color-mix(in srgb, var(--c-amber) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--c-amber) 30%, transparent); border-radius: var(--r-md);
}
.pending-row > span:not(.avatar) { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -- Discussion -- */
.chat { display: flex; flex-direction: column; padding: 0; }
.messages { flex: 1; overflow-y: auto; padding: .85rem; display: flex; flex-direction: column; gap: .75rem; }
.message { display: flex; align-items: flex-end; gap: .5rem; max-width: 92%; }
.message.mine { align-self: flex-end; flex-direction: row-reverse; }
.message-content { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.message.mine .message-content { align-items: flex-end; }
.message-head { font-size: .72rem; color: var(--c-faint); padding: 0 .3rem; }
.message-body {
    padding: .5rem .8rem; border-radius: var(--r-md) var(--r-md) var(--r-md) 4px;
    background: color-mix(in srgb, var(--c-text) 8%, transparent); border: 1px solid var(--c-border);
    white-space: pre-wrap; word-break: break-word; font-size: .92rem;
}
.message.mine .message-body { background: var(--c-primary); color: var(--c-on-primary); border-color: transparent; border-radius: var(--r-md) var(--r-md) 4px var(--r-md); }
.message.system { align-self: center; max-width: 100%; font-size: .76rem; color: var(--c-faint); }
.chat-form { display: flex; gap: .45rem; padding: .6rem; border-top: 1px solid var(--c-border); }
.chat-form input { border-radius: 99px; }
.chat-form .btn-icon { border-radius: 50%; }

/* -- Notifications -- */
.banner {
    position: absolute; top: .75rem; left: 50%; transform: translateX(-50%); z-index: 10;
    background: color-mix(in srgb, var(--c-amber) 20%, var(--c-surface)); color: var(--c-amber);
    border: 1px solid color-mix(in srgb, var(--c-amber) 40%, transparent);
    padding: .5rem 1.1rem; border-radius: 99px; font-weight: 600; font-size: .9rem; backdrop-filter: var(--blur);
}
.toasts { position: absolute; top: 3.6rem; right: .9rem; z-index: 10; display: flex; flex-direction: column; gap: .5rem; max-width: 380px; }
.toast {
    background: color-mix(in srgb, var(--c-surface) 92%, transparent); color: var(--c-text);
    border: 1px solid var(--c-border-strong); border-radius: var(--r-md);
    padding: .7rem .9rem; font-size: .9rem; box-shadow: 0 16px 40px -12px rgb(0 0 0 / .6);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    animation: slidein .25s ease-out;
}
.toast-request { display: flex; align-items: center; gap: .55rem; border-color: color-mix(in srgb, var(--c-amber) 45%, transparent); }
.toast-request > span:not(.avatar) { flex: 1; font-weight: 600; }
@keyframes slidein { from { opacity: 0; transform: translateX(12px); } }
.audio-unlock { position: absolute; bottom: 96px; left: 50%; transform: translateX(-50%); z-index: 10; }

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

/* ==========================================================================
   Salle d'attente : statut + lecteur de vidéos de présentation
   ========================================================================== */
.auth-logo-full { display: block; width: 168px; height: auto; margin: -.5rem auto 1.25rem; filter: drop-shadow(0 0 28px color-mix(in srgb, var(--c-primary) 35%, transparent)); }

.waiting-screen { display: flex; align-items: center; justify-content: center; padding: 1.5rem; overflow: auto; }
.waiting-layout { display: flex; flex-direction: column; align-items: center; gap: 2rem; width: 100%; max-width: 1000px; }
.waiting-layout.has-reel { flex-direction: row; justify-content: center; gap: clamp(2rem, 6vw, 5rem); }
.waiting-status { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 380px; }
.waiting-status h2 { font-size: 1.8rem; }
.waiting-status p { margin-bottom: .4rem; }
.waiting-hint { margin-top: .6rem; color: var(--c-primary-light); }

.reel { flex: 0 0 auto; }
.reel-frame {
    position: relative; overflow: hidden;
    height: min(78dvh, 680px); aspect-ratio: 9 / 16; max-width: calc(100vw - 3rem);
    border-radius: calc(var(--radius) + 10px);
    background: #000; border: 1px solid var(--c-border-strong);
    box-shadow: 0 40px 80px -30px rgb(0 0 0 / .8), 0 0 60px -20px color-mix(in srgb, var(--c-primary) 45%, transparent);
}
.reel-frame video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.reel-top {
    position: absolute; inset: 0 0 auto; padding: .7rem .75rem 1.6rem;
    background: linear-gradient(rgb(0 0 0 / .6), transparent);
}
.reel-bars { display: flex; gap: 4px; }
.reel-bar { flex: 1; height: 3px; padding: 0; border: 0; border-radius: 99px; background: rgb(255 255 255 / .3); overflow: hidden; cursor: pointer; }
.reel-bar span { display: block; height: 100%; width: 0; background: #fff; border-radius: inherit; }
.reel-meta { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; color: #fff; }
.reel-brand { display: inline-flex; align-items: center; gap: .45rem; flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; }
.reel-brand img { width: 26px; height: 26px; object-fit: contain; border-radius: 50%; background: rgb(3 9 22 / .6); padding: 2px; }
.reel-counter { font-size: .75rem; font-variant-numeric: tabular-nums; opacity: .8; }
.reel-sound { border: 0; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; background: rgb(3 9 22 / .55); backdrop-filter: blur(8px); font-size: .95rem; }
.reel-sound:hover { background: rgb(3 9 22 / .8); }
.reel-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer;
    background: rgb(3 9 22 / .5); color: #fff; font-size: 1.6rem; line-height: 1;
    backdrop-filter: blur(8px); opacity: 0; transition: opacity .2s, background .2s;
}
.reel-frame:hover .reel-nav, .reel-nav:focus-visible { opacity: 1; }
.reel-nav:hover { background: var(--c-primary); color: var(--c-on-primary); }
.reel-prev { left: .6rem; }
.reel-next { right: .6rem; }
.reel-title {
    position: absolute; inset: auto 0 0; margin: 0; padding: 2.5rem 1rem 1rem;
    background: linear-gradient(transparent, rgb(0 0 0 / .75));
    color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.25; text-transform: uppercase; letter-spacing: .02em;
    pointer-events: none;
}
@media (hover: none) { .reel-nav { opacity: .85; } }
@media (max-width: 760px) {
    .waiting-screen { align-items: flex-start; }
    .waiting-layout.has-reel { flex-direction: column; gap: 1.25rem; }
    .waiting-status .waiting-avatar { width: 150px; height: 150px; margin-bottom: .75rem; }
    .waiting-status .avatar-xl { --av-size: 84px; }
    .waiting-status .ripple { width: 84px; height: 84px; }
    .reel-frame { height: min(70dvh, 560px); }
}

/* Boutons de thème des vidéos */
.reel-themes { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .9rem; }
.theme-chip {
    display: inline-flex; align-items: center; gap: .45rem;
    font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
    padding: .5rem .85rem; border-radius: 99px;
    color: var(--c-text); background: var(--c-glass);
    border: 1px solid var(--c-border-strong);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.theme-chip:hover { border-color: color-mix(in srgb, var(--c-primary) 55%, transparent); transform: translateY(-1px); }
.theme-chip-icon { font-size: 1rem; line-height: 1; }
.theme-chip.active {
    background: var(--c-primary); color: var(--c-on-primary); border-color: transparent;
    box-shadow: var(--shadow-primary);
}
@media (max-width: 760px) {
    .reel-themes { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; width: calc(100vw - 3rem); padding-bottom: .4rem; scrollbar-width: none; }
    .theme-chip { flex: 0 0 auto; }
}

/* Widget anti-robot ALTCHA aux couleurs du thème */
.altcha-field altcha-widget {
    --altcha-max-width: 100%;
    --altcha-border-radius: var(--r-md);
    --altcha-border-color: var(--c-border-strong);
    --altcha-color-base: color-mix(in srgb, var(--c-text) 4%, transparent);
    --altcha-color-base-content: var(--c-text);
    --altcha-color-primary: var(--c-primary);
    --altcha-color-primary-content: var(--c-on-primary);
    --altcha-color-success: var(--c-primary);
    --altcha-color-success-content: var(--c-on-primary);
    --altcha-color-error: var(--c-danger);
    --altcha-color-neutral: var(--c-border-strong);
    --altcha-color-neutral-content: var(--c-muted);
    display: block; font-size: .9rem;
}

/* Avatars avec image (logo / photo) */
.avatar.has-image { background: var(--c-surface); padding: 0; overflow: hidden; text-shadow: none; }
.avatar.has-image img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

/* Choix d'image (logo du salon, photo de profil, photo d'invité) */
.image-picker { display: flex; align-items: center; gap: .9rem; }
.image-picker input[type=file] { flex: 1; min-width: 0; font-size: .85rem; padding: .5rem .6rem; }
.image-picker input[type=file]::file-selector-button {
    font: inherit; font-weight: 600; margin-right: .7rem; padding: .35rem .75rem; cursor: pointer;
    color: var(--c-text); background: var(--c-hover); border: 1px solid var(--c-border-strong); border-radius: var(--r-sm);
}
.image-picker .switch { font-size: .85rem; }
.field-hint { font-size: .78rem; color: var(--c-faint); font-weight: 400; }

/* Logo du salon dans les formulaires, photo de l'invité, titre de salon */
.logo-input { flex: 1 1 260px; flex-direction: column; gap: .3rem; }
.logo-input-label { font-size: .82rem; color: var(--c-muted); }
.room-heading { display: flex; align-items: center; gap: .8rem; }
.room-heading h1 { margin: 0; }
.guest-photo { display: flex; flex-direction: column; gap: .4rem; }
.guest-photo-label { font-weight: 500; font-size: .9rem; color: var(--c-muted); }
.guest-photo-row { display: flex; gap: .5rem; }
.guest-photo-btn { cursor: pointer; }
.profile-head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.5rem; }
.profile-head h1 { margin-bottom: .2rem; }
.profile-head p { margin: 0; }
.profile-head .avatar-xl { --av-size: 88px; }
a.user-chip { color: var(--c-text); text-decoration: none; transition: border-color .15s; }
a.user-chip:hover { color: var(--c-text); border-color: color-mix(in srgb, var(--c-primary) 50%, transparent); }
.stage-top .avatar { flex: 0 0 auto; }

/* ---------- Administration ---------- */
.admin-nav {
    display: flex; width: fit-content; max-width: 100%; flex-wrap: wrap; gap: .35rem; padding: .35rem; margin-bottom: 1.6rem;
    border-radius: calc(var(--radius) + 4px); background: var(--c-glass); border: 1px solid var(--c-border);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.admin-nav a {
    padding: .5rem .95rem; border-radius: var(--r-md); text-decoration: none;
    color: var(--c-muted); font-weight: 500; font-size: .9rem; transition: background .15s, color .15s;
}
.admin-nav a:hover { color: var(--c-text); background: color-mix(in srgb, var(--c-text) 7%, transparent); }
.admin-nav a.is-active { color: var(--c-on-primary); background: var(--c-primary); box-shadow: var(--shadow-primary); }
.admin-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem 1.2rem; align-items: end; }
.admin-form-submit, .admin-switches { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .9rem 1.4rem; align-items: center; }
.admin-list { display: flex; flex-direction: column; gap: .8rem; }
.admin-item { margin: 0; padding: 1rem 1.2rem; transition: border-color .2s, opacity .2s; }
.admin-item:hover { border-color: var(--c-border-strong); }
.admin-item.is-off { opacity: .6; }
.admin-item:target { border-color: color-mix(in srgb, var(--c-primary) 55%, transparent); }
.admin-item-head { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; }
.admin-item-info { min-width: 0; }
.admin-item-info h3 { margin: 0 0 .3rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 1.1rem; }
.admin-item-info p { margin: 0; overflow-wrap: anywhere; }
.admin-item details { margin-top: .9rem; border-top: 1px solid var(--c-border); padding-top: .8rem; }
.admin-item details summary { cursor: pointer; color: var(--c-muted); font-size: .88rem; font-weight: 500; list-style: none; }
.admin-item details summary::-webkit-details-marker { display: none; }
.admin-item details summary::before { content: "⚙"; margin-right: .45rem; }
.admin-item details[open] summary { margin-bottom: .9rem; }
.admin-actions { display: flex; flex-direction: column; gap: .8rem; }
.admin-actions input[type=password] { flex: 1 1 220px; width: auto; }
.admin-delete { margin-top: .9rem; }
.video-item-head { grid-template-columns: auto auto 1fr auto; }
.video-order {
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    font-family: var(--font-display); font-size: .95rem; color: var(--c-primary-light);
    background: var(--c-primary-soft); border: 1px solid color-mix(in srgb, var(--c-primary) 35%, transparent);
}
.video-thumb {
    display: grid; place-items: center; width: 54px; aspect-ratio: 9 / 16; overflow: hidden;
    border-radius: var(--r-sm); background: var(--c-room-bg, #000); border: 1px solid var(--c-border-strong);
    color: var(--c-primary-light); text-decoration: none; font-size: 1.1rem;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.theme-chip.is-static { cursor: default; transform: none; }
@media (max-width: 640px) {
    .admin-item-head, .video-item-head { grid-template-columns: auto 1fr; }
    .admin-item-head > .actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- Choix caméra / micro / haut-parleur ---------- */
.prejoin-media { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.device-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .7rem; }
.settings .device-bar { grid-template-columns: 1fr; gap: .9rem; margin-bottom: 1rem; }
.device-field { gap: .35rem; min-width: 0; }
.device-field[hidden] { display: none; }
.device-label { display: flex; align-items: center; gap: .5rem; font-size: .82rem; }
.device-field select { padding: .55rem .75rem; font-size: .88rem; text-overflow: ellipsis; }
.device-field select:disabled { opacity: .6; cursor: not-allowed; }
.mic-meter {
    display: inline-block; flex: 0 0 auto; width: 56px; height: 6px; margin-left: auto; overflow: hidden;
    border-radius: 99px; background: var(--c-border-strong);
}
.mic-meter i {
    display: block; height: 100%; width: calc(var(--level, 0) * 100%); border-radius: inherit;
    background: linear-gradient(90deg, var(--c-primary), var(--c-primary-light)); transition: width .08s linear;
}
.waiting-devices { width: 100%; margin-top: 1.2rem; text-align: left; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-glass); }
.waiting-devices summary { cursor: pointer; list-style: none; padding: .7rem 1rem; font-size: .88rem; font-weight: 600; color: var(--c-muted); text-align: center; }
.waiting-devices summary::-webkit-details-marker { display: none; }
.waiting-devices summary:hover, .waiting-devices[open] summary { color: var(--c-text); }
.waiting-devices-body { display: flex; flex-direction: column; gap: .8rem; padding: 0 1rem 1rem; }
.waiting-devices .device-bar { grid-template-columns: 1fr; }
.waiting-preview { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transform: scaleX(-1); border-radius: var(--r-md); background: var(--c-tile); }

/* ---------- Présentation co-marquée « Vous × Client » ---------- */
.cobrand {
    --cb-logo: 40px; --cb-x: 34px;
    display: inline-flex; align-items: center; gap: clamp(.8rem, 2.5vw, 1.6rem); max-width: 100%;
}
.cobrand-id { display: inline-flex; align-items: center; gap: .6rem; min-width: 0; }
.cobrand-logo {
    height: var(--cb-logo); width: auto; max-width: calc(var(--cb-logo) * 3.2); object-fit: contain; flex: 0 0 auto;
    filter: drop-shadow(0 4px 14px rgb(0 0 0 / .35));
}
.cobrand-name {
    font-family: var(--font-display); font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
    font-size: calc(var(--cb-logo) * .48); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cobrand-x {
    position: relative; display: inline-grid; place-items: center; flex: 0 0 auto;
    width: var(--cb-x); height: var(--cb-x); padding: calc(var(--cb-x) * .2); border-radius: 50%;
    color: var(--c-on-primary);
    background: linear-gradient(135deg, var(--c-primary-light, var(--c-primary)), var(--c-primary) 55%, color-mix(in srgb, var(--c-primary) 60%, #000));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 18%, transparent), 0 0 28px -2px color-mix(in srgb, var(--c-primary) 70%, transparent);
}
/* Fines lignes lumineuses de part et d'autre du « × » */
.cobrand-x::before, .cobrand-x::after {
    content: ""; position: absolute; top: 50%; width: clamp(.6rem, 2vw, 1.3rem); height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c-primary) 80%, transparent));
}
.cobrand-x::before { right: calc(100% + 4px); }
.cobrand-x::after { left: calc(100% + 4px); transform: scaleX(-1); }
.cobrand-x svg { display: block; }
.cobrand-lg { --cb-logo: 52px; --cb-x: 42px; padding: .9rem 1.6rem; border-radius: 99px; background: var(--c-glass); border: 1px solid var(--c-border); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.cobrand-md { --cb-logo: 34px; --cb-x: 28px; margin-bottom: 1.4rem; }
.cobrand-sm { --cb-logo: 24px; --cb-x: 20px; gap: .7rem; margin-left: .4rem; padding-left: .9rem; border-left: 1px solid var(--c-border-strong); }
.cobrand-sm .cobrand-x::before, .cobrand-sm .cobrand-x::after { display: none; }
.cobrand-sm .cobrand-x { box-shadow: 0 0 14px -2px color-mix(in srgb, var(--c-primary) 70%, transparent); }
@media (max-width: 640px) {
    .cobrand-lg { --cb-logo: 36px; --cb-x: 30px; padding: .7rem 1rem; }
    .cobrand-sm .cobrand-name { display: none; }
}

/* Formulaire (paramètres de la réunion) */
.cobrand-fieldset { flex: 1 1 100%; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem 1.1rem 1.1rem; margin: .3rem 0 0; }
.cobrand-fieldset legend { padding: 0 .4rem; font-weight: 600; font-size: .9rem; }
.cobrand-edit { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem 1.4rem; align-items: center; margin-bottom: .6rem; }
.cobrand-edit > .cobrand-x { --cb-x: 34px; }
.cobrand-side { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.cobrand-side input[type=text] { width: 100%; }
.cobrand-side-title { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-primary-light); }
.cobrand-current { display: flex; align-items: center; gap: .9rem; }
.cobrand-current img { height: 40px; max-width: 140px; object-fit: contain; padding: .3rem .5rem; border-radius: var(--r-sm); background: color-mix(in srgb, var(--c-text) 6%, transparent); }
@media (max-width: 760px) {
    .cobrand-edit { grid-template-columns: 1fr; }
    .cobrand-edit > .cobrand-x { justify-self: center; }
}
.waiting-cancel { margin-top: .9rem; }
.reel-sound.needs-sound {
    width: auto; padding: 0 .75rem; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap;
    background: var(--c-primary); color: var(--c-on-primary); animation: sound-pulse 1.8s ease-in-out infinite;
}
@keyframes sound-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-primary) 60%, transparent); }
    50% { box-shadow: 0 0 0 8px transparent; }
}
@media (prefers-reduced-motion: reduce) { .reel-sound.needs-sound { animation: none; } }
