/* Rayor Date — design chaleureux, identité Rayor (bleu #07297E / rouge #8e0004) */
@font-face { font-family: 'Nunito'; src: url('/Nunito.ttf') format('truetype'); font-display: swap; }

/* Fonds neutres (le rouge reste réservé aux accents) */
:root {
  --bg: #f6f6f7; --card: #ffffff; --ink: #1d1c1e; --muted: #716d70;
  --line: #e6e4e6; --accent: #8e0004; --accent-soft: #f6ecec; --blue: #07297E;
  --ok: #1d7a3d; --danger: #b3261e; --shadow: 0 4px 24px rgba(20, 19, 22, .07);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141316; --card: #1d1c20; --ink: #f2f0f2; --muted: #9b939a;
    --line: #312e33; --accent: #ff5570; --accent-soft: #2b2126; --blue: #7d9bff;
    --ok: #5fd08a; --danger: #ff7b72; --shadow: 0 4px 24px rgba(0, 0, 0, .4);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* corrige les .ephrow/.gtab qui restaient visibles */
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 'Nunito', system-ui, -apple-system, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: .4em 0; } h2 { font-size: 1.2rem; margin: .6em 0 .4em; }
h3 { font-size: 1.02rem; margin: .8em 0 .3em; }
.muted { color: var(--muted); } .small { font-size: .87rem; } .center { text-align: center; }
.spacer { flex: 1; }

/* ---- barres ---- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px;
  padding: 10px 18px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand, .brand-big { font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: -.5px; }
.brand span, .brand-big span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { padding: 7px 13px; border-radius: 99px; color: var(--ink); font-weight: 600; }
.topnav a:hover { background: var(--accent-soft); text-decoration: none; }
.topnav a.on { background: var(--accent); color: #fff; }
.gear { font-size: 1.2rem; color: var(--muted); display: inline-flex; }
.ico { width: 1.35em; height: 1.35em; display: inline-block; vertical-align: -0.2em; }
.tabbar .ico { width: 25px; height: 25px; display: block; margin: 0 auto 1px; }
.gear .ico { width: 24px; height: 24px; }
.langflag { font-size: 1.25rem; text-decoration: none; line-height: 1; }
.langflag:hover { text-decoration: none; }
@media (max-width: 720px) { .langflag { margin-left: auto; } }
.tabbar { display: none; }
@media (max-width: 720px) {
  .topnav { display: none; }
  .tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; text-align: center; color: var(--ink); font-size: 1.25rem; position: relative; }
  .tabbar a span { display: block; font-size: .68rem; }
  .tabbar .badge { position: absolute; top: -2px; right: 22%; }
  body { padding-bottom: 84px; }
}
.wrap { max-width: 920px; margin: 0 auto; padding: 18px 16px 40px; }

.badge { background: var(--accent); color: #fff; border-radius: 99px; font-size: .72rem;
  font-weight: 800; padding: 1px 7px; vertical-align: super; }

/* ---- composants ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); margin-bottom: 16px; }
.pad { padding: 18px 20px; }
.alert { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--ink);
  padding: 10px 14px; border-radius: 12px; margin: 10px 0; }
.alert-ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; cursor: pointer;
  border-radius: 99px; padding: 10px 22px; font: inherit; font-weight: 700; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-big { font-size: 1.1rem; padding: 14px 30px; }
.mini { background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer;
  border-radius: 99px; padding: 4px 12px; font: inherit; font-size: .85rem; }
.mini:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.mini.danger { color: var(--danger); border-color: var(--danger); }
.btnlike { display: inline-block; }
.chip { display: inline-block; background: var(--accent-soft); color: var(--ink);
  border-radius: 99px; padding: 2px 10px; font-size: .78rem; font-weight: 700; margin: 2px 2px 2px 0; }
.chip-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.chip-plus { background: var(--blue); color: #fff; }
.danger-chip { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.chips { margin: 8px 0; }
.vbadge { color: var(--ok); font-size: .8em; font-weight: 800; }

/* ---- formulaires ---- */
label { display: block; margin: 10px 0 4px; font-weight: 700; font-size: .93rem; }
label.inline { display: flex; gap: 8px; align-items: baseline; font-weight: 500; }
input, select, textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; }
input[type=checkbox] { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; }
legend { font-weight: 700; font-size: .9rem; padding: 0 6px; }
.form-card form > .btn { margin-top: 16px; }
.rowform { display: flex; gap: 8px; align-items: end; margin: 8px 0; }
.rowform label { flex: 1; margin: 0; }
.rowform input { min-width: 0; }
.consents { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; margin: 14px 0; }
.consents label { margin: 8px 0; font-size: .88rem; }
.field-info { margin: 10px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---- landing ---- */
.landing .hero { text-align: center; padding: 48px 10px 30px; }
.landing h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.1; margin: 18px 0; }
.brand-big { font-size: 1.6rem; }
.lead { max-width: 620px; margin: 0 auto 24px; color: var(--muted); font-size: 1.08rem; }
.hero-note { margin-top: 12px; color: var(--muted); font-size: .88rem; }
.signup-box { max-width: 380px; margin: 8px auto 0; text-align: left; }
.signup-box .wstep label { font-weight: 700; }
.signup-box .btn-big { width: 100%; margin-top: 12px; }
.linkbtn { display: inline-block; background: none; border: 0; color: var(--muted); cursor: pointer;
  font: inherit; margin-top: 8px; text-decoration: underline; }
