/* ============ tokens ============ */
:root {
  --void: #000000;
  --bone: #e8e4ee;
  --glow: #9a9cff;
  --bruise: #3a2152;
  --accent: #ff4d6d;
  --glass: #cfe0f2;
  --glass-2: #a9c4e4;
  --grey: #c0c0c0;
  --ink: #000000;
  --dim: #9b95a8;

  --jp: "DotGothic16", "MS PGothic", "MS Gothic", monospace;
  --bubble: "Rampart One", "DotGothic16", sans-serif;
  --body: Verdana, Tahoma, "MS PGothic", sans-serif;

  --bg-img: none; /* rempli par main.js depuis config.fond */
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--void);
  /* fond : image perso en N&B + rayures grattées + trame */
  background-image:
    radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px),
    repeating-linear-gradient(112deg, transparent 0 38px, rgba(255,255,255,.05) 38px 39px, transparent 39px 71px),
    repeating-linear-gradient(-63deg, transparent 0 90px, rgba(255,255,255,.04) 90px 92px),
    linear-gradient(rgba(0,0,0,.3), rgba(0,0,0,.3)),
    var(--bg-img);
  background-size: 4px 4px, auto, auto, auto, cover;
  background-attachment: fixed;
  color: var(--bone);
  font: 11px/1.55 var(--body);
  overflow-x: hidden;
}
body::before { /* grain par-dessus tout */
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: .13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .8 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--glow); }
a:visited { color: var(--accent); }
a:hover { color: #fff; background: var(--bruise); }

:focus-visible { outline: 2px dotted var(--accent); outline-offset: 2px; }

.tiny { font-size: 10px; margin: 2px 0; }
.dim { color: var(--dim); }
.center { text-align: center; }
p { margin: 0 0 8px; }

/* ============ fenêtres ============ */
.win {
  position: relative;
  border: 1px solid var(--glow);
  box-shadow: 3px 3px 0 rgba(0,0,0,.85);
  margin-bottom: 14px;
}
.win.dark { background: rgba(0,0,0,.88); }
.win.light { background: #f4f3f7; color: var(--ink); border-color: #6d7fa6; }
.win.light a { color: #2338a8; }

.titlebar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px;
  height: 20px;
  padding: 0 4px 0 6px;
  background: linear-gradient(var(--glass), var(--glass-2));
  border-bottom: 1px solid #6d7fa6;
  color: #10213f;
  font: 11px var(--jp);
  user-select: none;
}
.win.dark .titlebar { background: linear-gradient(#2c2c3a, #0d0d14); color: var(--bone); border-bottom-color: var(--glow); }
.tb-btns { display: flex; gap: 2px; }
.tb-btns i, .tb-close {
  font-style: normal;
  width: 15px; height: 13px;
  display: grid; place-items: center;
  font-size: 9px; line-height: 1;
  background: var(--grey); color: #000;
  border: 1px solid; border-color: #fff #404040 #404040 #fff;
}
.tb-close { width: 18px; height: 15px; font-size: 12px; cursor: pointer; padding: 0; }
.tb-btns i:last-child { background: #c8433a; color: #fff; }

.win-body { padding: 8px 10px; }

.menubar {
  display: flex; gap: 14px;
  padding: 2px 8px;
  border-bottom: 1px solid #2b2b38;
  font-size: 11px; color: var(--bone);
}

/* fenêtres déplaçables : la barre de titre sert de poignée */
.desk-on .titlebar { cursor: move; }
.win.dragging { opacity: .92; }

/* ============ boutons ============ */
.bevel {
  font: 11px var(--body);
  min-width: 56px;
  padding: 3px 10px;
  background: var(--grey); color: #000;
  border: 2px solid; border-color: #fff #404040 #404040 #fff;
  cursor: pointer;
}
.bevel:active { border-color: #404040 #fff #fff #404040; }

/* ============ en-tête ============ */
.top { max-width: 980px; margin: 18px auto 14px; padding: 0 16px; }
@media (min-width: 1000px) { .top { padding: 0; } }
.banner-win { margin-bottom: 6px; width: fit-content; max-width: 100%; }
.banner { position: relative; line-height: 0; background: #000; min-height: 40px; }
.banner img { display: block; height: 154px; width: auto; max-width: 100%; object-fit: cover; }
@media (max-width: 999px) { .banner img { height: auto; width: 100%; } }
.banner.no-img { min-width: min(500px, 100%); }
.jp-title {
  position: absolute; left: 16px; bottom: 10px;
  margin: 0; line-height: 1.2;
  font: 30px var(--jp);
  color: #fff;
  letter-spacing: .04em;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 0 0 12px var(--glow);
}

.strip { overflow: hidden; }
.strip-track { display: flex; align-items: center; width: max-content; }
.strip-track > * { flex: none; margin-right: 14px; }
.strip-track.scrolling { animation: strip-run var(--dur, 30s) linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
@keyframes strip-run { to { transform: translateX(calc(-1 * var(--set, 50%))); } }
.strip.has-bg {
  padding: 8px 0 8px 12px;
  min-height: 52px;
  background-size: cover;
  background-position: center;
  border: 2px solid #7f86ff;
  border-radius: 10px;
  box-shadow: 0 0 0 1px #000, 3px 3px 0 #000;
}
.b88img { display: block; image-rendering: pixelated; }
.b88 {
  width: 88px; height: 31px;
  display: inline-grid; place-items: center;
  font: bold 9px/1 var(--body);
  letter-spacing: .02em;
  border: 1px solid; border-color: #fff #444 #444 #fff;
  overflow: hidden; white-space: nowrap;
  text-shadow: 1px 1px 0 rgba(0,0,0,.25);
}
.b88.v0 { background: #000; color: #fff; }
.b88.v1 { background: #e8e4ee; color: #000; }
.b88.v2 { background: #000; color: var(--accent); border-color: var(--accent); }
.b88.v3 { background: #1a1a24; color: var(--glow); border-color: var(--glow); }
.b88 { font-family: var(--jp); font-weight: normal; font-size: 11px; text-shadow: none; }
.b88.mine { background: #000; color: #fff; border-color: #fff; font: 13px var(--bubble); }

/* ============ bureau (collage) ============ */
.desktop {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}
.col { display: contents; }

/* ordre mobile : le plus important d'abord */
[data-win="main"] { order: 1; } [data-win="discord"], [data-win="server"] { order: 2; } [data-win="player"] { order: 3; }
[data-win="nav"] { order: 4; } [data-win="chat"] { order: 6; }
[data-win="counter"] { order: 7; } [data-win="updates"] { order: 5; }
.desktop { display: flex; flex-direction: column; }

@media (min-width: 1000px) {
  .desktop {
    display: grid;
    grid-template-columns: 172px 1fr 238px;
    gap: 0 14px;
    max-width: 980px;
    padding: 0;
    align-items: start;
  }
  .col { display: flex; flex-direction: column; }
  .col-l { padding-top: 22px; }
  .col-r { padding-top: 8px; }
  /* chevauchements légers, façon collage */
  .col-m { margin: 0 -12px; }
  [data-win="counter"] { margin-left: 14px; }

  .win { transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot, 0deg)); }

}

/* ============ accueil ============ */
.hero { text-align: center; padding: 22px 14px 18px; }
/* sur grand écran, la fenêtre « art » est la pièce principale : plus d'air autour du logo */
@media (min-width: 1000px) { .hero { padding: 54px 14px 44px; } }
/* logo : trois couches du même mot. Le h1 garde le vrai texte (lisible par les
   lecteurs d'écran) mais transparent ; .lg-stroke = gros contour blanc + ombre
   noire + décalage rouge/bleu ; .lg-fill = lettres remplies avec la bannière */
.logo {
  position: relative;
  display: inline-block;
  margin: 4px 0 0;
  padding: 0 .08em;
  font: 104px/1.05 "Dela Gothic One", var(--jp);
  letter-spacing: -.01em;
  color: transparent;
  transform: rotate(-3deg);
  overflow-wrap: anywhere;
}
.logo .lg-stroke, .logo .lg-fill {
  position: absolute; inset: 0;
  padding: inherit;
  pointer-events: none;
}
.logo .lg-stroke {
  color: #fff;
  -webkit-text-stroke: 14px #fff;
  text-shadow: 6px 7px 0 #000, -3px 0 0 rgba(255,60,90,.6), 3px 0 0 rgba(80,120,255,.6);
}
.logo .lg-fill {
  color: #1b1030;
  background:
    radial-gradient(rgba(255,255,255,.3) 1px, transparent 1.4px) 0 0 / 4px 4px,
    var(--logo-img, none) 30% 40% / 340px auto,
    linear-gradient(#2a1a4a, #8c8cff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (max-width: 560px) { .logo { font-size: 72px; } .logo .lg-stroke { -webkit-text-stroke-width: 10px; } }
.logo:focus { outline: none; }
.hero .links { margin-top: 16px; }

.links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.links a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--bone);
  background: #000;
  color: var(--bone);
  text-decoration: none;
  font: 12px var(--jp);
}
.links a:hover { background: var(--bone); color: #000; }

/* ============ menu ============ */
.nav-body { display: flex; flex-direction: column; gap: 6px; }
.navbtn {
  font: 12px var(--jp);
  padding: 4px 6px;
  background: #000; color: #fff;
  border: 1px solid #fff;
  cursor: pointer;
}
.navbtn:hover { background: #fff; color: #000; }
.navbtn.small { font-size: 10px; border-style: dashed; color: var(--dim); }
@media (max-width: 999px) {
  .nav-body { flex-direction: row; flex-wrap: wrap; }
  .navbtn { flex: 1 1 30%; }
  .navbtn.small { display: none; }
}

/* ============ compteur ============ */
.odo { display: flex; justify-content: center; gap: 2px; margin: 4px 0; }
.odo span {
  width: 15px; height: 22px;
  display: grid; place-items: center;
  background: #000; color: #7dffb0;
  font: 15px var(--jp);
  border: 1px solid #555;
}

/* ============ discord ============ */
.dc-top { display: flex; gap: 10px; align-items: center; }
.dc-ava { position: relative; width: 52px; height: 52px; flex: none; background: #d6d3de; border: 1px solid #6d7fa6; }
.dc-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dot {
  position: absolute; right: -4px; bottom: -4px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 3px solid #f4f3f7;
}
.dot.online { background: #3ba55c; }
.dot.idle { background: #faa61a; }
.dot.dnd { background: #ed4245; }
.dot.offline { background: #747f8d; }
.dc-who { display: flex; flex-direction: column; min-width: 0; }
.dc-who b { font: 14px var(--jp); overflow-wrap: anywhere; }
.dc-user { font-size: 11px; color: #8a8698; overflow-wrap: anywhere; }
.dc-user:empty { display: none; }
.dc-custom { margin: 8px 0 0; font-style: italic; overflow-wrap: anywhere; }
.dc-custom:empty { display: none; }
.dc-act { margin-top: 8px; border-top: 1px dotted #6d7fa6; padding-top: 8px; }
.dc-act:empty { display: none; }
.act { display: flex; gap: 8px; align-items: flex-start; }
.act img { width: 48px; height: 48px; object-fit: cover; flex: none; border: 1px solid #6d7fa6; }
.act-txt { min-width: 0; overflow-wrap: anywhere; }
.act-txt b { display: block; }
.act-kind { font-size: 10px; color: #5a5470; margin-bottom: 2px; }
.sp-bar { height: 4px; background: #d6d3de; margin-top: 6px; }
.sp-bar i { display: block; height: 100%; background: #1db954; width: 0; }

/* ============ serveur discord ============ */
.win-body.sv { padding: 0 0 10px; }
.sv-banner {
  position: relative; height: 72px;
  background: linear-gradient(135deg, #8fa3d8, #5865f2 55%, #2b2f7a) center / cover no-repeat;
  border-bottom: 1px solid #6d7fa6;
}
/* lignes façon vieil écran + reflet, comme la carte de jeu */
.sv-banner::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,0) 45%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 1px, transparent 1px 3px);
}
.sv-head { display: flex; gap: 10px; align-items: flex-end; padding: 0 10px; margin-top: -26px; position: relative; }
.sv-ico {
  width: 56px; height: 56px; flex: none;
  display: grid; place-items: center;
  background: #5865f2; color: #fff; font: 18px var(--jp);
  border: 1px solid #6d7fa6; outline: 3px solid #f4f3f7;
  overflow: hidden;
}
.sv-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv-name { font: 14px var(--jp); overflow-wrap: anywhere; padding-bottom: 2px; min-width: 0; }
.sv-body { padding: 8px 10px 0; }
.sv-jp { font-size: 10px; color: #8a8698; margin: 0 0 6px; }
.sv-desc {
  margin: 0 0 8px; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sv-counts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: #5a5470; margin-bottom: 10px; }
.sv-counts span { display: inline-flex; align-items: center; gap: 5px; }
.sv-counts i { width: 8px; height: 8px; border-radius: 50%; background: #747f8d; }
.sv-counts .on i { background: #3ba55c; }
.win.light a.sv-join {
  display: block; text-align: center; text-decoration: none;
  padding: 5px 8px; border-radius: 4px;
  font: 12px var(--jp); color: #fff;
  background: linear-gradient(#8e98ff, #5865f2 50%, #4652d6 51%, #5b67f5);
  border: 1px solid #2b2f7a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 2px 2px 0 rgba(0,0,0,.35);
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}
.win.light a.sv-join:hover { filter: brightness(1.08); }
.win.light a.sv-join:active { transform: translate(1px, 1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }

/* ============ lecteur ============ */
.lcd {
  background: #000;
  border: 2px solid; border-color: #222 #666 #666 #222;
  padding: 4px 6px;
  color: #7dffb0;
  font: 12px var(--jp);
  margin-bottom: 6px;
}
.lcd-scroll { overflow: hidden; white-space: nowrap; }
.lcd-scroll span { display: inline-block; padding-left: 100%; animation: lcd 12s linear infinite; }
@keyframes lcd { to { transform: translateX(-100%); } }
.lcd-row { display: flex; justify-content: space-between; align-items: flex-end; font-size: 11px; }
.eq { display: flex; gap: 1px; height: 12px; align-items: flex-end; }
.eq i { width: 3px; height: 2px; background: #7dffb0; }
.playing .eq i { animation: eq .5s ease-in-out infinite alternate; }
.playing .eq i:nth-child(2) { animation-delay: -.2s; } .playing .eq i:nth-child(3) { animation-delay: -.35s; }
.playing .eq i:nth-child(4) { animation-delay: -.1s; } .playing .eq i:nth-child(5) { animation-delay: -.45s; }
.playing .eq i:nth-child(6) { animation-delay: -.3s; }
@keyframes eq { to { height: 12px; } }

.player input[type=range] { width: 100%; accent-color: var(--glow); margin: 2px 0 6px; }
.ctrls { display: flex; gap: 4px; align-items: center; }
.ctrls .bevel { min-width: 0; padding: 2px 6px; }
.vol { display: flex; align-items: center; gap: 4px; flex: 1; }
.vol input { flex: 1; min-width: 40px; margin: 0 !important; }
.player-msg { color: var(--accent); min-height: 0; }
.player-msg:empty { display: none; }
.playlist { margin: 6px 0 0; padding-left: 20px; max-height: 110px; overflow-y: auto; }
.playlist button { all: unset; cursor: pointer; color: var(--bone); }
.playlist button:hover, .playlist button:focus-visible { color: var(--accent); }
.playlist .current button { color: #7dffb0; }
.playlist .bad button { color: #666; text-decoration: line-through; }

/* ============ chat ============ */
.chat-list {
  list-style: none; margin: 0; padding: 6px 8px;
  height: 230px; overflow-y: auto;
  background: #000; border: 1px solid #333;
  font-size: 12px; line-height: 1.5;
  overflow-wrap: anywhere;
}
.chat-list li { padding: 1px 0; }
.chat-time { color: #666; font-family: var(--jp); font-size: 11px; }
.chat-name { color: var(--glow); font-weight: normal; font-family: var(--jp); }
.chat-form { display: flex; gap: 4px; margin-top: 6px; }
.chat-form input {
  min-width: 0;
  font: 12px var(--body);
  background: #000; color: var(--bone);
  border: 1px solid #555; padding: 3px 6px;
}
.chat-form input:focus { border-color: var(--glow); outline: none; }
#chat-name { flex: 0 1 110px; }
#chat-msg { flex: 1 1 auto; }
/* photo de profil : vignette dans les messages + bouton à gauche du pseudo */
.chat-ava { width: 16px; height: 16px; object-fit: cover; vertical-align: -3px; margin-right: 4px; border: 1px solid #444; }
.chat-ava-wrap { position: relative; flex: none; display: flex; }
.chat-ava-btn {
  width: 26px; height: 26px; padding: 0; cursor: pointer;
  background: #000; border: 1px solid #555; overflow: hidden;
}
.chat-ava-btn:hover, .chat-ava-btn[aria-expanded="true"] { border-color: var(--glow); }
.chat-ava-btn:disabled { cursor: default; opacity: .5; }
.chat-ava-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* silhouette quand il n'y a pas de photo */
.chat-ava-none {
  display: block; width: 100%; height: 100%;
  background:
    radial-gradient(circle at 50% 38%, #6a6a78 0 5px, transparent 5.5px),
    radial-gradient(ellipse 9px 7px at 50% 100%, #6a6a78 0 100%, transparent 100%),
    #15151c;
}
.chat-ava-menu {
  position: absolute; left: 0; bottom: calc(100% + 4px); z-index: 5;
  display: flex; flex-direction: column; min-width: 120px;
  background: #0d0d14; border: 1px solid var(--glow); box-shadow: 3px 3px 0 rgba(0,0,0,.85);
}
.chat-ava-menu[hidden] { display: none; }
.chat-ava-menu button {
  font: 12px var(--jp); text-align: left; color: var(--bone);
  background: none; border: 0; padding: 5px 9px; cursor: pointer;
}
.chat-ava-menu button:hover, .chat-ava-menu button:focus-visible { background: var(--glow); color: #000; outline: none; }
.chat-ava-menu button[hidden] { display: none; }
/* mode admin : petits boutons au bout de chaque message */
.chat-mod { display: none; margin-left: 6px; }
.chat-list.is-admin .chat-mod { display: inline-flex; gap: 3px; vertical-align: 1px; }
.chat-mod button {
  font: 10px var(--jp); line-height: 1; padding: 2px 5px; cursor: pointer;
  background: #1a1a22; color: #b9b6c8; border: 1px solid #444;
}
.chat-mod button:hover, .chat-mod button:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.chat-login[hidden], .chat-logout[hidden] { display: none; }
#chat-admin-pass { flex: 1 1 auto; }
.chat-admin-bar { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.chat-admin-bar:not(:has(button:not([hidden]))) { display: none; }
.chat-panel[hidden] { display: none; }
.chat-logout { margin-top: 0; font: 11px var(--jp); color: var(--dim); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.chat-status { color: var(--accent); margin-top: 4px; }
.chat-status:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ pied de page ============ */
.foot { max-width: 980px; margin: 10px auto 40px; padding: 0 16px; }
@media (min-width: 1000px) { .foot { padding: 0; } }
.marquee { overflow: hidden; white-space: nowrap; border: 1px solid var(--glow); background: #000; padding: 3px 0; font: 12px var(--jp); color: var(--accent); }
.marquee span { display: inline-block; padding-left: 100%; animation: lcd 26s linear infinite; }
.foot-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

/* ============ paillettes du curseur ============ */
.spark {
  position: fixed; z-index: 9500;
  pointer-events: none;
  font-size: 12px;
  color: var(--accent);
  text-shadow: 0 0 4px #fff;
  animation: spark .8s ease-out forwards;
}
@keyframes spark { to { opacity: 0; transform: translateY(14px) scale(.4); } }

@media (prefers-reduced-motion: reduce) {
  .lcd-scroll span, .marquee span { animation: none; padding-left: 0; }
  .marquee { white-space: normal; padding: 3px 8px; }
  .playing .eq i { animation: none; }
  .spark { display: none; }
  .floater { animation: none; }
}

/* code du bouton 88x31 */
.copy-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.copy-row textarea {
  flex: 1 1 260px;
  font: 10px/1.3 monospace;
  background: #000; color: var(--bone);
  border: 1px solid var(--glow);
  resize: none;
}
.win:focus { outline: 2px dotted var(--accent); outline-offset: 2px; }

/* ============ trucs qui flottent ============ */
.floaters { display: none; }
@media (min-width: 1000px) {
  /* zone de 980px centrée sur toute la hauteur de la page ; pas de z-index sur
     le conteneur, chaque élément se range entre l'en-tête et les fenêtres */
  #page { position: relative; display: flow-root; overflow-x: clip; } /* les persos qui dépassent ne créent pas de défilement horizontal */ /* garde la marge de .top dedans : y = 0 en haut de page */
  .floaters { display: block; position: absolute; top: 0; bottom: 0; left: 50%; width: 980px; margin-left: -490px; pointer-events: none; }
  .top { position: relative; z-index: 1; }
  .desktop .col .win, .foot { position: relative; z-index: 3; }
  .floater.behind { z-index: 2; }
  .floater.deepest { z-index: 0; }
  /* de la place au-dessus de la bannière pour les persos qui dépassent */
  .top { margin-top: 120px; }
  .floater.cut, .floater.cut img { pointer-events: none; }
  .cut img { display: block; width: auto; filter: drop-shadow(3px 3px 0 #000) drop-shadow(0 0 1px #000); }
  .floater {
    position: absolute;
    z-index: 5;
    pointer-events: auto;
    transform: rotate(var(--rot, 0deg));
    animation: bob 7s ease-in-out infinite;
  }
  .pin { padding: 6px 6px 22px; background: #e8e4ee; box-shadow: 3px 3px 0 #000; }
  .pin::before { /* bout de scotch */
    content: ""; position: absolute; left: 50%; top: -9px; width: 64px; height: 18px;
    transform: translateX(-50%) rotate(-3deg);
    background: rgba(230, 226, 200, .75);
  }
  .pin img { display: block; width: 150px; filter: grayscale(.55) contrast(1.1); }
  .gifwin { width: 170px; margin: 0; }
  .gifwin img { display: block; width: 100%; }
  .errwin { width: 270px; margin: 0; animation: none; box-shadow: 4px 4px 0 #000; }
  .err-body { display: flex; gap: 10px; align-items: flex-start; }
  .err-body p { white-space: pre-line; font-size: 11px; margin: 0; }
  .err-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #c8433a; color: #fff; display: grid; place-items: center; font: bold 18px var(--body); }
  .err-btns { display: flex; justify-content: center; padding: 0 0 8px; }
  .float-txt { font: 18px var(--jp); color: var(--bone); text-shadow: 2px 2px 0 #000; white-space: nowrap; }
}
@media (min-width: 1000px) and (max-width: 1399px) { .floater.gutter { display: none; } }
@media (min-width: 1000px) {
  .clockwin { animation: none; }
  .clockwin { width: 150px; margin: 0; }
  .clockwin svg { display: block; margin: 0 auto; }
  .clock-txt { margin: 4px 0 0; font: 13px var(--jp); }
}
@keyframes bob { 50% { transform: translateY(-8px) rotate(var(--rot, 0deg)); } }


@media (prefers-reduced-motion: reduce) { .floater { animation: none; } }

/* titres longs : coupés avec "…", les boutons restent visibles */
.titlebar > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-close, .tb-btns { flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
  .strip-track { flex-wrap: wrap; width: auto; gap: 6px 0; }
  .strip-track.scrolling { animation: none; }
}

/* ============ démarrage du PC ============ */
#boot { position: fixed; inset: 0; z-index: 9600; background: #000; color: #c8c8c8; }
.boot-screen { position: absolute; inset: 0; }
.boot-screen[hidden] { display: none; }
/* écran d'allumage : un fond d'écran anime vintage assombri, juste le texte, on clique n'importe où */
.boot-power {
  background:
    linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.25) 45%, rgba(0,0,0,.85)),
    radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0,0,0,.75)),
    var(--boot-img, none) 58% center / cover no-repeat, /* 58 % : le visage reste au centre sur téléphone */
    #0a0a0a;
  transition: filter .35s ease-out;
}
/* lignes de vieil écran + grain de film par-dessus l'image */
.boot-power::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
}
.boot-power::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* au clic : l'image s'éclaire un instant avant le BIOS */
.boot-power.on { filter: brightness(1.6) saturate(.6); }
.power-btn {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 16px 16px max(11vh, 56px); background: none; border: 0; cursor: pointer; color: #eceae4;
  text-shadow: 0 1px 3px rgba(0,0,0,.9);
}
.power-btn:focus-visible { outline: none; }
.power-btn:focus-visible .boot-hint { outline: 1px dotted #bbb; outline-offset: 6px; }
.boot-hint { font: clamp(15px, 1.5vw, 20px)/1.4 "Helvetica Neue", Arial, sans-serif; letter-spacing: .12em; }
.boot-sub { font: 12px "Helvetica Neue", Arial, sans-serif; letter-spacing: .12em; color: #a9a6a0; }
@media (prefers-reduced-motion: reduce) { .boot-power { transition: none; } }
.boot-bios { padding: 24px 28px; }
.boot-bios pre { margin: 0; font: 15px/1.45 "Courier New", monospace; color: #c8c8c8; white-space: pre-wrap; }
/* écran de chargement : emblème, nom, édition, barre, copyright */
.boot-load { display: grid; place-content: center; background: #000; }
.load-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.load-star { position: relative; width: 46px; height: 46px; margin-bottom: 8px; transform: rotate(45deg); }
.load-star i { position: absolute; width: 21px; height: 21px; border-radius: 3px 10px; }
.load-star i:nth-child(1) { left: 0; top: 0; background: linear-gradient(135deg, #ff9ab0, #ff4d6d); }
.load-star i:nth-child(2) { right: 0; top: 0; background: linear-gradient(135deg, #d3d4ff, #8c8cff); }
.load-star i:nth-child(3) { left: 0; bottom: 0; background: linear-gradient(135deg, #b8f3ff, #3fb6f0); }
.load-star i:nth-child(4) { right: 0; bottom: 0; background: linear-gradient(135deg, #ffffff, #bfc4d6); }
.load-title { margin: 0; font: italic bold 58px/1 "Trebuchet MS", Tahoma, sans-serif; letter-spacing: -.02em; color: #fff; }
.load-title span {
  background: linear-gradient(#ffffff 40%, #b9c6ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.load-title sup { margin-left: 4px; font: bold 14px Tahoma, var(--body); color: #ff4d6d; vertical-align: top; }
.load-sub { margin: 0 0 34px 60px; font: 14px Tahoma, var(--body); color: #c8c8c8; letter-spacing: .02em; }
.boot-bar { width: 160px; height: 20px; padding: 2px; border: 2px solid #b2b2b2; border-radius: 4px; overflow: hidden; position: relative; background: #000; }
.boot-bar i { position: absolute; top: 3px; width: 9px; height: 10px; border-radius: 2px; background: linear-gradient(#cdeaff, #5aa0ff 45%, #1c4fc0); animation: boot-run 1.6s linear infinite; }
.boot-bar i:nth-child(2) { animation-delay: .1s; } .boot-bar i:nth-child(3) { animation-delay: .2s; }
@keyframes boot-run { from { left: -36px; } to { left: 170px; } }
.load-copy { position: absolute; left: 22px; bottom: 18px; margin: 0; font: 12px Tahoma, var(--body); color: #9a9a9a; }
.boot-welcome { display: grid; place-content: center; justify-items: center; gap: 16px; background: linear-gradient(#1b2a6b, #2c5fd6 50%, #1b2a6b); }
.boot-user { display: flex; align-items: center; gap: 12px; }
.boot-tile { width: 48px; height: 48px; border: 2px solid #fff; border-radius: 4px; background: var(--logo-img, #8c8cff) center / cover; }
.boot-name { font: 22px var(--jp); color: #fff; }
.boot-hello { margin: 0; font: italic bold 34px Tahoma, var(--body); color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.4); }
.boot-skip { position: absolute; right: 16px; bottom: 16px; background: none; border: 1px solid #555; color: #888; font: 12px var(--jp); padding: 4px 10px; cursor: pointer; }
.boot-skip:hover { color: #fff; border-color: #fff; }
@media (prefers-reduced-motion: reduce) { .boot-bar i { animation: none; left: 10px; } .boot-bar i:nth-child(2) { left: 24px; } .boot-bar i:nth-child(3) { left: 38px; } }

/* ============ barre des tâches ============ */
body { padding-bottom: 40px; }
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8500;
  height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 4px;
  background: #1d4cb8 linear-gradient(#3c6fe0, #2457c9 8%, #1d4cb8 90%, #163d96);
  border-top: 1px solid #6f9bff;
  /* sa propre couche d'affichage : le bleu ne disparaît plus quand ce qui est dessous bouge
     (persos qui flottent, défilement) */
  transform: translateZ(0); isolation: isolate; opacity: 1;
}
.start-btn {
  height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 16px 0 10px;
  border: 0; border-radius: 0 12px 12px 0; cursor: pointer;
  background: linear-gradient(#4fb04a, #33922f 50%, #2a7d27); color: #fff;
  font: italic bold 16px Tahoma, var(--body); text-shadow: 1px 1px 1px #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.start-btn[aria-expanded="true"] { background: linear-gradient(#2a7d27, #33922f); }
.start-flag { width: 16px; height: 16px; background: conic-gradient(#f25022 0 25%, #7fba00 0 50%, #00a4ef 0 75%, #ffb900 0); border-radius: 2px; transform: skewY(-6deg); }
.start-menu {
  position: absolute; left: 0; bottom: 36px; display: flex; min-width: 230px;
  max-height: calc(100vh - 36px - 8px);
  background: #fff; border: 2px solid #2457c9; border-bottom: 0; border-radius: 6px 6px 0 0;
  box-shadow: 3px -3px 8px rgba(0,0,0,.35); color: #000;
}
.start-menu[hidden] { display: none; }
.sm-side { margin: 0; padding: 8px 4px; writing-mode: vertical-rl; transform: rotate(180deg); background: linear-gradient(#1d4cb8, #3c6fe0); color: #fff; font: bold 18px Tahoma, var(--body); }
.sm-list { list-style: none; margin: 0; padding: 6px; flex: 1; min-height: 0; overflow-y: auto; }
.sm-item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: none; border: 0; font: 12px var(--body); text-align: left; cursor: pointer; color: #000; }
.sm-item .di-pic { filter: none; transform: scale(.8); }
.sm-item:hover, .sm-item:focus-visible { background: #316ac5; color: #fff; outline: none; }
.quick { display: flex; align-items: center; gap: 1px; padding: 0 6px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; border-left: 1px solid #5a86e8; border-right: 1px solid #12398f; box-shadow: inset 1px 0 0 #163d96, 1px 0 0 #5a86e8; }
.ql { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; background: none; border: 1px solid transparent; border-radius: 3px; cursor: pointer; }
.ql .di-pic { display: block; width: 22px; height: 22px; filter: drop-shadow(1px 1px 0 rgba(0,0,0,.5)); }
.ql .di-pic svg { display: block; width: 100%; height: 100%; }
.ql:hover, .ql:focus-visible { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); outline: none; }
.task-apps { flex: 1; min-width: 0; display: flex; gap: 4px; overflow: hidden; }
.task-btn {
  flex: 0 1 150px; min-width: 0; height: 26px; padding: 0 8px; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: #3c81f3; color: #fff; border: 1px solid #1941a5; border-radius: 3px; font: 11px var(--body); cursor: pointer;
}
.task-btn.on { background: #1e52b7; box-shadow: inset 1px 1px 2px rgba(0,0,0,.5); }
.tray { display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 10px; background: #0f8ee8; border-left: 1px solid #0a5ca8; box-shadow: inset 1px 0 0 #5ec0ff; }
.mute-btn { width: 24px; height: 24px; display: grid; place-items: center; padding: 0; background: none; border: 0; cursor: pointer; }
.tray-clock { color: #fff; font: 12px var(--body); }
@media (max-width: 560px) {
  .start-btn { padding: 0 10px 0 8px; font-size: 14px; }
  .task-apps { display: none; } /* pas la place : on rouvre une appli par son icône */
  .tray-clock { display: none; }
  .ql { width: 26px; }
}

/* ============ fenêtres d'applis ============ */
.appwin {
  position: fixed; margin: 0;
  width: min(560px, calc(100vw - 16px));
  max-height: calc(100vh - 36px - 24px);
  display: flex; flex-direction: column;
  box-shadow: 4px 4px 0 #000, 0 0 0 1px #000;
}
.appwin[hidden] { display: none; }
.appwin .titlebar { flex: none; }
.app-btns { display: flex; gap: 2px; }
.tb-min { width: 18px; height: 15px; padding: 0; display: grid; place-items: center; font-size: 10px; background: var(--grey); color: #000; border: 1px solid; border-color: #fff #404040 #404040 #fff; cursor: pointer; }
.app-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 10px 12px; background: #fff; color: #000; }
.app-status { margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px solid #ccc; font-size: 11px; color: #555; }
.app-empty { margin: 18px 0; text-align: center; color: #777; font-size: 12px; }
@media (max-width: 999px) {
  .appwin { left: 8px !important; right: 8px; top: 8px !important; width: auto; max-height: calc(100vh - 36px - 16px); }
}
/* My Games : dossier de l'Explorateur XP */
.app-body.explorer { padding: 0; display: flex; flex-direction: column; background: #fff; }
.xp-address { flex: none; display: flex; align-items: center; gap: 6px; padding: 3px 6px; background: #ece9d8; border-bottom: 1px solid #aca899; font: 11px Tahoma, var(--body); color: #444; }
.xp-address-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; height: 20px; padding: 0 4px; background: #fff; border: 1px solid #7f9db9; color: #000; overflow: hidden; white-space: nowrap; }
.xp-address-field > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.xp-address-field .di-pic { flex: none; width: 16px; height: 16px; }
.xp-address-field .di-pic svg { display: block; width: 100%; height: 100%; }
.xp-main { flex: 1 0 auto; min-height: min(240px, 45vh); display: flex; }
.xp-side { flex: none; width: 168px; padding: 10px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(#7ba2e7, #6375d6); overflow: auto; }
.xp-box { background: #d6dff7; border-radius: 3px 3px 0 0; font: 11px Tahoma, var(--body); color: #215dc6; }
.xp-box h3 { margin: 0; padding: 4px 8px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #fff, #c6d3f7); font: bold 11px Tahoma, var(--body); color: #215dc6; }
.xp-box p { margin: 0; padding: 6px 8px 8px; color: #000; }
.xp-links { list-style: none; margin: 0; padding: 4px 6px 6px; }
.xp-link { display: flex; align-items: center; gap: 5px; width: 100%; padding: 2px; background: none; border: 0; cursor: pointer; font: 11px Tahoma, var(--body); color: #215dc6; text-align: left; }
.xp-link .di-pic { flex: none; width: 16px; height: 16px; }
.xp-link .di-pic svg { display: block; width: 100%; height: 100%; }
.xp-link:hover span, .xp-link:focus-visible span { text-decoration: underline; color: #428eff; }
.xp-link:focus-visible { outline: 1px dotted #215dc6; }
.xp-files { flex: 1; min-width: 0; padding: 12px; overflow: auto; }
.xp-statusbar { flex: none; margin: 0; padding: 2px 8px; background: #ece9d8; border-top: 1px solid #aca899; font: 11px Tahoma, var(--body); color: #444; }
.games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, 92px); gap: 10px 6px; }
.game { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px; background: none; border: 0; cursor: pointer; font: 11px Tahoma, var(--body); color: #000; text-align: center; }
.game-icon { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; }
.game-icon img { width: 100%; height: 100%; object-fit: cover; display: block; box-shadow: 1px 1px 2px rgba(0,0,0,.35); }
.game-name { padding: 0 3px; overflow-wrap: anywhere; }
.game:hover .game-icon, .game:focus-visible .game-icon { filter: brightness(.75) sepia(1) hue-rotate(185deg) saturate(3); }
.game:hover .game-name, .game:focus-visible .game-name { background: #316ac5; color: #fff; }
.game:focus-visible { outline: none; }
.game:focus-visible .game-name { outline: 1px dotted #fff; outline-offset: -1px; }
@media (max-width: 560px) { .xp-side { display: none; } }
.clips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.clip { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 0; background: none; border: 0; cursor: pointer; font: 11px var(--body); text-align: left; color: #000; }
.clip-thumb { width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center; background: #111; border: 1px solid #999; overflow: hidden; }
.clip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip:hover .clip-name, .clip:focus-visible .clip-name { background: #316ac5; color: #fff; }
.clip-name { padding: 0 3px; overflow-wrap: anywhere; }
.media-frame { background: #000; aspect-ratio: 16 / 9; }
.media-frame iframe, .media-frame video { display: block; width: 100%; height: 100%; border: 0; }

/* barre des tâches : Démarrer et le son ne rétrécissent jamais, les icônes défilent si besoin */
.start-btn, .tray { flex: none; }
.ql { flex: none; }
@media (max-width: 560px) {
  .appwin .tb-min { display: none; } /* sans boutons de fenêtres, on ne réduit pas : on ferme */
}

/* bulle au survol d'une icône de la barre des tâches (façon XP) */
.ql-tip {
  position: fixed; z-index: 10001; max-width: min(220px, calc(100vw - 8px)); overflow-wrap: anywhere; padding: 5px 8px 6px; pointer-events: none;
  background: #ffffe1; color: #000; border: 1px solid #000; border-radius: 6px;
  box-shadow: 2px 2px 4px rgba(0,0,0,.4); font: 11px Tahoma, var(--body);
}
.ql-tip[hidden] { display: none; }
.ql-tip b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12px; }
.ql-tip span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; color: #444; }
.ql-tip::after {
  content: ""; position: absolute; bottom: -7px; left: var(--tail, 14px);
  border: 7px solid transparent; border-bottom: 0; border-top-color: #000;
}
.ql-tip::before {
  content: ""; position: absolute; bottom: -5px; left: calc(var(--tail, 14px) + 1px); z-index: 1;
  border: 6px solid transparent; border-bottom: 0; border-top-color: #ffffe1;
}

/* carte profil d'un jeu : gamercard Y2K, cadre chromé, verre et néon */
.app-body:has(> .gcard) { background: radial-gradient(circle at 20% 0%, #2b2f6b, #0b0b18 70%); }
.gcard {
  --gc: #9a9cff;
  position: relative; padding: 3px; border-radius: 12px;
  background: linear-gradient(160deg, #fdfdff, #9aa3b8 30%, #f0f2f8 50%, #7c8499 75%, #e6e9f2);
  box-shadow: 0 0 0 1px #000, 0 0 18px color-mix(in srgb, var(--gc) 55%, transparent), 4px 4px 0 rgba(0,0,0,.4);
  color: #e8e8f0;
}
.gcard > * { background: #0f1020; }
.gcard > :first-child { border-radius: 9px 9px 0 0; }
.gcard > :last-child { border-radius: 0 0 9px 9px; }
.gcard-head {
  position: relative; overflow: hidden; display: flex; gap: 14px; align-items: flex-end; padding: 14px;
  background: linear-gradient(160deg, var(--gc), #0f1020 75%);
}
.gcard-head.has-art { min-height: 160px; }
.gcard-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 75% 20%; z-index: 0; }
.gcard-head::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, rgba(8,8,20,.8), rgba(8,8,20,.1) 70%),
    linear-gradient(0deg, rgba(8,8,20,.85), transparent 60%);
}
.gcard-head::after { /* reflet de verre */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 45%; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,0));
  border-radius: 9px 9px 50% 50% / 9px 9px 18px 18px;
}
.gcard-head > .gcard-cover, .gcard-head > .gcard-id { position: relative; z-index: 2; }
.gcard-cover {
  flex: none; width: 96px; aspect-ratio: 3 / 4; display: grid; place-items: center; overflow: hidden;
  background: #2a2a38; border: 3px solid #fff; border-radius: 4px;
  box-shadow: 0 0 0 1px #000, 0 0 12px var(--gc); transform: rotate(-3deg);
}
.gcard-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gcard-id { min-width: 0; }
.gcard-game { margin: 0; font: bold 18px/1.15 Tahoma, var(--body); color: #fff; text-shadow: 1px 1px 0 #000, 0 0 8px var(--gc); overflow-wrap: anywhere; }
.gcard-logo { display: block; width: min(230px, 100%); height: auto; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.8)) drop-shadow(0 0 10px rgba(0,0,0,.6)); }
.gcard-jp { margin: 4px 0 0; font: 11px var(--jp); color: #fff; letter-spacing: .1em; text-shadow: 0 0 6px var(--gc), 1px 1px 0 #000; }
.gcard-plate {
  margin: 0; display: flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-top: 1px solid rgba(255,255,255,.5); border-bottom: 1px solid #000;
  font: bold 14px Tahoma, var(--body); color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.6);
  overflow-wrap: anywhere;
}
.gcard > .gcard-plate { /* barre en gel brillant, façon Aqua */
  background:
    linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.08) 50%, rgba(0,0,0,0) 51%),
    linear-gradient(90deg, color-mix(in srgb, var(--gc) 85%, #000), color-mix(in srgb, var(--gc) 45%, #0f1020));
}
.gcard-star { flex: none; color: #fff7a8; text-shadow: 0 0 6px #ffe14d; }
.gcard-stats { margin: 0; padding: 10px 14px 6px; display: grid; gap: 6px; }
.gcard-stats div { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.gcard-stats dt { flex: 0 1 38%; min-width: 0; font: 12px var(--jp); color: color-mix(in srgb, var(--gc) 55%, #fff); overflow-wrap: anywhere; }
.gcard-stats dt::before { content: "▸ "; color: var(--gc); }
.gcard-stats dd {
  flex: 1 1 62%; margin: 0; min-width: 0; padding: 3px 10px; border-radius: 10px;
  background: linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.03) 55%, rgba(0,0,0,.2));
  border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
  color: #fff; overflow-wrap: anywhere;
}
.gcard-note { margin: 0; padding: 8px 14px; font-size: 12px; font-style: italic; color: #cfcfe0; overflow-wrap: anywhere; white-space: pre-line; }
.gcard-link {
  display: inline-block; margin: 2px 14px 10px; padding: 3px 14px; border-radius: 10px;
  background: linear-gradient(#fff, #d8dce8 50%, #b9bfd0 51%, #e4e7ef); color: #000; text-decoration: none;
  font: 11px Tahoma, var(--body); border: 1px solid #555; box-shadow: 0 0 6px var(--gc);
}
.gcard-actions { padding: 2px 0 0; }
.gcard-link:hover, .gcard-link:focus-visible { outline: 1px dotted #fff; outline-offset: 2px; }
.gcard-foot {
  margin: 0; display: flex; justify-content: space-between; gap: 8px; padding: 4px 14px 6px;
  border-top: 1px dashed rgba(255,255,255,.15); font: 10px var(--jp); color: #6f7090; letter-spacing: .08em;
}
.gcard .app-empty { color: #8a8a9c; }
@media (max-width: 560px) {
  .gcard-head { gap: 10px; padding: 10px; }
  .gcard-cover { width: 72px; }
}

/* ============ updates : le petit journal du site ============ */
.updates { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; overflow-wrap: anywhere; }
.updates li { padding: 5px 0; border-bottom: 1px dotted #6d7fa6; font-size: 12px; line-height: 1.45; }
.updates li:last-child { border-bottom: 0; }
.updates time { display: block; font: 11px var(--jp); color: #5a5470; }

/* ============ Control Panel (admin) ============ */
.app-body.cp { padding: 0; min-width: min(520px, 92vw); }
.cp-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid #919b9c; background: #ece9d8; }
.cp-tab {
  font: 12px Tahoma, Verdana, sans-serif; color: #000; cursor: pointer;
  padding: 4px 10px; margin-bottom: -1px;
  background: linear-gradient(#fff, #ecebe5); border: 1px solid #919b9c; border-bottom: 0; border-radius: 3px 3px 0 0;
}
.cp-tab[aria-selected="true"] { background: #fcfcfe; border-top: 2px solid #e68b2c; padding-bottom: 5px; }
.cp-tab:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.cp-page { padding: 10px 12px; background: #fcfcfe; max-height: min(60vh, 520px); overflow-y: auto; font: 12px Tahoma, Verdana, sans-serif; color: #000; }
.cp-page h3 { font: bold 12px Tahoma, Verdana, sans-serif; margin: 10px 0 6px; color: #1b3d8f; }
.cp-page h3:first-child { margin-top: 0; }
.cp-list { list-style: none; margin: 0 0 6px; padding: 0; border: 1px solid #7f9db9; background: #fff; }
.cp-list li { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-bottom: 1px solid #eef0f4; }
.cp-list li:last-child { border-bottom: 0; }
.cp-list li.dim { color: #777; }
.cp-item { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cp-row-btns { display: flex; gap: 2px; flex: none; }
.cp-row-btns button, .cp-link button {
  width: 22px; height: 20px; padding: 0; cursor: pointer; font-size: 11px;
  background: linear-gradient(#fff, #e3e3db); border: 1px solid #7f9db9; border-radius: 2px; color: #000;
}
.cp-row-btns button:disabled { opacity: .35; cursor: default; }
.cp-form { margin-top: 10px; padding: 8px 10px; border: 1px solid #d0d0bf; background: #f5f4ea; }
.cp-field { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.cp-field > span { color: #333; }
.cp-page input:not([type=checkbox]):not([type=range]), .cp-page textarea {
  font: 12px Tahoma, Verdana, sans-serif; padding: 3px 5px; border: 1px solid #7f9db9; background: #fff; color: #000; min-width: 0; width: 100%;
}
.cp-page input[type=file] { padding: 2px; }
.cp-check { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.cp-actions .bevel { color: #000; }
.cp-progress { width: 140px; height: 12px; }
.cp-progress[hidden] { display: none; }
.cp-links { display: flex; flex-direction: column; gap: 4px; }
.cp-link { display: grid; grid-template-columns: minmax(70px, 1fr) 2fr 22px; gap: 4px; align-items: center; }
.cp-foot { display: flex; align-items: center; gap: 8px; padding: 6px 12px 8px; background: #ece9d8; border-top: 1px solid #d0d0bf; }
.cp-note { flex: 1; margin: 0; font: 11px Tahoma, Verdana, sans-serif; color: #333; min-height: 1em; }
.cp-foot .bevel { color: #000; }
@media (max-width: 560px) { .cp-link { grid-template-columns: 1fr 22px; } .cp-link input:nth-child(2) { grid-column: 1; } }

/* ============ DM art : le petit téléphone ============ */
.app-body.dmapp { padding: 0; background: none; display: flex; justify-content: center; overflow: visible; }
/* fenêtre sans cadre : seul le téléphone est visible */
.appwin.appwin-bare { width: auto; background: none; border: 0; box-shadow: none; max-height: none; }
.appwin-bare > .titlebar { display: none; }
.appwin-bare:focus { outline: none; }
.appwin-bare:focus-visible .phone { outline: 2px dotted var(--accent); outline-offset: 3px; }
.phone {
  width: min(300px, calc(100vw - 24px));
  padding: 14px 10px 12px; border-radius: 26px;
  background: linear-gradient(160deg, #3b3a4c, #18171f 60%, #24232f);
  border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -2px 6px rgba(0,0,0,.6), 3px 3px 0 rgba(0,0,0,.6);
}
.ph-screen {
  display: flex; flex-direction: column; height: min(440px, 62vh);
  border-radius: 10px; overflow: hidden; border: 2px solid #000;
  background: linear-gradient(#e9f2ff, #cfdcf2);
  font: 12px Tahoma, Verdana, sans-serif; color: #10213f;
}
.ph-chin {
  display: block; width: 56px; height: 9px; margin: 9px auto 0; padding: 0; cursor: pointer;
  border-radius: 5px; border: 1px solid #000; background: #0d0c12; box-shadow: inset 0 1px 2px #000, 0 1px 0 rgba(255,255,255,.12);
}
.ph-chin:hover, .ph-chin:focus-visible { background: #2e56b3; outline: none; }
.ph-status { cursor: default; }
.desk-on .ph-status { cursor: move; }
.ph-status-r { display: flex; align-items: center; gap: 6px; }
.ph-x {
  width: 15px; height: 15px; padding: 0; line-height: 1; cursor: pointer;
  font: 12px Tahoma, Verdana, sans-serif; color: #cfe3ff; background: none; border: 1px solid #cfe3ff; border-radius: 2px;
}
.ph-x:hover, .ph-x:focus-visible { background: #cfe3ff; color: #10213f; outline: none; }
.ph-status {
  display: flex; align-items: center; justify-content: space-between; padding: 3px 8px;
  background: #10213f; color: #cfe3ff; font: 10px var(--jp);
}
.ph-signal { display: flex; align-items: flex-end; gap: 1px; height: 9px; }
.ph-signal i { width: 2px; background: #cfe3ff; }
.ph-signal i:nth-child(1) { height: 3px; } .ph-signal i:nth-child(2) { height: 5px; } .ph-signal i:nth-child(3) { height: 7px; } .ph-signal i:nth-child(4) { height: 9px; }
.ph-batt { width: 16px; height: 8px; border: 1px solid #cfe3ff; border-radius: 1px; background: linear-gradient(90deg, #7dffb0 70%, transparent 70%); }
.ph-head {
  display: flex; align-items: center; gap: 7px; padding: 7px 8px;
  background: linear-gradient(#5f86d8, #2e56b3); color: #fff; border-bottom: 1px solid #1b3a85;
}
.ph-head .ph-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-head .ph-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-head small { font-size: 10px; opacity: .85; }
.ph-back, .ph-act {
  font: 11px Tahoma, Verdana, sans-serif; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.45); border-radius: 3px; padding: 2px 6px;
}
.ph-back { font-size: 16px; line-height: 1; padding: 0 7px 2px; }
.ph-back:hover, .ph-act:hover, .ph-back:focus-visible, .ph-act:focus-visible { background: rgba(255,255,255,.3); outline: none; }
.ph-ava { width: 30px; height: 30px; flex: none; border-radius: 50%; overflow: hidden; border: 1px solid #fff; background: #10213f; display: grid; place-items: center; }
.ph-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-initial { color: #fff; font: 14px var(--jp); text-transform: lowercase; }
.ph-thread, .ph-list { flex: 1; overflow-y: auto; margin: 0; padding: 8px; list-style: none; overflow-wrap: anywhere; }
.ph-empty { color: #4c5a78; text-align: center; margin: 24px 8px; }
.ph-msg { max-width: 82%; margin: 0 0 6px; padding: 5px 8px 3px; border-radius: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.2); }
.ph-msg p { margin: 0; white-space: pre-wrap; }
.ph-msg time { display: block; text-align: right; font-size: 9px; opacity: .7; margin-top: 1px; }
.ph-msg.them { background: #fff; color: #10213f; border-bottom-left-radius: 2px; }
.ph-msg.me { margin-left: auto; background: linear-gradient(#5f86d8, #2e56b3); color: #fff; border-bottom-right-radius: 2px; }
.ph-list li { margin: 0; }
.ph-conv {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px; text-align: left; cursor: pointer;
  background: none; border: 0; border-bottom: 1px solid #b6c6e3; font: inherit; color: inherit;
}
.ph-conv:hover, .ph-conv:focus-visible { background: rgba(46,86,179,.12); outline: none; }
.ph-conv-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-conv-txt b, .ph-conv-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-conv-txt span { color: #4c5a78; }
.ph-conv.unread .ph-conv-txt b, .ph-conv.unread .ph-conv-txt span { color: #10213f; font-weight: bold; }
.ph-conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 10px; color: #4c5a78; flex: none; }
.ph-compose { padding: 6px; background: #dfe8f7; border-top: 1px solid #b6c6e3; }
.ph-compose input, .ph-compose textarea {
  width: 100%; min-width: 0; font: 12px Tahoma, Verdana, sans-serif; color: #000;
  padding: 4px 6px; border: 1px solid #7f9db9; border-radius: 3px; background: #fff; resize: none;
}
.ph-compose input { margin-bottom: 4px; }
.ph-row { display: flex; gap: 4px; align-items: stretch; }
.ph-send {
  flex: none; width: 34px; cursor: pointer; color: #fff; font-size: 14px;
  background: linear-gradient(#5f86d8, #2e56b3); border: 1px solid #1b3a85; border-radius: 3px;
}
.ph-send:disabled { opacity: .5; cursor: default; }
.ph-err { margin: 3px 0 0; color: #b3261e; font-size: 11px; }
.ph-err:empty { display: none; }
.ph-note { margin: 0; padding: 3px 8px; background: #fbe9e7; }
.ph-spacer { height: 6px; }
/* pastille rouge : nouveaux messages */
.dm-badge {
  display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 8px; background: #e0262e; color: #fff; font: bold 9px/1 Tahoma, Verdana, sans-serif;
  border: 1px solid #fff; box-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.ql .dm-badge, .sm-item .dm-badge { position: absolute; top: 0; right: 0; }
.ql, .sm-item { position: relative; }

@media (max-width: 999px) {
  /* petit écran : le téléphone centré, sans cadre de fenêtre */
  .appwin.appwin-bare:not([hidden]) { left: 0 !important; right: 0; display: flex; justify-content: center; pointer-events: none; }
  .appwin-bare .phone { pointer-events: auto; }
}
