/* Nomadea Webmail : couleurs de la marque (site v5) appliquees au theme Elastic */
:root {
  --brand: #083E4B;
  --brand-dark: #052C36;
  --brand-cream: #FBF9F6;
  --brand-sand: #CFB99C;
}

/* Boutons principaux */
.btn-primary, .mainaction, .btn.btn-primary, button.mainaction, input.mainaction,
.btn-primary:not(:disabled):not(.disabled), .mainaction:not(:disabled):not(.disabled) {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}
.btn-primary:hover, .mainaction:hover, .btn-primary:focus, .mainaction:focus,
.btn-primary:not(:disabled):not(.disabled):active, .mainaction:not(:disabled):not(.disabled):active {
  background-color: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
  color: #fff !important;
}
.btn-primary:focus, .mainaction:focus {
  box-shadow: 0 0 0 .2rem rgba(8, 62, 75, .35) !important;
}

/* Champs : focus */
.form-control:focus, input:focus, textarea:focus, select:focus, .custom-select:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 .2rem rgba(8, 62, 75, .2) !important;
}

/* Liens */
a, a:visited, .listing li a, .header-links a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
#layout-menu a, #layout-menu a:visited, .menu a, .popupmenu a { color: inherit; }

/* Element actif du menu principal et des listes de dossiers */
#taskmenu a.selected, #taskmenu a.selected:hover,
#layout-menu .selected, .listing li.selected > a, #folderlist-content li.selected > a {
  color: var(--brand) !important;
}
#taskmenu a.selected { background-color: rgba(8, 62, 75, .08) !important; }
.listing li.selected, .listing tr.selected td, table.listing tr.focused td {
  border-left-color: var(--brand) !important;
}

/* Interrupteurs coches */
.custom-switch .custom-control-input:checked ~ .custom-control-label::before,
.custom-control-input:checked ~ .custom-control-label::before,
input.form-check-input:checked, .custom-switch:checked {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
}

/* Page de connexion */
body.task-login, body.task-login #layout, body.task-login #layout-content {
  background: var(--brand-cream) !important;
}
body.task-login #login-form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 41, 44, .10), 0 2px 8px rgba(0, 41, 44, .06);
  padding: 40px 30px;
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}
body.task-login #logo {
  max-width: 240px;
  max-height: 60px;
  width: auto;
  height: auto;
  margin-bottom: 20px;
}
body.task-login #rcmloginsubmit {
  text-transform: uppercase;
  letter-spacing: .06em;
}
body.task-login #login-footer, body.task-login #login-footer a {
  color: #3E5A5F;
}

/* Mode sombre d'Elastic : liens et elements actifs lisibles */
html.dark-mode a, html.dark-mode a:visited { color: var(--brand-sand); }
html.dark-mode #taskmenu a.selected, html.dark-mode .listing li.selected > a { color: var(--brand-sand) !important; }
html.dark-mode body.task-login, html.dark-mode body.task-login #layout,
html.dark-mode body.task-login #layout-content { background: #00292C !important; }

/* Mobile */
@media (max-width: 480px) {
  body.task-login #login-form {
    padding: 28px 20px;
    max-width: calc(100% - 32px);
    border-radius: 10px;
  }
  body.task-login #logo { max-width: 200px; max-height: 50px; }
}
