/* ============================================================
   retr0DVE — shared.css
   Palettes, composants et utilitaires partagés entre toutes les pages
   ============================================================ */

:root {
  --ink: #000000;
  --ink-soft: #0a0a0a;
  --ink-2: #141410;
  --sand: #F5F5DC;
  --sand-dim: #c8c8a8;
  --sand-faint: #6e6e58;
  --sand-line: rgba(245,245,220,0.18);
  --shadow-sand: 4px 4px 0 0 var(--sand);
  --shadow-sand-lg: 6px 6px 0 0 var(--sand);
}

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

html, body {
  background: var(--ink);
  color: var(--sand);
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* CRT scanline overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(245,245,220,0.025) 0 1px, transparent 1px 3px);
  z-index: 9999;
  mix-blend-mode: screen;
}
/* Subtle vignette */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
  z-index: 9998;
}

.pixel { font-family: 'VT323', 'Courier New', monospace; letter-spacing: 0.02em; }
.mono  { font-family: 'JetBrains Mono', 'Courier New', monospace; }
.serif { font-family: 'Instrument Serif', Georgia, serif; }

::selection { background: var(--sand); color: var(--ink); }

/* ---------- TOP MENU BAR ---------- */
.menubar {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1.5px solid var(--sand);
  background: var(--ink);
  display: flex; align-items: center;
  padding: 0 32px;
  height: 54px;
  font-family: 'VT323', monospace;
  font-size: 24px;
  color: var(--sand);
  gap: 0;
}
.menubar .brand {
  font-weight: 700;
  margin-right: 36px;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--sand);
  flex-shrink: 0;
  font-size: 26px;
}
.menubar .nav-items {
  display: flex;
  gap: 4px;
  flex: 1;
}
.menubar .nav-items a {
  color: var(--sand);
  text-decoration: none;
  padding: 6px 16px;
  transition: background 0.1s;
  cursor: pointer;
  white-space: nowrap;
}
.menubar .nav-items a:hover,
.menubar .nav-items a.active { background: var(--sand); color: var(--ink); }
.menubar .nav-cta {
  margin-left: auto;
  display: flex; align-items: center;
  flex-shrink: 0;
}
.menubar .nav-cta a {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--sand);
  background: var(--sand);
  color: var(--ink);
  padding: 8px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.1s;
  cursor: pointer;
}
.menubar .nav-cta a:hover { background: var(--ink); color: var(--sand); }
.menubar .clock { margin-left: 20px; opacity: 0.75; font-size: 15px; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.05em; flex-shrink: 0; }

@media (max-width: 768px) {
  .menubar .nav-items a:not(.mobile-show) { display: none; }
  .menubar .nav-items .mobile-show { display: inline; }
  .menubar .clock { display: none; }
}

/* ---------- WINDOW TITLEBAR COMPONENT ---------- */
.win-titlebar {
  background: var(--sand);
  color: var(--ink);
  padding: 6px 8px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'VT323', monospace;
  font-size: 16px;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.win-titlebar .controls { display: flex; gap: 4px; }
.win-titlebar .controls span {
  width: 18px; height: 16px;
  border: 1.5px solid var(--ink);
  background: var(--sand);
  color: var(--ink);
  display: grid; place-items: center;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  cursor: pointer;
}
.win-titlebar .controls span:hover { background: var(--ink); color: var(--sand); }

/* ---------- PIXEL BUTTON ---------- */
.pixel-btn {
  border: 1.5px solid var(--sand);
  background: var(--ink);
  color: var(--sand);
  padding: 5px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 2px 2px 0 0 var(--sand);
  transition: all 0.08s;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.pixel-btn:hover { transform: translate(1px, 1px); box-shadow: 1px 1px 0 0 var(--sand); }
.pixel-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 0 var(--sand); }
.pixel-btn.primary { background: var(--sand); color: var(--ink); }
.pixel-btn.invert  { background: var(--sand); color: var(--ink); }
.pixel-btn.ghost   { background: transparent; color: var(--sand); }

/* ---------- SECTION HEADER ---------- */
.section-head {
  padding: 80px 56px 32px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--sand-line);
}
.section-head .lhs { display: flex; align-items: flex-end; gap: 18px; }
.section-head .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  border: 1.5px solid var(--sand);
  padding: 4px 8px;
  transform: translateY(-8px);
  color: var(--sand);
}
.section-head h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.015em;
  color: var(--sand);
}
.section-head h2 em { font-style: italic; }
.section-head .rhs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: right;
  max-width: 320px;
  line-height: 1.7;
  color: var(--sand-dim);
}

