:root { --ref-rose:#c62858; --ref-ink:#282b2c; --ref-paper:#faf7f0; --ref-muted:#625e59; --ref-line:#ded8cc; }
@font-face { font-family:PortalSerif; src:url('/assets/fonts/studio-serif-bold.woff') format('woff'); font-display:swap; font-weight:700; }
.page-parrainage { margin:0; background:var(--ref-paper); color:var(--ref-ink); font:17px/1.5 system-ui,sans-serif; }
[data-barae-app="parrainage"] .page-parrainage {
  --ref-rose:var(--theme-ink);
  --ref-paper:var(--app-paper);
  --ref-line:var(--theme-line);
  --ref-surface:color-mix(in srgb, white 75%, var(--app-paper));
  --ref-reward:var(--theme-tint);
  --ref-reward-line:var(--theme-line);
  --ref-rail:var(--theme-rail);
  --ref-fill:var(--theme-control-fill, var(--theme-gradient, #ad3265));
  --ref-filled-ink:var(--theme-selected, #fffaf3);
  --ref-focus:var(--theme-ink);
  font-family:PortalSans,system-ui,sans-serif;
}
[data-barae-app="parrainage"] .portal-header[data-barae-app-header] .barae-app-referral[aria-current="page"] {
  color:var(--theme-control-fill, var(--nav-active));
}
.page-parrainage .skip-link { position:absolute; left:16px; top:-100px; z-index:100; background:white; padding:12px; }
.page-parrainage .skip-link:focus { top:8px; }
.ref-page { max-width:720px; margin:auto; padding:24px 20px calc(100px + env(safe-area-inset-bottom)); }
.ref-page *, .ref-account * { box-sizing:border-box; }
.ref-page [hidden], .ref-account [hidden] { display:none!important; }
.ref-page button, .ref-page input, .ref-page textarea, .ref-account button, .ref-account input { font:inherit; }
.ref-page button, .ref-page a, .ref-account button { touch-action:manipulation; }
.ref-page button, .ref-account button { cursor:pointer; }
.ref-page button:disabled, .ref-account button:disabled { opacity:.6; cursor:default; }
.ref-page :focus-visible, .ref-account :focus-visible { outline:3px solid var(--ref-focus, #286657); outline-offset:4px; }
.ref-account-link a, .ref-account a { color:var(--ref-muted); text-underline-offset:4px; }
.ref-title { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.ref-title h1 { margin:0; font:800 32px/1.15 system-ui,sans-serif; letter-spacing:-1px; }
[data-barae-app="parrainage"] .ref-title h1 { font:700 clamp(24px, 7.6vw, 30px)/1.15 PortalSerif,Georgia,serif; color:var(--ref-rose); }
.ref-invite, .ref-guest { background:var(--ref-surface, white); border:1px solid var(--ref-line); border-radius:22px; padding:24px; margin-bottom:32px; }
.ref-invite h2 { font-size:clamp(17px,5vw,30px); line-height:1.25; letter-spacing:-.5px; text-wrap:balance; margin:0 0 22px; }
.ref-guest h2 { font-size:26px; line-height:1.25; margin:0 0 12px; }
.ref-rewards { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:20px; }
.ref-rewards>span { padding:14px 8px; border:1px solid var(--ref-reward-line, #ead7df); border-radius:12px; background:var(--ref-reward, #fff7fa); text-align:center; font-size:17px; color:var(--ref-muted); }
.ref-rewards strong { display:block; font-size:32px; line-height:1.3; color:var(--ref-rose); }
.ref-rewards small { font-size:17px; font-weight:650; }
.ref-invite>p { font-size:17px; line-height:1.5; color:var(--ref-muted); margin:0 0 20px; }
.ref-invite p strong { color:var(--ref-ink); }
.ref-button { display:flex; align-items:center; justify-content:center; gap:12px; width:100%; min-height:50px; padding:12px 16px; border:1px solid var(--ref-rose); border-radius:12px; background:var(--ref-fill, var(--ref-rose)); color:var(--ref-filled-ink, white); text-decoration:none; font-weight:750!important; }
.ref-copy-line { display:grid; grid-template-columns:minmax(0,1fr) max-content; column-gap:10px; align-items:start; margin-top:12px; }
.ref-copy-action, .ref-code-action { display:grid; min-width:0; }
.ref-copy-action { justify-items:start; }
.ref-code-action { justify-items:end; }
.ref-code-controls { display:flex; align-items:center; gap:6px; white-space:nowrap; color:var(--ref-muted); font-size:clamp(14px,4vw,16px); }
.ref-copy-feedback { min-height:1.3em; color:var(--ref-muted); font:italic 12px/1.3 system-ui,sans-serif; }
.ref-link { display:inline-block; min-height:44px; border:0; background:none; color:var(--ref-rose); padding:10px 0; font-size:16px!important; text-decoration:underline; text-underline-offset:4px; }
.ref-code { border:0; background:var(--ref-rail, #f5f1ea); border-radius:6px; min-height:44px; padding:8px; color:var(--ref-ink); font:750 clamp(15px,4.2vw,17px)/1.2 ui-monospace,monospace!important; letter-spacing:1px; }
.ref-feedback { font-size:16px!important; margin:10px 0 0!important; }
.ref-feedback:empty, .ref-notice:empty { display:none; }
.ref-fallback { width:100%; border:1px solid var(--ref-line); border-radius:8px; background:var(--ref-surface, white); color:var(--ref-ink); padding:10px; font-size:16px; margin-top:12px; resize:vertical; }
.ref-section-title { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; margin-bottom:18px; }
.ref-section-title h2 { margin:0; font-size:26px; letter-spacing:-.5px; }
.ref-earned { font-size:16px; color:var(--ref-muted); }
.ref-earned strong { color:var(--ref-rose); font-size:20px; }
.ref-tabs { display:grid; grid-template-columns:1fr 1fr; gap:8px; border-bottom:1px solid var(--ref-line); padding-bottom:18px; }
.ref-tabs button { border:1px solid var(--ref-rose); border-radius:10px; min-height:48px; padding:8px; background:transparent; color:var(--ref-rose); font-size:17px; font-weight:700; }
.ref-tabs button[aria-selected=true] { background:var(--ref-fill, var(--ref-rose)); color:var(--ref-filled-ink, white); }
.ref-tabs span { display:inline-block; min-width:22px; margin-left:4px; padding:0 5px; border-radius:20px; background:#ffffff2e; font-size:16px; }
[data-barae-app="parrainage"] .ref-tabs { gap:0; padding:0; border:1px solid var(--ref-line); border-radius:999px; background:var(--ref-rail); }
[data-barae-app="parrainage"] .ref-tabs button { border:0; border-radius:999px; min-height:44px; }
.ref-person { padding:22px 0; border-bottom:1px solid var(--ref-line); }
.ref-person-head { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.ref-avatar { flex:0 0 40px; width:40px; height:40px; display:grid; place-items:center; border-radius:50%; background:var(--ref-reward, #e8e3d7); color:var(--ref-focus, #4c4844); font-size:16px; font-weight:750; }
.ref-person-name { min-width:100px; flex:1; }
.ref-person-name strong { display:block; overflow-wrap:anywhere; font-size:18px; }
.ref-person-name small { display:block; font-size:16px; color:var(--ref-muted); margin-top:2px; }
.ref-status { font-size:16px; color:var(--ref-muted); }
.ref-status[data-status=validated], .ref-points { color:#257447; }
.ref-points { display:block; font-size:20px; }
.ref-progress { margin-top:14px; }
.ref-progress-caption { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 12px; font-size:16px; color:var(--ref-muted); }
.ref-progress-caption strong { color:var(--ref-ink); }
.ref-bars { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-top:10px; }
.ref-bars span { height:7px; border-radius:4px; background:var(--ref-line); }
.ref-bars span[data-complete=true] { background:var(--ref-fill, var(--ref-rose)); }
.ref-empty { padding:24px 8px; text-align:center; color:var(--ref-muted); font-size:17px; }
.ref-empty strong { display:block; color:var(--ref-ink); margin-bottom:8px; }
.ref-pages { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:12px; font-size:16px; }
.ref-notice, .ref-account-link { color:var(--ref-muted); font-size:16px; }
.ref-account-link { margin-top:28px; }
.ref-account { margin-top:32px; border-top:1px solid var(--ref-line); padding-top:24px; font:17px/1.5 system-ui,sans-serif; }
.ref-account h2 { font-size:24px; margin:0 0 12px; }
.ref-account p { font-size:16px; color:var(--ref-muted); }
.ref-account label { display:block; font-weight:700; }
.ref-account-fields { display:flex; flex-wrap:wrap; gap:10px; }
.ref-account input { flex:1 1 120px; width:120px; min-width:0; min-height:50px; border:1px solid #b8afa2; border-radius:10px; background:white; padding:10px 12px; text-transform:uppercase; letter-spacing:2px; }
.ref-account .ref-button { width:auto; flex:1 1 130px; }
@media(max-width:359px) { .ref-page{padding-inline:16px}.ref-invite,.ref-guest{padding:20px}.ref-title h1{font-size:29px} }
@media(min-width:600px) { .ref-page{padding-top:32px}.ref-invite{padding:32px}.ref-progress{padding-left:50px} }
@media(prefers-reduced-motion:no-preference) { .ref-button,.ref-tabs button{transition:background .15s,color .15s}.ref-button:hover{background:var(--ref-fill, #a41f49)} }
