/* =====================================================================
   LUMEO — Design system
   Identite visuelle derivee du logo : violet -> rose -> ambre, halo lumineux
   ===================================================================== */

:root {
    /* Palette de marque (extraite du logo) */
    --lumeo-violet: #7c3aed;
    --lumeo-pink: #ec4899;
    --lumeo-amber: #f59e0b;
    --lumeo-gradient: linear-gradient(135deg, #7c3aed 0%, #ec4899 55%, #f59e0b 100%);
    --lumeo-gradient-soft: linear-gradient(135deg, rgba(124, 58, 237, .12) 0%, rgba(236, 72, 153, .12) 55%, rgba(245, 158, 11, .12) 100%);
    --lumeo-primary: #8b5cf6;
    --lumeo-primary-dark: #6d28d9;

    /* Surfaces (theme clair) */
    --bg: #f7f6fb;
    --surface: #ffffff;
    --surface-alt: #f4f2fb;
    --surface-hover: #ede9fe;
    --text: #1a1725;
    --text-muted: #6f6b85;
    --text-faint: #9994ac;
    --border: #eae7f5;
    --border-strong: #ddd7f0;

    --shadow-sm: 0 1px 3px rgba(30, 20, 60, .06);
    --shadow-md: 0 8px 24px rgba(76, 29, 149, .10);
    --shadow-lg: 0 16px 48px rgba(76, 29, 149, .16);
    --shadow-glow: 0 0 0 1px rgba(139, 92, 246, .08), 0 8px 24px rgba(139, 92, 246, .14);

    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 9px;
    --radius-pill: 999px;

    --ease: cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
    --bg: #0f0d17;
    --surface: #17141f;
    --surface-alt: #1e1a2b;
    --surface-hover: #262138;
    --text: #f3f1fa;
    --text-muted: #a79fc2;
    --text-faint: #726c8c;
    --border: #2a2438;
    --border-strong: #362e4a;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .4);
    --shadow-lg: 0 20px 56px rgba(0, 0, 0, .5);
    --shadow-glow: 0 0 0 1px rgba(139, 92, 246, .18), 0 8px 32px rgba(139, 92, 246, .22);
}

/* ---------------------------------------------------------------- */
/* Reset & bases                                                    */
/* ---------------------------------------------------------------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15.5px;
    line-height: 1.55;
    letter-spacing: -.01em;
    transition: background-color .25s var(--ease), color .25s var(--ease);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { letter-spacing: -.02em; font-weight: 700; }

a { color: var(--lumeo-primary); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--lumeo-primary-dark); }

::selection { background: rgba(139, 92, 246, .25); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-pill); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--lumeo-primary); }

@keyframes lumeo-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes lumeo-glow-pulse {
    0%, 100% { opacity: .55; }
    50% { opacity: 1; }
}
@keyframes lumeo-spin {
    to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------------- */
/* Icones                                                            */
/* ---------------------------------------------------------------- */

.lumeo-icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: -4px; }
.lumeo-icon-sm { width: 16px; height: 16px; vertical-align: -3px; }
.lumeo-icon-lg { width: 28px; height: 28px; }
.lumeo-icon-muted { color: var(--text-muted); }
.lumeo-icon-brand { color: var(--lumeo-primary); }
.lumeo-icon-active { color: var(--lumeo-pink); }

/* ---------------------------------------------------------------- */
/* Logo & marque                                                    */
/* ---------------------------------------------------------------- */

.lumeo-logo-img { display: block; border-radius: 22%; }

