/* Pages intérieures. La palette, le corps des titres et les actions viennent de site.css. */
html.es2i-public #wrapwrap > main {
    --es-papier: #f1f5f1;
    --es-marge-page: clamp(1.25rem, 5.5vw, 5.25rem);
    --es-colonne-page: min(calc(100% - 2 * var(--es-marge-page)), 78rem);
    --es-rythme: clamp(2rem, 4.6vw, 4.5rem);
    --es-title: clamp(2.55rem, 1.8rem + 3.2vw, 4.65rem);
    --es-section-title: clamp(1.95rem, 1.45rem + 1.9vw, 3.25rem);
    --es-card-title: clamp(1.35rem, 1.1rem + .85vw, 1.85rem);
}

/* Les offres des deux éditeurs et le comparatif. */
html.es2i-public main .es-parcours-inner,
html.es2i-public main .es-contact-intro > div {
    width: var(--es-colonne-page);
    max-width: none;
    margin-inline: auto;
    padding-inline: 0;
}
html.es2i-public main .es-parcours-hero,
html.es2i-public main .es-contact-intro {
    padding-block: var(--es-rythme);
    background: var(--es-papier);
    color: var(--es-ink);
    border-bottom: 1px solid var(--es-rule);
}
html.es2i-public main .es-parcours-hero h1 {
    font-size: var(--es-title);
    letter-spacing: -.03em;
}
html.es2i-public main .es-parcours-section {
    padding-block: var(--es-rythme);
    border-bottom-color: var(--es-rule);
}
html.es2i-public main .es-parcours-section:last-child:has(.es-parcours-actions) {
    background-color: var(--es-ocean);
}
html.es2i-public main .es-parcours-grid > :is(article, li, div) {
    border-top: 1px solid var(--es-rule);
}
html.es2i-public main .es-parcours-grid h3 a { text-underline-offset: .2em; }

/* Les rangées de 50 px du constructeur tronquaient les textes de ces offres. */
@media (min-width: 992px) {
    #wrap .o_grid_mode[data-es2i-grille-offre] {
        grid-template-rows: auto !important;
        grid-auto-rows: auto;
    }
    #wrap .o_grid_mode[data-es2i-grille-offre] > .o_grid_item { grid-row: 1 !important; }
    #wrap .o_grid_mode[data-es2i-grille-offre="illustration"] { min-height: clamp(15rem, 26vw, 23rem); }
    #wrap .o_grid_mode[data-es2i-grille-offre="appel"] { align-items: center; }
}
#wrap .o_grid_mode[data-es2i-bandeau-bleu] > .o_grid_item:first-child :is(h3,p,a) { color: #fff; }
#wrap .o_grid_mode[data-es2i-grille-offre="appel"] p a:not(.btn) { text-decoration: underline; }
#wrap .o_grid_mode[data-es2i-grille-offre="appel"] .btn { white-space: normal; }
#wrap .es-audit-orientation { max-width: 60ch; margin: .75rem auto 0; text-align: center; }
#wrap .es-audit-orientation a { display: block; margin-top: .45rem; font-weight: 650; }

/* Matériel TERRA. Les photographies constructeur doivent rester entières. */
#wrap .s_text_cover:has(.es-terra-couverture) .row { align-items: stretch; }
#wrap .es-terra-couverture {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 3rem);
    background: #fff;
}
#wrap .es-terra-couverture img { display: block; width: min(100%, 74rem); height: auto; }
#wrap .es-terra-sav-lien {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: .5rem .6rem;
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .2em;
}
#wrap .es-terra-detail .o_grid_item_image > img {
    object-fit: contain;
    object-position: center;
}
#wrap .es-terra-serveurs { padding-block: clamp(2rem, 5vw, 5rem); background: #f2f6f7; color: #102e43; }
#wrap .es-terra-serveurs > .container {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
}
#wrap .es-terra-serveurs img { display: block; width: 100%; height: auto; }
#wrap .es-terra-serveurs a { font-weight: 700; text-underline-offset: .2em; }
@media (min-width: 992px) {
    #wrap .es-terra-detail .o_grid_mode { grid-template-rows: auto !important; grid-auto-rows: auto; min-height: 20rem; }
    #wrap .es-terra-detail .o_grid_mode > .o_grid_item { grid-row: 1 !important; }
}
@media (max-width: 767px) {
    #wrap .es-terra-serveurs > .container { grid-template-columns: 1fr; }
    #wrap .es-terra-couverture { padding: .8rem 1rem; }
    #wrap .es-terra-sav-lien { margin-inline-start: 0; }
}
html.es2i-public main .es-parcours .es-parcours-media img { border-radius: .2rem; }

