/* ═══════════════════════════════════════════════════════════════════════════
   YORUOS — feuille de style du « système d'exploitation ».
   Site indépendant du dashboard : aucun style partagé. Identité : bureau à
   fond d'écran, fenêtres givrées déplaçables, barre des tâches, menu ⌘.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --os-accent: #7c6cff;
  --os-glass: rgba(22, 22, 30, .72);
  --os-glass-hi: rgba(30, 30, 42, .85);
  --os-line: rgba(255, 255, 255, .12);
  --os-text: #e8e7f2;
  --os-muted: #9b98ad;
  --os-ok: #4ade80;
  --os-bad: #f87171;
  --os-warn: #fbbf24;
  --os-win-bg: rgba(24, 24, 33, .82);
  --os-radius: 14px;
  font-size: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
  color: var(--os-text); overflow: hidden; height: 100vh; background: #101018;
  user-select: none;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; }
.hidden { display: none !important; }

/* ── Boot ── */
#boot {
  position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; background: #0b0b12;
  transition: opacity .5s ease;
}
#boot.fade { opacity: 0; pointer-events: none; }
.boot-logo { font-size: 64px; animation: bootPulse 1.4s ease infinite; }
.boot-name { font-size: 20px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--os-muted); }
.boot-bar { width: 220px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.boot-fill { height: 100%; width: 0; border-radius: 4px; background: var(--os-accent); animation: bootFill 1.6s ease forwards; }
@keyframes bootFill { to { width: 100%; } }
@keyframes bootPulse { 50% { transform: scale(1.12); } }

/* ── Bureau ── */
#desktop { position: fixed; inset: 0; }
#wallpaper {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(1200px 700px at 20% 10%, #3d2f77, transparent 60%),
              radial-gradient(1000px 600px at 85% 85%, #1c4f63, transparent 55%),
              linear-gradient(160deg, #14121f, #0d0c14);
  background-size: cover; background-position: center;
  transition: background .4s ease;
}

/* Voile d'assombrissement du fond (réglable dans Personnaliser) */
#wall-dim { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* Icônes du bureau : positions LIBRES (drag), taille réglable.
   ⚠️ Le CONTENEUR est transparent aux clics (pointer-events none) : sinon il
   recouvre tout le bureau et avale les clics destinés aux widgets dessous. */
#icons { position: absolute; inset: 0 0 56px; z-index: 1; pointer-events: none; }
.dicon {
  position: absolute; width: calc(92px * var(--os-icon-scale, 1));
  padding: 10px 4px; border-radius: 10px; text-align: center;
  cursor: grab; border: 1px solid transparent; user-select: none; touch-action: none;
  pointer-events: auto;
}
.dicon:hover { background: rgba(255,255,255,.08); border-color: var(--os-line); }
.dicon.dragging { opacity: .75; z-index: 30; cursor: grabbing; background: rgba(124,108,255,.14); border-color: var(--os-accent); }
.dicon .di-em { font-size: calc(34px * var(--os-icon-scale, 1)); display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.dicon .di-lb {
  font-size: calc(11.5px * var(--os-icon-scale, 1)); margin-top: 6px; color: #fff; line-height: 1.25; display: block;
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
}

/* Icône image personnalisée */
.di-img {
  width: calc(40px * var(--os-icon-scale, 1)); height: calc(40px * var(--os-icon-scale, 1));
  border-radius: 10px; object-fit: cover; margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.5));
}

/* ── Widgets de bureau ── */
#widgets { position: absolute; inset: 0 0 56px; z-index: 1; pointer-events: none; }
.widget {
  position: absolute; pointer-events: auto; min-width: 170px; max-width: 320px;
  background: var(--os-glass); border: 1px solid var(--os-line); border-radius: 14px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 34px rgba(0,0,0,.35); padding: 12px 14px;
  cursor: grab; user-select: none; touch-action: none;
}
.widget.dragging { opacity: .8; cursor: grabbing; border-color: var(--os-accent); }
.wg-title { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--os-muted); margin-bottom: 6px; }
.wg-clock { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wg-sub { font-size: 12px; color: var(--os-muted); }
.wg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12.5px; color: var(--os-muted); }
.wg-grid b { color: var(--os-text); }
.wg-line { font-size: 12px; color: var(--os-muted); padding: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.wg-line b { color: var(--os-text); }
.wg-notes {
  width: 100%; min-height: 90px; background: rgba(0,0,0,.25); border: 1px solid var(--os-line);
  border-radius: 8px; color: var(--os-text); padding: 7px 9px; resize: vertical; outline: none;
  font: inherit; font-size: 12.5px; cursor: text;
}

/* Boîte de dialogue (icône personnalisée…) */
#os-dialog {
  position: fixed; inset: 0; z-index: 950; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45);
}
.osd-box {
  width: min(430px, 92vw); background: var(--os-glass-hi); border: 1px solid var(--os-line);
  border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 70px rgba(0,0,0,.55); animation: menuIn .15s ease;
}
.osd-title { font-weight: 600; }
.osd-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Logs d'erreurs */
.err-pre {
  background: rgba(0,0,0,.35); border: 1px solid var(--os-line); border-radius: 9px;
  padding: 10px 12px; font-size: 11.5px; line-height: 1.5; overflow: auto;
  max-height: 100%; white-space: pre-wrap; word-break: break-word; user-select: text;
}

