/* Webmail Madagascar Live Streaming : charte du site madalive.mg sur Elastic */

@font-face {
  font-family: "Bricolage Grotesque";
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-weight: 100 1000;
  font-display: swap;
  src: url("fonts/dm-sans.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 100 1000;
  font-display: swap;
  src: url("fonts/dm-sans-italic.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
}
@font-face {
  font-family: "Material Symbols Rounded";
  font-weight: 300 500;
  font-display: block;
  src: url("fonts/material-symbols-rounded.woff2") format("woff2");
}

/* Couleurs du site : encre, vert forêt, or, crème et sable. Les noms des
   variables suivent leur rôle dans la mise en page reprise du webmail Pozitivizion. */
:root {
  --ml-ink: #14201a;
  --ml-ink-2: #22332a;
  --ml-ink-3: #3a4a42;
  --ml-muted: #5a6a62;
  --ml-muted-2: #6b7a72;
  --ml-placeholder: #94a39b;
  --ml-night: #14201a;
  --ml-night-text: #c4d0c9;
  --ml-night-muted: #a9b8b0;
  --ml-night-section: #7f948a;
  --ml-violet: #0b5a3c;
  --ml-violet-hover: #084a31;
  --ml-violet-dark: #0f3b5f;
  --ml-magenta: #f2b530;
  --ml-magenta-hover: #e0a21c;
  --ml-orchid: #f2b530;
  --ml-on-accent: #14201a;
  --ml-bg: #f2eee3;
  --ml-bg-login: #f7f4ec;
  --ml-wash: #e9e3d2;
  --ml-wash-2: #fbf1d6;
  --ml-hover: #efeadc;
  --ml-line: #e3ded0;
  --ml-line-2: #ddd7c7;
  --ml-line-3: #ece7da;
  --ml-star: #d99c1a;
  --ml-star-off: #b5beb8;
  --ml-sans: "DM Sans", Helvetica, Arial, sans-serif;
  --ml-display: "Bricolage Grotesque", "DM Sans", sans-serif;
  --ml-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ml-icons: "Material Symbols Rounded";
}


/* Socle */

html, body, input, select, textarea, button, .btn, .popover, .ui-dialog, .tooltip {
  font-family: var(--ml-sans) !important;
}

body {
  color: var(--ml-ink);
  background: var(--ml-bg);
  -webkit-font-smoothing: antialiased;
}

a, a:visited { color: var(--ml-violet); }
a:hover { color: var(--ml-violet-dark); }
::selection { background: var(--ml-orchid); color: var(--ml-night); }
input::placeholder, textarea::placeholder { color: var(--ml-placeholder) !important; }

.ml-icon, .ml-icon-before::before {
  font-family: var(--ml-icons) !important;
  font-weight: 400;
  font-style: normal;
  font-size: 21px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  display: inline-block;
  overflow: hidden;
}

.btn-primary, .btn-primary:not(:disabled):not(.disabled):active,
.btn.mainaction, .formbuttons .btn.mainaction {
  background: var(--ml-violet) !important;
  border-color: var(--ml-violet) !important;
  color: #fff !important;
  border-radius: 12px;
  font-weight: 600;
}
.btn-primary:hover, .btn.mainaction:hover { background: var(--ml-violet-hover) !important; border-color: var(--ml-violet-hover) !important; }
.btn-secondary { border-radius: 12px; }

.form-control:focus, .custom-select:focus, input:focus, textarea:focus {
  border-color: var(--ml-violet) !important;
  box-shadow: 0 0 0 4px rgba(11, 90, 60, 0.12) !important;
}
/* Dans une barre de recherche arrondie, le champ ne dessine pas son propre cadre :
   c'est la barre entière qui prend l'anneau de focus. */
.searchbar input:focus, .searchbar input:focus-visible {
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}
.searchbar:focus-within,
html.ml-task-mail #layout-list .searchbar:focus-within,
body.task-addressbook #layout-list .searchbar:focus-within {
  border-color: var(--ml-violet) !important;
  box-shadow: 0 0 0 4px rgba(11, 90, 60, 0.12);
}
.custom-control-input:checked ~ .custom-control-label::before,
.custom-switch .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--ml-violet) !important;
  border-color: var(--ml-violet) !important;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--ml-violet); }

.popover, .popupmenu.popover-body, .ui-dialog {
  border-radius: 16px !important;
  border-color: var(--ml-line) !important;
  box-shadow: 0 18px 50px rgba(20, 32, 26, 0.18) !important;
}
.popover .listing li a.active:hover, .popupmenu .listing li a.active:hover,
.listing li.selected, .listing li.focused { background-color: var(--ml-wash) !important; }

/* Boutons et fenêtres de dialogue d'Elastic */

.btn {
  border-radius: 12px !important;
  font-weight: 600;
  box-shadow: none !important;
}
.btn:focus, .btn:focus-visible, .btn.focus {
  outline: 0 !important;
  box-shadow: 0 0 0 4px rgba(11, 90, 60, 0.18) !important;
}
.btn-secondary, .btn-secondary:not(:disabled):not(.disabled):active, .ui-dialog .ui-dialog-buttonpane .btn.cancel {
  border: 1.5px solid var(--ml-line-2) !important;
  background: #fff !important;
  color: var(--ml-ink-3) !important;
}
.btn-secondary:hover, .ui-dialog .ui-dialog-buttonpane .btn.cancel:hover {
  border-color: #cfc4a8 !important;
  background: var(--ml-wash) !important;
  color: var(--ml-ink) !important;
}
.btn-danger, .btn-primary.delete {
  border-color: var(--ml-night) !important;
  background: var(--ml-night) !important;
  color: #fff !important;
}
.btn-danger:hover, .btn-primary.delete:hover { background: #22332a !important; border-color: #22332a !important; }

.ui-widget-overlay { background: rgba(20, 32, 26, 0.5) !important; opacity: 1 !important; }
.ui-dialog { height: auto !important; padding: 0 !important; border: 0 !important; }
.ui-dialog .ui-dialog-content { height: auto !important; }
.ui-dialog .ui-dialog-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 14px 20px !important;
  border-radius: 16px 16px 0 0;
  border-bottom: 1px solid var(--ml-line-3) !important;
  background: #fff !important;
}
.ui-dialog .ui-dialog-title {
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  font-family: var(--ml-display) !important;
  font-weight: 600;
  font-size: 17px;
  color: var(--ml-ink);
}
.ui-dialog .ui-dialog-titlebar-close {
  position: static !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 10px;
  color: var(--ml-muted) !important;
}
.ui-dialog .ui-dialog-titlebar-close:hover { background: var(--ml-hover) !important; color: var(--ml-ink) !important; }
.ui-dialog .ui-dialog-content { padding: 18px 20px !important; font-size: 14.5px; line-height: 1.5; color: var(--ml-ink-2); }
.ui-dialog .ui-dialog-buttonpane {
  margin: 0 !important;
  padding: 12px 20px 16px !important;
  border: 0 !important;
  border-radius: 0 0 16px 16px;
  background: #fbf9f3 !important;
}
.ui-dialog .ui-dialog-buttonpane { display: flex; justify-content: flex-end; }
.ui-dialog .ui-dialog-buttonset { float: none !important; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ui-dialog .ui-dialog-buttonpane .btn { height: 42px; margin: 0 !important; padding: 0 18px; font-size: 14.5px; }
.ui-dialog .ui-dialog-buttonpane .btn::before { font-size: 1em; }

/* Sélection dans les listes d'Elastic (popups, carnet d'adresses de la rédaction…) */

.listing li.selected > a, .listing tr.selected td, .records-table tr.selected td { background-color: var(--ml-wash) !important; color: var(--ml-ink) !important; }
.listing li.focused > a, .records-table tr.focused td:first-child, .listing tr.focused td:first-child { border-left-color: var(--ml-violet) !important; }
.records-table tr.focused td, .listing li.focused { outline-color: var(--ml-violet) !important; }

/* Messages d'état : bandeau sombre centré en bas, comme la maquette */

#messagestack {
  top: auto !important;
  bottom: 28px;
  right: auto !important;
  left: 50% !important;
  transform: translateX(-50%);
  width: auto !important;
  max-width: calc(100vw - 32px);
}
#messagestack > div {
  background: var(--ml-night) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 30px rgba(20, 32, 26, 0.3) !important;
  font-size: 14px;
  font-weight: 500;
}
#messagestack > div.confirmation::before, #messagestack > div.notice::before { color: var(--ml-orchid) !important; }

