/* Windows Live Messenger 2012 — maquette web.
   Images : ../assets/images (extraites de msgsres.dll / uxctl.dll / wlidux.dll).
   Couleurs et mesures reprises des mises en page décompilées (assets/layouts). */

@font-face { font-family: "WLM Segoe Light"; src: local("Segoe UI Light"), url(../../assets/fonts/segoeuil.ttf); }
@font-face { font-family: "WLM Segoe Semibold"; src: local("Segoe UI Semibold"), url(../../assets/fonts/seguisb.ttf); }

:root {
  --text: #2a2a2a;          /* colour 23002 */
  --text-2: #6e6e6e;        /* colour 23001 */
  --hint: #6d6d6d;          /* colour 20722 (GRAYTEXT) */
  --link: #0066cc;          /* colour 20747 */
  --window: #fcfcfc;        /* colour 85, fond de la fenêtre principale */
  --line: #d9e1ea;
  --font: "Segoe UI", "WLM Segoe Light", Tahoma, system-ui, sans-serif;
  --light: "WLM Segoe Light", "Segoe UI Light", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 12px/1.35 var(--font);
  color: var(--text);
  background: #1c5aa8 linear-gradient(160deg, #3a8ee6 0%, #1c5aa8 55%, #0d3b7a 100%) fixed;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- bureau + fenêtre */

.desktop {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.wlm-window {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--window);
  border: 1px solid rgba(20, 40, 70, .55);
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5) inset, 0 12px 40px rgba(0, 0, 0, .45);
  overflow: hidden;
  width: 626px;              /* largeur de la scène de connexion (image 23013) */
  max-width: 100%;
}
.wlm-window[data-screen="main"] {
  width: 360px;
  height: min(680px, calc(100dvh - 48px));
  resize: both;
  min-width: 300px;
  min-height: 420px;
}

/* barre de titre sans cadre (modèle MainWindowBar) */
.titlebar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 0 0 8px;
  color: #1e395b;
  pointer-events: none;
}
.titlebar-icon { width: 16px; height: auto; }
.titlebar-text { font-size: 12px; text-shadow: 0 0 8px #fff, 0 0 2px #fff; }
.caption-buttons { margin-left: auto; align-self: flex-start; display: flex; pointer-events: auto; }
.caption {
  border: 0;
  padding: 0;
  height: 18px;
  background: var(--img) 0 0 no-repeat;
}
/* bandes de 4 états : normal, survol, appuyé, inactif */
.caption:hover { background-position-x: calc(var(--w) * -1); }
.caption:active { background-position-x: calc(var(--w) * -2); }
.caption-min { --w: 27px; width: 27px; --img: url(../../assets/images/ui/21019.png); }
.caption-max { --w: 25px; width: 25px; --img: url(../../assets/images/ui/21020.png); }
.caption-close { --w: 43px; width: 43px; --img: url(../../assets/images/ui/21018.png); }

.screen { display: flex; flex-direction: column; min-height: 0; flex: 1; }

/* ---------------------------------------------------------------- image perso + cadre de statut */

.usertile {
  --frame-size: 120px; --pic: 96px; --x: 12px; --y: 9px;
  position: relative;
  flex: none;
  width: var(--frame-size);
  height: var(--frame-size);
  padding: 0;
  border: 0;
  background: none;
}
.usertile img {
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--pic); height: var(--pic);
  object-fit: cover;
}
.usertile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--frame) 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}
/* tailles mesurées sur les cadres d'origine : trou intérieur de 94, 46, 30, 22 px */
.usertile--signin { --frame-size: 120px; --pic: 96px; --x: 12px; --y: 9px; }
.usertile--l      { --frame-size: 139px; --pic: 96px; --x: 24px; --y: 18px; }
.usertile--m      { --frame-size: 79px;  --pic: 48px; --x: 18px; --y: 13px; }
.usertile--xs     { --frame-size: 45px;  --pic: 24px; --x: 11px; --y: 10px; }

