/* Thème NextSahel pour Roundcube Elastic : couleurs réglables ici */
:root{--ns-nuit:#081C2D;--ns-vert:#1F7A63;--ns-vert-fonce:#17604E;--ns-clair:#E8F3EF;--ns-texte-menu:#CFD8DE}

/* Menu principal */
#layout-menu{background:var(--ns-nuit)!important}
#layout-menu .menu a{color:var(--ns-texte-menu)!important}
#layout-menu .menu a:hover,#layout-menu .menu a.selected{color:#fff!important;background:var(--ns-vert)!important}

/* Boutons, liens et champs */
.btn-primary,.button.mainaction,input.button.mainaction,button.mainaction{background-color:var(--ns-vert)!important;border-color:var(--ns-vert)!important;color:#fff!important}
.btn-primary:hover,.button.mainaction:hover{background-color:var(--ns-vert-fonce)!important;border-color:var(--ns-vert-fonce)!important}
a,.link{color:var(--ns-vert)}
.form-control:focus,.custom-select:focus{border-color:var(--ns-vert)!important;box-shadow:0 0 0 .2rem rgba(31,122,99,.25)!important}

/* Listes : élément sélectionné et compteurs */
.listing li.selected,.listing tr.selected td,.records-table tr.selected td{background-color:var(--ns-clair)!important}
.listing li.selected>a,.records-table tr.selected td{color:var(--ns-nuit)!important}
.unreadcount,.badge{background:var(--ns-vert)!important;color:#fff!important}

/* Page de connexion */
body.task-login{background:linear-gradient(135deg,var(--ns-nuit) 0%,#0F3346 60%,var(--ns-vert) 100%)!important;min-height:100vh}
body.task-login #layout,body.task-login #layout-content{background:transparent!important}
body.task-login #login-form{background:#fff;border-radius:14px;padding:32px 28px;box-shadow:0 20px 50px rgba(0,0,0,.35);max-width:400px;margin:auto}
body.task-login #logo{max-height:56px;margin-bottom:18px}
body.task-login #login-footer,body.task-login #login-footer a{color:#CFE3DC!important}
html.dark-mode body.task-login #login-form{background:#13293A}

/* Logo du menu : carré « NS » seul, bien visible */
#layout-menu img.logo,#layout-menu .popover-header img{max-width:44px!important;max-height:44px!important;margin:8px auto!important;display:block}

/* Filigrane : logo NextSahel à la place du dessin de Roundcube */
.watermark{background-image:url(filigrane.svg)!important;background-size:200px auto!important;background-repeat:no-repeat!important;background-position:center!important}

/* Mode sombre : dossier et message sélectionnés */
html.dark-mode .listing li.selected,html.dark-mode .listing tr.selected td,html.dark-mode .records-table tr.selected td{background-color:#16384A!important}
html.dark-mode .listing li.selected>a,html.dark-mode .records-table tr.selected td{color:#fff!important}
html.dark-mode a,html.dark-mode .link{color:#5FC2A4}
