/* MyShopy Auth — charte landing page alignée */
*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --purple: #7c3aed;
    --purple-light: #a78bfa;
    --purple-dark: #5b21b6;
    --cyan: #06b6d4;
    --ink: #0f172a;
    --ink-soft: #475569;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --surface-alt-2: #f1f5f9;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
html, body { height: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background: var(--surface);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
}

/* Mesh gradient background — reprend le style du hero */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(124,58,237,0.18) 0%, transparent 45%),
        radial-gradient(ellipse at 80% 20%, rgba(236,72,153,0.10) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 70%, rgba(6,182,212,0.14) 0%, transparent 45%),
        radial-gradient(ellipse at 30% 80%, rgba(168,85,247,0.10) 0%, transparent 45%);
    filter: blur(30px);
    pointer-events: none;
    z-index: 0;
    animation: auth-mesh 18s ease-in-out infinite alternate;
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230f172a' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}
@keyframes auth-mesh {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.05) rotate(1deg); }
    100% { transform: scale(1.08) rotate(-1deg); }
}

/* Shell */
.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

/* Header — logo MyShopy */
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.auth-brand img { flex-shrink: 0; display: block; }
.auth-brand .brand-text { height: 28px; width: auto; }
.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    text-align: center;
}
.auth-header .back-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.auth-header .back-link:hover { color: var(--purple); }

/* Card */
.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 40px 36px 32px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(124, 58, 237, 0.08);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
}

/* Label pill (comme landing) */
.auth-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 10px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--purple-dark);
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.18);
    border-radius: 999px;
    margin-bottom: 14px;
}
.auth-label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.18);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.auth-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--ink);
    margin-bottom: 6px;
    line-height: 1.2;
}
.auth-subtitle {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 24px;
}

/* Alerts */
.auth-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
    border: 1px solid;
}
.auth-alert--success {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.22);
    color: #065f46;
}
.auth-alert--error {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.22);
    color: #991b1b;
}

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font-size: 15px;
    color: var(--ink);
    font-family: inherit;
    transition: all 0.2s;
    outline: none;
}
.auth-field input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(124,58,237,0.12);
}
.auth-field input::placeholder { color: #cbd5e1; }

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-soft);
    cursor: pointer;
    user-select: none;
}
.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--purple);
    cursor: pointer;
}

.auth-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.28);
    font-family: inherit;
    letter-spacing: 0.2px;
    margin-top: 6px;
}
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.4);
}
.auth-btn:active { transform: translateY(0); }

.auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--muted);
}
.auth-footer a {
    color: var(--purple);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.auth-footer a:hover { color: var(--purple-dark); }

/* Dev quick login */
.auth-dev {
    margin-top: 24px;
    padding: 16px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    border: 1px dashed var(--line);
    border-radius: 12px;
}
.auth-dev-label {
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 10px;
}
.auth-dev-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.auth-dev-btn {
    padding: 8px 10px;
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.18);
    color: var(--purple-dark);
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.auth-dev-btn:hover {
    background: rgba(124,58,237,0.14);
    transform: translateY(-1px);
}

/* Bottom footer */
.auth-bottom {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
}
.flag-fr {
    display: inline-block;
    width: 14px;
    height: 10px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15,23,42,0.08), inset 0 0 0 1px rgba(15,23,42,0.04);
    background: linear-gradient(to right, #0055a4 33.33%, #ffffff 33.33%, #ffffff 66.67%, #ef4135 66.67%);
    vertical-align: middle;
}

/* Mobile */
@media (max-width: 480px) {
    body { padding: 16px; align-items: flex-start; padding-top: 48px; }
    .auth-card { padding: 32px 24px 28px; border-radius: 18px; }
    .auth-title { font-size: 22px; }
    .auth-dev-grid { grid-template-columns: 1fr; }
}
