/* Zenith Clips : page d'un clip partagé. Couleurs et police du site et du launcher de Zenith (nuit, azur, Geologica). */

@font-face {
  font-family: 'Geologica';
  src: url('/clips/geologica.woff2') format('woff2');
  font-weight: 100 900;
  font-style: oblique 0deg 12deg;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --nuit: #05070D;
  --nuit-1: #0A0F1C;
  --nuit-2: #0E1422;
  --nuit-3: #18213B;
  --nuit-l: #22304E;
  --t1: #F2F2F5;
  --t2: #A9A9B4;
  --t3: #7E8494;
  --azur: #4CB8FF;
  --azur-haut: #6FE9FF;
  --azur-bas: #2F7BFF;
  --action-haut: #2D6CF6;
  --action-bas: #1E4FD8;
  --rouge: #F87171;
  --vert: #34D399;
  --verre: rgb(255 255 255 / 5%);
  --lisere: rgb(255 255 255 / 9%);
  --police: 'Geologica', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --net: cubic-bezier(.2, .8, .2, 1);
  --marge: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--nuit); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 1rem/1.55 var(--police);
  color: var(--t1);
  background:
    radial-gradient(1100px 520px at 50% -180px, rgb(47 123 255 / 16%), transparent 70%),
    radial-gradient(700px 400px at 100% 0, rgb(111 233 255 / 6%), transparent 70%),
    var(--nuit);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--azur); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--azur); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
svg.line, svg .line, .line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.line .fill { fill: currentColor; stroke: none; }
svg.logo { width: auto; height: auto; }

/* ── Tête ── */
.top {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px var(--marge);
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--t1); text-decoration: none !important; }
.brand-name { font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
.brand-tag {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; color: var(--azur-haut);
  background: rgb(76 184 255 / 12%); border: 1px solid rgb(76 184 255 / 32%);
}
.top-cta { margin-left: auto; }

/* ── Boutons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 11px;
  font-weight: 600; font-size: .94rem; line-height: 1; white-space: nowrap;
  color: var(--t1); background: var(--verre); border: 1px solid var(--lisere);
  cursor: pointer; text-decoration: none !important;
  transition: background .18s var(--net), border-color .18s var(--net), transform .18s var(--net), box-shadow .18s var(--net);
}
.btn:hover { background: rgb(255 255 255 / 9%); border-color: rgb(255 255 255 / 18%); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--action-haut), var(--action-bas));
  border-color: rgb(111 233 255 / 28%);
  box-shadow: 0 10px 26px -12px rgb(45 108 246 / 85%), inset 0 1px 0 rgb(255 255 255 / 18%);
}
.btn-primary:hover { background: linear-gradient(180deg, #3A78FA, #2459E4); border-color: rgb(111 233 255 / 45%); }
.btn-quiet { background: transparent; }
.btn-danger { background: rgb(248 113 113 / 14%); border-color: rgb(248 113 113 / 38%); color: #FECACA; }
.btn-danger:hover { background: rgb(248 113 113 / 22%); border-color: rgb(248 113 113 / 55%); }
.btn-icon { width: 42px; padding: 0; }
.btn.done { border-color: rgb(52 211 153 / 45%); color: #BBF7D0; }
.linklike { background: none; border: 0; padding: 0; color: var(--t3); cursor: pointer; }
.linklike:hover { color: var(--t1); text-decoration: underline; }

/* ── Contenu ── */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px var(--marge) 48px;
  flex: 1;
}
.wrap.narrow { max-width: 760px; }

/* ── Lecteur ── */
.stage { display: flex; justify-content: center; }
.player {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgb(255 255 255 / 7%);
  box-shadow: 0 40px 90px -40px rgb(47 123 255 / 45%), 0 18px 40px -24px rgb(0 0 0 / 80%);
  isolation: isolate;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.player.tall { width: auto; max-width: 100%; }
.player video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
  background: #000;
  object-fit: contain;
}
.player.tall video { width: auto; height: 76vh; max-width: 100%; }
.player:fullscreen, .player:-webkit-full-screen { border-radius: 0; border: 0; width: 100%; height: 100%; max-width: none; display: flex; align-items: center; }
.player:fullscreen video, .player:-webkit-full-screen video { max-height: 100vh; height: 100%; width: 100%; }

