/* ==========================================================================
   ==========================================================================

    * Components *
    Propriétes et éléments des composants principaux du site

    Sommaire :
    - ContentList
    - ContentDetail

============================================================================= */

/* ========================================================================== */
/* # ContentList   */
/* ========================================================================== */

body.ContentListComponent{
    .h1{
        text-align: center;
        font-size: var(--f-4XL); 
    }
    &:not([data-theme="episodes"]) #main-content {
        background-image: url("../images/texture_top_skippercreditmutuel@2x.png");
        background-position: center -70px;
        background-size: contain;
        background-repeat: no-repeat;
        @media screen and (max-width: 780px) {
            background-position: center -10px;
            
        }
    }
}

.ContentList[data-type="Component"]{ 
    margin-top: 32px !important;
       
    .itemsList:not(:has(.mediatheque)) {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 20px;

        @media screen and (max-width:768px) {
            grid-template-columns: 1fr;

            article.article:first-child {
                .content{
                    display: block;
                }
            }
        }

        article.article:first-child {
            @media screen and (min-width:769px) {
                grid-column: span 2;
            }

            figure{
                aspect-ratio: 189/ 92;
            }

            .corps{
                .h2{
                    font-size: 3.2rem;
                    line-height: 3.2rem;
                }
            }

            .content{
                display: block !important;
            }
            
        }
    }
    .itemsList:has(.mediatheque) {
        display: flex;
        flex-direction: column;
        gap: 62px;
        .mediatheque {
            display: flex;
            flex-direction: column;
            gap: 24px;
            .topContent {
                color: var(--color-main);
                display: flex;
                flex-direction: column;
                gap: 24px;
                .title {
                    font-size: var(--f-4XL);
                    color: inherit;
                }
                .headline {
                    font-size: var(--f-XL);
                    font-weight: normal;
                }
            }
            ul {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(262px, 262px));
                gap: 20px;
                @media screen and (max-width: 575px) {
                    grid-template-columns: 1fr;
                }
                li {
                    img {
                        height: 100%;
                        width: 100%;
                        object-fit: cover;
                    }
                }
            }
        }
    }
}

/* ========================================================================== */
/* # ContentList - Episodes  */
/* ========================================================================== */

.ContentListComponent[data-theme="episodes"]{
    .EpisodesContentList{
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;


    }

}

