/**
*   ETML
*   Auteur      : William Lonfat
*   Version     : 4.1
*   Date        : 13.02.2025
*   Description : Feuille de style pour le site web qui permet de générer des mot de passe aléatoires        
**/

body {
    background-color:cornflowerblue;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.box {
    padding: 50px;
    background-color: #fff;
    border-radius: 50px;
    box-shadow: 5px 5px 8px rgb(0, 0, 0);
}

/* Style des titres et des différentes descriptions*/

h1 {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 15px;
    text-align: center;
    background-color: white;
    border: 5px solid cornflowerblue;
    border-radius: 12px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    color : black;
    font-size: 40px;
    text-decoration-style: dotted;
}

h2 {
    color: cornflowerblue ;
    font-size: 32px;
    text-decoration: underline cornflowerblue ;
    font-family:Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

label {
    font-size: 22px;
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

/* Checkbox et radio pour le type de mot de passe et ses options*/

input[type = "radio"] {
    -webkit-appearance: none;
    margin-right: 13px;
    width: 22px;
    height: 22px;
    border-radius: 50px;
    border: 2px solid cornflowerblue ;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

input[type="radio"]:checked {
    background-color: cornflowerblue ;
    border-color: black;
}

input[type = "checkbox"] {
    -webkit-appearance: none;
    margin-right: 13px;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    border: 2px solid cornflowerblue ;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

input[type="checkbox"]:checked {
    background-color: cornflowerblue ;
    border-color: black;
}

/* Slide pour le nombre de caractères*/

.container-slide {
    display: flex;
    gap: 10px; /* Ajoute un espace entre la barre de slide et le nombre de caractères */
}

.slide-longeur {
    flex: 1; /*Remplit l'espace disponible*/ 
    -webkit-appearance: none;
    -moz-appearance: none;
    height: 13px;
    border-radius: 5px;
    background: #d3d3d3;
    opacity: 0.7;
    transition: opacity .2s;
}

.slide-longeur:hover {
    opacity: 1;
}

/* Pour Chromium (Le bouton sur le slide) */
.slide-longeur::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: cornflowerblue ;
    cursor: pointer;
}

/* Pour Gecko (Le bouton sur le slide) */
.slide-longeur::-moz-range-thumb {
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: cornflowerblue;
    cursor: pointer;
}

input[type="number"] {
    margin-top: 10px;
}

#error-message {
    color: red;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
}

/* Boutons */

.bouton-generer {
    background-color: cornflowerblue ;
    border-radius: 45px;
    border: 3px solid transparent;
    color: white;
    padding: 10px 10px;
    font-size: 17px;
    transition-duration: 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bouton-generer:hover {
    background-color: #ffffff;
    border-radius: 45px;
    border: 3px solid cornflowerblue ;
    color: black;
    padding: 10px 10px;
    font-size: 17px;
    transition-duration: 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bouton-generer img {
    width: 42px;
    height: 36px;
    transition: transform 0.6s;
}

.bouton-generer:hover img {
    content: url("Images/Generatebutton-black.png");
}

.bouton-copier {
    background-color: cornflowerblue ;
    border-radius: 45px;
    border: 3px solid transparent;
    color: white;
    padding: 10px 10px;
    font-size: 17px;
    transition-duration: 0.3s;
    cursor:pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bouton-copier:hover {
    background-color: #ffffff;
    border-radius: 45px;
    border: 3px solid cornflowerblue ;
    color: black;
    padding: 10px 10px;
    font-size: 17px;
    transition-duration: 0.3s;
    cursor:pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bouton-copier img {
    width: 36px;
    height: 36px;
    transition: transform 0.6s;
}

.bouton-copier:hover img {
    content: url("Images/Copybutton-black.png");
}

/* Zone de texte ou s'affiche le mot de passe */

.container-affichage-mdp {
    display: flex; /* Utilise flex pour aligner les éléments horizontalement*/
    gap: 10px; /* Ajoute un espace entre la zone de texte et le bouton */
}

.affichage-mdp {
    flex: 1; /*Remplit l'espace disponible*/
    padding: 10px;
    cursor: text;
    font-size: 16px;
    border: 3px solid #cccccc;
    border-radius: 20px;
    outline: none; /*Enlève la sélection bleue*/
    transition: border-color 0.3s;
}

.affichage-mdp:focus {
    border-color: #04AA6D;
}

/* Code responsive pour les appareils avec petit écran */

@media screen and (max-width: 900px) {

    .grid-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .box {
        padding: 20px;
    }
    
    /* Style des titres et des différentes descriptions*/
    
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 29px;
    }
    
    label {
        font-size: 24px;
        display: inline-flex;
        margin-bottom: 19px;
    }
    
    /* Checkbox et radio pour le type de mot de passe et ses options*/
    
    input[type = "radio"] {
        margin-right: 14px;
        width: 23px;
        height: 23px;
    }
    
    input[type = "checkbox"] {
        width: 23px;
        height: 23px;
    }

    /* Slide pour le nombre de caractères*/
    
    .silde-longeur {
        height: 12px;
        width: 330px;
        border-radius: 3px;
    }
    
    .silde-longeur::-webkit-slider-thumb {
        width: 25px;
        height: 25px;
    }
    
    /* Boutons */

    .bouton-generer {
        border: 3px solid transparent;
        padding: 14px 14px;
        font-size: 16px;
    }

    .bouton-generer:hover {
        border: 3px solid cornflowerblue ;
        padding: 14px 14px;
        font-size: 16px;
    }

    .bouton-generer img {
        width: 35px;
        height: 30px;
    }

    .bouton-copier {
        border: 3px solid transparent;
        padding: 14px 14px;
        font-size: 16px;
    }

    .bouton-copier:hover {
        border: 3px solid cornflowerblue ;
        padding: 14px 14px;
        font-size: 16px;
    }

    .bouton-copier img {
        width: 35px;
        height: 35px;
    }

    /* Zone de texte ou s'affiche le mot de passe */

    .container-affichage-mdp {
        gap: 7px;
    }

    .affichage-mdp {
        padding: 1px;
        font-size: 18px;
        border: 2px solid #cccccc;;
    }
}