/* === WINDOWS 95 AUTHENTIQUE — SITE-21 === */

@font-face {
  font-family: 'W95FA';
  src: url('https://cdn.jsdelivr.net/gh/pyakotech/w95fa@main/w95fa.woff2') format('woff2');
  font-display: swap;
}

:root {
  --w95-gray: #c0c0c0;
  --w95-gray-light: #dfdfdf;
  --w95-gray-lighter: #ffffff;
  --w95-gray-dark: #808080;
  --w95-gray-darker: #404040;
  --w95-black: #000000;
  --w95-blue: #000080;
  --w95-blue-light: #1084d0;
  --w95-teal: #008080;
  --w95-red: #7f0000;
  --w95-red-bright: #b40000;
  --w95-yellow: #ffff80;
  --w95-selected: #000080;
  --w95-text: #000000;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
  image-rendering: pixelated;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'W95FA', 'Microsoft Sans Serif', 'MS Sans Serif', Tahoma, Geneva, sans-serif;
  font-size: 11px;
  color: var(--w95-text);
  background: var(--w95-teal);
  user-select: none;
  cursor: default;
}

#root {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* === BUREAU === */
.desktop {
  position: absolute;
  inset: 0;
  background: var(--w95-teal);
  overflow: hidden;
}

.desktop-icons {
  position: absolute;
  top: 8px;
  left: 8px;
  bottom: 80px; /* laisse la place à la taskbar + crédits + marge */
  right: 8px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  z-index: 1;
  pointer-events: none;
}
.desktop-icon { pointer-events: auto; }

