/* @font-face {
    font-family: "GoudyMediaeval-Regular";
    src: url();
} */
@keyframes defilement {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}



:root {
    --marges: 40px;
    --couleur1: #dbff00;
    --couleur2: #b775e2;
    --noir: #000;
    --hauteurCartes: 25vw;
    --largeurCartes: calc(var(--hauteurCartes)*5/7);
    --coins: calc(25vw/60);
    --contours: 2px solid #000;
    --headerHeight: 5vh;
    --alinea: 17px;
    --colonneGauche: 20vw;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-weight: inherit;
    font-style: normal;
    line-height: inherit;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

input,
button,
label {
    border: none;
    font-size: inherit;
    font-family: inherit;
    background-color: inherit;
    display: block;
    width: inherit;
    cursor: pointer;
}

/* FIN RESET */

#aPropos {
    position: fixed;
    top: var(--marges);
    right: var(--marges);
    background-color: var(--couleur2);
    border: var(--contours);
}

#labelAProposBouton {
    height: 100%;
    width: var(--headerHeight);
    border-left: var(--contours);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

#aProposContenu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 30vw;
    z-index: 1;
    background-color: var(--couleur2);
    border-left: var(--contours);
    transition: 1s ease;
}

#aProposContenu h2 {
    font-family: "Goudy Mediaeval", serif;
    text-box: trim-both cap alphabetic;
}

#aProposContenu div:has(h2) {
    padding-left: var(--alinea);
    height: var(--headerHeight);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: var(--contours);
}


#aProposContenu p {
    font-size: 18px;
    line-height: 1.2;
    hyphens: auto;
    text-align: justify;
    text-box: trim-both cap alphabetic;
    padding: var(--alinea);
}

.aProposCache {
    margin-right: -30vw;
}

#labelBoutonGenerer {
    /* position: sticky;
    margin: var(--marges) var(--marges) 0 var(--marges);
    bottom: var(--marges);
    display: flex;
    justify-content: center;
    align-items: center;
    /* width: 14vw;
    height: 1.5em; */
    /* padding: .5em .9em;
    text-align: center;
    border: var(--epContours) solid var(--noir);
    border-radius: 100%;
    background-color: white;
    text-wrap-mode: wrap; */
    padding-left: var(--alinea);
    padding-right: var(--alinea);
    width: var(--colonneGauche);
    border-right: var(--contours);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25em;
    flex-shrink: 0;
}

#labelBoutonGenerer:hover,
#labelPrint:hover {
    text-shadow: 0px 0px 20px var(--couleur2), 0px 0px 20px var(--couleur2), 0px 0px 20px var(--couleur2);
}

body {
    font-family: "Surt", sans-serif;
    /* display: flex; */
    width: 100vw;
    height: 100vh;
    /* flex-direction: row; */
    font-size: 20px;
    line-height: 1;
    overflow: hidden;
    color: var(--noir);
}

.bold {
    /* font-family: "GoudyMediaeval-Bold"; */
    font-weight: bold;
}

.boutonGenre:hover,
.boutonGenre:focus,
.genreActif {
    text-shadow: 0px 0px 20px var(--couleur1), 0px 0px 20px var(--couleur1), 0px 0px 20px var(--couleur1);
}

.choix {
    margin: 0.1em;
    margin-left: var(--alinea);
    text-align: left;
    align-self: start;
}

.choix>* {
    display: inline;
}

.container {
    height: var(--hauteurCartes);
    width: var(--largeurCartes);
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;

    transform: rotateY(180deg);
    /* Pour commencer retournée */
}

#credits {
    width: auto;
    /* flex-grow: 1; */
    padding: var(--alinea);
    font-size: 0.6em;
}

#defileur {
    text-wrap: nowrap;
    overflow-x: hidden;
    display: flex;
}

#defileur p {
    animation-duration: 5s;
    animation-iteration-count: infinite;
    animation-name: defilement;
    animation-timing-function: linear;
    padding-right: 10em;
    padding-top: .5em;
    padding-bottom: .5em;
}

