/* ===== FORMULAIRE DE PROPOSITION DE PROJET ===== */

.ad-project-proposal-form {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* En-tête du formulaire */
.form-header {
    background: linear-gradient(135deg, #0073aa, #00a0d2);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.form-header h2 {
    margin: 0 0 15px 0;
    font-size: 2em;
    font-weight: 600;
}

.form-description {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
    line-height: 1.5;
}

/* Section d'aide */
.proposal-help {
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.proposal-help h3 {
    margin: 0 0 25px 0;
    color: #0073aa;
    font-size: 1.4em;
}

.help-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.tip-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.tip-icon {
    font-size: 1.8em;
    flex-shrink: 0;
    margin-top: 5px;
}

.tip-item strong {
    display: block;
    color: #0073aa;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.tip-item p {
    margin: 0;
    color: #666;
    line-height: 1.4;
}

/* Formulaire principal */
.proposal-form {
    padding: 40px 30px;
}

.form-section {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 2px solid #f0f0f0;
}

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

.form-section h3 {
    margin: 0 0 30px 0;
    color: #0073aa;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-icon {
    font-size: 1.3em;
}

/* Groupes de champs */
.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group.half {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1.05em;
}

/* Champs de saisie */
.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* Options radio personnalisées */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 250px;
    background: #fafafa;
}

.radio-option:hover {
    border-color: #0073aa;
    background: white;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    background: white;
}

.radio-option input:checked + .radio-custom {
    border-color: #0073aa;
    background: #0073aa;
}

.radio-option input:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-label {
    flex: 1;
}

.radio-label strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.radio-label small {
    color: #666;
    line-height: 1.3;
}

/* Aide contextuelle */
.field-help {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Compteur de caractères */
.char-counter {
    text-align: right;
    margin-top: 5px;
    font-size: 0.85em;
    color: #999;
}

/* Zone d'upload de fichiers */
.file-upload-area {
    border: 3px dashed #ddd;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: #0073aa;
    background: #f0f8ff;
}

.upload-placeholder {
    pointer-events: none;
}

.upload-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 15px;
}

.upload-placeholder p {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #333;
}

.upload-placeholder small {
    color: #666;
}

/* Liste des fichiers */
.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.file-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: 600;
    color: #333;
}

.file-size {
    font-size: 0.85em;
    color: #666;
}

.file-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 0.9em;
}

.file-remove:hover {
    background: #c82333;
}

/* Actions du formulaire */
.form-actions {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    margin-top: 40px;
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #0073aa;
    color: white;
}

.btn-primary:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,115,170,0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modal */
.ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 40px 30px;
    text-align: center;
}

.modal-header.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0 0 15px 0;
    font-size: 1.8em;
}

.modal-header p {
    margin: 0 0 15px 0;
    opacity: 0.9;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

/* États de validation */
.form-group.error input,
.form-group.error textarea {
    border-color: #dc3545;
    background: #fff5f5;
}

.form-group.success input,
.form-group.success textarea {
    border-color: #28a745;
    background: #f8fff9;
}

.error-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Animation de chargement */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive */
@media (max-width: 768px) {
    .ad-project-proposal-form {
        margin: 10px;
        border-radius: 8px;
    }
    
    .form-header {
        padding: 30px 20px;
    }
    
    .proposal-help,
    .proposal-form {
        padding: 20px;
    }
    
    .help-tips {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tip-item {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-group.half {
        margin-bottom: 25px;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .radio-option {
        min-width: auto;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .form-header h2 {
        font-size: 1.6em;
    }
    
    .form-section h3 {
        font-size: 1.3em;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 30px 20px;
    }
	
	.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 8px;
    background: #fff;
}

.file-item.uploading {
    border-color: #0073aa;
    background: #f7f7f7;
}

.file-item.uploaded {
    border-color: #46b450;
    background: #f9fff9;
}

.file-item.error {
    border-color: #dc3232;
    background: #fff9f9;
}

.upload-progress-container {
    flex: 1;
    margin-left: 10px;
    position: relative;
}

.upload-progress {
    height: 4px;
    background: #0073aa;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.upload-status {
    font-size: 11px;
    color: #666;
    position: absolute;
    top: 6px;
    left: 0;
}

.file-remove {
    background: #dc3232;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
    margin-left: 10px;
}

.file-remove:hover {
    background: #a00;
}
}