/* ... existing code ... */

/* ========================================
   DATA FORM MODIFICATION INDICATOR
   ======================================== */
.error {
    border-color: var(--error-color) !important;
    box-shadow: 2px 2px 0 var(--error-color) !important;
}

.error:hover {
    border-color: var(--error-color) !important;
    box-shadow: 2px 2px 0 var(--error-color) !important;
}

.dataform-modification-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    z-index: 15;
    display: none;
    animation: pulse 2s infinite;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.dataform-modification-indicator.show {
    display: block;
}

.dataform-modification-indicator.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    animation: none;
}

.dataform-modification-indicator i {
    margin-right: 4px;
    color: #f39c12;
}

.dataform-modification-indicator.success i {
    color: #28a745;
}

.dataform-modification-indicator .revert-btn {
    background: #fff;
    border-radius: 50%;
    height: 10px;
    width: 10px;
    font-size: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: bold;
    font-size: 0.7rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 4px;
    margin: 0px;
    text-align: center;
    vertical-align: middle;
}

.calc-info-container {
    padding: 5px 10px 10px 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.calc-info-label {
    font-weight: bold;
    color: #495057;
    margin-bottom: 10px;
    display: block;
}

.dataform-modification-indicator .revert-btn:hover {
    scale: 1.1;
}

.dataform-modification-indicator .revert-btn:active {
    transform: translateY(1px);
}


/* Styles pour le chargeur de fichiers avec formulaire */
.form-button {
    margin-top: 10px !important;
    padding: 10px !important;
}

.thin-button {
    padding: 0px !important;
}

.form-record-button {
    margin-top: 15px !important;
}

.form-container {
    padding: 10px;
    width: 100%;
}

.form-container fieldset {
    margin-bottom: 20px;
}

.form-container legend {
    font-weight: bold;
    color: #333;
}

/* .form-container div {
    margin-bottom: 15px;
} */

.form-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-container select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.form-container input:focus,
.form-container select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, .25);
}

.form-container table {
    width: 100%;
    border-collapse: collapse;
}

.form-container table td {
    padding: 0.3rem;
    border-bottom: 1px solid var(--accent-color-select-table);
}

.form-container table tr:hover {
    background-color: #f5f5f5;
}

.csv-bordered th,
.csv-bordered td {
    border: 1px solid #333 !important;
}

.csv-bordered {
    border-collapse: collapse !important;
}

.field-error-container {
    color: var(--error-color);
    font-size: 0.65rem;
    margin-top: 0.25rem;
    margin-bottom: 0.35rem;
}

.field-error {
    display: block;
    width: 100%;
}

input.field-error,
select.field-error {
    border-color: var(--error-color);
}

input.field-error:focus,
select.field-error:focus {
    border-color: var(--error-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-text {
    font-size: 8px;
    color: #666;
    padding: 0 15px;
}

@keyframes fieldHighlight {
    0% {
        background-color: rgba(220, 53, 69, 0.1);
        border-color: var(--error-color);
    }

    100% {
        background-color: transparent;
        border-color: #ced4da;
    }
}

.field-highlight {
    animation: fieldHighlight 2s ease-out;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
}

.form-group img {
    margin-top: 5px;
    width: 100%;
}

.container-image-btn {
    position: relative;
    min-width: 100px;
}

.container-image-btn img {
    max-width: 350px;
    cursor: pointer;
    transition: all 0.3s, filter 0.3s;
    outline: 0px solid white;
    outline-offset: -2px;
}

.container-image-btn:hover img {
    opacity: 0.9;
    filter: brightness(1.05);
    outline: 2px solid white;
    outline-offset: -10px;
}

.container-image-btn::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 0px;
    background-color: transparent;
    background-image: url('../IMAGES/GUI/BUTTONS/edit_photo.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.2s;
    left: 0px;
    top: 5px;
    cursor: pointer;
}

.container-image-btn:hover::after {
    opacity: 1;
}

/* Style pour l'image de profil en mode édition */
.image-preview[style*="border-radius: 50%"] {
    width: 150px !important;
    height: 150px !important;
    object-fit: cover;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid #f0f0f0;
}

.selected-file-name {
    margin-left: 10px;
    font-size: 0.9rem;
    color: #666;
}

.image-delete-btn.close {
    position: absolute;
    top: 0;
    top: -20px;
    left: 330px;
    font-size: smaller !important;
    color: black !important;
    cursor: pointer;
    transition: transform 0.2s;
    font-weight: bold;
}

.image-delete-btn.close:hover,
.image-delete-btn.close:focus {
    transform: scale(1.1) rotate(90deg);
}

.form-buttons {
    display: flex;
    justify-content: space-evenly;
}

.form-field-container {
    padding: 0 10px;
}

/* ✨ Focus */
.custom-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* MULTIPLE-specific */
.custom-select[multiple] {
    width: 100%;
    height: 10rem;
    padding: 0.5rem;
    font-family: sans-serif;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f8f9fa;
    color: #333;
    overflow-y: auto;
    outline: none;
    box-sizing: border-box;

}

.custom-select[multiple] option {
    padding: 0.4rem;
    cursor: pointer;
}

.custom-select[multiple] option:hover {
    background-color: #f0f8ff;
}

.custom-select[multiple] option:checked {
    background-color: var(--primary-color);
    border-bottom: #ffffff solid 1px;
    color: white;
    font-weight: bold;
}

.custom-select[multiple] option:checked:first-of-type {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.custom-select[multiple] option:checked:last-of-type {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.custom-select[multiple]:focus option:checked {
    background-color: var(--secondary-color);
}

/* 🛑 Disabled */
.custom-select:disabled,
select:disabled {
    background-color: var(--primary-color) !important;
    color: #aaa;
    cursor: not-allowed;
    opacity: 0.5;
}


/* Colonnes */
.col-12 {
    width: 100%;
}

.col-6 {
    width: 50%;
}

.col-4 {
    width: 33.333333%;
}

.col-3 {
    width: 25%;
}

.col-8 {
    width: 66.666667%;
}

.col-9 {
    width: 75%;
}

/* Responsive - Basé sur la taille de la modale */
.modal-content.modal-responsive-small .form-field-container,
.modal-content.modal-responsive-medium .form-field-container {
    width: 100% !important;
}

/* Classes responsive pour les colonnes */
.col-6-responsive {
    width: 50%; /* Comportement par défaut (col-6) */
}

/* Media query pour les écrans moyens */
@media (max-width: 1400px) {
    .col-6-responsive {
        width: 100% !important;
    }
}

/* Fallback pour les très petits écrans */
@media (max-width: 480px) {
    .form-field-container {
        width: 100% !important;
    }
}