.lumeo-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -.03em;
    color: var(--text);
}
.lumeo-brand-word {
    background: var(--lumeo-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------------------------------------------------------------- */
/* Ecrans d'authentification                                        */
/* ---------------------------------------------------------------- */

.lumeo-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

.lumeo-auth-page::before,
.lumeo-auth-page::after {
    content: "";
    position: absolute;
    width: 55vmax;
    height: 55vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .35;
    z-index: 0;
    animation: lumeo-glow-pulse 8s ease-in-out infinite;
}
.lumeo-auth-page::before {
    background: radial-gradient(circle, var(--lumeo-violet), transparent 70%);
    top: -20vmax;
    left: -15vmax;
}
.lumeo-auth-page::after {
    background: radial-gradient(circle, var(--lumeo-amber), transparent 70%);
    bottom: -20vmax;
    right: -15vmax;
    animation-delay: 3s;
}

.lumeo-auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 424px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 40px 38px;
    animation: lumeo-fade-in .5s var(--ease);
}

.lumeo-auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 28px;
}
.lumeo-auth-logo img { width: 64px; height: 64px; margin-bottom: 14px; border-radius: 24%; box-shadow: var(--shadow-glow); }
.lumeo-auth-logo .lumeo-wordmark {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.03em;
    background: var(--lumeo-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.lumeo-tagline { color: var(--text-muted); font-size: .88rem; margin-top: 2px; }

/* ---------------------------------------------------------------- */
/* Formulaires                                                       */
/* ---------------------------------------------------------------- */

.form-label { font-weight: 600; font-size: .85rem; color: var(--text); margin-bottom: 6px; }

.form-control, .form-select {
    background: var(--surface-alt);
    border: 1.5px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: .95rem;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease);
}

.form-control:focus, .form-select:focus {
    background: var(--surface);
    color: var(--text);
    border-color: var(--lumeo-primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
}

.form-control::placeholder { color: var(--text-faint); }
.form-text { color: var(--text-faint); font-size: .78rem; }

/* ---------------------------------------------------------------- */
/* Boutons                                                          */
/* ---------------------------------------------------------------- */

.btn { font-weight: 600; letter-spacing: -.01em; border-radius: var(--radius-sm); transition: all .15s var(--ease); }
.btn:focus { box-shadow: 0 0 0 4px rgba(139, 92, 246, .18); }

.btn-lumeo {
    background: var(--lumeo-gradient);
    background-size: 160% 160%;
    border: none;
    color: #fff;
    padding: 11px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(139, 92, 246, .28);
}
.btn-lumeo:hover {
    color: #fff;
    transform: translateY(-1px);
    background-position: 100% 0;
    box-shadow: 0 8px 22px rgba(139, 92, 246, .38);
}
.btn-lumeo:active { transform: translateY(0); }
.btn-lumeo .lumeo-icon { color: #fff; }

.btn-outline-secondary {
    border: 1.5px solid var(--border-strong);
    color: var(--text);
    background: var(--surface);
}
.btn-outline-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--lumeo-primary);
    color: var(--text);
}

.btn-outline-danger { border: 1.5px solid #fca5a5; color: #dc2626; background: transparent; }
[data-theme="dark"] .btn-outline-danger { border-color: #7f1d1d; color: #f87171; }
.btn-outline-danger:hover { background: #fef2f2; border-color: #dc2626; }
[data-theme="dark"] .btn-outline-danger:hover { background: #2a1414; }

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Icone active (favori/like presse) */
.btn-lumeo.is-active, .btn-outline-secondary.is-active {
    background: var(--lumeo-gradient);
    color: #fff;
    border-color: transparent;
}
.btn-outline-secondary.is-active .lumeo-icon { color: #fff; }

/* ---------------------------------------------------------------- */
/* Alertes                                                          */
/* ---------------------------------------------------------------- */

.lumeo-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    margin-bottom: 18px;
    font-size: .9rem;
    font-weight: 500;
    animation: lumeo-fade-in .3s var(--ease);
}
.lumeo-alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.lumeo-alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
[data-theme="dark"] .lumeo-alert-error { background: rgba(153, 27, 27, .18); color: #fca5a5; border-color: rgba(153, 27, 27, .4); }
[data-theme="dark"] .lumeo-alert-success { background: rgba(21, 128, 61, .16); color: #86efac; border-color: rgba(21, 128, 61, .4); }

.lumeo-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-faint);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 22px 0;
}
.lumeo-divider::before, .lumeo-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------------------------------------------------------------- */
/* Toggle theme                                                     */
/* ---------------------------------------------------------------- */

.lumeo-theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface);
    border: 1.5px solid var(--border-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: all .15s var(--ease);
}
.lumeo-theme-toggle:hover { border-color: var(--lumeo-primary); color: var(--lumeo-primary); transform: rotate(15deg); }
.lumeo-theme-toggle .lumeo-icon-sun { display: none; }
[data-theme="dark"] .lumeo-theme-toggle .lumeo-icon-sun { display: block; }
[data-theme="dark"] .lumeo-theme-toggle .lumeo-icon-moon { display: none; }

.lumeo-auth-page .lumeo-theme-toggle { position: fixed; top: 20px; right: 20px; z-index: 20; background: var(--surface); }

/* ---------------------------------------------------------------- */
/* Navigation                                                        */
/* ---------------------------------------------------------------- */

.lumeo-navbar {
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.lumeo-nav-search {
    flex: 1;
    max-width: 380px;
    position: relative;
}
.lumeo-nav-search .lumeo-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); }
.lumeo-nav-search input {
    width: 100%;
    padding: 9px 14px 9px 40px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: var(--surface-alt);
    color: var(--text);
    font-size: .88rem;
    transition: all .15s var(--ease);
}
.lumeo-nav-search input:focus {
    outline: none;
    border-color: var(--lumeo-primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
}

.lumeo-nav-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.lumeo-nav-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    position: relative;
    transition: all .15s var(--ease);
}
.lumeo-nav-link:hover { background: var(--surface-hover); color: var(--lumeo-primary); }
.lumeo-nav-link.is-active { background: var(--lumeo-gradient-soft); color: var(--lumeo-primary); }

.lumeo-nav-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--lumeo-gradient);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--surface);
}

