/*
Theme Name: Pernoud
Description: Thème enfant de Blocksy pour le site Pernoud.
Author: Pernoud
Template: blocksy
Version: 1.0.0
Text Domain: pernoud-child
*/

/* Les personnalisations du site seront ajoutées ici. */

/* Accueil : contenu pleine largeur, sans espace sous l’en-tête */
/* Structure pleine largeur pour la page d’accueil */
body.home #main {
    --theme-container-width: 100%;
    --theme-normal-container-max-width: 100%;
    --theme-content-vertical-spacing: 0px;
}

body.home #main > [class*="ct-container"] {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding: 0;
}

body.home .entry-content {
    padding: 0;
}

body.home .entry-content > .sh-slider {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Accueil : limiter la largeur des autres blocs */
body.home .entry-content > :not(.sh-slider):not(.alignfull) {
    width: calc(100% - 40px);
    max-width: 1200px;
    margin-inline: auto;
}

/* Bannières des pages intérieures : image en haut à droite */
body.page:not(.home) .hero-section[data-type="type-2"] {
    background-position: right 0 !important;
}
body.page:not(.home) .hero-section[data-type="type-2"] > figure img {
    object-position: right 0 !important;
}
body.home .hero-section {
    display: none !important;
}

/* Contenu centré dans une section pleine largeur */
.entry-content .wp-block-group.alignfull .pernoud-contenu {
    box-sizing: border-box;
    width: var(--theme-container-width, 90%);
    max-width: var(--theme-normal-container-max-width, 1290px);
    margin-inline: auto !important;
}

.before_service {
    position: relative;
}
.before_service::before {
    content: "";
    display: block;
    position: absolute;
    top: -26px;
    left: 50%;
    width: 2px;
    height: 26px;
    background-color: #c1705a;
}

.service_list {
    list-style: none;
}

.service_list li:nth-child(odd) {
    background: #d46c541f;
    padding: 10px 20px;
}
.service_list li:nth-child(even) {
    background: #ffffff85;
    padding: 10px 20px;
}

/* En-tête collant sur ordinateur et mobile */
#header {
    position: sticky;
    top: -50px;
    z-index: 1000;
}

@media (max-width: 1000px) {
    #header {
        top: 0;
    }
}

/* Décalage lorsque la barre d’administration est affichée */
body.admin-bar #header {
    top: calc(-50px + 32px)!important;
}

@media (max-width: 1000px) {
    body.admin-bar #header {
        top: 32px!important;
    }
}