/* ---------- DIVIDER MARQUEE ---------- */
.divider-marquee {
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
  background: var(--ink);
  overflow: hidden;
  height: 40px;
  display: flex; align-items: center;
}
.marquee-track {
  display: flex;
  animation: scroll 38s linear infinite;
  white-space: nowrap;
  font-family: 'VT323', monospace;
  font-size: 19px;
  letter-spacing: 0.18em;
  color: var(--sand);
}
.marquee-track span {
  padding: 0 24px;
  display: inline-flex; align-items: center; gap: 24px;
}
.marquee-track span::after {
  content: "◆";
  font-size: 11px;
  margin-left: 24px;
  color: var(--sand);
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- BREAKING BAR ---------- */
.breaking-bar {
  border-top: 1.5px solid var(--sand);
  border-bottom: 1.5px solid var(--sand);
  background: var(--ink);
  color: var(--sand);
  height: 56px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.breaking-bar .label {
  background: var(--sand);
  color: var(--ink);
  padding: 0 22px;
  display: flex; align-items: center; gap: 10px;
  font-family: 'VT323', monospace;
  font-size: 22px;
  letter-spacing: 0.05em;
  border-right: 1.5px solid var(--sand);
  flex-shrink: 0;
  font-weight: 700;
}
.breaking-bar .label .red-dot {
  width: 10px; height: 10px;
  background: var(--ink);
  border: 1.5px solid var(--ink);
  animation: blink 1.2s ease-in-out infinite;
}
.breaking-bar .ticker {
  flex: 1;
  display: flex; align-items: center;
  overflow: hidden;
}
.ticker-track {
  display: flex;
  gap: 48px;
  animation: scroll 60s linear infinite;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  padding-left: 24px;
  color: var(--sand);
}
.ticker-track .item { display: inline-flex; align-items: center; gap: 14px; }
.ticker-track .item::before { content: "▸"; color: var(--sand); opacity: 0.6; }
.ticker-track .item .src {
  border: 1px solid var(--sand);
  color: var(--sand);
  padding: 2px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 4px;
}

/* ---------- TASKBAR FOOTER ---------- */
.taskbar {
  border-top: 1.5px solid var(--sand);
  background: var(--ink);
  height: 44px;
  display: flex; align-items: center;
  padding: 0 12px;
  gap: 8px;
}
.start-btn {
  border: 1.5px solid var(--sand);
  background: var(--sand);
  color: var(--ink);
  padding: 4px 12px 4px 8px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'VT323', monospace;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 0 var(--sand);
  transition: all 0.08s;
  text-decoration: none;
  border: 1.5px solid var(--sand);
}
.start-btn:hover { transform: translate(1px,1px); box-shadow: 1px 1px 0 0 var(--sand); }
.start-btn .blk {
  width: 14px; height: 14px;
  background: var(--ink);
  display: inline-block;
  position: relative;
}
.start-btn .blk::after { content: ""; position: absolute; inset: 3px; background: var(--sand); }
.task-pill {
  border: 1.5px solid var(--sand);
  background: var(--ink);
  color: var(--sand);
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
  text-decoration: none;
}
.task-pill:hover, .task-pill.active { background: var(--sand); color: var(--ink); }
.tray {
  margin-left: auto;
  display: flex; align-items: center; gap: 14px;
  border-left: 1.5px solid var(--sand);
  padding-left: 16px;
  height: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--sand);
}
.battery { display: inline-flex; align-items: center; gap: 3px; }
.battery .body { width: 22px; height: 11px; border: 1.5px solid var(--sand); padding: 1px; display: flex; }
.battery .body span { flex: 1; background: var(--sand); margin-right: 1px; }
.battery .body span:last-child { margin-right: 0; }
.battery .tip { width: 2px; height: 6px; background: var(--sand); }
.domain-pill {
  font-family: 'VT323', monospace;
  font-size: 17px;
  background: var(--sand);
  color: var(--ink);
  padding: 2px 10px;
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* ---------- CTA WINDOW ---------- */
.cta-section { padding: 0 56px 72px; }
.cta-window {
  border: 1.5px solid var(--sand);
  background: var(--ink);
  color: var(--sand);
  box-shadow: var(--shadow-sand-lg);
  overflow: hidden;
}
.cta-body {
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: center;
}
.cta-body h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(48px, 6vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--sand);
}
.cta-body h2 em { font-style: italic; }
.cta-buttons { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; grid-column: 1 / -1; }
.ascii {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.3;
  white-space: pre;
  color: var(--sand);
  opacity: 0.75;
}

/* ---------- DOT GRID DECORATION ---------- */
.dot-grid {
  width: 100%; height: 80px;
  background-image: radial-gradient(var(--sand) 1px, transparent 1.5px);
  background-size: 14px 14px;
  opacity: 0.25;
}

/* ---------- PHOTO WINDOW (fw) ---------- */
.fw-titlebar {
  background: var(--sand);
  color: var(--ink);
  padding: 5px 8px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'VT323', monospace;
  font-size: 14px;
  font-weight: 700;
}
.fw-titlebar .path { display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; }
.fw-titlebar .ico { width: 12px; height: 10px; border: 1px solid var(--ink); border-top: 3px solid var(--ink); flex-shrink:0; }
.fw-titlebar .ctrl {
  display: inline-block; width: 16px; height: 14px;
  border: 1.5px solid var(--ink);
  text-align: center; line-height: 11px;
  font-size: 10px; margin-left: 3px;
}
.fw-toolbar {
  border-bottom: 1px solid var(--sand);
  padding: 4px 8px;
  display: flex; gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  background: var(--ink); color: var(--sand-dim);
}
.fw-toolbar span { cursor: pointer; }
.fw-toolbar span:hover { color: var(--sand); text-decoration: underline; }

.fw-image {
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--sand);
  position: relative;
  overflow: hidden;
  background: #0a0a08;
}
.fw-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05) brightness(0.95);
  transition: transform 0.4s ease;
}
.fw-image:hover img { transform: scale(1.03); }
.fw-image .corner {
  position: absolute; top: 8px; left: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  background: var(--ink); border: 1px solid var(--sand);
  color: var(--sand); padding: 2px 5px; z-index: 3;
}
.fw-image .corner.tr { left: auto; right: 8px; }
.fw-image .scan-overlay {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(245,245,220,0.04) 0 1px, transparent 1px 3px);
  z-index: 2; pointer-events: none; mix-blend-mode: screen;
}
.fw-image .ph-tag {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(0,0,0,0.85); color: var(--sand);
  border: 1px solid var(--sand);
  padding: 3px 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  font-weight: 700; z-index: 3; letter-spacing: 0.05em;
}
.fw-meta {
  padding: 10px 12px 6px;
  display: flex; flex-direction: column; gap: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--sand);
}
.fw-meta .row { display: flex; justify-content: space-between; align-items: center; }
.fw-meta .name { font-weight: 700; }
.fw-meta .size { opacity: 0.6; }
.fw-meta .filepath { font-size: 9.5px; color: var(--sand-dim); letter-spacing: 0.02em; word-break: break-all; line-height: 1.4; margin-top: 2px; }
.fw-statusbar {
  border-top: 1px solid var(--sand); padding: 4px 10px;
  background: var(--ink); color: var(--sand);
  font-family: 'VT323', monospace; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.pixel-progress {
  height: 9px; border: 1.5px solid var(--sand); background: var(--ink);
  display: flex; overflow: hidden; flex: 1;
}
.pixel-progress div {
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--sand) 0 5px, var(--ink) 5px 7px);
}

