/* Éditeur de page bio — feuille autonome, pensée d'abord pour le mobile */
:root { --ink: #1d1538; --mute: #6b6488; --dim: #9a94b5; --line: #e9e6f7; --card: #fff; --bg: #faf8ff; --v: #7c3aed; --v2: #a855f7; --p: #ec4899; --ok: #059669; --bad: #e11d48; --gold: #b45309; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body.lbe { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: radial-gradient(900px 500px at 0% -10%, rgba(124, 58, 237, .10), transparent 60%), radial-gradient(700px 400px at 100% 0%, rgba(236, 72, 153, .08), transparent 60%), var(--bg); line-height: 1.5; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
aside.sidebar { display: none !important; }
header.sticky { position: relative !important; }
.mts-cluster-subnav { position: relative !important; top: auto !important; }

.lbe-header { background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line); }
.lbe-header-in { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lbe-logo { font-weight: 900; font-size: 20px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.lbe-logo span, .lbe-header .mts-brand-suite { color: var(--v) !important; }
.lbe-header .mts-brand-word { color: var(--ink) !important; }
.lbe-login { border: 0; background: var(--ink); color: #fff; border-radius: 12px; padding: 9px 14px; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
#userProfile { display: flex; align-items: center; gap: 10px; }
#userProfile.hidden { display: none !important; }
#userName { margin: 0; font-size: 11px; font-weight: 800; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#userStatus { margin: 0; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--mute); }
.lbe-icon { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--mute); }

.lbe-main { max-width: 1180px; margin: 0 auto; padding: 14px 14px 110px; }
.lbe-hero { text-align: center; max-width: 720px; margin: 8px auto 18px; }
.lbe-kicker { display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--v); background: #f1ebff; border-radius: 999px; padding: 5px 10px; }
.lbe-hero h1 { margin: 10px 0 6px; font-size: clamp(24px, 6.4vw, 40px); line-height: 1.1; font-weight: 900; letter-spacing: -.02em; color: var(--ink); }
.lbe-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--v), var(--p)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lbe-hero p { margin: 0; color: var(--mute); font-size: 15px; }
.lbe-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--mute); }
.lbe-trust b { color: var(--ok); }

