/* Webmail ANISTORE (v10 « Spawn ») : 3 colonnes (dossiers, liste, lecture), une seule colonne sur mobile. */
body.wm { height: 100dvh; overflow: hidden; }
.wm-top { padding: 0 16px; max-width: none; }
.wm-search { flex: 1; max-width: 520px; margin-left: 14px; }
.wm-search .input { min-height: 40px; }
.wm-user { color: var(--ink-soft); font-size: 13.5px; font-weight: 600; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-app { height: calc(100dvh - 68px); }
.wm-grid { display: grid; grid-template-columns: 236px minmax(300px, 400px) 1fr; height: 100%; }

/* Dossiers : même barre latérale que anistore.sbs */
.wm-side { display: flex; flex-direction: column; gap: 3px; padding: 16px 12px; background: var(--deep); border-right: 1px solid var(--line); overflow-y: auto; }
.wm-side .btn { width: 100%; margin-bottom: 12px; }
.wm-folder { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: none; text-align: left; font-weight: 500; font-size: 14.5px; color: var(--ink-soft); transition: background .15s, color .15s; }
.wm-folder:hover { background: rgba(200, 220, 255, .05); color: var(--ink); }
.wm-folder[aria-current="true"] { background: rgba(255, 42, 60, .12); color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); font-weight: 600; }
.wm-folder svg { flex: none; width: 18px; height: 18px; }
.wm-folder span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-folder b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--pink); color: #3a0d20; font-size: 12px; text-align: center; }
.wm-side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.wm-side-foot button, .wm-side-foot a { padding: 8px 10px; border: 0; background: none; text-align: left; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); border-radius: 9px; }
.wm-side-foot button:hover, .wm-side-foot a:hover { background: rgba(200, 220, 255, .05); color: var(--ink); }

/* Liste */
.wm-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg); }
.wm-list-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.wm-list-head h2 { flex: 1; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel-2); color: var(--ink-soft); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .3); transition: color .15s, border-color .15s; }
.wm-iconbtn:hover { color: var(--gold); border-color: rgba(255, 42, 60, .5); }
.wm-iconbtn svg { width: 17px; height: 17px; }
.wm-items { flex: 1; overflow-y: auto; }
.wm-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; padding: 12px 14px 12px 18px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; position: relative; transition: background .12s; }
.wm-item:hover { background: rgba(200, 220, 255, .04); }
.wm-item[aria-current="true"] { background: var(--panel); box-shadow: inset 3px 0 0 var(--gold); }
.wm-item.unseen::before { content: ""; position: absolute; left: 6px; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px rgba(255, 138, 148, .8); }
.wm-item .who { font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-item.unseen .who, .wm-item.unseen .subj { font-weight: 700; color: var(--ink); }
.wm-item time { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.wm-item .subj { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-item .ic { font-size: 12px; color: var(--gold); }
.wm-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.wm-empty { padding: 40px 20px; text-align: center; color: var(--ink-soft); }

/* Lecture */
.wm-read { min-width: 0; overflow-y: auto; background: var(--bg-2); }
.wm-read-empty { height: 100%; display: grid; place-items: center; text-align: center; color: var(--ink-soft); padding: 30px; }
.wm-read-empty img { width: 180px; margin: 0 auto 16px; opacity: .9; }
.wm-msg { padding: 22px 26px 40px; }
.wm-msg h1 { font-size: clamp(18px, 2.2vw, 24px); margin-bottom: 14px; font-family: var(--font-body); font-weight: 700; }
.wm-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.wm-meta { display: grid; gap: 3px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 14px; }
.wm-meta b { font-weight: 700; }
.wm-meta .muted { font-size: 13px; }
.wm-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.65; }
.wm-frame { width: 100%; min-height: 300px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.wm-imgbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 9px 14px; margin-bottom: 10px; border: 1px solid rgba(255, 42, 60, .35); border-radius: 10px; background: rgba(255, 42, 60, .08); color: var(--gold); font-size: 13.5px; font-weight: 600; }
.wm-atts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.wm-att { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel); font-size: 13.5px; font-weight: 600; transition: border-color .15s; }
.wm-att:hover { border-color: rgba(255, 42, 60, .5); }
.wm-att small { color: var(--ink-soft); font-weight: 500; }
.wm-back { display: none; }

/* Rédaction */
dialog.wm-compose { width: min(760px, calc(100vw - 20px)); }
.wm-compose form { gap: 10px; }
.wm-compose .textarea { min-height: 260px; font-family: var(--font-body); }
.wm-row { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 8px; }
.wm-row label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.wm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel-2); font-size: 13px; font-weight: 600; }
.wm-chip button { border: 0; background: none; font-weight: 800; color: var(--ink-soft); padding: 0 2px; }
.wm-chip button:hover { color: var(--down); }
.wm-check { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-weight: 600; font-size: 14px; cursor: pointer; user-select: none; }
.wm-check input { width: 18px; height: 18px; accent-color: var(--gold-2); cursor: pointer; }

