@font-face {
  font-family: "W95FA";
  src: url("./font/w95fa.woff2") format("woff2"),
    url("./font/w95fa.woff") format("woff"),
    url("./font/W95FA.otf") format("opentype");
  font-display: swap;
}

:root {
  --teal: #008080;
  --wanadoo-red: #e30613;
  --wanadoo-red-dark: #b00410;
  --wanadoo-red-soft: #f8d8da;
  --win-gray: #c3c3c3;
  --win-gray-dark: #808080;
  --win-title: #000080;
  --win-title-light: #1084d0;
  --w95-font: "W95FA", "Pixelated MS Sans Serif", "MS Sans Serif", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--w95-font);
  font-size: 18px;
  /* Rendu pixel-perfect cross-OS pour W95FA (police bitmap) :
     - font-synthesis: none  -> empêche le navigateur de fabriquer un faux gras
       (cause principale du flou/baveux sur Windows et écrans non-Retina).
     - -webkit-font-smoothing: none -> sur macOS WebKit/Chromium, désactive l'AA
       et restitue les pixels tels que dessinés (stable lors d'un drag entre
       écrans Retina et standard).
     - -moz-osx-font-smoothing: grayscale -> Firefox macOS, moins gras que le
       rendu subpixel par défaut.
     - text-rendering: geometricPrecision -> désactive les ajustements de
       crénage/ligatures qui floutent une bitmap font.
     - font-smooth: never -> hint legacy, ignoré par les navigateurs modernes
       mais inoffensif.
  */
  font-synthesis: none;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  font-smooth: never;
}

.window,
.title-bar,
.title-bar-text,
.menu-bar,
.toolbar,
.toolbar-2,
.status-bar,
button,
input,
select,
textarea,
label,
table {
  font-family: var(--w95-font) !important;
  font-size: inherit;
  font-synthesis: none;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

html {
  height: auto;
  background: var(--win-gray);
  margin: 0;
  padding: 0;
}

/* Scroll naturel au niveau de la page : seule la barre du haut
   (.frozen-top en sticky) et la taskbar (.taskbar en position:fixed)
   restent figées. Tout le reste défile normalement. */
body.desktop {
  min-height: 100dvh;
  background: var(--win-gray);
  padding: 0 0 calc(44px + env(safe-area-inset-bottom)) 0;
  margin: 0;
  color: #000;
  display: block;
}

.desktop-icons {
  position: fixed;
  top: 180px;
  left: 14px;
  display: grid;
  gap: 14px;
  z-index: 1;
}

.desktop-icon {
  width: 72px;
  text-align: center;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
  user-select: none;
}

.desktop-icon-img {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 2px;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.4));
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
}

.desktop-icon-img img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  object-fit: contain;
}

.desktop-icon.selected span {
  background: #0a246a;
  outline: 1px dotted #fff;
  padding: 0 2px;
}

.main-window {
  margin: 0;
  max-width: none;
  width: 100%;
  display: block;
  box-shadow: none;
  border-radius: 0;
}

.main-window > .window-body {
  display: block;
  min-height: 0;
}

.main-window .content {
  min-height: 0;
}

/* Bandeau supérieur figé (title-bar + menu-bar + toolbar + toolbar-2).
   On utilise position: sticky pour qu'il colle au top lors du scroll de
   page, tout en restant dans le flux pour ne pas chevaucher le contenu. */
.frozen-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--win-gray);
  box-shadow: 0 1px 0 #808080, 0 2px 6px rgba(0, 0, 0, 0.12);
}

.menu-bar {
  display: flex;
  gap: 14px;
  padding: 3px 6px;
  background: var(--win-gray);
  border-bottom: 1px solid #808080;
  font-size: 16px;
}

.menu-bar span {
  padding: 2px 6px;
  cursor: default;
}

.menu-bar span:hover {
  background: var(--win-title);
  color: #fff;
}

.wanadoo-bar {
  background: #fff;
  border-bottom: 1px solid #999;
}

.wanadoo-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--wanadoo-red);
  color: #fff;
  padding: 4px 10px 4px 14px;
  font-weight: bold;
}

.wanadoo-logo {
  font-family: "Arial Black", Arial, sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
}

.wanadoo-logo .w-dot {
  color: #ffe600;
}

.wanadoo-top-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  font-size: 16px;
  font-weight: normal;
}

.wanadoo-top-menu li {
  cursor: pointer;
}

.wanadoo-top-menu li:hover {
  text-decoration: underline;
}

.wanadoo-top-menu li.sep {
  opacity: 0.7;
}

.wanadoo-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #fff 0%, #ffe6e8 100%);
  border-top: 1px solid var(--wanadoo-red);
  border-bottom: 1px solid #d4a3a8;
  font-size: 16px;
}

.wanadoo-search input {
  flex: 0 0 260px;
  padding: 2px 4px;
  border: 1px solid #7a7a7a;
  font-family: inherit;
  font-size: 16px;
}

.wanadoo-search select {
  font-size: 16px;
}

.wanadoo-search .valider {
  background: var(--wanadoo-red);
  color: #fff;
  border: 1px solid #000;
  padding: 2px 10px;
  font-weight: bold;
  cursor: pointer;
}

.wanadoo-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #efe7d4;
  border-top: 2px solid var(--wanadoo-red);
  padding: 0 10px;
}

.wanadoo-crumbs {
  background: var(--wanadoo-red);
  color: #fff;
  padding: 4px 16px;
  font-weight: bold;
  margin-right: 4px;
  position: relative;
}

.tabs {
  display: flex;
  gap: 2px;
  padding-top: 4px;
}

.tabs button {
  background: #f1e9d7;
  border: 1px solid #9a8a62;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  padding: 4px 14px;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  color: #5b4a1e;
}

.tabs button.active {
  background: #fff;
  font-weight: bold;
  color: #000;
  position: relative;
  top: 1px;
  border-bottom: 1px solid #fff;
}

.tabs-right {
  margin-left: auto;
  padding: 4px 0;
}