/* ========================================================================== */
/* # ContentDetail   */
/* ========================================================================== */
.ContentDetailComponent {
    .detail {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .back-page {
        font-size: var(--f-S);
        font-weight: 700;
        span {
            font-size: inherit;
            margin-right: 6px;
        }
        &:hover {
            text-decoration: none;
        }
    }
    .content {
        display: flex;
        gap: 24px;
        @media screen and (min-width: 1171px ) {
            margin-top: 70px;
        }
        @media screen and (max-width: 1170px ) {
            margin-top: 40px;
        }
        &:not(.wrap-detail) {
            flex-direction: column;
        }
        .topContent {
            color: var(--color-main);
            display: flex;
            flex-direction: column;
            .infos {
                font-weight: 700;
                text-transform: uppercase;
                font-family: var(--font-secondary);
                font-size: var(--f-S);
                span {
                    color: var(--color-text);
                }
            }
        }
    }

    .mainContent-in {
        display: flex;
        flex-direction: column;
        gap: 24px;
        .accroche {
            font-size: inherit;
            text-wrap: auto;
            color: var(--color-text_alt);
            font-weight: 650;
            color: var(--color-main);
        }
        .textComponent {
            display: flex;
            flex-direction: column;
            gap: 24px;
            strong {
                font-size: var(--f-M-Strong);
                font-family: var(--font-secondary);
            }
            .nombre {
                text-align: center;
            }
            .note {
                font-size: var(--f-S);
            }

        }
        .imagesComponent {
            .componentDescription {
                margin-bottom: 12px;
            }
            img {
                width: 100%;
                aspect-ratio: 3 / 2;
                object-fit: contain;
            }
            figcaption {
                text-align: center;
                font-size: var(--f-S);
            }
        }
        ul {
            list-style: disc;
            padding: revert;
            list-style-position: inherit;
        }
        .content > figure{
            img {
                width: 100%;
                aspect-ratio: 3 / 2;
                object-fit: contain;
            }
            figcaption {
                text-align: center;
                font-size: var(--f-S);
            }
        }
    }
    .content-left {
        display: flex;
        flex-direction: column;
        gap: 32px;
        @media screen and (max-width: 760px){
            gap: 16px;

        }
    }
    .afterContent {
        margin-top: 100px;
        max-width: 1000% !important;
        margin-top: 120px !important;
        padding-top: 30px;
        > * {
            max-width: var(--size-wrapper);
            margin: 0 auto;
        }
    }
    .wrap-detail {
        display: flex;
        gap: 165px;
        @media screen and (max-width: 1170px) {
            flex-direction: column;
            gap: 24px;
        }
        .content-left {
            flex: 1;
        }
        .content-right {
            width: 100%;
            max-width: 370px;
        }
    }
    .videoComponent {
        .componentDescription {
            font-family: var(--font-secondary);
            color: var(--color-text);
            font-size: var(--f-2XL);
            line-height: 5rem;
            font-weight: 650;
            margin-bottom: 16px;
        }
        iframe {
            width: 100%;
            aspect-ratio: 16/9;
        }
    }
    &[data-theme="actualites"] {
        .topContent {
            text-align: center;
            gap: 15px;
        }
        img {
            aspect-ratio: 16/9;
            object-fit: cover;
        }
        .afterContent {
            border-top: 1px solid var(--color-text_contrast);
        }
        
    }
    &[data-theme="equipe"] {
        .topContent {
            .h1 {
                color: var(--color-text);
            }
        }
        .content-right {
            min-width: 370px;
            img {
                aspect-ratio: 1 / 1;
                object-fit: cover;
            }

            figcaption{
                display: none;
            }
        }
        .richContentComponent{
            display: flex;
            flex-direction: column;
            gap: 24px;
        }
    }
    &[data-theme*="pages-statiques"] {
        .content-landing {
            .topContent {
                width: 100%;
                min-height: 100vh;
                text-align: center;
                position: relative;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                color: var(--color-background);
                figure {
                    position: absolute;
                    z-index: -1;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    background-color: var(--color-invariant_black);
                    img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                        opacity: 0.7;
                    }
                }
                .infos {
                    color: inherit;
                    font-family: var(--font-secondary);
                    font-size: var(--f-XL);
                    letter-spacing: 6px;
                    text-shadow: 0px 0px 10px var(--color-invariant_black);
                    font-weight: 750;
                    text-transform: uppercase;
                }
                &:before,
                &:after {
                    position: absolute;
                    content: " ";
                    left: 0;
                    right: 0;
                }
                &:before {
                    height: 20%;
                    top: -50px;
                    background: url(../images/texture_top_skippercreditmutuel@2x.png) no-repeat;
                    background-size: cover;
                    background-position: bottom center;
                }
                &:after {
                    height: 32%;
                    bottom: 0;
                    background: url(../images/texture_bottom_skippercreditmutuel@2x.png) no-repeat;
                    background-size: cover;
                    background-position: top center;
                }
            }
            .content-wrap {
                max-width: var(--size-wrapper);
                margin: 100px auto 0;
                padding: 0 16px;
                @media screen and (max-width: 700px) {
                    margin-top: 17px;
                }
            }
        }
    }
    &[data-theme="pages-statiques"] {
        .afterContent {
            background-color: var(--color-clear);
            display: flex;
            flex-direction: column;
            gap: 42px;
            padding-bottom: 30px;
        }
    }
    &[data-theme="evenement"] {
        .topContent {
            margin-left: calc(50% - 50vw);
            margin-right: calc(50% - 50vw);
            max-width: 1000%;
            width: auto;
            position: relative;
            min-height: 400px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--color-invariant_white);
            figure {
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background-color: var(--color-invariant_black);
                z-index: -1;
                img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    opacity: 0.7;
                }
            }
            .h1 {
                color: inherit;
            }
        }
        .textComponent {
            .titreresultat {
                font-family: var(--font-secondary);
                color: var(--color-text);
                font-size: var(--f-3XL);
                line-height: 5rem;
                font-weight: 650;
            }
            &:has(.pararesultat) {
                background-color: var(--color-background_light);
                padding: 16px;
                @media screen and (min-width: 701px) {
                    display: grid;
                    grid-template-areas: "titre tableau""bouton tableau";
                    grid-template-columns: 40% 60%;
                }
                .h3 {
                    grid-area: titre;
                }
                p:has(.linkBtn1) {
                    grid-area: bouton;
                    align-self: flex-end;
                }
                ul {
                    grid-area: tableau;
                    list-style: none;
                    padding: 0;
                    display: flex;
                    flex-direction: column;
                    gap: 16px;
                    @media screen and (min-width: 701px) {
                        margin-left: auto;
                        margin-right: 0;
                        width: 100%;
                    }
                    li{
                        border-bottom: 1px solid var(--color-main);
                        padding-bottom: 8px;
                    }
                }
            }
        }

        .richContentComponent:not(:has(.pararesultat)){
            display: flex;
            flex-direction: column;
            gap: 24px;
        }
    }
}