:root {
    --blue: #428bca;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background: #fff;
}

.header-main {
    display: block !important;
}

.header-main img {
    width: 100%;
}

.blog-masthead {
    z-index: 1000;
    transition: box-shadow .2s ease, transform .2s ease;
}

.blog-masthead-fixed {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .16);
}

body.has-fixed-topbar {
    padding-top: 50px;
}

.blog-nav > .blog-nav-item:first-child .navbar-logo {
    width: 0;
    max-width: none;
    height: 32px;
    margin: -7px 0 -7px;
    opacity: 0;
    transform: translateX(-10px);
    transition: width .25s ease, opacity .2s ease, transform .25s ease;
}

.blog-masthead-logo-visible .blog-nav > .blog-nav-item:first-child .navbar-logo {
    width: 90px;
    opacity: 1;
    transform: translateX(0);
}

.tags {
    margin: 24px 0;
}

.public-row {
    margin: 0;
}

.article-card-column {
    padding: 0;
    cursor: pointer;
}

.liste-articles-article {
    box-shadow: 1px 1px 5px #cccccca6;
    border-radius: 8px;
}

.liste-articles-article-image {
    border-radius: 8px 8px 0 0;
}

.liste-articles-article a:hover {
    text-decoration: none;
}

.liste-articles-article-other-titre {
    font-size: 12px;
    font-weight: lighter;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-menu {
    top: calc(100% - 2px);
    min-width: 290px;
    padding: 7px;
}

.nav-dropdown-menu-training {
    min-width: 420px;
}

.nav-dropdown-menu-ai {
    min-width: 585px;
}

.nav-dropdown-menu-applications {
    min-width: 610px;
}

.nav-dropdown-menu-right {
    right: 0;
    left: auto;
}

.nav-dropdown-menu a {
    display: block;
    padding: 9px 12px;
    white-space: nowrap;
}

.nav-dropdown-menu a .glyphicon {
    width: 24px;
    margin-right: 8px;
    color: #61a2d9;
    text-align: center;
}

.nav-dropdown-menu .nav-featured-link,
.nav-dropdown-menu .nav-featured-link .glyphicon,
.nav-ai-link,
.nav-ai-link .glyphicon {
    color: #f32b29;
}


.nav-dropdown-menu a:hover {
    background: #f5f5f5;
}

.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu {
    display: block;
}

.lead-magnet {
    border: 3px dashed silver;
    margin: 12px 0;
    padding: 8px;
    font-size: 12px;
    background: #feffe9;
    text-align: center;
}

.lead-magnet-heading {
    text-align: center;
    margin-bottom: 8px;
}

.lead-magnet-heading > span {
    font-size: 23px;
    font-weight: bold;
}

.lead-magnet-heading small {
    font-size: 12px;
}

.lead-magnet-cover {
    text-align: center;
}

.lead-magnet-cover img {
    max-width: 100%;
}

.lead-magnet-field {
    min-height: 42px;
}

.lead-magnet-field::before,
.lead-magnet-field::after {
    display: table;
    content: "";
}

.lead-magnet-field::after {
    clear: both;
}

.lead-magnet-consent {
    text-align: left;
    font-size: 12px;
}

.lead-magnet .btn {
    margin-bottom: 0;
}

.search-form {
    display: flex;
}

.search-form input {
    min-width: 0;
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
}

.search-form button {
    border: 0;
    padding: 10px 18px;
    color: #fff;
    background: var(--blue);
}

.sidebar-section-header {
    background: #f7f7f7;
    border-radius: 4px;
}

.sidebar h3 {
    background: #f7f7f7;
}

.sidebar-module {
    padding: 0 10px;
    margin: 0 -15px;
}

.sidebar-search {
    padding-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 8px 8px 0;
}

.social-links img {
    width: 18px;
    max-height: 18px;
    object-fit: contain;
}

.emissions {
    padding-bottom: 12px;
}

.youtube-subscribe {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 181px;
    margin: 8px 0 10px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #333;
    background: #fff;
}

.youtube-subscribe:hover {
    text-decoration: none;
    background: #f8f8f8;
}

.youtube-subscribe > img {
    width: 30px;
    margin: 0;
}

.youtube-subscribe span {
    display: grid;
    line-height: 1.25;
}

.youtube-subscribe small {
    color: #777;
}

.toc-sticky {
    padding: 20px 10px; margin: 0px -15px; position: fixed; top: -491px; width: 188px;
}

@media (max-width: 767px) {
    .toc-section {
        position: static;
        max-height: none;
        overflow: visible;
    }
}

.form {
    display: grid;
    gap: 10px;
}

.form label {
    display: grid;
    gap: 4px;
}

.form input,
.form textarea {
    width: 100%;
    padding: 9px;
    border: 1px solid #ddd;
}

.form button {
    border: 0;
    padding: 10px;
    color: #fff;
    background: var(--blue);
}

.form .consent {
    grid-template-columns: auto 1fr;
    align-items: start;
    font-size: 12px;
}

.form .consent input {
    width: auto;
}

.article-content {
    min-width: 0;
    overflow-wrap: anywhere;
}

.article-content img {
    cursor: zoom-in;
}

.article-content iframe {
    max-width: 100%;
}

.article-content table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
}

