/**
 * Theme Name: lpa-twentyfive
 * Template:   twentytwentyfive
 * Author: Evan Meiss
 * Description: Thème pour site web LPA basé sur twentytwentyfive
 */

:root {
    --color-bg-text-field: #fff;
}

/* mode sombre */
[data-theme="dark"] {
    --wp--preset--color--base: #010;
    --wp--preset--color--contrast: #96C896;
    --wp--preset--color--accent-1: #4D4D4D;
    --wp--preset--color--accent-2: #7CB479;
    --wp--preset--color--accent-3: #52510F;
    --wp--preset--color--accent-4: #454530;
    --wp--preset--color--accent-5: #1E291E;
    --wp--preset--color--accent-6: #52AD5A8c;
    --color-bg-text-field: #cce0cc;
}
/* mode sombre fallback si pas de javascript (mêmes valeurs qu'au dessus */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]){
    --wp--preset--color--base: #010;
    --wp--preset--color--contrast: #96C896;
    --wp--preset--color--accent-1: #4D4D4D;
    --wp--preset--color--accent-2: #7CB479;
    --wp--preset--color--accent-3: #52510F;
    --wp--preset--color--accent-4: #454530;
    --wp--preset--color--accent-5: #1E291E;
    --wp--preset--color--accent-6: #52AD5A8c;
    --color-bg-text-field: #cce0cc;
}}

/* empêcher déroulement horizontal */
body {
    overflow-x: hidden;
}
header {
    max-width: 100vw;
}
footer {
    max-width: 100vw;
}

/* pour que la barre de navigation en haut reste au-dessus de la carte Leaflet */
.is-position-sticky.wp-block-group {
    z-index: 1001;
}

/* boutons mode clair/sombre */
#themeTogglers button {
    height: 3rem;
    width: 3rem;
    border-radius: 10rem;
    outline-color: transparent;

    color: var(--wp--preset--color--base);
    background: var(--wp--preset--color--contrast);
    border-color: var(--wp--preset--color--contrast);
}
.lightModeToggler {
    background: #f0f8f0 !important;
    border-color: #f0f8f0 !important;
    display: none;
}
[data-theme="dark"] .darkModeToggler {
    display: none;
}
[data-theme="dark"] .lightModeToggler {
    display: block;
}

/* icônes menu burger mobile */
.wp-block-navigation__responsive-container-close svg, .wp-block-navigation__responsive-container-open svg {
    height: 3rem;
    width: 4rem;
}


/* boutons navbar */
/* empêcher retour à la ligne à chaque lettre boutons navbar */
.boutons-navbar .wp-block-button__link {
    word-break: normal;
}
/* rend plus petit/enlève boutons si petite largeur d'écran */
@media (max-width:800px) {
    header .logo-lbi {
        display: none;
    }
    #themeTogglers button {
        height: 2.5rem;
        width: 2.5rem;
    }
    #themeTogglers svg {
        height: 1.5rem;
        width: 1.5rem;
    }
}
@media (max-width:750px) {
    #themeTogglers {
    display: none;
    }
}
@media (min-width:600px) and (max-width:1000px) {
    .boutons-navbar {
        display: none !important;
    }
}
@media (min-width:600px) and (max-width:1200px) {
    .boutons-navbar a {
        font-size: 0.8rem
    }
}

/* logos navbar */
header .clickable-square {
    outline-color: transparent;
}
header .custom-logo {
    max-height: 80px;
    width: auto !important;
}
header .logo-lbi img {
    max-height: 80px;
    width: auto !important;
}

/* menus navbar parents non-clickables */
.no-link {
    user-select: none;
    outline-color: transparent;
}
.wp-block-navigation__responsive-container.is-menu-open .no-link > a {
    font-weight: bold;
}

/* style sous-menus navbar sur desktop */
.wp-block-navigation ul, .wp-block-navigation ul li {
    border-radius: 0.5rem;
    color: var(--wp--preset--color--contrast);
}

/* enlève la marge au dessus du pied de page */
footer.wp-block-template-part {
    margin-top: auto;
}