/* Éléments d'Elastic sans équivalent dans la charte */

a.theme, a.about, #layout-menu .special-buttons a.about, .floating-action-buttons { display: none !important; }

/* Colonne des tâches d'Elastic (tablette, contacts, paramètres) aux couleurs du rail */

#layout-menu { background: var(--ml-night) !important; }
/* Le logo, sombre par endroits, se perd sur le rail : il reprend le cercle crème du site. */
#layout-menu #logo { padding: 3px; border-radius: 50%; background: var(--ml-bg-login); }
.formbuttons a.btn-link.extwin, .formbuttons a.btn-link.extwin::before { color: var(--ml-violet) !important; }
.formbuttons a.btn-link.extwin:hover { color: var(--ml-violet-hover) !important; }
#layout-menu #taskmenu a {
  color: var(--ml-night-text) !important;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
#layout-menu #taskmenu a:hover { background: rgba(255, 255, 255, 0.06) !important; color: #fff !important; }
#layout-menu #taskmenu a.selected { background: rgba(242, 181, 48, 0.16) !important; color: #fff !important; }
#layout-menu #taskmenu a.compose { color: var(--ml-orchid) !important; }
#layout-menu #taskmenu a.logout { color: var(--ml-night-muted) !important; }
#layout-menu #taskmenu a::before {
  font-family: var(--ml-icons) !important;
  font-weight: 400 !important;
  font-size: 22px !important;
  font-feature-settings: "liga";
}
#layout-menu #taskmenu a.compose::before { content: "edit_square"; }
#layout-menu #taskmenu a.mail::before { content: "inbox"; }
#layout-menu #taskmenu a.contacts::before { content: "contacts"; }
#layout-menu #taskmenu a.settings::before { content: "settings"; }
#layout-menu #taskmenu a.logout::before { content: "logout"; }
#layout-menu .popover-header #logo { max-width: 44px; }

/* ========== Connexion ========== */

body.task-login, body.task-logout { background: var(--ml-bg-login); }
body.task-login #layout, body.task-logout #layout { display: flex; min-height: 100vh; }

.ml-visual {
  flex: 1.1;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 56px 64px;
  background:
    radial-gradient(circle at 85% 12%, rgba(242, 181, 48, 0.22), transparent 42%),
    radial-gradient(circle at 10% 95%, rgba(20, 32, 26, 0.45), transparent 55%),
    var(--ml-violet);
  color: var(--ml-bg-login);
}
/* Cercles concentriques : écho au cercle crème qui entoure le logo sur le site. */
.ml-visual::before, .ml-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(242, 181, 48, 0.35);
  pointer-events: none;
}
.ml-visual::before { width: 520px; height: 520px; right: -170px; top: -170px; }
.ml-visual::after { width: 340px; height: 340px; right: -80px; top: -80px; border-color: rgba(247, 244, 236, 0.16); }
.ml-visual-badge {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ml-bg-login);
  box-shadow: 0 18px 40px rgba(20, 32, 26, 0.28);
}
.ml-visual-badge img { width: 118px; height: 118px; object-fit: contain; }
.ml-visual-main { position: relative; max-width: 560px; margin: auto 0; }
.ml-visual-text { margin: 22px 0 0; max-width: 440px; font-size: 18px; line-height: 1.55; color: #d6e6dd; }
.ml-credit { position: relative; margin: 0; font-size: 13px; color: #d6e6dd; }
.ml-credit a, .ml-credit a:visited { color: var(--ml-orchid); font-weight: 700; text-decoration: none; }
.ml-credit a:hover { color: #fff; text-decoration: underline; }
.ml-credit-mobile { display: none; }
.ml-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-family: var(--ml-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ml-orchid);
}
.ml-eyebrow span { width: 28px; height: 2px; flex: none; background: var(--ml-orchid); }
.ml-hero {
  margin: 0;
  font-family: var(--ml-display);
  font-weight: 800;
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.ml-hero em { font-style: normal; color: var(--ml-orchid); }

body.task-login #layout-content, body.task-logout #layout-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: transparent;
  border: 0;
}
body.task-login #layout-content > #logo, body.task-logout #layout-content > #logo { display: none; }

#login-form {
  top: 0 !important;
  width: 100%;
  max-width: 400px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
body.task-login #layout-content, #login-form { text-align: left; }
#login-form table, #login-form tbody, #login-form tr { display: block; width: 100%; }
#login-form tbody { display: flex; flex-direction: column; gap: 18px; }
#login-form tr.form-group { margin: 0 !important; padding: 0; }
#login-form td.input { display: flex !important; width: 100%; padding: 0 !important; }
#login-form td.input .form-control { width: 100% !important; flex: 1 1 auto; }
#login-form td.title { display: none !important; }
#login-form .input-group-prepend { display: none; }
#login-form .form-control {
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--ml-line-2) !important;
  border-radius: 14px !important;
  background: #fff;
  font-size: 15px;
  color: var(--ml-ink);
}
#login-form .formbuttons { margin: 6px 0 0; }
#rcmloginsubmit {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px !important;
  font-size: 16px;
  font-weight: 600;
  text-transform: none !important;
  letter-spacing: 0;
}
#rcmloginsubmit .ml-icon { font-size: 20px; }
#login-footer { display: none; }

.ml-login-intro { display: flex; flex-direction: column; }
.ml-login-logo, .ml-login-tagline { display: none; }
.ml-login-title { margin: 0; font-family: var(--ml-display); font-weight: 800; font-size: 32px; letter-spacing: -0.02em; color: var(--ml-ink); }
.ml-login-subtitle { margin: 6px 0 0; font-size: 15px; color: var(--ml-muted); }
.ml-field-label {
  display: block;
  margin: 0 0 -10px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ml-ink-3);
}

