:root {
    /* Tokens publics conserves comme contrat, sans autorite visuelle dans le shell minimal. */
    --core-v2-max-width: 1200px;
    --core-v2-reading-width: 72rem;
    --core-v2-rail-width: 19rem;
    --core-v2-space-1: 0.25rem;
    --core-v2-radius-lg: 1.5rem;
    --core-v2-shadow-md: 0 18px 48px rgba(15, 23, 42, 0.1);
    --core-v2-surface: #ffffff;
    --zblobul-color-accent: #0ea5e9;
    --zblobul-color-surface: #f3f4f6;
    --core-v2-text: #1f2937;
    --core-v2-transition: 180ms ease;
}

html[data-core-shell="v2"] {
    scroll-behavior: auto;
}

body.core-shell-v2 {
    min-height: 100vh;
    color: inherit;
}

body.core-shell-v2 :focus-visible {
    outline: 3px solid var(--zblobul-color-accent);
    outline-offset: 2px;
}

body.core-shell-v2 .core-header__inner {
    background-color: #fff;
}

body.core-shell-v2 #page.core-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.core-shell-v2 #header.core-header {
    min-width: 0;
}

body.core-shell-v2 #container.core-page__container {
    flex: 1 0 auto;
    clear: none;
    position: relative;
    padding-bottom: 0;
}

body.core-shell-v2 #footer.core-footer {
    position: static;
    flex: 0 0 auto;
}

body.core-shell-v2 .bandeau.core-hero {
    display: block;
}

body.core-shell-v2 .row.core-layout {
    min-width: 0;
}

body.core-shell-v2 .core-layout__rail,
body.core-shell-v2 .core-layout__aside,
body.core-shell-v2 .core-layout__footer,
body.core-shell-v2 .content.core-layout__main {
    min-width: 0;
}

body.core-shell-v2 .core-layout__footer {
    box-sizing: border-box;
}

body.core-shell-v2 .core-layout__content {
    min-width: 0;
	border-radius: var(--core-radius-lg, 0);
}

body.core-shell-v2 .core-layout__rail > .nav_left {
    float: none;
    width: 100%;
}

body.core-shell-v2 .core-header__toggle {
    display: inline-flex;
}

body.core-shell-v2 .content.core-layout__main {
    clear: none;
	border-radius: var(--core-radius-lg, 0);
}

body.core-shell-v2 .content > section,
body.core-shell-v2 .content > article,
body.core-shell-v2 .right_col,
body.core-shell-v2 .content_footer,
body.core-shell-v2 .content_footer > * {
    box-sizing: border-box;
}

body.core-shell-v2 .core-header__toggle::before {
    display: none;
}

body.core-shell-v2 .core-header__nav {
    display: none;
}

body.core-shell-v2 #header.core-header #top_bar > .core-account,
body.core-shell-v2 #header.core-header #top_bar .core-account__toggle {
    margin-block: 0;
}

/* Les commandes restent visibles et atteignables au clavier/souris, même sans
 * survol du diaporama. */
body.core-shell-v2 #bloc_accueil .camera_prev,
body.core-shell-v2 #bloc_accueil .camera_next,
body.core-shell-v2 #bloc_accueil .camera_commands,
body.core-shell-v2 #bloc_accueil .camera_pag {
    opacity: 1 !important;
    pointer-events: auto;
    z-index: 20;
}

body.core-shell-v2.core-nav-open .core-header__nav {
    display: block;
}

body.core-shell-v2 .content_footer > * {
    width: 100%;
    max-width: 100%;
}

body.core-shell-v2 .core-footer__main,
body.core-shell-v2 .core-footer__credits-nav {
    display: block;
}

body.core-shell-v2 .camerarelative .desc_diapo,
body.core-shell-v2 .camera_caption .desc_diapo {
    box-sizing: border-box;
    width: min(calc(100% - 2rem), 46rem);
    max-width: 46rem;
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
}

body.core-shell-v2 .camerarelative .desc_diapo p,
body.core-shell-v2 .camera_caption .desc_diapo p {
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
}

body.core-shell-v2 .camerarelative > .align_left > div,
body.core-shell-v2 .camerarelative > .align_center > div,
body.core-shell-v2 .camerarelative > .align_right > div,
body.core-shell-v2 .camerarelative > .event > div {
    box-sizing: border-box;
    width: min(calc(100% - 2rem), 60rem);
}

body.core-shell-v2 #bloc_accueil .camerarelative > .align_left,
body.core-shell-v2 #bloc_accueil .camerarelative > .align_center,
body.core-shell-v2 #bloc_accueil .camerarelative > .align_right,
body.core-shell-v2 #bloc_accueil .camerarelative > .event {
    box-sizing: border-box;
}

body.core-shell-v2 .camerarelative > .align_left > div {
    margin-right: auto;
    margin-left: clamp(1rem, 6vw, 5rem);
}

