:root {
  --primary: #0ea5e9;
  --accent: #10b981;
  --bg-dark: #0f172a;
  --card-bg: rgba(255,255,255,0.92);
  --muted: #94a3b8;
  --glass-border: rgba(255,255,255,0.06);
  --focus: rgba(14,165,233,0.15);
  --text-dark: #0b1220;
}

/* Global box-sizing */
*, *::before, *::after { box-sizing: border-box; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
    margin: 0;

}

html, body {
    height: 100%;
}
/* RESET LAYOUT  */
.auth-container {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(160deg, #0f172a, #1e3a8a);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-container > div {
    width: 100%;
    max-width: 1200px;
    min-height: 680px;
    display: flex;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.35);
    background: white;
}

.auth-card {
    flex: 0.9;
    padding: 80px 60px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-wrapper {
    width: 100%;
    max-width: 1200px;
    min-height: 680px;
    display: flex;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.35);
    background: white;
}


/* ===== SECTION GAUCHE ===== */
.register-brand {
    flex: 1.1;
    padding: 70px 60px;
    position: relative;
    background: linear-gradient(160deg, #1e3a8a, #2563eb);
    color: #f8fafc;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.register-brand::before {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    background: #0ea5e9;
    opacity: 0.15;
    border-radius: 50%;
    filter: blur(120px);
    top: -150px;
    left: -150px;
    z-index: 0;
}

.register-brand::after {
    content: "";
    position: absolute;
    top: 0;
    right: -60px;
    width: 120px;
    height: 100%;
    background: inherit;
    transform: skewX(-10deg);
}

.brand-inner {
    position: relative;
    z-index: 2;
    max-width: 520px;
}



.brand-header h1 {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 25px;
}

.brand-header h1 span {
    display: block;
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-header p {
    font-size: 16px;
    opacity: 0.85;
    margin-bottom: 50px;
}


.brand-badge {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 20px;
    display: inline-block;
}


.brand-features {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-bottom: 60px;
}

.feature-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    transition: transform 0.3s ease;
    opacity: 0.75;
}

.feature-item:hover {
    transform: translateX(5px);
}

.feature-icon {
    width: 42px;
    height: 42px;
    background: rgba(56,189,248,0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.feature-item strong {
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
}

.feature-item span {
    font-size: 13px;
    opacity: 0.6;
}

.brand-stats {
    display: flex;
    gap: 25px;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(14,165,233,0.4); }
    70% { box-shadow: 0 0 0 20px rgba(14,165,233,0); }
    100% { box-shadow: 0 0 0 0 rgba(14,165,233,0); }
}


.stat-box {
    padding: 14px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.3s ease;
    animation: pulseGlow 3s infinite;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-box strong {
    font-size: 20px;
    display: block;
}

.stat-box span {
    font-size: 12px;
    opacity: 0.6;
}



/* ===== SECTION DROITE ===== */

/* Glass Card */
.register-card {
    width: 90%;
    max-width: 420px;
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.95));
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    padding: 50px 45px;
    border-radius: 28px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 12px 40px rgba(2,6,23,0.16);
    transition: transform 0.3s ease;
}

.register-card:hover{
    transform: translateY(-5px);
}

.register-card h2 {
    margin-bottom: 30px;
}

/* =================  INPUT ================= */

.modern-form {
    width: 100%;
}

.form-group {
    margin-bottom: 28px;
}

.input-wrapper {
    position: relative;
}

.input-icon-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #cbd5e1;
    padding: 14px 0;
    font-size: 15px;
    background: transparent;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
    transition: width 0.4s ease;
}


.input-wrapper:focus-within::after {
    width: 100%;
}

.input-wrapper label {
    position: absolute;
    left: 0;
    top: 12px;
    font-size: 14px;
    color: #94a3b8;
    transition: 0.3s ease;
    pointer-events: none;
}

.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label {
    top: -12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
}

.input-wrapper input { padding: 18px 0 6px; } /* assure spacing */
.input-wrapper label { transition: transform 0.18s ease, top 0.18s ease; }

.input-wrapper input:focus {
    border-bottom: 1px solid #0ea5e9;
}

.input-wrapper input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-bottom-color: var(--primary);
}

.input-wrapper input::placeholder {
    color: transparent;
}


.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 0;
    top: 14px;
    cursor: pointer;
    font-size: 16px;
    color: #94a3b8;
    transition: color 0.3s ease;
    padding: 6px;
    border-radius: 6px;
    user-select: none;
}

.toggle-password:hover {
    color: #0ea5e9;
    background: rgba(14,165,233,0.08);
}

.toggle-password:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.input-wrapper input:valid {
    border-bottom: 1px solid #22c55e;
}

.input-wrapper input:invalid:focus {
    border-bottom: 1px solid #ef4444;
}

/* ================= CUSTOM CHECKBOX ================= */

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    gap: 12px;
    padding: 8px 0;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--muted);
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}

.custom-checkbox:hover .checkmark {
    border-color: var(--primary);
    background: rgba(14,165,233,0.06);
}

.custom-checkbox input:focus + .checkmark {
  box-shadow: 0 0 0 4px rgba(14,165,233,0.12);
  border-color: var(--primary);
}

.custom-checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(14,165,233,0.25);
}

.custom-checkbox input:checked + .checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
}

.form-global-errors {
    background: #fee2e2;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 15px;
}

/* BUTTON */
.btn-primary {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(14,165,233,0.35);
}

.btn-primary:focus-visible {
  box-shadow: 0 0 0 6px rgba(14,165,233,0.12);
}

/* SWITCH LINK */
.switch-auth {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.switch-auth a {
    color: #0ea5e9;
    font-weight: 600;
    text-decoration: none;
}

.loader {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.4);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
    margin: auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-loading .btn-text {
    display: none;
}

.btn-loading .loader {
    display: inline-block;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
    .auth-container {
        padding: 20px 16px;
        align-items: flex-start;
    }

    .auth-wrapper {
        flex-direction: column;
        min-height: unset;
        width: 100%;
        border-radius: 20px;
    }

    .auth-container > div {
        flex-direction: column;
        min-height: unset;
        width: 100%;
    }

    .register-brand {
        display: none;
    }

    .auth-card {
        padding: 40px 24px;
        flex: 1;
    }

    .register-card {
        width: 100%;
        max-width: 100%;
        padding: 36px 24px;
        margin: 0 auto;
        border-radius: 20px;
    }
}