/* Style global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
    color: #005CA8;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre les enfants horizontalement */
    justify-content: flex-start; /* Aligne les enfants verticalement au sommet */
    min-height: 100vh; /* Hauteur minimale de l'écran */
    padding-top: 20px; /* Espace en haut */
    margin: 0;
    overflow-x: hidden;
}

html, body {
	margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto; /* Assurez-vous que le contenu est défilable */
}


#main-container {
    width: 80vw;       /* Largeur complète */
    margin: 0 auto;     /* Centre horizontalement */
    display: block;     /* Assure que le conteneur n'est pas flex ou inline */
    position: relative; /* Supprime tout décalage causé par des positions absolues */
}

/* Logo */
img {
    position: relative;
    top: 0;
    left: 0;
    margin: 10px;
    width: 7.5vw;
}

/* Icônes */
.iconify {
    position: relative;
    margin: 10px;
    font-size: 32px;
}

/* Formulaire */
form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 80vw;
    gap: 2vw;
}

//* Tableau pour les options radio */
.radio-table {
    width: 100%;                /* Utilise toute la largeur disponible */
    border-collapse: collapse;  /* Évite les espacements entre les cellules */
}

/* Style général pour les cellules */
.radio-table td {
    padding: 0.5rem;            /* Espacement autour des contenus pour une meilleure lisibilité */
    vertical-align: top;        /* Aligne les contenus en haut pour les textes longs */
}

/* Boutons radio */
.radio-table input[type="radio"] {
    margin-top: 0.2rem;         /* Alignement vertical pour les boutons radio */
}

/* Labels */
.radio-table label {
    display: block;             /* Assure que le label utilise toute la largeur de la cellule */
    line-height: 1.4;           /* Améliore la lisibilité du texte */
    word-break: break-word;     /* Permet le passage à la ligne en cas de mots longs */
}

/* Surbrillance au survol */
.radio-table tr:hover {
    background-color: #f9f9f9;  /* Surbrillance au survol */
    border-radius: 5px;         /* Coins arrondis pour l'effet visuel */
    cursor: pointer;            /* Indique que l'élément est interactif */
}



form div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.row {
    flex-direction: row;
    gap: 12%;
}




/* Conteneur pour le canevas */
.canvas-container {
    display: flex; /* Active le flexbox */
    align-items: center; /* Centre verticalement */
    justify-content: center; /* Centre horizontalement */
    margin: auto; /* Centrage global si nécessaire */
    width: 80%; /* Ajustez la largeur à votre convenance */
    max-width: 400px; /* Limite la largeur maximum */
    height: 200px; /* Hauteur définie */
    border: 1px solid #005CA8; /* Bordure visible */
    border-radius: 5px; /* Coins arrondis */
    background-color: #fff; /* Fond blanc */
}


canvas {
    width: 100%; /* S'adapte au conteneur */
    height: 200px; /* Fixe une hauteur */
}

/* Style pour désactiver le canevas */
canvas[disabled] {
    pointer-events: none;      /* Désactive les interactions */
    background-color: #f0f0f0; /* Change la couleur de fond pour indiquer qu'il est désactivé */
    opacity: 0.6;              /* Réduit l'opacité pour l'effet visuel */
    border: 1px solid #ccc;
}


/* Champs de saisie */
input, textarea {
    width: 100%;
    padding: 5px;
    border: 1px solid #005CA8;
    border-radius: 5px;
    font-weight: 600;
}

/* Boutons */
#divButtons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    width: 100%;
}

#divButtons > * {
    width: 30%;
    padding: 10px;
    background-color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    box-shadow: 2px 2px 6px 2px rgba(0, 0, 0, 0.2);
}

#saveButton {
    background-color: #005CA8;
    color: white;
}

#saveButton:hover {
    background-color: white;
    color: #005CA8;
}

/* Modales */
.modal {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-direction: column;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    width: 55vw;
    aspect-ratio: 10/7;
    background-color: white;
    padding: 1.5vw 3vw;
    border-radius: 4px;
    border: 1px solid #005CA8;
    box-shadow: 2px 2px 6px 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.modal a {
    text-decoration: none;
    width: 40%;
    padding: 10px;
    background-color: #005CA8;
    color: white;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    box-shadow: 2px 2px 6px 2px rgba(0, 0, 0, 0.2);
}

/* Introduction */
.introduction {
    width: 80vw; /* Aligné avec le formulaire */
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.6;
    text-align: justify;
}

.introduction h2 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.introduction h3 {
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 20px;
    text-align: center;
}

.introduction ul {
    margin: 10px 0 20px 20px;
    list-style-type: disc;
}

.introduction ul ul {
    list-style-type: circle;
}

#choiceAddress, #RGPD{
    flex-direction: row;
}


/* Button */

button{
    position: relative;
    width: 30%;
    padding: 10px;
    background-color: transparent;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 2px 2px 6px 2px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: color 0.3s ease-in-out;
}

button:before{
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background-color: #00B3D4;
    transition: all 0.2s ease-in-out;
    z-index: -1;
    border-radius: 50%;
}

button:hover:before{
    width: 30vw;
    height: 30vw;

}

button:hover{
    color: white;
}

/* Checkbox style */


.switch{
    --active: #00B3D4;
    --active-inner: #fff;
    --focus: 2px #005ca81E;
    --border: #bbc1e1;
    --border-hover: #00B3D4;
    --background: #fff;
    --disabled: #f6f8ff;
    --disabled-inner: #e1e6f9;
    appearance: none;
    height: 21px;
    outline: none;
    display: inline-block;
    vertical-align: top;
    position: relative;
    margin: 0;
    cursor: pointer;
    border: 1px solid var(--bc, var(--border));
    background: var(--b, var(--background));
    transition: background 0.3s, border-color 0.3s, box-shadow 0.2s;
    width: 38px;
    min-width: 38px;
    border-radius: 11px;
}
.switch:after{
    content: '';
    display: block;
    left: 0;
    top: 0;
    position: absolute;
    transition: transform var(--d-t, 0.3s) var(--d-t-e, ease), opacity var(--d-o, 0.2s);
}
.switch:checked{
    --b: var(--active);
    --bc: var(--active);
    --d-o: 0.3s;
    --d-t: 0.6s;
    --d-t-e: cubic-bezier(0.2, 0.85, 0.32, 1.2);
}
.switch:after {
    left: 2px;
    top: 2px;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    background: var(--ab, var(--border));
    transform: translateX(var(--x, 0));
}
.switch:checked {
    --ab: var(--active-inner);
    --x: 17px;
}




/* Responsive */
@media screen and (max-width: 1024px) {
    img {
        position: relative;
        top: auto;
        left: auto;
        width: 15vw;
    }
	
	body {
        padding-top: 40px; /* Ajoutez un espacement pour compenser */
    }

    form {
        width: 90vw;
        gap: 3vw;
    }

    .row {
        flex-direction: column;
        gap: 3vw;
    }

    #divButtons {
        flex-direction: column;
        gap: 3vw;
    }

    #divButtons > * {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .introduction {
        width: 90%;
    }
	
	#main-container {
        width: 90%; /* Réduit la largeur pour petits écrans */
        padding: 5px; /* Ajoute un peu de marge intérieure */
    }
	
	body {
        padding-top: 30px; /* Ajoutez un espacement pour compenser */
    }

    canvas {
        width: 100%; /* S'adapte à l'écran */
        height: 150px; /* Ajustement pour les petits écrans */
    }
}
