@font-face {
    font-family: 'Overused Grotesk';
    font-weight: 300 900;
    font-style: normal;
    src: url("fonts/OverusedGrotesk-VF.woff2") format('woff2'),
        url("fonts/OverusedGrotesk-VF.woff") format('woff');
}

:root {
    --bg: #fff;
    --accent: #2e0303;
    --accent-soft: #130001;
    --text-main: #000;
    --text-muted: #bababa;
    --text-soft: #e4e4e4;

    --transition-duration: 0.4s;

    --margin-position-1: 30vh;
    --margin-position-2: 23vh;
    --margin-position-3: 40vh;
    --margin-position-4: 53vh;

    --gap-grid-full: 1em;
    --gap-grid-half: 1em;
    --gap-grid-quarter: 0.5em;
}

:root[data-theme="dark"] {
    --bg: #000;
    --text-main: #fff;
    --text-muted: #999;
    --text-soft: #888;
    --accent: #ac0813;
    --accent-soft: #580409;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg: #000;
        --text-main: #fff;
        --text-muted: #999;
        --text-soft: #888;
        --accent: #ac0813;
        --accent-soft: #580409;
    }
}

/* * {
    border: 0.1px solid red;
} */

body {
    font-family: 'Overused Grotesk', Helvetica, Arial, sans-serif;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
    letter-spacing: .01em;
    background-color: var(--bg);
    transition: background-color var(--transition-duration), color var(--transition-duration);
}

/* =============================      TYPOGRAPHY     ======== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: 1em;
    font-weight: 500;
    margin: .75em 0;
    color: var(--text-main);
}

h3 {
    margin-top: 15vh;
}

h4 {
    color: var(--text-muted);
}

p {
    margin: .75em 0;
    color: var(--text-main);
}

a {
    color: var(--text-main);
    text-decoration: none;

    transition: .8s ease-in-out;
}

a:hover {
    text-decoration: underline;
}

/* =============================      COLORS     ======== */

.grey {
    color: var(--text-muted);
}

/* =============================      STRUCTURE     ======== */

figure {
    margin: 0;
    padding: 0;
    width: 100%;
    position: relative;
}

figure figcaption {
    text-align: end;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5em;
    color: #fff;
    z-index: 1;
}

img {
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

li {
    margin: 0;
    padding: 0;
}


ul li a {
    color: var(--text-muted);
}

/* ------------------- NAVIGATION ------------------- */

nav {
    margin: .3em 0;
}

nav a {
    margin-right: .5em;
    color: var(--text-muted);
}

nav a.active {
    margin-right: .5em;
    color: var(--text-main);
}

#light-dark-toggle {
    background: none;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    margin: 0;
    padding: 0;
}

#light-dark-toggle:hover {
    color: var(--text-main);
}

.nav-menu {
    display: block;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-1em);
    pointer-events: none;
    transition: opacity .4s ease-in-out, transform .4s ease-in-out;
}

.nav-menu.menu-on {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

section {
    margin-bottom: 10vh;
}

.inner {
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

main {
    min-height: 100vh;

}

main section:last-child {
    margin-bottom: 0;
}


/* ------------------- POSITIONS ------------------- */

.position-1 {
    margin-top: var(--margin-position-1);
}

.position-2 {
    position: absolute;
    top: var(--margin-position-2);
    left: 0;
}

.position-3 {
    position: absolute;
    top: var(--margin-position-3);
    left: 0;
}

.position-4 {
    position: absolute;
    top: var(--margin-position-4);
    left: 0;
}

/* ------------------- COLUMNS ------------------- */

.cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-grid-full);
}

.cols-2 .col-2 {
    grid-column: span 2;
}

.inner .col .container {
    position: relative;
}

.flex {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-grid-full);
}

.jusification p {
    display: flex;
    align-items: flex-start;
    /* important pour gérer les <br> */
}

.firsts {
    flex: 1;
    /* prend toute la largeur disponible */
    color: var(--text-muted);
}

.seconds {
    margin-left: auto;
    /* pousse à droite */
    text-align: right;
}

.sec-fixe {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.cols-3 .col-3 {
    display: flex;
    justify-content: end;
}

.cols-3 .col-3 .images {
    width: calc(calc(100%/4)*3);
}

.cols-2 .col-2 .images {
    width: calc(calc(100%/4)*3);
}

.cols-2 .col-2 .half .images {
    width: 100%;
}

/* Galleries */

.gallery-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-grid-full);
}

.gallery-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-grid-full);
}

.gallery-2.gap-half,
.gallery-3.gap-half {
    gap: .5em;
}


/* =============================      HEADER     ======== */

header {
    position: fixed;
    top: 1em;
    left: 0;
    right: 0;
    z-index: 1000;
}

header .logo {
    width: 6em;
}


/* =============================      FOOTER     ======== */


footer {
    border-top: 1px solid var(--text-main);
    padding-top: 1em;
    background-color: var(--bg);
    z-index: 99999;
}

footer ul {
    margin: 1em 0 3em;
}

footer .top .wrapper {
    display: flex;
    justify-content: space-between;
}

footer .top .cols .col nav:last-child a {
    margin-right: 0;
    margin-left: .5em;
}

footer .bottom {
    color: var(--grey);
}

footer .bottom .cols .col:last-child {
    text-align: end;
}



/* ------------------- COLONNE PHOTOS ------------------- */

/* Colonne photos FIXE */
.col-photos {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}


.photos-inner {
    position: absolute;
    width: 100%;
    will-change: transform;
    /* optimisation */
    /* pour inversé déactivé bottom */
    bottom: 0;
}

body.projects .sec-01 .position-1 figure {
    position: absolute;
    bottom: -35vh;
}




/* ===== Responsive ===== */
@media (max-width: 900px) {
    .cols {
        grid-template-columns: 1fr;
    }

    .cols-2 .col-2,
    .cols .col-1 {
        grid-column: span 1;
    }

    .flex {
        grid-template-columns: 1fr;
    }

    .sec-fixe {
        position: static;
    }

    .inner .col .container {
        margin-top: 4vh;
    }

    .cols-3 .col-3 {
        justify-content: stretch;
    }

    .cols-3 .col-3 .images,
    .cols-2 .col-2 .images,
    .cols-2 .col-2 .half .images {
        width: 100%;
    }

    /* la colonne photos ne peut plus rester collée/fixe sur mobile */
    .col-photos {
        position: static;
        height: auto;
        overflow: visible;
    }

    .photos-inner {
        position: static;
    }

    h3 {
        margin-top: 4vh;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 13px;
    }

    .inner {
        padding: 0 16px;
    }

    header {
        top: 0.5em;
    }

    header .cols-3 {
        gap: 0.5em;
    }
}