@media (max-width: 819px) {
  .ml-visual { display: none; }
  .ml-login-logo { display: block; width: 120px; height: auto; margin-bottom: 14px; }
  .ml-login-tagline {
    display: block;
    margin: 0 0 24px;
    font-family: var(--ml-display);
    font-weight: 800;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--ml-violet);
  }

  /* Formulaire centré dans l'espace libre, signature poussée en pied de page. */
  body.task-login #layout-content, body.task-logout #layout-content {
    justify-content: flex-start;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
  #login-form { margin: auto 0 !important; }
  .ml-credit-mobile {
    display: block;
    margin-top: 32px;
    text-align: center;
    font-size: 12.5px;
    color: var(--ml-muted);
  }
  .ml-credit-mobile a, .ml-credit-mobile a:visited {
    display: inline-block;
    padding: 14px 4px;
    color: var(--ml-violet);
  }
  .ml-credit-mobile a:hover { color: var(--ml-violet-dark); }
}

/* ========== Application : grand écran ========== */

body.task-mail #layout, body.task-addressbook #layout, body.task-settings #layout { background: var(--ml-bg); }

@media (min-width: 1201px) {
  html.ml-task-mail:not(.ml-action-compose) #layout-menu { display: none !important; }
}

/* Rail (barre latérale des dossiers) */

html.ml-task-mail:not(.ml-action-compose) #layout-sidebar {
  flex: none !important;
  width: 256px !important;
  min-width: 256px !important;
  max-width: 256px !important;
  border: 0 !important;
  background: var(--ml-night) !important;
  color: var(--ml-night-text);
  padding: 18px 14px 12px;
  gap: 6px;
}
html.ml-task-mail:not(.ml-action-compose) #layout-sidebar > .header {
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  position: absolute;
  right: 8px;
  top: 24px;
  z-index: 2;
}
html.ml-task-mail:not(.ml-action-compose) #layout-sidebar > .header .header-title { display: none; }
html.ml-task-mail:not(.ml-action-compose) #layout-sidebar > .header a.button { color: var(--ml-night-muted); }
html.ml-task-mail:not(.ml-action-compose) #layout-sidebar > .header a.button:hover { color: #fff; }

.ml-rail-top { display: flex; flex-direction: column; gap: 12px; flex: none; }
.ml-brand { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px 0; }
.ml-brand img { width: 44px; height: 44px; padding: 3px; border-radius: 50%; background: var(--ml-bg-login); object-fit: contain; flex: none; }
.ml-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.ml-brand-name { font-family: var(--ml-display); font-weight: 800; font-size: 18px; letter-spacing: 0.02em; color: #fff; }
.ml-brand-sub { margin-top: 4px; font-family: var(--ml-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ml-orchid); }

.ml-compose {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  background: var(--ml-magenta);
  color: var(--ml-on-accent);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.ml-compose:hover { background: var(--ml-magenta-hover); }
.ml-compose .ml-icon { font-size: 22px; }

html.ml-task-mail #folderlist-content {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  margin-top: 8px;
  padding: 0;
  background: transparent;
}

html.ml-task-mail #mailboxlist, .ml-shortcuts, .ml-labels {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
html.ml-task-mail #mailboxlist li { border: 0 !important; background: transparent !important; }
html.ml-task-mail #mailboxlist li > a, .ml-shortcuts a, .ml-labels a {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px !important;
  border-radius: 12px;
  color: var(--ml-night-text) !important;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none !important;
}
html.ml-task-mail #mailboxlist li > a:hover, .ml-shortcuts a:hover, .ml-labels a:hover { background: rgba(255, 255, 255, 0.05); color: #fff !important; }
html.ml-task-mail #mailboxlist:not(.ml-filtered) li.selected > a,
.ml-shortcuts li.selected a, .ml-labels li.selected a {
  background: rgba(242, 181, 48, 0.16) !important;
  color: #fff !important;
  font-weight: 600;
}
html.ml-task-mail #mailboxlist li.droptarget > a { background: rgba(242, 181, 48, 0.28) !important; }

html.ml-task-mail #mailboxlist li > a::before, .ml-shortcuts .ml-icon {
  width: 21px !important;
  margin: 0 !important;
  flex: none;
  font-family: var(--ml-icons) !important;
  font-weight: 400 !important;
  font-size: 21px !important;
  line-height: 1;
  font-feature-settings: "liga";
  content: "folder" !important;
}
html.ml-task-mail #mailboxlist li.inbox > a::before { content: "inbox" !important; }
html.ml-task-mail #mailboxlist li.drafts > a::before { content: "draft" !important; }
html.ml-task-mail #mailboxlist li.sent > a::before { content: "send" !important; }
html.ml-task-mail #mailboxlist li.junk > a::before { content: "report" !important; }
html.ml-task-mail #mailboxlist li.trash > a::before { content: "delete" !important; }
html.ml-task-mail #mailboxlist li.archive > a::before { content: "archive" !important; }

html.ml-task-mail #mailboxlist .unreadcount {
  margin-left: auto;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  min-width: 0;
}
html.ml-task-mail #mailboxlist li.inbox .unreadcount { background: var(--ml-magenta) !important; color: var(--ml-on-accent) !important; }
html.ml-task-mail #mailboxlist div.treetoggle { color: var(--ml-night-muted); }

.ml-section-title { padding: 18px 12px 6px; font-family: var(--ml-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ml-night-section); }
.ml-shortcut-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-label-dot { width: 10px; height: 10px; flex: none; margin: 0 5.5px; display: inline-block; }

html.ml-task-mail:not(.ml-action-compose) #layout-sidebar > .footer {
  flex: none;
  height: auto !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0 0;
  border: 0;
  background: transparent;
}
html.ml-task-mail:not(.ml-action-compose) #layout-sidebar #quotadisplay { display: none !important; }

.ml-storage { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); }
.ml-storage.hidden { display: none; }
.ml-storage-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ml-night-text); }
.ml-storage-bar { height: 6px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, 0.1); }
.ml-storage-bar span { display: block; height: 100%; background: var(--ml-orchid); }
.ml-storage-bar span.warning { background: #e8734f; }

.ml-tools { display: flex; gap: 6px; }
.ml-tool {
  flex: 1;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ml-night-text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.ml-tool:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.ml-tool .ml-icon { font-size: 17px; }

.ml-account { display: flex; align-items: center; gap: 8px; padding: 6px 0 4px 2px; }
.ml-account-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ml-account-name, .ml-account-email { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-account-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.ml-account-email { font-size: 12px; color: var(--ml-night-muted); }
.ml-rail-button {
  width: 32px;
  height: 32px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ml-night-muted);
  cursor: pointer;
}
.ml-rail-button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.ml-rail-button .ml-icon { font-size: 19px; }

.ml-avatar {
  width: 42px;
  height: 42px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}
.ml-avatar-me { width: 40px; height: 40px; background: var(--ml-orchid) !important; color: var(--ml-night); }
.ml-avatar-large { width: 48px; height: 48px; border-radius: 14px; font-size: 16px; }

/* Liste des messages */

html.ml-task-mail #layout-list {
  flex: none !important;
  width: 410px !important;
  min-width: 340px !important;
  max-width: none !important;
  border: 0 !important;
  background: var(--ml-bg) !important;
}
@media (max-width: 1200px) {
  html.ml-task-mail #layout-list { width: 340px !important; }
}

html.ml-task-mail #messagelist-header {
  border: 0 !important;
  background: transparent !important;
  min-height: 0;
}
@media (min-width: 1201px) {
  html.ml-task-mail #messagelist-header { position: absolute; right: 14px; top: 80px; z-index: 3; width: auto; padding: 0; height: auto; }
  html.ml-task-mail #messagelist-header .header-title { display: none; }
  html.ml-task-mail .ml-folder-title, html.ml-task-mail .ml-folder-meta { padding-right: 120px; }
}
html.ml-task-mail #messagelist-header .toolbar { gap: 2px; }
html.ml-task-mail #messagelist-header .toolbar a, html.ml-task-mail #messagelist-header a.button.refresh {
  width: 34px;
  min-width: 0;
  height: 34px;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--ml-muted-2);
}
html.ml-task-mail #messagelist-header .toolbar a:not(.disabled):hover, html.ml-task-mail #messagelist-header a.button:hover { background: var(--ml-hover); color: var(--ml-violet); }
html.ml-task-mail #messagelist-header .toolbar a::before, html.ml-task-mail #messagelist-header a.button::before { margin: 0 !important; font-size: 15px; }
html.ml-task-mail #messagelist-header .toolbar a .inner, html.ml-task-mail #messagelist-header a.button .inner {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
html.ml-task-mail #messagelist-header .toolbar a.threads { display: none; }

