/* Style de base pour enlever les marges et le scrolling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

@font-face {
    font-family: Great Vibes;
    src: url(GreatVibes-Regular.otf);
}

@font-face {
    font-family: 'Romain';
    src: url(EcritureA-Romain.otf)
}


html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

body.grabbing {
    cursor: url(images/grabbing.png) 16 16, auto !important;
}

.grabmap, .grabmap div {
    cursor: url(images/grabmap.png) 16 16, auto !important;
}

.grabbingmap, .grabbingmap div {
    cursor: url(images/grabbingmap.png) 16 16, auto !important;
}



/* En-tête */
header {
    height: 80px;
    width: 100%;
    background-color: rgb(0, 27, 78);
    color: rgb(255, 255, 255);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
    font-size: 58px;
    font-family: Great Vibes;
}

.fullscreen header {
    display: none;
}

.educajou {
    height: 70px;
    width: 70px;
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 1000;
}

.titre {
    margin-right: 20px;
}

/* Conteneur principal qui occupe toute la hauteur disponible sous l'en-tête */
#conteneur-principal {
    display: flex;
    height: calc(100% - 80px);
    width: 100%;
    position: relative;
    background: linear-gradient(to bottom,rgb(111, 150, 255), rgb(255, 255, 255));

}

.fullscreen #conteneur-principal {
    height: 100%;
}

.etiquette {
    cursor: url(images/grab.png) 16 16, auto;
    pointer-events: auto;
    transform-origin: top left;
}

body.grabbing .etiquette {
    cursor: url(images/grabbing.png) 16 16, auto !important;
}


.etiquette-mobile {
    position: absolute;
}

.etiquette-placee {
    position: static;
    height: 30%;
}

.fond {
    background-color: #ffffffb7;
    padding: 3px;
    border: 1px solid #ffffff;
    border-radius: 3px;
    box-sizing: border-box;
}

.signale {
    box-shadow: 0 0 0 4px red; /* Une ombre avec une couleur rouge autour de l'image */
}

.select {
    box-shadow: 0 0 0 4px blue; /* Une ombre avec une couleur rouge autour de l'image */
}




/* Colonne gauche */
#colonne-gauche {
    width: 100px;
    background-color: #d3d3d3;
    box-shadow: inset -10px 0 10px -5px rgba(0, 0, 0, 0.3);
    overflow-y: scroll;
    background-image: url(images/fondbois.jpg);
    background-repeat: repeat;
}

.bouton-collection {
    width: 80px;
    height: 80px;
    margin: 5px 10px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
}

.bouton-collection:first-of-type {
    margin-top: 10px;
}

/* Colonne du milieu qui occupe l'espace restant */
#colonne-centre {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;

}

#haut-centre {
    max-height: 50%;
    background-image: url(images/fond-etagere.jpg);
    background-repeat: repeat;
    box-shadow: inset -10px -10px 10px -5px rgba(0, 0, 0, 0.3);
    border-radius: 0px 0px 10px 0px;
    padding: 5px 0px;    
    align-items: center;
    justify-content: center;

    display: flex;
    flex-wrap: wrap;          /* Permet d’aller à la ligne si nécessaire */
    justify-content: space-around; /* Répartit l’espace horizontalement */
    align-items: center;       /* Centre les éléments verticalement */
    gap: 10px;  
}

#contenu-haut-centre {
    height: 100%;
    width: 100%;
    overflow-y: auto; /* Pour éviter un scroll si inutile */
}


#bas-centre {
    flex: 1;
    position: relative;
    background: rgba(255, 255, 255, 0.473); /* Couleur blanche semi-transparente */
    backdrop-filter: blur(10px); /* Applique un flou au contenu derrière */
    -webkit-backdrop-filter: blur(10px); /* Compatibilité pour Safari */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Une légère ombre pour un effet de profondeur */
    border-radius: 0px 10px 0px 0px;
}

#pied-centre {
    position: relative;
    height: 70px;
    background-color: #b9b9b9;
    border-top: 1px outset rgba(71, 63, 63, 0.2);
    display: flex;
    justify-content:space-evenly;
    align-items: center;
}

.image-valeur {
    margin: 10px 10px 0px 0px;
    vertical-align: middle;
}

#balai {
    position: absolute;
    bottom: 5px;
    left: 5px;
    width: 60px;
    height: 60px;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    outline: none;
}

#compteur {
    font-family: Romain;
    font-size: 96px;
    font-weight: bold;
    min-width: 100px;
    height: 60px;
    background-color: greenyellow;
    line-height: 54px;
    border-radius: 8px;
    border: 2px inset green;
    position: relative;
    overflow: hidden;
    padding-left: 5px;
    padding-right: 5px;
}

#grouper {
    height: 60px;
    width: 60px;
    background-color: rgb(245, 245, 245);
    border-radius: 8px;
    border: 2px inset rgb(43, 44, 43);
    padding-left: 5px;
    padding-right: 5px;
    background-size: 75%;
    background-repeat: no-repeat;
    background-position: center;
}