/* Menu contextuel (clic droit sur une icône) */
#ctx-menu {
  position: fixed; z-index: 800; min-width: 190px; padding: 6px;
  background: var(--os-glass-hi); border: 1px solid var(--os-line); border-radius: 11px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 44px rgba(0,0,0,.5); animation: menuIn .12s ease;
}
.ctx-row { padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.ctx-row:hover { background: rgba(255,255,255,.1); }

/* Épingle bureau dans le menu ⌘ */
.sm-pin {
  position: absolute; top: 4px; right: 4px; font-size: 12px; opacity: 0;
  border-radius: 6px; padding: 2px 4px; transition: opacity .12s ease;
}
.sm-app { position: relative; }
.sm-app:hover .sm-pin, .sm-row:hover .sm-pin { opacity: .8; }
.sm-row .sm-pin { position: static; margin-left: 4px; flex-shrink: 0; }
.sm-pin:hover { opacity: 1 !important; background: rgba(255,255,255,.12); }
.sm-pin.on { opacity: .9; }

/* Thème clair des fenêtres (Personnaliser) */
body.os-light {
  --os-glass: rgba(244, 244, 250, .78);
  --os-glass-hi: rgba(250, 250, 253, .92);
  --os-line: rgba(20, 20, 40, .14);
  --os-text: #23222e;
  --os-muted: #6d6a80;
  --os-win-bg: rgba(248, 248, 252, .88);
}
body.os-light .dicon .di-lb { color: #fff; } /* le bureau reste sur le fond d'écran */
body.os-light .os-input, body.os-light .os-select, body.os-light .os-textarea { background: rgba(255,255,255,.75); color: var(--os-text); }
body.os-light .win-btn:hover { background: rgba(0,0,0,.08); color: #000; }
body.os-light .kpi, body.os-light .task-app { background: rgba(0,0,0,.05); }
body.os-light .os-slider { background: rgba(0,0,0,.18); }

/* ── Fenêtres ── */
.win {
  position: absolute; min-width: 340px; min-height: 200px;
  background: var(--os-win-bg); border: 1px solid var(--os-line);
  border-radius: var(--os-radius); overflow: hidden;
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  display: flex; flex-direction: column;
}
/* Ouverture façon macOS : la fenêtre « jaillit » depuis le bas avec rebond.
   ⚠️ Portée par .opening (posée UNE fois à la création) et pas par .win :
   sinon l'animation rejoue à chaque retrait de classe (restauration après
   réduction → la fenêtre « clignotait » en rejouant l'ouverture). */
.win.opening { animation: winIn .32s cubic-bezier(.2, .9, .27, 1.15); }
@keyframes winIn { from { transform: scale(.72) translateY(60px); opacity: 0; } }
.win.focus { border-color: rgba(124,108,255,.5); box-shadow: 0 34px 90px rgba(0,0,0,.65), 0 0 0 1px rgba(124,108,255,.25); }
.win.closing { animation: winOut .2s cubic-bezier(.5, 0, .8, .4) forwards; }
@keyframes winOut { to { transform: scale(.78) translateY(40px); opacity: 0; } }
/* Réduction : aspirée vers la barre des tâches ; restauration inverse. */
.win.minimizing { animation: winMin .23s cubic-bezier(.5, 0, .8, .4) forwards; }
@keyframes winMin { to { transform: scale(.3) translateY(90vh); opacity: 0; } }
.win.restoring { animation: winRestore .26s cubic-bezier(.2, .9, .27, 1.12); }
@keyframes winRestore { from { transform: scale(.3) translateY(90vh); opacity: 0; } }
.win-bar {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: rgba(255,255,255,.05); border-bottom: 1px solid var(--os-line);
  cursor: grab; flex-shrink: 0;
}
.win-bar:active { cursor: grabbing; }
.win-em { font-size: 15px; }
.win-title { flex: 1; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-btn {
  width: 24px; height: 24px; border-radius: 7px; font-size: 11px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; color: var(--os-muted);
}
/* Feux tricolores macOS au survol : réduire = jaune, agrandir = vert, fermer = rouge */
.win-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.win-btn[data-act="min"]:hover { background: #f0b232; color: #3a2b00; }
.win-btn[data-act="max"]:hover { background: #46a758; color: #fff; }
.win-btn.close:hover, .win-btn[data-act="close"]:hover { background: #e5484d; color: #fff; }
.win-body { flex: 1; overflow: auto; padding: 16px; user-select: text; }
.win-resize {
  position: absolute; right: 0; bottom: 0; width: 18px; height: 18px;
  cursor: nwse-resize; z-index: 5;
}
.win-resize::after {
  content: ''; position: absolute; right: 4px; bottom: 4px; width: 8px; height: 8px;
  border-right: 2px solid var(--os-muted); border-bottom: 2px solid var(--os-muted);
  border-radius: 0 0 3px 0; opacity: .6;
}
.win.max { inset: 10px 10px 62px !important; width: auto !important; height: auto !important; }

/* ── Barre des tâches ── */
#taskbar {
  position: absolute; left: 10px; right: 10px; bottom: 8px; height: 46px; z-index: 500;
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: var(--os-glass); border: 1px solid var(--os-line); border-radius: 13px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
#start-btn { font-size: 20px; width: 36px; height: 36px; border-radius: 9px; }
#start-btn:hover, #start-btn.on { background: var(--os-accent); }
#task-apps { flex: 1; display: flex; gap: 6px; overflow-x: auto; }
.task-app {
  display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 9px;
  font-size: 12.5px; background: rgba(255,255,255,.05); border: 1px solid transparent;
  max-width: 170px; white-space: nowrap;
}
.task-app span.tt { overflow: hidden; text-overflow: ellipsis; }
.task-app:hover { background: rgba(255,255,255,.12); }
.task-app.active { border-color: var(--os-accent); background: rgba(124,108,255,.18); }
.task-app.min { opacity: .55; }
.task-app.pin-only { background: transparent; padding: 6px 9px; }
.task-app.pin-only:hover { background: rgba(255,255,255,.1); }
.task-app { position: relative; }
.task-app .run-dot {
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 3px; border-radius: 3px; background: var(--os-accent);
}
.task-app.min .run-dot { width: 6px; opacity: .7; }
.ta-img { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; display: inline-block; vertical-align: -4px; }
#tray { display: flex; align-items: center; gap: 10px; }
#tray-sante { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
#tray-sante:hover { background: rgba(255,255,255,.1); }
.ts-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--os-muted); }
.ts-dot.ok { background: var(--os-ok); box-shadow: 0 0 6px var(--os-ok); }
.ts-dot.warn { background: var(--os-warn); }
.ts-dot.bad { background: var(--os-bad); }
#tray-clock { cursor: pointer; border-radius: 6px; padding: 3px 6px; }
#tray-clock:hover { background: rgba(255,255,255,.1); color: var(--os-text); }

/* Mini-calendrier (clic sur l'horloge) */
#cal-pop {
  position: absolute; right: 60px; bottom: 62px; z-index: 620; width: 250px;
  background: var(--os-glass-hi); border: 1px solid var(--os-line); border-radius: 14px;
  padding: 14px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 22px 50px rgba(0,0,0,.5); animation: menuIn .15s ease;
}
.cal-head { font-weight: 600; margin-bottom: 10px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12px; }
.cal-dow { color: var(--os-muted); font-size: 10px; padding: 2px 0; }
.cal-day { padding: 4px 0; border-radius: 6px; }
.cal-day.today { background: var(--os-accent); color: #fff; font-weight: 700; }

/* Navigateur intégré */
.win-body.nav-body { padding: 0; display: flex; flex-direction: column; }
.nav-bar { display: flex; gap: 6px; padding: 8px 10px 4px; align-items: center; }
.nav-bar .os-input { flex: 1; }
.nav-marks { display: flex; gap: 5px; padding: 4px 10px 8px; flex-wrap: wrap; border-bottom: 1px solid var(--os-line); }
.nav-marks .os-btn { padding: 3px 9px; font-size: 12px; }
.nav-frame { flex: 1; border: none; background: #fff; }
.nav-note { padding: 5px 10px; font-size: 10.5px; color: var(--os-muted); border-top: 1px solid var(--os-line); }
#tray-bell { position: relative; font-size: 15px; width: 32px; height: 32px; border-radius: 8px; }
#tray-bell:hover { background: rgba(255,255,255,.1); }
#bell-dot {
  position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--os-bad);
}
#tray-clock { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--os-muted); }
#tray-avatar { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 1px solid var(--os-line); }

/* ── Menu ⌘, notifications, menu utilisateur ── */
#start-menu, #notif-panel, #user-menu {
  position: absolute; bottom: 62px; z-index: 600;
  background: var(--os-glass-hi); border: 1px solid var(--os-line); border-radius: 14px;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  animation: menuIn .16s ease;
}
@keyframes menuIn { from { transform: translateY(8px); opacity: 0; } }
#start-menu { left: 10px; width: 460px; max-height: 70vh; overflow-y: auto; padding: 14px; }
#notif-panel { right: 90px; width: 360px; max-height: 65vh; overflow-y: auto; padding: 12px; }
#user-menu { right: 10px; width: 240px; padding: 10px; }

.sm-search {
  width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--os-line);
  background: rgba(255,255,255,.06); color: var(--os-text); outline: none; margin-bottom: 12px;
}
.sm-search:focus { border-color: var(--os-accent); }
.sm-sec { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--os-muted); margin: 10px 4px 6px; }
.sm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sm-app { padding: 10px 6px; border-radius: 10px; text-align: center; cursor: pointer; }
.sm-app:hover { background: rgba(255,255,255,.09); }
.sm-app .em { font-size: 24px; display: block; }
.sm-app .lb { font-size: 10.5px; margin-top: 4px; color: var(--os-muted); display: block; line-height: 1.2; }
.sm-list { display: flex; flex-direction: column; }
.sm-row { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.sm-row:hover { background: rgba(255,255,255,.09); }
.sm-row .dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex-shrink: 0; }
.dot.on { background: var(--os-ok); } .dot.off { background: rgba(255,255,255,.2); }

.np-item { display: flex; gap: 9px; padding: 9px 10px; border-radius: 9px; font-size: 12.5px; align-items: baseline; }
.np-item:hover { background: rgba(255,255,255,.06); }
.np-when { margin-left: auto; color: var(--os-muted); font-size: 11px; white-space: nowrap; }
.np-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 10px; font-weight: 600; }
.um-row { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.um-row:hover { background: rgba(255,255,255,.09); }
.um-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--os-line); margin-bottom: 8px; }
.um-head img { width: 34px; height: 34px; border-radius: 50%; }
.um-head b { display: block; font-size: 13.5px; }
.um-head small { color: var(--os-muted); font-size: 11px; }

