/* DN Mail — disposition téléphone v2 (≤ 820 px) : style épuré type Yahoo */
@media (max-width: 820px) {
  html body #webmailApp#webmailApp, html body #webmailApp#webmailApp button, html body #webmailApp#webmailApp input, html body .dnm-selbar, html body .dnm-actbar {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    letter-spacing: 0 !important;
  }
  html body #webmailApp#webmailApp.app-shell { display: flex !important; width: 100vw !important; height: 100dvh !important; max-height: 100dvh !important; overflow: hidden !important; }

  /* ---------- Tiroir ---------- */
  html body #webmailApp#webmailApp .sidebar {
    position: fixed !important; left: 0 !important; top: 0 !important; bottom: 0 !important;
    width: min(84vw, 300px) !important; flex: none !important; max-height: none !important; height: 100dvh !important;
    transform: translateX(-105%) !important; transition: transform .25s ease !important;
    z-index: 1200 !important; box-shadow: 0 0 40px rgba(0,0,0,.5) !important;
  }
  html.dnm-open body #webmailApp#webmailApp .sidebar { transform: translateX(0) !important; }
  .dnm-backdrop { position: fixed; inset: 0; background: rgba(2,6,23,.55); z-index: 1150; opacity: 0; pointer-events: none; transition: opacity .25s; }
  html.dnm-open .dnm-backdrop { opacity: 1; pointer-events: auto; }

  /* ---------- Panneau principal à plat ---------- */
  html body #webmailApp#webmailApp .main-panel { flex: 1 1 auto !important; width: 100vw !important; max-width: 100vw !important; min-width: 0 !important; overflow-x: hidden !important; position: relative !important; }

  /* En-tête : ☰  Titre / adresse  ↻  avatar */
  html body #webmailApp#webmailApp .main-header {
    display: flex !important; align-items: center !important; gap: 6px !important; flex-wrap: nowrap !important;
    padding: 8px 10px 8px 6px !important; min-height: 64px !important;
    background: transparent !important; border: 0 !important; box-shadow: none !important;
  }
  .dnm-burger, .dnm-iconbtn {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 0 !important;
    background: transparent !important; color: var(--text, #f1f5f9) !important; cursor: pointer; padding: 0 !important;
    display: inline-flex !important; align-items: center; justify-content: center; position: relative; box-shadow: none !important;
  }
  .dnm-burger:active, .dnm-iconbtn:active { background: rgba(127,127,127,.18) !important; }
  .dnm-burger svg, .dnm-iconbtn svg { width: 24px; height: 24px; }
  .dnm-burger .dnm-badge {
    position: absolute; top: 4px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
    background: #f43f5e; color: #fff; font-size: 10.5px; font-weight: 700; display: none; align-items: center; justify-content: center;
  }
  .dnm-burger .dnm-badge.on { display: inline-flex; }
  .dnm-titlewrap { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
  html body #webmailApp#webmailApp .main-header .main-title {
    margin: 0 !important; font-size: 21px !important; font-weight: 700 !important; line-height: 1.15 !important;
    white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; background: none !important;
    -webkit-text-fill-color: currentColor !important; color: var(--text, #f1f5f9) !important;
  }
  .dnm-subtitle { font-size: 12.5px; color: var(--text-dim, #94a3b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
  html body #webmailApp#webmailApp .main-header > div:last-child { flex: 0 0 auto !important; gap: 2px !important; display: flex !important; align-items: center !important; }
  html body #webmailApp#webmailApp .main-header .dn-refresh-btn, html body #webmailApp#webmailApp .main-header #emptyTrashBtn {
    font-size: 0 !important; width: 44px !important; height: 44px !important; padding: 0 !important; min-width: 0 !important;
    border-radius: 50% !important; border: 0 !important; background: transparent !important; box-shadow: none !important;
    display: inline-flex !important; align-items: center; justify-content: center; color: var(--text, #f1f5f9) !important;
  }
  html body #webmailApp#webmailApp .main-header #emptyTrashBtn.hidden { display: none !important; }
  html body #webmailApp#webmailApp .main-header .dn-refresh-btn::before { content: "↻"; font-size: 23px; line-height: 1; }
  html body #webmailApp#webmailApp .main-header #emptyTrashBtn::before { content: "🗑"; font-size: 19px; }
  html body #webmailApp#webmailApp .dn-profile-btn { width: 36px !important; height: 36px !important; margin-left: 4px !important; box-shadow: none !important; }

  /* Recherche : une seule pilule */
  html body #webmailApp#webmailApp .dn-search-wrap { padding: 2px 12px 8px !important; margin: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
  html body #webmailApp#webmailApp .dn-search-main { display: flex !important; flex-wrap: nowrap !important; gap: 0 !important; align-items: center !important;
    background: rgba(127,127,127,.13) !important; border-radius: 24px !important; padding: 0 4px 0 6px !important; }
  html body #webmailApp#webmailApp .dn-search-input { flex: 1 1 auto !important; min-width: 0 !important; height: 44px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 15px !important; padding: 0 8px !important; }
  html body #webmailApp#webmailApp .dn-search-btn, html body #webmailApp#webmailApp #advancedSearchToggle {
    flex: 0 0 40px !important; width: 40px !important; height: 40px !important; padding: 0 !important; font-size: 0 !important; border-radius: 50% !important;
    border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--text-dim, #94a3b8) !important;
    display: inline-flex !important; align-items: center; justify-content: center;
  }
  html body #webmailApp#webmailApp .dn-search-btn { order: -1 !important; }
  html body #webmailApp#webmailApp .dn-search-btn::before { content: "⌕"; font-size: 22px; }
  html body #webmailApp#webmailApp #advancedSearchToggle::before { content: "⚙"; font-size: 18px; }

  /* ---------- Liste des messages, à plat ---------- */
  html body #webmailApp#webmailApp #listView { padding: 0 !important; background: transparent !important; }
  html body #webmailApp#webmailApp #messageListEl { padding: 0 0 100px !important; margin: 0 !important; background: transparent !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) auto !important;
    grid-template-areas: "av from right" "av subj star" !important;
    column-gap: 14px !important; row-gap: 3px !important; align-items: center !important;
    padding: 13px 16px !important; margin: 0 !important; min-height: 0 !important; height: auto !important; width: 100% !important; box-sizing: border-box !important;
    background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; transform: none !important;
    border-bottom: 1px solid rgba(127,127,127,.14) !important; position: relative !important;
    -webkit-user-select: none !important; user-select: none !important; -webkit-touch-callout: none !important;
    transition: background .15s !important;
  }
  html body #webmailApp#webmailApp #messageListEl .msg-row::before, html body #webmailApp#webmailApp #messageListEl .msg-row::after { display: none !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row:hover { background: transparent !important; transform: none !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row.unread { background: transparent !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row:active { background: rgba(127,127,127,.10) !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-checkbox { display: none !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-avatar { grid-area: av !important; width: 42px !important; height: 42px !important; margin: 0 !important; font-size: 14px !important; font-weight: 600 !important; box-shadow: none !important; color: #fff !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-sender-wrap { grid-area: from !important; min-width: 0 !important; width: auto !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-from {
    width: auto !important; max-width: 100% !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
    font-size: 16px !important; font-weight: 500 !important; color: var(--text-dim, #94a3b8) !important; opacity: 1 !important;
  }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-subject-wrap { grid-area: subj !important; min-width: 0 !important; width: auto !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-subject {
    white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
    font-size: 14.5px !important; font-weight: 400 !important; color: var(--text-dim, #94a3b8) !important; opacity: .9 !important;
  }
  /* Non lus : texte plein + point bleu */
  html body #webmailApp#webmailApp #messageListEl .msg-row.unread .msg-from { color: var(--text, #f1f5f9) !important; font-weight: 700 !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row.unread .msg-subject { color: var(--text, #f1f5f9) !important; font-weight: 600 !important; opacity: 1 !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row.unread::before {
    content: "" !important; display: block !important; position: absolute !important; left: 5px !important; top: 50% !important;
    width: 7px !important; height: 7px !important; margin-top: -3.5px !important; border-radius: 50% !important; background: #1e90ff !important;
  }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-row-right { grid-area: right !important; display: flex !important; align-items: center !important; gap: 6px !important; justify-content: flex-end !important; min-width: 0 !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-unread-dot { display: none !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-date { font-size: 12.5px !important; font-weight: 500 !important; white-space: nowrap !important; color: var(--text-dim, #94a3b8) !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row.unread .msg-date { color: #1e90ff !important; font-weight: 700 !important; }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-attachment-indicator {
    width: auto !important; height: auto !important; padding: 0 !important; margin: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important;
    font-size: 13px !important; line-height: 1 !important; opacity: .8;
  }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-list-star {
    grid-area: star !important; justify-self: end !important; margin: 0 !important; padding: 0 !important; width: 26px !important; height: 26px !important;
    font-size: 19px !important; line-height: 1 !important; background: none !important; border: 0 !important; box-shadow: none !important; color: var(--text-dim, #94a3b8) !important; opacity: .7;
  }
  html body #webmailApp#webmailApp #messageListEl .msg-row .msg-list-star.starred { color: #f5b301 !important; opacity: 1; }

  /* ---------- Mode sélection (appui long) ---------- */
  html.dnm-selecting body #webmailApp#webmailApp #messageListEl .msg-row { grid-template-columns: 42px minmax(0, 1fr) auto !important; }
  html.dnm-selecting body #webmailApp#webmailApp #messageListEl .msg-row .msg-avatar { display: none !important; }
  html.dnm-selecting body #webmailApp#webmailApp #messageListEl .msg-row .msg-checkbox {
    display: block !important; grid-area: av !important; justify-self: center !important; margin: 0 !important;
    width: 24px !important; height: 24px !important; accent-color: #1e90ff; pointer-events: none;
  }
  html.dnm-selecting body #webmailApp#webmailApp #messageListEl .msg-row.dnm-checked { background: rgba(30,144,255,.14) !important; }
  html.dnm-selecting body #webmailApp#webmailApp .main-header { visibility: hidden !important; }
  html.dnm-selecting body #webmailApp#webmailApp .dn-search-wrap { display: none !important; }
  html body #bulkToolbar { display: none !important; }

  .dnm-selbar {
    position: fixed; left: 0; right: 0; top: 0; z-index: 1100; height: 64px; padding: 0 8px;
    display: none; align-items: center; justify-content: space-between; gap: 8px;
    background: var(--bg, #060b1f); color: var(--text, #f1f5f9); border-bottom: 1px solid rgba(127,127,127,.18);
  }
  html.dnm-selecting .dnm-selbar { display: flex; }
  .dnm-selbar button { border: 0; background: none; font: inherit; font-size: 15.5px; font-weight: 600; padding: 10px 10px; border-radius: 10px; cursor: pointer; color: inherit; }
  .dnm-selbar .all { color: #1e90ff; }
  .dnm-selbar .count { font-size: 16px; font-weight: 700; text-align: center; flex: 1; }

  .dnm-actbar {
    position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 1100;
    display: none; align-items: stretch; justify-content: space-around;
    background: #10151c; color: #fff; border-radius: 22px; padding: 8px 4px; box-shadow: 0 14px 34px rgba(0,0,0,.45);
  }
  html.dnm-selecting .dnm-actbar { display: flex; animation: dnmUp .2s ease; }
  .dnm-actbar button {
    flex: 1 1 0; min-width: 0; border: 0; background: none; color: #fff; cursor: pointer; font: inherit;
    display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 2px; border-radius: 14px;
  }
  .dnm-actbar button:active { background: rgba(255,255,255,.12); }
  .dnm-actbar svg { width: 24px; height: 24px; }
  .dnm-actbar span { font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .dnm-actbar .danger { color: #ff8a8a; }
  @keyframes dnmUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

  /* ---------- Lecture ---------- */
  html body #webmailApp#webmailApp #readView { padding: 0 !important; background: transparent !important; }
  html body #webmailApp#webmailApp #readContent, html body #webmailApp#webmailApp #readView .read-content { padding: 4px 16px 100px !important; max-width: 100% !important; }
  html body #webmailApp#webmailApp #readView [class*="back"] {
    white-space: nowrap !important; font-size: 14px !important; padding: 8px 12px !important; margin: 4px 0 0 10px !important;
    border: 0 !important; background: transparent !important; box-shadow: none !important;
  }
  html body #webmailApp#webmailApp .read-message-header { display: block !important; margin: 0 !important; padding: 0 !important; }
  html body #webmailApp#webmailApp .read-subject { font-size: 22px !important; font-weight: 700 !important; line-height: 1.25 !important; margin: 4px 0 12px !important; word-break: break-word !important; }
  html body #webmailApp#webmailApp .read-header-actions {
    display: flex !important; flex-wrap: nowrap !important; align-items: center !important; gap: 4px !important;
    margin: 0 0 12px !important; padding: 4px 0 !important; border-bottom: 1px solid rgba(127,127,127,.14) !important;
  }
  html body #webmailApp#webmailApp .read-message-navigation { display: flex !important; gap: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
  html body #webmailApp#webmailApp .read-header-actions button, html body #webmailApp#webmailApp .read-message-navigation button {
    flex: 0 0 auto !important; width: 42px !important; min-width: 42px !important; height: 42px !important; padding: 0 !important; margin: 0 !important;
    border-radius: 50% !important; border: 0 !important; background: transparent !important; box-shadow: none !important;
    font-size: 19px !important; line-height: 1 !important; color: var(--text, #f1f5f9) !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
  }
  html body #webmailApp#webmailApp .read-header-actions button:disabled { opacity: .3 !important; }
  html body #webmailApp#webmailApp .read-header-actions button:active { background: rgba(127,127,127,.18) !important; }
  html body #webmailApp#webmailApp .read-nav-label { display: none !important; }
  html body #webmailApp#webmailApp .read-message-navigation::after { display: none !important; }
  html body #webmailApp#webmailApp #readStarBtn { margin-left: auto !important; }
  html body #webmailApp#webmailApp #readStarBtn.starred { color: #f5b301 !important; }
  html body #webmailApp#webmailApp .read-header-actions button[onclick^="printCurrentMessage"] { display: none !important; }

  html body #webmailApp#webmailApp .dn-sender-card {
    display: grid !important; grid-template-columns: 42px minmax(0,1fr) !important; grid-template-areas: "av main" "av date" !important;
    column-gap: 12px !important; row-gap: 2px !important; align-items: center !important;
    padding: 4px 0 12px !important; margin: 0 0 4px !important; background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
  }
  html body #webmailApp#webmailApp .dn-sender-avatar { grid-area: av !important; width: 42px !important; height: 42px !important; font-size: 14px !important; box-shadow: none !important; }
  html body #webmailApp#webmailApp .dn-sender-main { grid-area: main !important; min-width: 0 !important; }
  html body #webmailApp#webmailApp .dn-sender-main * { white-space: normal !important; overflow-wrap: anywhere !important; font-size: 14px !important; }
  html body #webmailApp#webmailApp .dn-sender-main > *:first-child, html body #webmailApp#webmailApp .dn-sender-main strong { font-size: 15.5px !important; font-weight: 700 !important; }
  html body #webmailApp#webmailApp .dn-sender-date { grid-area: date !important; text-align: left !important; display: flex !important; gap: 6px !important; flex-wrap: wrap !important; justify-self: start !important; }
  html body #webmailApp#webmailApp .dn-sender-date, html body #webmailApp#webmailApp .dn-sender-date * { font-size: 12.5px !important; font-weight: 500 !important; color: var(--text-dim, #94a3b8) !important; }

  html body #webmailApp#webmailApp .alloma-mail-panel { padding: 10px 12px !important; margin: 4px 0 14px !important; border-radius: 16px !important; box-shadow: none !important; }
  html body #webmailApp#webmailApp .alloma-mail-header { display: flex !important; align-items: center !important; justify-content: flex-start !important; margin: 0 0 8px !important; }
  html body #webmailApp#webmailApp .alloma-mail-subtitle { display: none !important; }
  html body #webmailApp#webmailApp .alloma-mail-actions {
    display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 8px !important; overflow-x: auto !important;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px !important; grid-template-columns: none !important;
  }
  html body #webmailApp#webmailApp .alloma-mail-actions::-webkit-scrollbar { display: none; }
  html body #webmailApp#webmailApp .alloma-action-btn { flex: 0 0 auto !important; width: auto !important; white-space: nowrap !important; padding: 8px 14px !important; font-size: 13.5px !important; font-weight: 600 !important; }

  html body #webmailApp#webmailApp .read-body { padding: 14px !important; border-radius: 14px !important; box-shadow: none !important; }
  html body #webmailApp#webmailApp .read-body iframe { width: 100% !important; }
  html body #webmailApp#webmailApp .read-content img { max-width: 100% !important; height: auto !important; }
  html body #webmailApp#webmailApp .read-bottom-actions { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  html body #webmailApp#webmailApp .read-bottom-actions button { width: 100% !important; margin: 0 !important; border-radius: 14px !important; }

  html body #webmailApp#webmailApp .main-panel * { max-width: 100%; }


  /* Barre de lecture : icônes dessinées, alignées */
  html body #webmailApp#webmailApp .read-header-actions button svg { width: 22px !important; height: 22px !important; display: block !important; pointer-events: none; }
  html body #webmailApp#webmailApp .read-message-navigation button svg { width: 24px !important; height: 24px !important; }
  html body #webmailApp#webmailApp #readStarBtn.starred, html body #webmailApp#webmailApp #readStarBtn.starred svg { color: #f5b301 !important; }
  html body #webmailApp#webmailApp .read-header-actions { justify-content: flex-start !important; gap: 2px !important; }
  html body #webmailApp#webmailApp .read-header-actions button { color: var(--text, #e8eef7) !important; opacity: .92; }
  html body #webmailApp#webmailApp .read-message-navigation + * { margin-left: auto !important; }
  html body #webmailApp#webmailApp .back-link { font-size: 14.5px !important; font-weight: 600 !important; padding: 8px 6px !important; margin: 2px 0 0 10px !important; background: none !important; border: 0 !important; box-shadow: none !important; }

  /* Panneau d'actions « ⋮ » (bas d'écran) */
  .dnm-sheet-bd { position: fixed; inset: 0; z-index: 1300; background: rgba(2,6,23,.5); opacity: 0; transition: opacity .2s; }
  .dnm-sheet-bd.on { opacity: 1; }
  .dnm-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1310; padding: 8px 10px calc(14px + env(safe-area-inset-bottom, 0px));
    background: var(--panel, #0f1722); color: var(--text, #e8eef7); border-radius: 22px 22px 0 0; box-shadow: 0 -12px 34px rgba(0,0,0,.4);
    transform: translateY(100%); transition: transform .22s ease; font-family: system-ui, -apple-system, Roboto, sans-serif;
  }
  .dnm-sheet.on { transform: none; }
  .dnm-sheet .grip { width: 40px; height: 4px; border-radius: 2px; background: rgba(127,127,127,.45); margin: 4px auto 10px; }
  .dnm-sheet button {
    width: 100%; display: flex; align-items: center; gap: 16px; padding: 14px 14px; border: 0; background: none; color: inherit;
    font: inherit; font-size: 16px; font-weight: 500; text-align: left; border-radius: 14px; cursor: pointer;
  }
  .dnm-sheet button:active { background: rgba(127,127,127,.15); }
  .dnm-sheet button svg { width: 23px; height: 23px; flex: 0 0 auto; opacity: .9; }
  .dnm-sheet button.danger { color: #ff7a7a; }

  /* ---------- Bouton Nouveau ---------- */
  .dnm-fab {
    position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 1090;
    height: 54px; padding: 0 20px 0 16px; border-radius: 18px; border: 0; cursor: pointer;
    background: linear-gradient(135deg, #0065eb, #00a6ff); color: #fff; font-size: 15.5px; font-weight: 700; font-family: inherit;
    box-shadow: 0 10px 24px rgba(0,101,235,.40); display: inline-flex; align-items: center; gap: 9px;
  }
  .dnm-fab svg { width: 21px; height: 21px; }
  html.dnm-reading .dnm-fab, html.dnm-open .dnm-fab, html.dnm-modal .dnm-fab, html.dnm-selecting .dnm-fab { display: none !important; }
  html:has(.modal-overlay:not(.hidden)) .dnm-fab { display: none !important; }

  /* ---------- Rédaction plein écran ---------- */
  html body #composeModal .modal-card, html body #composeModal > div {
    width: 100vw !important; max-width: 100vw !important; height: 100dvh !important; max-height: 100dvh !important; border-radius: 0 !important; margin: 0 !important;
  }
  html body #composeModal.modal-overlay { padding: 0 !important; align-items: stretch !important; }
  html body #composeModal .modal-card { overflow-y: auto !important; -webkit-overflow-scrolling: touch; padding: 16px 14px 0 !important; box-sizing: border-box !important; }
  html body #composeModal .modal-actions {
    display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important;
    position: sticky !important; bottom: 0 !important; z-index: 5 !important;
    margin: 12px -14px 0 !important; padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    background: var(--panel, #0b1230) !important; border-top: 1px solid rgba(127,127,127,.2) !important; box-shadow: 0 -8px 18px rgba(0,0,0,.18) !important;
  }
  html body #composeModal .modal-actions button { width: 100% !important; margin: 0 !important; height: 46px !important; border-radius: 14px !important; font-size: 14px !important; padding: 0 8px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  html body #composeModal .modal-actions #composeSubmitBtn { font-size: 15px !important; font-weight: 700 !important; }
  html body #composeModal [contenteditable="true"] { min-height: 180px !important; }

  html body .dn-profile-panel { left: 10px !important; right: 10px !important; width: auto !important; max-height: calc(100dvh - 80px) !important; overflow-y: auto !important; }
}
@media (min-width: 821px) { .dnm-burger, .dnm-fab, .dnm-backdrop, .dnm-selbar, .dnm-actbar, .dnm-subtitle { display: none !important; } }

/* Supprimer / Imprimer sont dans le menu ⋮ : retirés du bas du mail (ordinateur et mobile) */
html body #webmailApp#webmailApp .read-bottom-actions .read-print-btn,
html body #webmailApp#webmailApp .read-bottom-actions .read-delete-btn { display: none !important; }

/* ===== v5 : lecture centrée, élégante ===== */
html body #webmailApp#webmailApp #readView .back-link { display: block; max-width: 980px; margin-left: auto !important; margin-right: auto !important; width: fit-content; }
@media (min-width: 821px) {
  html body #webmailApp#webmailApp #readView > .back-link { margin-left: max(0px, calc((100% - 980px) / 2)) !important; }
}
html body #webmailApp#webmailApp #readContent.read-content { max-width: 980px !important; margin: 0 auto !important; }
html body #webmailApp#webmailApp #readContent .read-body { border-radius: 16px; }
html body #webmailApp#webmailApp #readContent .read-body pre {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important; font-size: 15px; line-height: 1.65;
  white-space: pre-wrap !important; overflow-wrap: anywhere; max-width: 760px; margin: 0 auto !important;
}
html body #webmailApp#webmailApp #readContent .read-body iframe { display: block; max-width: 100%; }

/* bandeau Indésirables */
.dnm-junkbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 12px 14px; border-radius: 14px;
  background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .35);
  color: var(--text, #e5e7eb); font-size: 14px; line-height: 1.4;
}
.dnm-junkbar .i { font-size: 18px; }
.dnm-junkbar .t { flex: 1 1 180px; }
html body #webmailApp#webmailApp #readView .dnm-junkbar button {
  border: 0; cursor: pointer; font: 700 14px system-ui, sans-serif; color: #fff;
  padding: 10px 16px; border-radius: 12px; background: linear-gradient(135deg, #0065eb, #00a6ff) !important; color: #fff !important;
  box-shadow: 0 6px 16px rgba(0, 101, 235, .3); white-space: nowrap;
}
html body #webmailApp#webmailApp #readView .dnm-junkbar button:disabled { opacity: .6; }

/* barre d'actions mobile : Archiver hors indésirables, Pas spam dans indésirables */
html body .dnm-actbar .dnm-junkonly { display: none !important; }
html body.dnm-injunk .dnm-actbar .dnm-junkonly, html.dnm-injunk .dnm-actbar .dnm-junkonly { display: flex !important; }
html.dnm-injunk .dnm-actbar .dnm-nojunk, html body.dnm-injunk .dnm-actbar .dnm-nojunk { display: none !important; }

@media (max-width: 820px) {
  html body #webmailApp#webmailApp #readContent, html body #webmailApp#webmailApp #readView .read-content { padding: 4px 10px 100px !important; }
  html body #webmailApp#webmailApp #readView #readContent .read-body { padding: 12px 10px !important; border-radius: 14px !important; }
  .dnm-junkbar { margin: 4px 0 12px; }
  html body #webmailApp#webmailApp #readView .dnm-junkbar button { flex: 1 1 100%; }
}