#compteur.masque::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    border-radius: 8px;
    background-color: #ffcc00;
    background-image: url(images/oeil.svg);
    background-size: 50%;
    background-position: center;
    background-repeat: no-repeat;
}

#compteur.trop::before {
    content: "Trop d'unités";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    border-radius: 8px;
    background-color: #f7b4b4;
    color: #000000;
}

/* Colonne de droite carrée (hauteur = largeur) */
#colonne-droite {
    width: calc(100vh - 80px); /* Ajuste la largeur pour être égale à la hauteur */
    height: 100%;
    position: relative;
    overflow: hidden;
}

.fullscreen #colonne-droite {
    width: 100vh;
}

#zone-boutons-haut {
    position: absolute;
    width: calc(100vh - 80px);
    top: 80px;
    right: 0px;
}

#message {
    position: absolute;
    background-color: #ffffffc4;
    border: 2px solid #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 36px;
    color: #000000;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: fit-content;
    width: 600px;
    max-width: 90%;
    padding: 10px;
    border-radius: 10px;
    z-index: 10000;
}

#consigne-petales {
    background-color: #ffffffc4;
    border: 2px solid #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    color: #000000;
    position: absolute;
    top: 60px;
    left: 110px;
    width: fit-content;
    max-width: 60%;
    padding: 10px;
    border-radius: 10px;
    z-index: 10000;
}

#consigne-petales::after {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    height: 50px;
    width: 50px;
    background-image: url(images/pointing-hand.svg);
    background-repeat: no-repeat;
    background-size: contain;
}


#zone-boutons-bas {
    position: absolute;
    width: calc(100vh - 80px);
    height: 60px;
    bottom: 0px;
    right: 0px;
}

#zone-boutons-bas button {
    height: 60px;
    width: 60px;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 10000;
    background-color: transparent;
    border: none;
    outline: none;
}

#bouton-photo {
    position: absolute;
    right: 5px;
    bottom: 5px;
}

#bouton-valider {
    position: absolute;
    right: 70px;
    bottom: 5px;
}

.fullscreen #zone-boutons-haut {
    width: 100vh;
    top: 0px;
}

#boutonsplusmoins {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 100;
}

#boutonszoom {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 100;

}

#boutonsplusmoins button {
    height: 40px;
    width: 40px;
    font-size: 30px;
    font-family: Arial, Helvetica, sans-serif;
}

#boutonszoom button {
    height: 40px;
    width: 40px;
    font-size: 30px;
    font-family: Arial, Helvetica, sans-serif;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    outline: none;
}

#bouton-fullscreen {
    background-image: url(images/fullscreen.svg);
    background-size: 40px 80px !important;
    background-position: 0% 100%;
}

#poubelle {
    height: 70px;
    width: 70px;
    position: absolute;
    bottom: 0px;
    right: -35px;
    background-color: #f7aaaa;
    border-width: 2px 2px 0px 2px;
    border-color: #a78d8d;
    border-radius: 10px 10px 0px 0px;
    border-style: solid;    
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: 50% 80%;
}

#zone-fleur {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(1);
}

#calque-zone-fleur {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: scale(1);
    pointer-events: none;
}

#centre-fleur {
    position: absolute;
    width: 30%;
    height: 30%;
    border-radius: 50%;
    text-align: center;
    font-family: Romain;
    font-size: calc((100vh - 80px) * 0.25);
    font-weight: bold;
    background: radial-gradient(circle, #ffcc00 0%, #ff9900 30%, #ff6600 60%, #cc3300 100%);
    outline: none;
    border: none;
    box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.3);
}

.petale {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 49%;
    transform-origin: 50% 99.75%; /* Origine de transformation au bas du pétale */
    pointer-events:none;
}

.petale path {
    pointer-events: auto;
    box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.3);
}

.suppr {
    filter: brightness(0.7) sepia(1) hue-rotate(-50deg) saturate(4);
}

.etiquette-disparition {
    transition: opacity 0.5s ease, left 0.5s ease, top 0.5s ease;
    opacity: 0;
}

.etiquette-apparition {
    transition: opacity 0.5s ease;
    opacity: 0; /* Départ avec opacité 0 */
}


.hide {
    display: none;
}

#warning {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0px;
    left: 0px;
    background: linear-gradient(to bottom,rgb(111, 150, 255), rgb(255, 255, 255));
    z-index: 100000;
}

@media screen and (orientation: portrait) {
    /* Vos règles CSS pour le mode portrait */

    #warning {
      display: flex;
      flex-direction: column;
    }

    .educajou {
        height: 70px;
        width: 70px;
        position: static;
        top: 5px;
        left: 5px;
        z-index: 1000;
    }

    .titre {
        margin-right: 0px;
    }

    header {
        justify-content: space-around;
    }

    #conteneur-principal-warning {
        flex: 1;
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    #image-tablette {
        width: 50%;
        animation: rotate-animation 3s ease-in-out infinite;
    }
    
    @keyframes rotate-animation {
        0% {
            transform: rotate(0deg);
        }
        70% {
            transform: rotate(90deg);
        }
        100% {
            transform: rotate(90deg);
        }
    }
    
    

  }
  