body
{
    background-color: #2A333A;
    padding: 5px;
    box-sizing: border-box;
    min-height: 100vh;

    /* Apply it there so that all items will inherit this property, unless
     * explicitly defined */
    font-family: liberationsans-regular, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.flex-container
{
    display: flex;
    width: 100%;
}

.vertical-flex
{
    flex-direction: column;
}

.tile-section
{
    margin: 5px;
    background-color: #FFFFFF;
    vertical-align: middle;
}

/* --- */

header
{
    width: 100%;
    /*height: 160px;*/
}

/*header .sideLogos > img, header .sideLogos > a > img*/
header .main-logo, header .main-logo img
{
    width: 100%;
    height: auto;
}

section.flex-container > .tile-section
{
    height: 60vh;
}

.icons_overlay
{
    position: relative;
}

.icons_overlay > .inner_icons_overlay
{
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 15;
}

.icons_overlay .left-section, .icons_overlay .right-section
{
    position: -webkit-sticky;
    position: sticky;
    width: 40px;
    border: 10px solid #2A333A;
    pointer-events: auto;
    box-sizing: content-box;

    /* Margin-top is used to set the regular top with no scroll when item is
     * positionned using "sticky" */
    margin-top: 55px;
    top: 15px;
}

.icons_overlay .left-section, .icons_overlay .right-section img
{
    width: 40px;
    height: 40px;
    background-color: #FFFFFF;
}

/* Used to fix rounding errors on background-color property when zooming on
 * mobile devices, causing a white border at the outer side of the block*/
.icons_overlay div.left-section
{
    background-color: #2A333A;
}

/* Used to fix rounding errors on background-color property when zooming on
 * mobile devices, causing a white border at the outer side of the block*/
/* This block was separated to ease code understanding */
.icons_overlay .left-section .block-background-fix
{
    width: 40px;
    height: 40px;
    background-color: #FFFFFF;
}

.icons_overlay .left-section .hamburgerMenu_dropdown,
.icons_overlay .left-section .hamburgerMenu_dropdown button,
.icons_overlay .left-section .hamburgerMenu_dropdown img
{
    width: 100%;
    height: 100%;
    border-radius: 0;
    background-color: transparent;
}

.icons_overlay .hamburgerMenu_dropdown .dropdown-menu
{
    border: 10px solid #2A333A;
    border-radius: 0;
}

.icons_overlay .left-section
{
    /* Trick to remove the very thin vertical line appearing when zooming on chrome mobile.
     * We set "left: 4px; border: 1px" instead of "left: 5px; border: none" */
    margin-left: 4px;
    border-left: 1px solid #2A333A;

    margin-top: 95px;
    transition: all 0.2s ease;
}

/* On desktop devices, move the left menu closer to the title to make it more visible. */
@media (min-width: 950px)
{
    .icons_overlay .left-section.no-scroll
    {
        margin-left: calc(35% - 200px);
        border-left-width: 10px;
    }
}

.icons_overlay .right-section
{
    /* Trick to remove the very thin vertical line appearing when zooming on chrome mobile.
     * We set "right: 4px; border: 1px" instead of "right: 5px; border: none" */
    margin-right: 4px;
    border-right: 1px solid #2A333A;

    /* To align this node to the right. See:
     * https://developer.mozilla.org/fr/docs/Web/CSS/CSS_Flexible_Box_Layout/Aligner_des_%C3%A9l%C3%A9ments_dans_un_conteneur_flexible#Utiliser_les_marges_automatiques_pour_aligner_sur_laxe_principal
     */
    margin-left: auto;

    height: 140px;
}

.icons_overlay .right-section a img
{
    border: 1px solid #6c757d;
}

.icons_overlay .right-section .horizontal-sep
{
    /* Trick to remove the very thin horizontal line appearing when zooming on chrome mobile.
     * We make separator overflow its container */
    position: relative;
    left: -5px;
    width: calc(100% + 10px);
    height: 10px;
    background-color: #2A333A;
    z-index: 10;
}

.header-title-tile
{
    padding: 0 50px;
    width: calc(100% - 10px);
}

.top-desciption-tile
{
    text-align: center;
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 0;
    padding: 5px;
}

.top-desciption-tile > p
{
    line-height: 30px;
    margin: 0;
    padding-top: 20px;
}

.main-title-tile
{
    text-align: center;
    font-size: 5.5em;
    font-family: tahu, "Helvetica Neue", Helvetica, Arial, sans-serif;
    /*margin-top: 0;
    margin-bottom: 0;*/
}

.main-title-tile > p
{
    margin: 0;
    line-height: 150px;
}

.secondary-title-tile
{
    text-align: center;
    font-size: 22px;
    font-weight: 500;
    margin-top: 0;
    padding: 5px;
}

.secondary-title-tile > p
{
    margin: 0;
    line-height: 30px;
    padding-bottom: 20px;
}

.browsing-infoBox
{
    position: relative;
    padding: 0;
    margin: 0;
    border: none;
}

.browsing-infoBox .tile-section
{
    width: 100%;
    min-height: 38px;
}

.browsing-infoBox p
{
    width: 100%;
    margin: 0;
    text-align: center;
    line-height: 38px;
    padding: 0 40px;
}

@media (max-width: 700px) {
    .secondary-title-tile, .top-desciption-tile
    {
        font-size: 18px;
    }

    .main-title-tile
    {
        font-size: 4.5em;
    }

    .main-title-tile > p
    {
        line-height: 100px;
    }

    .icons_overlay .left-section, .icons_overlay .right-section
    {
        /* Margin-top is used to set the regular top with no scroll when item is
         * positionned using "sticky" */
        margin-top: 30px;
    }

    .browsing-infoBox p
    {
        line-height: 28px;
        padding: 10px 40px;
    }
}

.horizontal-imgs
{
    position: relative;
    width: 33%;
    height: calc(100% - 10px);
}

.horizontal-imgs > .inner-img-std,
.horizontal-imgs > .inner-img-overlay,
.horizontal-imgs > .inner-img-halo
{
    position: absolute;
    width: 100%;
    height: 100%;

    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 50%;

    transition: filter 0.3s ease-in-out;
}

.horizontal-imgs > .inner-img-std
{
    z-index: 0;
}

.horizontal-imgs > .inner-img-overlay
{
    z-index: 5;
}

.horizontal-imgs > .inner-img-halo
{
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.horizontal-imgs > .inner-img-halo.showHalo
{
    opacity: 0.9;
}

.horizontal-imgs > .inner-img-overlay:hover
{
    /* A try to implement image halo on hover consisted in using "drop-shadow" on the
     * uppermost image to surround "missing parts" (i.e. transparency) with a color.
     * Unfortunataly, the graphic render was not fluid and the edges of the target image
     * where also colored. The idea was:
     *  filter: drop-shadow(1px 1px 0 #ffc107) drop-shadow(-1px 1px 0 #ffc107)
     *          drop-shadow(-1px -1px 0 #ffc107) drop-shadow(1px -1px 0 #ffc107);
     */
    filter: grayscale(1);
}

.horizontal-imgs:nth-child(1) > .inner-img-std
{
    background-image: url(/sprites/jd_img_presentation_std.png);
}

.horizontal-imgs:nth-child(1) > .inner-img-overlay
{
    background-image: url(/sprites/jd_img_presentation_overlay.png);
}

.horizontal-imgs:nth-child(1) > .inner-img-halo
{
    background-image: url(/sprites/jd_img_presentation_halo.png);
}

.horizontal-imgs:nth-child(2) > .inner-img-std
{
    background-image: url(/sprites/jd_img_desk_std.png);
}

.horizontal-imgs:nth-child(2) > .inner-img-overlay
{
    background-image: url(/sprites/jd_img_desk_overlay.png);
}

.horizontal-imgs:nth-child(2) > .inner-img-halo
{
    background-image: url(/sprites/jd_img_desk_halo.png);
}

.horizontal-imgs:nth-child(3) > .inner-img-std
{
    background-image: url(/sprites/jd_img_pro_std.png);
}

.horizontal-imgs:nth-child(3) > .inner-img-overlay
{
    background-image: url(/sprites/jd_img_pro_overlay.png);
}

.horizontal-imgs:nth-child(3) > .inner-img-halo
{
    background-image: url(/sprites/jd_img_pro_halo.png);
}

.lastSection > .horizontal-imgs > .inner-img-std
{
    background-image: url(/sprites/jd_img_work_std.png);
}

.lastSection > .horizontal-imgs > .inner-img-overlay
{
    background-image: url(/sprites/jd_img_work_overlay.png);
}

.lastSection > .horizontal-imgs > .inner-img-halo
{
    background-image: url(/sprites/jd_img_work_halo.png);
}

.lastSection
{
    flex: 1 1 auto;
    font-size: 22px;
}

.lastSection .horizontal-bottom-tile
{
    width: 67.3%;
/*    padding: 20px;*/

    position: relative;
}

.lastSection .horizontal-bottom-tile p
{
    padding: 20px;
    margin: 0;
}

.lastSection .horizontal-bottom-tile .jd-descr
{
    height: calc(100% - 75px);
}

/* Make the main text block centered and with and with a background image (on desktop
 * devices only)
 */
@media (min-width: 1000px)
{
    .lastSection .horizontal-bottom-tile .jd-descr
    {
        background-image: url(/sprites/bg_tile_left.png),
                          url(/sprites/bg_tile_right.png);
        background-repeat: no-repeat;
        background-size: contain;
        background-position: left 0 top 50%,
                             right 0 top 50%;
        padding: 0 25%;
    }

    .lastSection .horizontal-bottom-tile .jd-descr > p
    {
        position: relative;
        top: 50%;
        transform: translateY(-50%);
    }
}

.lastSection .horizontal-bottom-tile .partners
{
    height: 75px;
    line-height: 35px;
    /* Using "display: flex" for this block would have been simpler, but
     * displaying an item as inline-block (the links) in a flex item (this
     * node) doesn't work in Firefox */
}

/* Since we can't use "display: flex", we do this instead:
 *  - We use "inline-block" to make the "<a>" node fit the size of its content
 *  - We use "inline-block" to make the "<p>" and "<div>" nodes lay side by side
 */
.lastSection .horizontal-bottom-tile .partners p,
.lastSection .horizontal-bottom-tile .partners > div,
.lastSection .horizontal-bottom-tile .partners > div a
{
    height: 100%;
    display: inline-block;
    vertical-align: top;

    /* NOTE: When items are displayed using "inline-block", they behave like
     * texts, so we can center them with "text-align: center"... */
    text-align: center;
}

.lastSection .horizontal-bottom-tile .partners p
{
    margin-right: 3%;
    margin-left: 5px;
    font-weight: 600;
}

.lastSection .horizontal-bottom-tile .partners a
{
    padding: 10px 20px;
}

.lastSection .horizontal-bottom-tile .partners img
{
    height: 100%;
    max-height: 55px;
}

@media (max-width: 950px) {
    section.flex-container
    {
        flex-direction: column;
        height: auto;
    }

    section.flex-container > .tile-section
    {
        min-height: 55vh;
        width: calc(100% - 10px);
    }

    section.flex-container > .tile-section p
    {
        min-height: auto;
    }

    section.flex-container.lastSection
    {
        flex-direction: column-reverse;
        font-size: 18px;
    }

    section.flex-container.lastSection .horizontal-bottom-tile
    {
        width: 100%;
    }

    /* On small devices, the tile showing partners is displayed across (at
     * least) 2 lines*/
    .lastSection .horizontal-bottom-tile .partners
    {
        height: auto;
    }
    .lastSection .horizontal-bottom-tile .partners p
    {
        display: block;
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-left: 0;
        height: auto;
        padding: 10px;
    }
    .lastSection .horizontal-bottom-tile .partners > div
    {
        position: relative;
        left: 50%;
        height: 50%;
        transform: translateX(-50%);
    }
    .lastSection .horizontal-bottom-tile .partners a
    {
        padding: 10px;
    }

    /* Center modal windows on small devices (but remove vertical margin) */
    .modal .modal-dialog
    {
        margin: 0 auto;
    }
}

section.flex-container > .tile-section.legalNotice_banner
{
    width: 100%;
    height: 40px;
    display: flex;
}

section.flex-container > .tile-section.legalNotice_banner a
{
    display: block;
    width: 25%;
    text-align: center;
    line-height: 40px;
    color: #000000;
    font-weight: 600;
}

section.flex-container > .tile-section.legalNotice_banner a:hover
{
    background-color: #CDCDCD;
    text-decoration: none;
}

@media (max-width: 950px) {
    section.flex-container > .tile-section.legalNotice_banner
    {
        display: inline-block;
        width: calc(100% - 10px);
        min-height: 160px;
    }

    section.flex-container > .tile-section.legalNotice_banner a
    {
        width: 100%;
    }
}

@media (min-aspect-ratio: 8/5) and (max-width: 850px)
{
    /* Define this rule later so that it takes precedence over the previous
     * rules handling the same set of items
     */
    section.flex-container > .tile-section
    {
        min-height: 150vh;
    }
}

.workInProgress
{
    width: 100%;
    height: auto;
}

/* --- */

/* Change the style of modal windows */
.modal .modal-content
{
    border-radius: 0;
    padding: 5px;
    background-color: #2A333A;
    color: #FFFFFF;
    opacity: 0.97;
    border: 0;
}

.modal-header, .modal-footer
{
    border: 0;
}

.modal button
{
    border-radius: 0;
}

/* --- */

/* Text/forms customization within modal windows */
.modal p, .modal h5
{
    width: 100%;
    text-align: center;
}

.modal p a
{
    color: #FFFFFF;
    font-weight: 600;
}

.modal form, .modal form label, .modal form input, .modal form textarea,
.modal form .input-hndl-group
{
    width: 100%;
}

.modal form .input-hndl-group
{
    position: relative;
}

.modal form label
{
    margin-top: 12px;
    margin-bottom: 8px;
}

.modal form input, .modal form textarea
{
    border-radius: 0;
    border: 2px solid #FFFFFF;
    color: #FFFFFF;
    background-color: #2A333A;
    padding: 4px 8px;

    /* We must set this to remove the unconsistent margin-bottom for textarea (on Chrome
     * and FF) */
    display: block;
}

.modal form .captcha_block
{
    display: flex;
    margin-bottom: 8px;
}

.modal form .captcha_block > *, .modal form .captcha_block > .input-hndl-group input
{
    height: 40px;
}

.modal form .captcha_block > button:focus
{
    /* Remove default Bootstrap shadow on button focus */
    box-shadow: none;
}

.modal form .captcha_block > img
{
    margin: 0 4px;
}

.modal form .captcha_block .input-hndl-group > input
{
    /* Make input take the remaining space ("flex: auto" means "flex: 1 1 auto") */
    flex: auto;
}

/* Add styling regarding form validation */
.modal form.validationStarted input:invalid, .modal form.validationStarted textarea:invalid
{
    outline: none;
    box-shadow: 0 0 8px red;
}

.modal form .input-err-symbol
{
    display: none;
    pointer-events: none;
    text-align: center;
    color: red;
    font-weight: 500;
    font-size: 25px;
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 100%;
}

.modal form.validationStarted input:invalid + .input-err-symbol,
.modal form.validationStarted textarea:invalid + .input-err-symbol
{
    display: inline;
}

.modal form.validationStarted div.captcha_block span.input-err-symbol
{
    top: 2px;
}

/* Make the "work in progress" image bigger on desktop devices only
 */
@media (min-width: 850px)
{
    #loginModal .modal-dialog
    {
        min-width: 55vw;
    }
}

/* --- */

.infoBox
{
    border: 10px solid #2A333A;
    border-radius: 0;
    background-color: #FFFFFF;

    position: fixed;
    width: 90%;
    max-width: 1000px;
    margin: 50px auto;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

.infoBox > p
{
    margin-bottom: 0;
    text-align: center;
}

.infoBox.legalNotice
{
    bottom: 0;
}

.infoBox.legalNotice.legalNotice_opened
{
    padding: 12px 20px;
}

@media (max-width: 850px)
{
    .infoBox.legalNotice.legalNotice_opened
    {
        overflow-y: scroll;
        margin: 20px auto;
    }
}

.infoBox.legalNotice button.legalNotice_closeBtn
{
    border-radius: 0;
    position: relative;
    color: #FFFFFF;
    background-color: #2A333A;
    font-size: 18px;
    font-weight: 400;
    width: 200px;
    right: 50%;
    transform: translateX(50%);
    margin-top: 30px;
    opacity: 1;
}

#legalNoticeModal b, #personalDataModal b
{
    display: inline-block;
    padding-top: 15px;
    text-decoration: underline;
}

/* --- */

@font-face {
    font-family: 'tahu';
    src: url('fonts/tahu/tahu.eot');
    src: url('fonts/tahu/tahu.eot?#iefix') format('embedded-opentype'),
         url('fonts/tahu/tahu.woff2') format('woff2'),
         url('fonts/tahu/tahu.woff') format('woff'),
         url('fonts/tahu/tahu.ttf') format('truetype'),
         url('fonts/tahu/tahu.svg#tahu') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'liberationsans-regular';
    src: url('fonts/liberationsans-regular/liberationsans-regular.eot');
    src: url('fonts/liberationsans-regular/liberationsans-regular.eot?#iefix') format('embedded-opentype'),
         url('fonts/liberationsans-regular/liberationsans-regular.woff2') format('woff2'),
         url('fonts/liberationsans-regular/liberationsans-regular.woff') format('woff'),
         url('fonts/liberationsans-regular/liberationsans-regular.ttf') format('truetype'),
         url('fonts/liberationsans-regular/liberationsans-regular.svg#liberationsans-regular') format('svg');
    font-weight: normal;
    font-style: normal;
}