/* Les offres Website plus anciennes emploient les snippets natifs. */
html.es2i-public[data-es2i-page="offer"] #wrap .es-fonction-titre {
    align-items: center;
}
html.es2i-public[data-es2i-page="offer"] #wrap .es-fonction-titre > h3 {
    min-width: 0;
    margin: 0;
    color: var(--es-ink);
    font: 600 clamp(1.4rem, 1.27rem + .55vw, 1.7rem)/1.16 var(--es-face);
}
html.es2i-public[data-es2i-page="offer"] #wrap .es-fonction-titre h3 :is(font, span, strong, b) {
    color: inherit !important;
    font: inherit !important;
}
html.es2i-public[data-es2i-page="offer"] #wrap .es-fonction-titre + p.lead {
    font-size: clamp(1rem, .965rem + .15vw, 1.1rem);
    line-height: 1.55;
}
html.es2i-public[data-es2i-page="offer"] #wrap > .s_cover:first-child > .s_allow_columns {
    width: var(--es-colonne-page);
    max-width: none;
}
html.es2i-public[data-es2i-page="offer"] #wrap > .s_cover:first-child h1 {
    max-inline-size: 23ch;
    text-align: start !important;
    letter-spacing: -.03em;
}
html.es2i-public[data-es2i-page="offer"] #wrap > .s_cover:first-child .lead {
    max-inline-size: 55ch;
    line-height: 1.5;
}
html.es2i-public[data-es2i-page="offer"] #wrap > section:first-child:is(.s_cta_mockups,.s_sidegrid,.s_empowerment,.s_discovery,.s_banner),
html.es2i-public[data-es2i-page="offer"] #wrap > .s_text_block:first-child:has(h1) {
    background-color: var(--es-papier) !important;
}
html.es2i-public[data-es2i-page="offer"] #wrap > .s_text_cover:first-child > .container-fluid > .row > :has(h1) {
    background-color: var(--es-ocean) !important;
}
html.es2i-public[data-es2i-page="offer"] #wrap :is(.s_cards_grid,.s_three_columns) .s_card {
    border-color: var(--es-rule);
    border-radius: .35rem;
    box-shadow: none;
}

/* Contact : le visiteur peut écrire ou choisir directement son agence. */
html.es2i-public main .es-contact-intro { padding-inline: 0; }
html.es2i-public #wrap .es-contact-intro h1 {
    margin: 0;
    color: var(--es-ink);
    font-size: var(--es-title);
}
html.es2i-public main .es-contact-intro p {
    max-width: 56ch;
    margin: .9rem 0 .55rem;
    color: var(--es-slate);
}
html.es2i-public main .es-contact-intro a { color: var(--es-teal); }
html.es2i-public main .es-contact-intro p a { display: inline; }
html.es2i-public main .es-contact-intro nav a:first-child {
    padding-inline: 1.15rem;
    border-radius: .3rem;
    background: var(--es-sun);
    color: var(--es-ink);
    text-decoration: none;
}
html.es2i-public main .es-contact-intro nav a:first-child:is(:hover, :focus-visible) { background: #ffd262; }
html.es2i-public #agences-es2i > h3 [class*="text-o-color-"] { color: var(--es-ink) !important; }
html.es2i-public body:not(.editor_enable) #agences-es2i > h3 .o_animated_text {
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
}
@media (min-width: 62rem) {
    html.es2i-public main .es-contact-intro > div {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
        align-items: start;
        gap: 1rem clamp(2rem, 6vw, 6rem);
    }
    html.es2i-public main .es-contact-intro h1 { grid-row: span 2; }
    html.es2i-public main .es-contact-intro p { margin-block: 0; }
    html.es2i-public main .es-contact-intro nav { grid-column: 2; }
}

/* Journal, recrutement, agenda et boutique : la couverture photo conserve ses couleurs. */
html.es2i-public main #o_wblog_blog_top:has(> .es-journal-titre) {
    padding-block: var(--es-rythme) 1.5rem;
    background: var(--es-ocean);
}
html.es2i-public main #o_wblog_blog_top > .es-journal-titre,
html.es2i-public main #o_wblog_blog_top:has(> .es-journal-titre) > .h1 {
    width: var(--es-colonne-page);
    max-width: none;
    margin: 0 auto !important;
    padding: 0;
    color: white;
    text-align: left !important;
}
html.es2i-public main #o_wblog_blog_top > .es-journal-titre {
    font: 600 var(--es-title)/1.04 var(--es-face);
    letter-spacing: -.03em;
}
html.es2i-public main #o_wblog_blog_top:has(> .es-journal-titre) > .h1 {
    padding-top: .65rem;
    color: var(--es-mint);
    font: 600 1.25rem/1.3 var(--es-face);
}
html.es2i-public main #o_wblog_posts_loop .o_record_cover_container { border-radius: .2rem; }
html.es2i-public main :is(#o_wblog_blog_top,#o_wblog_post_top) .o_record_has_cover > .container,
html.es2i-public main .o_wevent_event .o_record_cover_container > .container {
    width: var(--es-colonne-page);
    max-width: none;
    padding-inline: 0;
}
html.es2i-public main #wrap.js_hr_recruitment > div > section:first-of-type:has(h1) {
    background: var(--es-papier);
    border-bottom: 1px solid var(--es-rule);
}
html.es2i-public #wrap:is(.o_website_hr_recruitment_jobs_list,.o_wevent_index) .o_wevent_index_topbar_filters,
html.es2i-public main #wrap.o_appointment_index > .container > section:has(h1),
html.es2i-public main #o_wsale_products_header {
    padding: clamp(1.25rem, 3vw, 3rem);
    background-color: var(--es-papier);
    border-block: 1px solid var(--es-rule);
}
html.es2i-public #wrap:is(.o_website_hr_recruitment_jobs_list,.o_wevent_index) .o_wevent_index_topbar_filters h1,
html.es2i-public main #wrap #o_wsale_products_header h1,
html.es2i-public main #wrap.o_appointment_index > .container > section h1 {
    font: 600 var(--es-reading-title)/1.06 var(--es-face);
    letter-spacing: -.025em;
}
html.es2i-public main :is(#jobs_grid,.o_wevent_events_list) .card,
html.es2i-public main .o_wappointment_card,
html.es2i-public[data-es2i-page="transaction"] main #shop_cart .js_cart_lines:has(> h5) {
    border-color: var(--es-rule);
    border-radius: .35rem;
}

