/*
 * Guacamole Dark Modern Theme - WORKING VERSION
 * Author: Damien Beraud <dberaud@dawan.fr>
 * Version: 3.5.0
 * Date: 2025-10-30
 * Fix: Menu Guacamole - Approche ultra-minimaliste (COULEURS UNIQUEMENT, aucune dimension)
 */

/* ==================== */
/* GLOBAL - Force tout en dark */
/* ==================== */
html, body {
    background: #0d1117 !important;
    color: #f0f6fc !important;
}

/* ==================== */
/* USER MENU */
/* ==================== */
.user-menu .menu-dropdown {
    background: #161b22 !important;
    border-color: #30363d !important;
}

.user-menu .menu-dropdown .menu-title {
    background-color: #161b22 !important;
    color: #f0f6fc !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
}

.user-menu .menu-dropdown .menu-contents {
    background: #161b22 !important;
}

.user-menu .menu-dropdown .menu-contents li a {
    color: #8b949e !important;
    background: transparent !important;
}

.user-menu .menu-dropdown .menu-contents li a:hover {
    background: #2d3748 !important;
    color: #58a6ff !important;
}

/* ==================== */
/* LISTE DES CONNEXIONS */
/* ==================== */

/* NEUTRALISER LES PSEUDO-ÉLÉMENTS PARASITES */
.list-item:before,
.list-item:after,
.expandable.expanded > .children > .list-item:before,
.expandable.expanded > .children > .list-item:after {
    display: none !important;
    border: none !important;
    content: none !important;
}

.list-item {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
    border-left: 3px solid #58a6ff !important;
    border-radius: 8px !important;
    color: #f0f6fc !important;
    transition: all 0.2s ease !important;
    padding: 12px !important;
}

/* SURVOL - Toute la bulle en bleu */
.list-item:hover,
.list-item.selected,
.list-item.focused {
    background: #1c3a5a !important;
    border: 1px solid #58a6ff !important;
    border-left: 3px solid #58a6ff !important;
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* Texte de la connexion */
.list-item .name,
.list-item span.name {
    color: #f0f6fc !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    letter-spacing: 0.8px !important;
    font-size: 14px !important;
}

/* Texte au survol - gris clair */
.list-item:hover .name,
.list-item:hover span.name {
    color: #e6edf3 !important;
}

/* ICÔNES - Surcharger les règles Guacamole */
/* Taille réduite à 70% : 48px * 0.7 = 34px */
.list-item .icon,
.list-item .connection .icon,
.list-item .connection-group .icon,
div.all-connections .list-item .icon.type.rdp,
div.all-connections .list-item .icon.type.ssh,
div.all-connections .list-item .icon.type.vnc,
div.all-connections .list-item .icon.type.telnet,
div.all-connections .list-item .icon.type.kubernetes {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    background-size: 34px 34px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    /* Rendre l'icône blanche en inversant et ajustant */
    filter: brightness(0) invert(0.9) !important;
}

/* Icône au survol - garder visible avec légère luminosité */
.list-item:hover .icon {
    filter: brightness(0) invert(1) !important;
}

/* NEUTRALISER TOUTES LES BORDURES ET BORDER-RADIUS INTERNES */
/* IMPORTANT: Seul .list-item doit avoir des bordures, pas ses enfants */
.list-item .connection,
.list-item .connection-group,
.list-item > .connection,
.list-item > .connection-group,
.list-item .caption,
.list-item > .caption,
.list-item div.connection,
.list-item div.connection-group,
div.all-connections .list-item > div,
div.all-connections .list-item > div > div,
div.recent-connections div.connection > *,
div.recent-connections div.connection .caption {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* SUPPRIMÉ - Ces règles étaient trop agressives et affectaient le menu Guacamole
 * (Ctrl+Alt+Shift) en supprimant toutes les bordures des enfants de .list-item
 */

/* ==================== */
/* MENU GUACAMOLE (Ctrl+Alt+Shift) */
/* ==================== */
/* APPROCHE ULTRA-MINIMALISTE: Couleurs UNIQUEMENT, AUCUNE dimension/layout */

/* Container principal - Fond dark */
#guac-menu {
    background: #161b22 !important;
}

.menu {
    background: #161b22 !important;
}

/* Textes - Couleur claire */
#guac-menu,
#guac-menu h1,
#guac-menu h2,
#guac-menu h3,
#guac-menu label,
#guac-menu legend,
.menu,
.menu h1,
.menu h2,
.menu h3,
.menu label,
.menu legend {
    color: #f0f6fc !important;
}

/* Descriptions et textes secondaires */
#guac-menu p,
#guac-menu .description,
.menu p,
.menu .description {
    color: #8b949e !important;
}

/* Inputs texte - Fond dark, texte clair */
#guac-menu input[type="text"],
#guac-menu input[type="number"],
#guac-menu textarea,
.menu input[type="text"],
.menu input[type="number"],
.menu textarea {
    background: #1f2937 !important;
    color: #f0f6fc !important;
    border-color: #30363d !important;
}

/* Selects - Fond dark */
#guac-menu select,
.menu select {
    background: #1f2937 !important;
    color: #f0f6fc !important;
    border-color: #30363d !important;
}

#guac-menu option,
.menu option {
    background: #1f2937 !important;
    color: #f0f6fc !important;
}

/* Bordures - Gris foncé */
#guac-menu fieldset,
#guac-menu hr,
.menu fieldset,
.menu hr {
    border-color: #30363d !important;
}

/* NE PAS TOUCHER aux radio buttons, checkboxes, images - Laisser le style natif */

/* ==================== */
/* HEADER & NAVIGATION */
/* ==================== */
.header {
    background: #161b22 !important;
    border-bottom: 1px solid #30363d !important;
}

.header h2 {
    color: #f0f6fc !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
}

h1, h2, h3 {
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
}

/* ==================== */
/* INPUTS & FORMS */
/* ==================== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
    background: #1f2937 !important;
    border: 1px solid #30363d !important;
    color: #f0f6fc !important;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #58a6ff !important;
    outline: none !important;
}

/* ==================== */
/* BUTTONS */
/* ==================== */
button,
.button,
a.button {
    background: #58a6ff !important;
    color: #ffffff !important;
    border: none !important;
}

button:hover,
.button:hover,
a.button:hover {
    background: #3a8eef !important;
}

/* ==================== */
/* TABLES */
/* ==================== */
table {
    background: #161b22 !important;
}

th {
    background: #1f2937 !important;
    color: #f0f6fc !important;
}

td {
    color: #8b949e !important;
    border-color: #30363d !important;
}

tbody tr:hover {
    background: #2d3748 !important;
}

/* ==================== */
/* MODALS */
/* ==================== */
.modal,
.notification,
guac-modal .notification {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
    color: #f0f6fc !important;
}

/* ==================== */
/* LOGIN PAGE */
/* ==================== */
.login-ui {
    background: #0d1117 !important;
}

.login-dialog {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
}

.login-dialog h1 {
    color: #f0f6fc !important;
}

/* ==================== */
/* FILTRE */
/* ==================== */
.filter,
input[placeholder*="iltre"],
input[placeholder*="Filtre"],
input[placeholder*="Filter"] {
    background: #1f2937 !important;
    border: 1px solid #30363d !important;
    color: #f0f6fc !important;
}

/* ==================== */
/* SCROLLBAR */
/* ==================== */
::-webkit-scrollbar {
    width: 12px;
    background: #0d1117;
}

::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2d3748;
}