.usertile--signin[data-status="online"]  { --frame: url(../../assets/images/ui/23015.png); }
.usertile--signin[data-status="offline"] { --frame: url(../../assets/images/ui/23016.png); }
.usertile--signin[data-status="away"]    { --frame: url(../../assets/images/ui/23017.png); }
.usertile--signin[data-status="busy"]    { --frame: url(../../assets/images/ui/23018.png); }
.usertile--l[data-status="online"]  { --frame: url(../../assets/images/ui/48000.png); }
.usertile--l[data-status="away"]    { --frame: url(../../assets/images/ui/48001.png); }
.usertile--l[data-status="busy"]    { --frame: url(../../assets/images/ui/48002.png); }
.usertile--l[data-status="offline"] { --frame: url(../../assets/images/ui/48003.png); }
.usertile--m[data-status="online"]  { --frame: url(../../assets/images/ui/48004.png); }
.usertile--m[data-status="away"]    { --frame: url(../../assets/images/ui/48005.png); }
.usertile--m[data-status="busy"]    { --frame: url(../../assets/images/ui/48006.png); }
.usertile--m[data-status="offline"] { --frame: url(../../assets/images/ui/48007.png); }
.usertile--xs[data-status="online"]  { --frame: url(../../assets/images/ui/48012.png); }
.usertile--xs[data-status="away"]    { --frame: url(../../assets/images/ui/48070.png); }
.usertile--xs[data-status="busy"]    { --frame: url(../../assets/images/ui/48071.png); }
.usertile--xs[data-status="offline"] { --frame: url(../../assets/images/ui/48013.png); }
.usertile--xs[data-status="offline"] img { filter: grayscale(.6) opacity(.75); }

.status-icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- contrôles communs (uxctl.dll) */

.link { color: var(--link); text-decoration: none; }
.link:hover { text-decoration: underline; }

