/**
 * NoxusTime - Inscription (signup) stylesheet
 * Autonome : reprend la palette / police / composants de l'app NoxusTime v2
 * (source: TimeV2/css/noxustime-v2.css + index_current.php login)
 */

/* ========================================
   Variables & Theme
======================================== */
:root {
    /* Primary Colors */
    --primary: #4993C9;
    --primary-dark: #3d7eb3;
    --primary-light: #6bb3e8;
    --primary-gradient: linear-gradient(135deg, #4993C9 0%, #667eea 100%);

    /* Secondary Colors */
    --secondary: #6c5ce7;
    --accent: #00cec9;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #ff7675;
    --info: #74b9ff;

    /* Neutral Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* Shadows */
    --shadow-sm: 0 1px 2px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 40px rgba(73, 147, 201, 0.15);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(255, 255, 255, 0.2);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Reset & Base
======================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 14px; }

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0 0 0.5em 0; font-weight: 600; line-height: 1.3; color: var(--text-primary); }
p { margin: 0 0 1em 0; color: var(--text-secondary); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========================================
   Animated gradient page (cloné du login)
======================================== */
.signup-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #667eea 0%, #4993C9 50%, #48c6ef 100%);
    position: relative;
    overflow: hidden;
    padding: 40px 20px;
}

.signup-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: bgMove 60s linear infinite;
}

@keyframes bgMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Floating decorative shapes */
.floating-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.shape { position: absolute; background: rgba(255, 255, 255, 0.1); border-radius: 50%; animation: float 20s infinite; }
.shape-1 { width: 400px; height: 400px; top: -200px; left: -100px; animation-delay: 0s; }
.shape-2 { width: 300px; height: 300px; top: 50%; right: -150px; animation-delay: -5s; }
.shape-3 { width: 200px; height: 200px; bottom: -100px; left: 30%; animation-delay: -10s; }
.shape-4 { width: 150px; height: 150px; top: 30%; left: 10%; animation-delay: -15s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

/* ========================================
   Container glassmorphism 2 colonnes
======================================== */
.signup-container {
    display: flex;
    width: 100%;
    max-width: 1040px;
    margin: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* ---- Colonne gauche : branding ---- */
.signup-branding {
    flex: 0 0 42%;
    background: linear-gradient(135deg, #4993C9 0%, #667eea 100%);
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.signup-branding::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/><circle cx="50" cy="50" r="30" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/><circle cx="50" cy="50" r="20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>') center/cover;
    opacity: 0.5;
}

.brand-logo {
    width: 96px;
    height: 96px;
    margin-bottom: 24px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    animation: pulse 3s ease-in-out infinite;
    position: relative;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.brand-title { font-size: 2.4rem; font-weight: 300; margin-bottom: 10px; position: relative; color: #fff; }
.brand-title b { font-weight: 700; }

.brand-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 36px;
    position: relative;
    text-transform: uppercase;
}

.brand-features { position: relative; width: 100%; max-width: 280px; }

.brand-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    text-align: left;
    opacity: 0;
    animation: slideInLeft 0.5s ease forwards;
}
.brand-feature:nth-child(1) { animation-delay: 0.3s; }
.brand-feature:nth-child(2) { animation-delay: 0.42s; }
.brand-feature:nth-child(3) { animation-delay: 0.54s; }
.brand-feature:nth-child(4) { animation-delay: 0.66s; }

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.brand-feature-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.brand-trust {
    position: relative;
    margin-top: 36px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

/* ---- Colonne droite : formulaire ---- */
.signup-form-container {
    flex: 1;
    padding: 52px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.signup-form-header { margin-bottom: 28px; }
.signup-form-header h1 { font-size: 1.7rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.signup-form-header p { color: var(--text-muted); font-size: 0.93rem; margin: 0; }

/* Ruban "essai gratuit" */
.trial-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 184, 148, 0.12);
    color: var(--success);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}
.trial-ribbon::before { content: '✓'; font-weight: 700; }

/* ========================================
   Formulaire (composants app)
======================================== */
.signup-form .form-group { margin-bottom: 18px; }

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

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 7px;
}
.form-label .req { color: var(--danger); margin-left: 2px; }

.form-input, .form-select {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font-size: 0.98rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}
.form-select { cursor: pointer; }

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(73, 147, 201, 0.15);
}
.form-input::placeholder { color: var(--text-muted); }

.form-hint { font-size: 0.76rem; color: var(--text-muted); margin-top: 6px; }

/* Slug field : préfixe + champ + statut */
.slug-field { position: relative; }
.slug-input-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    overflow: hidden;
    transition: all var(--transition-fast);
}
.slug-input-wrap.focused {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(73, 147, 201, 0.15);
}
.slug-input-wrap.valid { border-color: var(--success); }
.slug-input-wrap.invalid { border-color: var(--danger); }
.slug-input-wrap .form-input {
    border: none;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    min-width: 0;
}
.slug-input-wrap .form-input:focus { box-shadow: none; }
.slug-status {
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}
.slug-status.checking { color: var(--text-muted); }
.slug-status.available { color: var(--success); }
.slug-status.taken { color: var(--danger); }
.slug-status .mini-spinner {
    width: 14px; height: 14px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Password field + toggle + force */
.password-field { position: relative; }
.password-field .form-input { padding-right: 46px; }
.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 50px;
    width: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.password-toggle:hover { color: var(--primary); }

.pw-strength { margin-top: 8px; }
.pw-strength-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    overflow: hidden;
}
.pw-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width var(--transition-normal), background var(--transition-normal);
    background: var(--danger);
}
.pw-strength-fill.weak   { width: 33%;  background: var(--danger); }
.pw-strength-fill.medium { width: 66%;  background: var(--warning); }
.pw-strength-fill.strong { width: 100%; background: var(--success); }
.pw-strength-label { font-size: 0.75rem; margin-top: 5px; color: var(--text-muted); }

