/* =========================================================
   TMI OS 98 — feuille de style
   Design system : DA TMI (Figma « V5 ABOUTI ASSETS »)
   ========================================================= */

@font-face { font-family: "Pixelify"; src: url("../fonts/PixelifySans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixelify"; src: url("../fonts/PixelifySans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Arimo"; src: url("../fonts/Arimo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Arimo"; src: url("../fonts/Arimo-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --gray: #c0c0c0;
  --dark: #808080;
  --light: #dfdfdf;
  --navy: #000080;
  --teal: #008080;
  --tip: #ffffe1;
  --red: #e2231a;
  /* Arial partout (regular / bold), interlettrage serré ; la typo pixel reste pour les titres de fenêtres */
  --font: Arial, "Arimo", "Helvetica Neue", Helvetica, sans-serif;   /* Arial comme le logo (Arimo = même dessin, pour Android) */
  --track: -0.03em;                                                  /* interlettrage serré, effet Helvetica */
  --font-pixel: "Pixelify", "Arimo", "Tahoma", sans-serif;
  --tb-h: 30px;
  --task-h: 48px;

  /* curseurs pâte (Figma 03_elements) */
  --cur-arrow: url("../cur/arrow.png") 6 2, default;
  --cur-hand: url("../cur/hand.png") 10 2, pointer;
  --cur-wait: url("../cur/wait.png") 11 17, wait;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: #000;
  color: #000;
  font: 16px/1.25 var(--font);
  -webkit-font-smoothing: antialiased;
  letter-spacing: var(--track);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* ---------- curseurs ---------- */
html, body, * { cursor: var(--cur-arrow); }
html, body, * { cursor: -webkit-image-set(url("../cur/arrow.png") 1x, url("../cur/arrow@2x.png") 2x) 6 2, default; }
button, a, [role="button"], .clickable, .tile, .xitem, .sm-item, .ctx-item, .toast, .task, #start, .seek, .mag-zone, #clippy-img, #pet {
  cursor: var(--cur-hand);
  cursor: -webkit-image-set(url("../cur/hand.png") 1x, url("../cur/hand@2x.png") 2x) 10 2, pointer;
}
.win-title { cursor: var(--cur-arrow); }
textarea, [contenteditable="true"] { cursor: text; user-select: text; -webkit-user-select: text; }
html.busy, html.busy * {
  cursor: var(--cur-wait) !important;
  cursor: -webkit-image-set(url("../cur/wait.png") 1x, url("../cur/wait@2x.png") 2x) 11 17, wait !important;
}

button { font: inherit; color: inherit; }
img { -webkit-user-drag: none; user-select: none; }
[hidden] { display: none !important; }
u { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- écran / bureau ---------- */
#screen { position: fixed; inset: 0; overflow: hidden; }

#desktop {
  position: absolute; inset: 0;
  background: #3a6ea5 url("../img/wallpaper.webp") center / cover no-repeat;
}
#desktop.wp-teal { background: var(--teal); }
#desktop.wp-gaspard { background: var(--teal) url("../img/gaspard_bras.webp") 0 0 / 110px auto repeat; }
#desktop.wp-complot { background: #3b2a5c url("../img/complotiste.webp") 0 0 / 96px auto repeat; }

#icons { position: absolute; inset: 0 0 var(--task-h) 0; }

.icon {
  position: absolute;
  width: 92px;
  padding: 4px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: 0; color: #fff;
  font-size: 15px; line-height: 1.1;
  touch-action: none;
}
.icon .ico {
  height: 58px; width: 80px;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none;
}
.icon .ico img { max-height: 58px; max-width: 80px; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.28)); }
.icon .lbl {
  background: var(--teal);
  padding: 1px 4px 2px;
  text-align: center;
  max-width: 92px;
  overflow-wrap: anywhere;
  pointer-events: none;
  text-shadow: none;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.icon.sel { z-index: 3; }
.icon.sel .lbl { background: var(--navy); outline: 1px dotted #fff; outline-offset: -1px; -webkit-line-clamp: 4; }
.icon.sel .ico img { filter: drop-shadow(2px 3px 0 rgba(0,0,0,.28)) brightness(.7) sepia(1) hue-rotate(185deg) saturate(4); }
.icon:focus-visible { outline: none; }
.icon:focus-visible .lbl { outline: 1px dotted #ff0; }
.icon.dragging { opacity: .7; z-index: 5; }
.icon .badge-new {
  position: absolute; top: 0; right: 6px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  padding: 0 4px; transform: rotate(8deg);
  box-shadow: 1px 1px 0 #000;
}

#marquee {
  position: absolute; border: 1px dotted #fff; background: rgba(0,0,128,.12);
  pointer-events: none; z-index: 2;
}

/* ---------- biseaux Win98 ---------- */
.raised {
  background: var(--gray);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px var(--dark), inset 2px 2px var(--light);
}
.sunken {
  box-shadow: inset 1px 1px var(--dark), inset -1px -1px #fff, inset 2px 2px #0a0a0a, inset -2px -2px var(--light);
}
.sunken-thin { box-shadow: inset 1px 1px var(--dark), inset -1px -1px #fff; }
.etched { height: 2px; border-top: 1px solid var(--dark); border-bottom: 1px solid #fff; margin: 4px 2px; }

.btn {
  min-width: 88px; min-height: 30px;
  padding: 4px 14px;
  border: 0; background: var(--gray);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px var(--dark), inset 2px 2px var(--light);
  font-size: 16px;
}
.btn:active, .btn.pressed {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px var(--light), inset 2px 2px var(--dark);
  padding: 5px 13px 3px 15px;
}
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.btn.default { box-shadow: 0 0 0 1px #0a0a0a, inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px var(--dark), inset 2px 2px var(--light); }

.btn-red {
  border: 0; background: var(--red); color: #fff; font-weight: 700;
  padding: 6px 16px; letter-spacing: .5px;
  box-shadow: inset -2px -2px rgba(0,0,0,.35), inset 2px 2px rgba(255,255,255,.35), 2px 2px 0 #000;
}
.btn-red:active { transform: translate(1px,1px); box-shadow: inset 2px 2px rgba(0,0,0,.35), 1px 1px 0 #000; }
.btn-red.done { background: var(--gray); color: #000; }

/* bouton pâte (fond cta en 3 morceaux) */
.clay-btn {
  border: 0; height: 38px; padding: 0 16px 0 12px;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 17px;
  background:
    url("../img/cta_fond_gauche.webp") left center / auto 100% no-repeat,
    url("../img/cta_fond_droite.webp") right center / auto 100% no-repeat,
    url("../img/cta_fond_milieu.webp") center / calc(100% - 24px) 100% no-repeat;
  filter: drop-shadow(1px 2px 0 rgba(0,0,0,.25));
}
.clay-btn:active, .clay-btn.pressed { transform: translateY(1px) scale(.98); filter: brightness(.92); }

/* ---------- fenêtres ---------- */
#windows { position: absolute; inset: 0 0 var(--task-h) 0; pointer-events: none; }
.win {
  position: absolute;
  pointer-events: auto;
  display: flex; flex-direction: column;
  padding: 5px;
  background: var(--gray);
  box-shadow:
    inset -2px -2px #0a0a0a, inset 2px 2px var(--light),
    inset -4px -4px var(--dark), inset 4px 4px #fff,
    8px 10px 0 rgba(0,0,0,.16);
  min-width: 240px;
  max-width: 100vw;
  animation: win-open .16s steps(4, end);
}
.win.closing { animation: win-close .12s steps(3, end) forwards; pointer-events: none; }
@keyframes win-open { from { transform: scale(.82); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes win-close { to { transform: scale(.86); opacity: 0; } }

.win-title {
  flex: none;
  height: var(--tb-h);
  display: flex; align-items: center; gap: 6px;
  padding: 0 6px 0 12px;
  background:
    url("../img/tb_active_gauche.webp") left center / auto 100% no-repeat,
    url("../img/tb_active_droite.webp") right center / auto 100% no-repeat,
    url("../img/tb_active_milieu.webp") center / calc(100% - 40px) 100% no-repeat;
  touch-action: none;
}
.win.inactive .win-title {
  background:
    url("../img/tb_inactive_gauche.webp") left center / auto 100% no-repeat,
    url("../img/tb_inactive_droite.webp") right center / auto 100% no-repeat,
    url("../img/tb_inactive_milieu.webp") center / calc(100% - 40px) 100% no-repeat;
}
.win-title-text {
  flex: 1; min-width: 0;
  color: #fff; font-weight: 700; font-size: 18px; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 1px 1px 0 rgba(0,0,0,.35);
  padding-top: 1px;
}
.win.inactive .win-title-text { color: #f2f2f2; text-shadow: 1px 1px 0 rgba(0,0,0,.25); }
.win-btns { display: flex; gap: 1px; flex: none; }
.wb {
  width: 28px; height: 24px; border: 0; padding: 0;
  background: center / contain no-repeat;
}
.wb-min { background-image: url("../img/btn_min.webp"); }
.wb-max { background-image: url("../img/btn_max.webp"); }
.wb-close { background-image: url("../img/btn_close.webp"); width: 27px; }
.wb:active { transform: translate(1px, 1px); filter: brightness(.88); }

.win-menu {
  flex: none; display: flex; gap: 2px; padding: 4px 2px 2px;
  font-size: 15px;
}
.win-menu > span { padding: 1px 6px; }
.win-menu > span:hover, .win-menu > span.open { background: var(--navy); color: #fff; }

.win-body { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 4px; position: relative; }
.win-status { flex: none; display: flex; gap: 3px; margin-top: 4px; font-size: 14px; }
.win-status > span { padding: 2px 6px; box-shadow: inset 1px 1px var(--dark), inset -1px -1px #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-status > span:first-child { flex: 1; }
.grip {
  position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; touch-action: none;
  background:
    linear-gradient(135deg, transparent 0 45%, #fff 45% 52%, var(--dark) 52% 62%, transparent 62% 70%, #fff 70% 77%, var(--dark) 77% 87%, transparent 87%);
  cursor: nwse-resize !important;
}

.win.max {
  left: 0 !important; top: 0 !important;
  width: 100% !important; height: 100% !important;
  box-shadow: inset -2px -2px #0a0a0a, inset 2px 2px var(--light), inset -4px -4px var(--dark), inset 4px 4px #fff;
}
.win.max .grip { display: none; }
.win.shake { animation: shake .4s steps(6) 1; }
@keyframes shake { 0%,100% { translate: 0 0; } 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 4px 0; } }

/* contenu générique */
.field { background: #fff; padding: 6px 8px; }
.pad { padding: 10px 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.btn-row { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 6px 4px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }

/* boîte de dialogue */
.dlg { display: flex; gap: 14px; padding: 14px 12px 4px; align-items: flex-start; }
.dlg-ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.dlg-ico img { width: 44px; }
.ico-error { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff6b5e, #c40000 70%); box-shadow: inset -2px -3px 0 rgba(0,0,0,.25), 1px 2px 0 rgba(0,0,0,.4); color: #fff; font: 700 24px/36px Arial, sans-serif; text-align: center; }
.ico-warn { width: 0; height: 0; border-left: 22px solid transparent; border-right: 22px solid transparent; border-bottom: 38px solid #ffd800; position: relative; filter: drop-shadow(1px 2px 0 rgba(0,0,0,.4)); }
.ico-warn::after { content: "!"; position: absolute; left: -4px; top: 10px; font: 700 24px Arial, sans-serif; }
.dlg-msg { font-size: 17px; line-height: 1.35; padding-top: 4px; white-space: pre-line; }
.dlg-msg b { font-weight: 700; }

/* barre de progression 98 */
.progress { height: 24px; padding: 3px; background: #fff; }
.progress-fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--navy) 0 12px, transparent 12px 14px); transition: width .2s steps(3); }

/* ---------- explorateur ---------- */
.addr { display: flex; align-items: center; gap: 6px; font-size: 15px; padding: 0 2px 4px; }
.addr .field { flex: 1; padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xview { flex: 1; min-height: 0; display: flex; gap: 4px; }
.xgrid {
  flex: 1; min-height: 0; overflow: auto; background: #fff;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; padding: 12px;
}
.xitem {
  width: 104px; padding: 4px 2px; border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 14px; line-height: 1.15; text-align: center; position: relative;
}
.xitem .ico { height: 54px; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.xitem .ico img { max-height: 54px; max-width: 74px; }
.xitem .lbl { padding: 1px 3px; overflow-wrap: anywhere; pointer-events: none; }
.xitem.sel .lbl { background: var(--navy); color: #fff; outline: 1px dotted #000; }
.xitem.sel .ico img { filter: brightness(.7) sepia(1) hue-rotate(185deg) saturate(4); }
.xitem .badge-new { position: absolute; top: 0; right: 14px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 0 4px; transform: rotate(8deg); }
.xpreview { width: 240px; flex: none; background: #fff; padding: 12px; overflow: auto; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.xpreview img.thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #000; }
.xpreview h3 { margin: 0; font-size: 19px; }
.xpreview p { margin: 0; line-height: 1.35; }

/* ---------- plateformes (Figma : plateformes) ---------- */
.plat { flex: 1; display: grid; grid-template-columns: 220px 1fr; gap: 14px; padding: 4px 6px 6px; }
.plat-cover { background: #fff; padding: 6px; display: grid; place-items: center; }
.plat-cover img { width: 100%; height: auto; }
.plat-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.plat-right h2 { margin: 6px 0 0; font-size: 26px; font-weight: 700; }
.tiles { flex: 1; background: #fff; display: grid; grid-template-columns: repeat(3, 1fr); padding: 10px 8px; gap: 6px; align-items: start; }
.tile { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0; }
.tile .logo { width: 116px; height: 104px; display: grid; place-items: center; }
.tile .logo img { max-width: 96px; max-height: 96px; transition: transform .1s steps(2); }
.tile .name { width: 100%; padding: 3px 4px; font-size: 18px; text-align: center; }
.tile.sel .logo { background: var(--navy); }
.tile.sel .name { background: var(--navy); color: #fff; font-weight: 700; }
.tile:hover .logo img { transform: scale(1.06) rotate(-2deg); }
.plat-sub { display: flex; align-items: center; gap: 10px; font-size: 15px; }

/* ---------- bloc-notes ---------- */
.note { flex: 1; min-height: 0; background: #fff; padding: 10px 12px; overflow: auto; font-size: 19px; line-height: 1.35; white-space: pre-wrap; outline: none; }
.note .caret { display: inline-block; width: 2px; height: 1.1em; background: #000; vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
textarea.note { border: 0; resize: none; font: inherit; font-size: 19px; }

/* ---------- lecteurs ---------- */
.player { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.screen-box { flex: 1; min-height: 120px; background: #000; position: relative; overflow: hidden; }
.screen-box video, .screen-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border: 0; background: #000; }
.screen-box .viseur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; opacity: .9; }
.screen-box .bigplay { position: absolute; inset: 0; margin: auto; width: 84px; height: 70px; border: 0; background: url("../img/btn_play.webp") center / contain no-repeat; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.4)); }
.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mag { position: relative; height: 40px; width: 186px; flex: none; background: url("../img/mag_commandes.webp") center / contain no-repeat; display: flex; }
.mag-zone { flex: 1; border: 0; background: transparent; padding: 0; }
.mag-zone:active { background: rgba(0,0,0,.18); border-radius: 4px; }
.seek { flex: 1; min-width: 120px; height: 30px; position: relative; touch-action: none; }
.seek::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 5px; box-shadow: inset 1px 1px var(--dark), inset -1px -1px #fff, inset 2px 2px #0a0a0a; background: #fff; }
.seek .thumb { position: absolute; top: 1px; width: 18px; height: 28px; margin-left: -9px; background: url("../img/mag_curseur_lecture.webp") center / contain no-repeat; pointer-events: none; }
.lcd { background: #000; color: #2bff3c; font-size: 15px; padding: 4px 8px; display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; overflow: hidden; }
.lcd .scroll { overflow: hidden; text-overflow: ellipsis; }
.osc { width: 100%; height: 100%; display: block; }
.osc-box { height: 96px; background: #000; padding: 3px; }

/* vocal / appel (Figma inserts) */
.vocal { display: flex; gap: 12px; padding: 6px; align-items: stretch; }
.avatar-box { width: 104px; height: 104px; flex: none; background: #fff; display: grid; place-items: center; overflow: hidden; }
.avatar-box img { max-width: 92%; max-height: 92%; }
.vocal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vocal-main .who { font-weight: 700; font-size: 22px; }
.vocal-main .what { font-size: 15px; }
.vocal-line { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.pp { width: 44px; height: 36px; border: 0; flex: none; background: url("../img/btn_play.webp") center / contain no-repeat; }
.pp.playing { background-image: url("../img/btn_pause.webp"); }
.pp:active { transform: translate(1px,1px); }
.bars { flex: 1; height: 34px; display: flex; align-items: center; gap: 2px; background: #fff; padding: 0 6px; min-width: 0; overflow: hidden; }
.bars i { flex: 1; min-width: 2px; background: var(--navy); }
.bars i.on { background: var(--red); }
.vtime { font-size: 14px; }
.ringing .avatar-box img { animation: wobble .5s steps(4) infinite; }
@keyframes wobble { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.04); } }

/* image viewer */
.viewer { flex: 1; min-height: 0; background: #fff; display: grid; place-items: center; padding: 10px; overflow: hidden; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* abonnement (Figma abonnement) */
.abo { display: flex; gap: 14px; align-items: center; padding: 6px 8px; }
.abo .avatar-round { width: 92px; height: 92px; flex: none; }
.abo h3 { margin: 0; font-size: 24px; }
.abo p { margin: 2px 0 8px; font-size: 15px; }
.bell { width: 34px; height: 34px; border: 0; display: inline-grid; place-items: center; font-size: 18px; }
.bell svg { width: 20px; height: 20px; }
.bell.ring svg { animation: wobble .25s steps(2) 6; }

/* propriétés d'affichage */
.props { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 8px; }
.monitor { width: 200px; margin: 0 auto; }
.monitor .scr { width: 170px; height: 112px; margin: 0 auto; border: 8px solid var(--gray); box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #000; background-size: cover; background-position: center; }
.monitor .foot { width: 70px; height: 12px; margin: 0 auto; background: var(--gray); box-shadow: inset -1px -1px #000, inset 1px 1px #fff; }
.listbox { background: #fff; height: 110px; overflow: auto; padding: 2px; }
.listbox div { padding: 2px 6px; }
.listbox div.sel { background: var(--navy); color: #fff; }

/* ---------- barre des tâches ---------- */
#taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--task-h);
  z-index: 9500;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 4px 3px;
  background: var(--gray);
  box-shadow: inset 0 1px var(--light), inset 0 2px #fff;
}
#start { height: 38px; flex: none; }
#start img { width: 26px; height: 26px; }
#start.pressed { filter: brightness(.9); transform: translateY(1px); }
#tasks { flex: 1; min-width: 0; display: flex; gap: 4px; overflow: hidden; }
.task {
  flex: 0 1 190px; min-width: 40px; height: 36px; border: 0;
  display: flex; align-items: center; gap: 6px; padding: 0 8px;
  background: var(--gray); font-size: 15px; text-align: left;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px var(--dark), inset 2px 2px var(--light);
}
.task img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.task span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task.active {
  font-weight: 700;
  background: repeating-conic-gradient(#fff 0 25%, var(--gray) 0 50%) 0 0 / 2px 2px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px var(--light), inset 2px 2px var(--dark);
}
#tray {
  flex: none; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  box-shadow: inset 1px 1px var(--dark), inset -1px -1px #fff;
  font-size: 15px;
}
#tray button { border: 0; background: none; padding: 0; display: grid; place-items: center; position: relative; }
#tray img { width: 22px; height: 22px; object-fit: contain; }
#vol.muted::after { content: ""; position: absolute; inset: 2px; background: linear-gradient(45deg, transparent 44%, var(--red) 44% 58%, transparent 58%); }
#clock { min-width: 44px; text-align: center; }

/* ---------- menu Démarrer ---------- */
#startmenu {
  position: absolute; left: 2px; bottom: calc(var(--task-h) - 2px); z-index: 9600;
  width: 300px; display: flex; padding: 3px;
  background: var(--gray);
  box-shadow: inset -2px -2px #0a0a0a, inset 2px 2px var(--light), inset -4px -4px var(--dark), inset 4px 4px #fff, 6px 6px 0 rgba(0,0,0,.2);
  animation: sm-in .12s steps(3);
}
@keyframes sm-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.sm-banner {
  width: 34px; flex: none; margin: 2px;
  background: linear-gradient(0deg, var(--navy), #1084d0);
  color: #fff; font-weight: 700; font-size: 22px;
  writing-mode: vertical-rl; transform: rotate(180deg);
  padding: 10px 0; display: flex; align-items: center; gap: 4px;
}
.sm-banner b { color: #ff6ec7; }
.sm-items { flex: 1; display: flex; flex-direction: column; padding: 2px 0; }
.sm-item { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 5px 10px; font-size: 17px; text-align: left; min-height: 44px; }
.sm-item img { width: 32px; height: 32px; object-fit: contain; flex: none; }
.sm-item:hover, .sm-item:focus-visible { background: var(--navy); color: #fff; outline: none; }

/* ---------- menu contextuel ---------- */
.ctx {
  position: absolute; z-index: 9800; min-width: 190px; padding: 3px;
  background: var(--gray);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px var(--light), inset -2px -2px var(--dark), inset 2px 2px #fff, 3px 3px 0 rgba(0,0,0,.2);
}
.ctx-item { display: block; width: 100%; border: 0; background: none; text-align: left; padding: 4px 22px; font-size: 15px; }
.ctx-item:hover { background: var(--navy); color: #fff; }
.ctx-item.dis { color: var(--dark); text-shadow: 1px 1px #fff; pointer-events: none; }

/* ---------- notifications (bulles) ---------- */
#toasts { position: absolute; right: 10px; bottom: calc(var(--task-h) + 12px); z-index: 9700; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; position: relative;
  width: 330px; max-width: calc(100vw - 20px);
  background: var(--tip); border: 1px solid #000; border-radius: 9px;
  padding: 9px 30px 10px 12px; font-size: 15px; line-height: 1.3;
  box-shadow: 3px 3px 0 rgba(0,0,0,.25);
  animation: toast-in .25s steps(4);
}
.toast::after { content: ""; position: absolute; right: 46px; bottom: -11px; border: 6px solid transparent; border-top: 6px solid #000; border-left-width: 10px; }
.toast-h { display: flex; align-items: center; gap: 7px; font-weight: 700; margin-bottom: 3px; font-size: 16px; }
.toast-h img { width: 22px; height: 22px; object-fit: contain; }
.toast-x { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border: 1px solid var(--dark); background: var(--tip); font: 700 12px/14px Arial, sans-serif; padding: 0; }
.toast.out { animation: toast-out .2s steps(3) forwards; }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(14px); opacity: 0; } }

/* ---------- Audran l'assistant ---------- */
#clippy { position: absolute; right: 18px; bottom: calc(var(--task-h) + 10px); z-index: 9650; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
#clippy .bubble {
  width: 270px; background: var(--tip); border: 1px solid #000; border-radius: 10px;
  padding: 10px 12px; font-size: 15px; line-height: 1.3; position: relative;
  box-shadow: 3px 3px 0 rgba(0,0,0,.2);
}
#clippy .bubble::after { content: ""; position: absolute; right: 48px; bottom: -12px; border: 7px solid transparent; border-top-color: #000; }
#clippy .bubble .btn-row { padding: 8px 0 0; justify-content: flex-start; }
#clippy .bubble .btn { min-width: 0; font-size: 15px; }
#clippy-img { width: 104px; filter: drop-shadow(3px 4px 0 rgba(0,0,0,.3)); animation: bob 1.6s steps(4) infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-3deg); } }

/* ---------- Gaspard (compagnon de bureau) ---------- */
#pet { position: absolute; z-index: 9400; left: 0; top: 0; height: 92px; touch-action: none; will-change: transform; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.3)); }
#pet img { height: 100%; width: auto; display: block; }
#pet-say { position: absolute; z-index: 9401; background: #fff; border: 1px solid #000; border-radius: 8px; padding: 4px 8px; font-size: 14px; white-space: nowrap; pointer-events: none; box-shadow: 2px 2px 0 rgba(0,0,0,.25); }
.runner { position: absolute; z-index: 9399; height: 70px; pointer-events: none; }

/* ---------- écrans plein (boot / BSOD / arrêt / veille) ---------- */
#overlay { position: absolute; inset: 0; z-index: 10000; }
#overlay:empty { display: none; }
.boot-bios { position: absolute; inset: 0; background: #000; color: #c0c0c0; font-size: 18px; padding: 28px 32px; line-height: 1.5; white-space: pre-wrap; }
.boot-bios .logo-bios { position: absolute; right: 28px; top: 24px; width: 120px; opacity: .9; }
.boot-splash { position: absolute; inset: 0; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: #fff; }
.boot-splash img { width: min(300px, 60vw); animation: bob 1.4s steps(4) infinite; }
.boot-splash h1 { margin: 0; font-size: clamp(28px, 6vw, 46px); letter-spacing: 2px; }
.boot-splash h1 b { color: #ff6ec7; }
.boot-splash p { margin: 0; color: #9fb4ff; font-size: 16px; }
.boot-bar { width: min(320px, 70vw); height: 22px; padding: 3px; border: 2px solid #9fb4ff; overflow: hidden; position: relative; }
.boot-bar i { position: absolute; top: 3px; bottom: 3px; width: 80px; left: -80px; background: repeating-linear-gradient(90deg, #4f7cff 0 14px, transparent 14px 18px); animation: boot-run 1.2s steps(16) infinite; }
@keyframes boot-run { to { left: 100%; } }
.boot-login { position: absolute; inset: 0; background: var(--teal); display: grid; place-items: center; padding: 16px; }
.boot-login .win { position: relative; width: min(470px, 100%); animation: none; }
.login-grid { display: flex; gap: 14px; padding: 12px 10px 4px; align-items: center; }
.login-grid img { width: 84px; flex: none; }
.login-fields { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; font-size: 16px; }
.login-fields .field { padding: 4px 6px; }
.bsod { position: absolute; inset: 0; background: #0000aa; color: #fff; display: grid; place-items: center; padding: 24px; font-size: clamp(15px, 2.2vw, 20px); line-height: 1.5; }
.bsod > div { max-width: 760px; white-space: pre-wrap; }
.bsod .tag { display: block; width: max-content; margin: 0 auto 22px; background: #aaa; color: #0000aa; padding: 0 10px; font-weight: 700; }
.bsod .blink { animation: blink 1s steps(1) infinite; }
.shutdown { position: absolute; inset: 0; background: #000; display: grid; place-items: center; text-align: center; padding: 24px; }
.shutdown p { color: #ff9a1f; font-size: clamp(20px, 3.4vw, 34px); margin: 0 0 14px; }
.shutdown small { color: #777; font-size: 15px; }
.saver { position: absolute; inset: 0; background: #000; overflow: hidden; }
.saver img { position: absolute; width: 200px; }
.saver small { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; color: #555; font-size: 14px; }

/* ---------- responsive : mode téléphone ---------- */
body.mobile { --task-h: 54px; --tb-h: 32px; }
body.mobile #desktop { background-image: url("../img/wallpaper_m.webp"); }
body.mobile #desktop.wp-teal { background-image: none; }
body.mobile #desktop.wp-gaspard { background-image: url("../img/gaspard_bras.webp"); }
body.mobile #desktop.wp-complot { background-image: url("../img/complotiste.webp"); }
body.mobile .icon { width: 25%; padding: 6px 2px; }
body.mobile .icon .lbl { font-size: 14px; max-width: 100%; }
body.mobile .win { left: 6px !important; right: 6px; top: 6px !important; width: auto !important; max-height: calc(100% - 12px); }
body.mobile .win.fill { height: calc(100% - 12px) !important; }
body.mobile .win.dialog { top: 50% !important; transform: translateY(-50%); animation: none; }
body.mobile .win.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; transform: none; }
body.mobile .grip, body.mobile .wb-max { display: none; }
body.mobile .task span { display: none; }
body.mobile .task { flex: 0 0 44px; justify-content: center; padding: 0; }
body.mobile #start span { display: none; }
body.mobile #start { padding: 0 12px; }
body.mobile #startmenu { left: 0; right: 0; width: auto; bottom: var(--task-h); }
body.mobile .sm-item { min-height: 50px; }
body.mobile #toasts { left: 8px; right: 8px; top: 8px; bottom: auto; align-items: stretch; }
body.mobile .toast { width: auto; }
body.mobile .toast::after { display: none; }
body.mobile #clippy-img { width: 76px; }
body.mobile #clippy .bubble { width: min(270px, calc(100vw - 40px)); }
body.mobile #pet { height: 70px; }
body.mobile .plat { grid-template-columns: 1fr; align-content: start; }
body.mobile .plat-cover { width: 140px; height: 140px; margin: 0 auto; padding: 4px; }
body.mobile .plat-cover { display: block; }
body.mobile .plat-cover img { width: 100%; height: 100%; object-fit: contain; }
body.mobile .tiles { flex: none; }
body.mobile .screen-box { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
body.mobile #pet { z-index: 50; }
body.mobile .tile .logo { width: 84px; height: 80px; }
body.mobile .tile .logo img { max-width: 70px; max-height: 70px; }
body.mobile .tile .name { font-size: 15px; }
body.mobile .xview { flex-direction: column; }
body.mobile .xpreview { width: auto; max-height: 45%; }
body.mobile .xitem { width: 88px; }
body.mobile .vocal { flex-wrap: wrap; }
body.mobile .avatar-box { width: 80px; height: 80px; }
body.mobile .controls .lcd { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .win, .toast, #startmenu, #clippy-img, .boot-splash img { animation: none !important; }
}

/* les bulles passent au-dessus d'Audran quand il parle */
body:has(#clippy) #toasts { bottom: calc(var(--task-h) + 250px); }
body.mobile:has(#clippy) #toasts { bottom: auto; }

/* ---------- fenêtres de liens (contenu à venir) ---------- */
.frame-box { background: radial-gradient(ellipse at center, #1d2f7a 0%, #0a1033 75%); }
.frame-overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; z-index: 2; }
.frame-inner { position: absolute; inset: 7% 4.5%; z-index: 1; }
.frame-inner iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.frame-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; text-align: center; padding: 8% 10%; z-index: 1; }
.frame-gaspard { height: 48%; max-height: 190px; width: auto; filter: drop-shadow(3px 4px 0 rgba(0,0,0,.35)); }
.frame-gaspard.small { height: 72px; }
.frame-msg { font-weight: 700; font-size: clamp(16px, 2.4vw, 24px); text-shadow: 2px 2px 0 #000; }
.frame-sub { font-size: 15px; color: #9fb4ff; }
.frame-sub.dark { color: #000; }
.dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.thumb.buffering { animation: buffer 2.4s steps(24) infinite alternate; }
@keyframes buffer { from { left: 0%; } to { left: 100%; } }
.progress { position: relative; overflow: hidden; }
.progress-fill.indet { position: absolute; top: 3px; bottom: 3px; width: 34%; animation: indet 1.8s steps(18) infinite; transition: none; }
@keyframes indet { from { left: -34%; } to { left: 100%; } }

.frame-audio { display: flex; gap: 14px; padding: 6px; align-items: stretch; }
.frame-audio .avatar-box { width: 150px; height: 150px; }
.frame-audio-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.frame-audio .who { font-weight: 700; font-size: 22px; }
.frame-logo { width: 56px; height: 56px; object-fit: contain; flex: none; }
.frame-audio-foot { gap: 10px; }
.frame-embed-audio { background: #fff; padding: 3px; }
.frame-embed-audio iframe { display: block; width: 100%; height: 152px; border: 0; }

.ie-bar { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 0 6px; }
.ie-btn { min-width: 0; min-height: 26px; padding: 2px 9px; font-size: 14px; }
.ie-btn:active { padding: 3px 8px 1px 10px; }
.ie-page { flex: 1; min-height: 0; background: #fff; overflow: auto; position: relative; }
.ie-page > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.construction { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px; text-align: center; }
.construction .frame-gaspard { height: 150px; }
.construction h3 { margin: 0; font-size: 22px; }
.construction p { margin: 0; }
.construction .small { font-size: 14px; }
.stripes { width: 100%; padding: 6px; font-weight: 700; font-size: 18px; color: #fff; letter-spacing: 1px;
  background: repeating-linear-gradient(45deg, #ffd800 0 16px, #111 16px 32px);
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.counter { background: #000; color: #2bff3c; padding: 1px 6px; letter-spacing: 2px; }

body.mobile .frame-audio { flex-wrap: wrap; }
body.mobile .frame-audio .avatar-box { width: 96px; height: 96px; }
body.mobile .ie-page { min-height: 300px; }

/* boutons « invisibles » (zones cliquables des fenêtres de liens) */
.frame-wait, .frame-click { border: 0; background: none; font: inherit; color: inherit; padding: 0; }
.frame-wait { color: #fff; }
.ie-page.stopped *, .ie-page.stopped *::after { animation-play-state: paused !important; }

/* champs texte */
input { font: inherit; user-select: text; -webkit-user-select: text; cursor: text; }

/* dernier épisode (fenêtre plateformes) */
.latest-ep { border: 0; background: none; padding: 0; font-size: 15px; text-align: left; text-decoration: underline; color: var(--navy); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.plat-sub { flex-wrap: wrap; }
.xpreview .small { font-size: 13px; color: #333; margin: 0; }

/* =========================================================
   Audit mobile — correctifs
   ========================================================= */
body { -webkit-touch-callout: none; }

/* zones de sécurité iPhone (encoche, barre d'accueil) */
body.mobile { --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-t: env(safe-area-inset-top, 0px); }
body.mobile #taskbar { height: calc(var(--task-h) + var(--safe-b)); padding-bottom: calc(3px + var(--safe-b)); padding-left: calc(4px + var(--safe-l)); padding-right: calc(4px + var(--safe-r)); }
body.mobile #icons, body.mobile #windows { bottom: calc(var(--task-h) + var(--safe-b)); left: var(--safe-l); right: var(--safe-r); top: var(--safe-t); }
body.mobile #startmenu { bottom: calc(var(--task-h) + var(--safe-b)); left: var(--safe-l); right: var(--safe-r); }
body.mobile #toasts { top: calc(8px + var(--safe-t)); left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); }
body.mobile #clippy { bottom: calc(var(--task-h) + var(--safe-b) + 10px); right: calc(14px + var(--safe-r)); }

/* zones tactiles d'au moins 32 px */
body.mobile { --tb-h: 38px; }
body.mobile .win-title-text { font-size: 17px; }
body.mobile .wb { width: 36px; height: 31px; }
body.mobile .wb-close { width: 35px; }
#tray button { min-width: 32px; min-height: 32px; }
body.mobile .toast-x { width: 32px; height: 32px; top: 2px; right: 2px; font-size: 16px; line-height: 30px; }
body.mobile .toast { padding-right: 40px; }
body.mobile .latest-ep { flex: 1 1 100%; min-height: 32px; white-space: normal; text-align: left; }
body.mobile input[type="radio"] { width: 22px; height: 22px; margin: 0 6px 0 0; flex: none; }
body.mobile label.row { min-height: 36px; }
body.mobile .btn { min-width: 0; padding: 4px 12px; min-height: 34px; }
body.mobile .btn:active { padding: 5px 11px 3px 13px; }
body.mobile .ie-btn { min-height: 32px; }

/* menu Démarrer : jamais plus haut que l'écran */
body.mobile #startmenu { max-height: calc(100% - var(--task-h) - var(--safe-b) - 6px); }
body.mobile .sm-items { overflow-y: auto; overscroll-behavior: contain; }
body.mobile .sm-banner { position: sticky; top: 0; }

/* fenêtres : le contenu défile au lieu d'être coupé */
body.mobile .win-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.mobile .win:not(.fill) .win-body > * { flex-shrink: 0; }
body.mobile .screen-box { max-height: 58vh; }
body.mobile .seek { margin: 0 9px; }

/* petits écrans (320 px) */
body.mobile .abo { flex-wrap: wrap; }
body.mobile .abo .avatar-round { width: 64px; height: 64px; }
body.mobile .abo .row { flex-wrap: wrap; }
body.mobile .vocal-main .row { flex-wrap: wrap; gap: 6px; }
body.mobile .bars { gap: 1px; }
body.mobile .bars i { min-width: 1px; }
body.mobile .dlg { padding: 12px 6px 4px; gap: 10px; }

/* téléphone en paysage : on profite de la largeur */
@media (orientation: landscape) and (max-height: 500px) {
  body.mobile { --task-h: 46px; }
  body.mobile .plat { grid-template-columns: 150px 1fr; }
  body.mobile .plat-cover { width: 150px; height: 150px; }
  body.mobile .screen-box { max-height: 52vh; }
  body.mobile .xview { flex-direction: row; }
  body.mobile .xpreview { width: 240px; max-height: none; }
  body.mobile .sm-item { min-height: 40px; }
  body.mobile .frame-gaspard { max-height: 90px; }
  body.mobile .construction .frame-gaspard { height: 90px; }
}

/* téléphones courts (iPhone SE, 320 px) : cover plus compacte */
@media (max-height: 700px) and (orientation: portrait) {
  body.mobile .plat-cover { width: 104px; height: 104px; }
  body.mobile .plat-right h2 { font-size: 22px; margin-top: 2px; }
  body.mobile .tile .logo { height: 68px; }
  body.mobile .tile .logo img { max-height: 60px; }
}

/* =========================================================
   Jeux
   ========================================================= */
/* Démineur */
.mine-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 4px 4px; overflow-x: auto; }
.mine-head { align-self: stretch; display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; }
.lcd7 { background: #000; color: #ff2a2a; font: 700 24px/1 var(--font); padding: 3px 6px 2px; letter-spacing: 2px; min-width: 56px; text-align: center; text-shadow: 0 0 4px rgba(255, 42, 42, .6); }
.mine-face { width: 42px; height: 42px; padding: 3px; border: 0; display: grid; place-items: center; background: var(--gray);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px var(--dark), inset 2px 2px var(--light); }
.mine-face:active { box-shadow: inset 1px 1px #0a0a0a, inset -1px -1px #fff; }
.mine-face img { max-width: 34px; max-height: 34px; object-fit: contain; }
.mine-grid { display: grid; padding: 3px; background: var(--gray); }
.mcell { width: var(--cell); height: var(--cell); border: 0; padding: 0; position: relative; display: grid; place-items: center;
  background: var(--gray); font: 700 calc(var(--cell) * .62)/1 var(--font);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px var(--dark), inset 2px 2px var(--light); }
.mcell.open { box-shadow: inset 1px 1px var(--dark); }
.mcell img { width: 82%; height: 82%; object-fit: contain; }
.mcell.boom { background: var(--red); }
.mcell.wrong { background: #ffb3b3; }
.mcell.flag::before { content: ""; position: absolute; left: 36%; top: 18%; width: 2px; height: 62%; background: #000; }
.mcell.flag::after { content: ""; position: absolute; left: calc(36% + 2px); top: 18%; border-left: calc(var(--cell) * .34) solid var(--red); border-top: calc(var(--cell) * .17) solid transparent; border-bottom: calc(var(--cell) * .17) solid transparent; }
.mcell[data-n="1"] { color: #0000ff; } .mcell[data-n="2"] { color: #008000; } .mcell[data-n="3"] { color: #ff0000; } .mcell[data-n="4"] { color: #000080; }
.mcell[data-n="5"] { color: #800000; } .mcell[data-n="6"] { color: #008080; } .mcell[data-n="7"] { color: #000; } .mcell[data-n="8"] { color: #808080; }
.mine-flag { font-size: 14px; }
.mine-flag.pressed { box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px var(--light), inset 2px 2px var(--dark); background: repeating-conic-gradient(#fff 0 25%, var(--gray) 0 50%) 0 0 / 2px 2px; }

/* Solitaire */
.sol-board { flex: 1; min-height: 300px; position: relative; overflow: hidden; touch-action: manipulation;
  background: radial-gradient(ellipse at 50% 30%, #0f9a3a 0%, #007a28 60%, #005c1e 100%); }
.slot { position: absolute; border: 2px solid rgba(255, 255, 255, .35); border-radius: 6px; display: grid; place-items: center; color: rgba(255, 255, 255, .45); font-weight: 700; }
.card { position: absolute; border-radius: 6px; border: 1px solid #111; background: #fff; overflow: hidden; line-height: 1; box-shadow: 1px 2px 0 rgba(0, 0, 0, .35); font-family: var(--font); color: #111; }
.card.red { color: #d40000; }
.card.back { background: url("../img/avatar_tmi.webp") center / 62% no-repeat, repeating-conic-gradient(#000080 0 25%, #1a3fb0 0 50%) 0 0 / 10px 10px; border: 2px solid #fff; outline: 1px solid #111; }
.c-tl, .c-br { position: absolute; text-align: center; font-weight: 700; }
.c-tl { left: 3px; top: 3px; }
.c-br { right: 3px; bottom: 3px; transform: rotate(180deg); }
.c-mid { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.3em; }
.c-img { position: absolute; left: 20%; top: 20%; width: 60%; height: 62%; object-fit: contain; }
.card.sel { background-color: #c6d4ff; box-shadow: 0 0 0 2px #ffde00, 1px 2px 0 rgba(0, 0, 0, .35); }
.sol-finish { position: absolute; left: 14px; bottom: 44px; z-index: 3; }
.sol-cv { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; }
.win-body { position: relative; }
body.mobile .sol-board { min-height: 62vh; }


/* =========================================================
   V4 : typo pixel réservée aux titres de fenêtres / onglets
   ========================================================= */
.win-title-text, .task, #start, .sm-banner { font-family: var(--font-pixel); -webkit-font-smoothing: none; letter-spacing: 0; }
.lcd, .lcd7 { font-family: var(--font); }

/* Ne pas déranger */
#dnd svg { width: 20px; height: 20px; fill: none; stroke: #444; stroke-width: 2; }
#dnd.on svg { fill: #000080; stroke: #000080; }
#dnd.on::after { content: "z"; position: absolute; right: 2px; top: -2px; font: 700 11px var(--font); color: #000080; }
body.dnd #pet, body.dnd #pet-say, body.dnd .runner { display: none !important; }
fieldset.group { border: 0; margin: 4px 0 0; padding: 12px 10px 10px; box-shadow: inset 1px 1px var(--dark), inset -1px -1px #fff, inset 2px 2px #fff, inset -2px -2px var(--dark); position: relative; }
fieldset.group legend { padding: 0 4px; font-size: 14px; }
label.check { align-items: flex-start; gap: 8px; font-size: 15px; line-height: 1.25; }
label.check input { margin-top: 2px; width: 18px; height: 18px; flex: none; }
label.check small { color: #333; }

/* Épisodes : grille des vidéos YouTube */
.yt-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 10px; flex: none; }
.yt-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--dark); flex: none; }
.yt-chan { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.yt-chan b { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-chan small { font-size: 14px; color: #333; }
.yt-grid { flex: 1; min-height: 0; overflow: auto; background: #fff; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 12px; padding: 12px; align-content: start; }
.yt-tile { border: 0; background: none; padding: 4px; display: flex; flex-direction: column; gap: 5px; text-align: left; min-width: 0; }
.yt-tile:hover, .yt-tile:focus-visible { background: var(--navy); color: #fff; outline: none; }
.yt-tile:hover .yt-meta, .yt-tile:focus-visible .yt-meta { color: #cfd6ff; }
.yt-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; overflow: hidden; box-shadow: inset 0 0 0 1px #000; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-dur { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .85); color: #fff; font-size: 13px; font-weight: 700; padding: 1px 4px; }
.yt-thumb .badge-new { position: absolute; top: 4px; left: 4px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 5px; box-shadow: 1px 1px 0 #000; }
.yt-title { font-size: 16px; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.yt-meta { font-size: 13px; color: #555; }
.yt-more .yt-thumb img { object-fit: cover; filter: saturate(1.1); }
body.mobile .yt-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 8px; padding: 8px; }
body.mobile .yt-head .btn-red { padding: 6px 10px; }

/* plateformes : cases de taille identique (« Apple Podcasts » sur 2 lignes ne fait plus grandir la sélection) */
.tile { align-self: stretch; }
.tile .name { flex: 1; min-height: 2.5em; display: flex; align-items: center; justify-content: center; line-height: 1.15; }
.tile .logo, .tile .name { transition: none; }
.tiles { align-items: stretch; }

.win:focus { outline: none; }

/* plateformes : 3 cases (Spotify, Deezer, Apple Podcasts) */
.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px 8px; }
.tile .logo { width: 100%; max-width: 116px; }
.tile .logo img { max-width: 84%; max-height: 92px; }
.tile .name { font-size: 17px; }
body.mobile .tile .logo { width: 100%; max-width: 84px; }
body.mobile .tile .name { font-size: 14px; }

/* mobile : à l'arrivée, les fenêtres TMI empilées (aucune superposition), puis les icônes */
#mstack { position: absolute; inset: var(--safe-t, 0) var(--safe-r, 0) calc(var(--task-h) + var(--safe-b, 0px)) var(--safe-l, 0);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 12px; padding: 10px 8px 0; }
#mstack .win.stacked { position: relative; left: auto !important; top: auto !important; right: auto;
  width: auto !important; height: auto !important; max-height: none; transform: none; flex: none; }
#mstack .win.stacked.min { display: none; }
#mstack .win.stacked .win-body { overflow: visible; }
body.stack #mstack #icons { position: relative; inset: auto; flex: none; margin: 0 -8px; }
#mstack .win.stacked .xpreview { display: none; }