/* ── Contenus d'apps ── */
.app-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: rgba(255,255,255,.05); border: 1px solid var(--os-line); border-radius: 11px; padding: 13px; text-align: center; }
.kpi b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 10.5px; color: var(--os-muted); letter-spacing: .08em; text-transform: uppercase; }
.app-sec { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--os-muted); margin: 16px 0 8px; }
.app-note { color: var(--os-muted); font-size: 12.5px; }
.list-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-bottom: 1px solid var(--os-line); font-size: 13px;
}
.list-row:hover { background: rgba(255,255,255,.04); }
.list-row .lr-sub { color: var(--os-muted); font-size: 11.5px; }
.list-row .lr-end { margin-left: auto; color: var(--os-muted); font-size: 11.5px; white-space: nowrap; }
.os-badge { font-size: 10.5px; border: 1px solid var(--os-line); border-radius: 999px; padding: 1px 8px; color: var(--os-muted); }
.os-badge.b-on { color: var(--os-ok); border-color: var(--os-ok); }
.os-badge.b-off { color: var(--os-muted); }
.os-badge.b-warn { color: var(--os-warn); border-color: var(--os-warn); }
.os-badge.b-bad { color: var(--os-bad); border-color: var(--os-bad); }

.os-input, .os-select, .os-textarea {
  width: 100%; background: rgba(0,0,0,.28); border: 1px solid var(--os-line);
  border-radius: 8px; color: var(--os-text); padding: 7px 10px; outline: none;
}
.os-input:focus, .os-select:focus, .os-textarea:focus { border-color: var(--os-accent); }
.os-textarea { min-height: 70px; resize: vertical; }
.os-btn {
  background: var(--os-accent); color: #fff; border-radius: 8px; padding: 7px 14px;
  font-weight: 600; font-size: 13px;
}
.os-btn:hover { filter: brightness(1.15); }
.os-btn.ghost { background: rgba(255,255,255,.07); border: 1px solid var(--os-line); color: var(--os-text); }
.os-btn.danger { background: var(--os-bad); }
.os-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Interrupteur */
.os-toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.os-toggle input { opacity: 0; width: 0; height: 0; }
.os-slider { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.14); transition: background .15s; cursor: pointer; }
.os-slider::before {
  content: ''; position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s;
}
.os-toggle input:checked + .os-slider { background: var(--os-accent); }
.os-toggle input:checked + .os-slider::before { transform: translate(18px, -50%); }

