form {
    display: flex;
    flex-direction: column;
    gap: 1rem;

}

form p {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

form label {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-field {
    width: 100%!important;
    padding: .75rem 1rem!important;
    border-radius: 6px!important;
    border: 1px solid #adbcfd!important; /* minsk-100 */
    transition: border-color 0.2s ease-in-out!important;
}

/* Focus state */
.form-field:focus {
    outline: none!important;
    border-color: #5f5df7!important; /* minsk-500 */
    box-shadow: 0 0 0 3px rgba(95, 93, 247, 0.1)!important; /* minsk-500 avec transparence */
}

/* Error state */
.form-field.error {
    border-color: #ef4444!important; /* rouge */
}

/* Success state */
.form-field.success {
    border-color: #10b981!important; /* vert */
}

/* Check Box */
.form-field.form-checkbox {
    width: 28px!important;
    height:28px!important;
    padding: 0!important;
}

/* Styliser le champ de fichier */
form input[type="file"] {
    width: 100%;
    padding: .75rem 1rem;
    border-radius: 6px;
    border: 1px solid #adbcfd;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s ease-in-out;
}

form input[type="file"]:hover {
    border-color: #5f5df7;
}

form input[type="file"]:focus {
    outline: none;
    border-color: #5f5df7;
    box-shadow: 0 0 0 3px rgba(95, 93, 247, 0.1);
}

/* Si tu veux cacher l'input natif et créer un bouton personnalisé */
form #file-upload-button {
    display: none!important;
}

/* Style pour un bouton personnalisé */
form .custom-file-upload {
    display: inline-block;
    padding: .75rem 1.5rem;
    cursor: pointer;
    background-color: #5f5df7;
    color: white;
    border-radius: 6px;
    border: none;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 4px rgba(95, 93, 247, 0.2);
}

form .custom-file-upload:hover {
    background-color: #4c4ae6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(95, 93, 247, 0.3);
}

/* Form validation */
form ul.errorlist {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #b82c2c; /* rouge */

    background-color: #ca141442;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
}


/* Checkboxes multiples personnalisées */

/* Conteneur principal des checkboxes */
#id_categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;
    max-width: 100%;
    height: fit-content;
    
    /* Retirer la bordure du conteneur */
    background: none!important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Chaque ligne de checkbox */
#id_categories > div {
    position: relative;
}

/* Labels des checkboxes */
#id_categories label {
    display: block;
    padding: 0.75rem 1rem;
    border: 1px solid #adbcfd; /* minsk-100 */
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Effet hover sur les labels */
#id_categories label:hover {
    border-color: #5f5df7; /* minsk-500 */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(95, 93, 247, 0.15);
}

/* Cacher les checkboxes natives */
#id_categories input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Animation de sélection - icône */
#id_categories label::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    font-size: 14px;
    font-weight: bold;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease-in-out;
}

/* Classe pour afficher l'icône quand sélectionné */
#id_categories label.selected::after {
    opacity: 1;
    transform: scale(1);
}



