
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, serif;
}

.laboratoire {
    min-height: 100vh;

    background-image: url("../images/fond_labo.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    position: relative;
    padding: 35px;
}

h1 {
    margin: 0;
    text-align: center;

    color: #f5dfb7;
    font-size: clamp(30px, 4vw, 52px);

    text-shadow: 2px 3px 8px #180d08;
}


.retour,
.retour:visited {
    display: block;
    width: fit-content;
    text-align: left;
    color: #eac37a;
    text-decoration: none;
    font-family: Georgia, serif;
    font-size: 16px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.retour:hover,
.retour:focus-visible {
    color: white;
    text-decoration: none;
    text-shadow: 0 0 12px #ffd36e;
}

@media (max-width: 750px) {
    .laboratoire {
        padding: 75px 15px 25px;
    }

    .retour {
        top: 20px;
        left: 15px;
        font-size: 16px;
    }
}

/* Objets posés sur l'établi */

.objets-laboratoire {
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: 10%;
    height: 42%;
}

.objet {
    position: absolute;
    bottom: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.objet img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(5px 10px 8px rgba(0, 0, 0, 0.55));
}

.objet:hover,
.objet:focus-visible {
    transform: translateY(-10px) scale(1.05);
    filter: brightness(1.15);
    z-index: 5;
}

/* Position et taille de chaque objet */

/* Sacoche à gauche, légèrement en retrait sur l'établi */
.sacoche {
    left: 2%;
    right: auto;
    bottom: 35px;
    width: 25%;
}

.pistolet {
    left: 27%;
    width: 20%;
}
.dragon {
	left: 45%;
	width: 15%;
	bottom: 30%;
}
.montre {
    left: 60%;
    width: 13%;
	bottom: -30px;

}

/* Globe à droite */
.globe {
    left: auto;
    right: 2%;
    bottom: 60px;
    width: 25%;
}


/* Adaptation des objets sur téléphone */

@media (max-width: 750px) {

    .objets-laboratoire {
        left: 2%;
        right: 2%;
        bottom: 17%;
        height: 35%;
    }

    /* Sacoche */
    .sacoche {
        left: 0;
        right: auto;
        bottom: 60px;
        width: 36%;
    }

    /* Pistolet */
    .pistolet {
        left: 30%;
        bottom: 5px;
        width: 31%;
    }

    /* Dragon */
    .dragon {
        left: 42%;
        bottom: 42%;
        width: 25%;
    }

    /* Montre */
    .montre {
        left: 65%;
        bottom: -10px;
        width: 25%;
    }

    /* Globe */
    .globe {
        left: auto;
        right: 0;
        bottom: 65px;
        width: 34%;
    }

}


/* Fenêtre des objets du laboratoire */

.fenetre-objet {
    width: min(90%, 580px);
    max-height: 85vh;
    overflow-y: auto;
    padding: 35px;
    position: fixed;

    border: 3px solid #987044;
    border-radius: 12px;

    background: #ead7ae;
    color: #422a19;

    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
    text-align: center;
    font-family: Georgia, serif;
}

.fenetre-objet::backdrop {
    background: rgba(15, 9, 5, 0.75);
}

.fenetre-objet h2 {
    margin-top: 5px;
    font-size: 30px;
    color: #65401f;
}

.image-detail {
    display: block;
    width: auto;
    max-width: 85%;
    max-height: 280px;
    margin: 20px auto;
    object-fit: contain;
}

.fenetre-objet p {
    font-size: 18px;
    line-height: 1.6;
}

.texte-mystere {
    font-style: italic;
    color: #79522e;
}

.fermer-fenetre {
    position: absolute;
    top: 12px;
    right: 15px;

    background: transparent;
    border: none;
    color: #65401f;

    font-size: 32px;
    cursor: pointer;
}

.fermer-fenetre:hover {
    color: #a35b24;
}
