/* ═══════════════════════════════════════════════════
   ONE CLICK CONNECT — oneclickconnect.fr
   Concept : le site est une télévision.
   ═══════════════════════════════════════════════════ */

:root {
  --bg: #07080d;
  --bg2: #0c0e16;
  --ink: #e8ecf4;
  --ink-dim: #8a93a8;
  --phosphor: #3dff9a;          /* vert OSD */
  --phosphor-dim: rgba(61, 255, 154, .55);
  --accent: #4a7dff;
  --remote-w: 92px;
  --radius: 18px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  overflow-x: hidden;
}

.mono { font-family: var(--font-mono); }

::selection { background: var(--phosphor); color: #04140b; }

/* ── Scrollbar discrète ── */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c2233; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #2a3350; }

/* ═══════════ BOOT CRT ═══════════ */

#boot {
  position: fixed; inset: 0; z-index: 200;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 28px;
}
.boot-line {
  width: 0; height: 2px;
  background: #fff;
  box-shadow: 0 0 24px 4px rgba(255,255,255,.9), 0 0 80px 12px var(--phosphor-dim);
  animation: none;
}
.boot-label {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .5em;
  color: var(--phosphor);
  opacity: 0;
}
body.booting .boot-line { animation: crt-line 1.05s cubic-bezier(.7,0,.2,1) forwards; }
body.booting .boot-label { animation: boot-label .5s .55s forwards; }
body.booted #boot { animation: boot-out .45s .1s forwards; pointer-events: none; }
body.pre-boot main, body.pre-boot #remote, body.pre-boot #osd, body.pre-boot #osd-clock { visibility: hidden; }

@keyframes crt-line {
  0%   { width: 0; height: 2px; }
  55%  { width: 78vw; height: 2px; }
  75%  { width: 78vw; height: 2px; }
  100% { width: 110vw; height: 110vh; background: transparent; box-shadow: none; }
}
@keyframes boot-label { to { opacity: 1; } }
@keyframes boot-out { to { opacity: 0; visibility: hidden; } }

/* ═══════════ VEILLE (bouton power) ═══════════ */

#standby {
  position: fixed; inset: 0; z-index: 195;
  background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: opacity .35s, visibility .35s;
}
body.off #standby { opacity: 1; visibility: visible; }
body.off { overflow: hidden; }
.standby-led {
  width: 12px; height: 12px; border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 18px 4px rgba(255,59,48,.55);
  animation: led-breathe 2.4s ease-in-out infinite;
}
@keyframes led-breathe { 50% { opacity: .25; box-shadow: 0 0 6px 1px rgba(255,59,48,.2); } }
.standby-text {
  font-size: 13px; letter-spacing: .5em; color: #5a1f1c;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}
.standby-sub {
  font-size: 10px; letter-spacing: .28em; color: #33241f;
  animation: standby-hint 3s ease-in-out infinite;
}
@keyframes standby-hint { 50% { opacity: .3; } }

/* ═══════════ STATIQUE (canvas neige) ═══════════ */

#static {
  position: fixed; inset: 0; z-index: 150;
  width: 100vw; height: 100vh;
  opacity: 0; pointer-events: none;
  transition: opacity .12s linear;
}
#static.on { opacity: .92; }

/* ═══════════ OSD ═══════════ */

#osd {
  position: fixed; top: 28px; left: 34px; z-index: 120;
  font-family: var(--font-mono);
  color: var(--phosphor);
  text-shadow: 0 0 8px var(--phosphor-dim), 0 0 2px var(--phosphor);
  display: flex; flex-direction: column; gap: 2px;
  pointer-events: none;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .25s, transform .25s;
}
#osd.show { opacity: 1; transform: none; }
.osd-ch { font-size: clamp(20px, 2.6vw, 30px); font-weight: 600; letter-spacing: .12em; }
.osd-name { font-size: clamp(11px, 1.2vw, 13px); letter-spacing: .34em; color: var(--phosphor-dim); }