/* ==================== */
/* SUPPRIMER EFFETS INDÉSIRABLES */
/* ==================== */
* {
    -webkit-tap-highlight-color: transparent !important;
}

*:focus {
    outline: none !important;
}

a:focus,
button:focus {
    box-shadow: none !important;
}

/* Supprimer le vert */
*[style*="background: green"],
*[style*="background-color: green"],
*[style*="background: #0f0"],
*[style*="background: rgb(0, 255, 0)"] {
    background: #1f2937 !important;
}

/* Classes problématiques */
.highlighted,
.active,
.current {
    background: transparent !important;
}

/* PAGE D'ACCUEIL - Connexions récentes */
.home-connection,
a.home-connection,
div.recent-connections div.connection {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
    border-left: 3px solid #58a6ff !important;
    border-radius: 8px !important;
    color: #f0f6fc !important;
    transition: all 0.2s ease !important;
    padding: 12px !important;
}

/* NEUTRALISER tous les enfants de div.connection sur page d'accueil (SAUF .icon) */
div.recent-connections div.connection *:not(.icon),
div.recent-connections div.connection > div:not(.icon),
div.recent-connections div.connection .caption,
div.recent-connections div.connection .thumbnail,
div.recent-connections div.connection .thumbnail > *:not(.icon) {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Exception pour les thumbnails - remettre leur propre style */
div.recent-connections div.connection .thumbnail {
    display: block !important;
    margin: 0.5em !important;
}

div.recent-connections div.connection .thumbnail > *:not(.icon) {
    border: 1px solid #58a6ff !important;
    background: #000 !important;
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.3) !important;
    max-width: 75% !important;
    display: inline-block !important;
}

/* Exception pour le nom de la connexion - remettre du padding */
div.recent-connections div.connection .name {
    padding: 0.5em !important;
    margin: 0.5em 0 !important;
}

.home-connection.ng-scope:hover,
a.home-connection.ng-scope:hover,
div.recent-connections div.connection:hover {
    background: #1c3a5a !important;
    border: 1px solid #58a6ff !important;
    border-left: 3px solid #58a6ff !important;
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* Icônes sur la page d'accueil - 70% de 48px = 34px */
.home-connection .icon,
div.recent-connections div.connection .icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    background-size: 34px 34px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    filter: brightness(0) invert(0.9) !important;
}

.home-connection:hover .icon,
div.recent-connections div.connection:hover .icon {
    filter: brightness(0) invert(1) !important;
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/* Label/tag denoting the user that shared a connection */
.jdbc-share-tag {

    background: #0095ff;
    padding: 0.25em;

    -moz-border-radius:    0.25em;
    -webkit-border-radius: 0.25em;
    -khtml-border-radius:  0.25em;
    border-radius:         0.25em;

    color: white;
    font-size: 0.75em;
    font-weight: bold;

}