/* Connexion : image du spawn en fond */
body.wm .wm-app:has(.wm-login) { overflow-y: auto; background: linear-gradient(180deg, rgba(8, 9, 13, .7), rgba(8, 9, 13, .92) 70%, var(--bg)); }
.wm-login { max-width: 430px; margin: 8vh auto 40px; padding: 30px; display: grid; gap: 16px; background: rgba(18, 21, 28, .94); backdrop-filter: blur(8px); }
.wm-login h1 { font-size: 24px; color: var(--gold); text-align: center; }
.wm-login img.logo { width: 220px; margin: 0 auto 4px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .5)); }
.wm-at { display: flex; align-items: stretch; }
.wm-at .input { border-radius: 9px 0 0 9px; }
.wm-at span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-2); border-left: 0; border-radius: 0 9px 9px 0; background: var(--panel-2); color: var(--ink-soft); font-weight: 700; font-size: 14px; white-space: nowrap; }
.wm-burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel-2); align-items: center; justify-content: center; }
.wm-burger span, .wm-burger span::before, .wm-burger span::after { display: block; width: 18px; height: 2.5px; background: var(--ink); border-radius: 2px; position: relative; content: ""; }
.wm-burger span::before { position: absolute; top: -6px; } .wm-burger span::after { position: absolute; top: 6px; }

@media (max-width: 1100px) { .wm-grid { grid-template-columns: 210px minmax(260px, 340px) 1fr; } .wm-user { display: none; } }
@media (max-width: 820px) {
  .wm-grid { grid-template-columns: 1fr; }
  .wm-side { position: fixed; z-index: 30; top: 62px; bottom: 0; left: 0; width: 260px; transform: translateX(-105%); transition: transform .2s; box-shadow: 10px 0 30px rgba(0, 0, 0, .5); }
  .wm-side.open { transform: none; }
  .wm-burger:not([hidden]) { display: inline-flex; }
  .wm-list { border-right: 0; }
  .wm-grid.reading .wm-list { display: none; }
  .wm-grid:not(.reading) .wm-read { display: none; }
  .wm-back { display: inline-flex; }
  .wm-search { margin-left: 4px; }
  .wm-app { height: calc(100dvh - 62px); }
  .wm-msg { padding: 16px 16px 40px; }
  .brand span { display: none; }
}
@media (max-width: 480px) {
  .wm-top { gap: 8px; }
  .wm-top .brand { display: none; }
  .wm-search { min-width: 0; }
  .wm-top .top-actions { gap: 6px; }
  .wm-top .top-actions .btn { min-height: 36px; padding: 8px 10px 7px; font-size: 12px; }
}
.wm-side .btn svg { width: 16px; height: 16px; }
/* Logo carré Anistore */
.wm-login img.logo { width: 96px; height: 96px; border-radius: 18px; }
.wm-read-empty img { width: 96px; height: 96px; border-radius: 18px; opacity: .55; margin: 0 auto 10px; }
.brand img { border-radius: 9px; }
