/* ========================================================================== */
/* VARIABLES (ptf/css/bs5/ptf.css overrides)                                  */
/* ========================================================================== */
:root {
    /* From base.css */
    --header-nav-link-color: var(--link-color);
    --header-nav-link-hover-color: white;
    --header-nav-link-hover-bg-color: var(--link-color);

    --header-active-nav-link-bg-color: #0000a0;
    --header-active-nav-link-color: white;

    --navbar-collapse-link-color: var(--dropdown-item-color);
    --navbar-collapse-link-hover-color: var(--dropdown-item-color);
    --navbar-collapse-link-hover-bg-color: var(--dropdown-item-hover-bg-color);
    --navbar-collapse-link-active-color: var(--dropdown-item-color);
    --navbar-collapse-link-active-bg-color: var(--dropdown-item-hover-bg-color);

    --link-color: #0000a0;

    --footer-link-color: #777;
    --footer-link-hover-color: #555;
    --footer-text-color: #777;

    --btn-primary-color: white;
    --btn-primary-bg-color: #0000a0;
    --btn-primary-border-color: #0000a0;
    --btn-primary-hover-color: white;
    --btn-primary-hover-bg-color: #0000a0;
    --btn-primary-hover-border-color: #0000a0;

    --facet-header-bg-color: #0000a0;
    --facet-header-color: white;

    --header-bg-color: #ff8400;

    --header-padding: 0;

    --title-font: "Times New Roman", "Helvetica Neue", Helvetica, Arial, sans-serif;

    --article-title-link-color: #333;

    /* From ptf.css */
    --breadcrumb-color: var(--link-color);
    --breadcrumb-background-color: var(--btn-light-bg-color);
    --breadcrumb-hover-color: var(--link-color);
    --breadcrumb-hover-background-color: var(--btn-light-hover-bg-color);
    --breadcrumb-active-background-color: var(--breadcrumb-color);
}


/* ========================================================================== */
/* COMPONENTS                                                                 */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */
header {
    display: flex;
    align-items: center;
}

header .journal-logo {
    padding-left: 20px;
}

header .journal-logo img {
    height: 100px;
}

.journal-header-content {
    padding-top: 20px;
    padding-bottom: 20px;
    margin-bottom: 0px;
    height: 245px;
    flex-grow: 1;
}

.menu-link.nav-link {
    font-size: 14px;
}

.menu-top {
    border: 0px;
    font-weight: bold;
    display: none;
}

.journal-title {
    color: var(--header-nav-link-color);
}

.journal-title:after {
    display: block;
    clear: both;
    content: "";
}

#navbar-collapse-button {
    color: var(--btn-light-color);
    background-color: var(--btn-light-bg-color);
    border-color: #ced4da;
    margin-right: 20px;
}

/* -------------------------------------------------------------------------- */
/* Search bar                                                                 */
/* -------------------------------------------------------------------------- */
#search-bar {
    padding-top: 0px;
}

#search-bar form {
    padding-left: 5%;
    padding-right: 20%;
}

#line-container {
    padding-left: 0px;
}

#search-input-group>.dropdown-toggle {
    border: 1px solid var(--btn-light-border-color) !important;
}

.search-button {
    display: none;
}

.search-button-div {
    width: 100px;
    padding-right: 0px;
    padding-left: 0px;
}

#search-button-text {
    display: none;
}

#search-group-btn {
    display: none;
}

/* -------------------------------------------------------------------------- */
/* Base                                                                       */
/* -------------------------------------------------------------------------- */
.regular-content {
    margin-left: 0;
    padding-left: 0;
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */
#footer {
    margin-top: 0px;
    padding-top: 15px;
    position: relative;
    height: 209px;
}

.logos-footer {
    margin-bottom: 10px;
    font-size: 12px;
}

.logos-footer a {
    margin-right: 10px;
}

.logos-footer a:last-child {
    margin-right: 0px;
}

.logo-footer {
    height: 30px;
    margin-top: 5px;
    width: auto;
}

.logo-mersenne {
    height: 50px;
}

.footer-text {
    padding-left: 20px;
    padding-top: 15px;
    font-size: 12px;
}

.menu-bottom {
    border: 0px;
    margin-left: 20%;
    margin-bottom: 0px;
}

.menu-bottom .navbar-nav {
    float: left;
}

.menu-bottom .navbar-nav>li {
    float: left;
}

/* -------------------------------------------------------------------------- */
/* Breadcrumb                                                                 */
/* -------------------------------------------------------------------------- */
.article-breadcrumb {
    padding-left: 0px;
    padding-right: 0px;
    right: 0px;
}

.cms-breadcrumb {
    padding-left: 0px;
}

/* -------------------------------------------------------------------------- */
/* Default components                                                         */
/* -------------------------------------------------------------------------- */
#content {
    padding: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
}

.lightbox {
    width: 110px;
    height: 150px;
}

/* TODO Hack that must be resolved by adding variables in base.css */
.btn-primary:active {
    background-color: var(--btn-primary-hover-bg-color);
    border-color: var(--btn-primary-border-color);
}

/* ========================================================================== */
/* PAGES                                                                      */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/* Home page                                                                  */
/* -------------------------------------------------------------------------- */
.recent-articles {
    min-width: 380px;
}

