/* Toits etc — Articles : membres, colonnes, image du haut, grille.
   Feuille issue de user.scss (sortie du SCSS, 2026-11-30).
   CSS natif, hors @layer : il doit l'emporter sur Cassiopeia à spécificité égale, comme user.css.
   Ordre de chargement significatif : voir templates/index.php. */

/* ---------------------- ARTICLES */
/* Membres */
.com-contact-categories h2 {
    margin-top: 0;
}

.contact_listes {
    display: flex;
    justify-content: center;
    align-items: center;
    align-items: start;
    flex-wrap: wrap;
    gap: var(--spacing-normal);
}

.contact_liste {
    max-width: 44rem;
    padding-left: var(--spacing-large);
    padding-right: var(--spacing-large);

    & ul {
        list-style: disc;
    }
}

.contact_equipe {
    display: flex;
    justify-content: center;
    align-items: center;
    align-items: center;
    flex-direction: column;
    gap: var(--spacing-normal);

    @media (width >=450px) {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: start;

        .contact_equipier {
            flex-basis: 40%;
        }
    }

    @media (width >=576px) {
        .contact_equipier {
            flex-basis: 28%;
        }
    }

    @media (width >=768px) {
        .contact_equipier {
            flex-basis: 22%;
        }
    }

    @media (width >=992px) {
        .contact_equipier {
            flex-basis: 18%;
        }
    }

    @media (width >=1200px) {
        .contact_equipier {
            flex-basis: unset;
        }
    }
}

.contact_equipier {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;


    &:nth-child(even) {
        .contact_equipier_image {
            mask-image: url("../images/maskImage3.svg");
            mask-position: center;
            mask-size: cover;
            mask-repeat: no-repeat;
        }
    }

    &:nth-child(odd) {
        .contact_equipier_image {
            mask-image: url("../images/maskImage1.svg");
            mask-position: center;
            mask-size: cover;
            mask-repeat: no-repeat;
            mask-position: 1rem;

        }
    }

    &:nth-child(3n) {
        .contact_equipier_image {
            mask-image: url("../images/maskImage2.svg");
            mask-position: center;
            mask-size: cover;
            mask-repeat: no-repeat;
            mask-size: contain;
        }
    }

    &:nth-child(5n) {
        .contact_equipier_image {
            mask-image: url("../images/maskImage4.svg");
            mask-position: center;
            mask-size: cover;
            mask-repeat: no-repeat;
        }
    }

    &:nth-child(6n) {
        .contact_equipier_image {
            mask-position: -2rem;
        }
    }


    &:nth-child(8n) {
        .contact_equipier_image {
            mask-position: 1rem;
        }
    }

    &:nth-child(11) {
        .contact_equipier_image {
            mask-image: url("../images/maskImage3.svg");
            mask-position: center;
            mask-size: cover;
            mask-repeat: no-repeat;
            mask-position: -2rem;
        }
    }
}

.equipier_nom {
    font-weight: bold;
    color: var(--couleur-violet);
}

.equipier_fonction {
    max-width: 20rem;
    text-align: center;
    line-height: var(--lineheight-petit);
}

.contact_equipier_image {
    position: relative;
    width: 13rem;
    height: 13rem;
    /* border-radius: 50%; */
    border: 4px solid var(--couleur-blanc);
    color: var(--couleur-blanc);
    overflow: hidden;
    margin-bottom: var(--spacing-xpetit);
    filter: drop-shadow(0px 4px 4px #0000001a);
    transition: all 250ms;
    @media (hover: hover) {
        &:not(:is(input, select)):hover {
            border: 4px solid var(--couleur-blanc);
        }
    }



    &:hover {
        &:before {
            opacity: 0;
        }
    }

    & img {
        width: 13rem;
        height: 13rem;
        object-fit: cover;
        object-position: center;
    }

    &:before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to top, var(--couleur-violet) 0%, var(--couleur-orange) 100%);
        mix-blend-mode: color;
        z-index: 2;
        opacity: 1;
        transition: opacity 500ms;
    }
}

/* Colonnes */
.wf-columns {
    margin-top: var(--spacing-large);
    margin-bottom: var(--spacing-large);
    gap: var(--spacing-large) !important;
    width: 100%;
}

.wf-columns:has(.wf-column > img:only-child) {
    align-items: stretch;
    gap: var(--spacing-normal);

    .wf-column:not(has:img) {
        align-self: center;
    }

    & p:has(img) {
        display: block;
        height: 100%;
        width: auto;
    }

    & img {
        object-fit: cover;
        height: 100%;
        width: auto;
    }
}

/* Pour éviter que les images des colonnes se suivent en mobile */
@media (width<961px) {
    .wf-columns:has(.wf-column:last-child > img)+.wf-columns:has(.wf-column:first-child > img) {
        flex-direction: column-reverse;
    }
}

.wf-column {
    & h2:first-child {
        margin-top: 0;
    }

    & table {
        width: 100%;
    }

    & table:is(:only-child, :first-child) {
        margin-top: 0;
    }
}

.contenu-article-header {
    width: 100%;

    @media (width >=768px) {
        display: flex;
        flex-direction: row-reverse;
        justify-content: start;
        align-items: start;
        position: relative;
    }
}

.contenu-texte {
    & p {
        max-width: 70rem;
    }
}

/* pour adaptation à l'image top */
@media (width >=768px) {
    h1 {
        text-align: left;
    }

    h2,
    h3 {
        width: fit-content;
    }
}

.com-content-article {
    & li:last-child {
        margin-bottom: 0;
    }
}

/* image illustration haut d'article */
.contenu-image-top {
    align-self: end;
    width: fit-content;
    margin: 0 auto;
    margin-bottom: var(--spacing-large);

    height: fit-content;

    @media (width >=768px) {
        margin-left: var(--spacing-normal);
        margin-bottom: var(--spacing-normal);
        float: right;
    }

    & figure {
        display: block;
        position: static;

        & img {
            width: clamp(30rem, 30vw, 52rem);
        }

        & img {
            height: 100%;
        }
    }
}

.com-content-article,
.blog {

    & img,
    & figure,
    .item-image {
        border-radius: var(--radius-petit);
    }

    & figure {
        & img {
            object-fit: cover;
        }

        &.left {
            margin-right: var(--spacing-normal);
        }

        &.right {
            margin-left: unset;
            float: unset;
        }
    }

    & figcaption {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: fit-content;
        background-color: #e9e9e9ed;
        text-align: center;
        color: var(--couleur-noir);
        padding: var(--spacing-xxxpetit) var(--spacing-xxpetit);
    }

    .image-top {
        width: 100%;
        height: 100%;
    }

    & ul:not(:is(:has(img), .btn, .tuile)) {
        overflow: visible;
        list-style: disc;
        padding-left: var(--spacing-petit);
    }
}

.tarifs-location {
    & thead tr * {
        padding-top: 0;
    }
}

/* gestion de l'affichage du template en grid */
.blog-items {
    column-count: 1 !important;

    .item-image {
        float: unset
    }

    .blog-item {
        & figure:first-child {
            margin-top: var(--spacing-large);
        }
    }

    >div {
        display: block !important;
    }
}

div:not(.item-pageaccueil):has(.image-top.right) h1 {
    margin-left: 0;
}

/* ---------------------- FIN ARTICLES */