.lumeo-nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}
.lumeo-nav-user:hover { border-color: var(--lumeo-primary); }

/* ---------------------------------------------------------------- */
/* Layout general                                                    */
/* ---------------------------------------------------------------- */

.lumeo-main {
    max-width: 700px;
    margin: 28px auto;
    padding: 0 16px;
}

.lumeo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    margin-bottom: 18px;
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.lumeo-card:hover { box-shadow: var(--shadow-md); }

a.lumeo-card:hover { border-color: var(--border-strong); }

.lumeo-avatar {
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.lumeo-avatar-placeholder { background: var(--lumeo-gradient); }

/* ---------------------------------------------------------------- */
/* Stories                                                           */
/* ---------------------------------------------------------------- */

.lumeo-story-ring {
    padding: 2.5px;
    border-radius: 50%;
    background: var(--lumeo-gradient);
    transition: transform .15s var(--ease);
}
.lumeo-story-ring.is-seen { background: var(--border-strong); }
a:hover .lumeo-story-ring { transform: scale(1.06); }

/* ---------------------------------------------------------------- */
/* Badges & pills                                                    */
/* ---------------------------------------------------------------- */

.lumeo-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.lumeo-pill-success { background: #f0fdf4; color: #15803d; }
.lumeo-pill-warning { background: #fffbeb; color: #b45309; }
.lumeo-pill-danger { background: #fef2f2; color: #b91c1c; }
.lumeo-pill-muted { background: var(--surface-alt); color: var(--text-muted); }
[data-theme="dark"] .lumeo-pill-success { background: rgba(21, 128, 61, .18); color: #86efac; }
[data-theme="dark"] .lumeo-pill-warning { background: rgba(180, 83, 9, .2); color: #fcd34d; }
[data-theme="dark"] .lumeo-pill-danger { background: rgba(153, 27, 27, .2); color: #fca5a5; }

/* ---------------------------------------------------------------- */
/* Interactions publication                                          */
/* ---------------------------------------------------------------- */

.lumeo-post-actions { display: flex; align-items: center; gap: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.lumeo-post-actions .btn { font-size: .82rem; padding: 7px 12px; }

.lumeo-recovery-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-family: "SF Mono", "Cascadia Code", "Courier New", monospace;
    background: var(--surface-alt);
    border-radius: var(--radius-md);
    padding: 18px;
    margin: 18px 0;
}

/* ---------------------------------------------------------------- */
/* Panneau admin                                                     */
/* ---------------------------------------------------------------- */

.lumeo-admin-sidebar { width: 240px; background: var(--surface); border-right: 1px solid var(--border); flex-shrink: 0; }
.lumeo-admin-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    font-size: .88rem;
    transition: all .15s var(--ease);
}
.lumeo-admin-link:hover { background: var(--surface-hover); color: var(--text); }
.lumeo-admin-link.is-active { background: var(--lumeo-gradient); color: #fff; }
.lumeo-admin-link.is-active .lumeo-icon { color: #fff; }

/* ---------------------------------------------------------------- */
/* Divers                                                             */
/* ---------------------------------------------------------------- */

.lumeo-empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.lumeo-empty-state .lumeo-icon { width: 40px; height: 40px; color: var(--text-faint); margin-bottom: 12px; }

.lumeo-spinner {
    width: 16px; height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--lumeo-primary);
    border-radius: 50%;
    animation: lumeo-spin .7s linear infinite;
    display: inline-block;
}

/* ---------------------------------------------------------------- */
/* Ajout rapide (suggestions de profils / amis en commun)           */
/* ---------------------------------------------------------------- */

.lumeo-quickadd {
    margin-bottom: 18px;
}

.lumeo-quickadd-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.lumeo-quickadd-header h2 {
    font-size: .95rem;
    font-weight: 700;
    margin: 0;
}

.lumeo-quickadd-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.lumeo-quickadd-card {
    scroll-snap-align: start;
    flex: 0 0 168px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 16px 14px;
    text-align: center;
    position: relative;
    transition: opacity .25s var(--ease), transform .25s var(--ease), box-shadow .2s var(--ease);
}
.lumeo-quickadd-card:hover { box-shadow: var(--shadow-md); }
.lumeo-quickadd-card.is-dismissing { opacity: 0; transform: scale(.85); }

.lumeo-quickadd-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--surface-alt);
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}
.lumeo-quickadd-dismiss:hover { background: var(--surface-hover); color: var(--text); }

.lumeo-quickadd-avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--lumeo-gradient-soft);
}

.lumeo-quickadd-name {
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lumeo-quickadd-username {
    font-size: .72rem;
    color: var(--text-faint);
    margin-bottom: 8px;
}

.lumeo-mini-stack {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}
.lumeo-mini-stack .lumeo-avatar {
    width: 18px;
    height: 18px;
    margin-left: -6px;
    box-shadow: 0 0 0 2px var(--surface);
}
.lumeo-mini-stack .lumeo-avatar:first-child { margin-left: 0; }

.lumeo-quickadd-mutual {
    font-size: .68rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    min-height: 14px;
}

/* ---------------------------------------------------------------- */
/* Badges de profil (style Discord)                                 */
/* ---------------------------------------------------------------- */

.lumeo-badge-row {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.lumeo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: default;
}
.lumeo-badge .lumeo-icon-sm { width: 12px; height: 12px; vertical-align: 0; }

.lumeo-badge-fondateur { background: rgba(245, 158, 11, .15); color: #b45309; }
.lumeo-badge-pionnier { background: rgba(13, 148, 136, .15); color: #0d9488; }
.lumeo-badge-support { background: rgba(14, 165, 233, .15); color: #0284c7; }
.lumeo-badge-verifie { background: rgba(124, 58, 237, .15); color: #7c3aed; }
.lumeo-badge-staff { background: rgba(79, 70, 229, .15); color: #4f46e5; }
.lumeo-badge-admin { background: rgba(220, 38, 38, .15); color: #dc2626; }
.lumeo-badge-modo { background: rgba(234, 88, 12, .15); color: #ea580c; }
.lumeo-badge-membre { background: var(--surface-alt); color: var(--text-muted); }
[data-theme="dark"] .lumeo-badge-fondateur { background: rgba(245, 158, 11, .22); color: #fcd34d; }
[data-theme="dark"] .lumeo-badge-pionnier { background: rgba(13, 148, 136, .25); color: #5eead4; }
[data-theme="dark"] .lumeo-badge-support { background: rgba(14, 165, 233, .25); color: #7dd3fc; }
[data-theme="dark"] .lumeo-badge-verifie { background: rgba(124, 58, 237, .28); color: #c4b5fd; }
[data-theme="dark"] .lumeo-badge-staff { background: rgba(79, 70, 229, .28); color: #a5b4fc; }
[data-theme="dark"] .lumeo-badge-admin { background: rgba(220, 38, 38, .25); color: #fca5a5; }
[data-theme="dark"] .lumeo-badge-modo { background: rgba(234, 88, 12, .25); color: #fdba74; }

@media (max-width: 640px) {
    .lumeo-auth-card { padding: 30px 24px; }
    .lumeo-nav-search { display: none; }
    .lumeo-main { margin: 16px auto; padding: 0 12px; }
    .lumeo-quickadd-card { flex-basis: 148px; }
}