.tabs-right a {
  color: var(--wanadoo-red);
  font-weight: bold;
  text-decoration: none;
  font-size: 16px;
}

.tabs-right a:hover {
  text-decoration: underline;
}

.tabs-right .sep {
  margin: 0 6px;
  color: #777;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #fff;
  border-bottom: 1px solid #bbb;
  font-size: 16px;
}

.toolbar button,
.toolbar-2 button {
  font-family: inherit;
  font-size: 16px;
  padding: 2px 8px;
}

.toolbar-spacer {
  flex: 0 0 16px;
}

.toolbar-counter {
  background: #fffbcf;
  border: 1px solid #caa600;
  padding: 0 4px;
  font-weight: bold;
}

.toolbar-2 {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f5efdb;
  border-bottom: 1px solid #b9a97a;
  font-size: 16px;
}

.toolbar-2 .spacer {
  flex: 1;
}

.wanadoo-input {
  padding: 6px 10px;
  border: 1px solid #7a7a7a;
  font-family: inherit;
  font-size: 17px;
  flex: 1;
  min-width: 200px;
}

.wanadoo-select {
  font-size: 17px;
  padding: 6px 10px;
  width: 220px;
  flex: 0 0 220px;
  height: 38px;
  line-height: 24px;
}

.toolbar-2 {
  align-items: center;
}

.toolbar-2 label {
  display: inline-flex;
  align-items: center;
  font-weight: bold;
  flex-shrink: 0;
}

.toolbar-2 #searchBtn {
  padding: 6px 14px;
  font-weight: bold;
  flex-shrink: 0;
  width: auto;
  min-width: 56px;
}

.wanadoo-input {
  height: 38px;
  line-height: 24px;
  flex: 1 1 auto;
}

.content {
  display: grid;
  grid-template-columns: 240px 1fr;
  background: #fff;
}

.sidebar {
  background: linear-gradient(180deg, #fff 0%, #fff 60%, #fdeef0 100%);
  border-right: 1px solid #999;
  padding: 0;
}

.sidebar-zone {
  padding: 8px 10px 10px;
  border-bottom: 1px dashed #d1c3c5;
}

.sidebar-avatar {
  text-align: center;
  padding: 16px 8px 18px;
  border-top: 1px dashed #d0bfa0;
  margin-top: 6px;
  background: linear-gradient(180deg, transparent 0%, #fdeef0 100%);
}

.avatar-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--wanadoo-red);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
  background: #fff;
}

.avatar-caption {
  margin-top: 8px;
  font-weight: bold;
  color: var(--wanadoo-red);
  font-size: 17px;
  letter-spacing: 0.5px;
}

.avatar-status {
  font-size: 13px;
  color: #006600;
  font-style: italic;
  margin-top: 2px;
}

.avatar-status::before {
  content: "● ";
  color: #00cc00;
  font-size: 12px;
}

.col-from-prefix {
  display: inline-block;
  background: #c3c3c3;
  color: #555;
  padding: 0 4px;
  margin-right: 4px;
  font-size: 12px;
  border: 1px solid #888;
  font-weight: normal;
}

@media (max-width: 700px) {
  .sidebar-avatar {
    display: none;
  }
}

.sidebar-zone.small {
  padding-bottom: 14px;
}

.sidebar-head {
  color: var(--wanadoo-red);
  font-weight: bold;
  margin-bottom: 4px;
}

.sidebar-sub {
  color: #555;
  font-size: 15px;
  line-height: 1.4;
}

.folder-list {
  list-style: none;
  margin: 4px 0;
  padding: 0;
}

.folder {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 16px;
  color: #1b3e8f;
}

.folder .folder-icon {
  width: 16px;
  font-size: 19px;
}

.folder:hover {
  background: #fde8ea;
}

.folder.active {
  background: #0a246a;
  color: #fff;
}

.folder-count {
  margin-left: auto;
  background: #fff;
  color: #000;
  border: 1px solid #7a7a7a;
  padding: 0 4px;
  font-size: 15px;
}

.folder.active .folder-count {
  background: #fff;
  color: #000;
}

.pref-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.pref-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 2px;
  font-size: 16px;
  color: #1b3e8f;
}

.pref-list.tiny li {
  color: var(--wanadoo-red);
  font-size: 15px;
}

.drop-btn {
  margin-left: auto;
  padding: 0 6px;
  font-family: inherit;
  font-size: 15px;
}

.mail-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}

.mail-main-head {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(180deg, #fff7d0 0%, #ffe680 100%);
  border-bottom: 2px solid #b08a00;
  font-size: 20px;
  font-weight: bold;
  color: #2a1d00;
  letter-spacing: 0.5px;
}

.mail-main-head .muted {
  color: #5a3d00;
  font-weight: normal;
  font-style: italic;
}

.mail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
  background: #fff;
  table-layout: fixed;
}

.mail-table thead th {
  background: var(--win-gray);
  border: 1px solid #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  padding: 2px 6px;
  text-align: left;
  font-weight: bold;
  box-shadow: inset 1px 1px 0 #fff;
}

.mail-table .col-check {
  width: 24px;
}

.mail-table .col-star {
  width: 22px;
  text-align: center;
}

.mail-table .col-from {
  width: 150px;
}

.mail-table .col-date {
  width: 130px;
}

.mail-table .col-size {
  width: 60px;
  text-align: right;
}

.mail-table tbody tr {
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.mail-table tbody tr:nth-child(odd) {
  background: #fafaf2;
}

.mail-table tbody tr.unread td {
  font-weight: bold;
}

.mail-table tbody tr.active {
  background: #0a246a;
  color: #fff;
}

.mail-table tbody tr.active .row-tag {
  color: #fff;
  border-color: #fff;
}

.mail-table tbody td {
  padding: 3px 6px;
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-table tbody td.col-star {
  text-align: center;
  color: #c9a100;
}

.mail-table tbody td.col-size {
  text-align: right;
  color: #555;
}

.row-subject .row-tag {
  display: inline-block;
  border: 1px solid #b53c4a;
  color: var(--wanadoo-red);
  padding: 0 4px;
  margin-left: 6px;
  font-size: 15px;
  vertical-align: 1px;
}

.row-locked .row-tag {
  color: #5c3a10;
  border-color: #caa600;
  background: #fffbcf;
}

.mail-view {
  border-top: 1px solid #b9a97a;
  background: #fffcf3;
}

.thread-header {
  padding: 8px 12px;
  border-bottom: 1px solid #d5c99d;
  background: #f3ecd8;
}

.thread-header h2 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--wanadoo-red);
  letter-spacing: 0.5px;
}