/* ---------- PRICING WINDOWS ---------- */
.price-window {
  border: 1.5px solid var(--sand); background: var(--ink);
  box-shadow: var(--shadow-sand-lg);
  display: flex; flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.price-window:hover { transform: translate(-3px,-3px); box-shadow: 9px 9px 0 0 var(--sand); }
.price-window.featured { border-width: 2px; }
.price-window.featured::before {
  content: ""; position: absolute; inset: -1px;
  border: 1.5px solid var(--sand); pointer-events: none;
  transform: translate(4px, 4px);
}
.price-badge {
  position: absolute; top: -12px; right: 18px;
  background: var(--sand); color: var(--ink);
  border: 1.5px solid var(--sand); padding: 3px 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  font-weight: 700; letter-spacing: 0.12em; z-index: 5;
}
.price-preview {
  aspect-ratio: 16/10; border-bottom: 1px solid var(--sand);
  position: relative; overflow: hidden; background: #0a0a08;
}
.price-preview img { width:100%; height:100%; object-fit:cover; filter:contrast(1.05) brightness(0.9); }
.price-meta {
  padding: 8px 14px; border-bottom: 1px solid var(--sand); background: var(--ink);
}
.price-meta .filepath {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px;
  color: var(--sand-dim); letter-spacing: 0.02em; word-break: break-all;
}
.price-content { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.price-tag-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.price-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--sand-dim); }
.price-amount { font-family: 'Instrument Serif', serif; font-size: 56px; line-height: 1; color: var(--sand); }
.price-amount .cur { font-size: 28px; margin-left: 2px; vertical-align: top; }
.price-name { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--sand); margin-bottom: 12px; }
.price-name em { font-style: italic; }
.price-desc { font-family: 'Inter', sans-serif; font-size: 13px; line-height: 1.55; color: var(--sand); opacity: 0.85; margin-bottom: 18px; }
.price-list { list-style: none; padding: 14px 0; margin-bottom: 22px; border-top: 1px solid var(--sand-line); border-bottom: 1px solid var(--sand-line); flex: 1; }
.price-list li { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--sand); padding: 4px 0 4px 18px; position: relative; line-height: 1.5; }
.price-list li::before { content: "▸"; position: absolute; left: 0; color: var(--sand); }
.price-cta {
  border: 1.5px solid var(--sand); background: var(--ink); color: var(--sand);
  padding: 12px 14px; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  cursor: pointer; box-shadow: 3px 3px 0 0 var(--sand); transition: all 0.1s;
  display: flex; justify-content: space-between; align-items: center;
  text-decoration: none;
}
.price-cta:hover { transform: translate(1.5px,1.5px); box-shadow: 1.5px 1.5px 0 0 var(--sand); }
.price-cta.primary { background: var(--sand); color: var(--ink); }
.pricing-footnote {
  margin-top: 32px; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--sand-dim); letter-spacing: 0.08em; text-transform: uppercase;
  border-top: 1px solid var(--sand-line); padding-top: 22px;
}

