﻿/* GLOBAL */
.border-radius-12 {
    border-radius: 12px;
}


/* PREPARATION EXPEDITION */
.card-preparation-expedition {
    box-shadow: 0px 4px 8px 0px #1211121F;
    border-radius: 16px;
}

.preparer-expedition-list-labo {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #E1EEF4;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    width: 20%;
    overflow-x: scroll;
    /* Hide scrollbar for IE, Edge and Firefox */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.preparer-expedition-list-labo::-webkit-scrollbar {
    display: none;
}

.preparer-expedition-labo {
    position: relative;
    display: none;
    gap: 2%;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 12px;
    height: 5rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0px 1px 4px 0px #1211121F;
    padding: 1rem;
}

.preparer-expedition-info-colis-global {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #FFF;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    width: 80%;
}

#preparer-expedition-info-colis {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 50rem;
}

.selected-participant {
    background-color: #F9FBEC;
    border: 1px solid #50571B;
}

.completed-participant {
    pointer-events: none;
    opacity: 0.5;
    background: #F0F7F9;
}

.Container-Info-Participant {
    display: flex;
    flex-direction: column;
    width: 68%;
}

.Laboratory-Name-Participant-Expedition {
    width: 100%;
    height: 24px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    position: relative;
    transition: height 0.3s ease;
}

.Adresse-Participant-Expedition {
    width: 100%;
    height: 16px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    position: relative;
    transition: height 0.3s ease;
}

#template-eil-participant-selectionne-expedition,
#template-liste-colis-by-eil,
#template-colis-eil,
#template-liste-colis-by-participant,
#template-colis-participant {
    display: none;
}

#template-echantillon-eil-participant-selectionne-expedition {
    display: none;
}

#overlay-scanning {
    display: none; /* Caché par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fond sombre avec opacité */
    z-index: 999; /* Placer l'overlay au-dessus de tout le reste */
}

/* La fenêtre modale elle-même (centrée) */
#modal-scanning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centrer horizontalement et verticalement */
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Placer la modale au-dessus de l'overlay */
}
#alert-error-echantillon-not-found,
#error-echantillon-not-found-manualy {
    background-color: #FFF4F4 !important;
    color: #E44646 !important;
    border: 1px solid #E44646 !important;
    padding: 10px !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    gap: .5rem;
    display: none;
}

.input-euro {
    position: relative;
}

.input-euro.right input {
    padding-right: 30px;
    text-align: end;
}

.input-euro::before {
    content: '\20AC'; /* Afficher le symbole euro (€) */
    position: absolute;
    top: 50%; /* Placer verticalement au centre de l'input */
    right: 10px; /* Placer à 10px du côté droit */
    transform: translateY(-50%); /* Centrer verticalement exactement */
    pointer-events: none; /* Empêcher le symbole d'interférer avec la saisie */
}

.btnIconCardDocument {
    padding: 4px;
    cursor: pointer;
    text-decoration: none !important;
    border-radius: 100px;
    border: none;
    background-color: #C7D943;
    align-items: center;
    display: flex;
}

/** LISTE EXPEDITION  */
.btn-ellipsis-vertical {
    border: none;
    background-color: transparent;
}

#gridExpeditionList .k-grid-content tr {
    cursor: pointer;
}

.accordion-colis-eil .title-grid-group-eil > div,
.accordion-colis-eil .title-grid-group-eil > button {
    width: 33%;
}

.progressBar {
    height: 4px;
    background-color: #E1EEF4;
    width: 50%;
    border-radius: 100px;
}

.advancedTitle {
    width: 40%;
}

.bar-progression {
    height: 4px;
    background-color: #C7D943;
    border-radius: 100px;
}

/** Gestion Lot / Echantillon */
[data-container-echantillon-united] {
    padding: .5rem;
    border-radius: 8px;
}

[data-document-associated-container] {
    padding: .5rem;
    border-radius: 8px;
}

