/* ============================================
   CHATRENCONTRE - Auth CSS
   Styles pour l'authentification
   ============================================ */

/* Modal Overlay */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease-out;
}

/* Modal Container */
.auth-modal {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 25px 50px -12px rgba(0, 0, 0, 0.8);
    animation: scaleIn 0.3s ease-out;
}

/* Modal Header */
.auth-header {
    position: relative;
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.auth-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.auth-title {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Modal Body */
.auth-body {
    padding: 1.5rem 2rem 2rem;
}

/* Social Buttons */
.auth-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-social-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.auth-social-btn svg {
    width: 20px;
    height: 20px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.auth-input {
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.auth-input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-input.error {
    border-color: #ef4444;
}

.auth-error {
    font-size: 0.8125rem;
    color: #ef4444;
}

/* Profile Type Selector */
.auth-profile-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.auth-profile-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-profile-type:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.auth-profile-type.selected {
    background: rgba(230, 57, 70, 0.1);
    border-color: #e63946;
}

.auth-profile-type-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 1.25rem;
}

.auth-profile-type.selected .auth-profile-type-icon {
    background: rgba(230, 57, 70, 0.2);
}

.auth-profile-type-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.auth-profile-type.selected .auth-profile-type-label {
    color: #fff;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #e63946 0%, #c62828 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px -10px rgba(230, 57, 70, 0.5);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Footer */
.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.auth-footer-text {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.5);
}

.auth-footer-link {
    color: #e63946;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-footer-link:hover {
    color: #ff6b6b;
}

/* Terms */
.auth-terms {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    line-height: 1.6;
}

.auth-terms a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
}

.auth-terms a:hover {
    color: #fff;
}

/* Steps Indicator */
.auth-steps {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-step {
    width: 32px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.auth-step.active {
    background: #e63946;
}

.auth-step.completed {
    background: #22c55e;
}

/* Region Select */
.auth-select {
    appearance: none;
    padding: 0.875rem 2.5rem 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='rgba(255,255,255,0.5)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-select:focus {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.auth-select option {
    background: #1a1a1a;
    color: #fff;
}

/* ============================================
   Phone Verification Code Inputs
   ============================================ */

.auth-code-inputs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.auth-code-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    transition: all 0.2s ease;
    caret-color: #e63946;
}

.auth-code-input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
    outline: none;
}

.auth-code-input:not(:placeholder-shown) {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Resend Code Section */
.auth-resend {
    text-align: center;
    margin: 1rem 0;
    min-height: 24px;
}

.auth-resend-btn {
    background: none;
    border: none;
    color: #e63946;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
}

.auth-resend-btn:hover {
    color: #ff6b6b;
}

.auth-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success Message */
.auth-success {
    font-size: 0.8125rem;
    color: #22c55e;
    text-align: center;
    padding: 0.5rem;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
}

/* Animation for code verification */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.auth-code-inputs.error .auth-code-input {
    border-color: #ef4444;
    animation: shake 0.3s ease-in-out;
}

/* Phone input formatting */
.auth-input[type="tel"] {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 0.5px;
}

/* ============================================
   Email Sent Screen (Magic Link)
   ============================================ */

.auth-email-sent {
    text-align: center;
    padding: 1rem 0;
}

.auth-email-sent-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.auth-email-sent-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.auth-email-sent-text strong {
    color: #fff;
    font-weight: 600;
}

.auth-email-sent-info {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.auth-email-sent-info p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-email-sent-info p:first-child {
    margin-top: 0;
}

.auth-email-sent-info p:last-child {
    margin-bottom: 0;
}

/* Magic link loading state */
.auth-magic-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.auth-magic-loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #e63946;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.auth-magic-loading-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

