/* ============================================================
   HPR CONSEIL - Personnalisation GLPI
   ============================================================ */


/* ============================================================
   1. COULEURS PRINCIPALES HPR
   ============================================================ */

:root {
    --hpr-navy: #244f8f;
    --hpr-blue: #269bc6;
    --hpr-orange: #f4a000;
    --hpr-light: #edf6fa;
}


/* ============================================================
   2. LOGOS HPR
   ============================================================ */

:root {
    --glpi-logo-light: url("../pics/hpr/logo-hpr.png") !important;
    --glpi-logo-light-reduced: url("../pics/hpr/logo-hpr.png") !important;
    --glpi-logo-dark: url("../pics/hpr/logo-hpr.png") !important;
    --glpi-logo-dark-reduced: url("../pics/hpr/logo-hpr.png") !important;
    --glpi-logo-light-login: url("../pics/hpr/logo-hpr.png") !important;
    --glpi-logo-dark-login: url("../pics/hpr/logo-hpr.png") !important;
}


/* Logo dans le header */
.page .glpi-logo {
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;

    width: 210px !important;
    height: 70px !important;
}


/* Zone contenant le logo */
.navbar-brand {
    background: transparent !important;
    padding: 10px !important;
    border: none !important;
    box-shadow: none !important;
}


/* ============================================================
   3. NAVIGATION
   ============================================================ */

/* Menu latéral */
aside.navbar,
.sidebar,
.navbar-vertical {
    background-color: var(--hpr-navy) !important;
}


/* Navigation supérieure */
.navbar {
    min-height: 72px !important;
}


/* Liens */
aside.navbar a,
.sidebar a,
.navbar-vertical a {
    color: #ffffff !important;
}


/* Élément actif */
aside.navbar .active,
.sidebar .active,
.navbar-vertical .active {
    background-color: rgba(255, 255, 255, 0.10) !important;
}


/* Accent orange HPR */
aside.navbar .active::before,
.sidebar .active::before {
    background-color: var(--hpr-orange) !important;
}


/* Survol */
aside.navbar a:hover,
.sidebar a:hover,
.navbar-vertical a:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}


/* ============================================================
   4. BOUTONS / ACTIONS
   ============================================================ */

.btn-primary {
    background-color: var(--hpr-orange) !important;
    border-color: var(--hpr-orange) !important;
    color: #1f2937 !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #dc9000 !important;
    border-color: #dc9000 !important;
}


/* Liens généraux */
a {
    color: var(--hpr-navy);
}


/* ============================================================
   5. ACCUEIL SELF-SERVICE - BANDEAU
   ============================================================ */

/*
 * Structure vérifiée dans GLPI 11 :
 *
 * .search-banner
 *    .scene-left
 *    .search-banner-content
 *    .scene-right
 */


/* Bandeau compact */
body.helpdesk .search-banner {
    height: 140px !important;
    min-height: 140px !important;
    max-height: 140px !important;

    background: linear-gradient(
        135deg,
        #edf6fa 0%,
        #dcecf3 55%,
        #cfe5ee 100%
    ) !important;

    overflow: visible !important;
    border-bottom: 1px solid rgba(38, 155, 198, 0.20);
}

body.helpdesk .search-banner {
    position: relative;
    z-index: 20;
}

body.helpdesk .search-banner-content {
    position: relative;
    z-index: 21;
}

/* Contenu central du bandeau */
body.helpdesk .search-banner-content {
    padding-top: 12px !important;
    padding-bottom: 0px !important;
    position: relative;
    z-index: 2;
}


/* Titre */
body.helpdesk .search-banner-content h1 {
    font-size: 2rem !important;
    font-weight: 600 !important;
    line-height: 1.10 !important;

    color: #34466b !important;

    margin-top: 0 !important;
    margin-bottom: 12px !important;
}


/* Accent orange HPR sous le titre */
body.helpdesk .search-banner-content h1::after {
    content: "";
    display: block;

    width: 65px;
    height: 4px;

    margin-top: 6px !important;
    margin-left: auto !important;
    margin-right: auto !important;

    background-color: var(--hpr-orange) !important;
    border-radius: 4px;
}


/* Barre de recherche */
body.helpdesk .search-banner-content .form-control,
body.helpdesk .search-banner-content input {
    min-height: 44px !important;
    height: 44px !important;

    border: 1px solid rgba(38, 155, 198, 0.25) !important;
    border-radius: 8px !important;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05) !important;
}


