/* ==========================================================================
   MODE PLEIN ÉCRAN — Présentation immersive
   Fond sombre, bouton Settings rond, bandeau glassmorphism, voile maquette
   ========================================================================== */

/* ---------- ACTIVATION DU MODE ---------- */

.is-fullscreen .sidebar,
.is-fullscreen .workspace__topbar,
.is-fullscreen .launch-demo-btn,
.is-fullscreen .fullscreen-btn,
.is-fullscreen .sidebar-reopen-btn,
.is-fullscreen .demo-bar {
  display: none !important;
}

.is-fullscreen .workspace {
  background: var(--color-fs-bg, #0A0F1A);
}

.is-fullscreen .workspace__stage {
  padding: var(--space-2);
  transition: padding-bottom var(--dur-slow) var(--ease-out);
}

/* En plein écran, on masque la topbar du stage (label + switcher de support).
   La maquette doit occuper tout l'espace pour l'effet spotlight. */
.is-fullscreen .stage-topbar {
  display: none;
}

/* Quand la barre est ouverte, laisser la place en bas : la zone utile diminue,
   la maquette se recentre naturellement via le rescale JS */
.is-fullscreen.is-fs-bar-open .workspace__stage {
  padding-bottom: calc(80px + var(--space-6));
}

.is-fullscreen .frame {
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* ---------- BOUTON SETTINGS (rond glassmorphism) ---------- */

.fs-settings-btn {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur-base) var(--ease-out);
}

.fs-settings-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Visible uniquement en plein écran, bandeau fermé */
.is-fullscreen .fs-settings-btn {
  opacity: 1;
  pointer-events: auto;
}

.is-fullscreen.is-fs-bar-open .fs-settings-btn {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

/* ---------- BOUTON CROIX (quitter plein écran) ---------- */

.fs-close-btn {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur-base) var(--ease-out);
}

.fs-close-btn:hover {
  background: rgba(187, 58, 10, 0.3);
  border-color: rgba(187, 58, 10, 0.5);
  color: #fff;
  transform: scale(1.06) rotate(90deg);
}

.is-fullscreen .fs-close-btn {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- VOILE SOMBRE SUR LA MAQUETTE ---------- */

.fs-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  transition: opacity var(--dur-base) var(--ease-out);
  cursor: pointer;
}

.is-fullscreen.is-fs-bar-open .fs-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- BANDEAU DE CONTRÔLES (glassmorphism) ---------- */

.fs-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 80px;
  padding: var(--space-4) var(--space-8);
  background: rgba(18, 24, 36, 0.75);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  color: rgba(255, 255, 255, 0.9);
  z-index: 60;
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
}

.is-fullscreen.is-fs-bar-open .fs-bar {
  transform: translateY(0);
}

/* Colonne gauche : numéro + titre écran */
.fs-bar__screen {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 260px;
  flex-shrink: 0;
}

.fs-bar__screen-num {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-2xl);
  line-height: 1;
  color: var(--color-primary-light);
  letter-spacing: -1px;
}

.fs-bar__screen-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fs-bar__screen-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: var(--fw-semibold);
}

.fs-bar__screen-title {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: #fff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

/* Séparateur vertical */
.fs-bar__divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

/* Colonne centrale : contexte (démo ou profil) */
.fs-bar__context {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.fs-bar__context-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: var(--fw-semibold);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.fs-bar__context-value {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-bar__context-value--italic {
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
}

.fs-bar__profile-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 12px;
  background: rgba(74, 144, 226, 0.18);
  border: 1px solid rgba(74, 144, 226, 0.4);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: #fff;
  width: fit-content;
}

/* Colonne droite : contrôles */
.fs-bar__controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.fs-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--dur-fast) var(--ease-out);
}

.fs-ctrl-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.fs-ctrl-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.fs-ctrl-btn--icon {
  width: 40px;
  padding: 0;
}

.fs-ctrl-btn--primary {
  background: rgba(74, 144, 226, 0.35);
  border-color: rgba(74, 144, 226, 0.5);
}

.fs-ctrl-btn--primary:hover:not(:disabled) {
  background: rgba(74, 144, 226, 0.55);
  border-color: rgba(74, 144, 226, 0.7);
}

.fs-ctrl-btn--close {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-left: var(--space-2);
}

.fs-ctrl-btn--close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   RESPONSIVE — quand le viewport est étroit
   ========================================================================== */

@media (max-width: 900px) {
  .fs-bar {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
  }

  .fs-bar__screen {
    min-width: 180px;
  }

  .fs-bar__screen-title {
    max-width: 160px;
  }

  .fs-bar__context {
    display: none;
  }
}
