/* enhance.css — surcouche non destructive (XP OS intro + FX légers) */

/* Layering propre */
:root {
  --intro-z: 20000;
  --fx-z: 15000;
}

/* On cache le bureau pendant l'intro (via class ajoutée en JS) */
html.is-booting #desktop {
  visibility: hidden;
}

/* Intro overlay full-screen */
#boot-intro {
  position: fixed;
  inset: 0;
  z-index: var(--intro-z);
  background: #000;
  color: #d6e7ff;
  font-family: Tahoma, Verdana, sans-serif;
  display: grid;
  place-items: center;
  overflow: hidden;
}

#boot-intro .boot-frame {
  width: min(920px, 92vw);
  padding: 28px 26px;
  border: 1px solid rgba(255,255,255,0.12);
  background: radial-gradient(1200px 500px at 50% 35%, rgba(40,120,255,0.12), rgba(0,0,0,0.92));
  box-shadow: 0 18px 60px rgba(0,0,0,0.75);
  border-radius: 10px;
}

/* “écran qui s’allume” : vignettage doux + glow discret */
#boot-intro::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(900px 500px at 50% 40%, rgba(100,170,255,0.10), rgba(0,0,0,0.95));
  filter: blur(0px);
  opacity: 1;
  pointer-events: none;
}

#boot-intro .boot-title {
  font-size: 14px;
  letter-spacing: 0.2px;
  color: rgba(214, 231, 255, 0.92);
  margin-bottom: 10px;
}

#boot-intro .boot-sub {
  font-size: 12px;
  color: rgba(214, 231, 255, 0.75);
  margin-bottom: 18px;
}

#boot-intro .boot-log {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(214, 231, 255, 0.86);
  height: 220px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
  padding: 12px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

#boot-intro .boot-progress {
  margin-top: 14px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

#boot-intro .boot-progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(120,190,255,0.20), rgba(120,190,255,0.85));
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(120,190,255,0.35);
}

/* CTA plein écran (pro, minimal) */
#boot-intro .boot-cta {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

#boot-intro .boot-cta .hint {
  font-size: 12px;
  color: rgba(214, 231, 255, 0.72);
}

#boot-intro .boot-cta button {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(214, 231, 255, 0.90);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

#boot-intro .boot-cta button:hover {
  filter: brightness(1.06);
}

/* Fade out intro */
#boot-intro.is-done {
  opacity: 0;
  transform: scale(1.01);
  transition: opacity 420ms ease, transform 420ms ease;
  pointer-events: none;
}

/* FX CRT légers sur le bureau (non sombre, non agressif) */
#desktop.fx-crt::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: var(--fx-z);
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,0.04),
      rgba(0,0,0,0.04) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: multiply;
  opacity: 0.22;
}

#desktop.fx-crt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: calc(var(--fx-z) - 1);
  background: radial-gradient(900px 520px at 50% 35%, rgba(255,255,255,0.10), transparent 60%);
  opacity: 0.40;
}

/* Optionnel : petite “respiration” au focus des fenêtres */
.window {
  will-change: transform;
}
.window.active {
  transform: translateZ(0);
}

/* Accessibilité / motion */
@media (prefers-reduced-motion: reduce) {
  #boot-intro.is-done {
    transition: none;
  }
}
