:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #2c59adff 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Positionnement de l'alerte en bas à droite de l'écran */
.tooltip-alert {
    position: fixed;
    top: 75px;
    /* Distance par rapport au bas de l'écran */
    right: 20px;
    /* Distance par rapport au côté droit de l'écran */
    padding: 10px 20px;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    z-index: 9999;
    /* Pour s'assurer que l'alerte soit au-dessus du contenu */
    opacity: 1;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Style pour les alertes de succès */
.tooltip-alert.alert-success {
    background-color: #28a745;
    /* Vert */
}

/* Style pour les alertes d'erreur */
.tooltip-alert.alert-danger {
    background-color: #dc3545;
    /* Rouge */
}

/* Style pour les alertes d'avertissement */
.tooltip-alert.alert-warning {
    background-color: #ffc107;
    /* Jaune */
}

/* Effet d'animation pour faire apparaître l'alerte */
.tooltip-alert.fade {
    opacity: 0;
    transform: translateY(20px);
    /* Déplace légèrement l'alerte vers le bas pour l'effet */
}

/* Transition quand l'alerte devient visible */
.tooltip-alert.show {
    opacity: 1;
    transform: translateY(0);
    /* Remet l'alerte à sa position d'origine */
}


.dynamic-field {
    display: none;
    animation: fadeIn 0.4s ease-in;
}

.dynamic-field.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-upload-zone {
    border: 3px dashed #667eea;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, #f6f9fc 0%, #eef2f7 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-upload-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.file-upload-zone:hover {
    border-color: #764ba2;
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.file-upload-zone:hover::before {
    opacity: 0.05;
}

.file-upload-zone i {
    font-size: 3.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.file-upload-zone p {
    color: #1e293b;
    font-weight: 700;
    margin: 10px 0;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.file-upload-zone small {
    color: #64748b;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.form-control-modern {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-control-modern:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    outline: none;
    background: #ffffff;
}

.form-label-modern {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 25px 30px;
    border: none;
}

.modal-title {
    font-weight: 700;
    font-size: 1.3rem;
}

.btn-close {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.btn-delete {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #ee5a6f, #d63447);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 111, 0.4);
    color: white;
}

.btn-edit {
    background: linear-gradient(135deg, #ffa726, #fb8c00);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #fb8c00, #f57c00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 140, 0, 0.4);
    color: white;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.card {
    border-radius: 20px !important;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 18px 15px;
    border: none;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-color: #f1f5f9;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    transform: scale(1.01);
}

.badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.section-title h2 {
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.select2-container--default .select2-selection--multiple {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    min-height: 58px;
    padding: 8px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 18px 25px;
    font-weight: 600;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.list-group-item {
    border-radius: 8px;
    margin-bottom: 8px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background: #f8fafc;
    border-color: #667eea;
}