:root {
    --bg: #ffffff;
    /* fond blanc */
    --accent-orange: #ff9800;
    --glass: rgba(255, 255, 255, 0.06);
    --glass-2: rgba(255, 255, 255, 0.03);
    --card-w: 420px;
    --radius: 14px;
    --shadow-1: 0 10px 30px rgba(2, 6, 23, 0.15);
    --shadow-2: 0 6px 18px rgba(2, 6, 23, 0.1);
    --text: #333;
    --muted: #666;
    --success: #2dd4bf;
    --danger: #ff6b6b;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page background blanc */
html,
body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Couche effet curseur orange */
.cursor-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
            rgba(255, 152, 0, 0.15),
            transparent 60%);
    transition: background 0.1s;
    z-index: 0;
}

/* Scene */
.scene {
    width: 100%;
    max-width: 1100px;
    display: flex;
    gap: 48px;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    transform-style: preserve-3d;
    position: relative;
    z-index: 1;
}

/* Floating logo */
.floating-logo {
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(60px) rotateY(-12deg);
    transition: transform 0.6s cubic-bezier(.2, .9, .3, 1);
    filter: drop-shadow(0 20px 40px rgba(2, 6, 23, 0.2));
    will-change: transform;
}

.logo-svg {
    width: 180px;
    height: 180px;
    display: block;
}

/* Card */
.card {
    width: var(--card-w);
    border-radius: var(--radius);
    padding: 28px;
    background: #fff;
    box-shadow: var(--shadow-1);
    backdrop-filter: blur(8px) saturate(120%);
    transform: translateZ(40px) rotateY(6deg);
    transition: transform 0.6s cubic-bezier(.2, .9, .3, 1), box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 2;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255, 152, 0, 0.06), rgba(255, 152, 0, 0.04));
    mix-blend-mode: screen;
    transform: translateZ(-20px);
}

/* Header */
.card-header {
    text-align: left;
    margin-bottom: 12px;
}

.card-header h1 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Form */
.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 0.9rem;
    color: var(--muted);
}

input[type="email"],
input[type="password"],
input[type="text"] {
    background: #f9f9f9;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text);
    outline: none;
    transition: box-shadow .18s, border-color .18s, transform .18s;
    font-size: 0.98rem;
}

input:focus {
    box-shadow: 0 6px 18px rgba(255, 152, 0, 0.25);
    border-color: var(--accent-orange);
    transform: translateY(-2px);
}

/* password wrapper */
.password-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.password-wrap input {
    flex: 1;
}

.toggle-pass {
    background: var(--glass-2);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

/* Actions */
.actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.btn {
    flex: 1;
    padding: 12px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.98rem;
    transition: transform .12s ease, box-shadow .12s;
}

.btn:active {
    transform: translateY(1px);
}

.btn.primary {
    background: linear-gradient(90deg, var(--accent-orange), #ff5722);
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.18);
}

.btn.ghost {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text);
}

/* meta row */
.meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.remember {
    display: flex;
    gap: 8px;
    align-items: center;
}

.link {
    color: var(--accent-orange);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* message */
.message {
    margin-top: 10px;
    min-height: 22px;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    margin-top: 18px;
    text-align: center;
    color: rgba(0, 0, 0, 0.45);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width:880px) {
    .scene {
        flex-direction: column;
        gap: 18px;
        align-items: center;
    }

    .floating-logo {
        transform: translateZ(30px) rotateY(0deg) scale(0.9);
    }

    .card {
        transform: translateZ(20px) rotateY(0deg);
        width: 92%;
    }
}

/* Micro interactions */
.card:hover {
    transform: translateZ(48px) rotateY(4deg);
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.2);
}

.floating-logo:hover {
    transform: translateZ(80px) rotateY(-6deg) scale(1.02);
}

/* small accessibility focus */
input:invalid {
    box-shadow: 0 6px 18px rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.9);
}