:root {
  --bg: #1a1a1d;
  --panel: #212127;
  --panel-2: #1c1c21;
  --sunk: #17171c;
  --line: #33333c;
  --line2: #2a2a32;
  --text: #ececf1;
  --text2: #c4c4d0;
  --head: #ececf1;
  --muted: #8f8f9e;
  --accent: #7661ff;
  --accent-2: #b9adff;
  --link: #9a8bff;
  --rec: #e5566b;
  --ok: #38c172;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Bai Jamjuree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
h1, h2 { color: var(--head); }
button, input { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); cursor: pointer; text-decoration: none; color: var(--text);
  white-space: nowrap;
}
.btn:hover { border-color: rgba(118, 97, 255, .5); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.danger { background: var(--rec); border-color: var(--rec); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=password], input[type=email], input:not([type]) {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  min-width: 0; flex: 1;
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Accueil */
.home { max-width: 560px; margin: 0 auto; padding: 12vh 16px 40px; display: grid; gap: 22px; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 4px rgba(118, 97, 255, .2); }
.brand b { color: var(--muted); font-weight: 500; }
.home h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.15; margin: 0; }
details.host summary { cursor: pointer; color: var(--muted); }
details.host form { margin-top: 10px; }
.error { color: #ff8a8a; }

/* Avant d'entrer */
.prejoin { max-width: 980px; margin: 0 auto; padding: 6vh 16px 40px; display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr; align-items: center; }
@media (max-width: 800px) { .prejoin { grid-template-columns: 1fr; padding-top: 16px; } }
.preview { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
/* Choix de la caméra et du micro (28 oct. 2026) : écran d'entrée et fenêtre pendant l'appel. */
.appareils { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.appareils label { display: grid; gap: 4px; min-width: 0; font-size: 12px; color: var(--muted, #aaa); }
.appareils select { width: 100%; min-width: 0; font: inherit; font-size: 13px; color: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(16, 14, 28, .55); text-overflow: ellipsis; }
html.clair .appareils select { background: rgba(255, 255, 255, .9); }
.appareils select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.appareils-pop { top: auto; bottom: 88px; right: auto; left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); }
.appareils-pop .appareils { padding: 4px 14px 14px; }
@media (max-width: 520px) { .appareils { grid-template-columns: 1fr; } }
.preview .tools { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.consent { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.consent input { margin-top: 4px; }
.consent .rec-dot { color: var(--rec); }
.side { display: grid; gap: 14px; }
.side h2 { margin: 0; font-size: 24px; }

/* Appel */
/* 28 oct. 2026 (tâche du 5 oct. : « le chat se superpose à la vidéo et cache les participants ») : sans largeur de colonne,
   la grille prenait la largeur de la barre de boutons ; sur téléphone ou dans une fenêtre étroite du Hub, la vidéo et le chat
   sortaient de l'écran. La colonne suit maintenant la fenêtre et la barre passe à la ligne. */
.call { position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
.main { display: flex; min-height: 0; gap: 0; }
.main .stage { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 52px; }
.topbar .code { color: var(--muted); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; }
.topbar .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); font-size: 13px; }
.pill.rec { background: #e5484d22; color: #ff9da0; }
.pill.rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.pill.warn { background: #f5a52422; color: #ffc46b; }

.stage { padding: 0 12px; display: grid; gap: 10px; align-content: center; justify-content: center; overflow: hidden; min-height: 0; }
.stage.has-screen { grid-template-columns: minmax(0, 1fr) 220px; align-content: stretch; justify-content: stretch; grid-auto-rows: min-content; }
.stage.has-screen .tile.screen { grid-column: 1; grid-row: 1 / span 30; aspect-ratio: auto; height: var(--ecranh, 100%); max-height: var(--ecranh, none); }
.stage.has-screen .tile:not(.screen) { grid-column: 2; }
@media (max-width: 700px) {
  .stage.has-screen { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .stage.has-screen .tile.screen { grid-column: 1 / -1; grid-row: auto; height: auto; max-height: var(--ecranh, none); aspect-ratio: 16/9; }
  .stage.has-screen .tile:not(.screen) { grid-column: auto; }
}
.tile { position: relative; background: var(--panel); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; min-width: 0; }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.tile.screen video { object-fit: contain; }
.tile.self:not(.screen) video { transform: scaleX(-1); }
.tile .avatar { position: absolute; inset: 0; display: none; place-items: center; }
.tile .avatar span { width: 84px; height: 84px; border-radius: 50%; background: rgba(118, 97, 255, .22); color: var(--accent-2); display: grid; place-items: center; font-size: 32px; font-weight: 600; }
.tile.off video { visibility: hidden; }
.tile.off .avatar { display: grid; }
.tile .label { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 8px; background: #000a; font-size: 13px; display: flex; gap: 6px; align-items: center; max-width: calc(100% - 16px); }
.tile .label .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .label .mic { display: none; color: #ff8a8a; }
.tile.muted .label .mic { display: inline; }
.tile.speaking { box-shadow: inset 0 0 0 3px var(--ok); }

.controls { display: flex; justify-content: center; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
.ctl { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--panel-2); cursor: pointer; display: grid; place-items: center; position: relative; }
.ctl svg { width: 22px; height: 22px; }
.ctl.off { background: var(--rec); }
.ctl.on { background: var(--accent); }
.ctl.leave { background: var(--rec); width: 68px; border-radius: 26px; }
.ctl[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: 60px; white-space: nowrap; background: #000; padding: 4px 8px; border-radius: 6px; font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: #000d; padding: 8px 14px; border-radius: 10px; font-size: 14px; z-index: 10; }

.end { max-width: 520px; margin: 0 auto; padding: 18vh 16px; text-align: center; display: grid; gap: 16px; justify-items: center; }

/* Archives */
.archives { max-width: 1000px; margin: 0 auto; padding: 32px 16px 60px; display: grid; gap: 18px; }
.archives header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.archives header .spacer { flex: 1; }
.list { display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); }
.item:hover { border-color: rgba(118, 97, 255, .5); }
.item .t { font-weight: 600; }
.item .s { font-size: 13px; color: var(--muted); grid-column: 1; }
.status { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); align-self: start; }
.status.ready { color: var(--ok); }
.status.recording { color: #ff9da0; }
.status.processing { color: #ffc46b; }
.status.error { color: #ff8a8a; }
.detail { display: grid; gap: 18px; }
.detail video { width: 100%; border-radius: var(--radius); background: #000; max-height: 60vh; }
.md { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 22px 16px; }
.md h1 { font-size: 22px; } .md h2 { font-size: 17px; margin-top: 22px; }
.md li { margin: 4px 0; }
.md ul { padding-left: 20px; }
.md li.task { list-style: none; margin-left: -20px; }
pre.transcript { white-space: pre-wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; max-height: 60vh; overflow: auto; }

/* Chat */
.ctl { position: relative; }
.ctl .badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rec); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.chat { width: 340px; margin: 0 12px 0 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 0; }
.chat.drop { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(118, 97, 255, .25); }
.chat header, .modal header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat header .muted { font-size: 12px; flex: 1; }
.x { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.x:hover { color: var(--head); }
.msgs { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.msgs .vide { margin: auto; text-align: center; font-size: 13px; }
.m { max-width: 90%; align-self: flex-start; }
.m.moi { align-self: flex-end; text-align: right; }
.m .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.m .meta b { color: var(--accent-2); font-weight: 600; }
.m .t { background: var(--panel-2); border-radius: 12px; padding: 7px 11px; display: inline-block; text-align: left; white-space: pre-wrap; word-break: break-word; }
.m.moi .t { background: rgba(118, 97, 255, .28); }
.m img { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; margin-top: 4px; border: 1px solid var(--line); }
.m.moi img { margin-left: auto; }
.compose { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); align-items: center; }
.compose input { flex: 1; }
.compose .att, .compose .send { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); flex: none; }
.compose .send { background: var(--accent); border-color: var(--accent); color: #fff; }
.compose svg { width: 18px; height: 18px; }
@media (max-width: 700px) {
  .chat { position: fixed; inset: 0 0 76px 0; width: auto; margin: 0; border-radius: 0; z-index: 5; }
}

/* Invitation */
.modal { position: fixed; inset: 0; background: rgba(5, 5, 8, .7); display: grid; place-items: center; z-index: 20; padding: 16px; }
.modal .card { width: min(480px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.modal header b { flex: 1; color: var(--head); }
.modal .lien { display: flex; gap: 8px; padding: 16px 16px 8px; }
.modal .lien input { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; }
.modal .partage { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 16px; }
.modal .partage .btn { justify-content: flex-start; }
.modal .petit { font-size: 12.5px; padding: 4px 16px 16px; margin: 0; }

/* ---------- HUB : panneaux de l'appel ---------- */
.panel { width: 320px; flex: none; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 0; }
.panel.left { margin: 0 0 0 12px; }
.panel.right { width: 360px; margin: 0 12px 0 0; }
.panel header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line2); }
.panel header b { color: var(--head); }
.panel header .muted { font-size: 11.5px; flex: 1; }
.panel.drop, .pane.drop { box-shadow: 0 0 0 3px rgba(118, 97, 255, .3); }
.tabs { gap: 4px !important; }
.tabs button[data-t] { background: none; border: 1px solid transparent; border-radius: 8px; padding: 5px 10px; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabs button[data-t] .muted { font-weight: 400; font-size: 11px; }
.tabs button[data-t].on { background: rgba(118, 97, 255, .16); color: var(--head); border-color: rgba(118, 97, 255, .35); }
.tabs .x { margin-left: auto; }
.pane { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.notes { flex: 1; overflow-y: auto; padding: 10px 14px 16px; font-size: 13.5px; }
.notes .resume { background: rgba(118, 97, 255, .12); border: 1px solid rgba(118, 97, 255, .3); border-radius: 10px; padding: 8px 10px; margin: 4px 0 8px; color: var(--text2); }
.notes h3 { font: 500 10px/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); margin: 14px 0 6px; }
.notes ul { margin: 0; padding-left: 16px; }
.notes li { margin: 4px 0; color: var(--text2); }
.notes .vide, .msgs .vide { margin: auto; text-align: center; font-size: 13px; padding: 20px 10px; }
.m.mich .t { background: var(--sunk); border: 1px solid var(--line2); }
.m.mich .t p { margin: 0 0 6px; } .m.mich .t p:last-child { margin: 0; }
.m.mich .t ul { margin: 4px 0; padding-left: 18px; }
.m .t.attente { color: var(--muted); font-style: italic; }
.confiee { margin-top: 5px; font-size: 12px; color: var(--ok); }
.ctl.fin { width: auto; padding: 0 20px; border-radius: 26px; color: #fff; font-weight: 600; }
@media (max-width: 1100px) {
  .panel.left, .panel.right { position: fixed; top: 52px; bottom: var(--ctlh, 76px); z-index: 6; margin: 0; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }
  .panel.left { left: 8px; width: min(320px, calc(100vw - 16px)); }
  .panel.right { right: 8px; width: min(360px, calc(100vw - 16px)); }
}
/* 6 oct. 2026 (visio Alexandre + Mathys : le panneau de Michèle ou des notes cachait l'écran partagé) : entre 701 et 1100 px,
   les panneaux étaient en surimpression (position fixed) au-dessus de la scène. Quand un écran est partagé, ils reprennent
   leur place à côté de la scène, plus étroits : l'écran rétrécit au lieu d'être caché (le ResizeObserver recalcule --ecranh). */
@media (min-width: 701px) and (max-width: 1100px) {
  .main:has(.stage.has-screen) .panel.left, .main:has(.stage.has-screen) .panel.right { position: static; box-shadow: none; width: min(260px, 28vw); }
  .main:has(.stage.has-screen) .panel.left { margin: 0 0 0 8px; }
  .main:has(.stage.has-screen) .panel.right { margin: 0 8px 0 0; }
  /* panneau de cote ouvert : les cameras passent en rangee SOUS l'ecran (comme sur telephone), l'ecran garde toute la largeur */
  .main:has(.panel.left:not(.hidden), .panel.right:not(.hidden)) .stage.has-screen { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; align-content: start; }
  .main:has(.panel.left:not(.hidden), .panel.right:not(.hidden)) .stage.has-screen .tile.screen { grid-column: 1 / -1; grid-row: auto; height: auto; max-height: var(--ecranh, none); aspect-ratio: 16 / 10; }
  .main:has(.panel.left:not(.hidden), .panel.right:not(.hidden)) .stage.has-screen .tile:not(.screen) { grid-column: auto; }
}
@media (max-width: 700px) {
  .panel.left, .panel.right { inset: 0 0 var(--ctlh, 76px) 0; width: auto; border-radius: 0; }
}

/* ---------- Accueil ---------- */
.home { max-width: 760px; padding-top: 7vh; }
.homehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home h1 { margin: 0 0 6px; }
.cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) { .cartes { grid-template-columns: 1fr; } }
.carte { text-align: left; display: grid; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--text); font: inherit; transition: border-color .15s, transform .15s; }
.carte:hover { border-color: rgba(118, 97, 255, .6); transform: translateY(-1px); }
.carte svg { width: 22px; height: 22px; color: var(--accent-2); margin-bottom: 6px; }
.carte b { font-size: 15.5px; color: var(--head); }
.carte span { font-size: 13px; color: var(--muted); }
.carte.primaire { background: var(--accent); border-color: var(--accent); }
.carte.primaire svg, .carte.primaire span { color: rgba(255, 255, 255, .85); }
.carte.primaire b { color: #fff; }
.carte:disabled { opacity: .6; cursor: default; }
.recents .rhead { display: flex; align-items: baseline; justify-content: space-between; }
.recents h2 { font-size: 16px; margin: 0 0 10px; }
.petit { font-size: 12.5px; }
.end .lien { display: flex; gap: 8px; width: min(520px, 100%); }
.end .lien input { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; }

/* ---------- Intégré au HUB ---------- */
html.embed .topbar .brand { display: none; }
html.embed .home { padding-top: 28px; }

/* ---------- Aux couleurs du Calendrier du HUB (paysage de nuit, verre violet givré) ---------- */
:root {
  --verre: linear-gradient(160deg, rgba(46, 38, 82, .50), rgba(16, 14, 28, .62));
  --verre-bord: rgba(255, 255, 255, .085);
  --verre-ombre: 0 24px 60px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .06);
  --actif: linear-gradient(135deg, #7a5cff, #9b6bff);
  --actif-halo: 0 8px 22px rgba(122, 92, 255, .5);
  --vs: #9a8bff;
}
body { background: url("/fond.svg") center bottom / cover no-repeat fixed, #0a0814; }
.panel, .tile, .carte, .item, .modal .card, .md, pre.transcript, .consent, .preview, #ecranapercu .carte {
  background: var(--verre);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--verre-bord);
  box-shadow: var(--verre-ombre);
}
.tile { background: rgba(16, 14, 28, .55); }
.tile.speaking { box-shadow: 0 0 0 1px rgba(139, 108, 255, .6) inset, 0 10px 30px rgba(118, 97, 255, .25); border-color: rgba(139, 108, 255, .9); }
.panel header, .tabs { border-bottom-color: var(--verre-bord); }
.compose { border-top-color: var(--verre-bord); }
.topbar { background: transparent; }
input[type=text], input[type=password], input[type=email], input:not([type]) { background: rgba(16, 14, 28, .55); border-color: var(--verre-bord); }
input:focus { outline-color: #9b6bff; }
.btn { background: transparent; border-color: var(--line); color: var(--text2); }
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn.primary, .compose .send, .carte.primaire {
  background: var(--actif); border-color: transparent; color: #fff; box-shadow: var(--actif-halo);
}
.carte.primaire { -webkit-backdrop-filter: none; backdrop-filter: none; }
.ctl { background: rgba(46, 38, 82, .55); border: 1px solid var(--verre-bord); color: var(--text); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.ctl:hover { border-color: rgba(139, 108, 255, .7); }
.ctl.on { background: var(--actif); border-color: transparent; box-shadow: var(--actif-halo); }
.ctl.off, .ctl.leave { background: #ff5d6c; border-color: transparent; }
.tabs button[data-t].on { background: var(--actif); color: #fff; border-color: transparent; box-shadow: var(--actif-halo); }
.tabs button[data-t].on .muted { color: rgba(255, 255, 255, .8); }
.notes h3, .panel header b { color: var(--vs); }
.notes h3 { font-family: "Bai Jamjuree", system-ui, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.notes li { list-style: none; margin: 0 0 5px -16px; padding: 5px 8px; border-radius: 7px; background: #6c5ce726; border-left: 3px solid #7661ff; }
.notes .resume { background: linear-gradient(90deg, rgba(118, 97, 255, .16), rgba(118, 97, 255, .05)); border-color: rgba(118, 97, 255, .35); }
.m .t { background: rgba(16, 14, 28, .6); }
.m.moi .t { background: color-mix(in srgb, #7661ff 30%, transparent); }
.m.mich .t { background: #6c5ce726; border: 0; border-left: 3px solid #7661ff; }
.m .meta b { color: var(--vs); }
.pill { background: rgba(46, 38, 82, .55); border: 1px solid var(--verre-bord); }
.pill.rec { background: #ff6b6b2e; color: #ff9da0; border-color: transparent; }
.brand .dot { background: var(--actif); box-shadow: var(--actif-halo); }
.status { background: rgba(16, 14, 28, .55); border: 1px solid var(--verre-bord); }
.carte svg { color: var(--vs); }
.item:hover, .carte:hover { border-color: rgba(139, 108, 255, .7); }
.toast { background: rgba(16, 14, 28, .85); border: 1px solid var(--verre-bord); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.modal { background: rgba(7, 6, 14, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* ---------- Disposition de l'accueil du HUB (28 sept.) : notes | visages + chat dessous | Michèle ---------- */
.main .centre { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.main .centre .stage { flex: 1; }
.panel.bas { width: auto; height: 210px; margin: 0 12px; flex: none; }
.panel.bas .msgs { padding: 8px 12px; gap: 6px; }
.compose .prive { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; flex: none; padding: 0 2px; }
.compose .prive input { margin: 0; accent-color: #7661ff; }
.prive-tag { font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); color: var(--muted); }
@media (max-height: 700px) { .panel.bas { height: 160px; } }
@media (max-width: 700px) {
  .panel.bas { position: fixed; inset: 0 0 76px 0; height: auto; margin: 0; border-radius: 0; z-index: 5; }
}

.status.vide { color: var(--muted); }

/* Bandeau « réunion non enregistrée » (28 sept 2026) : en surimpression, il ne décale pas la grille de l'appel. */
.norec { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 20; display: block; width: max-content; max-width: min(760px, calc(100vw - 32px)); text-align: center; padding: 10px 14px; border-radius: 12px; background: #3a2410f0; border: 1px solid #f5a52466; color: #ffd08a; font-size: 14px; line-height: 1.4; box-shadow: 0 8px 30px #0008; }
.norec b { color: #ffe2b0; }
.norec .btn { margin-left: 8px; padding: 4px 12px; font-size: 13px; vertical-align: middle; }
.norec.hidden { display: none; }

/* Michèle agit pendant l'appel (28 sept 2026) : tâche ajoutée, PDF prêt. */
.agit { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 9px 11px; border-radius: 10px; background: #7661ff1f; border: 1px solid #7661ff55; font-size: 13px; line-height: 1.35; color: inherit; text-decoration: none; }
.agit .ico { font-size: 18px; line-height: 1; }
.agit.doc .ouvrir { margin-left: auto; font-weight: 600; font-size: 12px; padding: 4px 10px; border-radius: 8px; background: #7661ff; color: #fff; }
.agit.doc:hover .ouvrir, .agit.doc:focus-visible .ouvrir { filter: brightness(1.1); }
.agit.doc:focus-visible { outline: 2px solid #9a86ff; }

/* ---------- Mode clair (29 sept. 2026) : suit le Hub quand il est en clair (?theme=clair ou message meet:theme).
   Memes valeurs que le Calendrier du Hub en clair (body.clair) : cartes blanches givrees, bord rgba(29,29,36,.07). ---------- */
html.clair {
  --bg: #f4f4f7; --panel: #ffffff; --panel-2: #f7f7fa; --sunk: #eeeef3; --line: rgba(29, 29, 36, .14); --line2: rgba(29, 29, 36, .08);
  --text: #1d1d24; --text2: #474756; --head: #1d1d24; --muted: #6e6e7e; --link: #5b45e0; --vs: #5b45e0;
  --verre: rgba(255, 255, 255, .82);
  --verre-bord: rgba(29, 29, 36, .07);
  --verre-ombre: 0 18px 44px rgba(40, 30, 90, .10), inset 0 1px 0 rgba(255, 255, 255, .9);
  color-scheme: light;
}
html.clair body { background: linear-gradient(180deg, #f4f4f7 0%, #ecebf6 100%) fixed, #f4f4f7; }
html.clair .tile, html.clair .m .t, html.clair .status, html.clair .toast,
html.clair input[type=text], html.clair input[type=password], html.clair input[type=email], html.clair input:not([type]) { background: rgba(255, 255, 255, .9); }
html.clair .ctl, html.clair .pill { background: #fff; color: var(--text); border-color: rgba(29, 29, 36, .12); }
html.clair .ctl.on, html.clair .ctl.off, html.clair .ctl.leave { color: #fff; }
html.clair .pill.rec { color: #c0283a; }
html.clair .modal { background: rgba(29, 29, 36, .28); }
html.clair .notes li, html.clair .m.mich .t { background: rgba(106, 84, 242, .08); }
html.clair .prive-tag { background: rgba(29, 29, 36, .06); }
html.clair .norec b { color: #8a5a00; }

/* 5 oct. 2026 : « Ouvrir avec Michèle dans le HÜB » (hôte, salle ouverte hors du HUB) */
a.ctl { color: var(--text); }
#avecmich svg { width: 18px; height: 18px; flex: none; }

/* 5 oct. 2026 : bulle du HUB (meet:mini) : une seule vidéo, sans barre, boutons ni panneaux */
html.mini .topbar, html.mini .controls, html.mini .norec, html.mini .panel { display: none !important; }
html.mini .call { grid-template-rows: 1fr; }
html.mini .main { padding: 0 !important; gap: 0 !important; }
html.mini .stage { display: block !important; padding: 0 !important; height: 100%; }
html.mini .stage .tile { display: none; }
html.mini .stage .tile.vedette { display: block; width: 100% !important; height: 100%; aspect-ratio: auto; border-radius: 0; border: 0; box-shadow: none; }
html.mini .tile .label { font-size: 11px; left: 6px; bottom: 6px; padding: 2px 7px; }
html.mini .tile .avatar span { width: 56px; height: 56px; font-size: 22px; }

/* 5 oct. 2026 : envoi de l'invitation par courriel (hôte) */
.modal .envoi { display: flex; gap: 8px; padding: 8px 16px 0; }
.modal .envoi input { flex: 1; min-width: 0; }
.modal .envoi .btn svg { width: 16px; height: 16px; }
#envoietat { margin: 6px 0 0; padding: 0 16px; }

/* 5 oct. 2026 (Alexandre : « fais le chat du bas en glissière », puis « j'ai pas demandé de le mettre à droite » : choix
   (a) ; Mathys : « le chat est vraiment petit, je vois même pas l'image ») : le chat reste en bas, sous les visages, mais
   il est plus haut (40 % de l'écran) et il monte en glissant quand on l'ouvre (coupé si mouvement réduit). Images plus
   grandes. Téléphone : plein écran, comme avant. */
@media (min-width: 701px) {
  .panel.bas { height: clamp(220px, 40vh, 440px); }
  .panel.bas .msgs { padding: 10px 14px; gap: 8px; }
  .panel.bas .m img { max-height: 300px; }
}
@media (min-width: 701px) and (max-height: 700px) { .panel.bas { height: clamp(180px, 40vh, 280px); } }
@media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
  .panel.bas:not(.hidden) { animation: glisse .24s ease-out; }
}
@keyframes glisse { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 5 oct. 2026 : liste des participants (le compteur en haut à droite l'ouvre) */
button#count { border: 1px solid var(--verre-bord, var(--line)); color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
button#count:hover, button#count[aria-expanded="true"] { border-color: rgba(139, 108, 255, .7); }
button#count:focus-visible { outline: 2px solid #9b6bff; outline-offset: 2px; }
.plist { position: fixed; top: 52px; right: 12px; z-index: 12; width: min(300px, calc(100vw - 24px)); max-height: min(60vh, 420px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.plist header { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px 6px; }
.plist header b { color: var(--head); }
.plist ul { list-style: none; margin: 0; padding: 4px 6px 8px; }
.plist li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.plist li:hover { background: var(--panel-2); }
.plist .av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: rgba(118, 97, 255, .22); color: var(--accent-2); }
.plist .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist .tag { font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: rgba(118, 97, 255, .22); color: var(--accent-2); margin-left: 4px; }
.plist .etat { color: #ff8a8a; display: inline-flex; }
/* 6 oct. 2026 : bouton Retirer de l'hôte */
.plist .retirer { flex: none; font: inherit; font-size: 11.5px; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted, #aaa); cursor: pointer; }
.plist .retirer:hover { color: #ff8a8a; border-color: #ff8a8a; }
.plist .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html.mini .plist { display: none !important; }

/* 5 oct. 2026 : son d'un participant bloqué par le navigateur (aucun clic dans la page) */
.sonbloque { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.sonbloque svg { width: 18px; height: 18px; }
html.mini .sonbloque { top: 8px; padding: 6px 10px; font-size: 12px; }

/* 5 oct. 2026 : glissière du chat du bas (poignée en haut, à tirer) */
.panel.bas { position: relative; }
.panel.bas .poignee { position: absolute; top: -6px; left: 0; right: 0; height: 14px; z-index: 2; cursor: ns-resize; touch-action: none; }
.panel.bas .poignee::after { content: ""; display: block; width: 44px; height: 4px; margin: 5px auto 0; border-radius: 2px; background: var(--line); transition: background .15s; }
.panel.bas .poignee:hover::after, .panel.bas .poignee:focus-visible::after, .panel.bas.tire .poignee::after { background: var(--accent); width: 64px; }
.panel.bas .poignee:focus-visible { outline: none; }
.panel.bas.tire { animation: none !important; user-select: none; }
@media (max-width: 700px) { .panel.bas .poignee { display: none; } }
@media (prefers-reduced-motion: reduce) { .panel.bas .poignee::after { transition: none; } }

/* 5 oct. 2026 : choix parmi les réunions en cours (bouton Visio du HUB) */
.enCours .liste { display: flex; flex-direction: column; gap: 8px; width: min(460px, 100%); margin: 8px 0 16px; }
.enCours .reunion { flex-direction: column; align-items: flex-start; gap: 2px; white-space: normal; text-align: left; padding: 12px 16px; }
.enCours .reunion .muted { font-size: 12.5px; }
.enCours #neuve svg { width: 18px; height: 18px; }

/* 5 oct. 2026 : la barre de boutons reste toujours cliquable, par-dessus les panneaux et le chat */
.controls { position: relative; z-index: 9; }
@media (max-width: 700px) { .panel.bas { bottom: var(--ctlh, 76px) !important; } }

/* 5 oct. 2026 : images du chat plus grandes, et en plein écran au clic */
.panel.bas .m:has(img) { max-width: 100%; }
.panel.bas .m img { width: min(100%, 720px); height: auto; max-height: none; cursor: zoom-in; }
.visionneuse { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: rgba(5, 5, 8, .88); cursor: zoom-out; }
.visionneuse img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.visionneuse .x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--panel-2); color: var(--text); font-size: 22px; cursor: pointer; }

/* 7 oct. 2026 (Alexandre : « il faudrait que j'aie l'option avant que ça l'ouvre : rejoindre une conférence en direct,
   envoyer une invitation, archives ») : l'accueil s'ouvre au bouton Visio du HUB. 4 cartes, réunions en direct en haut. */
.cartes { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.enDirect h2 { font-size: 16px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.enDirect .pt { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(80, 200, 120, .18); }
.enDirect .item { border-color: rgba(139, 108, 255, .55); }
.status.live, html.clair .status.live { background: var(--accent); color: #fff; font-weight: 600; }
.modal .entrer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 16px 4px; }
.modal .entrer .btn svg { width: 16px; height: 16px; }
.modal .entrer .petit { padding: 0; }
@media (prefers-reduced-motion: reduce) { .carte { transition: none; } .carte:hover { transform: none; } }

/* 28 oct. 2026 · rencontre CIMEQ du 26 oct.
   - Tommy : « le chat, il arrive en bas, il est gros en tabarnouche ». Hauteur de départ plus petite (30 % de l'écran) ;
     la poignée se voit (barre plus large, plus foncée) et la taille choisie reste gardée (meet:chatH).
   - Marie-Hélène : « y a-t-il un chat ici ? » : le bouton du chat dit « Chat » sur ordinateur.
   - Vignette d'une personne qui se reconnecte : gardée à sa place, initiales et « Reconnexion… » (.attente). */
@media (min-width: 701px) {
  .panel.bas { height: clamp(170px, 30vh, 340px); }
  .ctl .ctlmot { font-size: 13px; font-weight: 600; }
  #bchat { width: auto; padding: 0 16px; border-radius: 26px; display: flex; align-items: center; gap: 6px; }
}
@media (max-width: 700px) { .ctl .ctlmot { display: none; } }
.panel.bas .poignee::after { width: 64px; height: 5px; background: var(--muted); opacity: .55; }
.tile.attente video { visibility: hidden; }
.tile.attente .avatar { display: grid; opacity: .6; }
.tile.attente .label .nm { font-style: italic; }
/* 28 oct. 2026 : le bandeau « non enregistrée » monte dans la barre du haut (il recouvrait le × des panneaux) ; une ligne. */
.norec { top: 8px; max-width: min(640px, calc(100vw - 300px)); padding: 6px 12px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.norec .btn { padding: 2px 10px; font-size: 12px; }
/* 21 nov. 2026 · salle d'attente : les demandes d'entrée, sous la barre du haut ; mêmes couleurs que le bandeau, sur plusieurs lignes. */
.norec.demandes { top: 46px; white-space: normal; overflow: visible; z-index: 21; }
.norec.demandes .demande { display: inline-block; margin: 2px 6px; }
.plist .porte { margin: 0; padding: 4px 14px 12px; }
@media (max-width: 900px) { .norec .norecplus { display: none; } }
@media (max-width: 700px) { .norec { top: auto; bottom: calc(var(--ctlh, 76px) + 8px); max-width: calc(100vw - 16px); white-space: normal; } }

/* 28 oct. 2026 · choix du fond en vignettes rondes (essai d'Alexandre : « c'est pas les menus ronds qu'on est habitués pour
   le HÜB […] c'est pas très beau ») : aperçu de chaque fond, actif cerclé du violet du HÜB, nom dessous. */
.fondzone { display: grid; gap: 6px; }
.fondzone .fondtitre { font-size: 12px; color: var(--muted, #aaa); }
.fondzone .petit { font-size: 12px; margin: 0; min-height: 14px; }
.appareils-pop .fondzone { padding: 0 14px 14px; }
.fonds { display: flex; gap: 10px; flex-wrap: wrap; }
.fondbtn { display: grid; justify-items: center; gap: 5px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); font: inherit; }
.fondbtn .vign { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(46, 38, 82, .55) center/cover no-repeat; border: 1px solid var(--verre-bord, rgba(255, 255, 255, .09)); box-shadow: 0 0 0 2px transparent; transition: box-shadow .15s, transform .15s; overflow: hidden; }
.fondbtn .vign svg { width: 20px; height: 20px; color: var(--muted, #aaa); }
.fondbtn .nomf { font-size: 11.5px; color: var(--muted, #aaa); white-space: nowrap; }
.fondbtn:hover .vign { transform: translateY(-1px); }
.fondbtn.on .vign { box-shadow: 0 0 0 2px var(--bg, #0a0814), 0 0 0 4px #8b6cff; }
.fondbtn.on .nomf { color: var(--text); font-weight: 600; }
.fondbtn:focus-visible { outline: none; }
.fondbtn:focus-visible .vign { box-shadow: 0 0 0 2px var(--bg, #0a0814), 0 0 0 4px #b9adff; }
.fondbtn .v-flou { background: radial-gradient(circle at 30% 35%, rgba(255, 190, 140, .85), transparent 45%), radial-gradient(circle at 72% 65%, rgba(120, 170, 255, .7), transparent 50%), linear-gradient(135deg, #6a5a8a, #2a2440); }
.v-montagnes { background-image: url("/fond.svg") !important; }
.v-bureau { background: linear-gradient(180deg, #eef0f6, #d9dce8) !important; }
html.clair .fondbtn .vign { background-color: rgba(255, 255, 255, .82); border-color: rgba(29, 29, 36, .07); }
@media (prefers-reduced-motion: reduce) { .fondbtn .vign { transition: none; } .fondbtn:hover .vign { transform: none; } }
/* Menus Caméra et Micro : la liste ouverte était pâle sur pâle (couleur héritée). */
.appareils select option { background: #1c1630; color: #ececf1; }
html.clair .appareils select option { background: #fff; color: #1d1d24; }
