/* Page d'accueil Meet */
.meet-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #0a0a0f);
  color: var(--text, #fff);
  padding: 1.5rem;
}

.meet-page .is-hidden {
  display: none !important;
}

.meet-page.meet-in-call,
.meet-page #meetShell.meet-in-call {
  display: none;
}

.meet-page #videoCallContainer {
  display: none;
}

.meet-page #videoCallContainer.show {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: #000;
  overflow: hidden;
}

.meet-page #videoCallContainer.show > .video-container {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: auto;
  background: #000;
}

/* Conférence seule (en attente des autres) */
.meet-page .video-container.group-call-layout.grid-solo {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.meet-page .video-container.group-call-layout.grid-solo #localVideo.local-video-group {
  width: min(100%, 720px);
  max-height: 80vh;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Masquer la vidéo 1-à-1 fantôme en mode groupe */
.meet-page .video-container.group-call-layout > #remoteVideo:not(.remote-video-group) {
  display: none !important;
}

.meet-page .video-container.group-call-layout #meetVideoTile_local {
  transform: none;
}

.meet-page .video-container.group-call-layout #meetVideoTile_local video {
  transform: scaleX(-1);
}

.meet-page .video-container.group-call-layout #localVideo.local-video-group:not(.meet-video-tile video) {
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  object-fit: cover;
  background: #000;
  position: relative;
  transform: scaleX(-1);
}

.meet-guest-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  margin-bottom: 1rem;
}

.meet-lobby-preview {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  margin: 1rem 0;
  aspect-ratio: 16/10;
}

.meet-lobby-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.meet-lobby-controls {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
}

.meet-lobby-ctrl {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 1.1rem;
}

.meet-lobby-ctrl.is-off {
  background: rgba(255, 59, 48, 0.75);
}

.meet-lobby-code {
  opacity: 0.85;
  font-size: 0.9rem;
}

.conference-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.conference-qr-wrap img {
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.meet-shell {
  width: 100%;
  max-width: 420px;
}

.meet-brand {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: inherit;
  text-decoration: none;
}

.meet-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(12px);
}

.meet-card__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.meet-card h1 {
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}

.meet-card__hint {
  font-size: 0.9rem;
  opacity: 0.75;
  margin: 0 0 1.25rem;
}

.meet-code-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.meet-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.meet-btn--primary {
  background: #007aff;
  color: #fff;
}

.meet-guest-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.meet-card label {
  display: block;
  font-size: 0.8rem;
  opacity: 0.75;
  margin-bottom: 0.35rem;
  text-align: left;
}

.meet-btn--secondary {
  margin-top: 0.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: inherit;
}

.meet-status {
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.8;
  min-height: 1.2em;
}

.meet-status[data-error="1"] {
  color: #ff6b6b;
}

.meet-footnote {
  font-size: 0.75rem;
  opacity: 0.55;
  margin-top: 1rem;
}

/* Salle d'attente — participant */
.waiting-room-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.waiting-room-overlay.show {
  display: flex;
}

.waiting-room-card {
  background: #1c1c1e;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: 360px;
  width: 100%;
  color: #fff;
}

.waiting-room-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #007aff;
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: waitingSpin 0.9s linear infinite;
}

@keyframes waitingSpin {
  to { transform: rotate(360deg); }
}

/* Salle d'attente — hôte */
.waiting-host-panel {
  position: absolute;
  top: 72px;
  left: 16px;
  z-index: 50;
  min-width: 240px;
  max-width: 320px;
  background: rgba(20, 20, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  backdrop-filter: blur(10px);
}

.waiting-host-panel.is-hidden {
  display: none !important;
}

.waiting-host-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin: 0 0 0.5rem;
}

#waitingRoomHostList {
  list-style: none;
  margin: 0;
  padding: 0;
}

.waiting-host-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.waiting-host-item:last-child {
  border-bottom: none;
}

.waiting-host-name {
  font-size: 0.9rem;
  flex: 1;
  text-align: left;
}

.waiting-guest-badge {
  font-size: 0.7rem;
  opacity: 0.65;
}

.waiting-host-actions {
  display: flex;
  gap: 0.35rem;
}

.waiting-admit-btn,
.waiting-reject-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.waiting-admit-btn {
  background: rgba(52, 199, 89, 0.25);
  color: #34c759;
}

.waiting-reject-btn {
  background: rgba(255, 59, 48, 0.2);
  color: #ff3b30;
}

.conference-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

/* Contrôles conférence dans l'appel */
.call-ctrl-btn.is-active {
  background: rgba(255, 193, 7, 0.35) !important;
  border-color: #ffc107 !important;
}

#raisedHandsPanel {
  position: absolute;
  top: 72px;
  right: 16px;
  z-index: 50;
  min-width: 200px;
  max-width: 280px;
  background: rgba(20, 20, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  backdrop-filter: blur(10px);
}

#raisedHandsPanel.is-hidden {
  display: none !important;
}

.raised-hands-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin: 0 0 0.5rem;
}

#raisedHandsList {
  list-style: none;
  margin: 0;
  padding: 0;
}

.raised-hand-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

.conference-share-modal,
.conference-create-modal,
.conference-join-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 25000;
  background: rgba(0, 0, 0, 0.65);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.conference-share-modal.show,
.conference-create-modal.show,
.conference-join-modal.show {
  display: flex;
}

.conference-modal-card {
  background: var(--surface, #1c1c1e);
  border-radius: 18px;
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  color: var(--text, #fff);
}

.conference-modal-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.conference-modal-card input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  color: inherit;
  margin-bottom: 0.75rem;
}

.conference-type-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.conference-modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.conference-modal-actions button {
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.conference-btn-primary {
  background: #007aff;
  color: #fff;
}

.conference-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.conference-code-display {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-align: center;
  margin: 0.75rem 0;
}

.conference-link-row {
  display: flex;
  gap: 0.5rem;
}

.conference-link-row input {
  flex: 1;
  font-size: 0.8rem;
}

.sidebar-conference-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0.75rem 0.75rem;
}

.sidebar-conference-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem;
  border-radius: 12px;
  border: 1px dashed rgba(0, 122, 255, 0.45);
  background: rgba(0, 122, 255, 0.08);
  color: #4da3ff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.875rem;
}

.sidebar-conference-btn--join {
  border-style: solid;
  background: transparent;
  color: inherit;
  opacity: 0.9;
}