[data-echantillonage] {
    border-bottom: 1px solid rgba(0,0,0,.125);
    padding-bottom: 2rem !important;
}

[data-echantillonage]:last-child {
    border-bottom: none;
    padding-bottom: .5rem !important;
}

.containerDocumentsDashed {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap !important;
    width: 100% !important;
    height: 30rem;
    border-radius: 12px;
    border: 2px dashed #B6CFD9;
    background-color: #f7fbfc;
    padding: 1rem;
    overflow: auto;
    align-content: flex-start;
}

.autresDocumentWhite {
    height: 80px;
    gap: 3rem;
    border-radius: 12px;
    align-items: center;
    background-color: white;
    flex: 0 0 auto !important;
}

.documentsParticipantWhite {
    height: 80px;
    gap: 3rem;
    border-radius: 12px;
    align-items: center;
    background-color: white;
    flex: 0 0 auto !important;
}

#containerListeTestEchantillon .accordion-item {
    border: 1px solid rgba(0,0,0,.125) !important;
    border-radius: 8px !important;
}

#containerListeTestEchantillon .accordion-button {
    border-radius: 8px !important;
}

#containerListeTestEchantillon .accordion-button:not(.collapsed) {
    color: black !important;
    background-color: #f7fbfc !important;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}


    #containerListeTestEchantillon .accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
    }



/** GENERIQUE */
/** CURSOR */
.pointer {
    cursor: pointer;
}

/** HEIGHT */
.h-70 {
    height: 70% !important;
}

/** WIDTH */
.w-10 {
    width: 10% !important;
}

.w-19 {
    width: 19% !important;
}

.w-20 {
    width: 20% !important;
}

.w-30 {
    width: 30% !important;
}

.w-48 {
    width: 48% !important;
}

.w-50 {
    width: 50% !important;
}

/** BORDER-RADIUS */

.border-radius-8 {
    border-radius: 8px
}

.border-radius-16 {
    border-radius: 16px
}

/** BOX-SHADOW */

.btn-box-shadow-none:focus {
    box-shadow: none !important;
}
.btn-box-shadow-4-8 {
    box-shadow: 0px 4px 8px 0px #1211121F;
}

/** Case à cocher */

input.checkbox[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid #FFFFFF;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input.checkbox[type="checkbox"]:checked {
    background: #C7D943;
    border: 1px solid #C7D943;
}