/* Menu de survol de Roundcube 1.7 : l'étoile de la ligne et la barre d'outils le remplacent. */
html.ml-task-mail #messagelist-content .listing-hover-menu { display: none !important; }

html.ml-task-mail #layout-list .searchbar {
  margin: 18px 18px 0;
  height: 46px;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ml-line) !important;
  border-radius: 14px;
  background: #fff;
}
html.ml-task-mail #layout-list .searchbar input { font-size: 14.5px; color: var(--ml-ink); background: transparent; }
html.ml-task-mail #layout-list .searchbar a.button::before, html.ml-task-mail #layout-list .searchbar .button::before { color: var(--ml-muted-2); }

.ml-list-head { display: flex; flex-direction: column; padding: 14px 18px 10px; }
.ml-folder-title { margin: 0; font-family: var(--ml-display); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; color: var(--ml-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-folder-meta { margin-top: 2px; font-size: 13px; color: var(--ml-muted-2); }
.ml-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ml-filter {
  height: 32px;
  padding: 0 14px;
  border: 1.5px solid var(--ml-line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ml-ink-3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ml-filter:hover { border-color: #cfc4a8; }
.ml-filter.active { background: var(--ml-night); border-color: var(--ml-night); color: #fff; }

html.ml-task-mail #messagelist-content { padding: 4px 10px 24px; background: transparent; }
html.ml-task-mail #messagelist {
  border-collapse: separate !important;
  border-spacing: 0 4px;
  background: transparent;
}
html.ml-task-mail #messagelist thead { display: none; }
html.ml-task-mail #messagelist tbody tr { background: transparent !important; border: 0 !important; }
html.ml-task-mail #messagelist tbody tr td { border: 0 !important; background: transparent !important; }
html.ml-task-mail #messagelist tbody tr td.flags, html.ml-task-mail #messagelist tbody tr td.selection { display: none; }
html.ml-task-mail #messagelist.withselection tbody tr td.selection { display: table-cell; vertical-align: top; padding-top: 20px; }

html.ml-task-mail #messagelist tbody tr td.subject {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-areas:
    "avatar from date"
    "avatar subject subject"
    "avatar preview preview"
    "avatar meta meta";
  column-gap: 12px;
  row-gap: 3px;
  padding: 14px !important;
  border-radius: 16px;
  line-height: 1.35;
  cursor: pointer;
  color: var(--ml-ink);
}
html.ml-task-mail #messagelist tbody tr:hover td.subject { background: rgba(255, 255, 255, 0.55) !important; }
html.ml-task-mail #messagelist tbody tr.selected td.subject,
html.ml-task-mail #messagelist tbody tr.selected:hover td.subject {
  background: #fff !important;
  box-shadow: 0 6px 20px rgba(20, 32, 26, 0.08);
  outline: 1.5px solid #e4dccb;
  color: var(--ml-ink) !important;
}
html.ml-task-mail #messagelist tbody tr.focused td.subject { outline: 1.5px solid #e4dccb; }

#messagelist td.subject .ml-avatar { grid-area: avatar; align-self: start; }
html.ml-task-mail #messagelist td.subject > span:not(.ml-avatar) { height: auto !important; line-height: 1.35 !important; }
html.ml-task-mail #messagelist td.subject span.fromto {
  grid-area: from;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0 !important;
  width: auto !important;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ml-ink) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
}
html.ml-task-mail #messagelist td.subject span.fromto .adr { overflow: hidden; text-overflow: ellipsis; }
html.ml-task-mail #messagelist td.subject span.date {
  grid-area: date;
  margin: 0;
  width: auto !important;
  font-size: 12px;
  color: var(--ml-muted-2) !important;
  white-space: nowrap;
  opacity: 1;
}
html.ml-task-mail #messagelist td.subject span.size { display: none !important; }
html.ml-task-mail #messagelist td.subject span.subject {
  grid-area: subject;
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0 !important;
  width: auto !important;
  font-size: 14px;
  font-weight: 500;
  color: var(--ml-ink-2);
}
html.ml-task-mail #messagelist td.subject span.subject a {
  color: inherit !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.ml-task-mail #messagelist td.subject span.msgicon { display: none; }
.ml-preview {
  grid-area: preview;
  font-size: 13px;
  color: #6b7a72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ml-row-meta { grid-area: meta; display: flex; align-items: center; gap: 8px; margin-top: 4px; min-height: 30px; }
.ml-row-meta .ml-attach { font-size: 17px; color: var(--ml-muted-2); }
.ml-star {
  width: 30px;
  height: 30px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ml-star-off);
  cursor: pointer;
}
.ml-star:hover { background: var(--ml-hover); }
.ml-star .ml-icon { font-size: 19px; }
html.ml-task-mail #messagelist tr.flagged .ml-star { color: var(--ml-star); }
html.ml-task-mail #messagelist tr.flagged .ml-star .ml-icon { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

html.ml-task-mail #messagelist tr.unread span.fromto,
html.ml-task-mail #messagelist tr.unread span.subject { font-weight: 700 !important; }
html.ml-task-mail #messagelist tr.unread span.fromto::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--ml-magenta);
}
html.ml-task-mail #messagelist tr.deleted span.subject a { text-decoration: line-through; }
html.ml-task-mail #messagelist tr.flagged td.subject span.fromto,
html.ml-task-mail #messagelist tr.flagged td.subject span.subject a { color: inherit !important; }

.ml-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ml-wash);
  color: #4a5a52;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
}
.ml-chip-dot { width: 7px; height: 7px; flex: none; }
.ml-chip-large { align-self: flex-start; padding: 5px 10px; border-radius: 7px; font-size: 12px; margin-bottom: 14px; }
.ml-chip-large .ml-chip-dot { width: 8px; height: 8px; }

html.ml-task-mail #messagelist tbody tr.message-list-empty td,
html.ml-task-mail #messagelist-content .listing-info {
  padding: 60px 20px !important;
  text-align: center;
  font-family: var(--ml-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--ml-ink-2);
}

html.ml-task-mail #layout-list .pagenav { border: 0; background: transparent; }
html.ml-task-mail #layout-list .pagenav a.button { color: var(--ml-muted-2); }

/* Lecture (cadre de prévisualisation) */

html.ml-task-mail:not(.ml-action-compose) #layout-content {
  margin: 10px 10px 10px 0;
  border: 0 !important;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 0 var(--ml-line), 0 10px 40px rgba(20, 32, 26, 0.06);
}
@media (max-width: 768px) {
  html.ml-task-mail:not(.ml-action-compose) #layout-content { margin: 0; border-radius: 0; box-shadow: none; }
}

