/* Variables CSS pour la page d'inscription - YesReCan TRC */
:root {
    --primary-gradient: linear-gradient(135deg, #4f9cf9 0%, #2563eb 100%);
    --secondary-gradient: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --success-gradient: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --danger-gradient: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    --warning-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    
    --text-light: rgba(255, 255, 255, 0.9);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --shadow-glow: 0 0 40px rgba(79, 156, 249, 0.3);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 15% 75%, rgba(79, 156, 249, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 85% 25%, rgba(96, 165, 250, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 25% 25%, rgba(52, 211, 153, 0.3) 0%, transparent 60%);
    animation: floating 8s ease-in-out infinite;
    z-index: -1;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(3deg); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    animation: slideDown 0.8s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Space Grotesk', sans-serif;
}

.navbar-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.lang-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    border-radius: 25px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: var(--primary-gradient);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    background: var(--primary-gradient);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Main Container */
.signup-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    position: relative;
}

/* Signup Card */
.signup-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin: 6rem auto 2rem;
}

.signup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Title */
.signup-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    font-family: 'Space Grotesk', sans-serif;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px rgba(67, 233, 123, 0.5)); }
    to { filter: drop-shadow(0 0 25px rgba(56, 249, 215, 0.8)); }
}

/* Progress Indicator */
.progress-container {
    margin-bottom: 2.5rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 1rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--glass-border);
    z-index: 1;
}

.progress-line {
    position: absolute;
    top: 50%;
    left: 0;
    height: 2px;
    background: var(--accent-gradient);
    width: 33.33%;
    transition: width 0.5s ease;
    z-index: 2;
}

.step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    position: relative;
    z-index: 3;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    animation: pulse 2s infinite;
}

.step.completed {
    background: var(--success-gradient);
    border-color: transparent;
    color: #fff;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(67, 233, 123, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(67, 233, 123, 0); }
    100% { box-shadow: 0 0 0 0 rgba(67, 233, 123, 0); }
}

/* Form */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-input {
    padding: 1.25rem 1.5rem;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-light);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: #4f9cf9;
    box-shadow: 0 0 0 4px rgba(79, 156, 249, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

.form-input.error {
    border-color: #f87171;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Textarea for reason */
.form-textarea {
    padding: 1.25rem 1.5rem;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-light);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    resize: vertical;
    min-height: 120px;
}

.form-textarea:focus {
    outline: none;
    border-color: #4f9cf9;
    box-shadow: 0 0 0 4px rgba(79, 156, 249, 0.1);
    transform: translateY(-2px);
}

.form-textarea::placeholder {
    color: var(--text-secondary);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: var(--glass-border);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak { background: var(--danger-gradient); width: 25%; }
.strength-medium { background: var(--warning-gradient); width: 50%; }
.strength-strong { background: var(--success-gradient); width: 75%; }
.strength-very-strong { background: var(--accent-gradient); width: 100%; }

/* Password input with icon */
.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--text-light);
}

/* reCAPTCHA styling */
.recaptcha-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--glass-bg);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.g-recaptcha {
    transform: scale(0.9);
    transform-origin: center;
}

/* Signup Button */
.signup-button {
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    margin-top: 1.5rem;
}

.signup-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.signup-button:hover::before {
    left: 100%;
}

.signup-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.4);
}

.signup-button:active {
    transform: translateY(-1px);
}

.signup-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 6rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

.flash {
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    border-left: 4px solid;
    backdrop-filter: blur(20px);
    animation: slideInRight 0.5s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.flash.success {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    border-left-color: #34d399;
}

.flash.error, .flash.danger {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border-left-color: #f87171;
}

.flash.warning {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-left-color: #fbbf24;
}

.flash.info {
    background: rgba(79, 156, 249, 0.1);
    color: #4f9cf9;
    border-left-color: #4f9cf9;
}

/* Floating Elements */
.floating-element {
    position: absolute;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    opacity: 0.08;
}

.floating-element:nth-child(1) {
    width: 100px;
    height: 100px;
    background: var(--primary-gradient);
    top: 15%;
    left: 8%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 140px;
    height: 140px;
    background: var(--secondary-gradient);
    top: 70%;
    right: 10%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    bottom: 15%;
    left: 15%;
    animation-delay: 4s;
}

.floating-element:nth-child(4) {
    width: 60px;
    height: 60px;
    background: var(--success-gradient);
    top: 40%;
    right: 20%;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-40px) rotate(90deg); }
    50% { transform: translateY(20px) rotate(180deg); }
    75% { transform: translateY(-20px) rotate(270deg); }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Terms and Conditions */
.terms-group {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 16px;
}

.terms-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #06b6d4;
    margin-top: 2px;
}

.terms-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.terms-link {
    color: #06b6d4;
    text-decoration: none;
    font-weight: 600;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .signup-card {
        max-width: 700px;
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }
    
    .navbar-brand {
        display: none;
    }

    .signup-container {
        padding: 1rem;
    }

    .signup-card {
        padding: 2rem 1.5rem;
        margin: 5rem auto 1rem;
        border-radius: 24px;
        max-width: 100%;
    }

    .signup-title {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-input, .form-textarea {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .signup-button {
        padding: 1.25rem 1.5rem;
        font-size: 1.1rem;
    }

    .flash-messages {
        top: 5rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .progress-steps {
        margin-bottom: 2rem;
        max-width: 250px;
    }

    .step {
        width: 35px;
        height: 35px;
    }

    .g-recaptcha {
        transform: scale(0.8);
    }

    .recaptcha-container {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .signup-card {
        padding: 1.5rem 1rem;
        margin: 4rem auto 1rem;
    }

    .signup-title {
        font-size: 1.8rem;
    }

    .form-input, .form-textarea {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }

    .g-recaptcha {
        transform: scale(0.7);
    }

    .navbar-actions {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Micro-interactions */
.form-group {
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Accessibilité et high contrast */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --glass-bg: rgba(255, 255, 255, 0.2);
        --glass-border: rgba(255, 255, 255, 0.4);
    }
    
    .signup-card, .flash {
        border-width: 2px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: var(--primary-gradient);
    padding: 2rem;
    border-radius: 22px 22px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    color: var(--text-light);
    line-height: 1.6;
}

.modal-body h4 {
    color: #4f9cf9;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.1rem;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.modal-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.modal-body a {
    color: #4f9cf9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.modal-body a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 90vh;
    }

    .modal-header {
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-body h4 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 1% auto;
        border-radius: 16px;
    }

    .modal-header {
        padding: 1rem;
        border-radius: 14px 14px 0 0;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .close-modal {
        width: 35px;
        height: 35px;
        padding: 0.5rem;
    }
}