.thread-hero {
  display: flex;
  gap: 8px;
  padding: 10px 14px 0;
  flex-wrap: wrap;
  background: #fffcf3;
}

.thread-hero:empty {
  display: none;
}

.thread-hero img {
  max-width: 320px;
  max-height: 220px;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3), 0 0 0 1px #808080;
  image-rendering: auto;
  object-fit: cover;
}

.thread-hero .hero-caption {
  font-size: 16px;
  color: #555;
  margin-top: 4px;
}

.thread-meta {
  margin: 0;
  font-size: 16px;
  color: #333;
}

.thread-body {
  padding: 12px 14px;
  line-height: 1.55;
  font-size: 19px;
  white-space: pre-wrap;
  font-family: var(--w95-font);
  min-height: 120px;
  background: #fffcf3;
}

.thread-locked-body {
  white-space: pre-wrap;
  margin-bottom: 18px;
}

.thread-unlock-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px 8px;
}

.unlock-big {
  background: linear-gradient(135deg, #ffec3d 0%, #ffaa00 100%) !important;
  color: #2a1d00 !important;
  border: 3px solid !important;
  border-color: #fff #808080 #808080 #fff !important;
  padding: 14px 28px !important;
  font-family: var(--w95-font) !important;
  font-size: 18px !important;
  font-weight: bold !important;
  letter-spacing: 1px !important;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25);
  animation: unlockPulse 1.5s infinite alternate;
}

.unlock-big:hover {
  background: linear-gradient(135deg, #fff7c2 0%, #ffbf3c 100%) !important;
}

.unlock-big:active {
  border-color: #808080 #fff #fff #808080 !important;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
}

@keyframes unlockPulse {
  0% { box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(255, 170, 0, 0.5); }
  100% { box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25), 0 0 0 8px rgba(255, 170, 0, 0); }
}

.unlock-hint {
  font-size: 16px;
  color: #b00410;
  font-style: italic;
  font-weight: bold;
}

.attachment-strip {
  display: flex;
  gap: 8px;
  padding: 0 14px 12px;
  flex-wrap: wrap;
}

.attachment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #888;
  background: #fff;
  padding: 2px 8px;
  box-shadow: 1px 1px 0 #c8c8c8;
  font-size: 16px;
}

.attachment::before {
  content: "📎";
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f3ecd8;
  border-top: 1px solid #b9a97a;
  font-size: 16px;
}

.pagination .spacer {
  flex: 1;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 52px;
  background: #ffffe1;
  border: 1px solid #000;
  padding: 6px 10px;
  font-size: 16px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  z-index: 50;
}

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(42px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--win-gray);
  border-top: 2px solid #fff;
  box-shadow: 0 -1px 0 #808080 inset;
  display: flex;
  align-items: center;
  padding-left: 4px;
  padding-right: 4px;
  padding-top: 2px;
  gap: 4px;
  z-index: 30;
  font-size: 16px;
}

.start-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  height: 34px;
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  background: var(--win-gray);
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  cursor: pointer;
}

.start-button:active {
  border-color: #808080 #fff #fff #808080;
}

.start-logo {
  color: var(--wanadoo-red);
  font-size: 20px;
  font-weight: bold;
}

.taskbar-apps {
  display: flex;
  gap: 2px;
  margin-left: 4px;
  flex: 1;
  overflow: hidden;
}