.lbe-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 960px) { .lbe-grid { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .lbe-side { position: sticky; top: 14px; } }
.lbe-edit { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lbe-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: 0 10px 28px rgba(96, 74, 168, .06); }
.lbe-card > h2 { margin: 0 0 4px; font-size: 16px; font-weight: 900; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.lbe-card > h2 .n { width: 24px; height: 24px; border-radius: 8px; background: linear-gradient(135deg, var(--v), var(--v2)); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.lbe-card > p.lead { margin: 0 0 12px; color: var(--mute); font-size: 13px; }
.lbe-label { display: block; font-size: 12px; font-weight: 800; color: var(--mute); margin: 10px 0 5px; }
.lbe-input { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; padding: 11px 13px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.lbe-input:focus { border-color: var(--v); box-shadow: 0 0 0 3px rgba(124, 58, 237, .14); }
textarea.lbe-input { resize: vertical; min-height: 88px; line-height: 1.45; }
.lbe-slug { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.lbe-slug:focus-within { border-color: var(--v); box-shadow: 0 0 0 3px rgba(124, 58, 237, .14); }
.lbe-slug span { display: flex; align-items: center; padding: 0 4px 0 12px; color: var(--mute); font-weight: 700; font-size: 14px; white-space: nowrap; background: #faf8ff; }
.lbe-slug input { flex: 1; min-width: 0; border: 0; outline: none; padding: 11px 12px 11px 2px; font-size: 16px; font-weight: 800; background: #faf8ff; }
.lbe-msg { font-size: 12px; font-weight: 700; margin-top: 6px; min-height: 18px; color: var(--mute); }
.lbe-msg.ok { color: var(--ok); } .lbe-msg.bad { color: var(--bad); }
.lbe-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--dim); margin-top: 5px; font-weight: 600; }
.lbe-syms { display: flex; gap: 4px; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; scrollbar-width: none; }
.lbe-syms::-webkit-scrollbar { display: none; }
.lbe-syms button { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #faf8ff; font-size: 16px; }
.lbe-syms a { flex: none; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 10px; font-size: 12px; font-weight: 800; color: var(--v); text-decoration: none; background: #f1ebff; white-space: nowrap; }
.lbe-av { display: flex; align-items: center; gap: 12px; }
.lbe-av img, .lbe-av .ph { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #f1ebff; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 26px; flex: none; }

.lbe-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 13px; padding: 10px 14px; font-size: 14px; font-weight: 800; text-decoration: none; }
.lbe-btn:hover { border-color: #cfc4ff; }
.lbe-btn.primary { background: linear-gradient(135deg, var(--v), var(--v2)); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(124, 58, 237, .28); }
.lbe-btn.sm { padding: 7px 10px; font-size: 12px; border-radius: 10px; }
.lbe-btn.wide { width: 100%; }
.lbe-btn:disabled { opacity: .55; cursor: default; }
.lbe-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Liens */
.lbe-links { display: flex; flex-direction: column; gap: 10px; }
.lbe-link { border: 1.5px solid var(--line); border-radius: 16px; padding: 10px; background: #fcfbff; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 8px; align-items: start; animation: lbeIn .25s ease-out; }
.lbe-link.off { opacity: .55; }
.lbe-link .emo { width: 46px; height: 46px; text-align: center; font-size: 22px; padding: 0; border-radius: 12px; }
.lbe-link .fields { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lbe-link .fields input { padding: 9px 11px; font-size: 15px; border-radius: 11px; }
.lbe-link .fields input.u { font-size: 13px; color: var(--mute); }
.lbe-link .fields input.err { border-color: #fda4af; }
.lbe-link .tools { display: flex; flex-direction: column; gap: 4px; }
.lbe-link .tools button { width: 32px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--mute); }
.lbe-link .tools button:hover { color: var(--ink); }
.lbe-link .tools button.del:hover { color: var(--bad); }
.lbe-link .hint { grid-column: 2 / 4; font-size: 12px; color: var(--mute); }
.lbe-link .hint a { color: var(--v); font-weight: 800; }
@keyframes lbeIn { from { transform: translateY(6px); opacity: 0; } }
.lbe-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.lbe-quick button { border: 1px dashed #cfc4ff; background: #faf8ff; border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 800; color: var(--v); }

.lbe-socials { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 560px) { .lbe-socials { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lbe-soc { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 13px; padding: 0 10px; background: #fff; }
.lbe-soc:focus-within { border-color: var(--v); }
.lbe-soc img, .lbe-soc .e { width: 18px; height: 18px; flex: none; font-size: 16px; line-height: 18px; text-align: center; }
.lbe-soc input { flex: 1; min-width: 0; border: 0; outline: none; padding: 10px 0; font-size: 15px; background: transparent; }

.lbe-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .lbe-themes { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.lbe-theme { position: relative; border: 2px solid transparent; border-radius: 14px; padding: 0; overflow: hidden; background: none; aspect-ratio: 3 / 4; box-shadow: 0 0 0 1px var(--line); }
.lbe-theme.on { border-color: var(--v); box-shadow: 0 0 0 3px rgba(124, 58, 237, .2); }
.lbe-theme .sw { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 8px; }
.lbe-theme .sw i { display: block; width: 74%; height: 9px; border-radius: 99px; }
.lbe-theme .sw i.c { width: 20px; height: 20px; border-radius: 50%; margin-bottom: 2px; }
.lbe-theme b { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; font-weight: 800; padding: 3px; background: rgba(255, 255, 255, .85); color: var(--ink); }
.lbe-theme .lock { position: absolute; top: 4px; right: 4px; font-size: 9px; font-weight: 900; background: #fde68a; color: #78350f; padding: 1px 5px; border-radius: 6px; }
.lbe-seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.lbe-seg button { border: 0; background: #fff; padding: 8px 12px; font-size: 13px; font-weight: 800; color: var(--mute); }
.lbe-seg button.on { background: var(--v); color: #fff; }
.lbe-switch { position: relative; width: 44px; height: 26px; flex: none; display: inline-block; }
.lbe-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.lbe-switch span { position: absolute; inset: 0; border-radius: 99px; background: #d9d4ee; transition: .2s; }
.lbe-switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.lbe-switch input:checked + span { background: var(--v); }
.lbe-switch input:checked + span::after { transform: translateX(18px); }
.lbe-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; font-weight: 700; }
.lbe-badge { font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #78350f; background: #fde68a; padding: 2px 6px; border-radius: 6px; margin-left: 6px; }

/* Publication */
.lbe-pub { margin-top: 12px; border-radius: 18px; padding: 14px; background: linear-gradient(135deg, #f5f3ff, #fdf2f8); border: 1px solid #e4dcff; }
.lbe-pub .url { font-size: 18px; font-weight: 900; color: var(--v); word-break: break-all; text-decoration: none; }
.lbe-pub .qr { width: 112px; height: 112px; background: #fff; border-radius: 12px; padding: 6px; flex: none; }
.lbe-pub .qr img, .lbe-pub .qr canvas { width: 100% !important; height: 100% !important; }
.lbe-pub ol { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--mute); }
.lbe-pubflex { display: flex; gap: 12px; align-items: center; }

/* Stats */
.lbe-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lbe-kpi { background: #faf8ff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; }
.lbe-kpi b { display: block; font-size: 22px; font-weight: 900; }
.lbe-kpi span { font-size: 11px; color: var(--mute); font-weight: 700; }
.lbe-bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; margin-top: 12px; }
.lbe-bars i { flex: 1; background: linear-gradient(180deg, var(--v2), var(--v)); border-radius: 4px 4px 0 0; min-height: 2px; }
.lbe-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.lbe-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.lbe-table td:last-child { text-align: right; font-weight: 900; }
.lbe-lock { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; font-size: 12px; color: #78350f; }

/* Aperçu téléphone */
.lbe-phone { width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 9 / 18.5; border-radius: 42px; padding: 12px; background: #0f0a24; box-shadow: 0 30px 60px rgba(30, 16, 80, .25), inset 0 0 0 2px #2a2250; position: relative; }
.lbe-phone::before { content: ''; position: absolute; top: 20px; left: 50%; width: 90px; height: 22px; margin-left: -45px; background: #0f0a24; border-radius: 0 0 14px 14px; z-index: 2; }
.lbe-screen { width: 100%; height: 100%; border-radius: 32px; overflow-y: auto; overflow-x: hidden; background: #fff; scrollbar-width: none; }
.lbe-screen::-webkit-scrollbar { display: none; }
.lbe-screen .lbp { min-height: 100%; }
.lbe-screen .lbp-in { padding-top: 48px; }
.lbe-screen a { pointer-events: none; }
.lbe-side h3 { text-align: center; margin: 0 0 10px; font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
@media (max-width: 959px) { .lbe-side { display: none; } }

/* Barre fixe mobile */
.lbe-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.lbe-bar .st { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; color: var(--mute); }
.lbe-bar .st b { color: var(--ink); }
.lbe-bar .st .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; margin-right: 6px; }
.lbe-bar .st .dot.ok { background: var(--ok); }
@media (min-width: 960px) { .lbe-bar { left: auto; right: 24px; bottom: 20px; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(30, 16, 80, .15); max-width: 520px; } .lbe-bar [data-act="preview"] { display: none; } }

.lbe-sheet { position: fixed; inset: 0; z-index: 80; background: rgba(15, 10, 36, .6); display: flex; align-items: center; justify-content: center; padding: 14px; animation: lbeFade .2s; }
@keyframes lbeFade { from { opacity: 0; } }
.lbe-sheet .lbe-phone { max-width: min(360px, 86vw); max-height: 84vh; width: auto; height: 84vh; }
.lbe-sheet .close { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; font-size: 18px; }

/* Bloc créateurs */
.lbe-promo { border-radius: 22px; padding: 16px; background: radial-gradient(500px 220px at 0% 0%, #4c1d95 0%, transparent 70%), linear-gradient(135deg, #1e1145, #0f0a24); color: #fff; }
.lbe-promo h2 { margin: 0 0 4px; font-size: 17px; font-weight: 900; color: #fff; }
.lbe-promo p { margin: 0 0 12px; font-size: 13px; color: #c4b5fd; }
.lbe-promo .g { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 560px) { .lbe-promo .g { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lbe-promo a { display: block; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff; text-decoration: none; font-size: 13px; color: #ddd6fe; }
.lbe-promo a b { display: block; color: #fff; font-size: 14px; margin-bottom: 2px; }
.lbe-promo a em { display: block; margin-top: 6px; font-style: normal; font-weight: 800; color: #fde68a; font-size: 12px; }

#lbeToast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(14px); background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; padding: 11px 16px; border-radius: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 90; max-width: 92vw; text-align: center; }
#lbeToast.on { opacity: 1; transform: translateX(-50%); }

/* Contenu SEO */
.lbe-content { max-width: 820px; margin: 46px auto 0; font-size: 15px; color: #3b3355; }
.lbe-content h2 { font-size: clamp(20px, 4.6vw, 25px); color: var(--ink); margin: 32px 0 10px; line-height: 1.2; font-weight: 900; }
.lbe-content p, .lbe-content li { line-height: 1.7; }
.lbe-content table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; border-radius: 14px; overflow: hidden; }
.lbe-content th, .lbe-content td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.lbe-content th { background: #f5f3ff; }
.lbe-content details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 8px 0; }
.lbe-content summary { font-weight: 800; cursor: pointer; color: var(--ink); }
.lbe-content a { color: var(--v); font-weight: 700; }
.lbe-footer { text-align: center; color: var(--dim); font-size: 12px; padding: 30px 14px 10px; }
.lbe-footer a { color: var(--mute); }

/* le menu du site assombrit les en-têtes : on garde le nôtre clair */
body.lbe header.lbe-header.sticky { background: rgba(255, 255, 255, .94) !important; border-bottom: 1px solid var(--line) !important; }