.admin-edit-article {
    margin: 15px 0;
    text-align: right;
}

.admin-edit-article a {
    display: inline-block;
    padding: 8px 14px;
    color: #fff;
    background: #8d2020;
    border-radius: 4px;
}

.pagination {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 30px 0;
}

.pagination a {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
}

.image-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 30px;
    background: rgba(0, 0, 0, .82);
    cursor: zoom-out;
}

.image-overlay img {
    width: auto;
    max-width: 95vw;
    height: auto;
    max-height: 92vh;
    margin: 0;
    background: #fff;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .blog-nav-item {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 12px;
    }

    .blog-nav-item-glyphicon {
        margin-right: 3px;
        font-size: 14px;
    }
}



/* Administration */
.admin {
    background: #f4f4f4;
}

.admin-nav {
    display: flex;
    gap: 5px;
    padding: 12px;
    background: #8d2020;
}

.admin-nav a {
    padding: 10px;
    color: #fff;
}

.admin-main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 25px;
    background: #fff;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 9px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.admin-form textarea,
.admin-form input,
.admin-form select,
.csv-export {
    width: 100%;
}

.admin-form textarea,
.csv-export {
    font-family: Consolas, monospace;
}

.admin-form label {
    display: block;
    margin-bottom: 14px;
    font-weight: 700;
}

.admin-article-form {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px 16px;
}

.admin-article-form .admin-field {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 0;
}

.admin-article-form .admin-field > input,
.admin-article-form .admin-field > select,
.admin-article-form .admin-field > textarea,
.admin-article-form .admin-field > datalist,
.admin-article-form .admin-field > small,
.admin-article-form .admin-field > div {
    grid-column: 2;
}

.admin-article-form .admin-field-date input {
    max-width: 230px;
}

.admin-article-form .form-actions {
    grid-column: 1 / -1;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    margin-top: 5px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font: inherit;
}

.admin-form small {
    display: block;
    margin-top: 4px;
    color: #777;
    font-weight: 400;
}

.admin-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.admin-upload-row input {
    margin-top: 0;
}

.admin-upload-row button {
    padding: 8px 12px;
    white-space: nowrap;
}

.admin-resource-modal[hidden] {
    display: none;
}

.admin-resource-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.45);
}

.admin-resource-dialog {
    width: min(1100px, 96vw);
    height: min(780px, 92vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.admin-resource-dialog header,
.admin-resource-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #ddd;
}

.admin-resource-dialog header {
    justify-content: space-between;
    background: #f5f5f5;
}

.admin-resource-dialog header button {
    font-size: 24px;
    line-height: 1;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.admin-resource-upload-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr auto 1.2fr auto;
    gap: 10px;
    align-items: end;
    padding: 12px 14px;
    border-bottom: 1px solid #ddd;
    background: #fafafa;
}

.admin-resource-upload-grid label {
    margin: 0;
}

.admin-resource-upload-grid small {
    grid-column: 1 / -1;
    min-height: 18px;
}

.admin-resource-dropzone {
    margin: 12px 14px;
    padding: 18px;
    color: #59708a;
    text-align: center;
    border: 2px dashed #9eb6cf;
    border-radius: 6px;
    background: #f8fbff;
}

.admin-resource-dropzone.is-dragover {
    color: #174f86;
    border-color: #2f80c8;
    background: #eaf5ff;
}

.admin-resource-dropzone-main {
    margin: 8px 0;
}

.admin-resource-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #d5e3f3;
    border-radius: 6px;
    background: #f8fbff;
}

