/* Pingly — page d'accueil publique (visiteurs non connectés) */
html, body { overflow: auto; height: auto; }
body.landing {
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(0,180,180,0.18), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(255,153,68,0.12), transparent 70%),
    var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.55;
}
.landing a { color: var(--accent); }
.landing code { font-family: var(--font-mono); font-size: 17px; color: var(--text-nick); }

/* ── Barre du haut ── */
.lp-nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, calc((100% - 1120px) / 2));
  background: rgba(13,13,26,0.82); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(42,42,90,0.6);
}
.lp-brand {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--font-mono); font-size: 32px; letter-spacing: 2px; color: var(--accent) !important; line-height: 1;
}
.lp-brand em { color: var(--text-nick); font-style: normal; }
.lp-nav nav { display: flex; align-items: center; gap: 14px; }
.lp-nav-link { color: var(--text-main) !important; text-decoration: none; font-weight: 700; font-size: 14px; }
.lp-nav-link:hover { color: var(--accent) !important; }

/* ── Boutons ── */
.lp-btn {
  display: inline-block; text-decoration: none; font-weight: 800; font-size: 16px;
  padding: 13px 22px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #0a8fbf); color: #fff !important;
  box-shadow: 0 8px 24px rgba(0,180,180,0.28);
  transition: transform .15s, box-shadow .15s;
}
.lp-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,180,180,0.38); }
.lp-btn-ghost { background: transparent; border: 2px solid var(--border-light); box-shadow: none; color: var(--text-main) !important; }
.lp-btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.lp-btn-small { padding: 8px 16px; font-size: 14px; }
.lp-btn-big { font-size: 19px; padding: 16px 30px; }

