/* ==========================================================
   LE BUREAU
   VERSION 0.1
   ========================================================== */

#bureau {
    position: fixed;
    inset: 0;

    overflow: hidden;

    background: #000;

    z-index: 3000;
}

#bureau[hidden] {
    display: none;
}

#bureau-scene {
    position: absolute;
    inset: 0;

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

#bureau-image {
    display: block;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    user-select: none;
    -webkit-user-drag: none;

    pointer-events: none;
}

#bureau-overlay {
    position: absolute;
    inset: 0;
   
    width: 100%;
    height: 100%;

    pointer-events: none;
}

/* ==========================================================
   SORTIE DU BUREAU
   ========================================================== */

#bureau-overlay {
    pointer-events: none;
}

#sortie-bureau {
    position: absolute;

    left: 0;
    top: 0;

    width: 22%;
    height: 100%;

    padding: 0;
    border: 0;

    background: transparent;

    cursor: pointer;
    pointer-events: auto;
}

/* ==========================================================
   INFORMATIONS PRATIQUES
   ========================================================== */

/* Zone du dossier présent sur bureau.png */

#dossier-pratique {
    position: absolute;

    left: 62%;
    top: 45%;

    width: 10%;
    height: 14%;

    padding: 0;
    border: 0;

    background: transparent;

    cursor: pointer;
    pointer-events: auto;

    z-index: 20;
}

/* Feuille */
#feuille-pratique {
    position: fixed;

    left: 50%;
    top: 50%;

    width: min(560px, 82vw);
    min-height: 430px;
    max-height: 78vh;

    transform: translate(-50%, -50%);

    box-sizing: border-box;

    padding: 58px 48px 42px;

    overflow-y: auto;

    background:
        linear-gradient(
            105deg,
            #e7dcc2 0%,
            #f0e6cf 48%,
            #e2d5b9 100%
        );

    color: #2d251b;

    border: 1px solid #8f7a58;

    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.72),
        inset 0 0 35px rgba(100, 72, 35, 0.10);

    font-family: Georgia, serif;

    z-index: 5000;
}

#feuille-pratique[hidden] {
    display: none;
}

/* Coin corné — quelque chose se cache derrière la feuille */
#feuille-pratique::after {
    content: "";

    position: absolute;
    left: -1px;
    top: -1px;

    width: 42px;
    height: 42px;

    background:
        linear-gradient(
            135deg,
            #c8b894 0%,
            #dfd2b5 48%,
            #8f7a58 50%,
            #f0e6cf 53%,
            #e7dcc2 100%
        );

    clip-path: polygon(0 0, 100% 0, 0 100%);

    filter: drop-shadow(3px 3px 3px rgba(70, 50, 25, 0.20));

    pointer-events: none;
}

#coin-feuillets {
    position: absolute;
    left: 0;
    top: 0;

    width: 55px;
    height: 55px;

    padding: 0;
    border: 0;
    background: transparent;

    cursor: pointer;
    z-index: 10;
}

/* ==========================================================
   FEUILLETS DU SEUIL
   ========================================================== */

#feuille-feuillets {
    position: fixed;

    left: 50%;
    top: 50%;

    width: min(560px, 82vw);
    min-height: 430px;
    max-height: 78vh;

    transform: translate(-50%, -50%);

    box-sizing: border-box;

    padding: 58px 48px 42px;

    background:
        linear-gradient(
            105deg,
            #ded1b4 0%,
            #eadfc6 48%,
            #d8c9a9 100%
        );

    color: #2d251b;

    border: 1px solid #806c4d;

    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.72),
        inset 0 0 35px rgba(100, 72, 35, 0.12);

    font-family: Georgia, serif;

    z-index: 4999;
}

.grille-feuillets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    margin-top: 38px;

    border-top: 1px solid rgba(89, 74, 53, 0.45);
    border-left: 1px solid rgba(89, 74, 53, 0.45);
}

.grille-feuillets > .case-feuillet {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 110px;
    padding: 8px;

    box-sizing: border-box;
   
    border: 0;
    border-right: 1px solid rgba(89, 74, 53, 0.45);
    border-bottom: 1px solid rgba(89, 74, 53, 0.45);

    text-align: center;
       background: transparent;
    color: inherit;
    font-family: Georgia, serif;
    cursor: pointer;
}

.case-feuillet img {
    display: block;

    width: 72px;
    height: 72px;

    object-fit: contain;

    margin-bottom: 5px;
}

.case-feuillet span {
    font-size: 12px;
    line-height: 1.15;
}
   
   .note-feuillets {
    margin-top: 18px;

    font-size: 12px;
    line-height: 1.45;

    color: #594a35;
}

.note-feuillets p {
    margin: 0 0 8px;
}