/* page d'accueil barre de progression parcours analyse */
.parcours-analyse-barre {
    width: 100vw;
    max-width: 100vw;
    height: 0.5rem;
    position: absolute;
    left: 0;
    top: 8.0rem;
    background-image: linear-gradient(to right, #e9e883, #828c7f);
}
.parcours-analyse .has-background {
    min-height: 3.5rem;
    min-width: 3.5rem;
}
.parcours-analyse > div {
    animation-duration: 1s !important;
    min-width: 17vw;
}
/* desktop */
@media(min-width: 1000px){
    .parcours-analyse > div:nth-of-type(1){
        animation-delay: 0s;
    }
    .parcours-analyse > div:nth-of-type(2){
        animation-delay: 0.4s;
    }
    .parcours-analyse > div:nth-of-type(3){
        animation-delay: 0.8s;
    }
    .parcours-analyse > div:nth-of-type(4){
        animation-delay: 1.2s;
    }
    .parcours-analyse > div:nth-of-type(5){
        animation-delay: 1.6s;
    }
}
/* mobile */
@media(max-width: 1000px){
    .parcours-analyse-barre {
        display: none;
    }
    .parcours-analyse{
        flex-wrap: wrap !important;
    }
}

/* carte, vignettes labos */
#map {
    height: 75vh;
}
.map-labo-tooltip[role="tooltip"] {
    background-color: #fff0;
    border: none;
    box-shadow: none;
    margin-top: -2.5rem;
    text-shadow: #fff 0px 0px 3px;
    font-weight: 800;
    font-family: var(--wp--preset--font-family--manrope);
}
.map-labo-tooltip[role="tooltip"]:before {
    border-color: #fff0;
}
.map-container {
    border-radius:1rem;
    margin-top:var(--wp--preset--spacing--30);
    margin-bottom:var(--wp--preset--spacing--30);
    padding-top:0;
    padding-bottom:0;
    padding-right:0;
    padding-left:0;
    width: 75vw;
    max-width: 80vw;
    box-shadow:var(--wp--preset--shadow--natural);
    row-gap: 0.5rem;
    column-gap: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-color: var(--wp--preset--color--accent-4);
    overflow: hidden;
}
.map-column {
    padding:0;
    width:65%;
}
.map-side-pane{
    padding-top:1rem;
    padding-bottom:1rem;
    padding-right:0;
    padding-left:0;
    width: 31%;
}
@media(max-width: 1000px){
    .map-container {
        width: 70vw;
    }
    #map {
        height: 60vh;
    }
    .map-column {
        width: 100%;
    }
    .map-side-pane{
        padding-top:0;
        padding-bottom:1rem;
        padding-right:1rem;
        padding-left:1rem;
        width: 100%;
    }
}
.vignettes-container{
    gap: 0.8rem;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    max-width: var(--wp--style--global--wide-size);
}
.labo-content{
    word-wrap: anywhere;
    margin:0;
    padding:0;
    max-width: 65vw;
    font-size: var(--wp--preset--font-size--medium) !important;
    text-align: left;
}
.labo-content h2{
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-style: normal;
    font-weight: 800;
    min-height: 2.2rem;
    text-align: center;
}
.labo-content .long-name{
    font-size: 1.75rem;
}
.labo-content strong{
    font-weight: 600;
}
.labo-content figure {
    display: flex;
    justify-content: center;
}
.labo-content img{
    border-radius:0.75rem;
    object-fit:cover;
    width:300px;
    height:200px;
    max-width: min(62vw, 99%);
}
.labo-content a:first-of-type{
    outline-color: transparent;
    text-decoration: none;
}
.labo-btn-rdv{
    margin-top: 0.6rem;
    margin-bottom: 0;
    text-align: center;
}
.labo-btn-rdv a{
    padding-top:var(--wp--preset--spacing--20);
    padding-bottom:var(--wp--preset--spacing--20);
}
.vignette-labo{
    min-width: min(25rem, 40vw);
    max-width: 25rem;
    min-height: min(43.5rem, 75vh);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    padding-right: 1rem;
    padding-left: 1rem;
    border-radius:2rem;
    margin:0;
    box-shadow:var(--wp--preset--shadow--natural);
    background-color: var(--wp--preset--color--accent-4) !important;
    box-sizing: border-box;
}
.vignette-labo-pane{
    padding: 0;
    margin: 0;
    display: none;
}
@media(max-width: 899px){
    .vignette-labo{
        min-height: 0;
    }
}
.vignette-focused{
    background-color: #ffffaa !important;
    color: black !important;
}
/* labos style texte ouvert/fermé actuellement */
.schedule-open{
    font-weight: 800;
    color: #0b0;
}
.schedule-closed{
    font-weight: 800;
    color: #800;
}