.recent-articles-header {
    margin-top: 0px;
    margin-bottom: 20px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--link-color);
    text-align: center;
}

.article-short {
    font-size: 14px;
}

/* -------------------------------------------------------------------------- */
/* Articles page                                                              */
/* -------------------------------------------------------------------------- */
/* TODO Hack that must be resolved by adding variables in base.css */
.btn-link {
    color: var(--link-color);
}

/* TODO Hack that must be resolved by adding variables in base.css */
.btn-link:hover {
    color: var(--link-hover-color);
}

.nav-tabs>li>a:focus {
    outline: none;
}

.article-tab {
    font-size: 16px;
}

/* TODO Hack that must be resolved by adding variables in base.css */
.nav-pills .nav-link.active {
    background-color: var(--btn-primary-bg-color);
}

/* TODO Hack that must be resolved by adding variables in base.css */
.nav-pills .nav-link {
    color: var(--link-color)
}

/* TODO À garder si on affiche le body_html */
.panel-title>a:hover {
    background-color: #0000a0;
    color: white;
    text-decoration: none;
    outline-style: none;
}

/* TODO À garder si on affiche le body_html */
.panel-title {
    margin-top: 0px;
    line-height: 24px;
}

/* -------------------------------------------------------------------------- */
/* Search results page                                                        */
/* -------------------------------------------------------------------------- */
#sidebar {
    display: none;
    width: 100%;
    padding-top: 0px;
}

#toggle-sidebar {
    display: block;
    margin-bottom: 20px;
}

#results {
    width: 100%;
}

#results hr {
    background-color: var(--link-color);
}

/* -------------------------------------------------------------------------- */
/* Issue-list page                                                            */
/* -------------------------------------------------------------------------- */
.container-flex {
    font-size: 16px;
}

.container-flex>.flex-group .flex-item {
    margin-left: 0px;
    margin-right: 20px;
}

/* ========================================================================== */
/* BOOTSTRAP 5 BREAKPOINT OVERRIDES (min-width, mobile-first)                 */
/* ========================================================================== */

/**
 * This section contains responsive overrides aligned with Bootstrap 5
 * breakpoints. Bootstrap uses a mobile-first approach:
 *
 * - All styles defined OUTSIDE media queries apply to XS devices by default (< 576px).
 * - Media queries use `min-width`, meaning rules apply from the breakpoint upward (inclusive).
 *
 * Rules:
 * - Do NOT define XS styles here; they belong in base/component sections.
 * - Only put overrides that DIFFER from the XS/default behavior.
 * - Prefer variable overrides over selector overrides when possible.
 * - Keep component-specific rules grouped within each breakpoint.
 *
 * Notes on `revert`:
 * - The `revert` keyword restores the value defined earlier in the cascade
 *   (typically ptf base styles or browser defaults if none exist).
 * - Use sparingly and only when explicitly undoing an XS or component rule*
 */

/* -------------------------------------------------------------------------- */
/* SM (≥ 576px) → Small devices (phone landscape)                             */
/* -------------------------------------------------------------------------- */
@media all and (min-width: 576px) {
    header .journal-logo img {
        height: 150px;
    }

    #search-button-text {
        display: revert;
    }

    #footer {
        height: 189px;
    }

    .logo-footer {
        height: 35px;
        margin-top: revert;
    }
}

/* -------------------------------------------------------------------------- */
/* MD (≥ 768px) → Tablets                                                     */
/* -------------------------------------------------------------------------- */
@media all and (min-width: 768px) {
    #search-bar {
        padding-top: 5px;
    }

    #footer {
        height: 149px;
    }

    #sidebar {
        display: block;
        width: 250px;
    }

    #toggle-sidebar {
        display: none;
    }

    #results {
        width: calc(100% - 250px);
    }
}

/* -------------------------------------------------------------------------- */
/* LG (≥ 992px) → Desktops                                                    */
/* -------------------------------------------------------------------------- */
@media all and (min-width: 992px) {
    header .journal-logo img {
        height: 200px;
    }

    .menu-top {
        display: revert;
    }

    .journal-title:after {
        display: revert;
        clear: revert;
        content: revert;
    }

    #search-bar {
        padding-top: revert;
    }

    #search-group-btn {
        display: revert;
    }

    .regular-content {
        margin-left: 8%;
        /* Revert doesn't work there */
        padding-left: calc(var(--bs-gutter-x) * .5);
    }

    .logos-footer a {
        margin-right: 5%;
    }

    .logo-footer {
        height: 45px;
    }

    .logo-mersenne {
        height: 60px;
    }

    .footer-text {
        padding-left: 50px;
    }
}

/* -------------------------------------------------------------------------- */
/* XL (≥ 1200px) → Large desktops                                             */
/* -------------------------------------------------------------------------- */
@media all and (min-width: 1200px) {
    .article-breadcrumb {
        right: 18%;
    }

    .cms-breadcrumb {
        padding-left: revert;
    }

    .regular-content {
        margin-left: revert;
    }

    .logos-footer a {
        margin-right: 7%;
    }

    .footer-text {
        padding-left: 15%;
    }
}

/* -------------------------------------------------------------------------- */
/* XXL (≥ 1400px) → Very large screens                                        */
/* -------------------------------------------------------------------------- */
@media all and (min-width: 1400px) {}