.admin-resource-preview[hidden] {
    display: none;
}

.admin-resource-preview img {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
}

.admin-resource-file-paths {
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #e4d7a2;
    border-radius: 6px;
    background: #fffbea;
}

.admin-resource-file-paths code,
#resource-upload-status code,
#resource-main-status code {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 4px;
    color: #7a4b00;
    background: #fff4c8;
}

.admin-resource-body {
    min-height: 0;
    display: grid;
    grid-template-columns: 260px 1fr;
    flex: 1;
}

#resource-directories {
    overflow: auto;
    padding: 10px;
    background: #e9eef3;
    border-right: 1px solid #ccd5dd;
}

#resource-files {
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    align-content: start;
    gap: 14px;
    padding: 16px;
}

.admin-resource-directory,
.admin-resource-file {
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.admin-resource-directory {
    display: block;
    width: 100%;
    padding: 6px 8px;
    border-radius: 4px;
}

.admin-resource-directory:hover {
    background: #d5e3f3;
}

.admin-resource-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 130px;
    padding: 8px;
    word-break: break-word;
    text-align: center;
    border-radius: 6px;
}

.admin-resource-file:hover {
    background: #f0f6ff;
}

.admin-resource-file img {
    max-width: 115px;
    max-height: 90px;
    object-fit: contain;
}

.admin-resource-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    color: #555;
    border: 1px solid #ddd;
    background: #f7f7f7;
}

.admin-form .check {
    display: grid;
    align-items: center;
    grid-template-columns: 140px auto;
    gap: 16px;
}

.admin-form .check input {
    width: auto;
    margin-top: 0;
    grid-column: 2;
}

.form-actions {
    display: flex;
    gap: 12px;
}

.danger-button {
    background: #b52a2a !important;
}

.button-link {
    display: inline-block;
    padding: 10px 18px;
    color: #fff;
    background: #555;
}

.admin-comment {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.admin-comment small {
    margin-left: 8px;
    color: #777;
}

.login-box {
    max-width: 480px;
    margin: 40px auto;
}

@media (max-width: 767px) {
    .header-main {
        display: none !important;
    }

    .navbar-collapse {
        width: 100%;
    }

    .navbar-header {
        min-height: 60px;
    }

    .navbar-header .navbar-logo {
        width: 34px;
        height: 34px;
        margin: -42px auto 0;
    }

    .blog-nav-item,
    .nav-dropdown {
        width: 100% !important;
    }

    .nav-dropdown > .blog-nav-item {
        display: block;
    }

    .nav-dropdown:hover > .nav-dropdown-menu,
    .nav-dropdown:focus-within > .nav-dropdown-menu {
        display: none;
    }

    .nav-dropdown.open > .nav-dropdown-menu {
        position: static;
        display: block;
        float: none;
        min-width: 0;
        margin: 0;
        border: 0;
        box-shadow: none;
    }

    .nav-dropdown-menu a {
        white-space: normal;
    }

    .lead-magnet-cover img {
        width: 70px;
        margin: 8px auto 12px;
    }

    .lead-magnet .control-label {
        text-align: left;
    }

    .lead-magnet-field {
        min-height: 0;
        margin-bottom: 10px;
    }

    .blog header {
        height: 220px;
    }

    .blog header .blog-title h1 {
        font-size: 24px;
    }

    .blog .blog-content {
        margin: 20px 0;
        padding: 0 10px;
    }

    .blog img {
        max-width: 100%;
        margin: 15px auto;
    }

    .article-content > *:not(table) {
        max-width: 100% !important;
    }
}