/* ---------- ANIMS ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes floatPulse {
  0%, 100% { box-shadow: 6px 6px 0 0 var(--sand); }
  50% { box-shadow: 4px 4px 0 0 var(--sand), 0 0 0 3px rgba(245,245,220,0.15); }
}
@keyframes popupShake {
  0%, 92%, 100% { transform: translate(0,0); }
  93% { transform: translate(-2px, 1px); }
  95% { transform: translate(2px, -1px); }
  97% { transform: translate(-1px, 1px); }
}

/* ---------- MOBILE HAMBURGER MENU ---------- */
.mob-menu-btn {
  display: none;
  margin-left: auto;
  border: 1.5px solid var(--sand);
  background: var(--ink);
  color: var(--sand);
  font-family: 'VT323', monospace;
  font-size: 30px;
  padding: 0 12px;
  height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.mob-nav {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 54px; left: 0; right: 0;
  background: var(--ink);
  border-bottom: 2px solid var(--sand);
  z-index: 99;
}
.mob-nav.open { display: flex; }
.mob-nav a {
  color: var(--sand);
  text-decoration: none;
  font-family: 'VT323', monospace;
  font-size: 30px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(245,245,220,0.15);
  display: flex; align-items: center; gap: 12px;
  letter-spacing: 0.05em;
  transition: background 0.1s;
}
.mob-nav a:hover { background: rgba(245,245,220,0.07); }
.mob-nav a.mob-cta {
  margin: 12px 16px 16px;
  border: 1.5px solid var(--sand);
  background: var(--sand);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  justify-content: center;
  padding: 14px;
  box-shadow: 3px 3px 0 0 rgba(245,245,220,0.4);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .cta-body { grid-template-columns: 1fr; }
  .section-head { padding: 48px 24px 24px; }
  .cta-section, .pricing-section, .diagnostic-section,
  .method-strip, .desktop-section, .portfolio-stage-wrap { padding-left: 24px; padding-right: 24px; }
  header.hero { padding: 24px; }
  .hero-grid { padding: 24px 24px 48px; grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  /* Menubar mobile */
  .menubar { padding: 0 14px; }
  .menubar .brand { margin-right: 0; font-size: 22px; }
  .menubar .nav-items { display: none !important; }
  .menubar .nav-cta { display: none; }
  .menubar .clock { display: none; }
  .mob-menu-btn { display: flex; }

  /* Taskbar mobile */
  .taskbar { padding: 0 8px; gap: 6px; }
  .task-pill { display: none; }
  .start-btn { font-size: 15px; padding: 4px 8px 4px 6px; }
  .tray { padding-left: 8px; gap: 8px; }
  .domain-pill { font-size: 14px; padding: 2px 6px; }
  .battery { display: none; }
}
@media (max-width: 700px) {
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head .rhs { text-align: left; }
}