.wl-edit {
  width: 100%;
  height: 26px;
  padding: 3px 6px;
  border: 1px solid #abadb3;
  border-top-color: #8e8f8f;
  border-radius: 2px;
  background: #fff;
  outline: none;
}
.wl-edit:hover { border-color: #7eb4ea; }
.wl-edit:focus { border-color: #569de5; box-shadow: 0 0 0 1px rgba(86, 157, 229, .25); }
.wl-edit::placeholder { color: var(--hint); }

/* bouton : images 20510 (normal) 20511 (survol) 20513 (appuyé), 9-grid 3 px */
.push-button {
  min-width: 72px;
  white-space: nowrap;
  height: 23px;
  padding: 0 14px;
  border: 3px solid transparent;
  border-image: url(../../assets/images/ui/20510.png) 3 fill / 3px stretch;
  background: none;
}
.push-button:hover { border-image-source: url(../../assets/images/ui/20511.png); }
.push-button:active { border-image-source: url(../../assets/images/ui/20513.png); }
.push-button:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }

/* cases à cocher : 20031 vide, 20032 survol, 20035 cochée, 20036 cochée survol (19 px à 144 ppp → 13 px) */
.checkbox { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox .box { flex: none; width: 13px; height: 13px; background: url(../../assets/images/ui/20031.png) 0 0 / 100% no-repeat; }
.checkbox:hover .box { background-image: url(../../assets/images/ui/20032.png); }
.checkbox input:checked + .box { background-image: url(../../assets/images/ui/20035.png); }
.checkbox:hover input:checked + .box { background-image: url(../../assets/images/ui/20036.png); }
.checkbox input:focus-visible + .box { outline: 1px dotted #000; outline-offset: 1px; }

.caret {
  width: 0; height: 0;
  border: 4px solid transparent;
  border-top: 4px solid #444;
  border-bottom: 0;
  margin-left: 2px;
}
.caret--light { border-top-color: #1e395b; }

/* ---------------------------------------------------------------- écran de connexion */

.signin-scene {
  position: relative;
  height: 165px;
  background: url(../../assets/images/ui/23013.png) center top / auto 100% no-repeat, #bfe1f7;
  padding: 44px 24px 0;
}
.signin-scene h1 {
  margin: 0;
  font: 30px/1.1 var(--light);
  font-weight: 300;
  color: var(--text);
}
.help-link { position: absolute; top: 40px; right: 18px; }

.signin { background: #fff; }   /* la scène 23013 se fond dans du blanc pur */
.signin-body {
  position: relative;          /* passe au-dessus de la scène qu'il chevauche */
  display: flex;
  gap: 18px;
  padding: 0 32px 28px 44px;
  margin-top: -52px;          /* l'image perso déborde sur la scène, comme dans WLM */
}
.signin-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 300px;
  padding-top: 16px;
}
.signin-fields .link { margin: -2px 0 6px; }
.signin-as { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.status-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: none;
}
.status-picker:hover, .status-picker[aria-expanded="true"] { border-color: #b8d6fb; background: linear-gradient(#fafbfd, #e8f1fb); }
.signin-fields .push-button { margin-top: 10px; }

.signin-progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 70px 24px 48px;
  background: linear-gradient(#fff, #eef5fc);
}
.signin-logo { display: flex; align-items: flex-end; gap: 6px; }
.signin-logo img:first-child { width: 84px; }
.signin-logo img:last-child { width: 190px; }
.signin-progress-text { margin: 0; color: var(--text-2); font-size: 13px; }

/* animation de connexion : image 208, 32 images de 48x36 */
.buddies-spinner {
  width: 48px; height: 36px;
  background: url(../../assets/images/ui/208.png) 0 0 no-repeat;
  animation: buddies 1.6s steps(32) infinite;
}
@keyframes buddies { to { background-position: -1536px 0; } }

/* ---------------------------------------------------------------- fenêtre principale */

.me-area {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-height: 112px;
  padding: 28px 10px 6px 4px;
  background: url(../../assets/scenes/WindowsLive/default-messenger-wide.jpg) left top / cover no-repeat;
  border-bottom: 1px solid #c5d5e6;
}
.me-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 10px; }
.me-name {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 1px 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: none;
  color: #1e395b;
  text-shadow: 0 0 6px #fff, 0 0 2px #fff;
}
.me-name:hover, .me-name[aria-expanded="true"] { border-color: rgba(30, 57, 91, .3); background: rgba(255, 255, 255, .55); }
.me-display-name { font: 17px/1.2 var(--light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-status-label { font-size: 12px; color: #4a5f78; white-space: nowrap; }
.psm {
  width: 100%;
  padding: 2px 5px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: none;
  color: #1e395b;
  text-shadow: 0 0 6px #fff;
  outline: none;
}
.psm::placeholder { color: #5b6f86; font-style: italic; }
.psm:hover { border-color: rgba(30, 57, 91, .3); background: rgba(255, 255, 255, .45); }
.psm:focus { background: #fff; color: var(--text); text-shadow: none; border-color: #569de5; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: linear-gradient(#fdfeff, #eef3f9);
  border-bottom: 1px solid var(--line);
}
.wordwheel {
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 2px 6px;
  border: 1px solid #c3cfdc;
  border-radius: 2px;
  background: #fff;
  outline: none;
}
.wordwheel::placeholder { color: var(--hint); }
.wordwheel:focus { border-color: #569de5; }
.toolbar-button {
  display: grid; place-items: center;
  width: 28px; height: 24px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: none;
}
.toolbar-button:hover { border-color: #b8d6fb; background: linear-gradient(#fafbfd, #e8f1fb); }

.contact-list { flex: 1; overflow-y: auto; padding: 4px 0 12px; }

.group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px 4px;
  border: 0;
  background: none;
  color: #1e395b;
  font: 13px var(--light);
  text-align: left;
}
.group-header::before {
  content: "";
  width: 9px; height: 9px;
  background: url(../../assets/images/ui/20621.png) center / 9px 6px no-repeat;
  transform: rotate(180deg);
}
.group-header[aria-expanded="false"]::before { background-image: url(../../assets/images/ui/20609.png); background-size: 6px 9px; transform: none; }
.group-header:hover { color: var(--link); }
.group-count { color: var(--text-2); }

.contacts { list-style: none; margin: 0 0 4px; padding: 0; }
.contact {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 0 8px 0 10px;
  border: 1px solid transparent;
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
}
.contact .usertile { margin: -5px -4px -6px -6px; transform: scale(.8); }
.contact:hover { border-color: #d6e7fb; background: linear-gradient(#f5f9fe, #e4effc); }
.contact[aria-selected="true"] { border-color: #8bbcf2; background: linear-gradient(#e7f1fd, #cde2fb); }
.contact-name { overflow: hidden; text-overflow: ellipsis; }
.contact-psm { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.contact[data-status="offline"] .contact-name { color: var(--text-2); }

/* ---------------------------------------------------------------- fenêtre de conversation (layout 920) */

.conv-window {
  position: fixed;
  z-index: 10;
  width: 560px;
  height: 470px;
  min-width: 380px;
  min-height: 340px;
  resize: both;
}
.titlebar--drag { pointer-events: auto; cursor: default; user-select: none; touch-action: none; }

.conv-you-area {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-height: 86px;
  padding: 30px 14px 8px 150px;     /* aligné sur la colonne des images perso */
  background: left top / cover no-repeat;
  border-bottom: 1px solid #c5d5e6;
  color: #1e395b;
  text-shadow: 0 0 6px #fff, 0 0 2px #fff;
}
.conv-you-text { min-width: 0; }
.conv-name { font: 17px/1.2 var(--light); }
.conv-status { color: #4a5f78; }
.conv-psm { color: #4a5f78; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-back { display: none; }

.conv-body { flex: 1; min-height: 0; display: flex; }
.conv-tiles {
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 145px;
  margin-top: -66px;                /* l'image du contact chevauche sa scène, comme dans WLM */
  padding: 0 0 6px 2px;
  position: relative;
}
.conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 6px 10px 10px 0; }

.conv-history {
  flex: 1;
  overflow-y: auto;
  padding: 6px 4px;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.msg-sender { color: #6e6e6e; font-size: 12px; margin-top: 8px; }
.msg-sender:first-child { margin-top: 0; }
.msg-text { padding-left: 12px; color: #000; }
.msg-system { display: flex; align-items: center; gap: 6px; margin: 8px 0; color: #6e6e6e; font-size: 12px; }
.emoticon { width: 19px; height: 19px; vertical-align: -4px; }

.conv-statusbar { min-height: 18px; padding: 0 4px 2px; color: #6e6e6e; font-size: 11px; }

/* barre d'outils : fonds de bouton 20126 (survol) et 20127 (appuyé), 9-grid 3/5 px */
.conv-toolbar { display: flex; gap: 2px; padding: 2px 0; }
.conv-tool {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 5px;
  border: 3px solid transparent;
  border-width: 5px 3px;
  background: none;
}
.conv-tool:hover, .conv-tool[aria-expanded="true"] { border-image: url(../../assets/images/ui/20126.png) 5 3 fill / 5px 3px stretch; }
.conv-tool:active { border-image: url(../../assets/images/ui/20127.png) 5 3 fill / 5px 3px stretch; }

.conv-compose {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid #b6c6d8;
  border-radius: 3px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08);
}
.conv-compose:focus-within { border-color: #569de5; }
.conv-input {
  flex: 1;
  min-height: 54px;
  border: 0;
  resize: none;
  background: transparent;
  font: 13px/1.4 var(--font);
  outline: none;
}
.conv-send { display: none; }

/* le Wizz : la fenêtre tremble environ une seconde */
.shaking { animation: wizz .9s linear; }
@keyframes wizz {
  0%, 100% { translate: 0 0; }
  10% { translate: -9px 4px; }  20% { translate: 8px -5px; }  30% { translate: -7px -6px; }
  40% { translate: 9px 5px; }   50% { translate: -8px 3px; }  60% { translate: 7px -4px; }
  70% { translate: -6px 6px; }  80% { translate: 5px -3px; }  90% { translate: -3px 2px; }
}

.emo-picker {
  position: fixed;
  display: grid;
  grid-template-columns: repeat(10, 28px);
  gap: 1px;
  padding: 4px;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #979797;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, .3);
  z-index: 100;
}
.emo-picker button {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: none;
}
.emo-picker button:hover, .emo-picker button:focus-visible { border-color: #aecff7; background: linear-gradient(#f2f7fe, #dcebfc); outline: none; }

/* ---------------------------------------------------------------- appels (layout 989 idResVideoCallImmersive) */

.conv-tool--text { gap: 4px; padding: 0 6px; }
.conv-call { flex: none; margin-bottom: 6px; }
.call { display: flex; flex-direction: column; border: 1px solid #8f9fb1; background: #000; }
.call-stage { position: relative; height: 290px; overflow: hidden; background: #000; }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.call[data-remote="screen"] .call-remote { object-fit: contain; }
.call-tiles { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 28px; }
.call[data-state="active"]:not([data-remote="none"]) .call-tiles { display: none; }
/* ma vidéo en incrustation, bordure grise de 1 px comme mevideolayerborder */
.call-local {
  position: absolute;
  right: 10px; bottom: 10px;
  width: 30%; max-width: 170px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgb(128, 128, 128);
  background: #000;
}
.call-local.mirror { transform: scaleX(-1); }
.call-status {
  position: absolute; left: 12px; right: 12px; top: 12px;
  color: #fff; text-align: center; font-size: 13px;
  text-shadow: 0 1px 3px #000;
}
.call-incoming { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 10px; }
.call-answer {
  min-width: 96px; height: 30px; padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .6); border-radius: 3px;
  color: #fff; font-weight: 600; text-shadow: 0 1px 1px rgba(0, 0, 0, .4);
}
.call-answer--accept { background: linear-gradient(#7fd24e, #3f9d1c); }
.call-answer--decline { background: linear-gradient(#ef7563, #c1301d); }
.call-answer:hover { filter: brightness(1.08); }

/* bandeau d'outils : fond 2046 (dégradé horizontal étiré), liseré blanc en haut */
.call-toolbar {
  display: flex; align-items: center; gap: 6px;
  height: 31px; padding: 0 6px;
  border-top: 1px solid #fff;
  background: url(../../assets/images/ui/2046.png) center / 100% 100% no-repeat, #e9edf2;
}
.call-tools, .call-links { display: flex; align-items: center; gap: 2px; }
.call-links { margin-left: auto; }
.call-tool {
  display: grid; place-items: center;
  height: 26px; min-width: 28px; padding: 0 4px;
  border: solid transparent; border-width: 5px 3px;
  background: none;
}
.call-tool:hover { border-image: url(../../assets/images/ui/20126.png) 5 3 fill / 5px 3px stretch; }
.call-tool[aria-pressed="true"], .call-tool:active { border-image: url(../../assets/images/ui/20127.png) 5 3 fill / 5px 3px stretch; }
.call-tool--cam[aria-pressed="false"] img { opacity: .45; }
.call-link { padding: 4px 6px; border: 0; background: none; color: #000; white-space: nowrap; }
.call-link:hover { text-decoration: underline; }
.call-timer { margin-left: 8px; color: #333; font-variant-numeric: tabular-nums; }
/* « Fin de l'appel » : croix 2039, bleue (2040) au survol */
.call-end { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border: 0; background: none; color: #000; white-space: nowrap; }
.call-end::before { content: ""; width: 12px; height: 12px; background: url(../../assets/images/ui/2039.png); }
.call-end:hover::before, .call-end:focus-visible::before { background-image: url(../../assets/images/ui/2040.png); }
.call-end:hover span { text-decoration: underline; }

.call:fullscreen { border: 0; }
.call:fullscreen .call-stage { height: calc(100vh - 31px); }
.call:fullscreen .call-local { max-width: 280px; }

/* ---------------------------------------------------------------- erreurs, dialogues, demandes */

/* erreur en ligne (wlidux idInlineError) : fond 20874 en 9-grid 3 px, icône 20790 */
.inline-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 4px 6px;
  border: 3px solid transparent;
  border-image: url(../../assets/images/ui/20874.png) 3 fill / 3px stretch;
}
.inline-error img { flex: none; margin-top: 1px; }

.connection-bar {
  padding: 5px 10px;
  border: 3px solid transparent;
  border-image: url(../../assets/images/ui/20874.png) 3 fill / 3px stretch;
  margin: 4px 6px 0;
}

.dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 30, 60, .25);
}
.dialog {
  width: min(380px, 100%);
  padding: 14px 16px 12px;
  background: var(--window);
  border: 1px solid rgba(20, 40, 70, .55);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.dialog-title { margin: 0 0 10px; font: 17px var(--light); font-weight: 300; color: #1e395b; }
.dialog-field { display: flex; flex-direction: column; gap: 6px; }
.dialog-message { margin: 10px 0 0; }
.dialog-message[data-kind="error"] { color: #c00; }
.dialog-message[data-kind="ok"] { color: #2b6e12; }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; }
.avatar-choice { padding: 3px; border: 1px solid transparent; border-radius: 3px; background: none; }
.avatar-choice img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.avatar-choice:hover, .avatar-choice:focus-visible { border-color: #8bbcf2; background: #e7f1fd; outline: none; }
.avatar-choice[aria-pressed="true"] { border-color: #3a7bd5; }

.request { display: flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 8px 0 10px; }
.request .usertile { margin: -5px -4px -6px -6px; transform: scale(.8); }
.request-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.request-text strong { font-weight: normal; font-family: "WLM Segoe Semibold", "Segoe UI Semibold", var(--font); }
.push-button--small { min-width: 0; height: 21px; padding: 0 8px; font-size: 11px; }

.empty-list { margin: 16px; color: var(--text-2); }
.empty-list img { vertical-align: -3px; }

/* ---------------------------------------------------------------- menus et notifications */

.menu {
  position: fixed;
  z-index: 20;
  min-width: 190px;
  padding: 2px;
  background: #f0f0f0;
  border: 1px solid #979797;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, .3);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 3px 20px 3px 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: none;
  text-align: left;
}
.menu-item:hover, .menu-item:focus-visible { border-color: #aecff7; background: linear-gradient(#f2f7fe, #dcebfc); outline: none; }
.menu-item .status-icon, .menu-item .menu-icon-spacer { flex: none; width: 16px; height: 16px; }
.menu-separator { height: 1px; margin: 3px 2px 3px 26px; background: #d7d7d7; border-bottom: 1px solid #fff; }

.toasts { position: fixed; right: 12px; bottom: 12px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 260px;
  padding: 8px 12px 8px 4px;
  background: linear-gradient(#ffffff, #e5eff9);
  border: 1px solid #8fa9c6;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  animation: toast-in .35s ease-out;
}
.toast--action { cursor: pointer; }
.toast-text { min-width: 0; }
.toast-text strong { display: block; font-weight: normal; font-family: "WLM Segoe Semibold", "Segoe UI Semibold", var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-text span { color: var(--text-2); }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .buddies-spinner, .toast, .shaking { animation: none; }
}

/* ---------------------------------------------------------------- téléphone */

@media (max-width: 680px) {
  body { background: var(--window); }
  .desktop { padding: 0; display: block; }
  .wlm-window, .wlm-window[data-screen="main"] {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    resize: none;
    min-width: 0;
    min-height: 0;
  }
  .caption-buttons { display: none; }
  .titlebar { padding-top: env(safe-area-inset-top); }

  .signin { overflow-y: auto; }
  .signin-scene { height: 150px; padding: 44px 16px 0; background-position: 30% top; }
  .signin-scene h1 { font-size: 26px; }
  .signin-body { flex-direction: column; align-items: center; gap: 4px; padding: 0 16px 24px; margin-top: -56px; }
  .signin-fields { width: 100%; max-width: 360px; padding-top: 4px; }
  .signin-fields .wl-edit { height: 36px; font-size: 16px; }      /* pas de zoom auto sur iOS */
  .signin-fields .push-button { align-self: stretch; height: 36px; font-size: 14px; }
  .checkbox { min-height: 30px; }

  .me-area { padding-top: calc(28px + env(safe-area-inset-top)); }
  .wordwheel { height: 32px; font-size: 16px; }
  .contact { height: 44px; }
  .toasts { left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top)); bottom: auto; }
  .toast { width: auto; }

  /* conversation plein écran, retour vers la liste */
  .conv-window { inset: 0 !important; width: 100%; height: 100dvh; min-width: 0; min-height: 0; border: 0; border-radius: 0; box-shadow: none; resize: none; }
  .conv-window .titlebar { display: none; }
  .conv-you-area { min-height: 0; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 4px; align-items: center; }
  .conv-back {
    display: block;
    flex: none;
    width: 36px; height: 36px;
    border: 0;
    background: none;
  }
  .conv-back::before {
    content: "";
    display: block;
    width: 11px; height: 11px;
    margin: auto;
    border-left: 2px solid #1e395b;
    border-bottom: 2px solid #1e395b;
    transform: rotate(45deg);
  }
  .conv-tiles { display: none; }
  .conv-main { padding: 4px 8px calc(8px + env(safe-area-inset-bottom)); }
  .conv-input { font-size: 16px; min-height: 40px; }
  .conv-send { display: block; height: 32px; }
  .conv-tool { height: 34px; }
  .emo-picker { grid-template-columns: repeat(8, 36px); left: 8px !important; right: 8px; }
  .emo-picker button { width: 36px; height: 36px; }

  /* appel sur téléphone : la vidéo prend le haut de l'écran */
  .call-stage { height: 46dvh; }
  .call-toolbar { height: 40px; }
  .call-tool { height: 34px; min-width: 36px; }
  .conv-tool--text { padding: 0 4px; font-size: 0; }   /* icônes seules faute de place */
}
