﻿/* Style pour les éléments select */
select {
    padding: 10px 15px;
    font-size: 16px;
    line-height: 1;
    border: none;
    border-radius: 5px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    color: #333333;
    cursor: pointer;
}

/* Styles spécifiques à Firefox */
@-moz-document url-prefix() {
    select {
        padding-right: 30px;
    }
}

select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #000;
}

/* Style pour la légende figcaption */
figcaption {
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: #000000;
    padding: 1em;
    box-sizing: border-box;
    transition: all 0.3s ease-out;
    transform: translateY(10%);
    text-align: center;
}

figure:hover figcaption {
    transform: translateY(0);
}

/* Style pour la classe researchByObject */
.researchByObject {
    width: 90%;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.researchByObject h3 {
    margin: 0;
    white-space: nowrap;
    font-size: clamp(16px, 2vw, 20px); /* Texte responsive */
}

#ObjectTypeList {
    flex: 1;
    min-width: 150px;
    padding: 8px 15px;
    font-size: clamp(14px, 1.5vw, 16px); /* Texte responsive */
}

/* Style pour le conteneur principal */
.container {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    padding-left: 50%;
}

/* Style pour le sous-conteneur */
.sub-container {
    background-color: rgba(139, 139, 139, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Style pour le cadre de l'image */
.image-frame {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 10px 0;
    overflow: hidden;
    min-width: 80%;
    min-height: 60%;
}

#myCanvas {
    background-color: rgb(255, 255, 255);
    max-width: 100%;
    height: auto;
    display: block; /* Supprime l'espace supplémentaire sous le canvas */
    position: absolute;
    border: 2px solid #000;
    box-sizing: border-box;
}

#results {
    height: 100%;
    overflow-y: auto;
}

/* Style pour les images dans image-frame */
.image-frame img {
    max-width: 100%;
    max-height: 100%;
    min-width: 75%;
    min-height: 75%;
}

/* Style pour le bouton de recherche */
#searchButton {
    width: 500px;
    height: 50px;
    margin-top: 10px;
}

/* Style pour la classe resultsClass */
.resultsClass {
    flex-wrap: wrap;
    overflow-y: auto;
    width: fit-content;
    display: flex;
    text-align: center;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.resultsClass figure {
    flex: 0 1 300px;
    min-width: 200px;
    max-width: 100%;
    width: fit-content;
    margin: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resultsClass img {
    width: fit-content;
    height: 200px;
    object-fit: contain;
    margin-top: 10px;
    box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.3);
}

figcaption {
    width: 100%;
    background-color: #EEEEEE;
    color: #000000;
    padding: 0.5em;
    box-sizing: border-box;
    text-align: center;
    margin-top: 5px;
}

/* Styles pour les écrans de faible hauteur */
@media screen and (max-height: 600px) {
    .sub-container {
        justify-content: flex-start;
    }
    
    .image-frame {
        height: 70vh;
    }
}

/* Styles pour les écrans de petite largeur */
@media screen and (max-width: 768px) {
    .container {
        padding-left: 0;
        position: relative;
        height: 100vh;
    }
    
    .sub-container {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .image-frame {
        width: 95%;
        height: 60vh;
    }
}

/* Style pour le rectangle de sélection */
#selectionRect {
    position: absolute;
    border: 2px dashed red;
    pointer-events: none;
    z-index: 1000;
}

/* Style pour le carré de résultat */
.result-square {
    position: absolute;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    box-sizing: border-box;
    z-index: 900;
}

/* Style pour le bouton de mode de sélection */
#selectionModeToggle {
    margin-top: 10px;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#selectionModeToggle.active {
    background-color: #45a049;
}
