:root {
    --color-white-transparent-80: rgba(255, 255, 255, 0.8);
    --color-blue-dark: #043882;
    --color-blue-light: #6795d4;
    --color-red-dark: #e5263a;
    --color-orange-dark: #f08d2e;
    --color-purple-dark: #a063a1;
    --color-green-dark: #73b879;

    --text-color-black: #1a171b;
    --text-color-white: white;

    --padding-main: 1rem;
}


body {
    font-family: NoirPro-Light;
    margin: 0;
    padding: 0;
    background-color: var(--color-blue-light);
    z-index: 0; /* main has 10 */
}

main {
    z-index: 10;
    position: relative;
}

canvas {
    position: fixed;
    top: 0; left: 0;
    z-index: 0;
}



.main {
    position: relative;
    z-index: 1;
    color: var(--text-color-black);
    /* display: flex; */
    /* flex-direction: column; */
    padding: var(--padding-main);
    max-width: 1100px;
    margin: auto;

    & > header {
        background-color: var(--color-white-transparent-80);
        padding: 1rem;
        border-radius: 1rem;
        gap: 20px;
        box-shadow: 0 20px 30px rgba(0,0,0,0.1);
        
        & .logo {
            grid-area: logo;

            & img {
                -webkit-filter: drop-shadow(0px 0px 10px rgb(255, 255, 255));
                filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 1));
            }
        }

        & .asso {
            font-size: 70%;
            color: var(--text-color-black);
            grid-area: asso;
        }
        
        & .sitename {
            grid-area: name;
            text-align: left;
            margin-top: 4rem;
            font-family: NoirPro-Bold;
            text-shadow: 2px 2px rgba(255,255,255,0.5);
            margin-top: 0;
            text-transform: uppercase;
            color: var(--text-color-black);
            font-size: 2.5rem;
            /* text-wrap: nowrap; */
            /* max-width: 100%; */

            -webkit-transition: font-size 0.3s;
            -moz-transition: font-size 0.3s;
            -o-transition: font-size 0.3s;
            transition: font-size 0.3s;
        }

        & .menu-principal-container {
            grid-area: menu;
        }
        
    }

    & .breadcrumbs {
        padding: 20px 15px;
        color: rgba(255,255,255,0.8);
        
        & a {
            color: rgba(255,255,255,0.8);
        }
    }

    & .intro {
        margin: 2rem auto 4rem;
        font-weight: bold;
        padding: var(--padding-main) calc(var(--padding-main) * 2);
        max-width: 800px;
        initial-letter: 3;
        /* border-left: 1px solid var(
            --text-color-black); */
        background-color: var(
            --color-white-transparent-80);

        p:first-child {
            margin-top: 0;
        }

        /* p:first-child::first-letter {
            initial-letter: 2;
            margin-right: 0.3rem;
        } */

        /* p:last-child {
            text-align: right;
        } */
    }    
}


.main {
    container-type: inline-size;
}

@container (max-width: 700px) {

    .main {

        & header {
            display: grid;
            grid-template-areas: 
                "logo asso"
                "name name"
                "menu menu";
            grid-template-columns: 50px 1fr;

            & .logo {

                & img {
                    width: 50px;
                }
            }

            & .sitename {
                font-size: 1.2rem;
                text-align: center;
            }

            & .menu-principal-container {

                & li {
                    margin-left: min(15px, 10%);
                    margin-right: min(15px, 10%);
                }
            }

        }

        /* #menu-principal {
            text-align: center;
        
            & li {
                margin-right: 0;
            }
        } */

        & .rubrique .onglet {
            padding: 1rem 1rem 2rem;
        }

        & .rubrique:nth-of-type(odd) {
            margin-left: calc( var(--padding-main) * -1 );
            padding-right: 0;
        }
        
        & .rubrique:nth-of-type(even) {
            margin-right: calc( var(--padding-main) * -1 );
            padding-left: 0;
        }

    }

}

@container (min-width: 701px) {

    .main header {
        display: grid;
        grid-template-areas: 
            "logo asso"
            "logo name"
            "logo menu";
        grid-template-columns: 150px 1fr;
    }

}

main > section, footer {
    margin-top: 4rem;
}

h1 {
    color: var(--text-color-white);
    font-size: 2.8rem;
    margin-top: 0.5em;
    text-align: center;
}

h1, h2, h3, h4, h5 {
    font-family: NoirPro-Bold;
}


#menu-principal {
    display: flex;
    flex-wrap: wrap;
    
    margin: 0;
    padding: 0;
    list-style: none;


    & li {
        position: relative;

        font-family: NoirPro-Bold;
        line-height: 24px;
        margin-right: auto;

        /* display: flex; */

        /* flex-grow: 1; */
        /* distribue  équitablement la place restante */

        /* flex-shrink: 1; */
        /* autorise le passage à la ligne */

        /* text-align: center; */
        /* justify-content: space-evenly; */

        & a:link, a:hover, a:active {
            /* color: var(--text-color-white); */
            text-decoration: none;
            text-transform: uppercase;
        }

    }

            
    & .projets a {
        color: var(--color-blue-dark);
    }
    
    & .boutique a {
        color: var(--color-red-dark);
    }
    
    & .distribution a {
        color: var(--color-orange-dark);
    }
    
    & .contact a {
        color: var(--color-purple-dark);
    }
    
    & .apropos a {
        color: var(--color-green-dark);
    }
    
    & .panier a {
        color: var(--text-color-black);
    }

    & li:not(:has(a)) {
        color: var(--text-color-black);
    }

}

