/* Réinitialisation des styles par défaut */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


@font-face {
    font-family: 'Belgiano';
    src: url('../font/Belgiano.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}


@font-face {
    font-family: 'Sunday';
    src: url('../font/Sunday.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
}


#from-text {
    font-family: 'Belgiano', sans-serif;
    font-size: 250px;
    
}

#from-input{
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 10px;
    background-color: #8d7ea7;
    color: #fff;
    text-align: center;
    
}


#from-input::placeholder{
    color: #fff;
    text-align: center;
}


/* Styles du corps */
body {
    position: relative;

}
#tout{    
    z-index: 2;
    display: flex;
    justify-content: center;   /* Centre horizontalement */
    align-items: center;       /* Centre verticalement */
    min-height: 100vh;         /* Utiliser toute la hauteur de la fenêtre */
    flex-direction: column;
    padding: 5vh;
    background-color: #3f2f50;
     }

/* Styles des titres et paragraphes */
h1, p {
    text-align: center;
}

#drop-zone {
    min-width: 30vw;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 25vh; /* Ajuster la hauteur minimale */
    border: 2px dashed #8d7ea7;
    border-radius: 10px;
    position: relative;
    overflow: hidden; /* Empêcher les barres de défilement */
    padding: 15px 10px;
}

#drop-message {
    font-family: 'Belgiano Serif', serif;
    text-align: center;
    color: #a390a8;
    font-size: 1.5em;
    font-weight: 100;
}


/* Style lors du survol de la zone de drop */
#drop-zone.dragover {
    border-color: #000;
}

#image-container {
    position: relative;
    margin: 0 auto;
    overflow: hidden; /* Important : empêche les éléments débordants d'être visibles */
    width: 100%; /* Assurez-vous que la largeur et hauteur sont définies par l'image de fond */
    height: 100%;
}

/* Image de fond */
#background-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Conteneur du personnage */
#character-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: center center;
    cursor: grab;
    user-select: none;
    touch-action: none;
    display: inline-block;
}

/* Image du personnage */
#character-image {
    display: block;
    width: auto;
    height: auto;
}

/* Poignée de rotation */
#rotation-handle {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background-color: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    cursor: pointer;
}

/* Barre de rotation */
#rotation-bar {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 50px;
    background-color: #000;
}


/* Conteneur de confettis */
.confetti-container {
    z-index: -50;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
}

/* Style des confettis */
.confetti {
    position: absolute;
    width: 5px;
    height: 9px;
    opacity: 0.9;
    transform-origin: center center;
}

/* Conteneur des boutons */
#button-container {
    display: flex;
    justify-content: center; /* Centre les boutons horizontalement */
    gap: 20px; /* Espace entre les boutons */
    margin-top: 30px;
    flex-wrap: nowrap; /* Empêche les boutons de passer à la ligne suivante */
}


/* Style du bouton de téléchargement (style similaire au bouton confetti) */
#download-btn, #toggle-text-btn, #confetti-button, #info-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3); /* Fond semi-transparent et plus clair */
    border: 3px solid #8d7ea7; /* Contour d'une couleur différente */
    cursor: pointer;
    outline: none;
    display: block; /* Assurez-vous qu'il est affiché */
    font-size: 1.5em;
    margin: 0 10px;
}

#hue-slider {
    margin-top: 20px;
    -webkit-appearance: none;
    width: 250px;
    height: 8px;
    background: linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red);
    border-radius: 5px;
    outline: none;
}

#hue-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background-color: white;
    border: 2px solid #6d5d88; /* Adjust border color as needed */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

#hue-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background-color: white;
    border: 2px solid #6d5d88;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}


#controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Espace entre les sliders */
    margin-top: 20px;
}

#saturation-slider {
    -webkit-appearance: none;
    width: 250px;
    height: 8px;
    background: linear-gradient(to right, #808080, red); /* Gris à rouge */
    border-radius: 5px;
    outline: none;
}

#saturation-slider::-webkit-slider-thumb,
#saturation-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background-color: white;
    border: 2px solid #6d5d88;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

#luminosity-slider {
    -webkit-appearance: none;
    width: 250px;
    height: 8px;
    background: linear-gradient(to right, black, white); /* Noir à blanc */
    border-radius: 5px;
    outline: none;
}

#luminosity-slider::-webkit-slider-thumb,
#luminosity-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background-color: white;
    border: 2px solid #6d5d88;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}


/* Styles pour le texte SVG */
#text-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: center center;
    cursor: grab;
    user-select: none;
    touch-action: none;
    display: inline-block;
}

#text-image {
    display: block;
    width: auto;
    height: auto;
}

/* Poignée de rotation pour le texte */
#text-rotation-handle {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background-color: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    cursor: pointer;
}

/* Barre de rotation pour le texte */
#text-rotation-bar {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 50px;
    background-color: #000;
}


#splash-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: #3f2f50; /* dark purple background */
    z-index: 10;
    text-align: center;
}

#splash-logo {
    width: 30vw;  /* Adjust size as needed */
    height: auto; /* Adjust size as needed */
}

@keyframes revealLogo {
    from {
        -webkit-mask-position: top;
        mask-position: top;
    }
    to {
        -webkit-mask-position: bottom;
        mask-position: bottom;
    }
}

#explanation-text {
    margin-top: 20px; /* Adjust spacing as needed */
    padding: 0 20px;
    max-width: 40%; /* Adjust width as needed */
    line-height: 130%;
    font-size: 1.5em;
    text-align: center;
    color: #a493b6; /* light purple text for visibility on dark background */
    margin-top: 50px;
}

#skip-button {
    margin-top: 50px; /* Adjust spacing as needed */
    padding: 10px 20px;
    font-size: 16px; /* Adjust font size as needed */
    cursor: pointer;
    background-color: #3f2f50; /* Background color matches the splash screen */
    border: none;
    border-radius: 12px; /* Smooth rounded corners */
    box-shadow: 
        4px 4px 8px #332644, /* Dark shadow for depth */
        -4px -4px 8px #4d3363; /* Light shadow for lifted effect */
    color: #ffffff; /* White text color */
    text-transform: uppercase; /* Uppercase text for more emphasis */
    letter-spacing: 1px; /* Space out the letters a bit */
}

#main-content {
    display: none;
}

.tooltip {
    position: absolute;
    display: none;
    max-width: 200px; /* Limite de largeur pour permettre le retour à la ligne */
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none; /* Pour éviter les interactions de la souris */
}