/* fiche labo */
.fiche-carousel-column{
    --wp--custom--carousel-block--pagination-bottom: 0px;
    --wp--custom--carousel-block--navigation-sides-offset: 0px;
    width: 40vw;
    margin-left: 1.5rem !important;
}
.labo-carousel .swiper-slide{
    align-self: center;
}
.labo-carousel .swiper-horizontal{
    margin-bottom: 5px !important;
}
.labo-carousel .img-container {
    border-radius:0.75rem;
    width:100%;
    overflow: hidden;
    max-height:70vh;
    display: flex;
    justify-content: center;
}
.labo-carousel .img-container img {
    border-radius:0.75rem;
    max-width:100%;
    max-height:100%;
    object-fit: contain;
}
.labo-carousel .swiper-slide{
    width:100% !important;
}
#modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}
#modal-image {
    margin: auto;
    display: block;
    max-width: 100%;
}

.fiche-info-column{
    width: 40vw;
    word-wrap: anywhere;
}
.fiche-info-column strong{
    font-weight: 600;
}
.fiche-info-column br:has(+ .labo-btn-rdv){
    display: none;
}
@media(max-width: 1000px){
    div:has(> .fiche-labo-container){
        padding-right: 10px !important;
        padding-left: 10px !important;
    }
    .fiche-labo-container{
        max-width: 100% !important;
    }
    .fiche{
        flex-wrap:wrap !important;
    }
    .fiche-carousel-column{
        margin-left: 0 !important;
    }
    .labo-carousel {
        max-width: min(100%, 95vw);
        max-height: min(80vh, 30rem);
    }
    .labo-carousel .img-container img {
        max-width: min(100%, 95vw);
        max-height: min(80vh, 30rem);
    }
    .fiche-info-column{
        width: 90%;
    }
    .fiche-carousel-column{
        width: 95%;
        max-height: 90vh;
    }
}


/* page modif labos */
.labos-edit {
    overflow: scroll;
    padding: 1em;
    border-style: solid;
    max-width: 90vw;
    margin: 0 auto;
}
.labos-edit th {
    font-size: var(--wp--preset--font-size--medium);
}
.labos-edit input {
    width: 7rem;
}
.labos-edit input[type='number'] {
    width: 3rem;
}
.labos-edit textarea {
    width: 10rem;
    height: 3rem;
}


/* cache ce qui dépasse d'une div (utilisé pour le contenant de la carte pour avoir des bords arrondis, et pour le champ de recherche qui dépasse horizontalement sur mobile) */
.overflow-hidden {
    overflow: hidden;
    max-width: 80vw;
}

/* pictogrammes page d'accueil et page RSE */
.picto img {
    filter: invert(100%) sepia(100%) saturate(6) hue-rotate(50deg) brightness(0.2);
}
[data-theme="dark"] .picto img {
    filter: invert(100%) sepia(100%) saturate(6) hue-rotate(50deg) brightness(0.7);
}

/* page partenaires */
.logos-partenaires a .wp-block-group {
    min-width: min(25rem, 70vw);
    max-width: 25rem;
    min-height: 15rem;
    background-color: #fff;
    color: #030;
    box-shadow: var(--wp--preset--shadow--natural);
}
.logos-partenaires img {
    max-height: 6em;
    width: auto;
}

/* liste articles */
.liste-articles .wp-block-group:has(.wp-post-image) {
    min-width: min(15rem, 70vw);
    max-width: 15rem;
}

/* article */
.article .wp-block-post-featured-image {
    min-width: min(30rem, 70vw);
    max-width: 30rem;
}

/* Contact Form 7 */
/* Champs textes */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
    max-width: 70vw;
    width: 20rem;
    height: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--wp--preset--color--accent-2);
    border-radius: 0.38rem;
    background-color: var(--color-bg-text-field);
}
.wpcf7 textarea {
    width: 100%;
    height: 10rem;
}
/* Bouton d'envoi */
.wpcf7 input[type="submit"] {
    background-color: var(--wp--preset--color--accent-2);
    color: var(--wp--preset--color--base);
    padding: 1rem 2.25rem;
    border: none;
    border-radius: 0.38rem;
    cursor: pointer;
    font-size: var(--wp--preset--font-size--medium);
    box-shadow: var(--wp--preset--shadow--natural);
    font-weight: 600;
}
.wpcf7 input[type="submit"]:hover {
    background-color:
    color-mix(in srgb, var(--wp--preset--color--contrast) 85%, transparent);
}