/* Formulaires de config (renderer générique) */
.cfg-row { display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--os-line); }
.cfg-row:last-child { border-bottom: none; }
.cfg-lb { flex: 0 0 44%; }
.cfg-lb b { font-size: 13px; }
.cfg-lb small { display: block; color: var(--os-muted); font-size: 11.5px; margin-top: 2px; line-height: 1.4; }
.cfg-ct { flex: 1; min-width: 0; }
.cfg-sec { margin: 18px 0 4px; padding: 8px 10px; border-radius: 8px; background: rgba(124,108,255,.12); font-weight: 600; font-size: 13px; }
.cfg-sec small { display: block; font-weight: 400; color: var(--os-muted); font-size: 11.5px; margin-top: 2px; }
.cfg-save {
  position: sticky; bottom: -16px; margin: 14px -16px -16px; padding: 10px 16px;
  background: var(--os-glass-hi); border-top: 1px solid var(--os-line);
  display: flex; gap: 8px; justify-content: flex-end; align-items: center;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.cfg-save .n { margin-right: auto; color: var(--os-muted); font-size: 12px; }
.obj-item { border: 1px solid var(--os-line); border-radius: 9px; padding: 9px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.obj-item .oi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.obj-item .oi-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--os-muted); }

/* Fiche membre */
.mb-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.mb-head img { width: 52px; height: 52px; border-radius: 50%; }
.mb-head b { font-size: 16px; display: block; }
.mb-head small { color: var(--os-muted); }

