/* =========================================================
   Corrections responsive finales
   UDC Jura Bernois
   ========================================================= */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body,
.site-page {
    overflow-x: hidden;
}

.container,
.site-header__inner,
.site-main,
.site-footer,
.site-nav,
.site-panorama {
    max-width: 100%;
}

a,
button,
input,
textarea,
select {
    max-width: 100%;
}

img,
svg,
video,
iframe,
embed,
object {
    max-width: 100%;
}

.rich-content,
.news-detail-content,
.election-content,
.content-card,
.card,
.news-card,
.election-card {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.rich-content iframe,
.rich-content video,
.rich-content embed,
.rich-content object,
.news-detail-content iframe,
.news-detail-content video,
.news-detail-content embed,
.news-detail-content object {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    border: 0;
}

.rich-content pre,
.news-detail-content pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 14px;
    background: #eef2ec;
    border: 1px solid #d9e4d2;
    border-radius: 10px;
}

.rich-content code,
.news-detail-content code {
    white-space: normal;
}

.content-card,
.card,
.news-card,
.election-card {
    min-width: 0;
}

.news-card-image img,
.news-detail-image img {
    object-fit: cover;
}

.back-link,
.news-more {
    max-width: 100%;
}

.back-link a,
.news-more a {
    max-width: 100%;
    white-space: normal;
    text-align: center;
}

/* Tablettes */

@media screen and (max-width: 980px) {
    .site-header__logo-link {
        max-width: 780px;
    }

    .site-header__logo-banner {
        max-height: 210px;
    }

    .site-panorama h1,
    .home-intro-text h2,
    .content-card h2,
    .news-detail h2 {
        overflow-wrap: anywhere;
    }

    .nav-list {
        white-space: normal;
    }
}

/* Mobiles */

@media screen and (max-width: 760px) {
    .site-header__inner {
        width: calc(100% - 24px);
        max-width: 100%;
    }

    .site-header__logo-link {
        width: 100%;
        max-width: 100%;
    }

    .site-header__logo-banner {
        width: 100%;
        max-height: 155px;
        object-fit: contain;
    }

    .site-panorama {
        min-height: 130px;
    }

    .site-panorama-overlay {
        min-height: 130px;
        padding: 28px 0;
    }

    .site-panorama h1 {
        max-width: 100%;
        font-size: clamp(26px, 8vw, 34px);
        overflow-wrap: anywhere;
    }

    .site-panorama-kicker {
        overflow-wrap: anywhere;
    }

    .nav-toggle {
        padding-left: 4px;
        padding-right: 4px;
    }

    .nav-list {
        max-height: calc(100vh - 54px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .nav-link {
        width: 100%;
        overflow-wrap: anywhere;
    }

    .site-main {
        overflow-x: hidden;
    }

    .content-card,
    .card,
    .election-card,
    .home-intro-box {
        width: 100%;
        max-width: 100%;
    }

    .content-card h2,
    .card h2,
    .card h3,
    .election-card h3,
    .news-card h3,
    .news-detail h2,
    .home-intro-text h2 {
        overflow-wrap: anywhere;
    }

    .news-card {
        width: 100%;
    }

    .news-card-image {
        max-height: none;
    }

    .news-card-image img {
        width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    .news-card-body {
        min-width: 0;
    }

    .news-chapo,
    .news-detail-chapo {
        overflow-wrap: break-word;
    }

    .news-detail-image {
        width: 100%;
    }

    .rich-content,
    .news-detail-content {
        max-width: 100%;
        overflow-wrap: break-word;
    }

    .rich-content p,
    .news-detail-content p {
        max-width: 100%;
    }

    .rich-content img,
    .news-detail-content img,
    .content-image img {
        max-width: 100%;
        height: auto;
    }

    .rich-content table,
    .news-detail-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        white-space: normal;
    }

    .rich-content table tbody,
    .news-detail-content table tbody {
        display: table;
        width: 100%;
        min-width: 520px;
    }

    .report-table {
        max-width: 100%;
        overflow-x: auto;
    }

    .footer-column {
        overflow-wrap: break-word;
    }
}

/* Petits mobiles */

@media screen and (max-width: 420px) {
    .site-header__inner {
        width: calc(100% - 18px);
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .site-header__logo-banner {
        max-height: 135px;
    }

    .site-panorama {
        min-height: 112px;
    }

    .site-panorama-overlay {
        min-height: 112px;
        padding: 22px 0;
    }

    .site-panorama h1 {
        font-size: clamp(23px, 8vw, 29px);
    }

    .content-card,
    .card,
    .election-card,
    .home-intro-box {
        padding-left: 15px;
        padding-right: 15px;
    }

    .news-card-body {
        padding-left: 15px;
        padding-right: 15px;
    }

    .news-more a,
    .back-link a {
        display: block;
        width: 100%;
    }

    .rich-content table tbody,
    .news-detail-content table tbody {
        min-width: 460px;
    }
}

/* Très petits écrans */

@media screen and (max-width: 340px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .site-header__logo-banner {
        max-height: 118px;
    }

    .site-panorama h1 {
        font-size: 24px;
    }

    .content-card,
    .card,
    .election-card,
    .home-intro-box,
    .news-card-body {
        padding-left: 13px;
        padding-right: 13px;
    }
}