/* ----- polices ----- */
@font-face {
    font-family: "PYM Italian";
    src: url("fonts/italian.woff2") format("woff2"),
         url("fonts/italian.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "PYM Garamond";
    src: url("fonts/garamond.woff2") format("woff2"),
         url("fonts/garamond.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}

/* ----- nettoyage ----- */
*, *::before, *::after {
    box-sizing: border-box;
}
* {
    margin: 0;
    padding: 0;
    font: inherit;
    line-height: 1.1em;
}
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}
a {
    text-decoration: none;
    color: inherit;
}
ul, ol, dl {
    list-style: none;
}

/* ----- définitions générales ----- */
:root {
    font-family: 'PYM Garamond', 'Times New Roman', serif;
    font-size: 20px;
    font-weight: normal;
    --black: #222222;
    --red: #cd042c;
    --grey: #9da3a4;
    --silver: #e5e6e7;
    --white: #fbfbfb;

    --swiper-pagination-bullet-size: 12px;
    --swiper-pagination-bullet-vertical-gap: 6px;
    --swiper-pagination-right: 8px;
    --swiper-pagination-color: var(--red);
    --swiper-pagination-bullet-inactive-color: var(--grey);
    --swiper-pagination-bullet-inactive-opacity: 0.5;
}

html, body {
    overscroll-behavior-x: none;
    background-color: var(--white);
    height: 100%;
}

/* ----- navigation ----- */

header {
    position: fixed;
    z-index: 2;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

h1 {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0.2em;
}

#nav-monogram {
    height: 1.5em;
}

#nav-hamburger {
    display: block;
    height: 1.5em;
    width: 1.5em;
    border: none;
    background-color: transparent;
}

#nav-hamburger.open #nav-open { opacity: 0; }
#nav-hamburger.close #nav-close { opacity: 0; }

#nav-links {
    position: fixed;
    z-index: 3;
    top: 48px;
    right: 0px;
    padding: 15px 25px;
    background-color: var(--white);
    box-shadow: -2px 4px 4px rgba(0, 0, 0, 0.2);
}

#nav-socials {
    display: flex;
    flex-direction: row;
    margin-top: 0.7em;
    gap: 0.7em;
}

#to-top {
    position: fixed;
    display: block;
    z-index: 3;
    bottom: 50px;
    right: 0;
    height: 50px;
    width: 50px;
    color: var(--red);
    transition: opacity 100ms linear, transform 200ms linear;
    opacity: 0;
    transform: translateX(60px);
}

#to-top text {
    font-size: 55px;
}

#to-top .white {
    fill: var(--white);
}

#to-top.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ----- swipers ----- */

main.vertical-swiper {
    height: 100%;
}

.vertical-slide {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 65px 25px 15px 15px;
    gap: 1em;
}

.title-slide {
    background-color: var(--grey);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-blend-mode: screen;
    box-shadow: inset 0 48px var(--white);
}

#home .title-slide          { background-image: url("images/wallpapers/home_m.jpg");
                              background-color: var(--red); background-blend-mode: multiply; }
#studio .title-slide        { background-image: url("images/wallpapers/studio_m.jpg"); }
#works .title-slide         { background-image: url("images/wallpapers/works_m.jpg"); }
#techniques .title-slide    { background-image: url("images/wallpapers/techniques_m.jpg"); }
#contact .title-slide       { background-image: url("images/wallpapers/contact_m.jpg"); }

.horizontal-swiper {
    width: 100%;
    height: 100%;
}

.horizontal-swiper .swiper-slide {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.horizontal-swiper .photo-slide {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    width: auto;
    aspect-ratio: 2/3;
}

/*
.thumbs-swiper {
    height: 30%;
}

.thumbs-swiper .swiper-wrapper {
    width: 100%;
}

.thumbs-swiper .swiper-slide {
    width: 50px !important;
    height: auto;
    aspect-ratio: 2/3;
}
*/

/* ----- styling ----- */

h2 {
    font-family: 'PYM Italian';
    font-size: 60px;
    text-transform: uppercase;
    line-height: 0.75em;
    color: var(--red);
    mix-blend-mode: multiply;
}

.box {
    position: relative;
    padding: 12px 16px;
}

.box::before {
    position: absolute;
    inset: 0;
    content: "";
}

.big {
    color: var(--red);
    mix-blend-mode: multiply;
    font-size: 30px;
 }

.red.box::before    { background-color: var(--red); mix-blend-mode: multiply; }
.red.box > *        { color: var(--white); }
.grey.box::before   { background-color: var(--grey); mix-blend-mode: multiply; }
.grey.box > *       { color: var(--white); }
.white.box::before  { background-color: var(--white); mix-blend-mode: hard-light; }
.white.box > *      { color: var(--black); }
.silver.box::before { background-color: var(--grey); mix-blend-mode: color-burn; }
.silver.box > *     { color: var(--white); mix-blend-mode: screen; }

.box > * {
    isolation: isolate;
}

.two-boxes {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 1em;
}
.two-boxes > div:nth-child(1) { flex: 0 1 50%; min-height: 0; overflow: hidden; }
.two-boxes > div:nth-child(2) { flex: 0 0 auto; min-height: 0; }

.two-boxes.no-grow { flex-grow: 0; }
.two-boxes.no-grow > div { flex: 0 0 auto; min-height: 0; }

/* ----- spécifique à certaines pages ----- */

#home svg {
    width: 100%;
    color: var(--silver);
}