/* ── Accroche ── */
.lp-hero {
  max-width: 1120px; margin: 0 auto; padding: 64px 16px 40px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
}
.lp-irc { font-family: var(--font-mono); font-size: 20px; color: var(--text-system); opacity: .85; }
.lp-hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.08; margin: 10px 0 18px; font-weight: 800; }
.lp-hero h1 span {
  background: linear-gradient(90deg, var(--accent), var(--text-nick));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-lead { font-size: 18px; color: #b8b8e0; max-width: 520px; margin: 0 0 26px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-online { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 15px; color: var(--text-main); }
.lp-online b { color: var(--accent); font-size: 17px; }
.lp-online i { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.lp-online i.on { background: #22dd66; box-shadow: 0 0 0 0 rgba(34,221,102,0.6); animation: lp-pulse 2s infinite; }
@keyframes lp-pulse { 70% { box-shadow: 0 0 0 8px rgba(34,221,102,0); } 100% { box-shadow: 0 0 0 0 rgba(34,221,102,0); } }
.lp-free { margin-top: 12px; font-size: 13px; color: var(--text-muted); font-weight: 700; }

/* ── Fausse conversation ── */
.lp-demo { position: relative; }
.lp-window {
  background: var(--bg-app); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55); overflow: hidden;
  transform: rotate(-1.2deg);
}
.lp-titlebar {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: var(--bg-sidebar); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-muted);
}
.lp-titlebar .dots { display: flex; gap: 5px; }
.lp-titlebar .dots i { width: 10px; height: 10px; border-radius: 50%; display: block; background: #ff5f57; }
.lp-titlebar .dots i:nth-child(2) { background: #febc2e; }
.lp-titlebar .dots i:nth-child(3) { background: #28c840; }
.lp-chat { background: var(--bg-chat); padding: 16px 14px 18px; display: flex; flex-direction: column; gap: 9px; min-height: 340px; }
.lp-sys { font-family: var(--font-mono); font-size: 16px; color: var(--text-system); text-align: center; }
.lp-msg {
  max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: 14px;
  background: var(--bg-bubble-them); align-self: flex-start;
}
.lp-msg.me { background: var(--bg-bubble-me); align-self: flex-end; }
.lp-msg b { display: block; font-size: 11px; margin-bottom: 1px; }
.n1 { color: var(--text-nick); } .n2 { color: #ff66cc; }
.c-red { color: #ff4444; } .c-orange { color: #ff9900; } .c-yellow { color: #ffdd00; } .c-green { color: #33dd55; } .c-blue { color: #44aaff; }
.lp-msg .c-red, .lp-msg .c-orange, .lp-msg .c-yellow, .lp-msg .c-green, .lp-msg .c-blue { font-weight: 800; }
.lp-bot {
  align-self: flex-start; font-size: 13px; padding: 8px 12px; border-radius: 12px;
  background: rgba(0,180,180,0.12); border: 1px solid rgba(0,180,180,0.4);
}
.lp-bot b { color: var(--accent); margin-right: 4px; }
.lp-nudge { align-self: center; font-size: 13px; font-weight: 700; color: var(--away); }
.lp-typing { font-size: 12px; color: var(--text-muted); font-style: italic; display: flex; align-items: center; gap: 3px; }
.lp-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted); display: inline-block; animation: lp-dot 1.2s infinite; }
.lp-typing i:nth-child(2) { animation-delay: .2s; } .lp-typing i:nth-child(3) { animation-delay: .4s; margin-right: 5px; }

/* Les messages apparaissent un à un (--d = ordre), puis la scène recommence */
.lp-chat > [style*="--d"] { opacity: 0; animation: lp-in 16s infinite; animation-delay: calc(var(--d) * 1.1s); }
.lp-demo:has(.lp-nudge) .lp-window { animation: lp-window-shake 16s infinite; }
@keyframes lp-in {
  0%   { opacity: 0; transform: translateY(8px); }
  3%   { opacity: 1; transform: none; }
  88%  { opacity: 1; }
  95%, 100% { opacity: 0; }
}
@keyframes lp-window-shake {
  0%, 34%, 38%, 100% { transform: rotate(-1.2deg); }
  35% { transform: rotate(-1.2deg) translateX(-7px); }
  36% { transform: rotate(-1.2deg) translateX(7px); }
  37% { transform: rotate(-1.2deg) translateX(-4px); }
}
@keyframes lp-dot { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.lp-contacts {
  position: absolute; right: -14px; bottom: -34px; width: 200px;
  background: var(--bg-sidebar); border: 1px solid var(--border-light); border-radius: var(--radius-md);
  padding: 10px 12px; box-shadow: 0 16px 40px rgba(0,0,0,0.5); transform: rotate(2deg); font-size: 13px;
}
.lp-ctitle { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; font-weight: 800; }
.lp-contact { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; white-space: nowrap; overflow: hidden; }
.lp-contact small { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.lp-contact i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.lp-contact i.on { background: var(--green); } .lp-contact i.away { background: var(--away); } .lp-contact i.busy { background: var(--red); }

/* ── Sections ── */
.lp-section { max-width: 1120px; margin: 0 auto; padding: 56px 16px; }
.lp-section h2 { font-size: clamp(26px, 3.4vw, 36px); text-align: center; margin: 0 0 30px; font-weight: 800; }
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-card {
  background: rgba(26,26,46,0.75); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; transition: border-color .2s, transform .2s;
}
.lp-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.lp-card h3 { margin: 10px 0 6px; font-size: 18px; }
.lp-card p { margin: 0; color: #b0b0d8; font-size: 14.5px; }
.lp-ico {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: rgba(0,180,180,0.14); color: var(--accent); font-weight: 800;
}
.lp-ico.big { width: 64px; height: 64px; font-size: 32px; flex-shrink: 0; }

.lp-privacy-box {
  display: flex; gap: 24px; align-items: flex-start;
  background: linear-gradient(135deg, rgba(0,180,180,0.12), rgba(255,153,68,0.08));
  border: 1px solid rgba(0,180,180,0.35); border-radius: var(--radius-lg); padding: 30px;
}
.lp-privacy-box h2 { text-align: left; margin: 0 0 10px; }
.lp-privacy-box p { margin: 0 0 12px; color: #c0c0e4; }

.lp-final { text-align: center; padding-bottom: 72px; }
.lp-hint { color: var(--text-muted); font-size: 14px; margin-top: 16px; }

.lp-footer {
  border-top: 1px solid var(--border); padding: 22px max(16px, calc((100% - 1120px) / 2));
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-muted);
}
.lp-footer > div { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.lp-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.lp-footer a { color: var(--text-muted); text-decoration: none; }
.lp-footer a:hover { color: var(--accent); }

/* ── Tablette et téléphone ── */
@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .lp-demo { max-width: 460px; margin: 0 auto 30px; width: 100%; }
  .lp-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .lp-nav-link { display: none; }
  .lp-brand { font-size: 26px; }
  .lp-grid { grid-template-columns: 1fr; }
  .lp-cta { flex-direction: column; }
  .lp-cta .lp-btn { text-align: center; }
  .lp-contacts { right: 6px; width: 170px; bottom: -40px; }
  .lp-privacy-box { flex-direction: column; padding: 22px; gap: 14px; }
  .lp-lead { font-size: 16px; }
}

/* Pas d'animation pour qui préfère moins de mouvement */
@media (prefers-reduced-motion: reduce) {
  .lp-chat > [style*="--d"] { opacity: 1; animation: none; }
  .lp-demo .lp-window, .lp-typing i, .lp-online i.on { animation: none !important; }
  .lp-btn, .lp-card { transition: none; }
}