html.ml-task-mail #layout-content > .header { border-bottom: 1px solid var(--ml-line-3) !important; background: #fff; }
html.ml-task-mail #layout-content > .header .header-title { font-family: var(--ml-display); font-weight: 600; }
@media (min-width: 1201px) {
  html.ml-task-mail:not(.ml-action-compose) #layout-content > .header .header-title { display: none; }
}

/* Barre d'outils en icônes seules ; sous 769 px, Elastic la replie en menu. */
@media (min-width: 769px) {
  html.ml-task-mail #layout-content > .header { height: auto; min-height: 70px; padding: 14px 18px; }
  html.ml-task-mail #layout-content > .header .toolbar {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    height: 42px;
    margin: 0 auto 0 0 !important;
    justify-content: flex-start;
    border: 0 !important;
  }
  html.ml-task-mail #layout-content > .header .toolbar > li { display: flex; align-items: center; border: 0 !important; }
  html.ml-task-mail #layout-content > .header .toolbar .spacer { display: none; }
  html.ml-task-mail #layout-content > .header .toolbar a:not(.dropdown) {
    min-width: 42px;
    height: 42px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--ml-ink-3) !important;
  }
  html.ml-task-mail #layout-content > .header .toolbar a:not(.dropdown):not(.disabled):hover { background: #f3efe4; color: var(--ml-violet) !important; }
  html.ml-task-mail #layout-content > .header .toolbar a.disabled { opacity: 0.35; }
  html.ml-task-mail #layout-content > .header .toolbar a .inner {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  html.ml-task-mail #layout-content > .header .toolbar a:not(.dropdown)::before { margin: 0 !important; height: auto !important; line-height: 1 !important; }
  html.ml-task-mail #layout-content > .header .toolbar .dropbutton {
    display: flex;
    align-items: center;
    height: 42px;
    margin: 0 !important;
  }
  html.ml-task-mail #layout-content > .header .toolbar .dropbutton a.dropdown {
    width: 14px;
    height: 42px;
    margin-left: -6px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ml-muted-2);
  }
  html.ml-task-mail #layout-content > .header .toolbar .dropbutton a.dropdown::before { margin: 0 !important; font-size: 10px; line-height: 1 !important; height: auto !important; }
  html.ml-task-mail #layout-content > .header .toolbar .dropbutton a.dropdown.disabled { opacity: 0.35; }
}

html.ml-task-mail #layout-content .toolbar :is(a.reply, a.reply-all, a.forward, a.delete, a.archive, a.junk, a.notjunk, a.markmessage, a.more, a.ml-label-button, a.print)::before {
  font-family: var(--ml-icons) !important;
  font-weight: 400 !important;
  font-size: 21px !important;
  font-feature-settings: "liga";
}
html.ml-task-mail #layout-content .toolbar a.reply::before { content: "reply"; }
html.ml-task-mail #layout-content .toolbar a.reply-all::before { content: "reply_all"; }
html.ml-task-mail #layout-content .toolbar a.forward::before { content: "forward"; }
html.ml-task-mail #layout-content .toolbar a.delete::before { content: "delete"; }
html.ml-task-mail #layout-content .toolbar a.archive::before { content: "archive"; }
html.ml-task-mail #layout-content .toolbar a.junk::before { content: "report"; }
html.ml-task-mail #layout-content .toolbar a.notjunk::before { content: "mark_email_read"; }
html.ml-task-mail #layout-content .toolbar a.markmessage::before { content: "mark_email_unread"; }
html.ml-task-mail #layout-content .toolbar a.more::before { content: "more_horiz"; }
html.ml-task-mail #layout-content .toolbar a.ml-label-button::before { content: "label"; }
html.ml-task-mail #layout-content .toolbar a.print::before { content: "print"; }

.ml-label-menu a, #ml-label-menu a { display: flex !important; align-items: center; gap: 10px; }
#ml-label-menu .ml-label-dot { margin: 0 5px; }
#ml-label-menu .ml-icon { font-size: 18px; color: var(--ml-muted-2); }

/* Contenu du message (page du cadre) */

body.task-mail.action-preview, body.task-mail.action-show { background: #fff; }
body.action-preview #layout-content .content, body.action-show #layout-content .content {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px clamp(18px, 4vw, 48px) 120px !important;
}

#message-header { display: flex; flex-direction: column; padding: 0 0 26px; border: 0 !important; background: transparent; }
#message-header h2.subject {
  margin: 0 0 22px;
  padding: 0;
  font-family: var(--ml-display) !important;
  font-weight: 600;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ml-ink);
  text-wrap: pretty;
}
#message-header h2.subject::before, #message-header h2.subject a.extwin { display: none !important; }
#message-header > .header { display: block; padding: 0; }
#message-header > .header > img.contactphoto { display: none; }
#message-header .header-content { margin: 0; }
#message-header .header-summary { display: none; }
#message-header .header-links { margin-top: 8px; font-size: 12.5px; }
#message-header .header-links a { color: var(--ml-muted-2); }
#message-header .header-links a:hover { color: var(--ml-violet); }
#message-header table.header-headers { margin-top: 10px; font-size: 13px; }

.ml-from { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ml-from-text { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.ml-from-name { font-size: 15.5px; font-weight: 600; color: var(--ml-ink); }
.ml-from-email, .ml-from-date { font-size: 13px; color: var(--ml-muted-2); }

#message-content { display: flex; flex-direction: column; gap: 26px; }
#message-content .rightcol { order: 1; margin: 0; padding: 0; }
#message-content .leftcol { order: 2; margin: 0; padding: 0; width: auto !important; float: none; border: 0 !important; }

#messagebody, #messagebody .message-part, #messagebody div.pre, #messagebody pre {
  font-family: var(--ml-sans) !important;
  font-size: 15.5px !important;
  line-height: 1.7 !important;
  color: var(--ml-ink-2);
}
#messagebody .message-part { padding: 0; border: 0; }

.ml-attach-title { margin-bottom: 10px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ml-muted-2); }
#attachment-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0 !important;
}
#attachment-list li {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 !important;
  padding: 12px;
  border: 1.5px solid var(--ml-line) !important;
  border-radius: 14px;
  background: #fff;
  float: none !important;
  width: auto !important;
}
#attachment-list li:hover { border-color: #cfc4a8 !important; background: #fcfaf5; }
#attachment-list li a.filename {
  flex: 1;
  min-width: 0;
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas: "icon name" "icon size";
  column-gap: 12px;
  align-items: center;
  padding: 0 !important;
  color: var(--ml-ink) !important;
  text-decoration: none !important;
}
#attachment-list li::before, #attachment-list li a.filename::before { display: none !important; }
#attachment-list li a.filename { height: auto !important; line-height: 1.35; background: none !important; }
.ml-attach-icon {
  grid-area: icon;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--ml-wash-2);
  color: var(--ml-violet);
}
#attachment-list .attachment-name { grid-area: name; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#attachment-list .attachment-size { grid-area: size; font-size: 12px; color: var(--ml-muted-2); }
#attachment-list li a.dropdown { position: static !important; color: var(--ml-muted-2); }
#attachment-list li a.dropdown::before {
  font-family: var(--ml-icons) !important;
  font-weight: 400 !important;
  font-size: 20px;
  font-feature-settings: "liga";
  content: "download" !important;
}

