/* Styles pour les formulaires d'inscription - TaPrestation */

/* Variables de couleurs */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --error-color: #ef4444;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Styles généraux pour les formulaires */
.register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-bg);
    padding: 2rem 1rem;
    position: relative;
}

/* Bannière rassurante */
.reassurance-banner {
    position: absolute;
    top: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    background-color: rgba(219, 234, 254, 0.9);
    color: var(--primary-color);
    padding: 0.75rem;
    font-weight: 600;
    border-radius: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.register-card {
    width: 100%;
    max-width: 500px;
    background-color: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.register-card:hover {
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.register-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.75rem;
}

.register-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

/* Section headers */
.section-header {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.01em;
}

/* Form fields */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--card-bg);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-control-file {
    display: block;
    width: 100%;
}

/* Custom file input styling */
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-button {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background-color: #e0f2fe;
    color: var(--primary-color);
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #bfdbfe;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.file-input-button:hover {
    background-color: #bfdbfe;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-input-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.file-name-display {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 0.375rem 0.75rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    border: 1px dashed #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Location button */
.location-input-wrapper {
    position: relative;
}

.location-button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.location-button:hover {
    color: var(--primary-hover);
    background-color: rgba(219, 234, 254, 0.5);
}

.location-button:active {
    transform: translateY(-50%) scale(0.95);
}

.location-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.location-help-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Submit button */
.submit-button {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background-color: var(--primary-color);
    border: 1px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.25), 0 3px 5px -1px rgba(37, 99, 235, 0.15);
}

.submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(37, 99, 235, 0.2), 0 1px 2px -1px rgba(37, 99, 235, 0.1);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-button-loading {
    position: relative;
    color: transparent;
}

.submit-button-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin: -0.5rem 0 0 -0.5rem;
    border-radius: 50%;
    border: 2px solid white;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Error messages */
.error-container {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: var(--error-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}

.error-list {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.error-list li {
    margin-bottom: 0.5rem;
}

.error-list li:last-child {
    margin-bottom: 0;
}

.field-error {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.field-error::before {
    content: '⚠️';
    margin-right: 0.25rem;
    font-size: 0.875rem;
}

/* Login link */
.login-link-container {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.login-link {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.login-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.login-link a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
    background-color: rgba(219, 234, 254, 0.3);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .register-container {
        padding: 1rem 0.75rem;
    }
    
    .reassurance-banner {
        font-size: 0.875rem;
        padding: 0.625rem;
        top: 0.75rem;
    }
    
    .register-card {
        padding: 1.5rem;
        border-radius: 0.75rem;
        max-width: 100%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .register-title {
        font-size: 1.5rem;
    }
    
    .register-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .section-header {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-control {
        padding: 0.625rem 0.875rem;
    }
    
    .submit-button {
        padding: 0.75rem 1.25rem;
    }
    
    .login-link {
        margin-top: 1.25rem;
        padding: 0.75rem 0;
    }
}

/* Specific styles for prestataire form */
.prestataire-form .section-header {
    color: #1e40af; /* Slightly darker blue for section headers */
}

/* Specific styles for client form */
.client-form .section-header {
    color: #1e40af;
}

/* Animation for form appearance */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.register-card {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Validation styles */
.form-control.is-valid {
    border-color: var(--success-color);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: var(--error-color);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef4444' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}