/* ---------- Faux OS ---------- */
.laptop {
  width: min(1120px, 96vw); height: min(700px, calc(100vh - 120px)); margin-top: 40px;
  background: linear-gradient(#2a2d33, #16181c); border-radius: 18px; padding: 14px 14px 18px;
  box-shadow: 0 30px 80px #000d, inset 0 0 0 1px #ffffff14;
}
.os {
  width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; border-radius: 4px;
  font: 13px/1.4 "Segoe UI", system-ui, sans-serif; color: #1b1b1b; user-select: none;
}
.os-desktop {
  flex: 1; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 75% 30%, #3f6ea855 0, #0000 55%),
    radial-gradient(ellipse at 20% 80%, #6b3f8a44 0, #0000 50%),
    linear-gradient(135deg, #10203d, #1b3358 55%, #0d1a30);
}
.os-icons { position: absolute; top: 12px; left: 10px; display: flex; flex-direction: column; gap: 6px; }
.os-icon {
  width: 86px; padding: 6px 4px; background: none; border: 1px solid transparent; border-radius: 6px;
  color: #fff; font: inherit; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; text-shadow: 0 1px 3px #000;
}
.os-icon:hover { background: #ffffff22; border-color: #ffffff33; }
.os-icon .ico { font-size: 30px; line-height: 1; }
.os-splash {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 999;
  background: #10203d; color: #fff; font-size: 28px; font-weight: 300; animation: os-splash 1.8s forwards;
}
@keyframes os-splash { 0%, 65% { opacity: 1; } 100% { opacity: 0; } }

.os-taskbar {
  height: 40px; display: flex; align-items: center; gap: 6px; padding: 0 8px;
  background: #e9edf3ee; border-top: 1px solid #fff8;
}
.os-start { width: 32px; height: 32px; display: grid; place-items: center; font-size: 18px; color: #2a62c9; }
.os-tasks { flex: 1; display: flex; gap: 4px; overflow: hidden; }
.os-task {
  max-width: 180px; padding: 5px 10px; border: none; border-radius: 6px; background: #0000000d;
  font: inherit; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.os-task.active { background: #ffffffcc; border-bottom-color: #2a62c9; }
.os-tray { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.os-close { border: none; background: #c42b1c; color: #fff; border-radius: 6px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer; }

.os-win {
  position: absolute; display: flex; flex-direction: column; min-width: 260px; min-height: 140px;
  background: #f5f6f8; border-radius: 8px; border: 1px solid #0003; box-shadow: 0 12px 40px #0008; overflow: hidden;
}
.os-titlebar { height: 32px; flex: none; display: flex; align-items: center; justify-content: space-between; padding-left: 10px; background: #e6e9ee; cursor: move; }
.os-wtitle { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-wbtns button { width: 40px; height: 32px; border: none; background: none; font-size: 12px; cursor: pointer; }
.os-wbtns button:hover { background: #0000001a; }
.os-wbtns button[data-act=close]:hover { background: #c42b1c; color: #fff; }
.os-wbody { flex: 1; overflow: auto; position: relative; user-select: text; }
.os-empty { padding: 30px; text-align: center; color: #666; }
.os-notes { width: 100%; height: 100%; border: none; resize: none; padding: 12px; font: 14px/1.5 Consolas, monospace; background: #fff; outline: none; }

/* Navigateur */
.br { height: 100%; display: flex; flex-direction: column; }
.br-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; background: #f0f2f5; border-bottom: 1px solid #ddd; }
.br-nav { width: 26px; text-align: center; color: #555; cursor: default; }
.br-reload { cursor: pointer; }
.br-url { flex: 1; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #ccd; border-radius: 16px; padding: 3px 10px; }
.br-input { flex: 1; border: none; outline: none; font: 13px "Segoe UI", sans-serif; background: none; }
.br-page { flex: 1; overflow: auto; background: #fff; }
.br-error { padding: 50px 30px; text-align: center; color: #444; }
.br-error-ico { font-size: 40px; }

/* Faux site NuageMaison */
.nm { min-height: 100%; background: linear-gradient(160deg, #e8f1ff, #f7f9ff); display: flex; justify-content: center; align-items: flex-start; padding: 30px 16px; }
.nm-card { width: 320px; background: #fff; border-radius: 12px; box-shadow: 0 6px 30px #1d3b7022; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.nm-logo { font-size: 22px; font-weight: 700; color: #2457b3; }
.nm-sub { margin: 0 0 6px; color: #667; font-size: 12px; }
.nm-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #445; }
.nm-card input { padding: 8px 10px; border: 1px solid #cdd5e3; border-radius: 6px; font: inherit; font-size: 14px; }
.nm-btn { padding: 9px; border: none; border-radius: 6px; background: #2457b3; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.nm-btn:disabled { background: #8aa1c9; cursor: wait; }
.nm-msg { font-size: 12px; min-height: 16px; color: #556; }
.nm-msg.err { color: #c42b1c; }
.nm-forgot { font-size: 12px; color: #2457b3; }
.nm-files { flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 16px 24px; }
.nm-top { display: flex; justify-content: space-between; color: #2457b3; border-bottom: 1px solid #d5deef; padding-bottom: 8px; }
.nm-list { list-style: none; padding: 0; margin: 0 0 12px; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px #1d3b7015; }
.nm-list li { padding: 9px 12px; border-bottom: 1px solid #eef1f6; cursor: pointer; }
.nm-list li:hover { background: #f0f5ff; }
.nm-list li.locked { color: #889; }
.nm-list li.star { font-weight: 600; color: #8a5a00; }
.nm-viewer { background: #fff; border-radius: 8px; padding: 12px 14px; min-height: 90px; box-shadow: 0 2px 10px #1d3b7015; color: #556; }
.nm-viewer h4 { margin: 0 0 6px; color: #1b1b1b; }
.nm-viewer pre { white-space: pre-wrap; font: 13px/1.5 Consolas, monospace; margin: 0; color: #222; }

/* Passe-Partout */
.pp { height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #11151b; color: #c8d3df; }
.pp-head { font-weight: 700; color: #7ee787; }
.pp-head small { font-weight: 400; color: #7d8590; margin-left: 6px; }
.pp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #9aa4b2; }
.pp-form input:not([type=file]) { background: #0b0e12; color: #e6edf3; border: 1px solid #30363d; border-radius: 5px; padding: 6px 8px; font: 13px Consolas, monospace; }
.pp-file { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 12px; }
.pp-import, .pp-run { background: #21262d; color: #e6edf3; border: 1px solid #3d444d; border-radius: 6px; padding: 6px 12px; font: inherit; cursor: pointer; }
.pp-run { grid-column: 1 / -1; background: #1f6f3a; border-color: #2ea043; font-weight: 600; }
.pp-run:disabled { background: #21262d; border-color: #30363d; color: #6e7681; cursor: not-allowed; }
.pp-progress { height: 8px; background: #0b0e12; border-radius: 4px; overflow: hidden; border: 1px solid #30363d; }
.pp-bar { height: 100%; width: 0; background: linear-gradient(90deg, #2ea043, #7ee787); }
.pp-current { font: 14px Consolas, monospace; min-height: 20px; color: #e6edf3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-current.ok { color: #7ee787; font-weight: 700; font-size: 16px; }
.pp-current.err { color: #ff7b72; }
.pp-log { flex: 1; margin: 0; overflow: auto; background: #0b0e12; border: 1px solid #30363d; border-radius: 6px; padding: 8px; font: 12px/1.5 Consolas, monospace; white-space: pre-wrap; }
.pp-log .ok { color: #7ee787; }
.pp-log .err { color: #ff7b72; }