input.checkbox[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #FFFFFF;
    border: 1px solid #D9EAF1;
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/** Input with selector */
.container-input-selecor {
    display: flex;
    align-items: center;
    border: 1px solid #D9EAF1;
    border-radius: 10px;
    overflow: hidden;
}

.container-input-selecor input {
    flex: 1;
    border: none;
    outline: none;
}

.container-input-selecor select {
    border: none;
    outline: none;
    padding: 12px;
    cursor: pointer;
    background-color: #F7FBFC;
}

/** BADGE */
.primary-badge {
    background-color: #EBF7F0;
    color: #55D284;
    border-radius: 100px;
    padding-top: 4px;
    padding-right: 12px;
    padding-bottom: 4px;
    padding-left: 12px;
    border: 0.5px solid;
    font-size: 12px;
}

.error-badge {
    background-color: #FBE4E4;
    color: #E44646;
    border-radius: 100px;
    padding-top: 4px;
    padding-right: 12px;
    padding-bottom: 4px;
    padding-left: 12px;
    border: 0.5px solid;
    font-size: 12px;
}

.warning-badge {
    background-color: #FFF0DB;
    color: #EF8F11;
    border-radius: 100px;
    padding-top: 4px;
    padding-right: 12px;
    padding-bottom: 4px;
    padding-left: 12px;
    border: 0.5px solid;
    font-size: 12px;
}

.neutral-badge {
    background-color: #F7FBFC;
    color: #2C6177;
    border-radius: 100px;
    padding-top: 4px;
    padding-right: 12px;
    padding-bottom: 4px;
    padding-left: 12px;
    border: 0.5px solid;
    font-size: 12px;
}

/** CHAMP INPUT TIME */

.time-input > input[type="number"] {
    /* Supprimer les bordures */
    border: none;
    outline: none;
    /* Style personnalisé pour une apparence propre (optionnel) */
    background: transparent;
    color: inherit; /* Maintenir la couleur du texte */
    font-size: inherit; /* Maintenir la taille de la police */
}

.time-input > input[type="number"]::-webkit-inner-spin-button,
.time-input > input[type="number"]::-webkit-outer-spin-button {
    /* Supprimer les flèches (Chrome, Safari, Edge) */
    -webkit-appearance: none;
    margin: 0;
}

.time-input > input[type="number"] {
    -moz-appearance: textfield; /* Supprimer les flèches (Firefox) */
}

.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.disabled-bouton-import-files {
    opacity: 0.6 !important;
    cursor: no-drop !important;
}

.returnShipment {
    opacity: 50%;
    background-color: #F0F7F9;
}

.btnFooterModal {
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    padding-block: .25rem;
    padding-inline: .75rem;
}

.badge-result-sent {
    width: 100px;
    scale: 1;
    display: block !important;
    font-size: 12px;
    border: 1px solid #198754;
    background-color: #EBF7F0 !important;
    color: #198754 !important;
    font-weight: normal;
}


.badge-result-not-sent {
    width: 100px;
    scale: 1;
    display: block !important;
    font-size: 12px;
    border: 1px solid #ff7f00;
    background-color: #fff0db !important;
    color: #ff7f00 !important;
    font-weight: normal;
}

.badge-result-invalid {
    width: 100px;
    scale: 1;
    display: block !important;
    font-size: 12px;
    border: 1px solid #f31700;
    background-color: #FBE4E4 !important;
    color: #f31700 !important;
    font-weight: normal;
}


/** GANTT - CALENDAR **/
/* En-tête de week-end (via template personnalisé) */
.weekend-header {
    background-color: #fce4ec !important;
    font-weight: bold;
}

/* Heures non travaillées (optionnel selon config) */
.k-grid .k-table-row .k-header.k-table-td.k-nonwork-hour {
    background-color: #fce4ec !important;
}

.k-dialog-buttongroup .btnEil.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   FORM SCHEMA EDITOR
   ======================================== */

/* Container principal */
.form-editor-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.form-editor {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 1rem;
}

/* Sections */
.editor-section {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(to right, #f8fafc, #fff);
    border-bottom: 1px solid #e5e7eb;
}

.section-header svg {
    color: #9FAE36;
}

.section-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.section-header .badge {
    background: #9FAE36;
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.section-content {
    padding: 1.25rem;
}

/* Formulaire - Lignes et champs */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-input {
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #9FAE36;
    box-shadow: 0 0 0 3px rgba(159, 174, 54, 0.1);
}

.form-input-sm {
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8rem;
    min-width: 120px;
}

/* Options avancées */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
}

.option-label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-label > span {
    font-weight: 500;
    color: #374151;
}

.option-sub-field {
    margin-top: 0.5rem;
}

.option-sub-fields {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.mini-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mini-field label {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #9FAE36;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Section Tests */
.tests-section .section-content {
    background: #f9fafb;
}

.tests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn-add-test {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    background: #fff;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-test:hover {
    border-color: #9FAE36;
    color: #9FAE36;
    background: #f8f9f3;
}

/* Footer sticky en bas de la modal */
.editor-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    margin-top: auto;
    flex-shrink: 0;
}

.btn-save, .btn-cancel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save {
    background: #9FAE36;
    color: #fff;
    border: none;
}

.btn-save:hover {
    background: #8a9a2e;
}

.btn-cancel {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-cancel:hover {
    background: #f3f4f6;
}

/* ========================================
   TEST GROUP EDITOR
   ======================================== */

.test-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.test-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #9FAE36 0%, #7a8a2a 100%);
    gap: 1rem;
}

.test-title-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.test-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
}

.test-title-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.95);
    font-size: 0.95rem;
    font-weight: 500;
}

