/* =========================================================
   RESET
   ========================================================= */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Courier New", monospace;
}

/* =========================================================
   BOOT SCREEN
   ========================================================= */
#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: "Courier New", monospace;
  transition: opacity 1s ease;
  cursor: pointer;
}
#boot-screen.hidden {
  opacity: 0;
  pointer-events: none;
}
.boot-logo {
  font-size: 42px;
  font-weight: bold;
  letter-spacing: 5px;
  margin-bottom: 40px;
}
#boot-text {
  width: 300px;
  text-align: left;
  font-size: 14px;
  line-height: 1.8;
}
.boot-progress {
  width: 300px;
  height: 18px;
  border: 2px solid white;
  margin-top: 20px;
}
#boot-progress-bar {
  width: 0%;
  height: 100%;
  background: white;
  transition: width 0.2s linear;
}
.boot-message {
  margin-top: 15px;
  font-size: 12px;
  color: #aaa;
}
#press-start {
  margin-top: 60px;
  font-size: 13px;
  animation: blink 1s infinite;
  display: none;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* =========================================================
   DESKTOP
   ========================================================= */
#desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: none;
}

/* =========================================================
   WALLPAPER
   ========================================================= */
#wallpaper {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #7e9db7, #b7c8d6);
  z-index: 0;
}

/* =========================================================
   MENU BAR
   ========================================================= */
#menu-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: linear-gradient(180deg, #f6f6f6 0%, #dcdcdc 100%);
  border-bottom: 1px solid #6b6b6b;
 /* box-shadow: 0 0 10px rgba(0, 255, 102, 0.35), 0 1px 0 rgba(255, 255, 255, 0.6) inset;*/
  font-family: "Chicago", "Charcoal", Arial, sans-serif;
  font-size: 13px;
}
.menu-left {
  display: flex;
  align-items: center;
  gap: 18px;
}
.apple-logo {
  font-size: 15px;
  color: #1f5c33;
  text-shadow: 0 0 6px rgba(0, 255, 102, 0.7);
}
.menu-right {
  display: flex;
  gap: 15px;
}
#clock {
  font-weight: bold;
  color: #12321d;
  /* text-shadow: 0 0 6px rgba(0, 255, 102, 0.55); */
}

/* =========================================================
   DESKTOP ICONS
   ========================================================= */
#desktop-icons {
  position: absolute;
  top: 50px;
  left: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.desktop-icon {
  width: 90px;
  text-align: center;
  color: #000;
  cursor: default;
  user-select: none;
}
.icon-image {
  width: 60px;
  height: 60px;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 42px;
}
.icon-label {
  margin-top: 5px;
  padding: 2px 4px;
  font-size: 12px;
}
.desktop-icon.selected .icon-label {
  background: #183c8c;
  color: white;
}

/* =========================================================
   ICÔNE PORTFOLIO PRO
   ========================================================= */
.professional-icon {
  margin-top: 15px;
  position: absolute;
  top: 300px;
  left: 730px;
  margin-top: 0;
}
.professional-icon .icon-image {
  font-size: 40px;
}
.professional-icon .icon-label {
  font-weight: bold;
}

/* =========================================================
   WINDOWS
   ========================================================= */
.window {
  position: absolute;
  z-index: 100;
  width: 460px;
  min-width: 320px;
  min-height: 250px;
  max-height: calc(100vh - 70px);
  display: none;
  resize: both;
  overflow: hidden;
  flex-direction: column;
  background: #ececec;
  border: 2px solid #444;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}
.window.active {
  display: flex;
}

/* =========================================================
   WINDOW BODY
   ========================================================= */
.window-body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  scrollbar-width: auto;
}
.title-bar {
  flex-shrink: 0;
}
.window.active .window-body {
  height: auto;
  overflow-y: auto;
}
.window-body h3 {
  margin-top: 0;
}
.window-body audio {
  width: 100%;
}
.window-body video {
  width: 100%;
  max-height: 300px;
  background: black;
}
.small-text {
  font-size: 11px;
  color: #555;
}

/* =========================================================
   CODE
   ========================================================= */
.code-box {
  padding: 15px;
  background: #111;
  color: #00ff66;
  overflow: auto;
  font-size: 12px;
}

/* =========================================================
   TEXT FILE WINDOWS (README / NOTES)
   ========================================================= */
.text-window-body {
  padding: 16px;
  background: #fdfdf7;
}
.text-file-content {
  margin: 0;
  font-family: "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================================================
   PORTFOLIO PRO
   ========================================================= */
.professional-window {
  width: 540px;
  max-height: 75vh;
}
.professional-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.professional-project {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 12px 8px;
  margin-bottom: 8px;
  border: 1px solid #888;
  background: #eeeeee;
  cursor: pointer;
}
.professional-project:hover {
  background: #ffffff;
}
.professional-project-icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.professional-project strong {
  display: block;
  margin-bottom: 5px;
}
.professional-project p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

/* =========================================================
   TASKBAR
   ========================================================= */
#taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 5px;
  background: linear-gradient(0deg, #dcdcdc 0%, #c0c0c0 100%);
  border-top: 1px solid #6b6b6b;
 /*  box-shadow: 0 0 10px rgba(0, 255, 102, 0.35), 0 -1px 0 rgba(255, 255, 255, 0.6) inset; */
}
#taskbar-text {
  flex: 1;
  font-size: 12px;
}
#taskbar-clock {
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
  border: 1px inset #777;
  background: #ddd;
  color: #12321d;
  text-shadow: 0 0 6px rgba(0, 255, 102, 0.55);
}
#start-button {
  transition: box-shadow 0.15s ease;
}
#start-button:hover {
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.7);
}