footer {
    width: 100vw;
    height: var(--headerHeight);
    /* position: fixed; */
    bottom: 0;
    background-color: white;
    border-top: var(--contours);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.gothic {
    font-family: "Goudy Mediaeval", serif;
    font-size: 130%;
    line-height: .7;
    /* Si c'est la Area */
    /* font-size: 132%; */
}

.hitbox {
    /* temporaire */
    /* background-color: rgba(173, 216, 230, .5); */
    position: absolute;

    height: calc(var(--hauteurCartes) * 1.2);
    width: calc(var(--hauteurCartes) * 1.2);
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

h1 {
    font-family: "Goudy Mediaeval", serif;
    font-weight: bold;
    line-height: .5;
    font-size: 6vw;
    text-shadow: 0px 0px 50px var(--couleur1), 0px 0px 50px var(--couleur1), 0px 0px 50px var(--couleur1);
    padding-top: .3em;
    padding-bottom: .6em;
}

h2 {
    text-transform: uppercase;
    font-size: 1em;
}

header {
    width: 100vw;
    height: var(--headerHeight);
    /* position: fixed; */
    background-color: white;
    border-bottom: var(--contours);
    display: flex;
    flex-direction: row;
    /* align-content: center; */
    justify-content: space-between;
    align-items: center;
}

i {
    font-style: italic;
}

img {
    image-rendering: auto;
}

.icon {
    height: 1em;
}

label:has(#afficherMenu) {
    display: none;
}

label:has(input[type="radio"]:checked),
label:has(input[type="checkbox"]:checked) {
    text-shadow: 0px 0px 20px var(--couleur1), 0px 0px 20px var(--couleur1), 0px 0px 20px var(--couleur1);
}

input[type="checkbox"],
input[type="radio"],
input {
    display: none;
}

label {
    transition: .3s ease;
    width: auto;
}

label:has(#fermerAPropos) {
    font-family: "Goudy Mediaeval", serif;
    text-box: trim-both cap alphabetic;
    height: 100%;
    width: var(--headerHeight);
    border-left: var(--contours);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

label:has(#carteRandom) {
    display: none;
}

main {
    display: flex;
    width: 100vw;
    height: calc(100vh - var(--headerHeight) * 2);
    flex-direction: row;
    overflow: hidden;
}

.menu {
    padding-top: var(--marges);
    /* height: 100vh; */
    /* width: 20vw; */
    flex: 0 0 var(--colonneGauche);
    /* En gros, par défaut, flexbox semble rendre les tailles modifiable (width et height peuvent aller crever). Avec ça on lui spécifie que shrink=0, grow=0 et voici ta taille voulue */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-right: var(--contours);
}

.menuCache {
    margin-left: calc(0px - var(--colonneGauche));
}

.menu2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

nav {
    width: 100%;
    text-align: left;
    border-top: var(--contours);
    /* border-bottom: var(--contours); */
    overflow-y: scroll;
    line-height: 1.5;
    flex-shrink: 0;
    /* margin-bottom: .2em; */
}

nav:first-of-type {
    flex-shrink: 1;
}

nav>*:first-child {
    position: sticky;
    top: 0;
    background-color: white;
}

nav>h2 {
    padding-left: var(--alinea);
}

/* 
nav>h2::before {
    content: "\25B6";
    transform: translateY(-0.07em);
    display: inline-block;
    margin-right: 0.2em;
} */

nav>label {
    padding-left: calc(2*var(--alinea));
    text-transform: lowercase;
}

/* nav>label:before {
    content: "+ ";
} */

nav>* {
    border-bottom: var(--contours);
}

nav>*:last-child {
    border-bottom: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
nav::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
nav {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}


/* nav>*:first-child {
    border-radius: 10px 10px 10px 10px;
}

nav>*:last-child {
    border-radius: 10px 10px 10px 10px;
} */

/* nav>*:nth-child(5n+1) {
    border-bottom-right-radius: 10px;
}

nav>*:nth-child(5n+2) {
    border-top-right-radius: 10px;
}

nav>*:nth-child(7n-3) {
    border-bottom-right-radius: 10px;
}

nav>*:nth-child(7n-2) {
    border-top-right-radius: 10px;
}


nav>*:nth-child(4n+2) {
    border-bottom-left-radius: 10px;
}

nav>*:nth-child(4n+3) {
    border-top-left-radius: 10px;
} */

#labelPrint {
    /* display: flex;
    justify-content: center;
    align-items: center;
    /* width: 14vw;
    height: 1.5em; */
    /* padding: .5em;
    position: fixed;
    bottom: var(--marges);
    right: var(--marges);
    text-align: center;
    border: var(--epContours) solid var(--noir);
    background-color: var(--couleur2);
    border-radius: 100%; */
    border-left: var(--contours);
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 var(--alinea);
    font-size: 1.25em;
}


nav::after {
    flex-grow: 1;
}

/* .dos {
    display: none !important;
} */

.wrapperCartes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    flex-basis: 80%;
    justify-content: center;
    align-items: center;
    /* height: 100vh; */
    flex-grow: 1;
    background-image: url("../sources/background.png");
    background-size: cover;
    background-position: center;
    image-rendering: pixelated;
    overflow-y: scroll;
    gap: var(--alinea);
    padding: var(--alinea);
}


@media screen {
    .dos {
        /* display: none !important; */
        display: block !important;
        position: fixed !important;
        top: -100vh !important;
    }

    .carte {
        transition: .3s ease;
        box-shadow: 0px 0px 14px 0px black;
    }

    .carte:hover {
        box-shadow: 0px 0px 50px var(--couleur1), 0px 0px 50px var(--couleur1), 0px 0px 50px var(--couleur1);
        transform: scale(1.1);
        z-index: 2;
    }

    .carte:focus {
        position: relative;
        transform: scale(2);
        z-index: 2;
    }

    .wrapperCartes {
        perspective: 1000px;
    }
}

/* ========== RESPONSIVE SMARTPHONE ========== */
@media screen and (max-width: 1024px) {

    :root {
        --marges: 16px;
        --colonneGauche: 66vw;
    }


    #aProposContenu {
        width: 66vw;
    }

    #aProposContenu p {
        font-size: 16px;
        text-align: left;
    }

    .aProposCache {
        margin-right: -66vw;
    }

    body {
        font-size: 16px;
    }

    .boutonGenre:hover,
    .boutonGenre:focus,
    #labelBoutonGenerer:hover {
        text-shadow: none;
    }

    #boutonGenerer {
        width: 50vw;
    }

    #credits {
        display: none;
    }

    h1 {
        font-size: 15vw;
    }

    label:has(#afficherMenu) {
        height: 100%;
        width: var(--headerHeight);
        border-right: var(--contours);
        display: flex;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
        flex-direction: column;
    }

    label:has(#afficherMenu) img {
        width: 1em;
    }

    label:has(#carteRandom) {
        /* border-left: var(--contours); */
        height: 100%;
        display: flex;
        align-items: center;
        padding: 0 var(--alinea);
        font-size: 1.25em;
        flex-grow: 1;
        justify-content: center;
    }


    #labelPrint {
        display: none;
    }

    .menu {
        position: absolute;
        z-index: 1;
        flex: 0 0 var(--colonneGauche);
        width: var(--colonneGauche);
        background-color: white;
        transition: 1s ease;
        height: calc(100vh - var(--headerHeight) * 2);
    }

}

@media print {
    @page {
        margin: 8mm;
        size: A4;
    }

    #aProposBouton,
    #aProposContenu,
    .menu,
    header,
    footer,
    input {
        display: none;
    }

    main {
        display: block;
        width: auto;
        height: auto;
        overflow: unset;
    }

    .wrapperCartes {
        flex-basis: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        background: none;
        gap: 0;
        flex-grow: 0;
        overflow: visible;
        align-items: start;
    }

    .boutonGenre:hover,
    .boutonGenre:focus {
        text-shadow: none;
    }

    input {
        display: none;
    }
}