.test-title-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}

.test-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-modern {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: #fff;
    font-size: 0.8rem;
}

.checkbox-modern input {
    display: none;
}

.checkbox-modern .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-modern input:checked + .checkmark {
    background: #fff;
    border-color: #fff;
}

.checkbox-modern input:checked + .checkmark::after {
    content: '✓';
    color: #9FAE36;
    font-size: 12px;
    font-weight: bold;
}

.btn-delete-test {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-test:hover {
    background: #ef4444;
}

.test-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #fafafa;
}

.config-block {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.config-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    cursor: pointer;
    transition: background 0.2s;
}

.config-block-header:hover {
    background: #f1f5f9;
}

.config-block-header.active {
    cursor: default;
}

.config-block-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.config-block-title svg {
    color: #9FAE36;
}

.config-block-content {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Toggle Switch Small */
.toggle-switch-sm {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch-sm input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider-sm {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 20px;
}

.toggle-slider-sm:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch-sm input:checked + .toggle-slider-sm {
    background-color: #9FAE36;
}

.toggle-switch-sm input:checked + .toggle-slider-sm:before {
    transform: translateX(16px);
}

/* ========================================
   FIELD LIST
   ======================================== */

.fields-list-modern {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.field-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.field-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.field-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.field-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9FAE36;
    background: #f5f7e6;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.field-type-badge {
    font-size: 0.7rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.btn-remove-field {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-field:hover {
    background: #fef2f2;
    color: #ef4444;
}

.field-card-body {
    padding: 0.75rem;
}

/* ========================================
   FIELD EDITOR
   ======================================== */

.field-editor-modern {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.field-main-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr 1fr;
    gap: 0.75rem;
}

.field-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.field-input-group label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.field-input {
    padding: 0.5rem 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s;
    background: #fff;
}

.field-input:focus {
    outline: none;
    border-color: #9FAE36;
    box-shadow: 0 0 0 2px rgba(159, 174, 54, 0.1);
}

.field-select {
    cursor: pointer;
}

.field-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem 0;
}

.field-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: #4b5563;
}

.field-checkbox input {
    display: none;
}

.checkbox-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.field-checkbox input:checked + .checkbox-box {
    background: #9FAE36;
    border-color: #9FAE36;
}

.field-checkbox input:checked + .checkbox-box::after {
    content: '✓';
    color: #fff;
    font-size: 10px;
    font-weight: bold;
}

.field-checkbox input:disabled + .checkbox-box {
    opacity: 0.5;
}

.field-extra-config {
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* Calculé */
.calculated-config {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calculated-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
}

.calculated-header svg {
    color: #9FAE36;
}

.calculated-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.formula-input {
    font-family: 'Courier New', monospace;
    background: #fff;
}

.formula-hint {
    font-size: 0.7rem;
    color: #9ca3af;
}

/* Sous-champs */
.subfields-section {
    background: #f3f4f6;
}

.subfields-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
}

.subfields-header svg {
    color: #9FAE36;
}

.subfields-count {
    background: #9FAE36;
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

.subfields-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-add-subfield {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem;
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-subfield:hover {
    border-color: #9FAE36;
    color: #9FAE36;
    background: #f5f7e6;
}

/* ========================================
   ENVIRONMENT EDITOR
   ======================================== */

.env-config-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.env-settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.env-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.env-field label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
}

.env-field-lg {
    flex: 1;
    min-width: 200px;
}

.env-field-sm {
    width: 100px;
}

.env-input {
    padding: 0.5rem 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
}

.env-input:focus {
    outline: none;
    border-color: #9FAE36;
    box-shadow: 0 0 0 2px rgba(159, 174, 54, 0.1);
}

.env-options {
    display: flex;
    gap: 0.75rem;
    padding-bottom: 0.25rem;
}

.env-checkbox {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: #4b5563;
}

.env-checkbox input { display: none; }

.check-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.env-checkbox input:checked + .check-box {
    background: #9FAE36;
    border-color: #9FAE36;
}

.env-checkbox input:checked + .check-box::after {
    content: '✓';
    color: #fff;
    font-size: 10px;
}

.env-fields-section {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.env-fields-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

.fields-badge {
    background: #9FAE36;
    color: #fff;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

.btn-add-env-field {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.625rem;
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-env-field:hover {
    border-color: #9FAE36;
    color: #9FAE36;
    background: #f5f7e6;
}

/* ========================================
   ANALYSIS EDITOR
   ======================================== */

.analysis-config-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.analysis-settings-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.analysis-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 180px;
}

.analysis-field-lg {
    flex: 1;
}

.analysis-field label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
}

.analysis-input {
    padding: 0.5rem 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
}

.analysis-input:focus {
    outline: none;
    border-color: #9FAE36;
    box-shadow: 0 0 0 2px rgba(159, 174, 54, 0.1);
}

.analysis-results-section {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

/* ========================================
   FORM RESULTS EDITOR
   ======================================== */

.form-results-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.validation-rule-section {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.validation-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.toggle-label {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toggle-title {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.toggle-hint {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Toggle Switch Modern */
.toggle-switch-modern {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.toggle-switch-modern input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 22px;
}

.toggle-track:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.toggle-switch-modern input:checked + .toggle-track {
    background-color: #9FAE36;
}

.toggle-switch-modern input:checked + .toggle-track:before {
    transform: translateX(18px);
}

.toggle-switch-modern input:disabled + .toggle-track {
    opacity: 0.5;
    cursor: not-allowed;
}

.validation-config {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.validation-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.validation-field-lg {
    flex: 1;
}

.validation-field label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
}

.validation-input {
    padding: 0.5rem 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    min-width: 80px;
}

.validation-input:focus {
    outline: none;
    border-color: #9FAE36;
    box-shadow: 0 0 0 2px rgba(159, 174, 54, 0.1);
}

/* ========================================
   REPETITION CONFIG EDITOR
   ======================================== */

.repetition-config-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rep-options-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1.5rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.rep-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rep-field label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
}

.rep-input {
    padding: 0.5rem 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    width: 140px;
}

.rep-input:focus {
    outline: none;
    border-color: #9FAE36;
    box-shadow: 0 0 0 2px rgba(159, 174, 54, 0.1);
}

.rep-checkboxes {
    display: flex;
    gap: 1rem;
    padding-bottom: 0.25rem;
}

.rep-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: #4b5563;
}

.rep-checkbox input { display: none; }

.rep-check-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.rep-checkbox input:checked + .rep-check-box {
    background: #9FAE36;
    border-color: #9FAE36;
}

.rep-checkbox input:checked + .rep-check-box::after {
    content: '✓';
    color: #fff;
    font-size: 10px;
}

.rep-fields-section {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.rep-fields-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

.rep-fields-header svg {
    color: #9FAE36;
}

.rep-badge {
    background: #9FAE36;
    color: #fff;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

.btn-add-rep-field {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.625rem;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-rep-field:hover {
    border-color: #9FAE36;
    color: #9FAE36;
    background: #f5f7e6;
}

.dynamic-results-section {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.dynamic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.dynamic-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

.dynamic-title svg {
    color: #9FAE36;
}

.btn-enable, .btn-disable {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-enable {
    background: #9FAE36;
    color: #fff;
}

.btn-enable:hover {
    background: #7a8a2a;
}

.btn-disable {
    background: #fef2f2;
    color: #ef4444;
}

.btn-disable:hover {
    background: #fee2e2;
}

.dynamic-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dynamic-source {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dynamic-source label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
}

.dynamic-source .rep-input {
    width: 100%;
    max-width: 300px;
}