#osd-clock {
  position: fixed; top: 28px; right: calc(var(--remote-w) + 42px); z-index: 120;
  font-family: var(--font-mono); font-size: 14px; letter-spacing: .18em;
  color: var(--phosphor-dim);
  text-shadow: 0 0 8px rgba(61,255,154,.3);
  pointer-events: none;
}

/* ═══════════ TÉLÉCOMMANDE ═══════════ */

#remote {
  position: fixed; top: 50%; right: 18px; transform: translateY(-50%);
  z-index: 130;
  width: var(--remote-w);
  background: linear-gradient(160deg, #14161f, #0b0c12 60%);
  border: 1px solid #232838;
  border-radius: 24px;
  padding: 14px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
}
.remote-brand {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .3em; color: #3a4258;
}
.rc-btn {
  appearance: none; border: 1px solid #262c40; cursor: pointer;
  background: linear-gradient(180deg, #191d2b, #10131d);
  color: var(--ink-dim);
  border-radius: 12px;
  width: 64px; padding: 8px 0 7px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  transition: all .16s;
  font-family: var(--font-mono);
}
.rc-btn:hover { color: var(--ink); transform: translateY(-1px); border-color: #3d4666; }
.rc-btn:active { transform: translateY(1px); }
.rc-num { font-size: 15px; font-weight: 600; }
.rc-label { font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; }
.rc-btn.active {
  color: var(--phosphor); border-color: rgba(61,255,154,.5);
  box-shadow: 0 0 14px rgba(61,255,154,.18), inset 0 0 8px rgba(61,255,154,.07);
}
.rc-channels { display: flex; flex-direction: column; gap: 8px; }
.rc-power {
  width: 40px; height: 40px; border-radius: 50%;
  color: #ff5b5b; border-color: #3a2030;
  align-items: center; justify-content: center; padding: 0;
}
.rc-power:hover { color: #ff8080; border-color: #5c2e42; box-shadow: 0 0 16px rgba(255,91,91,.25); }
.rc-lang {
  flex-direction: row; gap: 4px; align-items: center; justify-content: center;
  width: 64px; padding: 9px 0;
  font-size: 10.5px; font-weight: 600; letter-spacing: .06em;
}
.rc-lang-sep { color: #333c55; }
.rc-lang-opt { color: #4a5473; transition: color .18s, text-shadow .18s; }
.rc-lang-opt.active { color: var(--phosphor); text-shadow: 0 0 8px rgba(61,255,154,.4); }
.rc-updown { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rc-updown-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .2em; color: #3a4258; }
.rc-arrow { width: 44px; font-size: 11px; padding: 7px 0; }

/* ═══════════ CHAÎNES (sections) ═══════════ */

.channel {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  padding: 90px calc(var(--remote-w) + 48px) 70px 34px;
}
.ch-inner { width: min(1060px, 100%); }

/* ── CH1 HERO ── */
.hero { text-align: left; }
.hero-osd-tag {
  font-size: 12px; letter-spacing: .3em; color: var(--phosphor-dim);
  margin-bottom: 34px;
}
.hero-title {
  font-size: clamp(52px, 10.5vw, 148px);
  line-height: .95; font-weight: 700; letter-spacing: -.02em;
  text-transform: uppercase;
}
.hero-title .line { display: block; }
.hero-title .accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--phosphor);
  text-shadow: 0 0 40px rgba(61,255,154,.25);
}
.cursor { animation: blink 1.1s steps(1) infinite; -webkit-text-stroke: 0; color: var(--phosphor); }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub {
  margin-top: 34px; font-size: clamp(17px, 2vw, 22px);
  color: var(--ink-dim); line-height: 1.55; max-width: 560px;
}
.hero-sub strong { color: var(--ink); font-weight: 500; }
.hero-actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-hint {
  margin-top: 54px; font-size: 11px; letter-spacing: .22em;
  color: #3f4966; text-transform: uppercase;
}

/* Bandeau défilant */
.ch-ticker {
  position: absolute; bottom: 0; left: 0; right: 0;
  border-top: 1px solid #161a28;
  background: rgba(9,10,16,.85);
  overflow: hidden; white-space: nowrap;
  padding: 12px 0;
  font-size: 12px; letter-spacing: .22em; color: #55628a;
}
.ticker-track { display: inline-flex; animation: ticker 38s linear infinite; }
.ticker-track span { flex-shrink: 0; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ── Boutons TV ── */
.btn-tv {
  appearance: none; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: #04140b; background: var(--phosphor);
  border: 1px solid var(--phosphor);
  padding: 15px 26px; border-radius: 10px;
  box-shadow: 0 0 24px rgba(61,255,154,.22);
  transition: all .18s;
}
.btn-tv:hover { transform: translateY(-2px); box-shadow: 0 6px 34px rgba(61,255,154,.38); }
.btn-tv.ghost {
  background: transparent; color: var(--ink);
  border-color: #2b3350; box-shadow: none;
}
.btn-tv.ghost:hover { border-color: var(--phosphor-dim); color: var(--phosphor); }
.btn-tv.disabled {
  background: transparent; color: #4a5473; border-color: #232a40;
  box-shadow: none; cursor: default; pointer-events: none;
  font-size: 12px;
}

/* ── CHAÎNES APPS ── */
.app-ch { background: radial-gradient(ellipse 70% 55% at 30% 45%, color-mix(in srgb, var(--app) 9%, transparent), transparent 70%); }
.app-layout {
  display: grid; grid-template-columns: 300px 1fr; gap: 70px;
  align-items: center;
}
.app-icon-wrap { position: relative; justify-self: center; }
.app-icon {
  width: 100%; max-width: 260px; height: auto;
  border-radius: 22.5%;
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  position: relative; z-index: 2;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.app-icon-wrap:hover .app-icon { transform: scale(1.04) rotate(-1.2deg); }
.app-icon-glow {
  position: absolute; inset: -12%;
  background: radial-gradient(circle, color-mix(in srgb, var(--app) 38%, transparent), transparent 65%);
  filter: blur(30px); z-index: 1;
}
.app-status {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11.5px; letter-spacing: .28em;
  padding: 8px 14px; border-radius: 7px;
  margin-bottom: 22px;
}
.app-status .dot { width: 8px; height: 8px; border-radius: 50%; }
.app-status.live { color: #ff5b6a; background: rgba(255,70,90,.08); border: 1px solid rgba(255,70,90,.25); }
.app-status.live .dot { background: #ff4444; animation: pulse 1.4s ease-in-out infinite; box-shadow: 0 0 10px #ff4444; }
.app-status.soon { color: #d9a94a; background: rgba(217,169,74,.07); border: 1px solid rgba(217,169,74,.22); }
.app-status.soon .dot { background: #d9a94a; }
@keyframes pulse { 50% { opacity: .35; } }
.app-title {
  font-size: clamp(40px, 6vw, 76px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.02;
}
.app-tag {
  margin-top: 14px; font-size: clamp(16px, 1.8vw, 21px);
  color: var(--ink-dim); max-width: 520px; line-height: 1.5;
}
.app-feats {
  margin: 28px 0 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px 26px; max-width: 560px;
}
.app-feats li {
  font-size: 13px; color: var(--ink-dim); letter-spacing: .03em;
  padding-left: 20px; position: relative;
}
.app-feats li::before {
  content: "▸"; position: absolute; left: 0;
  color: var(--app, var(--phosphor));
}
.app-actions { margin-top: 36px; }

/* ── CH5 STUDIO ── */
.studio-title {
  font-size: clamp(40px, 6vw, 72px); font-weight: 700;
  letter-spacing: -.02em; margin-bottom: 46px;
}
.studio-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.studio-card {
  background: linear-gradient(165deg, #10131d, #0a0c13);
  border: 1px solid #1b2134;
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color .25s, transform .25s;
}
.studio-card:hover { border-color: #2c3654; transform: translateY(-3px); }
.studio-card-head {
  font-size: 11px; letter-spacing: .3em; color: var(--phosphor-dim);
  margin-bottom: 14px;
}
.studio-card p { color: var(--ink-dim); line-height: 1.65; font-size: 15px; }
.studio-card p strong { color: var(--ink); font-weight: 500; }
.studio-card.contact .btn-tv { margin-top: 16px; font-size: 12px; padding: 12px 18px; text-transform: none; letter-spacing: .04em; }

/* ── Carte SOCIÉTÉ (mentions légales) ── */
.studio-card.legal { grid-column: 1 / -1; }
.legal-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 11px 26px;
  margin-top: 4px;
  font-size: 13px;
}
.legal-dl dt {
  color: var(--phosphor-dim);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  align-self: center;
}
.legal-dl dd { color: var(--ink); margin: 0; letter-spacing: .03em; }
.legal-dl dd span { color: var(--ink-dim); }
@media (max-width: 560px) {
  .legal-dl { grid-template-columns: 1fr; gap: 2px 0; }
  .legal-dl dt { margin-top: 12px; }
  .legal-dl dt:first-child { margin-top: 0; }
}

.tv-footer {
  margin-top: 70px; padding-top: 26px;
  border-top: 1px solid #161a28;
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 10.5px; letter-spacing: .24em; color: #39425e;
}
.foot-sep { color: #232a40; }

/* ═══════════ HABILLAGE CRT ═══════════ */

#crt-overlay {
  position: fixed; inset: 0; z-index: 110; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.11) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 130% 100% at 50% 50%, transparent 60%, rgba(0,0,0,.42) 100%);
  mix-blend-mode: multiply;
}

/* ═══════════ RESPONSIVE ═══════════ */

@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .app-icon { max-width: 170px; }
  .app-feats { text-align: left; margin-inline: auto; }
  .app-status { margin-inline: auto; }
  .channel { padding: 80px 26px 120px; }
  #osd-clock { right: 28px; }
}

@media (max-width: 760px) {
  /* télécommande → barre du bas, au-dessus de la safe-area iPhone */
  #remote {
    top: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    right: 50%; transform: translateX(50%);
    width: auto; max-width: calc(100vw - 16px);
    flex-direction: row; padding: 8px 12px; border-radius: 18px; gap: 8px;
    background: rgba(15, 17, 26, .92);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .remote-brand, .rc-updown, .rc-label { display: none; }
  .rc-channels { flex-direction: row; gap: 7px; }
  .rc-btn { width: 46px; min-height: 44px; padding: 0; justify-content: center; border-radius: 10px; }
  .rc-power { width: 44px; height: 44px; }
  .rc-lang { width: 54px; flex-direction: row; gap: 3px; }
  .channel { padding: 72px 20px calc(120px + env(safe-area-inset-bottom, 0px)); }
  .ch-inner { width: 100%; }
  #osd { top: calc(16px + env(safe-area-inset-top, 0px)); left: 20px; }
  #osd-clock { top: calc(16px + env(safe-area-inset-top, 0px)); }
  .hero-hint { display: none; }
  .hero-sub { margin-top: 24px; }
  .hero-actions { margin-top: 30px; }
  .hero-actions .btn-tv { width: 100%; justify-content: center; }
  .ch-ticker { bottom: 0; padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
  .app-icon { max-width: 150px; }
  .app-icon-glow { filter: blur(22px); }
  .app-feats { grid-template-columns: 1fr; gap: 9px; }
  .studio-grid { gap: 12px; }
  .studio-card { padding: 22px 20px; }
  .tv-footer { margin-top: 44px; justify-content: center; text-align: center; }

  /* GPU mobile : scanlines simples, sans mix-blend-mode ni vignette radiale */
  #crt-overlay {
    background: repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 1px, transparent 1px 3px);
    mix-blend-mode: normal;
  }
}

/* Tactile : pas d'effets hover persistants */
@media (hover: none) {
  .rc-btn:hover, .btn-tv:hover, .studio-card:hover { transform: none; }
  .app-icon-wrap:hover .app-icon { transform: none; }
  .rc-btn:active { transform: scale(.94); }
  .btn-tv:active { transform: scale(.97); }
}

/* Desktop : zapping aimanté façon chaînes */
@media (min-width: 761px) {
  html { scroll-snap-type: y proximity; }
  .channel { scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