.desktop-icon {
  width: 80px;
  padding: 4px;
  text-align: center;
  cursor: pointer;
  border: 1px dotted transparent;
}
.desktop-icon:hover { }
.desktop-icon.selected {
  background: rgba(0,0,128,0.4);
  border: 1px dotted #ffffff;
}
.desktop-icon .icon-img {
  width: 40px;
  height: 40px;
  margin: 0 auto 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.desktop-icon .icon-label {
  color: white;
  font-size: 11px;
  text-shadow: 1px 1px 0 #000;
  line-height: 1.1;
  word-wrap: break-word;
}
.desktop-icon.selected .icon-label {
  background: var(--w95-blue);
  padding: 1px 2px;
}

/* === FENÊTRES === */
.window {
  position: absolute;
  background: var(--w95-gray);
  border-top: 2px solid var(--w95-gray-lighter);
  border-left: 2px solid var(--w95-gray-lighter);
  border-right: 2px solid var(--w95-gray-darker);
  border-bottom: 2px solid var(--w95-gray-darker);
  box-shadow: 1px 1px 0 var(--w95-black);
  display: flex;
  flex-direction: column;
  min-width: 200px;
  min-height: 100px;
}

.window-titlebar {
  background: linear-gradient(90deg, var(--w95-blue) 0%, var(--w95-blue-light) 100%);
  color: white;
  padding: 2px 2px 2px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: bold;
  font-size: 11px;
  height: 20px;
  flex-shrink: 0;
  cursor: move;
}
.window.inactive .window-titlebar {
  background: linear-gradient(90deg, var(--w95-gray-dark) 0%, #b5b5b5 100%);
}
.window.classified .window-titlebar {
  background: linear-gradient(90deg, var(--w95-red) 0%, var(--w95-red-bright) 100%);
}
.window-title {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.window-title-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.window-controls {
  display: flex;
  gap: 2px;
}
.window-btn {
  width: 16px;
  height: 14px;
  background: var(--w95-gray);
  border-top: 1px solid var(--w95-gray-lighter);
  border-left: 1px solid var(--w95-gray-lighter);
  border-right: 1px solid var(--w95-gray-darker);
  border-bottom: 1px solid var(--w95-gray-darker);
  color: black;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-family: inherit;
}
.window-btn:active {
  border-top: 1px solid var(--w95-gray-darker);
  border-left: 1px solid var(--w95-gray-darker);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
}

.window-menubar {
  display: flex;
  gap: 0;
  padding: 1px 2px;
  border-bottom: 1px solid var(--w95-gray-dark);
  background: var(--w95-gray);
  flex-shrink: 0;
}
.menu-item {
  padding: 2px 8px;
  cursor: pointer;
  font-size: 11px;
}
.menu-item:hover {
  background: var(--w95-blue);
  color: white;
}

.window-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 2px;
  min-height: 0; /* CRUCIAL pour que les enfants flex puissent scroller */
  min-width: 0;
}

/* === FIX GLOBAL : tous les enfants flex dans une fenêtre doivent pouvoir scroller === */
.window-body > * { min-height: 0; min-width: 0; }
.window-body .split-h,
.window-body .split-v {
  min-height: 0;
  min-width: 0;
}
.window-body .split-h > *,
.window-body .split-v > * {
  min-height: 0;
  min-width: 0;
}
.window-body .list-view { min-height: 0; }
.window-body .inset-box { min-height: 0; min-width: 0; }

.window-statusbar {
  border-top: 1px solid var(--w95-gray-lighter);
  padding: 2px 4px;
  font-size: 11px;
  color: var(--w95-gray-darker);
  flex-shrink: 0;
  display: flex;
  gap: 8px;
}
.status-cell {
  border-top: 1px solid var(--w95-gray-dark);
  border-left: 1px solid var(--w95-gray-dark);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
  padding: 1px 6px;
  min-width: 60px;
}

/* === CONTAINERS === */
.inset-box {
  background: white;
  border-top: 1px solid var(--w95-gray-dark);
  border-left: 1px solid var(--w95-gray-dark);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
  padding: 4px;
  overflow: auto;
}
.inset-box.no-white { background: var(--w95-gray); }

.group-box {
  border-top: 1px solid var(--w95-gray-dark);
  border-left: 1px solid var(--w95-gray-dark);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
  padding: 8px;
  margin: 4px 0;
  position: relative;
}
.group-box legend {
  position: absolute;
  top: -7px;
  left: 8px;
  background: var(--w95-gray);
  padding: 0 4px;
  font-size: 11px;
}

/* === BOUTONS === */
.btn {
  background: var(--w95-gray);
  border-top: 1px solid var(--w95-gray-lighter);
  border-left: 1px solid var(--w95-gray-lighter);
  border-right: 1px solid var(--w95-gray-darker);
  border-bottom: 1px solid var(--w95-gray-darker);
  box-shadow: inset 1px 1px 0 var(--w95-gray-light), inset -1px -1px 0 var(--w95-gray-dark);
  padding: 3px 12px;
  font-family: inherit;
  font-size: 11px;
  color: black;
  cursor: pointer;
  min-width: 70px;
  min-height: 22px;
}
.btn:focus {
  outline: 1px dotted black;
  outline-offset: -4px;
}
.btn:active {
  border-top: 1px solid var(--w95-gray-darker);
  border-left: 1px solid var(--w95-gray-darker);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
  box-shadow: inset 1px 1px 0 var(--w95-gray-dark), inset -1px -1px 0 var(--w95-gray-light);
  padding: 4px 11px 2px 13px;
}
.btn:disabled {
  color: var(--w95-gray-dark);
  text-shadow: 1px 1px 0 var(--w95-gray-lighter);
  cursor: not-allowed;
}
.btn.small { padding: 1px 6px; min-width: 40px; min-height: 18px; }

/* === INPUTS === */
input[type="text"], input[type="password"], input[type="number"], textarea, select {
  background: white;
  border-top: 1px solid var(--w95-gray-dark);
  border-left: 1px solid var(--w95-gray-dark);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
  padding: 2px 4px;
  font-family: inherit;
  font-size: 11px;
  color: black;
  outline: none;
}
textarea { resize: vertical; }
select {
  background: white url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='9' height='6'><polygon points='0,0 9,0 4.5,6' fill='black'/></svg>") no-repeat right 4px center;
  padding-right: 20px;
  appearance: none;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0;
}
.field-row label { font-size: 11px; }

/* === LISTES === */
.list-view {
  background: white;
  border-top: 1px solid var(--w95-gray-dark);
  border-left: 1px solid var(--w95-gray-dark);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
  overflow: auto;
  flex: 1;
}
.list-item {
  padding: 2px 6px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
}
.list-item:hover { background: #e0e0e0; }
.list-item.selected {
  background: var(--w95-selected);
  color: white;
}
.list-item.selected .badge { border-color: white; }

.list-header {
  display: grid;
  background: var(--w95-gray);
  border-bottom: 1px solid var(--w95-gray-dark);
  position: sticky;
  top: 0;
  z-index: 1;
}
.list-header-cell {
  padding: 3px 6px;
  border-right: 1px solid var(--w95-gray-lighter);
  border-top: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-darker);
  font-size: 11px;
  font-weight: normal;
  cursor: pointer;
}
.list-row {
  display: grid;
  padding: 2px 0;
  cursor: pointer;
  font-size: 11px;
  border-bottom: 1px dotted #d8d8d8;
}
.list-row:hover { background: #eaeaea; }
.list-row.selected {
  background: var(--w95-selected);
  color: white;
}
.list-row-cell {
  padding: 1px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === BADGES CLASSE === */
.badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: bold;
  color: white;
  border: 1px solid rgba(0,0,0,0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Courier New', monospace;
}

/* === BARRE DES TÂCHES === */
.taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--w95-gray);
  border-top: 2px solid var(--w95-gray-lighter);
  display: flex;
  align-items: center;
  padding: 2px;
  gap: 3px;
  z-index: 9999;
}
.start-btn {
  background: var(--w95-gray);
  border-top: 1px solid var(--w95-gray-lighter);
  border-left: 1px solid var(--w95-gray-lighter);
  border-right: 1px solid var(--w95-gray-darker);
  border-bottom: 1px solid var(--w95-gray-darker);
  box-shadow: inset 1px 1px 0 var(--w95-gray-light), inset -1px -1px 0 var(--w95-gray-dark);
  padding: 2px 6px 2px 4px;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}
.start-btn.active,
.start-btn:active {
  border-top: 1px solid var(--w95-gray-darker);
  border-left: 1px solid var(--w95-gray-darker);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
  box-shadow: inset 1px 1px 0 var(--w95-gray-dark);
}
.start-logo {
  width: 16px;
  height: 16px;
}

.taskbar-divider {
  width: 2px;
  height: 22px;
  border-left: 1px solid var(--w95-gray-dark);
  border-right: 1px solid var(--w95-gray-lighter);
  margin: 0 2px;
}

.task-list {
  flex: 1;
  display: flex;
  gap: 3px;
  overflow: hidden;
  align-items: center;
}
.task-btn {
  background: var(--w95-gray);
  border-top: 1px solid var(--w95-gray-lighter);
  border-left: 1px solid var(--w95-gray-lighter);
  border-right: 1px solid var(--w95-gray-darker);
  border-bottom: 1px solid var(--w95-gray-darker);
  padding: 2px 8px;
  height: 22px;
  min-width: 140px;
  max-width: 180px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: inherit;
}
.task-btn.active {
  border-top: 1px solid var(--w95-gray-darker);
  border-left: 1px solid var(--w95-gray-darker);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
  background-image: linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%),
                    linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%);
  background-size: 4px 4px;
  background-position: 0 0, 2px 2px;
}