.ml-quick-reply {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 26px;
  padding: 14px;
  border: 1.5px solid var(--ml-line);
  border-radius: 18px;
  background: #fbf9f3;
}
.ml-quick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ml-quick-chips button {
  padding: 7px 12px;
  border: 1.5px solid #ddd3bc;
  border-radius: 999px;
  background: #fff;
  color: var(--ml-violet-dark);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.ml-quick-chips button:hover { background: var(--ml-wash-2); border-color: #cfc4a8; }
.ml-quick-reply textarea {
  min-height: 70px;
  padding: 0;
  border: 0 !important;
  outline: 0;
  box-shadow: none !important;
  background: transparent;
  resize: vertical;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ml-ink);
}
.ml-quick-actions { display: flex; justify-content: flex-end; }
.ml-button-primary {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--ml-violet);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.ml-button-primary:hover { background: var(--ml-violet-hover); }
.ml-button-primary .ml-icon { font-size: 18px; }

/* Rédaction : fenêtre « Nouveau message » de la maquette, en pleine colonne */

html.ml-action-compose body, html.ml-action-compose #layout { background: var(--ml-bg) !important; }

html.ml-action-compose #layout-content {
  border: 0 !important;
  background: #fff;
}
@media (min-width: 769px) {
  html.ml-action-compose #layout-content {
    margin: 10px 0 10px 10px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 1px 0 var(--ml-line), 0 24px 70px rgba(20, 32, 26, 0.12);
  }
}

html.ml-action-compose #layout-content > .header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px 10px 20px !important;
  border: 0 !important;
  background: var(--ml-night) !important;
}
html.ml-action-compose #layout-content > .header .header-title {
  display: block !important;
  flex: 1;
  order: -1;
  margin: 0 !important;
  color: #fff !important;
  font-family: var(--ml-display) !important;
  font-weight: 600;
  font-size: 15px;
  text-align: left !important;
  position: static !important;
  width: auto !important;
  padding: 0 !important;
}
html.ml-action-compose #layout-content > .header .toolbar { margin: 0 !important; }
html.ml-action-compose #layout-content > .header .toolbar a:not(.dropdown) { color: var(--ml-night-text) !important; }
html.ml-action-compose #layout-content > .header .toolbar a:not(.dropdown):not(.disabled):hover { background: rgba(255, 255, 255, 0.1); color: #fff !important; }
html.ml-action-compose #layout-content > .header a.button { color: var(--ml-night-text); }
.ml-compose-close {
  width: 34px;
  height: 34px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ml-night-text);
  cursor: pointer;
}
.ml-compose-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.ml-compose-close .ml-icon { font-size: 20px; }
@media (max-width: 768px) {
  .ml-compose-close { display: none; }
}

html.ml-action-compose #compose-content { background: #fff; padding: 0 !important; }
html.ml-action-compose #compose-content > form { padding: 0 !important; }
html.ml-action-compose #compose-headers { padding: 0 !important; margin: 0 !important; }
html.ml-action-compose #compose-headers .form-group.row {
  min-height: 50px;
  margin: 0 !important;
  padding: 0 20px;
  align-items: center;
  border-bottom: 1px solid var(--ml-line-3);
}
html.ml-action-compose #compose-headers .form-group.row > label,
html.ml-action-compose #compose-headers .form-group.row > .col-form-label {
  flex: 0 0 64px;
  max-width: 64px;
  padding: 0;
  font-size: 13.5px;
  color: var(--ml-muted-2);
}
html.ml-action-compose #compose-headers .form-group.row > div { flex: 1; max-width: none; padding: 0; }
html.ml-action-compose #compose-headers .form-control,
html.ml-action-compose #compose-headers .custom-select,
html.ml-action-compose #compose-headers .recipient-input,
html.ml-action-compose #compose-headers .input-group > .form-control {
  border: 0 !important;
  box-shadow: none !important;
  background-color: transparent !important;
  padding-left: 0;
  font-size: 14.5px;
  color: var(--ml-ink);
}
html.ml-action-compose #compose-headers .input-group-append .btn,
html.ml-action-compose #compose-headers .input-group-append a {
  border: 0 !important;
  background: transparent !important;
  color: var(--ml-muted) !important;
}
html.ml-action-compose #compose-headers .recipient-input li.recipient {
  border: 0;
  border-radius: 8px;
  background: var(--ml-wash);
  color: var(--ml-violet-dark);
}

html.ml-action-compose #composebodycontainer { margin: 0 !important; padding: 0 !important; }
html.ml-action-compose #composebodycontainer .tox-tinymce,
html.ml-action-compose #composebody {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html.ml-action-compose #composebody { padding: 16px 20px; font-size: 15px; line-height: 1.6; }
html.ml-action-compose .tox .tox-toolbar, html.ml-action-compose .tox .tox-toolbar__primary,
html.ml-action-compose .tox .tox-toolbar-overlord, html.ml-action-compose .tox .tox-editor-header {
  background: #fbf9f3 !important;
  border-bottom: 1px solid var(--ml-line-3) !important;
}

html.ml-action-compose #compose-content .formbuttons {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 16px 20px !important;
  border-top: 1px dashed var(--ml-line);
  background: #fff;
}
html.ml-action-compose #compose-content .formbuttons button.send {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: 12px !important;
  font-size: 14.5px;
}
html.ml-action-compose #compose-content .formbuttons .float-right { margin-left: auto; }
html.ml-action-compose #compose-content .formbuttons a.extwin { color: var(--ml-muted-2) !important; font-size: 13px; }

/* Volet des options et pièces jointes */

html.ml-action-compose #layout-sidebar {
  border: 0 !important;
  background: var(--ml-bg) !important;
}
html.ml-action-compose #layout-sidebar > .header { border: 0 !important; background: transparent !important; }
html.ml-action-compose #layout-sidebar > .header .header-title { font-family: var(--ml-display); font-weight: 600; font-size: 15px; color: var(--ml-ink); }
html.ml-action-compose #compose-attachments {
  margin: 0 14px 18px !important;
  border: 1.5px dashed var(--ml-line-2) !important;
  border-radius: 18px;
  background: #fff;
}
html.ml-action-compose #compose-attachments .hint { color: var(--ml-muted-2); font-size: 13px; }
html.ml-action-compose #compose-attachments button.attach {
  border: 1.5px solid #ddd3bc !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--ml-violet) !important;
  font-weight: 600;
}
html.ml-action-compose #compose-attachments button.attach:hover { background: var(--ml-wash-2) !important; }
html.ml-action-compose #compose-attachments::after { color: var(--ml-line-2) !important; }
html.ml-action-compose #compose-attachments .attachmentslist li { border-radius: 10px; }
html.ml-action-compose #compose-options { padding: 0 14px; }
html.ml-action-compose #compose-options label { color: var(--ml-ink-3); font-size: 13.5px; }
html.ml-action-compose #compose-options .custom-select { border-radius: 10px; border-color: var(--ml-line-2); }

/* ========== Paramètres et contacts : même charte que la boîte mail ========== */

body.task-settings, body.task-addressbook,
body.task-settings #layout, body.task-addressbook #layout { background: var(--ml-bg) !important; }

/* Sections et carnets d'adresses : rail sombre */

