/* ============================================================================
   CreArtisite v4 — Auth pages CSS (glassmorphism vibrant)
   ============================================================================
   Shared by : login, signup, forgot-password, reset-password, pricing
   ============================================================================ */

:root {
    --bg-1: #060b18;
    --bg-2: #020a13;
    --cyan: #00e5ff;
    --purple: #b388ff;
    --gold: #ffd740;
    --pink: #ff5e7e;
    --ink: #e7ecff;
    --muted: #8aa0c8;
    --dim: #5a6f95;
    --card-bg: rgba(10, 18, 36, 0.65);
    --card-border: rgba(0, 229, 255, 0.18);
    --input-bg: rgba(255, 255, 255, 0.04);
    --input-border: rgba(255, 255, 255, 0.12);
    --input-focus: rgba(179, 136, 255, 0.5);
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(ellipse at top left, rgba(0, 229, 255, 0.18), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(179, 136, 255, 0.22), transparent 50%),
        linear-gradient(160deg, var(--bg-1), var(--bg-2));
    background-attachment: fixed;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* ---------------------------------------------------------------------------
   LAYOUT
   --------------------------------------------------------------------------- */

.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar a.logo {
    text-decoration: none;
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, var(--cyan), var(--purple), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.topbar .nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.topbar .nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.topbar .nav-links a:hover {
    color: var(--ink);
}

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 64px;
}

/* ---------------------------------------------------------------------------
   CARDS
   --------------------------------------------------------------------------- */

.card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 44px 36px;
    background: var(--card-bg);
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(0, 229, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-wide {
    max-width: 640px;
}

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

.card h1 {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card .lead {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card .badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cyan);
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 999px;
    margin-bottom: 18px;
}

/* ---------------------------------------------------------------------------
   FORMS
   --------------------------------------------------------------------------- */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.85rem;
    color: var(--ink);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 13px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--ink);
    font-size: 0.98rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-group input:hover,
.form-group textarea:hover {
    background: rgba(255, 255, 255, 0.06);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(179, 136, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.form-group input::placeholder {
    color: var(--dim);
}

.form-help {
    margin-top: 6px;
    color: var(--dim);
    font-size: 0.78rem;
}

.form-error {
    margin-top: 6px;
    color: var(--pink);
    font-size: 0.82rem;
    display: none;
}

.form-error.visible {
    display: block;
}

/* ---------------------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    background: linear-gradient(120deg, var(--cyan), var(--purple));
    color: var(--bg-2);
    border: none;
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
    box-shadow: 0 6px 24px rgba(0, 229, 255, 0.25);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 229, 255, 0.35);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--card-border);
    box-shadow: none;
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(0, 229, 255, 0.06);
    border-color: rgba(0, 229, 255, 0.4);
    transform: translateY(-2px);
}

.btn-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(2, 10, 19, 0.3);
    border-top-color: var(--bg-2);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 4px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------------------------
   LINKS
   --------------------------------------------------------------------------- */

.link-row {
    margin-top: 22px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--muted);
}

.link-row a {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.link-row a:hover {
    color: var(--purple);
    text-decoration: underline;
}

.divider {
    margin: 24px 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--card-border), transparent);
}

/* ---------------------------------------------------------------------------
   TOASTS
   --------------------------------------------------------------------------- */

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    padding: 14px 20px;
    background: rgba(10, 18, 36, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--ink);
    font-size: 0.92rem;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    max-width: 380px;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-color: rgba(0, 229, 175, 0.5); }
.toast.error { border-color: rgba(255, 94, 126, 0.5); color: #ffd0d8; }
.toast.info { border-color: rgba(0, 229, 255, 0.5); }

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

/* ---------------------------------------------------------------------------
   PRICING
   --------------------------------------------------------------------------- */

.pricing-hero {
    text-align: center;
    padding: 32px 16px 8px;
    max-width: 720px;
    margin: 0 auto;
}

.pricing-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.2rem);
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -0.03em;
    background: linear-gradient(120deg, var(--cyan), var(--purple), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pricing-hero p {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.65;
    margin: 0 0 32px;
}

.pricing-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 44px 38px;
    text-align: center;
    background: var(--card-bg);
    backdrop-filter: blur(28px) saturate(140%);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(179, 136, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cyan), var(--purple), var(--gold));
}

.pricing-name {
    font-size: 0.9rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 14px;
    font-weight: 600;
}