.systray {
  border-top: 1px solid var(--w95-gray-dark);
  border-left: 1px solid var(--w95-gray-dark);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
  padding: 2px 8px;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

/* === MENU DÉMARRER === */
.start-menu {
  position: absolute;
  bottom: 28px;
  left: 2px;
  width: 220px;
  background: var(--w95-gray);
  border-top: 2px solid var(--w95-gray-lighter);
  border-left: 2px solid var(--w95-gray-lighter);
  border-right: 2px solid var(--w95-gray-darker);
  border-bottom: 2px solid var(--w95-gray-darker);
  box-shadow: 1px 1px 0 black;
  z-index: 10000;
  display: flex;
}
.start-menu-side {
  width: 24px;
  background: linear-gradient(180deg, var(--w95-red) 0%, #400000 100%);
  color: white;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  text-align: left;
  padding: 6px 4px;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  font-family: 'Arial', sans-serif;
}
.start-menu-side .accent { color: #ff6060; }
.start-menu-items {
  flex: 1;
  padding: 2px;
}
.start-menu-item {
  padding: 6px 12px 6px 40px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.start-menu-item:hover {
  background: var(--w95-blue);
  color: white;
}
.start-menu-item .sm-icon {
  position: absolute;
  left: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.start-menu-divider {
  height: 1px;
  background: var(--w95-gray-dark);
  border-bottom: 1px solid var(--w95-gray-lighter);
  margin: 3px 0;
}

/* === BOOT SCREEN === */
.boot-screen {
  position: fixed;
  inset: 0;
  background: black;
  color: white;
  font-family: 'Courier New', monospace;
  padding: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.boot-logo-area {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}
.boot-logo-area img { width: 80px; height: 80px; }
.boot-title { font-size: 14px; line-height: 1.6; }
.boot-title .accent { color: #b40000; }
.boot-line { font-size: 12px; line-height: 1.5; }
.boot-line.ok { color: #6ac26a; }
.boot-line.warn { color: #ffcc00; }
.boot-line.err { color: #ff5555; }
.boot-bar {
  margin-top: 12px;
  border: 1px solid #666;
  height: 14px;
  width: 300px;
  padding: 1px;
}
.boot-bar-fill {
  background: linear-gradient(90deg, #b40000 0%, #ff4040 100%);
  height: 100%;
  transition: width 0.15s linear;
}

/* === LOGIN === */
.login-backdrop {
  position: fixed;
  inset: 0;
  background: var(--w95-teal);
  z-index: 90000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}
.login-window { width: 380px; }
.login-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 8px 12px 4px;
}
.login-header img { width: 48px; height: 48px; }
.login-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: bold;
}
.login-header p { margin: 2px 0 0; font-size: 11px; color: #303030; }
.login-form { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.login-error {
  background: #ffdcdc;
  border: 1px solid #a00;
  padding: 4px 8px;
  font-size: 11px;
  color: #700;
}
.login-hint {
  margin-top: 8px;
  padding: 6px 8px;
  background: #ffffcc;
  border: 1px solid #999966;
  font-size: 10px;
  color: #333;
  font-family: 'Courier New', monospace;
  line-height: 1.5;
}

/* === CONFIDENTIEL WATERMARK === */
.classified-stamp {
  position: absolute;
  border: 3px solid var(--w95-red-bright);
  color: var(--w95-red-bright);
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 20px;
  padding: 4px 10px;
  transform: rotate(-8deg);
  opacity: 0.5;
  pointer-events: none;
  letter-spacing: 2px;
  background: rgba(255,255,255,0.5);
}

/* === CONTENU DOCS === */
.doc-content {
  padding: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: black;
  background: white;
}
.doc-content h1 {
  font-size: 16px;
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid black;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.doc-content h2 {
  font-size: 13px;
  font-weight: bold;
  margin: 12px 0 4px;
  text-transform: uppercase;
  color: var(--w95-red);
  border-bottom: 1px solid #ccc;
}
.doc-content p { margin: 4px 0; text-align: justify; }
.doc-meta {
  background: #f0f0f0;
  border: 1px solid #ccc;
  padding: 6px 8px;
  margin: 6px 0 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 12px;
  font-size: 11px;
}
.doc-meta strong { color: var(--w95-red); }
.doc-header-stripe {
  background: repeating-linear-gradient(
    -45deg,
    #000 0px, #000 12px,
    #ffd700 12px, #ffd700 24px
  );
  height: 10px;
  margin: 0 -8px 8px;
}

/* === SPLIT PANE === */
.split-h {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 2px;
}
.split-v {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  gap: 2px;
}

/* === TOOLBAR === */
.toolbar {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--w95-gray);
  border-bottom: 1px solid var(--w95-gray-dark);
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar-btn {
  background: var(--w95-gray);
  border: 1px solid transparent;
  padding: 3px 6px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.toolbar-btn:hover {
  border-top: 1px solid var(--w95-gray-lighter);
  border-left: 1px solid var(--w95-gray-lighter);
  border-right: 1px solid var(--w95-gray-darker);
  border-bottom: 1px solid var(--w95-gray-darker);
}
.toolbar-btn:active {
  border-top: 1px solid var(--w95-gray-darker);
  border-left: 1px solid var(--w95-gray-darker);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
}
.toolbar-separator {
  width: 2px;
  height: 20px;
  border-left: 1px solid var(--w95-gray-dark);
  border-right: 1px solid var(--w95-gray-lighter);
  margin: 0 2px;
}

/* === CHECKBOX / RADIO === */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 0;
}
.w95-check {
  width: 13px;
  height: 13px;
  background: white;
  border-top: 1px solid var(--w95-gray-dark);
  border-left: 1px solid var(--w95-gray-dark);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  font-weight: bold;
}

/* === DIALOG === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.15);
  z-index: 50000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: auto;
}
.modal-backdrop > .window {
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}
.modal-backdrop > .window > .window-body {
  overflow: auto;
  max-height: calc(100vh - 80px);
}

/* === DANGER METER === */
.danger-meter {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: black;
  border: 1px inset var(--w95-gray);
}
.danger-cell {
  width: 12px;
  height: 12px;
  background: #400;
}
.danger-cell.on { background: var(--w95-red-bright); box-shadow: 0 0 4px #f00 inset; }

/* === CRT SCANLINES (subtile) === */
.crt-effect::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.03) 0px,
    rgba(0,0,0,0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 999999;
}

/* === SCROLLBARS Win95 === */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track {
  background:
    linear-gradient(45deg, transparent 48%, var(--w95-gray-lighter) 48% 52%, transparent 52%),
    repeating-linear-gradient(45deg, #d0d0d0 0 2px, #b0b0b0 2px 4px);
  background: #d0d0d0;
}
::-webkit-scrollbar-thumb {
  background: var(--w95-gray);
  border-top: 1px solid var(--w95-gray-lighter);
  border-left: 1px solid var(--w95-gray-lighter);
  border-right: 1px solid var(--w95-gray-darker);
  border-bottom: 1px solid var(--w95-gray-darker);
  box-shadow: inset 1px 1px 0 var(--w95-gray-light);
}
::-webkit-scrollbar-button {
  background: var(--w95-gray);
  border-top: 1px solid var(--w95-gray-lighter);
  border-left: 1px solid var(--w95-gray-lighter);
  border-right: 1px solid var(--w95-gray-darker);
  border-bottom: 1px solid var(--w95-gray-darker);
  display: block;
  height: 16px;
  width: 16px;
}

/* === PULSE EN COURS (badge événement live) === */
@keyframes pulse-ongoing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 122, 45, 0.5); opacity: 1; }
  50% { box-shadow: 0 0 0 4px rgba(45, 122, 45, 0); opacity: 0.85; }
}

/* === SPLASH SCREEN CHARGEMENT === */
.splash-screen {
  position: fixed;
  inset: 0;
  background: var(--w95-teal);
  background-image: url(../assets/wallpaper-site21.png);
  background-size: cover;
  z-index: 200000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  animation: splash-fade 0.3s;
}
@keyframes splash-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.splash-screen.exiting {
  animation: splash-out 0.3s forwards;
}
@keyframes splash-out {
  to { opacity: 0; }
}

.splash-window {
  background: var(--w95-gray);
  border-top: 2px solid var(--w95-gray-lighter);
  border-left: 2px solid var(--w95-gray-lighter);
  border-right: 2px solid var(--w95-gray-darker);
  border-bottom: 2px solid var(--w95-gray-darker);
  box-shadow: 2px 2px 0 black;
  padding: 20px 32px;
  text-align: center;
  min-width: 340px;
}
.splash-window img { width: 72px; height: 72px; margin: 0 auto 8px; display: block; }

/* === SPINNER (chargement) === */
.w95-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--w95-gray-dark);
  border-top-color: var(--w95-red);
  border-radius: 50%;
  animation: w95-spin 0.6s linear infinite;
}
@keyframes w95-spin { to { transform: rotate(360deg); } }

.hourglass {
  display: inline-block;
  animation: hourglass-flip 1s steps(2, end) infinite;
}
@keyframes hourglass-flip {
  0%, 50% { transform: rotate(0deg); }
  51%, 100% { transform: rotate(180deg); }
}

/* === ANIMATION OUVERTURE FENÊTRE (zoom depuis coin) === */
@keyframes win95-open {
  0% {
    transform: scale(0.02);
    transform-origin: var(--anim-origin-x, 40px) var(--anim-origin-y, 100vh);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    transform-origin: var(--anim-origin-x, 40px) var(--anim-origin-y, 100vh);
    opacity: 1;
  }
}
.window.opening {
  animation: win95-open 0.22s ease-out;
}

@keyframes win95-close {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.02); opacity: 0; }
}
.window.closing {
  animation: win95-close 0.15s ease-in forwards;
  transform-origin: var(--anim-origin-x, 40px) var(--anim-origin-y, 100vh);
}

/* === ECRAN DE CHARGEMENT APP === */
.app-loader {
  position: absolute;
  inset: 0;
  background: var(--w95-gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 50;
}
.app-loader-bar {
  width: 220px;
  height: 20px;
  border-top: 1px solid var(--w95-gray-dark);
  border-left: 1px solid var(--w95-gray-dark);
  border-right: 1px solid var(--w95-gray-lighter);
  border-bottom: 1px solid var(--w95-gray-lighter);
  padding: 1px;
  background: white;
  display: flex;
  gap: 1px;
}
.app-loader-cell {
  width: 12px;
  background: var(--w95-blue);
  animation: loader-cell 0.9s ease-in-out infinite;
}

/* === ZOOM ANIMATION ICONS === */
.desktop-icon {
  transition: transform 0.08s;
}
.desktop-icon:active { transform: scale(0.95); }

/* === UTILITY === */
.text-red { color: var(--w95-red); }
.text-mono { font-family: 'Courier New', monospace; }
.bold { font-weight: bold; }
.center { text-align: center; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.p-8 { padding: 8px; }
.flex { display: flex; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.flex-1 { flex: 1; }
