/*
 * 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;

}
.totp-enroll p,.totp-details{font-size:.8em}.totp-qr-code{text-align:center}.totp-qr-code img{margin:1em;border:1px solid rgba(0,0,0,0.25);box-shadow:1px 1px 2px rgba(0,0,0,0.25);cursor:pointer}h3.totp-details-header{font-size:.8em}h3.totp-details-header::before{content:'▸ '}.totp-details-visible h3.totp-details-header::before{content:'▾ '}.totp-details,.totp-hide-details{display:none}.totp-details-visible .totp-details{display:table}.totp-details-visible .totp-hide-details{display:inline}.totp-details-visible .totp-show-details{display:none}.totp-hide-details,.totp-show-details{color:blue;text-decoration:underline;cursor:pointer;margin:0 .25em;font-weight:normal}.totp-details{margin:0 auto}.totp-details th{padding-right:.25em;text-align:left}.totp-details td{font-family:monospace}.totp-detail{display:inline-block;margin:0 .25em}/*
 * ELPI Espace virtuel : habillage de Guacamole 1.6 (02/10/2026).
 * Couleurs du logo ELPI Santé ; Atkinson Hyperlegible Next pour lire sans erreur les codes à 6 chiffres.
 */
@font-face { font-family: "ELPI Lisible"; src: url("app/ext/elpi-vdi/fonts/ahn-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "ELPI Lisible"; src: url("app/ext/elpi-vdi/fonts/ahn-ext-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "ELPI Lisible"; src: url("app/ext/elpi-vdi/fonts/ahn-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
    --elpi-profond: #0F4F7C;
    --elpi-profond-sombre: #0A3A5C;
    --elpi-colibri: #3FAEE0;
    --elpi-encre: #0B2233;
    --elpi-gris: #4A6275;
    --elpi-brume: #EEF5FA;
    --elpi-trait: #C9D9E5;
    --elpi-erreur: #B3261E;
    --elpi-police: "ELPI Lisible", "Segoe UI", system-ui, sans-serif;
}

body, input, button, select, textarea, .notification, .login-ui, .home-view { font-family: var(--elpi-police); }

/* ---------- Connexion : panneau bleu + formulaire ---------- */

.login-ui {
    display: grid !important;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    background: #fff !important;
    color: var(--elpi-encre);
}

.elpi-panneau {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 1.25rem;
    padding: clamp(2rem, 5vw, 4.5rem);
    background: var(--elpi-profond);
    color: #fff;
}

/* le colibri du logo, très grand, coupé par le bord du panneau */
.elpi-panneau::before {
    content: "";
    position: absolute;
    top: -16%;
    right: -4%;
    width: 84%;
    aspect-ratio: 695 / 718;
    background: url("app/ext/elpi-vdi/images/colibri-ciel.png") no-repeat center / contain;
    pointer-events: none;
}

.elpi-panneau p { position: relative; margin: 0; max-width: 30rem; }

.elpi-panneau .elpi-phrase {
    font-size: clamp(2.1rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    max-width: 13ch;
}

.elpi-panneau .elpi-detail { font-size: 1.05rem; line-height: 1.5; color: #D6E9F5; }

.elpi-panneau .elpi-mention {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.85rem;
    line-height: 1.45;
    color: #A9CBE0;
}

.login-ui .login-dialog-middle {
    display: flex !important;
    align-items: center;
    padding: clamp(2rem, 7vw, 6.5rem);
}

.login-ui .login-dialog {
    width: 100%;
    max-width: 25rem;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    text-align: left;
}

.login-ui .login-dialog .logo {
    width: 10.5rem;
    height: 4.6rem;
    margin: 0 0 2.75rem 0;
    background: url("app/ext/elpi-vdi/images/logo-elpi.png") no-repeat left center / contain;
}

.login-ui .login-dialog .version { display: none; }

.login-ui .elpi-titre {
    text-align: left !important;
    padding: 0 !important;
    margin: 0 0 1.75rem 0 !important;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--elpi-encre);
}

.login-ui .login-dialog p {
    font-size: 0.98rem;
    line-height: 1.5;
    color: var(--elpi-gris);
    margin: 0 0 1.25rem 0;
}

.login-ui .login-fields { margin: 0; }
.login-ui .login-fields .labeled-field { display: block; margin: 0 0 1.15rem 0; }
/* Guacamole place l'intitulé DANS le champ et le cache une fois rempli : ici, un vrai intitulé au-dessus, toujours visible */
.login-ui .login-fields .labeled-field .field-header {
    position: static !important;
    opacity: 1 !important;
    display: block !important;
    padding: 0;
    margin: 0 0 0.4rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--elpi-encre);
}

.login-ui .login-fields input[type="text"],
.login-ui .login-fields input[type="password"] {
    box-sizing: border-box;
    width: 100%;
    height: 3rem;
    margin: 0;
    padding: 0 0.9rem;
    border: 1.5px solid var(--elpi-trait);
    border-radius: 0.5rem;
    background: #fff;
    font-size: 1.05rem;
    color: var(--elpi-encre);
}

.login-ui .login-fields input:focus {
    outline: none;
    border-color: var(--elpi-profond);
    box-shadow: 0 0 0 3px rgba(63, 174, 224, 0.35);
}

.login-ui .buttons { margin: 1.75rem 0 0 0; padding: 0; text-align: left; }

.login-ui .buttons input[type="submit"] {
    width: 100%;
    height: 3.1rem;
    margin: 0;
    border: none;
    border-radius: 0.5rem;
    background: var(--elpi-profond);
    color: #fff;
    font-family: var(--elpi-police);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}

.login-ui .buttons input[type="submit"]:hover { background: var(--elpi-profond-sombre); }
.login-ui .buttons input[type="submit"]:focus-visible { outline: 3px solid var(--elpi-colibri); outline-offset: 2px; }
.login-ui .buttons input[type="submit"]:disabled { opacity: 0.6; cursor: wait; }

/* message d'erreur : en haut de la colonne du formulaire */
.login-ui .login-error {
    position: fixed !important;
    top: 1.25rem;
    right: 1.25rem;
    left: auto !important;
    width: auto;
    max-width: 24rem;
    z-index: 10;
}
.login-ui.error .login-error {
    display: block;
    margin: 0;
    padding: 0.85rem 1.1rem;
    background: #FBEAE9;
    border-left: 4px solid var(--elpi-erreur);
    color: var(--elpi-erreur);
    font-weight: 700;
    font-size: 0.95rem;
}

/* ---------- Code à 6 chiffres (TOTP) ---------- */

/* Guacamole masque le logo à cette étape et pousse le bouton à droite */
.login-ui.continuation .login-dialog .logo { display: block !important; }
.login-ui.continuation .buttons input[type="submit"].continue-login { display: block; width: 100% !important; float: none !important; margin: 0 !important; }
.login-ui .labeled-field-guac-totp .field-header { display: none !important; }

.totp-code-field .totp-enroll p { color: var(--elpi-gris); }

.totp-code-field .totp-qr-code { margin: 0.5rem 0 1.25rem 0; text-align: left; }
.totp-code-field .totp-qr-code img {
    width: 12.5rem;
    height: auto;
    padding: 0.75rem;
    border: 1.5px solid var(--elpi-trait);
    border-radius: 0.6rem;
    background: #fff;
    image-rendering: pixelated;
}

.totp-code-field .totp-details-header { font-size: 0.95rem; font-weight: 700; color: var(--elpi-encre); margin: 0 0 0.5rem 0; }
.totp-code-field .totp-details-header a { margin-left: 0.5rem; color: var(--elpi-profond); text-decoration: underline; font-weight: 400; cursor: pointer; }
.totp-code-field .totp-details { font-size: 0.9rem; color: var(--elpi-gris); }
.totp-code-field .totp-detail { font-family: var(--elpi-police); font-weight: 700; color: var(--elpi-encre); letter-spacing: 0.08em; }

.totp-code-field .totp-code input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    height: 3.4rem;
    padding: 0 1rem;
    border: 1.5px solid var(--elpi-trait);
    border-radius: 0.5rem;
    font-family: var(--elpi-police);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--elpi-encre);
}
.totp-code-field .totp-code input[type="text"]::placeholder { font-size: 1.05rem; font-weight: 400; letter-spacing: 0; color: #8AA2B4; }
.totp-code-field .totp-code input[type="text"]:focus { outline: none; border-color: var(--elpi-profond); box-shadow: 0 0 0 3px rgba(63, 174, 224, 0.35); }

/* ---------- Accueil : bandeau, récentes en vignettes, liste des applications ---------- */

.home-view { position: relative; background: var(--elpi-brume); min-height: 100vh; }
.home-view .connection-list-ui, .home-view .connection-list-ui .header { position: static; }

.elpi-bandeau {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    min-height: 3.5rem;
    box-sizing: border-box;
    padding: 1.1rem 12rem 1.1rem calc(clamp(1.25rem, 4vw, 3rem) + 2.6rem);
    background: var(--elpi-profond) url("app/ext/elpi-vdi/images/colibri-blanc.png") no-repeat clamp(1.25rem, 4vw, 3rem) center / 1.9rem auto;
    color: #fff;
}
.elpi-bandeau .elpi-bandeau-marque { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.elpi-bandeau .elpi-bandeau-aide { font-size: 0.95rem; color: #CFE5F3; }

/* le menu de l'utilisateur monte dans le bandeau, à droite */
.home-view .connection-list-ui .header .user-menu {
    position: absolute;
    top: 0;
    right: clamp(1.25rem, 4vw, 3rem);
    height: 3.5rem;
    display: flex;
    align-items: center;
    margin: 0;
    border: none;
    background: transparent;
    z-index: 5;
}
.home-view .user-menu .menu-dropdown { border: none; background: transparent; color: #fff; }
.home-view .user-menu .menu-dropdown .menu-title { color: #fff; font-weight: 700; font-size: 0.98rem; }
.home-view .user-menu .menu-dropdown:hover,
.home-view .user-menu .menu-dropdown.open { background: var(--elpi-profond-sombre); }
.home-view .user-menu .menu-dropdown .menu-title::before,
.home-view .user-menu .menu-dropdown .menu-indicator { filter: invert(1); }
.home-view .user-menu .menu-contents { color: var(--elpi-encre); border-radius: 0.5rem; overflow: hidden; box-shadow: 0 8px 24px rgba(11, 34, 51, 0.18); }

.home-view .connection-list-ui {
    max-width: 60rem;
    margin: 0 auto;
    padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
}

.home-view .connection-list-ui .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.75rem 0 1rem 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}
.home-view .connection-list-ui .header h2 {
    flex: 1;
    margin: 0;
    padding: 0;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--elpi-encre);
}

.home-view .header .filter { flex: 0 1 17rem; margin: 0; padding: 0; border: none; background: none; }
.home-view .header .filter input.search-string {
    box-sizing: border-box;
    width: 100%;
    height: 2.5rem;
    padding: 0 0.85rem 0 2.2rem;
    border: 1.5px solid var(--elpi-trait);
    border-radius: 0.5rem;
    background-color: #fff;
    background-position: 0.7rem center;
    font-family: var(--elpi-police);
    font-size: 0.95rem;
    color: var(--elpi-encre);
}
.home-view .header .filter input.search-string:focus { outline: none; border-color: var(--elpi-profond); box-shadow: 0 0 0 3px rgba(63, 174, 224, 0.35); }

/* récentes : une grille de vignettes */
.home-view .recent-connections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
    gap: 1rem;
    margin: 0;
    text-align: left;
}
.home-view .recent-connections .placeholder { grid-column: 1 / -1; margin: 0; color: var(--elpi-gris); font-style: normal; }
.home-view .recent-connections .connection { display: block; width: auto; max-width: none; margin: 0; padding: 0; }
.home-view .recent-connections .connection a {
    display: block;
    padding: 0.6rem 0.6rem 0.75rem;
    background: #fff;
    border: 1px solid var(--elpi-trait);
    border-radius: 0.6rem;
    color: var(--elpi-encre);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.home-view .recent-connections .connection a:hover { border-color: var(--elpi-colibri); box-shadow: 0 6px 18px rgba(15, 79, 124, 0.12); }
.home-view .recent-connections .connection a:focus-visible { outline: 3px solid var(--elpi-colibri); outline-offset: 2px; }
.home-view .recent-connections .connection .thumbnail {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    border-radius: 0.35rem;
    background: var(--elpi-profond);
}
.home-view .recent-connections .connection .thumbnail img { width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; object-position: top left; border: none; box-shadow: none; }
.home-view .recent-connections .connection .caption { margin: 0.6rem 0.15rem 0; text-align: left; font-size: 1rem; font-weight: 700; color: var(--elpi-encre); }

/* toutes les applications : une ligne par élément, le bouton d'ouverture du groupe dans la ligne */
.home-view .all-connections { margin: 0; }
.home-view .all-connections .name { font-weight: inherit; }
.home-view .all-connections .caption {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.5rem 0;
    padding: 0 1.1rem;
    min-height: 3.25rem;
    background: #fff;
    border-left: 4px solid var(--elpi-colibri);
    border-radius: 0.4rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.home-view .all-connections .caption:hover { border-left-color: var(--elpi-profond); background: #F7FBFE; }
.home-view .all-connections .caption .icon.expand { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; background-size: contain; opacity: 0.6; cursor: pointer; }
.home-view .all-connections .caption .icon.expand:hover { opacity: 1; }
.home-view .all-connections .caption > ng-include { flex: 1; display: flex; min-width: 0; }
.home-view .all-connections a.home-connection,
.home-view .all-connections a.home-connection-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.25rem;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    color: var(--elpi-encre);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
}
.home-view .all-connections a:focus-visible { outline: 3px solid var(--elpi-colibri); outline-offset: 2px; border-radius: 0.2rem; }
.home-view .all-connections a .icon.type { flex: none; margin: 0; opacity: 0.55; }
.home-view .all-connections .connection-group > .children { margin: 0 0 0.5rem 1.6rem; padding: 0; }
.home-view .all-connections .connection-group > .children .caption { border-left-color: var(--elpi-trait); }
.home-view .all-connections .connection-group > .children .caption:hover { border-left-color: var(--elpi-colibri); }
.home-view .all-connections .connection.active > .caption { border-left-color: #2E8B57; }
.home-view .all-connections .activeUserCount { margin-left: auto; font-size: 0.85rem; font-weight: 400; color: var(--elpi-gris); }

/* ---------- Petits écrans ---------- */

@media (max-width: 820px) {
    .login-ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .elpi-panneau { min-height: 10rem; padding: 1.75rem 1.5rem; }
    .elpi-panneau::before { width: 46%; right: -8%; top: -18%; }
    .elpi-panneau .elpi-phrase { font-size: 1.8rem; max-width: 14ch; }
    .elpi-panneau .elpi-detail, .elpi-panneau .elpi-mention { display: none; }
    .login-ui .login-dialog-middle { padding: 2rem 1.5rem 3rem; align-items: flex-start; }
    .login-ui .login-error { top: auto; bottom: 1rem; right: 1rem; left: 1rem !important; max-width: none; }
}

@media (max-width: 820px) {
    .elpi-bandeau { padding-right: 9rem; }
    .elpi-bandeau .elpi-bandeau-aide { display: none; }
    .home-view .connection-list-ui .header { flex-wrap: wrap; }
    .home-view .header .filter { flex: 1 1 100%; }
    .home-view .recent-connections { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
    .home-view .all-connections .caption, .home-view .recent-connections .connection a { transition: none; }
}
/*
 * ELPI Espace virtuel : menu, paramètres et pages de modification (02/10/2026).
 * Même bandeau que l'accueil, onglets soulignés, sections en cartes, tableaux sobres.
 */

/* ---------- Bandeau du haut sur toutes les pages hors accueil ---------- */

.view > .header {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    box-sizing: border-box;
    margin: 0;
    padding: 0 clamp(1.25rem, 4vw, 3rem) 0 calc(clamp(1.25rem, 4vw, 3rem) + 2.6rem);
    border: none;
    background: var(--elpi-profond) url("app/ext/elpi-vdi/images/colibri-blanc.png") no-repeat clamp(1.25rem, 4vw, 3rem) center / 1.9rem auto;
    box-shadow: none;
}
.view > .header h2 {
    flex: 1;
    margin: 0;
    padding: 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.01em;
    color: #fff;
}
.view > .header .user-menu { margin: 0; border: none; background: transparent; }
.view > .header .user-menu .menu-dropdown { border: none; background: transparent; color: #fff; }
.view > .header .user-menu .menu-dropdown .menu-title { color: #fff; font-weight: 700; font-size: 0.98rem; }
.view > .header .user-menu .menu-dropdown:hover,
.view > .header .user-menu .menu-dropdown.open { background: var(--elpi-profond-sombre); }
.view > .header .user-menu .menu-dropdown .menu-title::before,
.view > .header .user-menu .menu-dropdown .menu-indicator { filter: invert(1); }

/* ---------- Menu de l'utilisateur (toutes les pages) ---------- */

.user-menu .menu-contents {
    min-width: 15rem;
    padding: 0.4rem 0;
    border: 1px solid var(--elpi-trait);
    border-radius: 0.5rem;
    background: #fff;
    color: var(--elpi-encre);
    box-shadow: 0 10px 28px rgba(11, 34, 51, 0.18);
    overflow: hidden;
}
.user-menu .menu-contents .profile { padding: 0.6rem 1rem; border-bottom: 1px solid var(--elpi-trait); }
.user-menu .menu-contents .profile .full-name { font-weight: 700; color: var(--elpi-encre); }
.user-menu .menu-contents .profile .organization,
.user-menu .menu-contents .profile .organizational-role { font-size: 0.85rem; color: var(--elpi-gris); }
.user-menu .menu-contents ul { margin: 0; padding: 0.3rem 0; }
.user-menu .menu-contents ul + ul, .user-menu .menu-contents .page-list + ul { border-top: 1px solid var(--elpi-trait); }
.user-menu .menu-contents li a {
    display: block;
    padding: 0.6rem 1rem 0.6rem 2.6rem;
    background-position: 0.9rem center;
    color: var(--elpi-encre);
    font-size: 0.95rem;
    text-decoration: none;
}
.user-menu .menu-contents li a:hover { background-color: var(--elpi-brume); }
.user-menu .menu-contents li a.current { font-weight: 700; color: var(--elpi-profond); }
.user-menu .menu-contents li a.logout { color: var(--elpi-erreur); }

/* ---------- Onglets ---------- */

.view .page-tabs {
    margin: 0;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    border-bottom: 1px solid var(--elpi-trait);
    background: #fff;
}
.view .page-tabs .page-list ul { display: flex; flex-wrap: wrap; gap: 0 0.25rem; margin: 0; padding: 0; }
.view .page-tabs .page-list li { margin: 0; padding: 0; }
.view .page-tabs .page-list li a {
    display: block;
    margin: 0;
    padding: 0.95rem 0.9rem 0.85rem;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    color: var(--elpi-gris);
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none;
}
.view .page-tabs .page-list li a:hover { color: var(--elpi-encre); background: none; border-bottom-color: var(--elpi-trait); }
.view .page-tabs .page-list li a.current,
.view .page-tabs .page-list li a.current:hover { color: var(--elpi-profond); background: none; border-bottom-color: var(--elpi-profond); }
.view .page-tabs .page-list li.read-only a { opacity: 0.6; }
.view .page-tabs .page-list li a:visited { color: var(--elpi-gris); }
.view .page-tabs .page-list li a.current:visited { color: var(--elpi-profond); }

/* onglets internes (connexions en cours / toutes les connexions) */
.view .section-tabs { margin: 0 clamp(1.25rem, 4vw, 3rem); padding: 0; border-bottom: 1px solid var(--elpi-trait); background: none; }
.view .section-tabs ul { display: flex; gap: 0 0.25rem; margin: 0; padding: 0; }
.view .section-tabs li { margin: 0; padding: 0; list-style: none; }
.view .section-tabs li a { display: block; margin: 0; padding: 0.6rem 0.8rem; border: none; border-bottom: 3px solid transparent; background: none; color: var(--elpi-gris); font-weight: 700; text-decoration: none; cursor: pointer; }
.view .section-tabs li a.current { color: var(--elpi-profond); border-bottom-color: var(--elpi-profond); background: none; }

/* ---------- Fond et largeur du contenu ---------- */

.settings-view, .manage-user, .manage-user-group, .manage-connection, .manage-connection-group, .manage-sharing-profile, .connection-history-player {
    min-height: 100vh;
    background: var(--elpi-brume);
}
.settings-view > :not(.header):not(.page-tabs),
.view[class*="manage-"] > :not(.header):not(.page-tabs) {
    box-sizing: border-box;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}
/* une carte blanche par section ; les titres restent au-dessus, sur le fond */
.settings-view .settings,
.view[class*="manage-"] .section:not(.section .section),
.view[class*="manage-"] .attributes {
    margin: 1.25rem clamp(1.25rem, 4vw, 3rem);
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid var(--elpi-trait);
    border-radius: 0.6rem;
    color: var(--elpi-encre);
}
.view p, .view .settings p { color: var(--elpi-gris); line-height: 1.5; font-size: 0.95rem; }
.view .notice.read-only { margin: 0; padding: 0.75rem 1rem; border-left: 4px solid var(--elpi-colibri); background: var(--elpi-brume); color: var(--elpi-encre); }

/* titres des sections : plus de majuscules ni de barres grises */
.view h2.header, .view:not(.home-view) .header:not(.view > .header) {
    width: auto;
    margin: 1.75rem clamp(1.25rem, 4vw, 3rem) 0;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}
.view h2.header, .view:not(.home-view) .header:not(.view > .header) h2 {
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--elpi-encre);
}
.view .form-header, .view h3 {
    margin: 0 0 0.75rem 0;
    padding: 0;
    font-size: 1.02rem;
    font-weight: 700;
    text-transform: none;
    color: var(--elpi-encre);
    background: none;
    border: none;
}
.view .form + .form { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--elpi-trait); }

/* Guacamole encadre les champs d'une barre grise à gauche */
.view .form .fields, .view .settings .fields, .view table.fields { border-left: none; padding-left: 0; }
.view .settings > p:first-child { margin-top: 0; }

/* formulaires des pages de modification : règles de Guacamole plus précises, d'où la répétition */
.view .attributes .form h3, .view .form h3.form-header { margin: 0 0 0.75rem 0; padding: 0; font-size: 1.02rem; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--elpi-encre); background: none; border: none; }
.view .attributes .form .fields .labeled-field { display: flex; align-items: center; gap: 1rem; margin: 0 0 0.6rem 0; padding: 0; }
.view .attributes .form .fields .labeled-field .field-header { flex: 0 0 15rem; margin: 0; padding: 0; font-size: 0.95rem; font-weight: 700; color: var(--elpi-encre); }
.view .attributes .form .fields, .view .attributes .form { border: none; padding-left: 0; background: none; }
.view .attributes .form + .form { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--elpi-trait); }

/* ---------- Champs ---------- */

.view input[type="text"], .view input[type="password"], .view input[type="email"], .view input[type="number"],
.view input[type="date"], .view input[type="time"], .view input[type="search"], .view select, .view textarea {
    box-sizing: border-box;
    min-height: 2.4rem;
    padding: 0.35rem 0.7rem;
    border: 1.5px solid var(--elpi-trait);
    border-radius: 0.45rem;
    background-color: #fff;
    font-family: var(--elpi-police);
    font-size: 0.95rem;
    color: var(--elpi-encre);
}
.view input:focus, .view select:focus, .view textarea:focus { outline: none; border-color: var(--elpi-profond); box-shadow: 0 0 0 3px rgba(63, 174, 224, 0.35); }
.view input[type="checkbox"], .view input[type="radio"] { width: 1.05rem; height: 1.05rem; accent-color: var(--elpi-profond); vertical-align: middle; }

.view .labeled-field, .view table.properties tr { color: var(--elpi-encre); }
.view .fields .labeled-field { display: flex; align-items: center; gap: 1rem; margin: 0 0 0.6rem 0; }
.view .fields .labeled-field .field-header { flex: 0 0 15rem; margin: 0; padding: 0; font-size: 0.95rem; font-weight: 700; color: var(--elpi-encre); }
.view .fields .labeled-field .form-field { flex: 1; min-width: 0; }
.view table.properties th { padding: 0.45rem 1.5rem 0.45rem 0; font-weight: 700; text-align: left; color: var(--elpi-encre); white-space: nowrap; }
.view table.properties td { padding: 0.35rem 0; }

/* filtre de recherche des listes */
.view .filter { margin: 1rem 0; border: none; background: none; }
.view .filter input.search-string, .view input.search-string {
    width: 100%;
    max-width: 24rem;
    height: 2.5rem;
    padding-left: 2.2rem;
    background-position: 0.7rem center;
}

/* ---------- Boutons ---------- */

.view button, .view a.button, .view input[type="submit"], .view input[type="button"], .notification button, guac-modal button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.5rem;
    margin: 0.25rem 0.5rem 0.25rem 0;
    padding: 0 1.1rem;
    border: none;
    border-radius: 0.45rem;
    background-color: var(--elpi-profond);
    background-position: 0.7rem center;
    color: #fff;
    font-family: var(--elpi-police);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: none;
    box-shadow: none;
    cursor: pointer;
}
.view button:hover, .view a.button:hover, .view input[type="submit"]:hover, .notification button:hover { background-color: var(--elpi-profond-sombre); }
.view button:focus-visible, .view a.button:focus-visible { outline: 3px solid var(--elpi-colibri); outline-offset: 2px; }
.view button:disabled, .view button[disabled] { background-color: #9DB3C4; cursor: not-allowed; }
.view button.danger, .view a.button.danger { background-color: var(--elpi-erreur); }
.view button.danger:hover { background-color: #8E1E18; }
.view button.cancel, .view a.button.cancel { background-color: #fff; color: var(--elpi-encre); border: 1.5px solid var(--elpi-trait); }
.view button.cancel:hover { background-color: var(--elpi-brume); }
.view .action-buttons { margin: 1.25rem clamp(1.25rem, 4vw, 3rem); text-align: left; }
.settings-view .settings .action-buttons { margin: 0.5rem 0 0 0; }
.view button.clone { background-color: #fff; color: var(--elpi-encre); border: 1.5px solid var(--elpi-trait); }
.view button.clone:hover { background-color: var(--elpi-brume); }
.view a.button.add-user, .view a.button.add-user-group, .view a.button.add-connection, .view a.button.add-connection-group, .view a.button.import-connections { padding-left: 2.1rem; }

/* ---------- Tableaux (sessions, historique, utilisateurs, groupes) ---------- */

.view table.sorted, .view table.session-list, .view table.history-list, .view table.user-list, .view table.user-group-list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid var(--elpi-trait);
    border-radius: 0.6rem;
    overflow: hidden;
    font-size: 0.95rem;
}
.view table.sorted th {
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid var(--elpi-trait);
    background: #F6FAFD;
    color: var(--elpi-gris);
    font-weight: 700;
    text-align: left;
    text-transform: none;
}
.view table.sorted th.sort-primary { color: var(--elpi-encre); }
.view table.sorted td {
    padding: 0.7rem 1rem;
    border: none;
    border-bottom: 1px solid #E3EDF4;
    color: var(--elpi-encre);
}
.view table.sorted tr:last-child td { border-bottom: none; }
.view table.sorted tbody tr:hover td { background: #F7FBFE; }
.view table.sorted td a { color: var(--elpi-encre); font-weight: 700; text-decoration: none; }
.view table.sorted td a:hover { color: var(--elpi-profond); text-decoration: underline; }
.view .placeholder, .view p.no-sessions, .view .no-history { color: var(--elpi-gris); font-size: 1rem; font-weight: 400; text-align: center; }

/* pagination */
.view .pager { margin: 1rem 0; color: var(--elpi-gris); }
.view .pager .set-page { color: var(--elpi-profond); font-weight: 700; }
.view .pager .set-page.current { color: var(--elpi-encre); text-decoration: none; }

/* ---------- Arbre des connexions ---------- */

.view .connection-list, .view .group-list, .view .tree-list {
    font-size: 0.98rem;
    color: var(--elpi-encre);
}
.settings-view .connection-list .caption,
.view[class*="manage-"] .group-list .caption,
.settings-view .group-list .caption {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.35rem;
}
.settings-view .group-list .caption:hover,
.view[class*="manage-"] .group-list .caption:hover { background: var(--elpi-brume); }
.settings-view .group-list .caption a,
.view[class*="manage-"] .group-list .caption a { color: var(--elpi-encre); font-weight: 700; text-decoration: none; }
.settings-view .group-list .children,
.view[class*="manage-"] .group-list .children { margin-left: 1.4rem; border-left: 2px solid #E3EDF4; padding-left: 0.4rem; }

/* étiquettes des groupes d'un utilisateur */
.view .related-objects .tags .tag, .view .tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.2rem 0.4rem 0.2rem 0;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--elpi-trait);
    border-radius: 999px;
    background: var(--elpi-brume);
    color: var(--elpi-encre);
    font-size: 0.9rem;
}

/* ---------- Fenêtres d'erreur et de confirmation ---------- */

guac-modal .notification, .global-status-modal .notification, .fatal-page-error, .logged-out-modal .notification {
    max-width: 30rem;
    padding: 1.75rem 2rem;
    border: none;
    border-radius: 0.75rem;
    background: #fff;
    color: var(--elpi-encre);
    box-shadow: 0 18px 48px rgba(11, 34, 51, 0.22);
    font-family: var(--elpi-police);
    text-align: left;
}
guac-modal .notification .title-bar, guac-modal .notification .title { background: none; border: none; padding: 0; margin: 0 0 0.75rem 0; color: var(--elpi-encre); font-size: 1.15rem; font-weight: 700; text-transform: none; }
.fatal-page-error h1 { font-size: 1.3rem; text-transform: none; color: var(--elpi-encre); }
.fatal-page-error p, guac-modal .notification p { color: var(--elpi-gris); line-height: 1.5; }

/* ---------- Petits écrans ---------- */

@media (max-width: 820px) {
    .view .fields .labeled-field { display: block; }
    .view .fields .labeled-field .field-header { margin-bottom: 0.3rem; }
    .settings-view .settings, .view[class*="manage-"] > .section { padding: 1rem; margin: 1rem; }
    .view .page-tabs .page-list ul { flex-wrap: nowrap; overflow-x: auto; }
    .view .page-tabs .page-list li a { white-space: nowrap; }
}

/* l'accueil garde son alignement à gauche */
.home-view .recent-connections .placeholder { text-align: left; }

/* bouton rouge désactivé (Fermer les sessions sans sélection) : gris comme les autres */
.view button.danger:disabled, .view button.danger[disabled] { background-color: #9DB3C4; cursor: not-allowed; }
/*
 * ELPI Espace virtuel : menu pendant une session (Ctrl+Alt+Maj) et vignettes des autres connexions (02/10/2026).
 */

.menu {
    width: 26rem;
    background: #fff;
    box-shadow: 6px 0 28px rgba(11, 34, 51, 0.25);
    color: var(--elpi-encre);
    font-family: var(--elpi-police);
}
.menu, .menu.closed { left: -26rem; }
.menu.open { left: 0; }

/* bandeau du menu : même bleu que le reste de l'espace */
.menu-content .header {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    box-sizing: border-box;
    margin: 0;
    padding: 0 1rem 0 3.4rem;
    border: none;
    background: var(--elpi-profond) url("app/ext/elpi-vdi/images/colibri-blanc.png") no-repeat 1rem center / 1.6rem auto;
    box-shadow: none;
    color: #fff;
}
.menu-content .header h2 {
    flex: 1;
    margin: 0;
    padding: 0;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: none;
    color: #fff;
}
.menu-content .header .menu-dropdown { border: none; background: transparent; color: #fff; }
.menu-content .header .menu-dropdown .menu-title { color: #fff; font-weight: 700; }
.menu-content .header .menu-dropdown:hover,
.menu-content .header .menu-dropdown.open { background: var(--elpi-profond-sombre); }
.menu-content .header .menu-dropdown .menu-title::before,
.menu-content .header .menu-dropdown .menu-indicator { filter: invert(1); }
.menu-content .header .menu-dropdown .menu-contents { color: var(--elpi-encre); }

.menu-body { padding: 1.25rem; background: #fff; }
.menu-section { margin: 0; }
.menu-section h3,
.menu-section ~ .menu-section h3 {
    margin: 0;
    padding: 0 0 0.6rem 0;
    font-size: 1rem;
    font-weight: 700;
    text-transform: none;
    color: var(--elpi-encre);
}
.menu-section ~ .menu-section { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--elpi-trait); }
.menu-section p, .menu-section .description { color: var(--elpi-gris); font-size: 0.92rem; line-height: 1.5; }

.menu textarea, .menu input[type="text"], .menu input[type="number"], .menu input[type="password"], .menu select {
    box-sizing: border-box;
    padding: 0.45rem 0.7rem;
    border: 1.5px solid var(--elpi-trait);
    border-radius: 0.45rem;
    background: #fff;
    font-family: var(--elpi-police);
    font-size: 0.95rem;
    color: var(--elpi-encre);
}
.menu textarea { width: 100%; min-height: 6rem; }
.menu textarea:focus, .menu input:focus, .menu select:focus { outline: none; border-color: var(--elpi-profond); box-shadow: 0 0 0 3px rgba(63, 174, 224, 0.35); }
.menu input[type="checkbox"], .menu input[type="radio"] { accent-color: var(--elpi-profond); }

.menu button, .menu a.button, .menu input[type="submit"], .menu input[type="button"] {
    min-height: 2.4rem;
    padding: 0 1rem;
    border: none;
    border-radius: 0.45rem;
    background-color: var(--elpi-profond);
    color: #fff;
    font-family: var(--elpi-police);
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: none;
    box-shadow: none;
    cursor: pointer;
}
.menu button:hover, .menu a.button:hover { background-color: var(--elpi-profond-sombre); }
.menu button.danger { background-color: var(--elpi-erreur); }

/* zoom : boutons - et + ronds */
#guac-menu #zoom-settings .zoom-ctrl { border-radius: 999px; border: 1.5px solid var(--elpi-trait); background: #fff; color: var(--elpi-encre); }
#guac-menu #zoom-settings input { width: 4.5rem; text-align: center; }

/* périphériques (dossier partagé) */
#guac-menu #devices .device { padding: 0.6rem 0.75rem 0.6rem 2.6rem; border-radius: 0.4rem; background-position: 0.75rem center; }
#guac-menu #devices .device:hover { background-color: var(--elpi-brume); }

/* choix clavier et souris */
#guac-menu #mouse-settings .choice, #guac-menu #keyboard-settings .choice { padding: 0.35rem 0; }
#guac-menu #mouse-settings .figure .caption, #guac-menu #keyboard-settings .caption { color: var(--elpi-gris); font-size: 0.88rem; }

/* liens de partage */
#guac-menu #share-links { padding: 0.75rem 1rem; border-radius: 0.5rem; background: var(--elpi-brume); }
#guac-menu #share-links a[href] { color: var(--elpi-profond); }

/* vignettes des autres connexions ouvertes (bas droite) */
#other-connections .client-panel-handle { background-color: var(--elpi-profond); }
#other-connections .client-panel-handle:hover { background-color: var(--elpi-profond-sombre); }
#other-connections .client-panel-connection { border-radius: 0.4rem; overflow: hidden; box-shadow: 0 4px 14px rgba(11, 34, 51, 0.3); }
#other-connections .client-panel-connection .name { background: rgba(15, 79, 124, 0.85); font-family: var(--elpi-police); }

@media (max-width: 480px) {
    .menu { width: 100%; }
    .menu, .menu.closed { left: -100%; }
}
/*
 * ELPI Espace virtuel : section "Mes documents" de l'accueil (02/10/2026).
 * Mêmes lignes que "Vos applications" ; les dossiers partagés en cartes, les fichiers en liste.
 */

.elpi-documents { margin-top: 0.5rem; }

.home-view .connection-list-ui .elpi-documents-entete { margin-top: 2.25rem; }
.elpi-documents-recherche { flex: 0 1 17rem; margin: 0; }
.elpi-documents-recherche input {
    box-sizing: border-box;
    width: 100%;
    height: 2.5rem;
    padding: 0 0.85rem 0 2.2rem;
    border: 1.5px solid var(--elpi-trait);
    border-radius: 0.5rem;
    background: #fff url("images/magnifier.svg") no-repeat 0.7rem center / 1rem;
    font-family: var(--elpi-police);
    font-size: 0.95rem;
    color: var(--elpi-encre);
}
.elpi-documents-recherche input:focus { outline: none; border-color: var(--elpi-profond); box-shadow: 0 0 0 3px rgba(63, 174, 224, 0.35); }

/* fil d'Ariane */
.elpi-fil { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.35rem; margin: 0 0 0.9rem 0; font-size: 0.98rem; color: var(--elpi-gris); }
.elpi-fil a { color: var(--elpi-profond); font-weight: 700; text-decoration: none; }
.elpi-fil a:hover { text-decoration: underline; }
.elpi-fil .sep { margin: 0 0.35rem; color: #9DB3C4; }
.elpi-fil strong { color: var(--elpi-encre); }

/* dossiers partagés */
.elpi-partages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    gap: 0.6rem;
}
.elpi-partage {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.25rem;
    margin: 0;
    padding: 0 1rem;
    border: 1px solid var(--elpi-trait);
    border-radius: 0.5rem;
    background: #fff;
    color: var(--elpi-encre);
    font-family: var(--elpi-police);
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.elpi-partage:hover { border-color: var(--elpi-colibri); background: #F7FBFE; }
.elpi-partage:focus-visible { outline: 3px solid var(--elpi-colibri); outline-offset: 2px; }
.elpi-partage .nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.elpi-sous-titre { margin: 1.5rem 0 0.6rem 0; font-size: 1.02rem; font-weight: 700; color: var(--elpi-encre); }

/* liste de fichiers et de dossiers */
.elpi-liste { margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--elpi-trait); border-radius: 0.6rem; overflow: hidden; }
.elpi-liste li { margin: 0; padding: 0; border-bottom: 1px solid #E3EDF4; }
.elpi-liste li:last-child { border-bottom: none; }
.elpi-liste button {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr) auto 5.5rem 7.5rem;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    min-height: 3rem;
    margin: 0;
    padding: 0.35rem 1rem;
    border: none;
    background: none;
    color: var(--elpi-encre);
    font-family: var(--elpi-police);
    font-size: 0.97rem;
    text-align: left;
    cursor: pointer;
}
.elpi-liste button:hover { background: #F7FBFE; }
.elpi-liste button:focus-visible { outline: 3px solid var(--elpi-colibri); outline-offset: -3px; }
.elpi-liste button:disabled { cursor: default; opacity: 0.55; }
.elpi-liste button:disabled:hover { background: none; }
.elpi-liste .nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.elpi-liste li.dossier .nom { font-weight: 700; }
.elpi-liste .lieu { min-width: 0; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.88rem; color: var(--elpi-gris); }
.elpi-liste .taille, .elpi-liste .date { font-size: 0.88rem; color: var(--elpi-gris); text-align: right; white-space: nowrap; }
.elpi-liste .lieu:empty { display: none; }

/* icônes : dossier dessiné, fichiers en pastilles de couleur avec leur type */
.elpi-icone { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.elpi-icone.dossier { position: relative; width: 1.7rem; height: 1.25rem; margin-top: 0.2rem; border-radius: 0.2rem; background: var(--elpi-colibri); }
.elpi-icone.dossier::before { content: ""; position: absolute; top: -0.25rem; left: 0; width: 0.75rem; height: 0.4rem; border-radius: 0.15rem 0.15rem 0 0; background: var(--elpi-colibri); }
.elpi-icone.fichier {
    width: 2.2rem; height: 1.6rem;
    border-radius: 0.3rem;
    background: #6E8496;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.elpi-icone.fichier.doc { background: #2B579A; }
.elpi-icone.fichier.xls { background: #217346; }
.elpi-icone.fichier.ppt { background: #C43E1C; }
.elpi-icone.fichier.pdf { background: var(--elpi-erreur); }
.elpi-icone.fichier.img { background: #6B4FA0; }
.elpi-icone.fichier.mail { background: var(--elpi-profond); }

.elpi-documents-vide, .elpi-documents-attente, .elpi-documents-note { margin: 0.5rem 0; color: var(--elpi-gris); font-size: 0.95rem; text-align: left; }
.elpi-documents-message { margin: 0 0 0.9rem 0; padding: 0.75rem 1rem; border-left: 4px solid var(--elpi-erreur); background: #FBEAE9; color: var(--elpi-erreur); font-weight: 700; font-size: 0.95rem; }

@media (max-width: 820px) {
    .elpi-liste button { grid-template-columns: 2.4rem minmax(0, 1fr) auto; }
    .elpi-liste .taille, .elpi-liste .lieu { display: none; }
    .elpi-documents-recherche { flex: 1 1 100%; }
}