/* Toasts */
#os-toasts { position: fixed; right: 16px; bottom: 66px; z-index: 900; display: flex; flex-direction: column; gap: 8px; }
.os-toast {
  background: var(--os-glass-hi); border: 1px solid var(--os-line); border-left: 3px solid var(--os-accent);
  border-radius: 10px; padding: 10px 14px; font-size: 13px;
  backdrop-filter: blur(14px); animation: menuIn .18s ease;
}
.os-toast.ok { border-left-color: var(--os-ok); }
.os-toast.err { border-left-color: var(--os-bad); }

/* Personnalisation : pastilles de fonds */
.wp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.wp-tile { height: 56px; border-radius: 9px; cursor: pointer; border: 2px solid transparent; background-size: cover; background-position: center; }
.wp-tile:hover { border-color: rgba(255,255,255,.4); }
.wp-tile.sel { border-color: var(--os-accent); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }

/* Écran de verrouillage */
#lock-screen {
  position: fixed; inset: 0; z-index: 1200; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(8, 8, 14, .72);
  backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px);
  animation: menuIn .3s ease;
}
#lock-screen.lk-out { opacity: 0; transition: opacity .25s ease; }
.lk-clock { font-size: 84px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 8px 40px rgba(0,0,0,.6); }
.lk-date { font-size: 18px; color: var(--os-muted); text-transform: capitalize; margin-bottom: 26px; }
.lk-avatar { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--os-line); }
.lk-name { font-size: 16px; font-weight: 600; }
.lk-hint { margin-top: 22px; font-size: 12px; color: var(--os-muted); animation: bootPulse 2s ease infinite; }

