@import url("./vars.css");

@media screen and (min-width: 769px) and (max-width: 1600px) {
    .title {
        .titre {
            margin-top: 22vh;
            font-size: 4.2rem;
        }

        #carnets,
        #crea {
            margin-top: 16.4vh;
            margin-left: -14.6vh;
        }

        .eau-haine {
            margin-left: -13vh;
        }

        #h {
            margin-left: -27vh;
        }

        .lettrine#wip-01,
        .lettrine#cout-02,
        .lettrine#cout-03 {
            margin-left: -21vh;
        }
    }

    .thumb-title {
        margin-top: -14.5vh;
    }

    #duras {
        padding-top: 21vh !important;
    }

    main {
        grid-template-columns: repeat(3, minmax(min-content, 1fr));
    }

    .carousel-imgs:has(.active) {
        p {
            &.active {
                margin-top: 20%;
                font-size: 1.1rem;
            }
        }

        img.paysage,
        img.portrait {
            height: 94%;
            width: auto;
        }

        & #mental-disorder.active {
            grid-template-rows: max-content min-content;

            & img {
                /* width: revert; */
                margin-bottom: 0;
                width: 30%;
                height: auto;
            }

            & audio {
                width: 30%;
                height: 5vh;
            }
        }
    }
}

/* ----- Phone ----- */
@media screen and (max-width: 768px) {

    #home-body {
        width: calc(100vw - 4vh);
        padding: 5vh 2vh;
    }

    #home-header {
        img {
            width: 100%;
        }
    }

    #home-body {
        background-position: center;
        grid-template-rows: repeat(2, minmax(min-content, 100px));
        row-gap: 10vh;
    }

    #home-main {
        width: calc(100vw - 4vh);
        grid-template-columns: 100%;
        grid-template-rows: min-content;

        #lilas,
        #home-nav {
            width: auto;
            font-size: .75rem;
        }

        #lilas {
            grid-column: 1;
            grid-row: 1;
            color: var(--violet);
            box-shadow: 2px 3px 8px rgba(50, 30, 44, 0.5);
            padding: 2vh;
            border-radius: 5px;
            background-color: #f9ddccc0
                /*var(--bg-colour)*/
            ;
        }

        #home-nav {
            display: none;
            grid-column: 1;
            grid-row: 3;
            justify-self: center;
            font-size: .95rem;

            a {
                font-size: .95rem;
            }
        }
    }

    #home-body .credits {
        background-color: none;
        width: calc(100vw - 4vh);
    }

    #mobile-message {
        display: block;
        grid-column: 1;
        grid-row: 3;
        justify-self: center;
        /* position: absolute; */
        background-color: var(--violet);
        box-shadow: 2px 3px 8px rgba(50, 30, 44, 0.5);
        padding: 2vh;
        border-radius: 5px;
        align-self: start;
        text-align: center;
        font-size: .75rem;
        color: var(--bg-colour);
        height: fit-content;
    }

    .credits {
        font-size: .6rem;
        text-align: center;
        width: calc(100vw - 10vh);
        background-color: var(--bg-colour);
        padding: 2vh 0;
        bottom: 0;
    }

    body,
    .rbq-page {
        grid-template-rows: repeat(2, min-content);
        grid-template-columns: max-content;
        row-gap: 8vh;
        font-size: .9rem;
        padding: 5vh 5vh;
        width: calc(100vw - 10vh);
    }

    header:not(#home-header) {
        flex-direction: column;
        width: inherit;
    }

    #duras {
        padding-top: 0vh !important;
        padding-bottom: 4vh;
    }

    .title {
        width: calc(100vw - 10vh);
        align-self: start;
        margin-bottom: 6vh;

        .lettrine {
            font-size: 9rem;
            height: 15vh;
        }

        .titre {
            font-size: 3rem;
            margin-top: 10.5vh;
        }

        & #carnets,
        & #crea {
            margin-top: 8.4vh;
            margin-left: -6.4vh;
        }

        .eau-haine {
            margin-left: -5.5vh;
            margin-top: 11vh;
        }

        #h::before,
        #haine::before {
            content: "\A";
            white-space: pre;
        }

        #h {
            margin-left: -29vh;
            margin-top: -5vh;
        }

        #haine {
            margin-left: 0;
            margin-top: 16.3vh;
        }

        #work {
            margin-left: -0.5vh;
            margin-top: 10vh;
        }

        .lettrine#wip-01 {
            margin-left: -10vh;
            height: 17vh;
        }

        .lettrine#cout-01,
        .lettrine#cout-02,
        .lettrine#cout-03 {
            margin-left: -13vh;
            height: 17vh;
        }

        .lettrine#cout-04 {
            margin-left: -2vh;
        }

        #apostrophe {
            margin: 6.5vh 3vh 0 -1vh;
        }


        #titre-lisart {
            line-height: 1.6;
        }
    }

    #phaine {
        height: 32vh;
    }

    #wip>* {
        line-height: 1.1;
    }

    .cat-page {
        overflow: auto;
    }

    #cat-cinema {
        #d {
            margin-left: -5vh;
        }

        #declamations {
            margin-left: 0vh;
            font-size: 2.35rem;
            margin-top: 12vh;
        }
    }

    /* About */
    #cat-about {
        display: flex;
        flex-direction: column;

        .titre:last-of-type {
            margin-top: -7.5vh;
            margin-left: 11vh;
        }

        .lettrine {
            margin-top: 0;
        }
    }

    #about {
        overflow: auto;
    }

    #about-page {
        grid-template-columns: min-content !important;
        grid-template-rows: min-content;
        gap: 2vh !important;
    }

    #infos {
        align-items: start;
    }

    #bio,
    #contact {
        grid-column: 1 !important;
        width: inherit;
    }

    /* Navs */
    .navs {
        align-self: start;
        align-items: baseline;
        font-size: .75rem;
        width: inherit;
        column-gap: 3vh;
    }

    nav:not(#home-nav) div,
    nav div:not(#reseaux) a {
        font-size: .75rem;

        &&:not(:last-child) {
            margin-bottom: 1.4vh;
        }
    }

    .toc a {
        margin-bottom: 1.4vh;

        &&:last-child {
            margin-bottom: 0;
        }
    }

    main {
        grid-template-columns: max-content;
        grid-template-rows: min-content;
        row-gap: 5vh;
        width: calc(100vw - 10vh);
        padding-bottom: 5vh;
    }

    .rbq-main {
        grid-template-columns: min-content;
        row-gap: 6vh;
        padding-bottom: 5vh;
    }

    .rubrique {
        width: inherit;
    }

    .rubrique:has(img.polaroids) {
        & img {
            width: 100%;
            height: auto;
        }
    }

    .rubrique:has(video) {
        width: 31vh;
        height: 31vh;
    }

    .carousel,
    .vignette,
    .videos {
        width: inherit;
    }

    .thumb-title,
    .descr {
        margin-top: -12.9vh;
    }

    .carousel-imgs:has(.active) {
        display: flex !important;
        justify-content: center;

        img {
            width: 170% !important;
            height: auto !important;
            margin-left: -20vh !important;
        }

        /* & img,
        & video,
        & #mental-disorder {
            &.active {
                display: flex;
            }

            img.portrait {
                width: auto;
                height: 60%;
                /* margin-left: -45vh !important; 
                align-self: center;
            }

            img.paysage {
                width: 140%;
                height: auto;
                margin-left: -12vh !important;
                align-self: center;
                justify-content: center;
            } */

        p {
            &.active {
                width: 26vh;
                margin-top: 106%;
                font-size: .9rem;
            }
        }

        #mental-disorder.active {
            align-self: center;

            & img,
            & audio {
                width: 90%;
                height: auto;
                margin-left: revert !important;
            }
        }

        .close {
            right: 1vh;
        }
    }

    .communion:has(.active) {
        display: flex;

        img.portrait {
            margin-left: 3.8vh !important;
            height: 55%;
            align-self: center;
        }

        img.paysage {
            width: 135%;
            margin-left: -11vh !important;
        }
    }
}