*, *::before, *::after { box-sizing: border-box; } body { line-height: 1.45; -webkit-font-smoothing: antialiased; } img, picture, video, canvas, svg { display: block; height: auto; max-width: 100%; } input, button, textarea, select { font: inherit; margin: 0; } iframe { border: 0; }

/* intégration locale du caractère */
@font-face {
    font-family: 'BricolageGrotesque';
    src: url('BricolageGrotesque-Regular.woff2') format('woff2'),
        url('BricolageGrotesque-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.bricolage {
    /* Optical size: 12 – 96 */
    /* Weight: 200 – 800 */
    /* Width: 75 – 100 */
    font-variation-settings: "wght" var(--bricolage-wght, 400), "wdth" var(--bricolage-wdth, 100), "opsz" var(--bricolage-opsz, 14);
}

body{
    
	--basesize: 1.125em;
	--baselh: 1.25;
	--baseline: var(--basesize) * var(--baselh);

	/*	 marge au dessus du titre et du logo */
	--titlemargin: 15px;
    background: #fafafa;
	font-family: "BricolageGrotesque";
	color: #0040FF;
	margin: 0;
	font-size: var(--basesize);
	line-height: var(--baselh);
}
/* page work : le scroll est géré par le main.work-detail */
[data-template="work"] {overflow: hidden;}

a {
	color: currentColor;
	text-decoration: none;
}
a:hover{
	color: #00fff7;
}





/*------------------------------------------------------- menu */

.header {
	position: fixed;
	top: 0;
	left: 0;
	padding-top: var(--titlemargin);
	padding-left: 25px;
	z-index: 1;
}
nav{
	position: absolute;
    top: 0;
    left: 0px;
    padding: 12px 0;
    width: calc(100vh - 2.4em);
    gap: 0.6em;
    transform-origin: 0 0;
    transform: translateY(100%) rotate(-90deg) translateX(-100%);
    display: flex;
    justify-content: center;
}
.logo{
    position: relative;
    z-index: 1;
}

nav span + span::before {
    content: " — ";
    padding-right: .65em;
}

.about::before {
    content: " — ";
    padding: 0 .65em;
}

[data-template="work"] nav, 
[data-template="work"] .about,
/*[data-intended-template="about"] nav, */
[data-intended-template="about"] .about {
	display: none;
}


@media (max-height:600px){
    .header{position: static;}
    nav {
        transform: none;
        position: static;
        width: auto;
        justify-content: start;
        padding-left: 0;
        flex-wrap: wrap;
        gap: 0 0.6em;

    }   
    nav span + span::before {
        content: none
    }
    [data-template="work"] .logo,
    [data-intended-template="about"] .logo{
        position: fixed;
        left: 8px;
        transform-origin: 0 0;
        transform: rotate(-90deg) translateX(-100%);
    }
    .title {
        padding: 0;
    }
}
@media (max-width:600px){
    .header{position: static;}
    nav {
        transform: none;
        position: static;
        width: auto;
        justify-content: start;
        padding-left: 0;
        flex-wrap: wrap;
        gap: 0 0.6em;

    }   
    nav span + span::before {
        content: none
    }
    [data-template="work"] .logo,
    [data-intended-template="about"] .logo{
        position: fixed;
        left: 8px;
        transform-origin: 0 0;
        transform: rotate(-90deg) translateX(-100%);
    }
    .title {
        padding: 0;
    }
}
/*------------------------------------------------------- accueil */

.works-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    align-items: center;
	grid-gap: 40px;
	margin: 40px 40px 40px 80px;
	--color: #aeaeae;

}
@media (min-width: 1700px) {
	.works-list {
		grid-template-columns: repeat(4, 1fr);
	}
}
@media (max-width: 350px) {
    .works-list {
        grid-template-columns: 1fr;
    }
}
.works-list .work {
    padding-top: calc(var(--pdt, 0) * 10px);
}
.works-list figure {
	margin: 0;
	padding: 15px;
	position: relative;
    background-size: auto var(--zoom, 100%);
    background-position: center center;
}

.works-list img {
	width: 100%;
	display: block;
	position: relative;
}
.works-list figure::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 250ms;
    background: linear-gradient(to bottom, var(--color), transparent);
    background-size: 100% 120%;
    mix-blend-mode: normal;
}
.works-list a:focus figure::before,
.works-list figure:hover::before {
    opacity: 1;
}
.work-title {
    opacity: 0;
    text-align: center;
    display: block;
    padding: 10px 0;
    transition: opacity 150ms;
}
.works-list a:focus {
    outline: none;
}
a:focus .work-title,
a:hover .work-title {
    opacity: 1;
    color: #0040FF;
}
@media (pointer:coarse) {
    .work-title {
    	opacity: 1;
	}
}
@media (max-width:600px) {
	.work-title {
    	opacity: 1;
	}
	.works-list {
		margin: 25px;
	}
    .work{
        padding: 0 !important;
    }
}

/* a propos */

.about-detail {
    padding: 15px 50px 0 84px;
    position: fixed;
    inset: 0;
    width: 100%;
    background: #fafafa;
    overflow-y: scroll;
}

.about-detail p {
    max-width: 25em;
    margin-block: 0 1.5em;
    margin-inline: 2em 0;
    text-wrap: balance;
    
}
.about-detail p:nth-child(odd) {
    margin-inline: 0 2em;
    
}
    

/* work */

.work-detail {
    background: #fafafa;
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: 45px 1fr;
    gap: 40px;
    align-items: start;
    padding: 0 40px 0 40px;
    position: fixed;
    inset: 0;
    width: 100%;
    overflow-y: scroll;

}
.title, .close  {
    text-align: right;
    padding-top: var(--titlemargin);
}
.title {padding-left: 5em
}
.close {
	margin-right: -20px;
}
.text p:first-child{
margin-top: 0;	
}  
.infos, .close {
    position: sticky;
    top: 0;
}
.images {
    max-width: 800px;
    padding-bottom: 20px;
}
.images img {
	margin-bottom: 20px;

}


@media (max-width: 800px) {
    .work-detail {
        grid-template-columns: 1fr;
    }
    .title {
        text-align: center;
        padding: var(--titlemargin) 20px;
    }
    .infos { 
        position: static;
    }
    .close {
    	position: fixed;
    	right: 40px;
    }
    
}
