/*
Theme Name: Éditions Dans la boîte
Author: Pierre-Gui Taillan
Version: 1.0
*/

* {
    box-sizing: border-box;
}

/* --------------------------------------------------
   GLOBAL
-------------------------------------------------- */

html,
body {
    margin: 0;
    padding: 0;
    background: #e3e3e3;
    color: #000;
    font-family: "Geist Sans", Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------
   HEADER
-------------------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    padding: 16px 24px 24px;


    display: flex;
    justify-content: space-between;
    align-items: center;

    z-index: 100;

    color: black;
    background: #e3e3e3;

    border-bottom: 1px solid white;
}

.site-title,
.site-nav {
    font-size: 14px;
    line-height: 1;
}

.site-title {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.site-nav {
    display: flex;
    gap: 24px;
}

.site-title a,
.site-title a:visited,
.site-title a:hover,
.site-title a:active,
.site-nav a,
.site-nav a:visited,
.site-nav a:hover,
.site-nav a:active {
    color: inherit;
    text-decoration: none;
}

/* --------------------------------------------------
   HOMEPAGE MOSAÏQUE
-------------------------------------------------- */

.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: white;
    padding-top: 55px;
}

.project-item {
    position: relative;

    display: block;

    padding: 8px;

    background: #e3e3e3;

    text-decoration: none;
}

.project-item img {
    display: block;
    width: 100%;
    height: auto;
}

/* --------------------------------------------------
   SURVOL PROJET
-------------------------------------------------- */

.project-caption {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(227,227,227,0.92);

    opacity: 0;
    transition: opacity 0.2s ease;

    color: black;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.project-item:hover .project-caption {
    opacity: 1;
}

/* --------------------------------------------------
   PAGE PROJET
-------------------------------------------------- */

.project-page {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    padding: 120px 40px 80px;
}

.project-title {
    margin: 0 0 12px;

    font-size: 24px;
    font-weight: normal;
}

.project-content {
    width: 100%;
    font-size: 18px;
    line-height: 1.45;
}

.page-id-81 .project-content {
    max-width: 1000px;
}

.project-content a,
.project-content a:visited {
    color: inherit;
    text-decoration: none;
}

.project-content a:hover {
    opacity: 0.5;
}

.project-content p,
.project-content figure,
.project-content div {
    width: 100%;
    max-width: none;
}

.project-content img {
    display: block;

    width: 100% !important;
    max-width: none !important;
    height: auto;

    margin-bottom: 24px;
}

.project-content a,
.project-content a:visited {
    color: inherit;
    text-decoration: none;
}

.project-content a:hover {
    opacity: 0.5;
}

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

.project-navigation {
    margin-top: 80px;

    display: flex;
    justify-content: space-between;

    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-navigation a {
    color: black;
    text-decoration: none;
}

.project-navigation a:hover {
    opacity: 0.5;
}

/* --------------------------------------------------
   TABLETTE
-------------------------------------------------- */

@media (max-width: 900px) {

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

    .project-page {
        padding: 100px 32px 60px;
    }

}

/* --------------------------------------------------
   MOBILE
-------------------------------------------------- */

@media (max-width: 600px) {

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

    .site-header {
        padding: 14px 18px 18px;
    }

    .site-nav {
        gap: 16px;
    }

    .project-page {
        padding: 80px 20px 40px;
    }

    .project-title {
        font-size: 24px;
    }

    .project-content {
        font-size: 14px;
    }

}

.site-title {
    font-weight: 600;
}

.site-nav {
    font-weight: 500;
}

.project-caption {
    font-weight: 500;
}

.site-index-button {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    margin: 0;

    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* --------------------------------------------------
   INDEX OVERLAY
-------------------------------------------------- */

.index-overlay {
    position: fixed;
    inset: 0;

    z-index: 90;

    background: rgba(227,227,227,0.94);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.2s ease;
}

.index-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.index-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;

    text-align: center;

    font-size: 30px;
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.index-divider {
    width: 80px;
    height: 1px;

    margin: 8px auto 16px;

    background: black;
}

.project-item {
    transition: opacity 0.15s ease;
}

.project-item.is-hidden {
    display: none;
}

.index-categories div {
    cursor: pointer;
}

.index-categories div:hover {
    opacity: 0.4;
}

.project-item.is-hidden {
    display: none;
}

.active-category {
    font-weight: 400;
    letter-spacing: 0.04em;
}

.category-separator {
    font-weight: 400;
}