.taskbar-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  height: 34px;
  font-family: inherit;
  font-size: 16px;
  background: var(--win-gray);
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.taskbar-app.active {
  border-color: #808080 #fff #fff #808080;
  background: linear-gradient(135deg, #c3c3c3 0%, #a5a5a5 100%);
  font-weight: bold;
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border: 1px inset #fff;
  background: var(--win-gray);
}

.taskbar-legal {
  font-size: 15px;
  font-style: italic;
  color: #555;
  margin-left: 8px;
  align-self: center;
  line-height: 1.2;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .taskbar-legal {
    display: none;
  }
}

.tray-icon {
  font-size: 17px;
}

.tray-clock {
  font-size: 16px;
  font-family: inherit;
}

@media (max-width: 820px) {
  .main-window {
    margin-left: 0;
  }

  .content {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #999;
  }

  .desktop-icons {
    display: none;
  }
}

@media (max-width: 1100px) {
  .main-window {
    margin-left: 0;
  }

  .desktop-icons {
    display: none;
  }
}

/* =================================================================
   COUNTDOWN — fenêtre flottante en haut à gauche
   ================================================================= */
.countdown-window {
  position: fixed;
  top: 14px;
  left: 14px;
  width: 200px;
  z-index: 25;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
}

.countdown-title.title-bar {
  background: linear-gradient(90deg, #00007f 0%, #1084d0 100%);
}

.countdown-body {
  margin: 0;
  padding: 8px 10px;
  text-align: center;
}

.countdown-label {
  font-size: 16px;
  color: #333;
}

.countdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.countdown-time {
  flex: 1;
  font-size: 28px;
  font-weight: bold;
  font-family: var(--w95-font);
  letter-spacing: 2px;
  color: #000;
  background: #c3c3c3;
  border: 2px inset #fff;
  padding: 2px 0;
}

.countdown-tictac {
  font-size: 17px;
  color: #b00410;
  font-weight: bold;
  font-style: italic;
  letter-spacing: 0.5px;
  animation: tictacPulse 1s infinite alternate;
}

@keyframes tictacPulse {
  0% { opacity: 0.5; transform: translateX(0); }
  100% { opacity: 1; transform: translateX(2px); }
}

.countdown-hint {
  font-size: 15px;
  color: #555;
  line-height: 1.3;
}

.countdown-window.warning .countdown-time {
  color: #b00410;
}

.countdown-window.urgent {
  animation: countdownShake 0.5s infinite;
}

.countdown-window.urgent .countdown-title.title-bar {
  background: linear-gradient(90deg, #b00410 0%, #e30613 100%);
}

.countdown-window.urgent .countdown-time {
  color: #fff;
  background: #b00410;
  animation: countdownBlink 0.6s infinite alternate;
}

@keyframes countdownShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  50% { transform: translateX(2px); }
  75% { transform: translateX(-1px); }
}

@keyframes countdownBlink {
  0% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* taskbar tile pour le countdown — toujours visible, jaune accentué */
.countdown-tray {
  background: linear-gradient(135deg, #ffffe0 0%, #ffd966 100%) !important;
  border: 2px solid !important;
  border-color: #fff #808080 #808080 #fff !important;
  font-weight: bold !important;
  color: #5a3d00 !important;
  position: relative;
  padding-right: 14px !important;
}

.countdown-tray::after {
  content: " — Tic, tac…";
  font-style: italic;
  font-weight: normal;
  color: #b00410;
  font-size: 15px;
  margin-left: 4px;
}

.countdown-tray.hidden {
  display: none !important;
}

.countdown-tray.warning {
  background: linear-gradient(135deg, #ffec8a 0%, #ffaa00 100%) !important;
  color: #2a1d00 !important;
  animation: trayWarn 1.6s infinite alternate;
}

.countdown-tray.urgent {
  background: linear-gradient(135deg, #ff6b6b 0%, #b00410 100%) !important;
  color: #fff !important;
  animation: trayUrgent 0.5s infinite alternate;
}

.countdown-tray.urgent::after {
  color: #fff7c2;
}

@keyframes trayWarn {
  0% { box-shadow: inset 0 0 0 1px #ffaa00; }
  100% { box-shadow: inset 0 0 0 2px #ff6b00; }
}

@keyframes trayUrgent {
  0% { transform: scale(1); }
  100% { transform: scale(1.04); }
}

/* =================================================================
   LECTEUR AUDIO — façon Winamp
   ================================================================= */
.thread-audio:empty {
  display: none;
}

.thread-audio {
  padding: 10px 14px 0;
}

.winamp {
  background: #2a2a2a;
  border: 2px solid;
  border-color: #4a4a4a #1a1a1a #1a1a1a #4a4a4a;
  padding: 0;
  width: 380px;
  max-width: 100%;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
  font-family: var(--w95-font);
}

.winamp-title-bar {
  background: linear-gradient(180deg, #5a4a8a 0%, #2a2050 100%);
  color: #d8c8ff;
  padding: 3px 8px;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid #000;
  display: flex;
  align-items: center;
}

.winamp-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.winamp-screen {
  background: #000;
  color: #00ff7f;
  padding: 6px 8px;
  border-bottom: 1px solid #000;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 0 4px #00ff7f;
}

.winamp-time {
  font-family: "Courier New", monospace;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
}

.winamp-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 18px;
  flex: 1;
  justify-content: flex-end;
}

.winamp-bars span {
  display: block;
  width: 4px;
  background: linear-gradient(180deg, #00ff7f 0%, #008000 100%);
  height: 4px;
  transition: height 0.15s;
  opacity: 0.6;
}

.winamp.playing .winamp-bars span {
  animation: winampPulse 0.6s infinite alternate;
  opacity: 1;
}

.winamp.playing .winamp-bars span:nth-child(1) { animation-delay: 0.0s; }
.winamp.playing .winamp-bars span:nth-child(2) { animation-delay: 0.1s; }
.winamp.playing .winamp-bars span:nth-child(3) { animation-delay: 0.2s; }
.winamp.playing .winamp-bars span:nth-child(4) { animation-delay: 0.3s; }
.winamp.playing .winamp-bars span:nth-child(5) { animation-delay: 0.0s; }
.winamp.playing .winamp-bars span:nth-child(6) { animation-delay: 0.15s; }
.winamp.playing .winamp-bars span:nth-child(7) { animation-delay: 0.25s; }
.winamp.playing .winamp-bars span:nth-child(8) { animation-delay: 0.05s; }
.winamp.playing .winamp-bars span:nth-child(9) { animation-delay: 0.2s; }
.winamp.playing .winamp-bars span:nth-child(10) { animation-delay: 0.1s; }
.winamp.playing .winamp-bars span:nth-child(11) { animation-delay: 0.3s; }
.winamp.playing .winamp-bars span:nth-child(12) { animation-delay: 0.0s; }

@keyframes winampPulse {
  0% { height: 3px; }
  100% { height: 18px; }
}

.winamp-controls {
  background: #c3c3c3;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.winamp-btn {
  background: var(--win-gray);
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 4px 10px;
  font-family: var(--w95-font), "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  min-width: 44px;
  min-height: 32px;
  color: #000;
}

.winamp-btn-play {
  background: linear-gradient(180deg, #d8f5d8 0%, #a8e8a8 100%);
  color: #006600;
}

.winamp-btn:active {
  border-color: #808080 #fff #fff #808080;
}

.winamp-seek {
  flex: 1;
  min-width: 80px;
  height: 16px;
}

.winamp-vol-label {
  font-size: 15px;
  color: #444;
  margin-left: 6px;
}

.winamp-vol {
  width: 60px;
}

/* =================================================================
   BADGE "NOUVEAU !" pour les mails fraîchement arrivés
   ================================================================= */
.row-new-badge {
  display: inline-block;
  background: #ffec3d;
  color: #b00410;
  border: 1px solid #b00410;
  padding: 0 5px;
  margin-right: 6px;
  font-size: 15px;
  font-weight: bold;
  animation: rowBlink 0.9s infinite alternate;
  vertical-align: 1px;
}

tr.row-new td {
  background: #fffce0 !important;
}

@keyframes rowBlink {
  0% { background: #ffec3d; }
  100% { background: #ff7f50; color: #fff; }
}

/* =================================================================
   MENTION LÉGALE — discrète tout en bas
   ================================================================= */
.legal-mention {
  position: relative;
  z-index: 1;
  margin: 12px 0 50px;
  padding: 0 16px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  font-style: italic;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* =================================================================
   BSOD — Blue Screen Of Death (Win95) à la fin du countdown
   ================================================================= */
.bsod {
  position: fixed;
  inset: 0;
  color: #fff;
  z-index: 9999;
  font-family: "Perfect DOS VGA 437", "Courier New", monospace;
  font-size: 17px;
  line-height: 1.55;
  padding: 60px 80px;
  letter-spacing: 1px;
  cursor: pointer;
  overflow: auto;
  text-shadow: 2px 2px 0 rgba(0, 0, 60, 0.9);
  isolation: isolate;
  background: rgba(0, 0, 170, 0.32);
}

.bsod::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("./still-16.jpg") center/cover no-repeat;
  filter: blur(3px) saturate(1.05);
  transform: scale(1.05);
  z-index: -1;
  pointer-events: none;
}

.bsod-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.bsod-error {
  white-space: pre-wrap;
  font-family: "Perfect DOS VGA 437", "Courier New", monospace;
  font-size: 17px;
  margin: 18px 0 32px;
  min-height: 220px;
}

.bsod-error .tictac-bold {
  font-weight: bold;
  color: #ffec3d;
  text-shadow: 2px 2px 0 #000, 0 0 6px rgba(255, 236, 61, 0.5);
  letter-spacing: 1.5px;
}

.bsod-error .bsod-caret {
  display: inline-block;
  margin-left: 2px;
  animation: bsodCaret 0.6s steps(2) infinite;
}

.bsod-error.done .bsod-caret {
  display: none;
}

@keyframes bsodCaret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.bsod-intro {
  font-family: "Perfect DOS VGA 437", "Courier New", monospace;
  font-size: 22px;
  color: #ffec3d;
  margin: 36px 0 0;
  text-align: center;
  text-shadow: 2px 2px 0 #000, 0 0 14px rgba(255, 236, 61, 0.45);
  font-weight: bold;
  letter-spacing: 1.5px;
  opacity: 0;
}

.bsod-intro.show {
  opacity: 1;
  animation: bsodIntroIn 0.5s ease-out;
}

@keyframes bsodIntroIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.bsod-hidden-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.bsod-inner {
  position: relative;
}

.bsod.hidden {
  display: none !important;
}

.bsod-inner {
  max-width: 920px;
  margin: 0 auto;
}

.bsod-title {
  text-align: center;
  background: #c3c3c3;
  color: #0000aa;
  padding: 0 14px;
  display: inline-block;
  margin: 0 auto 28px;
  font-weight: bold;
  font-size: 18px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.bsod p {
  margin: 0 0 18px;
  white-space: pre-line;
}

.bsod-press {
  margin-top: 36px !important;
  text-align: center;
  font-weight: bold;
}

.bsod-blink {
  display: inline-block;
  width: 0.6em;
  animation: bsodCursorBlink 1s steps(2) infinite;
}

@keyframes bsodCursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.bsod-cta {
  margin-top: 36px !important;
  text-align: center;
  font-size: 15px;
  color: #ffec3d;
}

.bsod-cta a {
  color: #fff;
  text-decoration: underline;
  font-weight: bold;
  cursor: pointer;
}

.bsod-cta a:hover {
  color: #00ff7f;
}

/* responsive countdown : sur petit écran, on cache la fenêtre flottante,
   on garde juste le tile dans la taskbar */
@media (max-width: 980px) {
  .countdown-window {
    display: none;
  }
  .countdown-tray {
    display: inline-flex !important;
  }
  .countdown-tray.hidden {
    display: none !important;
  }
  .desktop-icons {
    display: none;
  }
}

/* =================================================================
   SPLASH SCREEN — Connexion à Wanadoo (3 sec au démarrage)
   ================================================================= */
.splash {
  position: fixed;
  inset: 0;
  background: var(--teal);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.splash.hidden {
  display: none !important;
}

.splash-window {
  width: 480px;
  max-width: 100%;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  animation: splashAppear 0.4s ease-out;
}

@keyframes splashAppear {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.splash-body {
  margin: 0;
  padding: 16px;
}

.splash-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.splash-icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  flex: 0 0 48px;
  animation: splashIconSpin 2s linear infinite;
}

@keyframes splashIconSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.splash-status {
  font-size: 19px;
  font-weight: bold;
  margin-bottom: 8px;
}

.splash-progress-wrap {
  width: 100%;
  height: 16px;
  background: #fff;
  border: 2px inset #c3c3c3;
}

.splash-progress {
  height: 100%;
  background: linear-gradient(90deg, #1084d0 0%, #00007f 100%);
  width: 0%;
  transition: width 0.3s ease-out;
}

.splash-tip {
  font-size: 15px;
  color: #555;
  margin-top: 4px;
  font-style: italic;
}

.splash-log {
  margin-top: 10px;
  padding: 8px;
  background: #000;
  color: #00ff7f;
  font-family: "Courier New", monospace;
  font-size: 16px;
  border: 2px inset #fff;
  height: 70px;
  overflow: auto;
  white-space: pre-wrap;
  text-shadow: 0 0 3px #00ff7f;
}

/* =================================================================
   FOLDER : Brouillons mis en avant (jaune comme la session)
   ================================================================= */
.folder-draft-cta {
  background: linear-gradient(135deg, #ffffe0 0%, #ffd966 100%) !important;
  color: #5a3d00 !important;
  border-radius: 0 999px 999px 0;
  margin: 4px 4px 4px 0;
  padding-right: 10px !important;
  font-weight: bold;
  position: relative;
}

.folder-draft-cta:hover {
  background: linear-gradient(135deg, #fff7c2 0%, #ffbf3c 100%) !important;
}

.folder-draft-cta.active {
  background: linear-gradient(135deg, #ffec3d 0%, #ffaa00 100%) !important;
  color: #2a1d00 !important;
  box-shadow: inset 3px 0 0 #b00410;
}

.folder-draft-cta .folder-tease {
  display: inline-block;
  margin-left: auto;
  padding-left: 8px;
  font-size: 11px;
  font-weight: normal;
  font-style: italic;
  color: #5a3d00;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  animation: draftTeasePulse 2s infinite alternate;
}

@keyframes draftTeasePulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* =================================================================
   DRAFTS VIEW — laisser un mot à Maëlle
   ================================================================= */
#draftsView.hidden,
#inboxView.hidden {
  display: none !important;
}

.drafts-intro {
  padding: 14px 18px;
  background: linear-gradient(180deg, #fffbe5 0%, #fff7d0 100%);
  border-bottom: 1px solid #d4be60;
}

.drafts-title {
  margin: 0 0 6px;
  color: #b00410;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.drafts-desc {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.5;
  color: #2a1d00;
}

.drafts-desc b {
  color: #b00410;
}

.draft-form {
  background: #fff;
  border: 2px inset #c3c3c3;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.draft-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 17px;
  font-weight: bold;
}

.draft-label .muted {
  font-weight: normal;
  color: #888;
}

.draft-input {
  font-family: var(--w95-font);
  font-size: 19px;
  padding: 4px 6px;
  border: 2px inset #c3c3c3;
  background: #fff;
}

.draft-textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.4;
}

.draft-form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.draft-count {
  font-size: 16px;
  color: #555;
  font-family: "Courier New", monospace;
}

.draft-submit {
  background: linear-gradient(135deg, #ffec3d 0%, #ffaa00 100%) !important;
  color: #2a1d00 !important;
  border: 2px solid !important;
  border-color: #fff #808080 #808080 #fff !important;
  padding: 6px 14px !important;
  font-weight: bold !important;
  font-family: var(--w95-font) !important;
  font-size: 19px !important;
  cursor: pointer;
}

.draft-submit:hover {
  background: linear-gradient(135deg, #fff7c2 0%, #ffbf3c 100%) !important;
}

.draft-submit:active {
  border-color: #808080 #fff #fff #808080 !important;
}

.draft-submit:disabled {
  background: #c3c3c3 !important;
  color: #888 !important;
  cursor: not-allowed;
}

.draft-feedback {
  font-size: 17px;
  min-height: 16px;
}

.draft-feedback.success {
  color: #006600;
  font-weight: bold;
}

.draft-feedback.error {
  color: #b00410;
  font-weight: bold;
}

/* Zone de confirmation post-dépôt — visible UNIQUEMENT par l'auteur */
.drafts-confirm {
  margin: 14px 18px;
  background: linear-gradient(180deg, #fffbe5 0%, #fff7d0 100%);
  border: 2px solid #ffaa00;
  padding: 22px 22px 18px;
  text-align: center;
  position: relative;
}

.drafts-confirm-icon {
  font-size: 38px;
  margin-bottom: 6px;
  animation: confirmFloat 2s infinite alternate;
}

@keyframes confirmFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.drafts-confirm h3 {
  margin: 0 0 6px;
  color: #b00410;
  font-size: 16px;
}

.drafts-confirm-message {
  background: #fff;
  border: 2px inset #c3c3c3;
  padding: 12px;
  margin: 14px auto;
  text-align: left;
  max-width: 540px;
  font-size: 19px;
  line-height: 1.5;
}

.drafts-confirm-from {
  border-bottom: 1px dashed #d8c074;
  padding-bottom: 6px;
  margin-bottom: 8px;
  font-size: 17px;
  color: #5a3d00;
}

.drafts-confirm-from b {
  color: #b00410;
}

.drafts-confirm-body {
  white-space: pre-wrap;
  color: #2a1d00;
}

.drafts-confirm-info {
  font-size: 16px;
  color: #5a3d00;
  margin: 8px 0 0;
  font-style: italic;
}

.drafts-confirm.hidden {
  display: none !important;
}

/* =================================================================
   DOSSIERS SECRETS (CD / Vinyle) — effet holographique
   ================================================================= */
.secret-zone {
  background: linear-gradient(180deg, #fff 0%, #f3e8ff 100%);
  border-top: 1px dashed #b58cf2;
}

.secret-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6a1b9a !important;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 14px;
  position: relative;
}

.secret-head-icon {
  font-size: 16px;
}

.secret-folders {
  margin: 4px 0 0 !important;
}

/* Effet holographique commun aux 2 dossiers secrets */
.folder-secret {
  position: relative;
  margin: 4px 6px 4px 0;
  padding: 6px 10px !important;
  border-radius: 0 999px 999px 0;
  color: #2a004f !important;
  font-weight: bold;
  letter-spacing: 0.3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    1px 1px 0 rgba(0, 0, 0, 0.15);
  background-size: 300% 300% !important;
  animation: secretShine 6s ease-in-out infinite;
}

.folder-secret .folder-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-secret .folder-lock-icon {
  margin-left: auto;
  font-size: 13px;
  opacity: 0.85;
}

/* CD : palette cyan / argent / violet */
.folder-secret-cd {
  background: linear-gradient(
    115deg,
    #d1f4ff 0%,
    #b9e3ff 18%,
    #ffd6f2 35%,
    #e9d2ff 55%,
    #b9ecff 75%,
    #d1f4ff 100%
  ) !important;
}

/* Vinyle : palette or / rouge sang / noir profond */
.folder-secret-lp {
  background: linear-gradient(
    115deg,
    #ffe7a8 0%,
    #ffd1d1 20%,
    #ffb380 38%,
    #d9b3ff 58%,
    #ffd66b 78%,
    #ffe7a8 100%
  ) !important;
  color: #3a0a0a !important;
}

.folder-secret::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: secretSweep 3.5s ease-in-out infinite;
  pointer-events: none;
}

.folder-secret:hover {
  filter: brightness(1.08) saturate(1.15);
  transform: translateX(1px);
}

.folder-secret.active {
  box-shadow:
    inset 0 0 0 2px #6a1b9a,
    2px 2px 0 rgba(0, 0, 0, 0.25);
  color: #1a0030 !important;
}

.folder-secret.unlocked {
  outline: 1px solid rgba(0, 150, 0, 0.4);
}

.folder-secret.unlocked .folder-lock-icon {
  color: #006600;
  opacity: 1;
}

@keyframes secretShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes secretSweep {
  0% { background-position: -120% 0; }
  60% { background-position: 220% 0; }
  100% { background-position: 220% 0; }
}

/* =================================================================
   VUE SECRET — contenu "À définir"
   ================================================================= */
#secretView.hidden {
  display: none !important;
}

.secret-intro {
  position: relative;
  padding: 24px 22px;
  background: linear-gradient(135deg, #1a0030 0%, #2a0a4e 50%, #4a1a6e 100%);
  color: #fff;
  min-height: 360px;
  overflow: hidden;
}

#secretView.accent-cd .secret-intro {
  background: linear-gradient(135deg, #00132a 0%, #002a5e 45%, #1a4e8a 100%);
}

#secretView.accent-lp .secret-intro {
  background: linear-gradient(135deg, #2a0010 0%, #5e0028 50%, #8a3a1a 100%);
}

.secret-intro-glow {
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 0deg,
    rgba(255, 0, 200, 0.18),
    rgba(0, 200, 255, 0.18),
    rgba(255, 220, 0, 0.18),
    rgba(0, 255, 150, 0.18),
    rgba(255, 0, 200, 0.18)
  );
  filter: blur(40px);
  animation: secretGlowSpin 14s linear infinite;
  pointer-events: none;
}

@keyframes secretGlowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.secret-intro > *:not(.secret-intro-glow) {
  position: relative;
  z-index: 1;
}

.secret-title {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  color: #fff;
}

.secret-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ffec3d 0%, #ff7f50 100%);
  color: #2a0010;
  padding: 4px 12px;
  font-weight: bold;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
  font-size: 15px;
  margin-bottom: 20px;
}

.secret-content {
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px dashed rgba(255, 255, 255, 0.5);
  padding: 28px 22px;
  text-align: center;
  backdrop-filter: blur(6px);
}

.secret-content-tag {
  display: inline-block;
  font-size: 38px;
  font-weight: bold;
  letter-spacing: 6px;
  color: #fff;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.6),
    2px 2px 0 rgba(0, 0, 0, 0.5);
  padding: 8px 18px;
  background: linear-gradient(
    90deg,
    #ff4ecd 0%,
    #ffd33d 25%,
    #4dffb5 50%,
    #4ec8ff 75%,
    #ff4ecd 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: secretTagShine 4s linear infinite;
}

@keyframes secretTagShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.secret-content-hint {
  margin: 18px auto 0;
  max-width: 520px;
  font-size: 17px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
}

/* =================================================================
   MODAL MOT DE PASSE (secret)
   ================================================================= */
.secret-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 60, 0.45);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}

.secret-modal.hidden {
  display: none !important;
}

.secret-modal-window {
  width: 440px;
  max-width: 100%;
  box-shadow:
    4px 4px 0 rgba(0, 0, 0, 0.5),
    0 0 30px rgba(140, 80, 220, 0.6);
  animation: secretModalIn 0.25s ease-out;
}

.secret-modal.accent-cd .secret-modal-window {
  box-shadow:
    4px 4px 0 rgba(0, 0, 0, 0.5),
    0 0 30px rgba(80, 180, 255, 0.65);
}

.secret-modal.accent-lp .secret-modal-window {
  box-shadow:
    4px 4px 0 rgba(0, 0, 0, 0.5),
    0 0 30px rgba(255, 140, 60, 0.6);
}

@keyframes secretModalIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.secret-modal-body {
  margin: 0;
  padding: 16px;
}

.secret-modal-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.secret-modal-icon {
  font-size: 42px;
  flex: 0 0 48px;
  line-height: 1;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.25));
  animation: secretIconBob 2.4s ease-in-out infinite alternate;
}

@keyframes secretIconBob {
  from { transform: translateY(0) rotate(-4deg); }
  to { transform: translateY(-3px) rotate(4deg); }
}

.secret-modal-text p {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  color: #2a004f;
}

.secret-modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.secret-modal-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
  font-weight: bold;
  color: #333;
}

.secret-modal-input {
  font-family: var(--w95-font);
  font-size: 18px;
  padding: 6px 8px;
  border: 2px inset #c3c3c3;
  background: #fff;
  letter-spacing: 1px;
}

.secret-modal-input.shake {
  animation: secretShake 0.4s;
  border-color: #b00410;
}

@keyframes secretShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.secret-modal-feedback {
  min-height: 16px;
  font-size: 15px;
}

.secret-modal-feedback.error {
  color: #b00410;
  font-weight: bold;
}

.secret-modal-feedback.success {
  color: #006600;
  font-weight: bold;
}

.secret-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.secret-modal-ok,
.secret-modal-cancel {
  font-family: var(--w95-font);
  font-size: 16px;
  padding: 4px 18px;
  background: var(--win-gray);
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  cursor: pointer;
  min-width: 80px;
}

.secret-modal-ok {
  font-weight: bold;
  background: linear-gradient(135deg, #ffec3d 0%, #ffaa00 100%);
  color: #2a1d00;
}

.secret-modal-ok:active,
.secret-modal-cancel:active {
  border-color: #808080 #fff #fff #808080;
}

/* =================================================================
   MOBILE — adaptation pour smartphones
   ================================================================= */
@media (max-width: 700px) {
  /* Scroll naturel déjà activé desktop comme mobile (cf. body.desktop).
     On garde uniquement les ajustements de layout mobile. */
  .main-window {
    border: 0;
  }
  .start-button,
  .taskbar-app {
    height: 32px;
    padding: 4px 10px;
  }
  .main-window > .title-bar .title-bar-text {
    font-size: 16px;
  }
  .menu-bar {
    display: none;
  }
  .wanadoo-top {
    padding: 4px 8px;
  }
  .wanadoo-logo {
    font-size: 18px;
  }
  .wanadoo-top-menu {
    display: none;
  }
  .wanadoo-search {
    display: none;
  }
  .wanadoo-tabs {
    flex-wrap: wrap;
    padding: 0 6px;
  }
  .tabs-right {
    display: none;
  }
  .toolbar {
    flex-wrap: wrap;
    padding: 4px 8px;
    gap: 4px;
  }
  .toolbar-spacer,
  .toolbar-label,
  .toolbar-counter {
    display: none;
  }
  .toolbar-2 {
    flex-wrap: wrap;
    padding: 6px 8px;
    gap: 6px;
    row-gap: 6px;
  }
  .toolbar-2 label {
    display: inline-flex;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
  }
  .wanadoo-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 140px;
    height: 34px;
  }
  .wanadoo-select {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 34px;
  }
  .toolbar-2 #searchBtn {
    height: 34px;
    padding: 4px 10px;
    min-width: 44px;
  }
  .content {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
  }
  .sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 4px;
    padding: 6px;
    min-height: auto;
    overflow-y: visible;
  }
  .sidebar-zone {
    display: none;
  }
  .folder-list {
    display: contents;
  }
  .folder {
    padding: 6px 8px;
    font-size: 16px;
  }
  .folder-tease {
    display: none !important;
  }
  .secret-zone {
    grid-column: 1 / -1;
    display: block;
    padding: 6px 8px;
    margin-top: 6px;
    border-top: 1px dashed #b58cf2;
  }
  .secret-head {
    display: flex !important;
    margin-bottom: 6px;
  }
  .secret-folders {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .folder-secret {
    flex: 1 1 calc(50% - 4px);
    margin: 0 !important;
    border-radius: 4px;
  }
  .secret-intro {
    padding: 18px 14px;
    min-height: 280px;
  }
  .secret-content-tag {
    font-size: 28px;
    letter-spacing: 3px;
  }
  .pagination,
  .pref-list,
  .sidebar-zone.small {
    display: none;
  }
  .mail-table .col-date,
  .mail-table .col-size,
  .mail-table .col-check,
  .mail-table .col-star {
    display: none;
  }
  .mail-table .col-from {
    width: 100px;
  }
  .row-tag {
    display: none;
  }
  .thread-hero img {
    max-width: 100%;
    max-height: 200px;
  }
  .winamp {
    width: 100%;
  }
  .winamp-controls {
    flex-wrap: wrap;
  }
  .countdown-window {
    display: none;
  }
  .countdown-tray {
    display: inline-flex !important;
  }
  .countdown-tray.hidden {
    display: none !important;
  }
  .splash-window {
    width: 100%;
  }
  .splash-log {
    height: 50px;
    font-size: 13px;
  }
  .bsod {
    font-size: 17px;
    padding: 30px 20px;
  }
}

@media (max-width: 420px) {
  .tabs button {
    padding: 4px 8px;
    font-size: 15px;
  }
  .wanadoo-crumbs {
    padding: 3px 8px;
    font-size: 16px;
  }
}

/* =================================================================
   EMPHASIS COMPENSATION — option 1
   font-synthesis: none désactive le faux-gras (cause du flou Windows
   et du bavé sur écrans non-Retina). On compense la hiérarchie visuelle
   sur les titres clés avec un look CRT/Win95 : uppercase + letter-spacing.
   Pour les mails non lus (emphase fonctionnelle), on substitue une puce
   colorée plutôt que la graisse.
   ================================================================= */

.sidebar-head,
.avatar-caption,
.mail-main-head,
.drafts-title,
.thread-header h2,
.drafts-confirm h3,
.bsod-title {
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.mail-main-head {
  letter-spacing: 1.5px;
}

.bsod-title {
  letter-spacing: 2px;
}

/* Mails non lus : on remplace le bold (neutralisé par font-synthesis: none)
   par une puce rouge devant le sujet + un texte 100% noir au lieu du gris
   par défaut, pour garder le repère visuel "non lu". */
.mail-table tbody tr.unread td {
  color: #000;
}

.mail-table tbody tr.unread .col-subject::before {
  content: "● ";
  color: var(--wanadoo-red);
  font-size: 0.9em;
  vertical-align: 1px;
  margin-right: 2px;
}

.mail-table tbody tr.unread.active .col-subject::before {
  color: #ffec3d;
}

/* Lignes "nouveau mail fraîchement arrivé" : on accentue la puce */
.mail-table tbody tr.row-new .col-subject::before {
  color: #b00410;
  animation: rowBlink 0.9s infinite alternate;
}

/* =================================================================
   FALLBACK NON-RETINA — typo système Win95 (Tahoma)
   Sur écran à faible densité (DPR ≤ 1.5, typiquement les moniteurs
   PC 96 dpi), W95FA bitmap est rendu par ClearType qui l'épaissit
   et la rend baveuse. On bascule sur Tahoma (vraie typo système
   de Windows 95/98) qui est nativement bien hintée pour Windows et
   reste 100% dans l'esthétique d'origine.
   La media query "resolution" se ré-évalue automatiquement quand on
   glisse la fenêtre vers un autre écran → bascule à chaud.
   Bonus : Tahoma a un VRAI gras, donc font-weight: bold redevient
   utilisable sur ces écrans, on le ré-active.
   ================================================================= */
@media (max-resolution: 1.5dppx),
       (-webkit-max-device-pixel-ratio: 1.5) {
  :root {
    --w95-font: Tahoma, Verdana, "MS Sans Serif", "Microsoft Sans Serif", sans-serif;
  }
  html,
  body,
  .window,
  .title-bar,
  .title-bar-text,
  .menu-bar,
  .toolbar,
  .toolbar-2,
  .status-bar,
  button,
  input,
  select,
  textarea,
  label,
  table {
    font-synthesis: weight style;
    -webkit-font-smoothing: subpixel-antialiased;
  }
  .mail-table tbody tr.unread td {
    font-weight: bold;
  }
  .mail-table tbody tr.unread .col-subject::before {
    content: none;
  }
}