/* =========================================================
   CRT EFFECT
   ========================================================= */
#crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.08) 3px
  );
  opacity: 0.35;
}

/* =========================================================
   BOUTONS DE FENÊTRE
   ========================================================= */
.maximize-button {
  min-width: 16px;
  width: 16px;
  height: 16px;
  padding: 0;
  font-family: Arial, sans-serif;
  font-size: 11px;
  line-height: 12px;
  cursor: pointer;
}
.window.maximized {
  resize: none;
  max-height: none;
}
.window.maximized .window-body {
  min-height: 0;
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 700px) {
  .window {
    width: 90vw;
    left: 5vw !important;
    top: 80px !important;
  }
  .professional-window {
    width: 90vw;
  }
  #desktop-icons {
    display: grid;
    grid-template-columns: repeat(2, 90px);
  }
  .menu-left span {
    display: none;
  }
}

/* =========================================================
   IMAGE FORMATS (utilisées dans du texte libre)
   ========================================================= */
/*.project-images img {
  width: 60%;
  height: auto;
}
.image-large {
  width: 100%;
  height: auto;
}
.image-medium {
  width: 70%;
  height: auto;
}
.image-small {
  width: 40%;
  height: auto;
} */

/* =========================================================
   IMAGE VIEWER
   ========================================================= */
.image-viewer-window {
  width: 600px;
  height: 450px;
  min-width: 320px;
  min-height: 250px;
}
.image-viewer-body {
  padding: 0;
  background: #222;
  display: flex;
  flex-direction: column;
}
.window.active .image-viewer-body {
  overflow: hidden;
}
.viewer-stage {
  position: relative;
  flex: 1;
  min-height: 0;
}
.image-viewer-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 52px;
}
.viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 34px;
  height: 56px;
  padding: 0;
  font-size: 16px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid #888;
  cursor: pointer;
}
.viewer-arrow:hover {
  background: rgba(0, 0, 0, 0.85);
  border-color: #00ff66;
}
.viewer-arrow-prev {
  left: 8px;
}
.viewer-arrow-next {
  right: 8px;
}
.viewer-counter {
  flex-shrink: 0;
  padding: 4px 8px;
  font-size: 11px;
  text-align: center;
  color: #aaa;
  background: #1a1a1a;
  border-top: 1px solid #333;
}
.image-viewer-content img,
.image-viewer-content video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* =========================================================
   IMAGE GALLERY
   ========================================================= */
.image-gallery-window {
  width: 520px;
  height: 400px;
  min-width: 360px;
  min-height: 250px;
}
.image-gallery-body {
  padding: 12px;
  overflow-y: auto;
}
.image-gallery-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
}
.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border: 1px solid transparent;
  cursor: default;
  user-select: none;
}
.gallery-item:hover {
  border: 1px dotted #000;
  background: #ffffff;
}
.gallery-item-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}
.gallery-item-name {
  width: 100%;
  margin-top: 6px;
  font-size: 11px;
  text-align: center;
  word-break: break-word;
}
.gallery-empty,
.folder-empty {
  font-size: 12px;
  color: #666;
  padding: 10px 4px;
}

/* =========================================================
   PLAYLIST (MUSIC / VJ / LIVECODING AUDIO & VIDEO)
   ========================================================= */
.playlist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}
.playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid transparent;
  cursor: default;
  user-select: none;
}
.playlist-item:hover {
  border: 1px dotted #000;
  background: #ffffff;
}
.playlist-item.selected {
  background: #dfe8f5;
  border: 1px solid #7d9dc7;
}
.playlist-item.playing {
  background: #183c8c;
  border-color: #183c8c;
  color: #fff;
}
.playlist-item-icon {
  width: 16px;
  text-align: center;
  color: #2a6b3f;
}
.playlist-item.playing .playlist-item-icon {
  color: #7dffa8;
}
.playlist-item-name {
  flex: 1;
  word-break: break-word;
}
.playlist-empty {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}
#music-audio-player,
#livecoding-audio-player {
  width: 100%;
  margin-top: 4px;
}
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.thumb-grid img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border: 1px solid #444;
  cursor: default;
  user-select: none;
}
.thumb-grid img:hover {
  border-color: #00ff66;
}

/* =========================================================
   LIVECODING — faux éditeur de code + sections
   ========================================================= */
.livecoding-window {
  width: 560px;
}
.livecoding-window .window-body {
  padding: 14px;
}
.fake-editor {
  background: #111;
  border: 1px solid #333;
  overflow: hidden;
  margin-bottom: 10px;
}
.fake-editor-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #1c1c1c;
  border-bottom: 1px solid #333;
}
.fake-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.fake-dot-red {
  background: #ff5f56;
}
.fake-dot-yellow {
  background: #ffbd2e;
}
.fake-dot-green {
  background: #27c93f;
}
.fake-editor-filename {
  margin-left: 10px;
  font-size: 11px;
  color: #999;
}
.fake-editor .code-box {
  margin: 0;
  background: #111;
}
.livecoding-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #999;
}
.livecoding-section h4 {
  margin: 0 0 4px 0;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* =========================================================
   PROJECT FOLDER (README / NOTES / IMAGES / DOCUMENTS)
   ========================================================= */
.project-folder-body {
  padding: 15px;
  overflow: auto;
}
.project-folder {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 20px;
  align-items: start;
}
.project-file {
  width: 100px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid transparent;
  cursor: default;
  user-select: none;
}
.project-file:hover {
  border: 1px dotted #000;
  background: #ffffff;
}
.project-file-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}
.project-file-name {
  width: 100%;
  margin-top: 6px;
  font-size: 11px;
  text-align: center;
  word-break: break-word;
}
