:root {
    --form-primary-color: #e11f12cc;
    --form-primary-hover: #c5170d;
    --form-secondary-color: #f3f4f6;
    --form-accent-color: #f59e0b;
    --form-text-color: #1f2937;
    --form-light-text: #6b7280;
    --form-success-color: #10b981;
    --form-error-color: #ef4444;
    --form-border-radius: 8px;
    --form-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --form-transition: all 0.3s ease;
}

/* ========================================
   FORMULAIRES ET CHAMPS
   ======================================== */

.app-form .two-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .app-form .two-columns {
        grid-template-columns: 1fr 1fr;
    }
}

.required::after {
    content: "*";
    color: var(--form-error-color);
    margin-left: 4px;
}

/* ========================================
   BOUTONS
   ======================================== */

.app-form .form-actions {
    display: flex !important;
    justify-content: space-between;
    margin-top: 30px;
    visibility: visible !important;
}

.app-form #step1 .form-actions {
    justify-content: flex-end;
}

.app-form .btn {
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--form-transition);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.app-form .btn-prev {
    background-color: var(--form-secondary-color);
    color: var(--form-text-color);
}

.app-form .btn-prev:hover {
    background-color: #d1d5db;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.app-form .btn-next {
    background-color: var(--form-primary-color);
    color: white;
}

.app-form .btn-submit {
    background-color: var(--form-primary-color);
    color: white;
}

.app-form .btn-next:hover {
    background-color: var(--form-primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(225, 31, 18, 0.3);
}

.app-form .btn-submit:hover {
    background-color: var(--form-primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(225, 31, 18, 0.3);
}

.btn-submit.d-none {
    display: none !important;
}

.btn-submit:not(.d-none) {
    display: inline-block !important;
}

.app-form .btn-prev.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Style pour le message d'erreur */
.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.form-label.required::after {
    content: " *";
    color: #dc3545;
}

/* Style pour les colonnes Bootstrap */
.col-md-6 {
    padding-left: 8px;
    padding-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .col-md-6 {
        padding-left: 6px;
        padding-right: 6px;
    }
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .row .col-md-6 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.hidden {
    display: none !important;
}

/* Ensure hidden class overrides any other display properties */
#organisme-section.hidden {
    display: none !important;
}

/* Form section enhancements */
.form-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--form-border-radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

/* Error message enhancements */
.error-message {
    color: var(--form-error-color);
    font-size: 13px;
    margin-top: 5px;
    display: none;
    padding: 8px 12px;
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--form-error-color);
    font-weight: 500;
    clear: both;
}

.error-message:not(.d-none) {
    display: block !important;
}

/* Form input enhancements */
.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: var(--form-border-radius);
    font-size: 16px;
    transition: var(--form-transition);
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
    outline: none;
    border-color: var(--form-primary-color);
    box-shadow: 0 0 0 3px rgba(225, 31, 18, 0.2);
    background-color: #fff;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--form-text-color);
    font-size: 15px;
}

.required::after {
    content: "*";
    color: var(--form-error-color);
    margin-left: 4px;
}

/* Select dropdown enhancements */
.form-input:focus {
    outline: none;
    border-color: var(--form-primary-color);
    box-shadow: 0 0 0 3px rgba(225, 31, 18, 0.2);
    background-color: #fff;
}

/* Error state for form inputs */
.form-input.error {
    border-color: var(--form-error-color) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.form-input.error:focus {
    border-color: var(--form-error-color) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important;
}

.form-input.is-invalid {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-input.is-invalid:focus {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}


@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 767.98px) {
    .app-form .two-columns {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    .fees-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */


@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

.highlight-error {
    animation: highlight 1s ease;
}

@keyframes highlight {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0.3);
    }
}

/* Confirmation step specific styles */
.confirmation-only {
    /* This class ensures the declaration section only appears in the confirmation step */
    /* It's contained within the step4 div, but we make sure it's hidden when step is not active */
}

/* Enhanced form container styling */
.form-container {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 800px;
    /* padding: 50px; */
     /* Increased padding for better spacing */
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.form-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--form-primary-color),
            var(--form-accent-color));
    z-index: 1;
}

/* Enhanced form title */
.form-title {
    text-align: center;
    margin-bottom: 30px;
    /* margin-top: 25px; */
    color: var(--form-primary-color);
    font-size: 26px;
    border-bottom: none;
    padding-bottom: 15px;
    font-weight: 700;
    position: relative;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 700;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    position: relative;
}

.form-title::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg,
            var(--form-primary-color),
            var(--form-accent-color));
    border-radius: 2px;
}

/* Enhanced form group */
.form-group {
    margin-bottom: 20px;
}

/* Enhanced form inputs */
.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--form-primary-color);
    box-shadow: 0 0 0 3px rgba(225, 31, 18, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

/* Input with icon */
.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: var(--form-primary-color);
}

.input-icon input,
.input-icon select {
    padding-left: 45px !important;
}

/* Adjust focus styles for inputs with icons */
.input-icon input:focus,
.input-icon select:focus {
    padding-left: 45px !important;
}

/* Enhanced form labels */
.form-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--form-text-color);
    font-size: 16px;
    position: relative;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    letter-spacing: -0.1px;
}

/* Enhanced error messages */
.error-message {
    color: var(--form-error-color);
    font-size: 13px;
    margin-top: 6px;
    display: none;
    padding: 6px;
}

/* Enhanced form actions - removed duplicate */
#step4 .form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}

#step4 .form-check-input {
    margin-top: 4px;
}

.edit-section-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.edit-section-btn:hover {
    background: #0056b3;
}

.edit-section-btn:active {
    transform: translateY(0);
}

.edit-section-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.edit-section-btn:hover {
    background: linear-gradient(135deg, #f59e0b, var(--form-accent-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.edit-section-btn:hover::before {
    left: 100%;
}

.edit-section-btn i {
    font-size: 11px;
}

/* Edit buttons for review sections */
.edit-section-btn {
    background: linear-gradient(135deg, #e11f12cc, #c5170d);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 6px rgba(225, 31, 18, 0.15);
    position: relative;
    overflow: hidden;
    margin-left: auto;
    align-self: center;
}

.edit-section-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.edit-section-btn:hover {
    background: linear-gradient(135deg, #f59e0b, #f59e0b);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.edit-section-btn:hover::before {
    left: 100%;
}

.edit-section-btn i {
    font-size: 11px;
}

.edit-section-btn:active {
    transform: translateY(0);
}


.edit-section-btn {
    background: linear-gradient(135deg, var(--form-primary-color), #c5170d);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 6px rgba(225, 31, 18, 0.15);
    position: relative;
    overflow: hidden;
    margin-left: auto;
    align-self: center;
}

@media (max-width: 768px) {
    .btn {
        /* width: 100%; */
        justify-content: center;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}