.big-play {
  position: absolute; inset: 0; margin: auto; z-index: 2;
  width: 78px; height: 78px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: #fff; border: 1px solid rgb(255 255 255 / 22%);
  background: linear-gradient(180deg, rgb(45 108 246 / 92%), rgb(30 79 216 / 92%));
  box-shadow: 0 0 0 10px rgb(47 123 255 / 16%), 0 18px 40px -10px rgb(0 0 0 / 70%);
  transition: transform .2s var(--net), opacity .2s var(--net);
}
.big-play svg { width: 30px; height: 30px; margin-left: 4px; }
.big-play:hover { transform: scale(1.06); }
.player.playing .big-play { opacity: 0; pointer-events: none; transform: scale(.9); }

.controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 28px 14px 10px;
  background: linear-gradient(180deg, transparent, rgb(3 5 10 / 72%) 55%, rgb(3 5 10 / 88%));
  transition: opacity .25s var(--net), transform .25s var(--net);
}
.player.playing.idle .controls { opacity: 0; transform: translateY(6px); pointer-events: none; }
.player.playing.idle { cursor: none; }

.timeline { position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.tl-track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgb(255 255 255 / 18%); overflow: hidden; transition: height .15s var(--net); }
.timeline:hover .tl-track, .timeline.drag .tl-track { height: 6px; }
.tl-buffer { position: absolute; inset: 0 auto 0 0; width: 0; background: rgb(255 255 255 / 22%); }
.tl-played { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--azur-haut), var(--azur-bas)); }
.tl-knob {
  position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgb(76 184 255 / 30%); transform: scale(0); transition: transform .15s var(--net);
}
.timeline:hover .tl-knob, .timeline.drag .tl-knob, .timeline:focus-visible .tl-knob { transform: scale(1); }
.tl-tip {
  position: absolute; bottom: 22px; left: 0; transform: translateX(-50%);
  padding: 3px 7px; border-radius: 6px; font-size: .78rem; font-variant-numeric: tabular-nums;
  background: rgb(5 7 13 / 90%); border: 1px solid rgb(255 255 255 / 12%); opacity: 0; pointer-events: none; transition: opacity .12s;
}
.timeline:hover .tl-tip, .timeline.drag .tl-tip { opacity: 1; }

