/* Coteaux : composition native, sans les déplacements de l'ancien rslides.
 * Chargée sur l'accueil uniquement, après les styles de cadres et du moteur. */
body.home #top-header#top-header {
    box-sizing: border-box;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 70px !important;
    margin: 0 !important;
}
body.home #top-header#top-header > .largeur92 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 92% !important;
    max-width: 1500px !important;
    height: 70px;
    margin: 0 auto !important;
}
body.home #diapo-accueil#diapo-accueil:has(.krea3-diaporama) {
    display: grid !important;
    grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    align-items: stretch;
    width: 100% !important;
    min-width: 0;
    height: auto !important;
    min-height: 650px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: var(--couleur-secondaire-autre, #bccdcb);
}
body.home #diapo-accueil#diapo-accueil::before,
body.home #diapo-accueil#diapo-accueil #content-recherche::before { content: none !important; }
body.home #diapo-accueil#diapo-accueil:not(:has(.krea3-diaporama)) {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
}
body.home #diapo-accueil#diapo-accueil > .krea3-diaporama {
    position: relative !important;
    align-self: stretch;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    width: 100% !important;
    transform: none !important;
    border-radius: 0 !important;
}
body.home #diapo-accueil#diapo-accueil > .krea3-diaporama > .swiper-wrapper {
    position: absolute !important;
    inset: 0;
}
body.home #diapo-accueil#diapo-accueil .swiper-wrapper,
body.home #diapo-accueil#diapo-accueil .krea3-diaporama__slide,
body.home #diapo-accueil#diapo-accueil .krea3-diaporama__slide-content,
body.home #diapo-accueil#diapo-accueil .krea3-diaporama__media {
    height: 100% !important;
    aspect-ratio: auto !important;
}
body.home #diapo-accueil#diapo-accueil .krea3-diaporama__media {
    clip-path: none !important;
}
body.home #diapo-accueil#diapo-accueil #content-recherche {
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    width: 100% !important;
    min-width: 0;
    height: auto !important;
    min-height: 0 !important;
    padding: clamp(190px, 14vw, 245px) clamp(24px, 3vw, 56px) 48px !important;
    margin: 0 !important;
    text-align: left !important;
    background: var(--couleur-secondaire-autre, #bccdcb);
}
body.home #content-recherche#content-recherche #h1accueil {
    box-sizing: border-box;
    width: auto !important;
    max-width: 100%;
    padding: 0 !important;
    margin: 0 0 28px !important;
    font-size: clamp(1.6rem, 2.5vw, 2.5rem) !important;
    line-height: 1.4 !important;
    text-align: inherit !important;
    overflow-wrap: anywhere;
}
body.home #content-recherche#content-recherche #h1accueil > span { font-size: 1.3em !important; }
body.home #content-recherche#content-recherche #recherche_site {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    padding: 8px 16px !important;
    margin: 0 !important;
}
body.home #content-recherche#content-recherche #recherche_site li,
body.home #content-recherche#content-recherche #searchform { padding: 0 !important; margin: 0 !important; }
body.home #content-recherche#content-recherche #searchform > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
}
body.home #content-recherche#content-recherche #searchform input[type="text"] {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    font-size: 1rem !important;
}
body.home #content-recherche#content-recherche #searchsubmit {
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    float: none !important;
}
body.home #content-recherche#content-recherche #acces-rapides { margin: 36px 0 0 !important; }
body.home #content-recherche#content-recherche #acces-rapides ul {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(6rem, calc((100% - 24px) / 3))), 1fr));
    align-items: start;
    gap: 20px 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.home #content-recherche#content-recherche #acces-rapides li {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}
body.home #content-recherche#content-recherche #acces-rapides a {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 !important;
    text-align: center;
}
body.home #content-recherche#content-recherche .icon-acces {
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 70px !important;
    height: 70px !important;
    margin: 0 !important;
}
body.home #content-recherche#content-recherche .texte-acces { font-size: .85rem !important; line-height: 1.4 !important; overflow-wrap: anywhere; }
body.home #content-recherche#content-recherche #acces-rapides:not(:has(li)) { display: none !important; }

/* Le premier bloc ne doit plus remonter de 140 px sous le nouveau diaporama. */
/* Le décor vert reste derrière le flux Facebook et son image de repli. */
body.home #main-accueil#main-accueil > .k3-home-projects-kiosk {
    position: relative;
    z-index: 1;
}
body.home #main-accueil#main-accueil #ligne1 { margin: 0 !important; padding: 64px 0 0 !important; }
body.home #main-accueil#main-accueil .titre-ligne1 .largeur92 {
    display: flex !important;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}