/* Honeypot : caché à l'écran, accessible aux bots */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0;
    overflow: hidden;
}

/* Consent / CGU */
.consent-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 20px;
}
.consent-group input[type="checkbox"] {
    width: 18px; height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}
.consent-group label { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; cursor: pointer; }

/* Bouton principal (gradient signature) */
.signup-btn {
    width: 100%;
    height: 52px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}
.signup-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(73, 147, 201, 0.4); }
.signup-btn:active { transform: translateY(0); }
.signup-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.signup-btn.loading { pointer-events: none; }
.signup-btn .spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}
.signup-btn.loading .spinner { display: block; }
.signup-btn.loading .btn-text { display: none; }

/* Tarifs (rappel discret) */
.pricing-note {
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.pricing-note strong { color: var(--text-primary); }
.pricing-tiers {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.pricing-tier {
    flex: 1;
    min-width: 78px;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 6px;
}
.pricing-tier .tier-price { font-weight: 700; color: var(--primary); font-size: 0.95rem; }
.pricing-tier .tier-unit { font-size: 0.68rem; color: var(--text-muted); }
.pricing-tier .tier-name { font-size: 0.72rem; color: var(--text-secondary); margin-top: 2px; }

/* Footer */
.signup-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.signup-footer a { color: var(--text-secondary); }

/* Alerte inline (erreurs serveur) */
.form-alert {
    display: none;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 18px;
    background: rgba(255, 118, 117, 0.12);
    color: #c0392b;
    border: 1px solid rgba(255, 118, 117, 0.4);
}
.form-alert.show { display: block; animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Écran de succès "vérifiez votre email"
======================================== */
.success-state {
    text-align: center;
    padding: 12px 0;
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.success-icon {
    width: 84px; height: 84px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: rgba(0, 184, 148, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: var(--success);
}
.success-state h1 { font-size: 1.6rem; margin-bottom: 12px; }
.success-state p { color: var(--text-secondary); font-size: 0.95rem; }
.success-email { font-weight: 600; color: var(--text-primary); }
.success-hint {
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ========================================
   Page de confirmation (confirm-success)
   conteneur centré simple (1 carte)
======================================== */
.confirm-container {
    width: 100%;
    max-width: 520px;
    margin: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
}
.confirm-top {
    background: linear-gradient(135deg, #4993C9 0%, #667eea 100%);
    padding: 40px 40px 32px;
    text-align: center;
    color: #fff;
    position: relative;
}
.confirm-top .brand-logo { margin-bottom: 16px; width: 76px; height: 76px; }
.confirm-top h2 { color: #fff; font-weight: 300; font-size: 1.8rem; margin: 0; }
.confirm-top h2 b { font-weight: 700; }
.confirm-body { padding: 40px; text-align: center; }
.confirm-body .success-icon { width: 90px; height: 90px; font-size: 2.6rem; }
.confirm-body h1 { font-size: 1.7rem; margin-bottom: 10px; }
.confirm-body p { color: var(--text-secondary); }

.recap-card {
    text-align: left;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin: 24px 0;
}
.recap-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
}
.recap-row + .recap-row { border-top: 1px solid var(--border-color); }
.recap-label { color: var(--text-secondary); }
.recap-value { font-weight: 700; color: var(--text-primary); font-family: 'Inter', monospace; }

.btn-connect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}
.btn-connect:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(73, 147, 201, 0.4); text-decoration: none; color: #fff; }

.confirm-error .success-icon { background: rgba(255, 118, 117, 0.12); color: var(--danger); }

/* ========================================
   Responsive
======================================== */
@media (max-width: 920px) {
    .signup-container { flex-direction: column; max-width: 480px; }
    .signup-branding { flex: none; padding: 44px 40px; }
    .signup-branding .brand-features,
    .signup-branding .brand-trust { display: none; }
    .signup-branding { padding-bottom: 36px; }
    .signup-form-container { padding: 40px; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .signup-page { padding: 16px 12px; }
    .signup-form-container { padding: 32px 24px; }
    .signup-branding { padding: 36px 24px; }
    .confirm-body { padding: 32px 24px; }
}
