/* Démo R2 (demo.xtablo.com, 17/11/2026) — version D de la maquette :
   2nd Brain/10_Projets/Onboarding-Board/styles/demo-r2/demo-r2-D.html */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/static/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/static/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/static/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500 800; font-display: swap; src: url("/static/fonts/plus-jakarta-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "Sometype Mono"; font-weight: 400; font-display: swap; src: url("/static/fonts/sometype-mono-latin-400-normal.woff2") format("woff2"); }

:root { --bg: #08070d; --bg2: #0e0d14; --card: #121119; --line: rgba(255,255,255,.08); --txt: #f4f3f8; --mut: #9a97a8; --vio: #7b5bf4; --vio2: #c9bcff; --ok: #4ade80; --ag: #7b5bf4; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body.r2 { background: var(--bg); color: var(--txt); font: 15px/1.5 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
.r2 h1, .r2 h2, .r2 h3 { font-family: "Plus Jakarta Sans", Inter, sans-serif; letter-spacing: -.035em; text-wrap: balance; }
.r2 button { font-family: inherit; }
.r2-mono { font-family: "Sometype Mono", monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.r2-mono.r2-dark { color: #8b889a; }

.r2-stage { position: fixed; inset: 0; overflow: hidden; }
.r2-stage::before { content: ""; position: absolute; left: 50%; top: -30%; width: 900px; height: 520px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(123,91,244,.13), transparent); pointer-events: none; }

/* saisie */
.r2-ask { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 0 16px; text-align: center; transition: opacity .4s, transform .5s; }
.r2-ask.out { opacity: 0; transform: translateY(-24px); pointer-events: none; }
.r2-ask h1 { font-size: clamp(30px, 6vw, 46px); font-weight: 700; }
.r2-sub { color: var(--mut); font-size: 16px; margin-top: -6px; }
.r2-seg { display: flex; gap: 4px; background: var(--card); padding: 4px; border-radius: 999px; margin-top: 8px; }
.r2-seg button { font-size: 13px; padding: 8px 14px; min-height: 36px; border-radius: 999px; color: var(--mut); background: none; border: 0; cursor: pointer; transition: color .15s, background .15s; }
.r2-seg button:hover { color: var(--txt); }
.r2-seg button.on { background: #fff; color: #08070d; }
.r2-field { width: min(620px, 100%); border-radius: 22px; padding: 2px; background: conic-gradient(from var(--a, 0deg), rgba(123,91,244,0) 0deg, rgba(123,91,244,.9) 40deg, rgba(123,91,244,0) 90deg, rgba(123,91,244,0) 360deg); animation: r2-comete 6s linear infinite; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes r2-comete { to { --a: 360deg; } }
.r2-in { display: flex; align-items: center; gap: 12px; background: var(--bg2); border-radius: 20px; padding: 12px 12px 12px 14px; }
.r2-ico { width: 38px; height: 38px; border-radius: 11px; background: rgba(123,91,244,.14); display: grid; place-items: center; color: var(--vio2); flex: none; }
.r2-val { flex: 1; min-width: 0; font: 19px Inter, sans-serif; color: var(--txt); background: none; border: 0; outline: none; resize: none; text-align: left; }
.r2-val::placeholder { color: #5d5a6b; }
textarea.r2-val { font-size: 17px; line-height: 1.4; max-height: 120px; }
.r2-go { font: 600 14px Inter, sans-serif; color: var(--vio2); background: linear-gradient(#1c1830, #141122); border: 0; border-radius: 14px; padding: 12px 18px; min-height: 44px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(201,188,255,.25), inset 0 -1px 0 var(--vio); display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; text-decoration: none; }
.r2-go .ar { transition: transform .2s; }
.r2-go:hover .ar { transform: translateX(3px); }
.r2-go[disabled] { opacity: .5; cursor: default; }
.r2-go:focus-visible, .r2-chip:focus-visible, .r2-ghost:focus-visible, .r2-seg button:focus-visible, .r2-think .hd:focus-visible { outline: 2px solid var(--vio); outline-offset: 2px; }
.r2-help { font-size: 13px; color: var(--mut); }
.r2-help.err { color: #fca5a5; }

/* chat */
.r2-chatwrap { position: absolute; inset: 0; display: flex; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .4s, transform .6s; }
.r2-chatwrap.on { opacity: 1; pointer-events: auto; }
.r2-chatwrap.gone { opacity: 0; transform: scale(.97); pointer-events: none; }
.r2-chat { width: min(680px, 100%); height: 100%; overflow-y: auto; padding: 40px 12px 140px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; scrollbar-width: none; }
.r2-b { display: flex; gap: 12px; align-items: flex-start; animation: r2-in .45s cubic-bezier(.2,.7,.2,1); }
@keyframes r2-in { from { opacity: 0; transform: translateY(10px); } }
.r2-av { width: 30px; height: 30px; border-radius: 50%; background: var(--card); display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px var(--line); }
.r2-bub { background: var(--card); border-radius: 4px 16px 16px 16px; padding: 13px 16px; box-shadow: inset 0 0 0 1px var(--line); max-width: 600px; min-width: 0; overflow-wrap: anywhere; }
.r2-me { justify-content: flex-end; }
.r2-me .r2-bub { background: #1b1730; border-radius: 16px 4px 16px 16px; box-shadow: inset 0 -1px 0 var(--vio); }
.r2-found { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 12px 0 14px; font-size: 14px; }
.r2-found dt { color: var(--mut); }
.r2-sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.r2-found img { max-height: 26px; max-width: 140px; border-radius: 4px; background: #fff; padding: 2px 4px; vertical-align: middle; }
.r2-acts { display: flex; gap: 8px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.r2-ghost { font: 500 13px Inter, sans-serif; color: var(--mut); background: none; border: 0; padding: 10px 12px; min-height: 44px; border-radius: 12px; cursor: pointer; }
.r2-ghost:hover { color: var(--txt); }
.r2-q { font-weight: 500; }
.r2-q small { display: block; color: var(--mut); font-weight: 400; font-size: 13px; margin-top: 2px; }
.r2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.r2-chip { display: inline-flex; align-items: center; gap: 8px; font: 500 13.5px Inter, sans-serif; color: var(--mut); background: var(--bg2); border: 0; border-radius: 10px; padding: 8px 12px; min-height: 36px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: color .15s, box-shadow .15s, background .15s; text-align: left; }
.r2-chip .bx { width: 15px; height: 15px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px #4a4759; display: grid; place-items: center; flex: none; }
.r2-chip.on { color: var(--txt); background: rgba(123,91,244,.1); box-shadow: inset 0 0 0 1px rgba(123,91,244,.55); }
.r2-chip.on .bx { background: var(--vio); box-shadow: none; }
.r2-chip.on .bx::after { content: ""; width: 7px; height: 3.5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.r2-chip.add { color: var(--vio2); box-shadow: none; outline: 1px dashed rgba(201,188,255,.35); outline-offset: -1px; }
.r2-addin { font: 500 13.5px Inter, sans-serif; color: var(--txt); background: var(--bg2); border: 0; border-radius: 10px; padding: 8px 12px; min-height: 36px; box-shadow: inset 0 0 0 1px rgba(123,91,244,.55); outline: none; width: 220px; }
.r2-fix[hidden] { display: none; }
.r2-fix { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.r2-fix input { font: 16px Inter, sans-serif; color: var(--txt); background: var(--bg2); border: 0; border-radius: 10px; padding: 8px 12px; box-shadow: inset 0 0 0 1px var(--line); }
.r2-fix input[type=color] { width: 54px; padding: 4px; height: 40px; }
.r2-done .r2-acts, .r2-done .r2-fix { display: none; }
.r2-done .r2-chip { pointer-events: none; }
.r2-done .r2-chip.add { display: none; }

/* temps de réflexion */
.r2-think { margin-left: 42px; font-size: 13.5px; color: var(--mut); animation: r2-in .35s ease; }
.r2-think .hd { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--mut); font: 500 13.5px Inter, sans-serif; cursor: pointer; padding: 4px 0; min-height: 32px; }
.r2-think .hd:hover { color: var(--txt); }
.r2-think .ic { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--vio2); position: relative; }
.r2-think.run .ic { animation: r2-pulse 1.2s ease-in-out infinite; }
@keyframes r2-pulse { 50% { box-shadow: inset 0 0 0 1.5px var(--vio2), 0 0 0 4px rgba(123,91,244,.18); } }
.r2-think:not(.run) .ic { box-shadow: none; }
.r2-think:not(.run) .ic::after { content: ""; position: absolute; left: 3px; top: 4px; width: 7px; height: 3.5px; border: 1.6px solid var(--ok); border-top: 0; border-right: 0; transform: rotate(-45deg); }
.r2-think .ch { transition: transform .2s; font-size: 11px; }
.r2-think.open .ch { transform: rotate(90deg); }
.r2-think ul { list-style: none; margin: 4px 0 0 6px; padding-left: 14px; box-shadow: inset 1px 0 0 var(--line); display: none; }
.r2-think.open ul { display: block; }
.r2-think li { padding: 3px 0; animation: r2-in .3s ease; color: #cfcbe0; }

/* construction */
.r2-build { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .5s; }
.r2-build.on { opacity: 1; pointer-events: auto; }
.r2-frame { position: relative; width: min(1000px, 100%); height: min(540px, 78vh); }
.r2-wire { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.r2-wire rect, .r2-wire line { fill: none; stroke: var(--vio2); stroke-width: 1.2; opacity: .7; }
.r2-wire .p { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s ease, opacity .6s; }
.r2-build.s1 .r2-wire .p { stroke-dashoffset: 0; }
.r2-build.s2 .r2-wire .p { opacity: 0; }
.r2-frame .r2-portal { position: absolute; inset: 0; opacity: 0; transition: opacity .7s; }
.r2-build.s2 .r2-frame .r2-portal { opacity: 1; }
.r2-build.s2 .r2-frame::after { content: ""; position: absolute; inset: 0; border-radius: 18px; background: var(--ag); opacity: 0; animation: r2-wash 1.2s ease; pointer-events: none; }
@keyframes r2-wash { 40% { opacity: .18; } 100% { opacity: 0; } }
.r2-portal [data-at] { opacity: 0; transform: translateY(12px); transition: opacity .45s, transform .45s cubic-bezier(.2,.7,.2,1); }
.r2-portal [data-at].on { opacity: 1; transform: none; }
.r2-cap { display: flex; gap: 10px; align-items: center; min-height: 28px; }
.r2-pill { font: 500 13px Inter, sans-serif; background: var(--card); border-radius: 999px; padding: 6px 14px; box-shadow: inset 0 -1px 0 var(--vio); }
.r2-bar { width: 240px; max-width: 40vw; height: 3px; border-radius: 3px; background: var(--card); overflow: hidden; }
.r2-bar i { display: block; height: 100%; background: var(--vio); width: 0; transition: width .6s; }

.r2-portal { background: #fff; color: #16151c; border-radius: 18px; overflow: hidden; }
.r2-top { display: flex; align-items: center; gap: 12px; padding: 16px 22px; box-shadow: inset 0 -1px 0 #ececf1; }
.r2-logo { font: 800 22px "Plus Jakarta Sans", sans-serif; letter-spacing: -.05em; color: var(--ag); }
.r2-logo img { max-height: 30px; max-width: 160px; display: block; }
.r2-who { margin-left: auto; font-size: 13px; color: #6b6879; }
.r2-body { padding: 22px; }
.r2-portal h2 { font-size: 24px; font-weight: 700; }
.r2-road { display: grid; gap: 10px; margin-top: 16px; }
.r2-st { border-radius: 12px; padding: 12px; font-size: 13px; min-height: 88px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); min-width: 0; }
.r2-st b { display: block; font: 600 14px Inter, sans-serif; margin: 4px 0 2px; overflow-wrap: anywhere; }
.r2-st small { color: #6b6879; }
.r2-st .d { font: 500 10px "Sometype Mono", monospace; letter-spacing: .06em; text-transform: uppercase; color: #6b6879; }
.r2-st.now { box-shadow: inset 0 0 0 1.5px var(--ag); }
.r2-row2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 14px; }
.r2-box { border-radius: 12px; box-shadow: inset 0 0 0 1px #ececf1; padding: 14px; min-width: 0; }
.r2-box h4 { font: 600 13px Inter, sans-serif; margin-bottom: 6px; }
.r2-box h4 span { font-weight: 400; color: #8b889a; font-size: 12px; margin-left: 6px; }
.r2-task { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 6px 0; box-shadow: inset 0 -1px 0 #f3f3f6; }
.r2-task:last-child { box-shadow: none; }
.r2-task .ck { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px #c8c6d2; flex: none; }
.r2-msg-c { font-size: 13px; color: #3b3946; background: #f6f6f9; border-radius: 10px; padding: 10px; }
.r2-msg-c .n { font-weight: 600; color: #16151c; font-size: 12px; }
.r2-vueag { position: absolute; right: 22px; bottom: 20px; font: 600 13px Inter, sans-serif; background: #16151c; color: #fff; border-radius: 999px; padding: 9px 16px; }

/* pages de message (lien expiré, sans lien, garder) */
.r2-msg { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.r2-msg h1 { font-size: clamp(26px, 5vw, 40px); }
.r2-msg p { color: var(--mut); max-width: 460px; }

@media (max-width: 640px) {
  .r2-in { flex-wrap: wrap; }
  .r2-in .r2-go { width: 100%; justify-content: center; }
  .r2-think { margin-left: 0; }
  .r2-found { grid-template-columns: 1fr; gap: 2px; }
  .r2-found dd { margin-bottom: 8px; }
  .r2-frame { height: 74vh; }
  .r2-road { grid-template-columns: 1fr 1fr !important; }
  .r2-row2 { grid-template-columns: 1fr; }
  .r2-body { padding: 14px; overflow: hidden; }
  .r2-who { display: none; }
  .r2-vueag { right: 14px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { .r2 *, .r2 *::before, .r2 *::after { animation: none !important; transition: none !important; } }