/* Dépôt de fichier sur le bureau */
#desktop.dropping::after {
  content: '📤 Dépose ton fichier ici'; position: absolute; inset: 14px; z-index: 700;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600;
  border: 3px dashed var(--os-accent); border-radius: 20px;
  background: rgba(124,108,255,.12); pointer-events: none;
}

/* App Nouveautés (patch notes) */
.pn-block.pn-latest .app-sec { background: rgba(124,108,255,.2); }
.pn-sec { font-size: 12px; font-weight: 600; color: var(--os-muted); margin: 10px 0 4px; }
.pn-item { font-size: 13px; line-height: 1.55; padding: 5px 0 5px 14px; border-left: 2px solid var(--os-line); margin-bottom: 6px; }
.pn-item strong { color: var(--os-text); }
.pn-item code { background: rgba(255,255,255,.09); border-radius: 4px; padding: 1px 5px; font-size: 12px; }

/* Explorateur de fichiers */
.fx-bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.fx-crumb {
  padding: 4px 9px; border-radius: 7px; font-size: 12.5px; color: var(--os-text);
  background: rgba(255,255,255,.06); border: 1px solid var(--os-line);
}
.fx-crumb:hover { background: rgba(255,255,255,.12); }
.fx-sep { color: var(--os-muted); font-size: 12px; }
.fx-list { display: flex; flex-direction: column; gap: 2px; }
.fx-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  cursor: pointer; border: 1px solid transparent;
}
.fx-row:hover { background: rgba(255,255,255,.06); border-color: var(--os-line); }
.fx-em { font-size: 17px; }
.fx-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-meta { font-size: 11.5px; color: var(--os-muted); font-variant-numeric: tabular-nums; }
.fx-dl { font-size: 13px; padding: 2px 6px; border-radius: 6px; text-decoration: none; }
.fx-dl:hover { background: rgba(255,255,255,.12); }

/* Widget graphique (barres) */
.wg-bars { display: flex; align-items: flex-end; gap: 3px; height: 50px; margin: 4px 0 6px; }
.wg-bar {
  flex: 1; min-width: 6px; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--os-accent), rgba(124,108,255,.35));
}
.wg-bar:hover { filter: brightness(1.3); }

/* Barre des tâches centrée (option) */
body.tb-center #task-apps { justify-content: center; flex: 1; }

/* Pastilles de teinte du thème (Personnaliser) */
.tint-grid { display: inline-flex; gap: 5px; }
.tint-dot {
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--os-line); transition: transform .12s ease;
}
.tint-dot:hover { transform: scale(1.15); }
.tint-dot.sel { border-color: var(--os-accent); box-shadow: 0 0 0 2px rgba(124,108,255,.35); }

