* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    background: #f7fafc;
    color: #1a202c;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── HEADER ─── */
.header {
    background: rgba(247, 250, 252, 0.85);
    padding: 1.25rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo img {
    height: 56px;
    width: auto;
    display: block;
    border-radius: 8px;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #033744;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover { color: #011418; }

.back-link svg {
    width: 16px;
    height: 16px;
}

/* ─── MAIN ─── */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem 1.5rem 4rem;
    background: linear-gradient(160deg, #f0f7f8 0%, #f7fafc 60%, #e8f4f6 100%);
}

/* ─── CARD ─── */
.auth-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 32px rgba(3, 55, 68, 0.1), 0 1px 4px rgba(3, 55, 68, 0.06);
    padding: 2.75rem 2.5rem;
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.5s ease-out backwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #011418;
    margin-bottom: 0.4rem;
    letter-spacing: -0.4px;
}

.auth-card .subtitle {
    color: #64748b;
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}

/* ─── ERROR ─── */
.error-msg {
    display: none;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.error-msg.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

/* ─── FORM ─── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.45rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9375rem;
    color: #1a202c;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: #033744;
    box-shadow: 0 0 0 3px rgba(3, 55, 68, 0.1);
    background: #fff;
}

/* ─── PASSWORD STRENGTH ─── */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s, background 0.3s;
}

/* ─── PASSWORD CRITERIA ─── */
.password-criteria {
    margin-top: 0.75rem;
    display: none;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    gap: 0.45rem;
    display: none;
    flex-direction: column;
}

.password-criteria.visible {
    display: flex;
}

.criteria-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8125rem;
    color: #9ca3af;
    transition: color 0.2s;
}

.criteria-item.valid {
    color: #16a34a;
}

.criteria-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.criteria-item.valid .criteria-icon {
    background: #16a34a;
    border-color: #16a34a;
}

.criteria-icon svg {
    width: 9px;
    height: 9px;
    opacity: 0;
    transition: opacity 0.15s;
}

.criteria-item.valid .criteria-icon svg {
    opacity: 1;
}

/* ─── CGU ─── */
.cgu-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
}

.cgu-wrapper input[type="checkbox"] {
    width: 17px;
    height: 17px;
    min-width: 17px;
    margin-top: 0.15rem;
    accent-color: #033744;
    cursor: pointer;
    flex-shrink: 0;
}

.cgu-text {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.55;
    cursor: default;
}

.cgu-text a {
    color: #033744;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.cgu-text a:hover {
    text-decoration: underline;
}

@media (max-width: 360px) {
    .cgu-text a {
        white-space: normal;
    }
}

/* ─── SUBMIT ─── */
.btn-submit {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #033744, #011418);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.2px;
}

.btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

/* ─── DIVIDER ─── */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0;
    color: #9ca3af;
    font-size: 0.8125rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ─── SOCIAL ─── */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    text-decoration: none;
}

.btn-social:hover {
    background: #f8fafc;
    border-color: #033744;
    transform: translateY(-1px);
}

.btn-social svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ─── LOGIN LINK ─── */
.login-prompt {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.login-prompt a {
    color: #033744;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.login-prompt a:hover {
    color: #011418;
    text-decoration: underline;
}

/* ─── FOOTER ─── */
.footer {
    background: #011418;
    color: #ffffff;
    padding: 2.5rem 2rem 1.75rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.25rem;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0 0.5rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: #ffffff; }

.footer p {
    color: rgba(255,255,255,0.35);
    font-size: 0.8125rem;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 770px) {
    .back-link span {
        display: none;
    }
}

@media (max-width: 520px) {
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .auth-card h1 { font-size: 1.625rem; }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }

    .footer-links a { padding: 0; }
}

        .password-field-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }
        .password-field-wrapper input {
            width: 100%;
            padding-right: 42px;
            box-sizing: border-box;
        }
        .toggle-password {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            padding: 0;
            margin: 0;
            cursor: pointer;
            color: #8a8a8a;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .toggle-password:hover {
            color: #4a4a4a;
        }
        .toggle-password svg {
            width: 20px;
            height: 20px;
        }
        .btn-social--disabled {
            opacity: 0.5;
            cursor: not-allowed;
            pointer-events: none;
            filter: grayscale(60%);
        }
        .btn-social__soon {
            font-size: 0.75em;
            margin-left: 4px;
        }