/* Pages d’information et conditions de vente. La table des cookies garde son défilement natif. */
html.es2i-public[data-es2i-page="editorial"] #wrap > .s_pricelist_boxed:has(a[href*="/web/content"]) {
    background: var(--es-papier);
}
html.es2i-public[data-es2i-page="editorial"] #wrap > .s_pricelist_boxed:has(a[href*="/web/content"]) > .o_we_shape {
    background-image: none;
}
html.es2i-public main #wrap > .s_pricelist_boxed .o_text_columns,
html.es2i-public main #wrap.o_website_info section.container > h1,
html.es2i-public main #wrap > section:only-child > .container:has(> .table-responsive) > h1 {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--es-rule);
}
html.es2i-public main #wrap > section:only-child > .container:has(> .table-responsive) {
    max-width: 65rem;
    padding-block: var(--es-rythme);
}
html.es2i-public main #wrap > section:only-child > .container:has(> .table-responsive) > p,
html.es2i-public main #wrap.o_website_info section.container > p { max-width: var(--es-copy-measure); }
html.es2i-public main .s_pricelist_boxed a.es-document-pdf {
    color: var(--es-teal);
    text-underline-offset: .2em;
}

/* Sur les formulaires et comptes publics, la hiérarchie porte sur les titres et les fonds. */
html.es2i-public[data-es2i-page="transaction"] main:has(.oe_website_login_container) { background: var(--es-papier); }
html.es2i-public[data-es2i-page="transaction"] main .oe_website_login_container,
html.es2i-public[data-es2i-page="transaction"] main #jobs_section #forms {
    border-radius: .35rem;
}
html.es2i-public[data-es2i-page="transaction"] main .o_wprofile_all_users_header {
    background: var(--es-ocean);
}
html.es2i-public[data-es2i-page="transaction"] main :is(#shop_cart,.o_portal_wrap,.o_portal_my_home) h4 {
    font: 600 var(--es-card-title)/1.16 var(--es-face);
}

/* Les commandes restent en dehors du texte et de l'image, même sur téléphone. */
#wrap [data-es2i-carrousel-rh] {
    display: grid;
    grid-template: "slides slides slides" auto "prev points next" auto / 1fr auto 1fr;
    align-items: center;
    padding-bottom: .5rem;
}
#wrap [data-es2i-carrousel-rh] > .carousel-inner { grid-area: slides; min-width: 0; }
#wrap [data-es2i-carrousel-rh] > .carousel-indicators {
    grid-area: points;
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
}
#wrap [data-es2i-carrousel-rh] .carousel-indicators > button {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 1;
    background: transparent;
}
#wrap [data-es2i-carrousel-rh] .carousel-indicators > button::before {
    content: "";
    width: .6rem;
    height: .6rem;
    border: 1px solid #fff;
    border-radius: 1rem;
}
#wrap [data-es2i-carrousel-rh] .carousel-indicators > button.active::before {
    width: 1.25rem;
    background: #fff;
}
#wrap [data-es2i-carrousel-rh] > :is(.carousel-control-prev,.carousel-control-next) {
    position: static;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 65%);
    border-radius: 50%;
    background: transparent;
    opacity: 1;
}
#wrap [data-es2i-carrousel-rh] > .carousel-control-prev { grid-area: prev; justify-self: end; }
#wrap [data-es2i-carrousel-rh] > .carousel-control-next { grid-area: next; justify-self: start; }
#wrap [data-es2i-carrousel-rh] :is(.carousel-control-prev-icon,.carousel-control-next-icon) {
    width: 1.25rem;
    height: 1.25rem;
}
#wrap [data-es2i-carrousel-rh] button:focus-visible { outline: 2px solid #ffbf1b; outline-offset: -2px; }
@media (max-width: 430px) {
    #wrap [data-es2i-carrousel-rh] {
        grid-template: "slides slides" auto "points points" auto "prev next" auto / 1fr 1fr;
        column-gap: .5rem;
    }
}