.bar { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.ctl {
  width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: #fff;
  display: grid; place-items: center; cursor: pointer; transition: background .15s;
}
.ctl:hover { background: rgb(255 255 255 / 12%); }
.ctl svg { width: 22px; height: 22px; }
.ctl .i-pause, .player.playing .ctl .i-play { display: none; }
.player.playing .ctl .i-pause { display: block; }
.ctl .i-muted, .player.muted .ctl .i-vol { display: none; }
.player.muted .ctl .i-muted { display: block; }
.ctl .i-exit, .player.full .ctl .i-full { display: none; }
.player.full .ctl .i-exit { display: block; }
.volume { display: flex; align-items: center; }
.vol {
  -webkit-appearance: none; appearance: none; width: 0; opacity: 0; height: 4px; border-radius: 4px; margin: 0;
  background: linear-gradient(90deg, #fff var(--v, 100%), rgb(255 255 255 / 25%) var(--v, 100%));
  transition: width .2s var(--net), opacity .2s var(--net), margin .2s var(--net); cursor: pointer;
}
.volume:hover .vol, .vol:focus-visible { width: 84px; opacity: 1; margin: 0 8px 0 2px; }
.vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
.vol::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
.time { font-size: .86rem; font-variant-numeric: tabular-nums; color: rgb(255 255 255 / 88%); padding: 0 6px; white-space: nowrap; }
.time .sep { margin: 0 5px; color: rgb(255 255 255 / 45%); }
.spacer { flex: 1; }

/* ── Infos ── */
.info { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; margin-top: 22px; }
.info-main { min-width: 0; flex: 1 1 420px; }
.info h1 { margin: 0; font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.85rem); line-height: 1.2; font-weight: 700; letter-spacing: -.015em; overflow-wrap: anywhere; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; color: var(--t2); font-size: .93rem; }
.meta svg { width: 16px; height: 16px; color: var(--t3); }
.meta .m { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--t3); }
.author { display: inline-flex; align-items: center; gap: 8px; color: var(--t1); font-weight: 600; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--azur-haut), var(--azur-bas));
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: .85rem;
  color: var(--t1); background: var(--verre); border: 1px solid var(--lisere);
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Encart Zenith ── */
.promo {
  margin-top: 34px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px 22px;
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgb(47 123 255 / 12%), rgb(255 255 255 / 3%) 55%), var(--nuit-1);
  border: 1px solid rgb(76 184 255 / 22%);
}
.promo-mark { width: 58px; height: 58px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(180deg, #1A1D26, #0A0B10); border: 1px solid rgb(255 255 255 / 8%); }
.promo h2 { margin: 0; font-size: 1.08rem; font-weight: 700; }
.promo p { margin: 4px 0 0; color: var(--t2); font-size: .94rem; }
.promo-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Préparation, erreurs, accueil ── */
.notice {
  margin-top: 6vh; text-align: center; padding: 40px 28px 34px; border-radius: 18px;
  background: rgb(255 255 255 / 3%); border: 1px solid var(--lisere);
}
.notice h1 { margin: 16px 0 8px; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); letter-spacing: -.015em; }
.notice p { margin: 0 auto 20px; max-width: 520px; color: var(--t2); }
.gone-mark { display: inline-grid; place-items: center; width: 92px; height: 92px; border-radius: 24px; background: linear-gradient(180deg, #1A1D26, #0A0B10); border: 1px solid rgb(255 255 255 / 8%); }
.spinner {
  width: 54px; height: 54px; margin: 0 auto; border-radius: 50%;
  border: 3px solid rgb(76 184 255 / 18%); border-top-color: var(--azur);
  animation: tourne 0.9s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }

/* ── Pied de page ── */
.foot {
  width: 100%; max-width: 1240px; margin: 0 auto; padding: 22px var(--marge) 30px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; color: var(--t3); font-size: .86rem;
  border-top: 1px solid rgb(255 255 255 / 5%);
}
.foot a { color: var(--t3); }
.foot a:hover { color: var(--t1); }
.foot-mark { display: inline-flex; align-items: center; gap: 7px; color: var(--t2); font-weight: 600; margin-right: auto; }

/* ── Signalement ── */
dialog.report {
  width: min(480px, calc(100vw - 32px)); padding: 0; border-radius: 18px; color: var(--t1);
  background: var(--nuit-2); border: 1px solid var(--nuit-l); box-shadow: 0 30px 80px -20px rgb(0 0 0 / 80%);
}
dialog.report::backdrop { background: rgb(3 5 10 / 70%); backdrop-filter: blur(4px); }
dialog.report form { padding: 22px 22px 18px; }
dialog.report h2 { margin: 0 0 4px; font-size: 1.15rem; }
.muted { color: var(--t3); font-size: .88rem; margin: 0 0 14px; }
.reasons { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reason { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 11px; background: var(--verre); border: 1px solid var(--lisere); cursor: pointer; font-size: .9rem; }
.reason:has(input:checked) { border-color: rgb(76 184 255 / 55%); background: rgb(76 184 255 / 10%); }
.reason input { accent-color: var(--azur); margin: 0; }
.field { display: grid; gap: 6px; font-size: .88rem; color: var(--t2); }
.field textarea { resize: vertical; min-height: 70px; padding: 10px 12px; border-radius: 11px; background: rgb(0 0 0 / 25%); border: 1px solid var(--lisere); color: var(--t1); }
.form-msg { min-height: 1.4em; margin: 10px 0 0; font-size: .88rem; color: var(--t2); }
.form-msg.ok { color: var(--vert); }
.form-msg.err { color: var(--rouge); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

/* ── Lecteur intégré (/e/…) ── */
body.embed { background: #000; min-height: 0; height: 100vh; display: block; overflow: hidden; }
body.embed video { width: 100vw; height: 100vh; object-fit: contain; display: block; background: #000; }
.embed-link { position: fixed; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: rgb(5 7 13 / 70%); border: 1px solid rgb(255 255 255 / 15%); }
.embed-link svg { width: 14px; height: 12px; }

/* ── Téléphones ── */
@media (max-width: 720px) {
  .top { padding-top: 12px; padding-bottom: 12px; }
  .top-cta { height: 36px; padding: 0 12px; font-size: .86rem; }
  .wrap { padding-left: 0; padding-right: 0; }
  .player { border-radius: 0; border-left: 0; border-right: 0; }
  .player.tall video { height: auto; max-height: 80vh; width: 100%; }
  .info, .promo, .notice { margin-left: var(--marge); margin-right: var(--marge); }
  .info { flex-direction: column; margin-top: 16px; }
  .info-main { flex: none; width: 100%; }
  .actions { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .actions .btn { padding: 0 12px; }
  .actions .btn:not(.btn-icon) { flex: 1 1 0; min-width: 0; }
  .actions .btn-icon { padding: 0; }
  .promo { grid-template-columns: auto 1fr; padding: 18px; }
  .promo-mark { align-self: start; }
  .promo-actions { grid-column: 1 / -1; }
  .promo-actions .btn { flex: 1; }
  .controls { padding: 22px 6px 4px; }
  .ctl { width: 40px; height: 40px; }
  .vol { display: none; }
  .reasons { grid-template-columns: 1fr; }
}
@media (hover: none) {
  .tl-knob { transform: scale(1); }
  .tl-track { height: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