/* Onglets du navigateur */
.nav-tabs {
  display: flex; align-items: center; gap: 4px; padding: 6px 8px 0;
  overflow-x: auto; flex-wrap: nowrap;
}
.nav-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: 9px 9px 0 0; font-size: 12px; cursor: pointer; white-space: nowrap;
  background: rgba(255,255,255,.05); border: 1px solid var(--os-line); border-bottom: none;
  color: var(--os-muted); max-width: 180px;
}
.nav-tab .nv-tab-lb { overflow: hidden; text-overflow: ellipsis; }
.nav-tab.on { background: rgba(124,108,255,.16); color: var(--os-text); border-color: rgba(124,108,255,.4); }
.nv-tab-x { font-size: 10px; border-radius: 5px; padding: 1px 4px; color: var(--os-muted); }
.nv-tab-x:hover { background: #e5484d; color: #fff; }
.nv-tab-new { padding: 4px 8px; border-radius: 8px; font-size: 13px; color: var(--os-muted); }
.nv-tab-new:hover { background: rgba(255,255,255,.1); color: var(--os-text); }
.nav-frames { flex: 1; position: relative; display: flex; }
.nav-frames .nav-frame { flex: 1; }
.nav-frames .nav-frame.hidden { display: none; }

/* App Messages : fil de MP */
.dm-thread {
  display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
  max-height: 320px; padding: 10px; border: 1px solid var(--os-line);
  border-radius: 11px; background: rgba(0,0,0,.18);
}
.dm-msg {
  max-width: 78%; padding: 8px 11px; border-radius: 12px; font-size: 13px;
  line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}
.dm-msg.in { align-self: flex-start; background: rgba(255,255,255,.07); border: 1px solid var(--os-line); }
.dm-msg.out { align-self: flex-end; background: rgba(124,108,255,.2); border: 1px solid rgba(124,108,255,.4); }
.dm-meta { font-size: 10.5px; color: var(--os-muted); margin-bottom: 3px; }

/* Prévisions météo 7 jours + puces d'apps au démarrage */
.widget.wg-meteo { max-width: 350px; }
.wg-days { display: flex; gap: 5px; margin-top: 8px; }
.wg-day { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10px; color: var(--os-muted); }
.wg-day b { font-size: 10px; text-transform: capitalize; }
.wg-day-em { font-size: 16px; }
.wg-day small { font-variant-numeric: tabular-nums; }
.bootchip { padding: 3px 7px; font-size: 14px; opacity: .45; }
.bootchip.on { opacity: 1; border-color: var(--os-accent); background: rgba(124,108,255,.18); }

/* Onglets DANS une fenêtre (⊞ : plusieurs apps dans la même fenêtre) */
.win-tabs { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; }
.wtab {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px;
  border-radius: 8px; font-size: 12px; cursor: pointer; white-space: nowrap;
  background: rgba(255,255,255,.05); border: 1px solid var(--os-line);
  color: var(--os-muted); max-width: 150px;
}
.wtab-lb { overflow: hidden; text-overflow: ellipsis; }
.wtab.on { background: rgba(124,108,255,.18); color: var(--os-text); border-color: rgba(124,108,255,.45); }
.wtab-x { font-size: 9px; border-radius: 4px; padding: 1px 3px; color: var(--os-muted); }
.wtab-x:hover { background: #e5484d; color: #fff; }
.ctx-arrow { float: right; color: var(--os-muted); }

/* Option de config trouvée via la recherche : scroll + clignotement */
.cfg-flash { animation: cfgFlash .6s ease 4; border-radius: 10px; }
@keyframes cfgFlash { 50% { background: rgba(124,108,255,.3); box-shadow: 0 0 0 2px var(--os-accent); } }

/* Pastille de couleur de rôle (fiche membre) */
.role-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }

/* Widget recherche : résultats vers le haut si posé en bas d'écran.
   ⚠️ Le layer #widgets entier doit passer AU-DESSUS des fenêtres pendant la
   saisie (z-index 1 sinon) — le z-index du widget seul ne suffit pas, il
   reste enfermé dans le contexte d'empilement du conteneur. */
#widgets:has(.wg-search:focus-within) { z-index: 640; }
.widget.wg-search:focus-within { z-index: 620; }
.sw-results { max-height: 250px; overflow: auto; }
.wg-search.sw-up .sw-results {
  position: absolute; bottom: calc(100% - 6px); left: 10px; right: 10px;
  background: var(--os-glass-hi); border: 1px solid var(--os-line); border-radius: 11px;
  padding: 6px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -14px 34px rgba(0,0,0,.4); margin: 0;
}

/* Style « dock » flottant façon macOS (option Personnaliser) */
body.tb-dock #taskbar {
  left: 50%; right: auto; transform: translateX(-50%);
  width: max-content; max-width: var(--dock-w, 96vw); bottom: 12px;
  border-radius: 20px; padding: 0 14px; height: 52px;
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
}
/* Marge interne « invisible » : le rebond au survol n'est plus rogné par la
   zone défilante (overflow-x du conteneur coupait le haut des icônes). */
