/**
 * Styles pour le formulaire de soumission de documents
 */

/* Container principal */
.dup-form-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.dup-form-wrapper {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

/* Titre */
.dup-form-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 25px 0;
    text-align: center;
}

/* Formulaire */
.dup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dup-form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Labels */
.dup-label {
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 5px;
}

.dup-required {
    color: #e74c3c;
    font-weight: bold;
}

/* Inputs */
.dup-input,
.dup-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.dup-input:focus,
.dup-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.dup-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Input de fichier personnalisé */
.dup-file-input-wrapper {
    position: relative;
}

.dup-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.dup-file-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.dup-file-label:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.dup-file-input:focus + .dup-file-label {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.dup-file-button {
    background: #3498db;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.dup-file-label:hover .dup-file-button {
    background: #2980b9;
}

.dup-file-name {
    color: #666;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* Texte d'aide */
.dup-help-text {
    font-size: 13px;
    color: #666;
    margin: 5px 0 0 0;
    font-style: italic;
}

/* Bouton de soumission */
.dup-submit-button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    margin-top: 10px;
}

.dup-submit-button:hover {
    background: #229954;
}

.dup-submit-button:active {
    transform: scale(0.98);
}

.dup-submit-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.dup-message {
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-top: 15px;
}

.dup-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dup-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dup-form-wrapper {
        padding: 20px;
    }
    
    .dup-form-title {
        font-size: 20px;
    }
    
    .dup-file-label {
        flex-direction: column;
        text-align: center;
    }
    
    .dup-file-button {
        width: 100%;
    }
    
    .dup-submit-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dup-form-container {
        padding: 10px 0;
    }
    
    .dup-form-wrapper {
        padding: 15px;
        box-shadow: none;
    }
    
    .dup-input,
    .dup-textarea {
        font-size: 16px; /* Éviter le zoom sur iOS */
    }
}

/* Animation de chargement */
@keyframes dup-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dup-submit-loading::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    margin-right: 8px;
    animation: dup-spin 0.8s linear infinite;
    vertical-align: middle;
}