#home svg #monogram {
    fill: var(--black);
    mix-blend-mode: multiply;
}

#home svg .pym {
    font-family: 'PYM Italian';
    font-size: 50px;
}

#home svg .desc {
    transform: translate(20px, 20px);
    font-family: 'PYM Garamond';
    font-size: 15px;
}

#home svg .lozenges {
    stroke: var(--black);
    stroke-width: 1.2px;
    fill: none;
}
 
 #works .title-slide dt {
    color: var(--black);
 }

.work-title,
.technique-title {
    font-family: 'PYM Italian';
    font-size: 40px;
    line-height: 0.8em;
    text-transform: uppercase;
    color: var(--red);
}

.work-description {
    margin: 2em 0;
}

.work-year,
.work-category,
.work-collaboration,
.work-credits {
    color: var(--grey);
}

.work-category,
.work-credits,
.swipe-right {
    font-size: 0.8em;
}

.sample-slide {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    outline: 1px solid var(--black);
    outline-offset: -1px;
}

.sample-slide .technique-sample {
    padding: 3px 5px;
    color: var(--white);
    background-color: var(--black);
}


.swipe-right { color: var(--red); }

.swipe-right svg { transform: translateY(0.5em); height: 1.5em; }

#contact form {
    width: 100%;
}

#contact form p {
    margin: 8px 0;
}

#contact p[hidden] {
    display: none !important;
}

#contact form label {
    display: block;
}

#contact fieldset {
    border: none;
}

#contact form input,
#contact form textarea {
    width: 100%;
    padding: 3px 5px;
    border: 1px solid var(--grey);
    background-color: var(--white);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1),
    0 1px 1px rgba(255, 255, 255, 0.4);
    resize: unset;
}

#contact form button {
    padding: 2px 5px 8px 5px;
    border: 1px solid var(--grey);
    box-shadow: inset 0 -5px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.3);
}

#contact form button:active {
    margin-top: 6px;
    padding: 2px 5px 2px 5px;
    border: 1px solid var(--grey);
    box-shadow: inset 0 -2px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.3);
}

#contact form #contact-response {
    min-height: 3em;
    margin-top: 1em;
    color: var(--red);
}

/* ========== ordinateur ========== */

@media (min-width: 768px) {

    :root {
        --swiper-pagination-bullet-size: 12px;
        --swiper-pagination-bullet-vertical-gap: 6px;
        --swiper-pagination-right: 20px;
    }

    /* ----- navigation ----- */

    header {
        margin: 0 35px;
    }

    #nav-hamburger { display: none; }

    #nav-links {
        position: static;
        display: flex !important;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 1.4em;
        padding: 0;
        background-color: transparent;
        box-shadow: none;
    }

    #nav-links ul {
        display: flex;
        flex-direction: row;
        gap: 0.7em;
    }

    #nav-socials {
        margin-top: 0;
    }

    #nav-socials svg {
        transform: scale(1.2);
    }

    #to-top {
        top: 80px;
        bottom: auto;
    }

    h2 {
        font-size: 80px;
    }

    .two-boxes {
        display: flex;
        flex-direction: row;
        flex-grow: 0;
        width: 600px;
        height: auto;
    }
    .two-boxes > div:nth-child(1) { flex: 0 0 50%; }
    .two-boxes > div:nth-child(2) { flex: 0 0 50%; }

    /* ----- swipers ----- */

    .vertical-slide {
        padding: 60px;
    }

    .title-slide {
        box-shadow: inset 0 0 0 50px var(--white);
    }

    #home .title-slide          { background-image: url("images/wallpapers/home_d.jpg"); }
    #studio .title-slide        { background-image: url("images/wallpapers/studio_d.jpg"); }
    #works .title-slide         { background-image: url("images/wallpapers/works_d.jpg"); }
    #techniques .title-slide    { background-image: url("images/wallpapers/techniques_d.jpg"); }
    #contact .title-slide       { background-image: url("images/wallpapers/contact_d.jpg"); }

    .horizontal-swiper {
        height: auto;
    }

    .horizontal-swiper .swiper-slide {
        width: auto;
        height: 70vh;
        aspect-ratio: 2/3;
        overflow: hidden;
    }

    /* ----- spécifique à certaines pages ----- */

    #home .title-slide {
        align-items: flex-start;
    }

    #home svg {
        width: 45%;
        height: 100%;
    }

    #contact form {
        max-width: 20em;
    }

    #contact form p {
        display: flex;
        flex-direction: row;
        gap: 1em;
        justify-content: center;
    }

    #contact form label {
        width: 6em;
    }

}