body.task-settings #layout-sidebar, body.task-addressbook #layout-sidebar {
  border: 0 !important;
  background: var(--ml-night) !important;
  color: var(--ml-night-text);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.06);
}
body.task-settings #layout-sidebar > .header, body.task-addressbook #layout-sidebar > .header {
  border: 0 !important;
  background: transparent !important;
  padding-left: 22px;
}
body.task-settings #layout-sidebar .header-title, body.task-addressbook #layout-sidebar .header-title {
  font-family: var(--ml-display);
  font-weight: 600;
  font-size: 16px;
  color: #fff !important;
  text-align: left;
}
body.task-settings #layout-sidebar > .header a.button, body.task-addressbook #layout-sidebar > .header a.button { color: var(--ml-night-muted); }
body.task-settings #layout-sidebar .scroller, body.task-addressbook #layout-sidebar .scroller { padding: 4px 12px; background: transparent; }
body.task-settings #layout-sidebar .listing, body.task-addressbook #layout-sidebar .listing {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: transparent;
}
body.task-settings #layout-sidebar .listing li, body.task-addressbook #layout-sidebar .listing li {
  border: 0 !important;
  background: transparent !important;
}
body.task-settings #layout-sidebar .listing li > a, body.task-addressbook #layout-sidebar .listing li > a {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 12px;
  background: transparent !important;
  color: var(--ml-night-text) !important;
  font-size: 14.5px;
  font-weight: 500;
}
body.task-settings #layout-sidebar .listing li > a:hover, body.task-addressbook #layout-sidebar .listing li > a:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
}
body.task-settings #layout-sidebar .listing li.selected > a, body.task-addressbook #layout-sidebar .listing li.selected > a {
  background: rgba(242, 181, 48, 0.16) !important;
  color: #fff !important;
  font-weight: 600;
}
body.task-settings #layout-sidebar .listing li > a::before, body.task-addressbook #layout-sidebar .listing li > a::before {
  position: static !important;
  display: block !important;
  width: 21px !important;
  height: auto !important;
  margin: 0 !important;
  float: none !important;
  font-family: var(--ml-icons) !important;
  font-weight: 400 !important;
  font-size: 21px !important;
  line-height: 1 !important;
  font-feature-settings: "liga";
  color: inherit;
}
#settings-menu li.preferences > a::before { content: "tune" !important; }
#settings-menu li.folders > a::before { content: "folder" !important; }
#settings-menu li.identities > a::before { content: "badge" !important; }
#settings-menu li.responses > a::before { content: "chat" !important; }
#directorylist li.addressbook > a::before { content: "book" !important; }
#directorylist li.contactgroup > a::before { content: "group" !important; }

/* Liste du milieu : lignes en cartes, icône dans un carré violet clair */

body.task-settings #layout-list, body.task-addressbook #layout-list {
  border: 0 !important;
  background: var(--ml-bg) !important;
}
body.task-settings #layout-list > .header, body.task-addressbook #layout-list > .header {
  border: 0 !important;
  background: transparent !important;
}
body.task-settings #layout-list .header-title, body.task-addressbook #layout-list .header-title {
  font-family: var(--ml-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--ml-ink);
}
body.task-settings #layout-list .scroller, body.task-addressbook #layout-list .scroller { padding: 4px 10px 16px; background: transparent; }
body.task-settings #layout-list table.listing, body.task-addressbook #layout-list table.listing {
  border-collapse: separate !important;
  border-spacing: 0 4px;
  background: transparent;
}
body.task-settings #layout-list table.listing tr, body.task-addressbook #layout-list table.listing tr { background: transparent !important; }
body.task-settings #layout-list table.listing td, body.task-addressbook #layout-list table.listing td {
  height: 56px;
  padding: 10px 14px !important;
  border: 0 !important;
  border-radius: 14px;
  background: transparent !important;
  color: var(--ml-ink) !important;
  font-size: 14.5px;
  font-weight: 500;
  vertical-align: middle;
}
body.task-settings #layout-list table.listing tr:hover td, body.task-addressbook #layout-list table.listing tr:hover td { background: rgba(255, 255, 255, 0.55) !important; }
body.task-settings #layout-list table.listing tr.selected td, body.task-addressbook #layout-list table.listing tr.selected td {
  background: #fff !important;
  box-shadow: 0 6px 20px rgba(20, 32, 26, 0.08);
  outline: 1.5px solid #e4dccb;
}
body.task-settings #layout-list table.listing tr.focused td, body.task-addressbook #layout-list table.listing tr.focused td { outline: 1.5px solid #e4dccb; }
body.task-settings #layout-list table.listing td::before {
  width: 36px !important;
  height: 36px !important;
  margin: 0 12px 0 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  float: none !important;
  vertical-align: middle;
  border-radius: 10px;
  background: var(--ml-wash-2);
  color: var(--ml-violet);
  font-family: var(--ml-icons) !important;
  font-weight: 400 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-feature-settings: "liga";
}
#sections-table tr.general td::before { content: "desktop_windows" !important; }
#sections-table tr.mailbox td::before { content: "inbox" !important; }
#sections-table tr.mailview td::before { content: "mark_email_read" !important; }
#sections-table tr.compose td::before { content: "edit_square" !important; }
#sections-table tr.addressbook td::before { content: "contacts" !important; }
#sections-table tr.folders td::before { content: "folder_special" !important; }
#sections-table tr.server td::before { content: "dns" !important; }
#sections-table tr.encryption td::before { content: "lock" !important; }
#identities-table td::before { content: "badge" !important; }
#responses-table td::before { content: "chat" !important; }

body.task-settings #subscription-table li, body.task-settings #subscription-table li > div { border: 0 !important; background: transparent !important; }
body.task-settings #subscription-table li > a, body.task-settings #subscription-table li > div > a { border-radius: 12px; color: var(--ml-ink) !important; }

body.task-addressbook #layout-list .searchbar {
  margin: 4px 14px 8px;
  height: 46px;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ml-line) !important;
  border-radius: 14px;
  background: #fff;
}
body.task-addressbook #layout-list .searchbar input { background: transparent; font-size: 14.5px; }
body.task-addressbook #layout-list .listing-info { color: var(--ml-muted-2); font-weight: 500; }
body.task-addressbook #contacts-table td.name { display: flex; align-items: center; gap: 12px; }
body.task-addressbook #contacts-table td.name::before { display: none !important; }
body.task-settings #layout-list .pagenav, body.task-addressbook #layout-list .pagenav { border: 0; background: transparent; }

/* Panneau de droite : carte blanche, barre d'outils en icônes */