/* Illustrations GLPI plus discrètes */
body.helpdesk .search-banner .scene-left,
body.helpdesk .search-banner .scene-right {
    opacity: 0.35;
}


/* ============================================================
   6. ACCUEIL SELF-SERVICE - CARTES D'ACCÈS RAPIDE
   ============================================================ */

/*
 * Structure vérifiée avec DevTools :
 *
 * .flex-grow-1
 *    > section.card-body
 */


/* Carte */
body.helpdesk .flex-grow-1 > section.card-body {
    min-height: 125px !important;
    padding: 18px 20px !important;

    border-radius: 10px !important;
}


/* Titre */
body.helpdesk .flex-grow-1 > section.card-body .card-title {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
}


/* Texte secondaire */
body.helpdesk .flex-grow-1 > section.card-body .text-secondary {
    line-height: 1.40 !important;
}


/* Conteneur de la carte */
body.helpdesk .flex-grow-1 {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* Survol */
body.helpdesk .flex-grow-1:hover {
    transform: translateY(-3px);
}

/* ============================================================
   8. ACCUEIL SELF-SERVICE - COMPACTAGE VERTICAL
   ============================================================ */

/* Zone des trois accès rapides */
body.helpdesk .tiles-banner {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
    min-height: 0 !important;
}

/* Cartes un peu moins hautes */
body.helpdesk .tiles-banner .flex-grow-1 > section.card-body {
    min-height: 110px !important;
    padding: 16px 18px !important;
}

/* Réduit les marges verticales autour des cartes */
body.helpdesk .tiles-banner .flex-grow-1 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}


/* Réduit l'espace entre les cartes et Tickets en cours */
body.helpdesk .tiles-banner {
    padding-bottom: 0px !important;
    margin-bottom: 0 !important;
}


/* ============================================================
   SELF-SERVICE - Affichage sans débordement
   ============================================================ */

/* Empêche le léger débordement horizontal de la page */
body.helpdesk {
    overflow-x: hidden !important;
}

/* Sécurité pour le conteneur principal */
body.helpdesk #page,
body.helpdesk main {
    max-width: 100% !important;
    overflow-x: hidden !important;
}


/* ============================================================
   SELF-SERVICE - Compactage vertical
   ============================================================ */

/* Bandeau : on descend encore légèrement */
body.helpdesk .search-banner {
    height: 165px !important;
    min-height: 165px !important;
    max-height: 165px !important;
}

/* Titre */
body.helpdesk .search-banner-content h1 {
    font-size: 1.9rem !important;
    margin-bottom: 8px !important;
}

/* Accent HPR */
body.helpdesk .search-banner-content h1::after {
    margin-top: 5px !important;
}

/* Zone des 3 cartes */
body.helpdesk .tiles-banner {
    padding-top: 16px !important;
    padding-bottom: 8px !important;
    margin-bottom: 0 !important;
}

/* Cartes légèrement plus compactes */
body.helpdesk .tiles-banner .flex-grow-1 > section.card-body {
    min-height: 100px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}


/* Rapproche la liste des tickets des cartes */
body.helpdesk .tiles-banner {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Réduit l'espace supérieur de la zone tickets */
body.helpdesk .tickets-banner {
    padding-top: 15px !important;
    margin-top: 0 !important;
}


/* Résultats de recherche toujours au-dessus du reste */
body.helpdesk .search-banner {
    position: relative !important;
    z-index: 1000 !important;
}

body.helpdesk .search-banner-content {
    position: relative !important;
    z-index: 1001 !important;
}

/* Les zones sous le bandeau restent en arrière-plan */
body.helpdesk .tiles-banner,
body.helpdesk .tickets-banner {
    position: relative;
    z-index: 1;
}

/* Accent HPR dans le bandeau d'accueil */
/*body.helpdesk .search-banner::before {
    content: "";
    position: absolute;
    left: 8%;
    top: 68px;

    width: 80px;
    height: 4px;

    background: #f4a000 !important;
    border-radius: 4px;
}
*/

/* Recoloration du trait existant aux couleurs HPR */
body.helpdesk .search-banner::before,
body.helpdesk .search-banner::after {
    background-color: #f4a000 !important;
}


/* ============================================================
   7. SÉLECTEUR D'ENTITÉ
   ============================================================ */

/*
 * On le masque pour l'instant.
 * À désactiver uniquement si tu décides que les utilisateurs
 * Self-Service doivent changer d'entité.
 */
/*
.navbar .entity-selector,
.navbar .entities,
.navbar [class*="entity"] {
    display: none !important;
}
*/