body.core-shell-v2 .camerarelative > .align_center > div,
body.core-shell-v2 .camerarelative > .event > div {
    margin-right: auto;
    margin-left: auto;
}

body.core-shell-v2 .camerarelative > .align_right > div {
    margin-right: clamp(1rem, 6vw, 5rem);
    margin-left: auto;
}

body.core-shell-v2 .camerarelative > .align_left,
body.core-shell-v2 .camerarelative > .align_left .title_diapo,
body.core-shell-v2 .camerarelative > .align_left .desc_diapo,
body.core-shell-v2 .camerarelative > .align_left .desc_diapo p {
    text-align: left;
}

body.core-shell-v2 .camerarelative > .align_right,
body.core-shell-v2 .camerarelative > .align_right .title_diapo,
body.core-shell-v2 .camerarelative > .align_right .desc_diapo,
body.core-shell-v2 .camerarelative > .align_right .desc_diapo p {
    text-align: right;
}

body.core-shell-v2 .camerarelative > .align_left .desc_diapo,
body.core-shell-v2 .camerarelative > .align_left .desc_diapo p {
    margin-right: auto;
    margin-left: 0;
}

body.core-shell-v2 .camerarelative > .align_right .desc_diapo,
body.core-shell-v2 .camerarelative > .align_right .desc_diapo p {
    margin-right: 0;
    margin-left: auto;
}

@media (min-width: 768px) {
    body.core-shell-v2 .camerarelative > .align_left > div,
    body.core-shell-v2 .camerarelative > .align_right > div {
        width: min(calc(100% - 2rem), 38rem);
        padding: clamp(0.9rem, 2vw, 1.5rem) clamp(1rem, 2.5vw, 1.75rem);
        border-radius: 0.35rem;
        background: rgba(8, 27, 39, 0.68);
        box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.22);
        backdrop-filter: blur(2px);
    }

    body.core-shell-v2 .camerarelative > .align_left > div {
        border-left: 0.25rem solid var(--zblobul-color-accent);
    }

    body.core-shell-v2 .camerarelative > .align_right > div {
        border-right: 0.25rem solid var(--zblobul-color-accent);
    }

    body.core-shell-v2 .camerarelative > .align_left .desc_diapo,
    body.core-shell-v2 .camerarelative > .align_right .desc_diapo {
        width: 100%;
        max-width: none;
    }

    body.core-shell-v2 .camerarelative > .align_left .desc_diapo a,
    body.core-shell-v2 .camerarelative > .align_right .desc_diapo a {
        margin: clamp(0.75rem, 2vw, 1.25rem) 0 0;
    }
}

body.core-shell-v2 [id^="bloc_social"] .bloc_content {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(18rem, 2fr);
    grid-template-areas:
        "titre titre"
        "formulaire reseaux";
    gap: 2rem 3rem;
    box-sizing: border-box;
    width: min(calc(100% - 2rem), 68rem);
    margin: 0 auto;
    padding: clamp(2.5rem, 5vw, 4rem);
}

/* Le bloc natif CORE affiche son pictogramme sans dépendre du fond historique
 * de `#bloc_social`, réservé aux thèmes consommateurs. */
body.core-shell-v2 #bloc_social_home .bloc_content {
    position: relative;
    background-image: none;
}

body.core-shell-v2 #bloc_social_home .bloc_content::before {
    position: absolute;
    top: clamp(2rem, 4vw, 3.125rem);
    left: clamp(1.5rem, 3vw, 2.5rem);
    width: 5.125rem;
    height: 5.125rem;
    background: transparent url(../img/ico-newsletter.png) no-repeat center / contain;
    content: "";
    pointer-events: none;
}

body.core-shell-v2 [id^="bloc_social"] .titre_bloc {
    grid-area: titre;
    width: auto;
    margin: 0;
    padding: 0;
    text-align: center;
}

body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement {
    grid-area: formulaire;
    min-width: 0;
}

body.core-shell-v2 [id^="bloc_social"] .social_network {
    grid-area: reseaux;
    min-width: 0;
}

body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement,
body.core-shell-v2 [id^="bloc_social"] .social_network {
    width: auto;
    margin: 0;
    padding: 0;
    float: none;
}

body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement h3,
body.core-shell-v2 [id^="bloc_social"] .social_network h3 {
    margin: 0 0 1rem;
}

body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement form > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 32rem;
}

body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement .form-hidden {
    display: none;
}

body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement .editer-groupe {
    min-width: 0;
    padding: 0;
}

body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement input[type="email"] {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 32rem;
}

body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement p.boutons {
    justify-self: start;
    width: min(100%, 16rem);
    margin: 0;
}

body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement input[type="submit"] {
    width: 100%;
    max-width: none;
    border-color: currentColor;
    background-color: transparent;
    color: inherit;
}

body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement input[type="submit"]:hover,
body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement input[type="submit"]:focus-visible {
    background-color: var(--zblobul-color-primary);
    color: #fff;
}