body.task-settings #layout-content, body.task-addressbook #layout-content {
  margin: 10px 10px 10px 0;
  border: 0 !important;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 0 var(--ml-line), 0 10px 40px rgba(20, 32, 26, 0.06);
}
body.task-settings #layout-content > .header, body.task-addressbook #layout-content > .header {
  border-bottom: 1px solid var(--ml-line-3) !important;
  background: #fff !important;
}
body.task-settings #layout-content > .header .header-title, body.task-addressbook #layout-content > .header .header-title {
  font-family: var(--ml-display);
  font-weight: 600;
  color: var(--ml-ink);
}
body.task-settings #layout-content .toolbar a, body.task-addressbook #layout-content .toolbar a { color: var(--ml-ink-3) !important; border-radius: 12px; }
body.task-settings #layout-content .toolbar a:not(.disabled):hover, body.task-addressbook #layout-content .toolbar a:not(.disabled):hover {
  background: #f3efe4;
  color: var(--ml-violet) !important;
}
body.task-settings #layout-content .toolbar a.disabled, body.task-addressbook #layout-content .toolbar a.disabled { opacity: 0.4; }
body.task-settings #layout-content .toolbar :is(a.create, a.delete)::before,
body.task-addressbook #layout-content .toolbar :is(a.create, a.delete, a.print, a.search, a.import, a.export, a.more, a.download)::before {
  font-family: var(--ml-icons) !important;
  font-weight: 400 !important;
  font-size: 22px !important;
  font-feature-settings: "liga";
}
body.task-settings #layout-content .toolbar a.create::before { content: "add" !important; }
body.task-addressbook #layout-content .toolbar a.create::before { content: "person_add" !important; }
body.task-settings #layout-content .toolbar a.delete::before, body.task-addressbook #layout-content .toolbar a.delete::before { content: "delete" !important; }
body.task-addressbook #layout-content .toolbar a.print::before { content: "print" !important; }
body.task-addressbook #layout-content .toolbar a.search::before { content: "search" !important; }
body.task-addressbook #layout-content .toolbar a.import::before { content: "upload" !important; }
body.task-addressbook #layout-content .toolbar :is(a.export, a.download)::before { content: "download" !important; }
body.task-addressbook #layout-content .toolbar a.more::before { content: "more_horiz" !important; }
body.task-settings #layout-content .toolbar .spacer, body.task-addressbook #layout-content .toolbar .spacer { display: none; }

/* Barres d'outils en icônes seules, alignées à gauche, comme dans la boîte mail */
@media (min-width: 769px) {
  body.task-settings #layout-content > .header, body.task-addressbook #layout-content > .header { padding: 14px 18px; min-height: 70px; height: auto; }
  body.task-settings #layout-content > .header .toolbar, body.task-addressbook #layout-content > .header .toolbar,
  body.task-addressbook #layout-list > .header .toolbar {
    display: flex !important;
    align-items: center;
    gap: 4px;
    margin: 0 auto 0 0 !important;
  }
  body.task-settings #layout-content > .header .toolbar > li, body.task-addressbook #layout-content > .header .toolbar > li,
  body.task-addressbook #layout-list > .header .toolbar > li { display: flex; align-items: center; height: 42px; border: 0 !important; }
  body.task-settings #layout-content > .header .toolbar a, body.task-addressbook #layout-content > .header .toolbar a:not(.dropdown),
  body.task-addressbook #layout-list > .header .toolbar a {
    min-width: 42px;
    height: 42px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  body.task-settings #layout-content > .header .toolbar a::before, body.task-addressbook #layout-content > .header .toolbar a::before,
  body.task-addressbook #layout-list > .header .toolbar a::before { margin: 0 !important; height: auto !important; line-height: 1 !important; }
  body.task-settings #layout-content > .header .toolbar a .inner, body.task-addressbook #layout-content > .header .toolbar a .inner,
  body.task-addressbook #layout-list > .header .toolbar a .inner {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  body.task-addressbook #layout-content > .header .toolbar .dropbutton { display: flex; align-items: center; height: 42px; }
  body.task-addressbook #layout-content > .header .toolbar .dropbutton a.dropdown {
    width: 14px;
    height: 42px;
    margin-left: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ml-muted-2) !important;
  }
  body.task-addressbook #layout-content > .header .toolbar .dropbutton a.dropdown::before { margin: 0 !important; font-size: 10px; line-height: 1 !important; height: auto !important; }
  body.task-addressbook #layout-list > .header { justify-content: flex-end; }
  body.task-addressbook #layout-list > .header .toolbar a { color: var(--ml-muted-2); border-radius: 10px; }
}

body.task-addressbook #contactphoto, body.task-addressbook .contactphoto {
  border: 0 !important;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ml-wash-2) !important;
}
body.task-addressbook #contactpic { background: transparent !important; }
body.task-addressbook #contactphoto img, body.task-addressbook .contactphoto img { opacity: 0.55; }

/* Formulaires dans le cadre de droite (préférences, identités, contacts) */

body.task-settings.formcontainer, body.task-addressbook.formcontainer,
body.task-settings .formcontainer, body.task-addressbook .formcontainer { background: #fff; }
body.task-settings .formcontent, body.task-addressbook .formcontent { padding: 24px clamp(18px, 3vw, 32px) !important; }
body.task-settings fieldset > legend, body.task-addressbook fieldset > legend {
  margin-bottom: 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--ml-line-3);
  font-family: var(--ml-display) !important;
  font-weight: 600;
  font-size: 16px;
  color: var(--ml-ink);
}
body.task-settings .propform .col-form-label, body.task-addressbook .propform .col-form-label { color: var(--ml-ink-3); font-size: 14px; }
body.task-settings .form-control, body.task-settings .custom-select,
body.task-addressbook .form-control, body.task-addressbook .custom-select {
  border-color: var(--ml-line-2) !important;
  border-radius: 12px !important;
}
body.task-settings .formbuttons, body.task-addressbook .formbuttons {
  padding: 14px clamp(18px, 3vw, 32px) 18px !important;
  border-top: 1px solid var(--ml-line-3);
  background: #fbf9f3;
}
body.task-settings .formbuttons .btn, body.task-addressbook .formbuttons .btn { height: 42px; padding: 0 20px; }

@media (max-width: 768px) {
  body.task-settings #layout-content, body.task-addressbook #layout-content { margin: 0; border-radius: 0; box-shadow: none; }
}

/* Mobile : navigation du bas et bouton de rédaction */

.ml-bottom-nav, .ml-fab { display: none; }

@media (max-width: 768px) {
  html.ml-task-mail #layout-list, html.ml-task-mail:not(.ml-action-compose) #layout-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  html.ml-task-mail:not(.ml-action-compose) #layout-sidebar > .header { position: static; display: flex; padding: 0 0 6px; }

  html.ml-task-mail #messagelist-header .header-title {
    font-size: 0 !important;
    width: 44px;
    height: 44px;
    background: url("assets/logo.png") left center / auto 44px no-repeat;
  }
  html.ml-task-mail #messagelist-content { padding-bottom: 110px; }

  .ml-bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 30;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-radius: 20px;
    background: var(--ml-night);
    box-shadow: 0 12px 30px rgba(20, 32, 26, 0.28);
  }
  .ml-bottom-nav button {
    width: 64px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ml-night-muted);
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
  }
  .ml-bottom-nav button .ml-icon { font-size: 22px; }
  .ml-bottom-nav button.active { color: var(--ml-orchid); }

  .ml-fab {
    position: fixed;
    right: 22px;
    bottom: 92px;
    z-index: 31;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: var(--ml-magenta);
    color: var(--ml-on-accent);
    box-shadow: 0 10px 24px rgba(242, 181, 48, 0.4);
    cursor: pointer;
  }
  .ml-fab .ml-icon { font-size: 26px; }

  html:has(#layout-content:not(.hidden)) .ml-bottom-nav,
  html:has(#layout-content:not(.hidden)) .ml-fab,
  html:has(#layout-sidebar:not(.hidden)) .ml-fab,
  html.ml-action-compose .ml-bottom-nav,
  html.ml-action-compose .ml-fab { display: none; }

  #messagestack { bottom: 96px; }
}
