/**
 * authors      Arnaud Gazda <arnaud.gazda@atos.net>
 * copyright    2025 Bull S.A.S. - All rights reserved
 *              This is not Free or Open Source software
 *              Please contact BULL SAS for details about its license
 *              Bull - Rue Jean Jaurès - B.P. 68 - 78340 Les Clayes-sous-Bois
 *
 * Overview
 * ========
 * Define CSS style for the sphinx documentation of both myQLM, Qaptiva, and Qaptiva HPC
 * This file define the color of the left panel containing the Eviden shape and Eviden
 * colors.
 */

/**
 * Import product information.
 * This file is autogenerated so the content of this file cannot be inlined
 *
 * This file provide two CSS variables
 *   - "--product-name"
 *   - "--product-version"
 */

@import url("./product.css");


/**
 * Define all colors of the Eviden color scheme
 *
 * The CSS colors of Eviden are defined on the company brand portal.
 */

* {
    /* Colors */
    --eviden-orange-raw: 255, 109, 67;
    --eviden-orange: rgb(255, 109, 67);
    --eviden-deepblue: rgb(0, 45, 60);
    --eviden-gray: rgb(236, 236, 237);
    --eviden-black: rgb(0, 0, 0);
    --eviden-white: rgb(255, 255, 255);
}


/**
 * Style of the left panel.
 * This panel should match Eviden colors
 */

/* Background */
.wy-side-nav-search, .wy-nav-side, .wy-nav-top {
    background: var(--eviden-orange);
}

/* Text */
.wy-side-nav-search .icon.icon-home,
.wy-nav-top a,
.wy-nav-top i,
.wy-menu .caption-text,
.wy-menu a {
    color: var(--eviden-black);
}

/* Hover */
.wy-menu a:hover {
    background: var(--eviden-deepblue);
    color:  var(--eviden-white);
}

/* Remove the max-width limit from the doc - ensure the doc fill the whole page */
.wy-nav-content {
    max-width: none !important;
    min-height: 100vh;
}


/**
 * Style of 'autonotebook' boxes
 *
 * The box is defined by the following pattern:
 *
 *     details.related-notebooks
 *       summary
 *       div
 *         a
 *           i
 *           p
 */

details.related-notebooks {
    display: block;
    margin: 20px 0 20px 0;
    padding: 5px;
    border-radius: 2px;
    color: white;
    background: rgba(63, 128, 186, 0.75);
}

details.related-notebooks > div {
    display: grid;
    overflow: auto;
}

details.related-notebooks > div > a {
    display: block;
    margin: 10px 20px;
    color: white;
}

details.related-notebooks > div > a:hover {
    color: lightgray;
}

details.related-notebooks > div > a > p {
    margin: 0;
    font-size: 20px;
    display: inline;
}

details.related-notebooks > div > a > i {
    display: inline !important;
    font-size: 20px;
    margin-right: 5px;
}


/* Notebook links present in the QLMaaS documentation */
.qlmaas-link {
    position: relative;
}

.qlmaas-link:hover::after {
    content: "This QLMaaS documentation does not support notebooks for now.\AIt can however be opened from the Qaptiva documentation if you have access to it.";
    white-space: break-spaces;
    display: block;
    position: absolute;
    box-shadow: 1px 1px 4px black;
    background: bisque;
    color: black;
    padding: 10px;
    border-left: 5px solid salmon;
    box-shadow: 1px 1px 4px black;
    z-index: 2;
}


/**
 * Add a new CSS class used to display a use case. This style changes the background
 * of the card, by using a nice gradient color
 */
.qaptiva-use-case {
    background: linear-gradient(45deg, rgba(var(--eviden-orange-raw), 0.5), rgba(var(--eviden-orange-raw), 0.2));
    border: 0 !important;
}


/**
 * Display version in documentation
 * The version is display bellow the image on the left panel
 *
 * The version is prodivded by a variable defined in "product.css"
 */

.icon-home:has(img)::after {
    color: var(--eviden-deepblue);
    content: var(--product-version);

    opacity: 0.7;
    font-weight: normal;
}