.pricing-amount {
    margin: 16px 0;
}

.pricing-amount .price {
    font-size: 4rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.04em;
    line-height: 1;
}

.pricing-amount .currency {
    font-size: 1.3rem;
    color: var(--muted);
    margin-right: 4px;
}

.pricing-amount .period {
    font-size: 1rem;
    color: var(--muted);
    margin-left: 6px;
}

.pricing-amount .ht {
    display: block;
    font-size: 0.78rem;
    color: var(--dim);
    margin-top: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pricing-trial {
    margin: 22px 0 28px;
    padding: 14px 18px;
    background: rgba(255, 215, 64, 0.08);
    border: 1px solid rgba(255, 215, 64, 0.3);
    border-radius: 12px;
    color: var(--gold);
    font-weight: 600;
    font-size: 0.95rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    text-align: left;
}

.feature-list li {
    padding: 11px 0 11px 32px;
    position: relative;
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 13px;
    width: 18px;
    height: 18px;
    background: linear-gradient(120deg, var(--cyan), var(--purple));
    border-radius: 50%;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") no-repeat center / 14px;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") no-repeat center / 14px;
}

.pricing-fine {
    margin-top: 18px;
    color: var(--dim);
    font-size: 0.78rem;
    line-height: 1.6;
}

/* ---------------------------------------------------------------------------
   DASHBOARD SKELETON
   --------------------------------------------------------------------------- */

.dashboard-header {
    padding: 18px 28px;
    background: rgba(10, 18, 36, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-header .logo {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, var(--cyan), var(--purple), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.dashboard-header nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.dashboard-header nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.dashboard-header nav a:hover {
    color: var(--ink);
}

.user-menu {
    position: relative;
}

.user-menu button {
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    padding: 8px 16px;
    color: var(--ink);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.user-menu button:hover {
    background: rgba(0, 229, 255, 0.06);
    border-color: rgba(0, 229, 255, 0.4);
}

.user-menu .dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    padding: 8px;
    background: rgba(10, 18, 36, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: none;
}

.user-menu .dropdown.open {
    display: block;
}

.user-menu .dropdown a,
.user-menu .dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    color: var(--ink);
    text-decoration: none;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.92rem;
    font-family: inherit;
}

.user-menu .dropdown a:hover,
.user-menu .dropdown button:hover {
    background: rgba(0, 229, 255, 0.08);
}

.trial-banner {
    margin: 0;
    padding: 14px 28px;
    background: linear-gradient(120deg, rgba(255, 215, 64, 0.1), rgba(179, 136, 255, 0.08));
    border-bottom: 1px solid rgba(255, 215, 64, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.trial-banner .info {
    color: var(--gold);
    font-size: 0.93rem;
    font-weight: 500;
}

.trial-banner .info strong {
    color: var(--ink);
}

.trial-banner .btn {
    padding: 8px 18px;
    font-size: 0.86rem;
}

.dashboard-main {
    padding: 32px 28px;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-block {
    text-align: center;
    padding: 60px 24px;
    background: var(--card-bg);
    backdrop-filter: blur(28px) saturate(140%);
    border: 1px solid var(--card-border);
    border-radius: 24px;
}

.welcome-block h2 {
    margin: 0 0 12px;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(120deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.welcome-block p {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 1.05rem;
}

/* ---------------------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------------------- */

@media (max-width: 640px) {
    .topbar { padding: 16px 20px; }
    .main { padding: 16px 12px 40px; }
    .card { padding: 32px 24px; border-radius: 18px; }
    .pricing-card { padding: 32px 24px; border-radius: 20px; }
    .pricing-amount .price { font-size: 3.2rem; }
    .dashboard-header { padding: 14px 20px; }
    .dashboard-header nav { gap: 14px; }
    .trial-banner { padding: 12px 20px; font-size: 0.88rem; }
    .dashboard-main { padding: 20px 16px; }
}

/* ---------------------------------------------------------------------------
   ACCESSIBILITY — Phase 6E (focus visible, skip-link, reduced-motion)
   --------------------------------------------------------------------------- */

/* Focus-visible global : indication clavier visible pour respecter WCAG 2.1 AA */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--cyan, #00e5ff);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Skip-to-content link (visible uniquement au focus clavier) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 9999;
    padding: 10px 18px;
    background: var(--cyan, #00e5ff);
    color: var(--bg-2, #020a13);
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 12px;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