#menu-footer {
    display: flex;
    padding-left: 0;
    list-style: none;
    gap: 2em;
    justify-content: center;

    & a {
        color: white;
    }
}



.rubrique:nth-of-type(even) { /* pair */
    text-align: right;
    padding-left: var(--padding-main);

    & .onglet {
        border-top-left-radius: 15px;
    }
}

.rubrique:nth-of-type(odd) { /* impair */
    text-align: left;
    padding-right: var(--padding-main);

    & .onglet {
        border-top-right-radius: 15px;
    }
}


.single {

    & .rubrique {

        & .onglet {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;

            & > div {
                min-width: 100%;
            }
            
            & .description {
                display: grid;
                grid-template-areas: "avatar infos";
                grid-template-columns: 166px 1fr;
                gap: min(30px, 5%);

                & .avatar {
                    grid-area: avatar;

                    & img {
                        border-radius: 100px;
                        border: 8px solid var(--color-blue-dark);
                        box-sizing: content-box;
                    }
                }

                & .infos {
                    grid-area: infos;
                    padding-top: 1em;
                }
                
            }

        }

    }

}


/* produits */

.product {
    & a {
        color: var(--color-blue-dark);
        text-decoration: none;
    }

    & h3 {
        height: 3.5ch;
    }
}


.rubrique {
    margin-top: 2rem;
    margin-bottom: 1rem;

    & .header {
        padding: 0 1rem;
        margin-bottom: 0;

        & h1, & h2 {
            background-color: var(--color-white-transparent-80);
            display: inline-block;
            padding: 0.5rem 1rem;
            margin: 0;
            border-top-left-radius: 15px;
            border-top-right-radius: 15px;
            text-transform: uppercase;
            
            box-shadow: 0px 10px 30px rgba(0,0,0,0.3);
            position: relative;
            z-index: 2;
        }
        
        & h1 {
            font-size: 2.4rem;
        }
        
        & h2 {
            font-size: 2.2rem;
        }
    }

    & .onglet {
        text-align: left;
        background-color: var(--color-white-transparent-80);
        color: var(--text-color-black);
        padding: 1rem 2rem 2rem;
        
        box-shadow: 0 20px 30px rgba(0,0,0,0.3);
        position: relative;
        z-index: 5;

        & .grille {
            margin-top: 3rem;

            display: flex;
            flex-flow: row wrap;
            justify-content: space-between;
            gap: 32px;
            row-gap: 32px;
            
            & article {

                display: flex;
                flex: 1 1 0; /* chaque enfant prend 1 part sur le nombre total d'enfants / <=> flex-grow: 1; flex-shrink: 1; flex-basis: 0;*/
                gap: 20px;

                & a {
                    color: var(--text-color-black);
                    text-decoration: none;
                }

                & .thumbnail img {
                    border-radius: 0.5rem;
                    border: 1px solid var(--text-color-black);
                }

                & .infos {
                    min-width: 130px;
                }

                & h3 {
                    margin: 0;
                }

                & .description .tags {
                    font-size: 80%;
                    filter: brightness(200%) saturate(0.5);
                }
            }
        }

        & .tags {
            /* position: absolute;
            top: 0;
            right: 0;
            margin: 10px 20px; */
            font-size: 80%;
            margin-bottom: 5px;
            vertical-align: middle;

            & label {
                display: inline-block;
                vertical-align: 12px;
            }

            & .btn {
                display: inline-block;
                padding: 2px 4px;
                margin-bottom: 6px;
                margin-bottom: 4px;
                background-color: var(--color-blue-light);
                color: var(--text-color-white);
                border-radius: 5px;
                text-decoration: none;
            }

            & svg {
                /* filter: invert(64%) sepia(66%) saturate(1275%) hue-rotate(186deg) brightness(86%) contrast(91%); */
                margin-right: 4px;
                margin-bottom: 4px;
            }
        }

        .tags.reseaux {
            padding-bottom: 10px;
        }
        
    } /* onglet */

}

@media screen and (max-width: 540px) {
                
    .rubrique .onglet .grille article > div:first-child img {
        max-width: 120px;
        height: auto;
    }
    
}

.projets
{
    & .onglet {
        border-top: 1rem solid var(--color-blue-dark);
    }

    & .header h1,
    & .header h2 {
        color: var(--color-blue-dark);
    }
}

.boutique
{
    & .onglet {
        border-top: 1rem solid var(--color-red-dark);
    }

    & .header h1,
    & .header h2 {
        color: var(--color-red-dark);
    }
}

.distribution
{
    & .onglet {
        border-top: 1rem solid var(--color-orange-dark);
    }

    & .header h1,
    & .header h2 {
        color: var(--color-orange-dark);
    }
}

.contact
{
    & .onglet {
        border-top: 1rem solid var(--color-purple-dark);
    }

    & .header h1,
    & .header h2 {
        color: var(--color-purple-dark);
    }
}
