﻿/* ============================================================
   STYLES POUR DIALOGS D'ÉDITION
   Appliqués uniquement aux dialogs avec classe .edit-dialog
   ============================================================ */

/* Content wrapper et structure des onglets */
.edit-dialog .content-wrapper {
    padding: 10px 20px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Ensure SfTab takes full available space */
.edit-dialog .e-tab {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.edit-dialog .e-tab .e-tab-header {
    flex-shrink: 0;
}

.edit-dialog .e-tab .e-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.edit-dialog .e-tab .e-content .e-item {
    display: flex;
    flex-direction: column;
}

/* Sections de formulaire avec bordure et fond gris */
.edit-dialog .form-section {
    margin-bottom: 10px;
    padding: 9px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fafafa;
}

.edit-dialog .form-section h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #633699;
    border-bottom: 2px solid #633699;
}

/* Contenu du formulaire */
.edit-dialog .form-content {
    padding-bottom: 0px;
}

/* Checkbox active */
.edit-dialog .custom-checkbox,
.custom-checkbox {
    margin-top: 0px;
    cursor: pointer;
}

/* Messages de validation */
.validation-errors {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.validation-errors ul {
    margin: 0;
    padding-left: 20px;
}

.error-message {
    color: #c53030;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

    .error-message:last-child {
        margin-bottom: 0;
    }

/* Champs de formulaire actifs */
.edit-dialog .e-textbox:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    transition: all 0.3s ease;
}

/* Dropdown dans les dialogs d'édition */
.edit-dialog .e-dropdownlist:focus-within {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* État de chargement */
.edit-dialog .e-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animation de chargement pour le bouton */
.edit-dialog .e-btn.e-primary[disabled] {
    position: relative;
    overflow: hidden;
}

    .edit-dialog .e-btn.e-primary[disabled]::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.3), transparent );
        animation: loading 1.5s infinite;
    }

@keyframes loading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}