.or { text-align: center; color: var(--muted); font-size: .85rem; margin: 16px 0 10px; text-transform: uppercase; letter-spacing: .1em; }
.btn-ghost { display: block; text-align: center; background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 99px; padding: 12px 22px; font-weight: 700; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 30px 0; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.feat-ico { font-size: 1.8rem; }
.feat p { color: var(--muted); font-size: .93rem; }
.pubfoot { text-align: center; color: var(--muted); font-size: .85rem; padding: 26px 0; }

/* ---- deck découverte ---- */
.deck-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.deck { position: relative; max-width: 430px; margin: 14px auto; min-height: 560px; }
.dcard { position: absolute; inset: 0; background: var(--card); border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.dcard-ph { position: relative; flex: 1; min-height: 0; background: #000; }
.dcard-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dcard-nav { position: absolute; inset: 0; display: flex; }
.dcard-nav div { flex: 1; cursor: pointer; }
.dcard-dots { position: absolute; top: 8px; left: 0; right: 0; display: flex; gap: 4px; padding: 0 10px; }
.dcard-dots i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); }
.dcard-dots i.on { background: #fff; }
.dcard-grad { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 12px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.dcard-grad h2 { margin: 0; font-size: 1.35rem; color: #fff; }
.dcard-grad .sub { font-size: .9rem; opacity: .9; }
.dcard-body { padding: 12px 16px; max-height: 150px; overflow: auto; }
.dcard-body p { margin: 6px 0; font-size: .92rem; }
.dcard-acts { display: flex; justify-content: center; gap: 26px; padding: 12px 0 16px; }
.act { width: 62px; height: 62px; border-radius: 50%; border: 2px solid var(--line); background: var(--card);
  font-size: 1.6rem; cursor: pointer; transition: transform .1s; }
.act:hover { transform: scale(1.1); }
.act-like { border-color: var(--accent); color: var(--accent); }
.act-pass { border-color: var(--muted); color: var(--muted); }
.dcard-ph.teaser { background: #000; }
.teaser-img { width: 100%; height: 100%; object-fit: cover; filter: blur(14px); transform: scale(1.15); }
.teaser-ov { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; text-align: center; color: #fff; background: rgba(10,10,14,.5); padding: 24px; }
.teaser-lock { font-size: 2.8rem; }
.teaser-ov b { font-size: 1.15rem; max-width: 82%; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.deck-empty { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; color: var(--muted); text-align: center; padding: 20px; }
.phtag { position: absolute; right: 8px; bottom: 8px; z-index: 2; background: rgba(0,0,0,.55); color: #ffd9a8;
  font-size: .7rem; font-weight: 700; border-radius: 99px; padding: 2px 9px; }
.phtag-live { color: #b7ffcf; }

/* ---- conversations ---- */
.convlist { display: flex; flex-direction: column; gap: 8px; }
.conv { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 14px; color: var(--ink); }
.conv:hover { text-decoration: none; border-color: var(--accent); }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.avatar-txt, .gcard-txt { display: flex; align-items: center; justify-content: center; background: var(--accent-soft);
  color: var(--accent); font-weight: 800; font-size: 1.3rem; width: 52px; height: 52px; border-radius: 50%; }
.conv-mid { flex: 1; min-width: 0; }
.conv-name { font-weight: 800; }
.conv-last { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.likes-banner { display: flex; align-items: center; gap: 8px; background: var(--accent-soft);
  border: 1px solid var(--accent); border-radius: 14px; padding: 12px 16px; margin: 10px 0; color: var(--ink); font-weight: 600; }
.likes-banner:hover { text-decoration: none; }
.chev { color: var(--accent); font-weight: 800; }

.thread-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; position: sticky; top: 58px; z-index: 20; }
@media (max-width: 720px) { .thread-head { top: 0; } }
.back { font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.thread-who { color: var(--ink); }
.privnote { text-align: center; color: var(--muted); font-size: .78rem; margin: 6px 0 10px; }
.thread { display: flex; flex-direction: column; gap: 6px; height: 52vh;
  overflow-y: auto; padding: 8px 4px; }
.thread::before { content: ''; flex: 1 0 auto; } /* les messages collent au bas, près de la barre d'envoi */
.msg { max-width: 76%; padding: 8px 14px; border-radius: 16px; background: var(--card);
  border: 1px solid var(--line); align-self: flex-start; overflow-wrap: break-word; }
.msg.me { background: var(--accent); border-color: var(--accent); color: #fff; align-self: flex-end; }
.msg .who { font-size: .72rem; font-weight: 800; color: var(--accent); }
.msg.me .who { color: #ffd9de; }
.msg .at { display: block; font-size: .66rem; opacity: .6; text-align: right; }
.msg.deleted { font-style: italic; opacity: .6; }
.msg .mdel { background: none; border: 0; cursor: pointer; font-size: .7rem; opacity: .5; padding: 0 2px; }
.sendbar { display: flex; gap: 6px; align-items: center; margin-top: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 5px 6px; }
.sendbar input { flex: 1 1 auto; min-width: 0; width: auto; border: 0; background: transparent; padding: 8px 12px; }
.sendbar input:focus { outline: none; }
.sendbar .attach { border: 0; background: transparent; font-size: 1.25rem; padding: 4px 6px; cursor: pointer; }
.sendbar .btn { padding: 9px 18px; flex: 0 0 auto; }
.srcbtns { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }

/* ---- groupes ---- */
.glist { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.gitem { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; color: var(--ink); }
.gitem:hover { text-decoration: none; border-color: var(--accent); }
.gitem-name { font-weight: 800; }
.gitem-desc { color: var(--muted); font-size: .9rem; }
.gitem-row { display: flex; align-items: center; gap: 12px; }
.gitem { display: flex; align-items: center; gap: 10px; }
.gitem-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--ink); }
.gitem-link:hover { text-decoration: none; }
.joinbtn { padding: 7px 16px; font-size: .88rem; flex: 0 0 auto; }
.gavatar.xs { width: 38px; height: 38px; flex: 0 0 38px; font-size: 1rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--blue)); }
.grp-cols { display: grid; grid-template-columns: 1fr 260px; gap: 14px; }
@media (max-width: 800px) { .grp-cols { grid-template-columns: 1fr; } }
.memlist { display: flex; flex-direction: column; gap: 4px; }
.memlist a { color: var(--ink); }
.loglist div { margin: 3px 0; }
.rowitem { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rowitem:last-child { border-bottom: 0; }
.condform h3 { color: var(--accent); }

/* ---- profils ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gcard { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 3/4;
  background: var(--card); border: 1px solid var(--line); }
.gcard img { width: 100%; height: 100%; object-fit: cover; }
.gcard-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; color: #fff;
  font-weight: 800; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.gcard .gcard-txt { width: 100%; height: 100%; border-radius: 0; font-size: 3rem; }
.gcard-txt.big { width: 100%; aspect-ratio: 1; border-radius: 16px; font-size: 4rem; }
.pview { overflow: hidden; }
.slider { position: relative; }
.sl-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(0,0,0,.42);
  color: #fff; border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1;
  cursor: pointer; transition: opacity .2s; display: flex; align-items: center; justify-content: center; }
.sl-prev { left: 8px; } .sl-next { right: 8px; }
.sl-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; gap: 5px; justify-content: center; z-index: 3; pointer-events: none; }
.sl-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); box-shadow: 0 0 2px rgba(0,0,0,.5); }
.sl-dots i.on { background: #fff; }
.pview-photos { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; background: #000; scrollbar-width: none; }
.pview-photos::-webkit-scrollbar { display: none; }
.pview-ph { position: relative; flex: 0 0 100%; scroll-snap-align: start; }
.pview-photos img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
@media (min-width: 700px) { .pview-ph { flex: 0 0 340px; } .pview-photos img { width: 340px; } }
.pview-body { padding: 16px 20px; }
.pview-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.myphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.myphoto { position: relative; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.myphoto img { width: 100%; height: 100%; object-fit: cover; }
.myphoto-acts { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; }
.myphoto-acts .mini { background: rgba(0,0,0,.55); color: #fff; border-color: transparent; }
.photo-add-btns { display: flex; gap: 10px; align-items: center; margin: 12px 0; flex-wrap: wrap; }

/* ---- admin ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-align: center; padding: 14px 6px; }
.stat b { display: block; font-size: 1.5rem; color: var(--accent); }
.stat span { color: var(--muted); font-size: .8rem; }
.report { border-bottom: 1px solid var(--line); padding: 12px 0; }
.excerpt { background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 10px;
  font-size: .82rem; white-space: pre-wrap; max-height: 220px; overflow: auto; }

/* ---- dialogs / toasts ---- */
.dlg { border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink);
  max-width: 440px; width: calc(100vw - 40px); padding: 20px; }
.dlg::backdrop { background: rgba(0,0,0,.5); }
.dlg-actions { display: flex; justify-content: end; gap: 10px; margin-top: 14px; }
.dlg.wide { max-width: 560px; }
.galpick { max-height: 52vh; overflow: auto; margin: 8px 0; }
.galpick .g3 { cursor: pointer; }
#toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); z-index: 90;
  background: var(--ink); color: var(--bg); border-radius: 99px; padding: 10px 20px; font-weight: 700;
  opacity: 0; transition: opacity .3s; pointer-events: none; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; }
.match-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.75); display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; text-align: center; }
.match-overlay h2 { font-size: 2.2rem; color: #fff; }
.legal h2 { margin-top: 1.2em; }
.videobox video { width: 100%; border-radius: 12px; background: #000; }

/* ---- stories (24 h) ---- */
.storyrow { display: flex; gap: 14px; overflow-x: auto; padding: 10px 2px; scrollbar-width: none; }
.storyrow::-webkit-scrollbar { display: none; }
.story { flex: 0 0 auto; text-align: center; cursor: pointer; width: 74px; }
.story-ring { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(45deg, var(--accent), #f5a623, var(--blue)); padding: 3px; margin: 0 auto; }
.story-ring img, .story-ring b { width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  display: flex; align-items: center; justify-content: center; background: var(--card); color: var(--ink);
  font-size: 1.25rem; border: 2px solid var(--bg); }
.story.seen .story-ring { background: var(--line); }
.story.moment .story-ring { background: linear-gradient(45deg, #ff004c, #ff8a00); }
.story-ring.dashed { background: none; border: 2px dashed var(--line); padding: 1px; }
.story-name { display: block; font-size: .72rem; color: var(--muted); margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stitle { font-size: 1rem; margin: 12px 0 0; }
.momentbar { display: flex; flex-direction: column; gap: 6px; background: linear-gradient(135deg, #ff004c, #ff8a00);
  color: #fff; border-radius: 14px; padding: 14px 16px; margin: 10px 0; }
.momentbar .btn { background: #fff; color: #b3003c; align-self: flex-start; }

/* visionneuse de stories */
.sv { position: fixed; inset: 0; z-index: 100; background: #000; }
.sv-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.sv-media img, .sv-media video { max-width: 100%; max-height: 100%; object-fit: contain; }
.sv-bars { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; gap: 4px; z-index: 4; }
.sv-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); }
.sv-bars i.done, .sv-bars i.cur { background: #fff; }
.sv-top { position: absolute; top: calc(24px + env(safe-area-inset-top)); left: 14px; right: 14px; display: flex;
  align-items: center; justify-content: space-between; gap: 10px; color: #fff; z-index: 4; font-weight: 700; }
.sv-badge { background: rgba(255,255,255,.22); border-radius: 99px; padding: 2px 8px; font-size: .68rem; font-weight: 700; }
.sv-x { background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }
.sv-cap { position: absolute; bottom: calc(46px + env(safe-area-inset-bottom)); left: 16px; right: 16px; color: #fff;
  text-align: center; z-index: 4; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.sv-nav { position: absolute; inset: 0; display: flex; z-index: 3; }
.sv-nav div { flex: 1; cursor: pointer; }
.sv .sv-cap { bottom: calc(74px + env(safe-area-inset-bottom)); }
.sv-reply { position: absolute; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; right: 12px; z-index: 5;
  display: flex; gap: 8px; }
.sv-reply input { flex: 1; min-width: 0; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.4);
  color: #fff; border-radius: 99px; padding: 11px 16px; }
.sv-reply input::placeholder { color: rgba(255,255,255,.7); }
.sv-reply .btn { flex: 0 0 auto; }
.sv-like { width: 100%; }
.story-sep { flex: 0 0 auto; width: 1px; align-self: center; height: 44px; background: var(--line); margin: 0 3px; }

/* ---- barre d'installation PWA ---- */
.installbar { position: fixed; left: 10px; right: 10px; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 70;
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px; }
.installbar span { flex: 1; font-size: .9rem; font-weight: 600; }
.installbar .btn { padding: 7px 16px; }
.installbar .ib-x { background: none; border: 0; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
@media (min-width: 721px) { .installbar { left: auto; right: 16px; bottom: 16px; max-width: 380px; } }

/* ---- appels WebRTC ---- */
.call-overlay { position: fixed; inset: 0; z-index: 100; background: #0d0d10; display: flex; align-items: center; justify-content: center; }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #0d0d10; display: none; }
.call-overlay.video .call-remote { display: block; }
.call-local { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; width: 108px; height: 150px;
  object-fit: cover; border-radius: 14px; border: 2px solid rgba(255,255,255,.35); background: #000; display: none; z-index: 2; }
.call-overlay.video .call-local { display: block; }
.call-overlay:not(.video)::before { content: '📞'; font-size: 4rem; opacity: .5; }
.call-top { position: absolute; top: calc(48px + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; color: #fff; z-index: 3; padding: 0 16px; }
.call-top b { font-size: 1.5rem; display: block; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.call-status { color: rgba(255,255,255,.75); margin-top: 6px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.call-actions { position: absolute; bottom: calc(56px + env(safe-area-inset-bottom)); left: 0; right: 0;
  display: flex; gap: 28px; justify-content: center; z-index: 3; }
.call-btn { width: 66px; height: 66px; border-radius: 50%; border: 0; font-size: 1.7rem; cursor: pointer;
  background: rgba(255,255,255,.2); color: #fff; display: flex; align-items: center; justify-content: center; }
.call-btn.hangup, .call-btn.decline { background: #e0245e; }
.call-btn.accept { background: #1db954; }
.call-btn.off { background: #fff; color: #0d0d10; }
.videobox.cam { position: relative; min-height: 200px; }
.cam-load { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; color: #fff; background: rgba(0,0,0,.55); border-radius: 12px; padding: 16px; font-weight: 600; }
.cam-fail-btns { display: flex; gap: 8px; margin-top: 10px; }
.spin { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- candidature média (aperçu admin) ---- */
.gsub-preview { flex-basis: 100%; }
.gsub-preview img, .gsub-preview video { max-width: 240px; max-height: 300px; border-radius: 10px; display: block; margin: 6px 0; }

/* ---- autocomplétion ville ---- */
.ac-box { position: absolute; left: 0; right: 0; z-index: 60; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); margin-top: 2px; max-height: 240px; overflow: auto; }
.ac-item { padding: 9px 12px; cursor: pointer; font-size: .95rem; }
.ac-item:hover { background: var(--accent-soft); }

/* ---- réactions ---- */
.reactbar { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.msg.me .reactbar { justify-content: flex-end; }
.rpill { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 99px;
  padding: 1px 9px; font-size: .82rem; cursor: pointer; line-height: 1.5; }
.rpill.mine { border-color: var(--accent); background: var(--accent-soft); }
.radd { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 99px;
  padding: 1px 8px; font-size: .82rem; cursor: pointer; opacity: .55; }
.radd:hover { opacity: 1; border-color: var(--accent); color: var(--accent); }
.rpicker { position: absolute; z-index: 95; background: var(--card); border: 1px solid var(--line);
  border-radius: 99px; box-shadow: var(--shadow); padding: 4px 7px; display: flex; gap: 2px; }
.rpicker button { background: none; border: 0; font-size: 1.4rem; cursor: pointer; padding: 2px 4px; line-height: 1; }
.rpicker button:hover { transform: scale(1.2); }
.mdel.undo { color: var(--accent); font-weight: 700; }

/* message d'animation "système" (signé Rayor) */
.gsys { align-self: center; max-width: 92%; text-align: center; background: var(--accent-soft);
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 8px auto; font-size: .95rem; }
.gsys-badge { font-weight: 800; color: var(--accent); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.gsys .reactbar { justify-content: center; margin-top: 6px; }

/* ================= INTERFACE DE GROUPE (vue membre) ================= */
.gavatar { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--blue)); }
.gavatar.sm { width: 52px; height: 52px; flex: 0 0 52px; font-size: 1.4rem; }

/* --- card d'en-tête de groupe (refonte) : bandeau avatar+nom, puis actions --- */
.ghead-c { padding: 0; margin-bottom: 12px; border-radius: 18px; overflow: hidden; }
.ghead-top { display: flex; align-items: center; gap: 13px; padding: 15px 16px 11px; }
.gback { font-size: 1.35rem; color: var(--muted); flex: 0 0 auto; line-height: 1; }
.gback:hover { text-decoration: none; color: var(--accent); }
.ghead-id { min-width: 0; flex: 1; }
.ghead-title { font-size: 1.18rem; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gstat-line { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.gstat-line b { color: var(--ink); }
.ghead-actions { display: flex; gap: 8px; padding: 0 16px 14px; align-items: center; flex-wrap: wrap; }
.ghead-actions .gbtn { flex: 1 1 auto; min-width: 130px; padding: 9px 16px; }
.ghead-actions .mini, .ghead-actions a.mini { flex: 0 0 auto; padding: 8px 13px; }
.ghead-more { padding: 0 16px 13px; }
.ghead-more summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: .85rem; padding: 4px 0; list-style: none; }
.ghead-more summary::-webkit-details-marker { display: none; }
.ghead-more .ghead-desc { margin: 8px 0; font-size: .93rem; }

@media (max-width: 720px) {
  .ghead-top { padding: 12px 13px 9px; gap: 11px; }
  .gavatar.sm { width: 46px; height: 46px; flex: 0 0 46px; font-size: 1.2rem; }
  .ghead-title { font-size: 1.05rem; }
  .gstat-line { font-size: .8rem; }
  .ghead-actions { padding: 0 13px 12px; }
  .ghead-actions .gbtn { min-width: 110px; }
  .gtabs button { font-size: .8rem; padding: 8px 3px; }
}

/* filigrane sur les médias : 📸 heure de prise (directe) ou « importé » */
.wm { position: absolute; left: 8px; bottom: 8px; z-index: 2; background: rgba(0,0,0,.6); color: #fff;
  font-size: .68rem; font-weight: 700; border-radius: 6px; padding: 2px 7px; letter-spacing: .02em; pointer-events: none; }
.wm-live { color: #b7ffcf; }
.g3 .wm { left: 4px; bottom: 4px; font-size: .6rem; padding: 1px 5px; }

/* onglets segmentés */
.gtabs { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 4px; margin: 0 0 14px; position: sticky; top: 60px; z-index: 20; box-shadow: var(--shadow); }
@media (max-width: 720px) { .gtabs { top: 6px; } }
.gtabs button { flex: 1; background: none; border: 0; border-radius: 10px; color: var(--muted); font: inherit;
  font-weight: 700; padding: 9px 4px; cursor: pointer; white-space: nowrap; font-size: .86rem; transition: background .15s, color .15s; }
.gtabs button.on { color: #fff; background: var(--accent); }

/* Vue membre d'un groupe = plein écran : le bandeau du haut est masqué. */
.fs .topbar { display: none; }
.fs .gtabs { top: 0; }
.fs #tab-chat { height: calc(100dvh - 250px); }
@media (max-width: 720px) { .fs #tab-chat { height: calc(100dvh - 205px); } }

/* chat : liste en carte + barre de saisie en pilule, ancrée en bas */
#tab-chat { display: flex; flex-direction: column; height: calc(100dvh - 310px); min-height: 340px; }
#tab-chat .privnote { flex: 0 0 auto; margin: 0 0 8px; }
#gthread { flex: 1 1 auto; height: auto; max-height: none; min-height: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
#tab-chat .sendbar { flex: 0 0 auto; margin-top: 10px; }
#tab-chat #pendingrow { flex: 0 0 auto; }
@media (max-width: 720px) { #tab-chat { height: calc(100dvh - 255px); } }

/* publications (feed) */
.post { overflow: hidden; margin-bottom: 16px; border-radius: 16px; }
.post-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.avatar-txt.psm { width: 36px; height: 36px; font-size: 1rem; flex: 0 0 36px; }
.post-m { background: #000; text-align: center; cursor: pointer; }
.post-m img, .post-m video { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; }
.post-a { padding: 10px 14px 2px; display: flex; align-items: center; gap: 6px; }
.pheart { background: none; border: 0; font-size: 1.45rem; cursor: pointer; padding: 0; line-height: 1; }
.plikes { font-size: .95rem; }
.post-cap { padding: 2px 14px 6px; font-size: .95rem; }
.post-coms { padding: 0 14px 4px; }
.pcom { font-size: .92rem; margin: 3px 0; }
.pcform { display: flex; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid var(--line); margin-top: 6px; }
.pcform input { border: 0; background: transparent; padding-left: 0; }
.pcform input:focus { outline: none; }

/* grille */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.g3 { position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer; background: #000; border-radius: 8px; }
.g3 img, .g3 video { width: 100%; height: 100%; object-fit: cover; }
.g3v { position: absolute; top: 6px; right: 8px; color: #fff; text-shadow: 0 0 4px #000; }

/* ---- clarté des conditions ---- */
.howto .how3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 10px 0; }
.howto .how3 > div { display: flex; flex-direction: column; gap: 2px; }
.ci { font-size: 1.2rem; }
.condlist { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.condrow { display: flex; gap: 12px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; }
.condsec { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; margin: 10px 0; }
.condsec summary { cursor: pointer; padding: 12px 0; font-size: .95rem; }
.condsec[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.condsec > label, .condsec > .rowform, .condsec > fieldset, .condsec > p { margin-bottom: 10px; }
.eph-close { position: fixed; top: 14px; right: 16px; z-index: 100; background: rgba(255,255,255,.15); color: #fff;
  border: 0; border-radius: 50%; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; }

/* ---- médias de chat de groupe ---- */
.gmedia { position: relative; margin: 4px 0; }
.gmedia img, .gmedia video { max-width: 260px; max-height: 320px; border-radius: 10px; display: block; }
.gmedia .phtag { position: static; display: inline-block; margin: 4px 4px 0 0; }
.ephbox { background: repeating-linear-gradient(45deg, var(--accent-soft), var(--accent-soft) 12px, var(--card) 12px, var(--card) 24px);
  border: 1px dashed var(--accent); border-radius: 10px; padding: 22px 16px; cursor: pointer;
  user-select: none; -webkit-user-select: none; font-weight: 700; text-align: center; }
.eph-overlay { position: fixed; inset: 0; z-index: 99; background: rgba(0, 0, 0, .96); display: flex;
  align-items: center; justify-content: center; user-select: none; -webkit-user-select: none; }
.eph-overlay img, .eph-overlay video { max-width: 96vw; max-height: 92vh; pointer-events: none; }
.wmtiles { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: space-around;
  justify-content: space-around; transform: rotate(-24deg) scale(1.4); pointer-events: none; }
.wmtiles span { color: rgba(255, 255, 255, .16); font-size: .8rem; font-weight: 700; white-space: nowrap; padding: 26px 18px; }
.ephrow { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.attach { cursor: pointer; }
.rowbtn { display: block; width: 100%; text-align: left; margin: 6px 0; }
.langsw { text-align: right; font-size: .85rem; }
.langsw a { color: var(--muted); font-weight: 700; }
.langsw a.on { color: var(--accent); }

/* ---- tutoriel « projecteur » ---- */
.tour-box { position: fixed; z-index: 95; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .72); transition: all .35s ease; border: 2px solid var(--accent); }
.tour-tip { position: fixed; z-index: 96; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; width: 320px; max-width: calc(100vw - 20px);
  box-shadow: var(--shadow); }
.tour-tip p { margin: 6px 0 10px; font-size: .92rem; color: var(--muted); }
.tour-acts { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
