/* ============================================================
   OSIA SITE - Style commun toutes les pages
   Direction : Neo-futuriste / Cyberpunk
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Major+Mono+Display&family=JetBrains+Mono:wght@400;500;700&family=Orbitron:wght@400;700;900&display=swap');

:root {
  /* Palette */
  --bg-deep: #050510;
  --bg-card: rgba(15, 15, 30, 0.6);
  --border-glow: rgba(0, 240, 255, 0.3);
  --text-main: #e8e8f5;
  --text-dim: #8888a8;

  /* Néons */
  --neon-cyan: #00f0ff;
  --neon-magenta: #ff00f5;
  --neon-lime: #b8ff00;
  --neon-violet: #9d4edd;

  /* Glows */
  --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.6), 0 0 40px rgba(0, 240, 255, 0.3);
  --glow-magenta: 0 0 20px rgba(255, 0, 245, 0.6), 0 0 40px rgba(255, 0, 245, 0.3);

  /* Typo */
  --font-display: 'Orbitron', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-accent: 'Major Mono Display', monospace;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ========== BACKGROUND : grille + nébuleuse ========== */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 0, 245, 0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 240, 255, 0.15), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(157, 78, 221, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black, transparent 80%);
}

/* ========== NAVBAR ========== */

.osia-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border-glow);
  backdrop-filter: blur(10px);
  background: rgba(5, 5, 16, 0.5);
}

.osia-logo {
  font-family: var(--font-accent);
  font-size: 22px;
  letter-spacing: 4px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.osia-logo .dot {
  color: var(--neon-lime);
  -webkit-text-fill-color: var(--neon-lime);
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.25s ease;
}

.nav-links a:hover {
  color: var(--neon-cyan);
  border-color: var(--border-glow);
  text-shadow: 0 0 10px var(--neon-cyan);
}

.nav-links a.active {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.05);
  text-shadow: 0 0 10px var(--neon-cyan);
}

/* ========== MAIN CONTENT ========== */

.osia-main {
  flex: 1;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 40px;
  overflow-y: auto;
}

/* ========== HERO (page 1) ========== */

.hero {
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero-text .tag {
  display: inline-block;
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--neon-lime);
  border: 1px solid var(--neon-lime);
  border-radius: 100px;
  margin-bottom: 24px;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s ease forwards;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 60px;
  line-height: 1;
  margin-bottom: 18px;
  letter-spacing: -2px;
  opacity: 0;
  animation: fadeUp 0.8s 0.25s ease forwards;
}

.hero-text h1 .accent {
  display: block;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 25px rgba(0, 240, 255, 0.5));
}

.hero-text .baseline {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 32px;
  max-width: 460px;
  opacity: 0;
  animation: fadeUp 0.8s 0.45s ease forwards;
}

.hero-cta {
  display: flex;
  gap: 14px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s ease forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-violet));
  color: #050510;
  font-weight: 700;
  box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.9), 0 0 60px rgba(0, 240, 255, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-glow);
}

.btn-ghost:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
}

/* ========== HERO RIGHT : terminal/widget ========== */

.hero-visual {
  position: relative;
  opacity: 0;
  animation: fadeUp 1s 0.5s ease forwards;
}

.terminal {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.15);
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(0, 240, 255, 0.05);
  border-bottom: 1px solid var(--border-glow);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.term-dot.r { background: #ff5f57; }
.term-dot.y { background: #febc2e; }
.term-dot.g { background: #28c840; }

.terminal-head .term-title {
  margin-left: 12px;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 2px;
}

.terminal-body {
  padding: 22px;
  font-size: 13px;
  line-height: 1.9;
  min-height: 280px;
}

.term-line {
  display: flex;
  gap: 10px;
  opacity: 0;
  animation: typeIn 0.4s ease forwards;
}

.term-line:nth-child(1) { animation-delay: 0.8s; }
.term-line:nth-child(2) { animation-delay: 1.2s; }
.term-line:nth-child(3) { animation-delay: 1.6s; }
.term-line:nth-child(4) { animation-delay: 2.0s; }
.term-line:nth-child(5) { animation-delay: 2.4s; }
.term-line:nth-child(6) { animation-delay: 2.8s; }

.term-prompt {
  color: var(--neon-lime);
}

.term-cmd {
  color: var(--text-main);
}

.term-out {
  color: var(--text-dim);
  padding-left: 18px;
}

.term-ok {
  color: var(--neon-cyan);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--neon-cyan);
  margin-left: 4px;
  animation: blink 1s steps(2) infinite;
  vertical-align: middle;
}

/* ========== FOOTER : navigation pages ========== */

.osia-foot {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  border-top: 1px solid var(--border-glow);
  backdrop-filter: blur(10px);
  background: rgba(5, 5, 16, 0.5);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-dim);
}

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

.page-indicator .current {
  color: var(--neon-cyan);
}

.foot-nav {
  display: flex;
  gap: 10px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 4px;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

.foot-nav a:hover {
  color: var(--neon-cyan);
  border-color: var(--border-glow);
  background: rgba(0, 240, 255, 0.05);
}

.foot-nav a.next {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.foot-nav a.next:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: var(--glow-cyan);
}

/* ========== CHATBOT (présent toutes les pages) ========== */

.chatbot-toggle {
  position: fixed;
  bottom: 80px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
  border: none;
  cursor: pointer;
  box-shadow: var(--glow-cyan);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #050510;
  transition: transform 0.3s ease;
  animation: pulse 3s infinite ease-in-out;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
}

.chatbot-toggle.open { transform: rotate(45deg); }

.chatbot-window {
  position: fixed;
  bottom: 155px;
  right: 30px;
  width: 360px;
  height: 480px;
  background: rgba(15, 15, 30, 0.95);
  border: 1px solid var(--neon-cyan);
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.4);
  backdrop-filter: blur(20px);
  z-index: 99;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-window.open { display: flex; }

.chat-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-glow);
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.1), rgba(255, 0, 245, 0.1));
}

.chat-head .title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--neon-cyan);
}

.chat-head .status {
  font-size: 10px;
  color: var(--neon-lime);
  letter-spacing: 2px;
  margin-top: 2px;
}

.chat-head .status::before {
  content: "● ";
  animation: blink 2s infinite;
}

.chat-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 12px;
}

.chat-msg.bot {
  align-self: flex-start;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-glow);
  border-bottom-left-radius: 2px;
}

.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-violet));
  color: #050510;
  border-bottom-right-radius: 2px;
  font-weight: 500;
}

.chat-suggests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 12px;
}

.chat-suggest {
  font-size: 11px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border-glow);
  color: var(--text-dim);
  border-radius: 100px;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.chat-suggest:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.05);
}

.chat-input-wrap {
  display: flex;
  border-top: 1px solid var(--border-glow);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 14px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
}

.chat-input::placeholder {
  color: var(--text-dim);
}

.chat-send {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
  border: none;
  color: #050510;
  padding: 0 20px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
}

/* ========== ANIMATIONS ========== */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes typeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.6), 0 0 40px rgba(0, 240, 255, 0.3); }
  50% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.9), 0 0 60px rgba(255, 0, 245, 0.4); }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 900px) {
  html, body { overflow: auto; }
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .hero-text h1 { font-size: 42px; }
  .osia-nav, .osia-foot, .osia-main { padding-left: 20px; padding-right: 20px; }
  .nav-links { display: none; }
  .chatbot-window { width: calc(100vw - 30px); right: 15px; }
}