.note-feuillets p:last-child {
    margin-bottom: 0;
}

.note-feuillets strong {
    font-weight: normal;
    font-style: italic;
}

/* Feuillet ouvert */
.retour-feuillets {
    margin: 0 0 28px;

    padding: 0;
    border: 0;
    background: transparent;

    color: #594a35;

    font-family: Georgia, serif;
    font-size: 13px;

    cursor: pointer;
}

.retour-feuillets:hover {
    text-decoration: underline;
}

.texte-feuillet {
    margin-top: 32px;

    font-size: 16px;
    line-height: 1.65;
}

.texte-feuillet p {
    margin: 0 0 20px;
}

.texte-feuillet p:last-child {
    margin-bottom: 0;
}

.texte-feuillet strong {
    font-weight: normal;
}

.texte-feuillet p:first-child {
    font-style: italic;
    font-size: 18px;
    line-height: 1.5;
}

#feuille-feuillets[hidden] {
    display: none;
}

#feuille-feuillets h2 {
    margin: 0;

    text-align: center;

    font-size: 25px;
    font-weight: normal;

    letter-spacing: 0.04em;
}

.fermer-feuille-feuillets {
    position: absolute;

    top: 18px;
    right: 20px;

    padding: 0;

    border: 0;
    background: transparent;

    color: #594a35;

    font-family: Georgia, serif;
    font-size: 25px;
    line-height: 1;

    cursor: pointer;

    opacity: 0.75;
}

.fermer-feuille-feuillets:hover {
    opacity: 1;
}

/* Informations pratiques se soulève */
#feuille-pratique {
    transition:
        transform 650ms ease,
        opacity 500ms ease;
}

#feuille-pratique.feuille-pratique-soulevee {
    transform:
        translate(-50%, -50%)
        translate(-72%, -8%)
        rotate(-7deg);

    opacity: 0;
    pointer-events: none;
}


/* Téléphone */
@media (max-width: 700px) {

    #feuille-feuillets {
        width: 88vw;
        min-height: 0;
        height: 72vh;

               overflow-y: auto;

        padding: 52px 25px 30px;
    }

    #feuille-feuillets h2 {
        font-size: 20px;
    }

    .retour-feuillets {
        margin-bottom: 22px;
        font-size: 11px;
    }

    .texte-feuillet {
        margin-top: 25px;
        font-size: 14px;
        line-height: 1.55;
    }

    .texte-feuillet p {
        margin-bottom: 17px;
    }

    .texte-feuillet p:first-child {
        font-size: 16px;
    }
   
}

/* Titre */
#feuille-pratique h2 {
    margin: 0 0 32px;

    text-align: center;

    font-size: 25px;
    font-weight: normal;

    letter-spacing: 0.04em;
}


/* Croix */
.fermer-feuille-pratique {
    position: absolute;

    top: 13px;
    right: 17px;

    border: 0;
    padding: 3px 7px;

    background: transparent;

    color: #382d20;

    font-family: Georgia, serif;
    font-size: 25px;

    cursor: pointer;
}


/* Retour */
.retour-sommaire-pratique {
    position: absolute;

    top: 18px;
    left: 20px;

    border: 0;
    padding: 0;

    background: transparent;

    color: #594832;

    font-family: Georgia, serif;
    font-size: 13px;

    cursor: pointer;
}

.retour-sommaire-pratique:hover {
    text-decoration: underline;
}


/* Sommaire */
.sommaire-pratique {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.sommaire-pratique button {
    padding: 11px 5px;

    border: 0;
    border-bottom: 1px solid rgba(77, 59, 37, 0.25);

    background: transparent;

    color: #33291d;

    text-align: left;

    font-family: Georgia, serif;
    font-size: 16px;

    cursor: pointer;
}

.sommaire-pratique button:hover {
    padding-left: 10px;
}


/* Contenu */
.contenu-pratique {
    font-size: 16px;
    line-height: 1.65;
}

.contenu-pratique p {
    margin: 0 0 18px;
}

.phrase-seuil {
    margin-bottom: 28px !important;

    text-align: center;

    font-style: italic;
    font-size: 18px;
}


/* Téléphone */
@media (max-width: 700px) {

    #feuille-pratique {
        width: 88vw;
        min-height: 0;
        max-height: 72vh;

        padding: 52px 25px 30px;
    }

    #feuille-pratique h2 {
        margin-bottom: 25px;

        font-size: 20px;
    }

    .sommaire-pratique button {
        font-size: 14px;
    }

    .contenu-pratique {
        font-size: 14px;
        line-height: 1.55;
    }

    .phrase-seuil {
        font-size: 16px;
    }

    .retour-sommaire-pratique {
        left: 15px;

        font-size: 11px;
    }
}