body.tb-dock #task-apps { padding: 12px 2px; margin: -12px -2px; }
body.tb-dock .task-app { font-size: 15px; transition: transform .18s ease; }
body.tb-dock .task-app:hover { transform: translateY(-5px) scale(1.12); }
/* Menus et toasts remontés : le dock (12 px + 52 px) dépassait leur ancrage. */
body.tb-dock #start-menu, body.tb-dock #notif-panel, body.tb-dock #user-menu,
body.tb-dock #cal-pop { bottom: 78px; }
body.tb-dock #os-toasts { bottom: 82px; }
body.tb-dock #show-desktop { border-radius: 0 16px 16px 0; }

/* Avatar dans les résultats du widget recherche */
.sw-av { width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 2px; }

/* Widget barre de recherche */
.wg-search { min-width: 300px; cursor: default; }
.sw-box { position: relative; }
.sw-input {
  width: 100%; background: rgba(0,0,0,.28); border: 1px solid var(--os-line);
  border-radius: 9px; color: var(--os-text); padding: 8px 30px 8px 12px; outline: none; font: inherit; font-size: 13px;
}
.sw-input:focus { border-color: var(--os-accent); }
.sw-clear {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 6px; font-size: 11px; color: var(--os-muted);
}
.sw-clear:hover { background: rgba(255,255,255,.12); color: var(--os-text); }
.sw-results { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.sw-sec {
  font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--os-muted); padding: 5px 10px 1px;
}
.sw-chips { display: flex; gap: 5px; flex-wrap: wrap; padding: 4px 8px 2px; }
.sw-chip {
  padding: 4px 9px; border-radius: 8px; font-size: 12px; color: var(--os-text);
  background: rgba(255,255,255,.06); border: 1px solid var(--os-line);
}
.sw-chip:hover { background: rgba(124,108,255,.18); border-color: rgba(124,108,255,.4); }
.sw-row {
  text-align: left; padding: 6px 10px; border-radius: 8px; font-size: 12.5px;
  color: var(--os-text); width: 100%;
}
.sw-row:hover, .sw-row.sel { background: rgba(124,108,255,.18); }
.sw-row small { color: var(--os-muted); margin-left: 4px; }

/* Liseré « Afficher le bureau » à l'extrême droite de la barre */
#show-desktop {
  width: 9px; align-self: stretch; margin-left: 6px;
  border-left: 1px solid var(--os-line); border-radius: 0 10px 10px 0;
}
#show-desktop:hover { background: rgba(255,255,255,.14); }

/* Bouton Personnaliser du tray + spinner navigateur */
#tray-perso { width: 26px; height: 26px; border-radius: 7px; font-size: 14px; }
#tray-perso:hover { background: rgba(255,255,255,.1); }
.nv-spin { font-size: 11.5px; color: var(--os-muted); margin-left: auto; align-self: center; }

/* Mobile : fenêtres plein écran, icônes en grille */
@media (max-width: 700px) {
  .win { inset: 8px 8px 60px !important; width: auto !important; height: auto !important; }
  #icons { flex-direction: row; align-content: flex-start; }
  #start-menu { left: 8px; right: 8px; width: auto; }
  #notif-panel { right: 8px; left: 8px; width: auto; }
  .cfg-row { flex-direction: column; gap: 6px; }
  .cfg-lb { flex: none; }
}
