.form-container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.form-header {
    background: var(--bs-primary);
    color: white;
    padding: 2rem;
    text-align: center;
}

.form-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.form-header p {
    font-size: 1rem;
    margin-bottom: 0;
    opacity: 0.9;
}

.form-section {
    padding: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h4 {
    color: var(--bs-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 1.25rem;
}

.form-section h4 i {
    margin-right: 0.75rem;
    color: var(--bs-primary);
    font-size: 1.1rem;
}

/* ===== TYPE SELECTOR ===== */
.type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.type-option {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.type-option:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 0.25rem 0.5rem rgba(var(--bs-primary-rgb), 0.15);
    transform: translateY(-2px);
}

.type-option.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    box-shadow: 0 0.5rem 1rem rgba(var(--bs-primary-rgb), 0.3);
}

.type-option i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--bs-primary);
    transition: color 0.2s ease;
}

.type-option.active i {
    color: white;
}

.type-option h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.type-option p {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0;
}

.form-label {
    font-weight: 600;
    color: var(--bs-primary);
    margin-bottom: 0.5rem;
}

.required {
    color: var(--bs-danger);
    font-weight: bold;
}

.form-control, .form-select {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
    outline: 0;
}

.form-control:invalid, .form-select:invalid {
    border-color: var(--bs-danger);
}

.form-control[disabled], .form-select[disabled],
.form-control[readonly], .form-select[readonly] {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}

.file-upload-area {
    border: 2px dashed #ced4da;
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.2s ease;
    position: relative;
}

.file-upload-area:hover {
    border-color: var(--bs-primary);
    background: #f0f8ff;
}

.file-upload-area.drag-over {
    border-color: var(--bs-primary);
    background: #e6f3ff;
    transform: scale(1.01);
}

.file-upload-area i {
    font-size: 3rem;
    color: var(--bs-primary);
    margin-bottom: 1rem;
    display: block;
}

.file-upload-area h5 {
    color: var(--bs-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.file-upload-area p {
    color: #6c757d;
    margin-bottom: 1rem;
}

.file-upload-area input[type="file"] {
    margin-top: 0.75rem;
}

/* ===== PREVIEW FICHIERS MULTIPLES ===== */
.files-preview-header {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem 0.5rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.files-preview-header h6 {
    margin: 0;
    color: var(--bs-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.files-list {
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    background: white;
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: background-color 0.2s;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-preview-image {
    flex-shrink: 0;
}

.file-preview-image img {
    max-width: 60px;
    max-height: 60px;
    border-radius: 0.375rem;
    object-fit: cover;
}

.file-info {
    flex-grow: 1;
    min-width: 0;
}

.file-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    word-break: break-word;
    color: #333;
}

.file-details {
    font-size: 0.875rem;
    color: #6c757d;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-actions {
    flex-shrink: 0;
}

.file-icon {
    width: 60px;
    height: 60px;
    background: var(--bs-primary);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .form-container {
        margin: 1rem;
        border-radius: 8px;
    }

    .form-header {
        padding: 1.5rem;
    }

    .form-header h1 {
        font-size: 2rem;
    }

    .form-section {
        padding: 1.5rem;
    }

    .d-flex.gap-3 {
        flex-direction: column;
    }

    .d-flex.gap-3 .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .file-upload-area {
        padding: 2rem 1rem;
    }

    .file-upload-area i {
        font-size: 2rem;
    }

    .type-selector {
        grid-template-columns: 1fr;
    }

    .type-option {
        padding: 1rem;
    }

    .type-option i {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .form-header h1 {
        font-size: 1.75rem;
    }

    .form-section h4 {
        font-size: 1.1rem;
    }
}

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

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

.form-container {
    animation: fadeInUp 0.6s ease-out;
}

.form-section {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }

.btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