body.home #main-accueil#main-accueil .titre-ligne1 h2 { width: auto !important; padding: 0 20px !important; margin: 0 !important; }
body.home #main-accueil#main-accueil #gauche-titre-ligne1 { display: block !important; padding: 0 20px !important; }
body.home #main-accueil#main-accueil :is(#ligne1, .gauche-ligne2) h2,
body.home #main-accueil#main-accueil :is(#ligne1, .gauche-ligne2) h2 > span,
body.home #main-accueil#main-accueil .k3-home-projects-kiosk__kiosk-content > h2,
body.home #main-accueil#main-accueil .k3-home-projects-kiosk__kiosk-content > h2 > span {
    box-sizing: border-box;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
}
body.home #main-accueil#main-accueil :is(.titre-ligne1, .gauche-ligne2) a {
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
}
body.home #main-accueil#main-accueil #content-ligne1 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 20px;
    align-items: stretch;
    padding: 32px 0 0 !important;
}
body.home #main-accueil#main-accueil #content-ligne1 .agenda {
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    background: var(--couleur-secondaire, #2d5145);
}
body.home #main-accueil#main-accueil .agenda-img { grid-column: 1; grid-row: 1; align-self: start; }
body.home #main-accueil#main-accueil .agenda-texte {
    box-sizing: border-box;
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    gap: 12px;
    padding: 16px !important;
}
body.home #main-accueil#main-accueil .agenda .date-manif { flex: 0 0 auto; max-width: 90px; font-size: .95rem !important; line-height: 1.35; padding: 12px 10px !important; }
body.home #main-accueil#main-accueil .agenda .titre-agenda { min-width: 0; font-size: clamp(1rem, 1.25vw, 1.2rem) !important; line-height: 1.4 !important; overflow-wrap: anywhere; }

/* Quatre actualités lisibles, toutes au même format, sans texte écrasé. */
body.home #main-accueil#main-accueil #content-ligne2 { gap: 24px; }
body.home #main-accueil#main-accueil .droite-ligne2 > a {
    display: grid !important;
    grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
    align-items: stretch;
    box-sizing: border-box;
    min-width: 0;
    width: 100% !important;
    height: auto !important;
    overflow: hidden;
}
body.home #main-accueil#main-accueil .droite-ligne2 .actu-img { width: 100% !important; align-self: center; }
body.home #main-accueil#main-accueil .droite-ligne2 .titre-actu {
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 18px !important;
    margin: 0 !important;
    color: #172f27;
}
body.home #main-accueil#main-accueil .droite-ligne2 .titre-actu > span { display: block; width: auto !important; padding: 0 !important; font-size: 1rem !important; line-height: 1.45 !important; overflow-wrap: anywhere; }
@media (max-width: 1217px) {
    body.home #diapo-accueil#diapo-accueil { margin-top: 106px !important; }
    body.home #diapo-accueil#diapo-accueil:has(.krea3-diaporama) { grid-template-columns: minmax(0, 1fr); min-height: 0 !important; }
    body.home #diapo-accueil#diapo-accueil > .krea3-diaporama { height: clamp(260px, 50vw, 480px) !important; min-height: 0; }
    body.home #diapo-accueil#diapo-accueil .krea3-diaporama__media { height: clamp(260px, 50vw, 480px) !important; clip-path: none; }
    body.home #diapo-accueil#diapo-accueil #content-recherche { padding: 32px 5% 36px !important; text-align: center !important; }
    body.home #content-recherche#content-recherche #h1accueil { margin-bottom: 24px !important; }
    body.home #content-recherche#content-recherche #acces-rapides { margin-top: 28px !important; }
    body.home #header#header { background: #fff !important; }
    body.home #header#header > .largeur92 { background: #fff !important; }
    body.home #header#header #logo { left: 16px !important; max-width: calc(100% - 110px) !important; }
    body.home #header#header .toggleMenu { right: 16px !important; }
}
@media (max-width: 1000px) {
    body.home #main-accueil#main-accueil #content-ligne2 { grid-template-columns: minmax(0, 1fr); }
    body.home #main-accueil#main-accueil .gauche-ligne2 { padding: 0 0 20px !important; }
    body.home #main-accueil#main-accueil #content-ligne1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.home #main-accueil#main-accueil #content-ligne1 .agenda { grid-column: auto !important; justify-self: stretch !important; }
}
@media (max-width: 600px) {
    body.home #main-accueil#main-accueil #ligne1 { padding-top: 40px !important; }
    body.home #main-accueil#main-accueil #content-ligne1 { grid-template-columns: minmax(0, 1fr); }
    body.home #main-accueil#main-accueil .titre-ligne1 h2 { font-size: 2.35rem !important; }
    body.home #main-accueil#main-accueil #gauche-titre-ligne1 { width: 100% !important; border: 0 !important; }
    body.home #main-accueil#main-accueil .titre-ligne1 a { float: none !important; }
    body.home #main-accueil#main-accueil .droite-ligne2 > a { grid-template-columns: minmax(0, 1fr); }
}