body.core-shell-v2 [id^="bloc_social"] .logos_social {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

body.core-shell-v2 [id^="bloc_social"] .logos_social li {
    margin: 0;
}

/* Les réseaux du bloc central reprennent le traitement du footer : pastille claire,
 * pictogramme dans la couleur primaire configurée. */
body.core-shell-v2 [id^="bloc_social"] .logos_social li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 50%;
    background-color: #fff;
    color: var(--zblobul-color-primary);
}

body.core-shell-v2 [id^="bloc_social"] .logos_social li a:hover {
    background-color: var(--zblobul-color-primary);
    color: #fff;
}

body.core-shell-v2 [id^="bloc_social"] .bloc_content > div[style*="clear"] {
    display: none;
}

body.core-shell-v2 [id^="bloc_actualites"] .item_logo--paysage {
    aspect-ratio: 2 / 1;
    overflow: hidden;
}

body.core-shell-v2 [id^="bloc_actualites"] .item_logo--paysage > a {
    display: block;
    width: 100%;
    height: 100%;
}

body.core-shell-v2 [id^="bloc_actualites"] .item_logo--paysage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media only screen and (min-width: 768px) {
    body.core-shell-v2 [id^="bloc_actualites"] .table.TOC.col_3 {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }

    body.core-shell-v2 [id^="bloc_actualites"] .table.TOC.col_3 > .item {
        display: flex;
        float: none;
        width: auto !important;
        margin: 0 !important;
    }

    body.core-shell-v2 [id^="bloc_actualites"] .table.TOC.col_3 > .item > .item_content {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
    }

    body.core-shell-v2 [id^="bloc_actualites"] .table.TOC.col_3 > .item > .item_content > .item_info_supp {
        flex: 1 0 auto;
    }

    body.core-shell-v2 [id^="bloc_actualites"] .table.TOC.col_3 > .item > .item_content > .item_info {
        margin-top: auto;
    }
}

@media only screen and (min-width: 1025px) {
    html.page_article body.core-shell-v2:not(:has(.core-layout__aside .ui-datepicker)) .content.core-layout__main {
        flex: 1 1 100%;
        width: 100%;
    }

    html.page_article body.core-shell-v2:not(:has(.core-layout__aside .ui-datepicker)) .core-layout__aside {
        display: none;
    }
}

@media only screen and (max-width: 1024px) {
    body.core-shell-v2 .core-header__toggle {
        box-sizing: border-box;
        width: 100%;
        max-width: none;
        margin-right: 0;
        margin-left: 0;
        float: none;
        clear: both;
    }
}

@media only screen and (max-width: 760px) {
    body.core-shell-v2 #bloc_social_home .bloc_content::before {
        top: 1.5rem;
        left: 1.5rem;
        width: 3rem;
        height: 3rem;
    }

    body.core-shell-v2 [id^="bloc_social"] .bloc_content {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "titre"
            "formulaire"
            "reseaux";
        gap: 1.75rem;
        padding: 2.5rem 1rem;
        background-image: none;
    }

    body.core-shell-v2 [id^="bloc_social"] .titre_bloc {
        font-size: clamp(1.6rem, 8vw, 2rem);
    }

    body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement form > div {
        grid-template-columns: minmax(0, 1fr);
    }

    body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement input[type="submit"] {
        min-height: 2.75rem;
    }

    body.core-shell-v2 [id^="bloc_social"] .formulaire_abonnement p.boutons {
        width: 100%;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
    body.core-shell-v2 .core-header__toggle {
        display: flex;
    }
}

@media only screen and (max-width: 480px) {
    body.core-shell-v2 #header.core-header {
        border-bottom-width: 1px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    }

    body.core-shell-v2 #header.core-header .core-header__inner {
        box-sizing: border-box;
        padding: .5rem;
    }

    body.core-shell-v2 #header.core-header #top_bar {
        box-sizing: border-box;
        width: 100%;
        padding: .75rem;
        border: 1px solid rgba(15, 23, 42, .07);
        border-radius: .75rem;
        background: #f8fafc;
    }

    body.core-shell-v2 #header.core-header #top_bar > * {
        margin: .2rem 0;
    }

    body.core-shell-v2 #header.core-header #top_bar .connexion {
        margin-top: .5rem;
        padding: 0 !important;
        overflow: hidden;
        border: 1px solid rgba(15, 23, 42, .08);
        border-radius: .55rem;
        background: #fff;
    }

    body.core-shell-v2 #header.core-header #top_bar .connexion > span {
        padding: .65rem .75rem;
    }

    body.core-shell-v2 #header.core-header .core-header__toggle {
        min-height: 3.5rem;
        margin-top: .5rem;
        padding: .75rem 1rem;
        border-radius: .65rem;
    }

    body.core-shell-v2 #header.core-header .header_content #main_menu > .logo_site {
        margin: 1rem auto;
    }
}
