/* ASI Réunions — styles du module « live » (mobile, sons, accueil, rapport) */

/* ---------- Salle : jamais de défilement de la page, hauteur réelle du téléphone ---------- */
html.in-room, html.in-room body { overflow: hidden !important; overscroll-behavior: none; height: var(--app-h, 100dvh); }
html.in-room body { position: fixed; inset: 0; width: 100%; }
.room-overlay { height: var(--app-h, 100dvh) !important; max-height: var(--app-h, 100dvh); overflow: hidden !important; overscroll-behavior: none; touch-action: manipulation; }
.room-overlay .room-view:not([hidden]) { flex: 1 1 0; min-height: 0; }
.room-overlay .call-shell { height: 100% !important; min-height: 0 !important; overflow: hidden; }
.room-overlay .call-body { flex: 1 1 0; min-height: 0; }
.room-overlay #call-grid { min-height: 0; max-height: 100%; }
.room-overlay .call-controls { flex: 0 0 auto; position: relative; z-index: 8; }

@media (max-width: 820px) {
  /* Barre du bas : fixe, simple, jamais de défilement — micro · caméra · main · réaction · ⋯ · quitter */
  html body .room-overlay .call-controls { position: sticky; bottom: 0; display: flex; flex-wrap: nowrap; justify-content: space-evenly !important; align-items: center; gap: 0; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); overflow: visible; background: rgba(8, 14, 38, .96); border-top: 1px solid rgba(255, 255, 255, .08); }
  .room-overlay .call-controls #call-share, .room-overlay .call-controls #call-whiteboard, .room-overlay .call-controls #call-participants,
  .room-overlay .call-controls #call-chat, .room-overlay .call-controls #call-flip { display: none !important; }
  html body .room-overlay .call-controls #call-hand, html body .room-overlay .call-controls #call-reaction, html body .room-overlay .call-controls #call-more { display: grid !important; }
  .call-mobile-menu [data-call-action="call-hand"], .call-mobile-menu [data-call-action="call-reaction"] { display: none !important; }
  .room-overlay .control-btn { flex: 0 0 auto; width: 48px; height: 48px; }
  .room-overlay .control-btn.leave-btn { width: 56px; padding: 0; margin-left: 0 !important; }
  .room-overlay .control-btn.leave-btn span { display: none; }
  .room-overlay .call-topbar { flex: 0 0 auto; }
  .room-overlay .call-side { z-index: 20; }
  /* menu « ⋯ » : feuille en bas de l'écran, boutons larges */
  .more-menu { left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(76px + env(safe-area-inset-bottom)) !important; min-width: 0 !important; max-height: 62dvh; overflow-y: auto; }
  .more-menu button { min-height: 48px; }
}
@media (max-width: 360px) { .room-overlay .control-btn { width: 44px; height: 44px; } }
/* éléments propres à un type d'appareil */
.mm-mobile-only { display: none !important; }
@media (max-width: 820px) { .more-menu .mm-mobile-only { display: flex !important; } .more-menu hr.mm-mobile-only { display: block !important; } html.asi-no-share #mm-m-share { display: none !important; } #mm-full, #mm-pip { display: none !important; } }
.mm-emoji { font-style: normal; width: 18px; text-align: center; }
html.asi-pc .pc-only-hide, html.asi-touch .touch-only-hide { display: none !important; }
html.asi-pc #call-flip { display: none !important; }
html.asi-no-share #call-share, html.asi-no-share [data-call-action="call-share"] { display: none !important; }

/* ---------- Pages dédiées : Agenda · Événements · Carte ---------- */
html.zx-page-open, html.zx-page-open body { overflow: hidden; }
.zx-page { position: fixed; inset: 0; z-index: 9990; display: flex; flex-direction: column; background: var(--zx-page-bg, #0b1230); color: #fff; animation: zx-fade .2s ease both; }
.zx-page-top { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: rgba(255, 255, 255, .06); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.zx-page-back { width: 42px; height: 42px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 20px; cursor: pointer; }
.zx-page-title { margin: 0; font-size: clamp(17px, 4.6vw, 22px); font-weight: 800; }
.zx-page-body { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 16px 14px calc(24px + env(safe-area-inset-bottom)); max-width: 980px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.zx-page-map .zx-page-body { max-width: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.zx-page-map .zx-map-frame { flex: 1 1 0; min-height: 0; }
.zx-map-bar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; font-size: 13px; background: rgba(255, 255, 255, .05); }
.zx-map-note { opacity: .8; min-width: 0; }
.zx-page .zx-evl { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
#call-hand.hand-up, .control-btn.hand-up { background: #f5b301 !important; color: #2b1d00 !important; box-shadow: 0 0 0 3px rgba(245, 179, 1, .45); animation: zx-hand 1.4s ease-in-out infinite; }
@keyframes zx-hand { 50% { transform: translateY(-3px); } }
html.cam-rear body #call-grid .tile.is-self video { transform: none !important; }
#call-flip[hidden] { display: none !important; }

/* ---------- Bibliothèque de sons ---------- */
.zx-lib { display: grid; gap: 10px; font-size: 14px; }
.zx-lib-row { display: flex; align-items: center; gap: 10px; }
.zx-lib-row input[type=range] { flex: 1; }
.zx-lib-row input[type=checkbox] { width: 18px; height: 18px; }
.zx-lib-list { display: grid; gap: 8px; }
.zx-lib-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.zx-lib-item.is-on { border-color: #f5b301; background: rgba(245, 179, 1, .14); }
.zx-lib-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.zx-lib-btn { border: 0; border-radius: 999px; padding: 8px 14px; font: 700 13px/1 inherit; background: #ee8130; color: #2b1203; cursor: pointer; }
.zx-lib-now { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(18, 176, 216, .2); }
.zx-lib-empty { margin: 4px 0; opacity: .75; font-size: 13px; line-height: 1.45; }

/* ---------- Accueil : Agenda · Carte · Événements ---------- */
.zx-hq { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 4px; }
.zx-hq-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 16px; border: 1px solid rgba(10, 46, 158, .18); background: rgba(255, 255, 255, .9); color: #0a2e9e; font: 800 14px/1 inherit; cursor: pointer; box-shadow: 0 6px 16px rgba(10, 46, 158, .1); transition: transform .15s; }
.zx-hq-btn:hover { transform: translateY(-2px); }
.zx-hq-ic { font-size: 20px; }
@media (max-width: 520px) { .zx-hq { display: grid; grid-template-columns: repeat(3, 1fr); } .zx-hq-btn { flex-direction: column; gap: 5px; padding: 10px 4px; font-size: 12px; } }
.zx-map { position: fixed; inset: 0; z-index: 9996; display: flex; flex-direction: column; background: #0b1230; }
.zx-map-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #fff; }
.zx-map-frame { flex: 1; width: 100%; border: 0; background: #fff; }
.zx-evl { display: grid; gap: 12px; }
.zx-evl-card { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.zx-evl-card h3 { margin: 0 0 6px; font-size: 16px; }
.zx-hag { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.zx-hag-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-transform: capitalize; }
.zx-hag-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; align-content: start; }
.zx-hag-dow { text-align: center; font-size: 11px; opacity: .65; text-transform: uppercase; padding: 4px 0; }
.zx-hag-cell { position: relative; aspect-ratio: 1; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .06); color: inherit; font: 600 13px/1 inherit; cursor: pointer; }
.zx-hag-cell.is-empty { background: none; cursor: default; }
.zx-hag-cell.is-today { outline: 2px solid #12b0d8; }
.zx-hag-cell.is-sel { background: #ee8130; color: #2b1203; }
.zx-hag-cell.has-ev i { position: absolute; right: 3px; bottom: 2px; font-style: normal; font-size: 12px; }
.zx-hag-side h4 { margin: 0 0 8px; text-transform: capitalize; }
.zx-hag-ev { display: block; width: 100%; text-align: left; margin-bottom: 6px; padding: 9px 11px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); color: inherit; font: 700 13px/1.3 inherit; cursor: pointer; }
@media (max-width: 640px) { .zx-hag { grid-template-columns: 1fr; } }
.plist-card .zx-ag-btn, .plist-card .zx-ag-ic, .zx-map .zx-ag-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* ---------- Rapport de réunion ---------- */
.zx-cr-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.zx-cr-btn { border: 1px solid #c8d8cf; background: #fff; color: #173b2a; border-radius: 8px; padding: 6px 10px; font: 700 12.5px/1 system-ui, sans-serif; cursor: pointer; }
.zx-cr-btn.is-on { background: #0f6b3a; color: #fff; }
.zx-cr-info { margin-left: auto; font: 600 12px system-ui, sans-serif; color: #5a6b62; }
.zx-cr-prev { min-height: 240px; padding: 14px 16px; background: #fff; color: #1a2620; border: 1px solid #d3e0d8; border-radius: 10px; line-height: 1.55; }

/* ---------- Fonds animés : aperçu dans le choix des arrière-plans ---------- */
.zx-bg-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plist-card .zx-ag-ic, .plist-card .zx-ag-btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .22); }
.plist-card .zx-ag-ic:hover, .plist-card .zx-ag-btn:hover { background: rgba(255, 255, 255, .22); }
#zx-open-agenda { display: none !important; } /* l’Agenda est dans les boutons d’accueil (Agenda · Carte · Événements) */

/* ---------- Carte : repli quand le site de la carte interdit l'intégration + bouton « Copier le lien » ---------- */
.zx-page-top .zx-page-title { flex: 1 1 auto; min-width: 0; }
.zx-page-share { flex: 0 0 auto; width: 42px; height: 42px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 18px; cursor: pointer; }
.zx-page-share:hover, .zx-page-back:hover { background: rgba(255, 255, 255, .22); }
.zx-map-fallback { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px 22px; text-align: center; }
.zx-map-fallback h2 { margin: 0; font-size: 24px; }
.zx-map-fallback p { margin: 0; max-width: 420px; opacity: .85; line-height: 1.5; }
.zx-map-fb-ic { font-size: 64px; line-height: 1; }
.zx-map-fb-go { padding: 14px 30px !important; font-size: 17px !important; font-weight: 800; border-radius: 14px !important; }
.zx-map-fallback small { opacity: .5; font-size: 11px; max-width: 420px; word-break: break-word; }
/* v33 — bouton « Quitter » sur ordinateur : icône et texte sur la même ligne */
@media (hover: hover) and (pointer: fine) and (min-width: 821px) {
  .room-overlay .control-btn.leave-btn { flex-direction: row; gap: 8px; width: auto; padding: 0 18px; height: 44px; border-radius: 999px; }
  .room-overlay .control-btn.leave-btn span { display: inline; font-size: 14px; font-weight: 600; line-height: 1; }
}
