/* ==========================================================================
   Lines & Layers — Global Styles
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #101616;
  --surface: #1a1a1a;
  --text: #f5f5f5;

  --accent-1: #c39e6b; /* copper */
  --accent-2: #a07e50; /* bronze */

  --text-muted: rgba(245, 245, 245, 0.65);
  --text-dim: rgba(245, 245, 245, 0.4);

  --border: rgba(255, 255, 255, 0.10);
  --shadow-accent: rgba(195, 158, 107, 0.28);

  --radius-sm: 8px;
  --radius-md: 12px;

  --container: 980px;

  --space-1: 0.5rem;
  --space-2: 0.8rem;
  --space-3: 1.2rem;
  --space-4: 2rem;

  --font: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
          "Apple Color Emoji", "Segoe UI Emoji";
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: auto; /* ✅ scroll normal */
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  overflow-x: hidden; /* ✅ pas de scroll horizontal */
}

/* Images / media */
img, svg, video, canvas {
  display: block;
  max-width: 100%;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Forms */
input, button, textarea, select {
  font: inherit;
}

/* ---------- Background canvas (particles) ---------- */
#bg,
canvas.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* ---------- Layout helpers ---------- */
.container {
  width: min(var(--container), 92vw);
  margin-inline: auto;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.center {
  display: grid;
  place-items: center;
  text-align: center;
}

.page {
  min-height: 100vh;
  position: relative;

  /* ✅ scroll normal, mais pas en X */
  overflow-x: hidden;
  overflow-y: auto;
}

.page__content {
  position: relative;
  z-index: 2;
  padding: 3rem 0 2rem; /* ✅ plus besoin de "leave room for footer fixed" */
}

/* Top-centered (tools page style) */
.page--top .page__content {
  padding-top: 3rem;
}

/* Centered (coming-soon style) */
.page--center .page__content {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

/* ---------- Brand / header ---------- */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.brand__logo {
  width: 18vw;
  max-width: 220px;
  height: auto;
  transform-origin: center;
  animation: ll-heartbeat 4s ease-in-out infinite;
}

@keyframes ll-heartbeat {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  30% { transform: scale(1.045); opacity: 1; }
  60% { transform: scale(1.02); opacity: 0.92; }
}

.brand__kicker {
  font-size: clamp(0.85rem, 0.75rem + 0.4vw, 1rem);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.5;
}

/* ---------- Typography ---------- */
.h1 {
  font-size: clamp(1.8rem, 1.2rem + 2vw, 3rem);
  font-weight: 600;
  margin: 0;
}

.h2 {
  font-size: clamp(1.2rem, 0.9rem + 1vw, 1.8rem);
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.75;
}

.p {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 60ch;
  margin: 0 auto;
  color: var(--text-muted);
}

/* ---------- Surfaces / cards ---------- */
.card {
  background: rgba(26, 26, 26, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  backdrop-filter: blur(6px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;

  padding: 0.9rem 1.3rem;
  border: 0;
  border-radius: var(--radius-sm);

  background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
  color: #fff;
  font-weight: 600;

  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 16px var(--shadow-accent);
}

.btn:active {
  transform: scale(1.01);
  opacity: 0.92;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* Optional secondary button */
.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  box-shadow: 0 6px 16px rgba(255,255,255,0.06);
}

/* ---------- Inputs ---------- */
.input {
  padding: 0.85rem 1rem;
  width: min(340px, 92vw);

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);

  background: var(--surface);
  color: var(--text);

  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus {
  border-color: rgba(195, 158, 107, 0.45);
  box-shadow: 0 0 0 3px rgba(195, 158, 107, 0.18);
}

/* ---------- Simple form row (email + button) ---------- */
.form-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* ---------- Message / highlight ---------- */
.notice {
  color: var(--accent-1);
  font-weight: 500;
  font-size: 1rem;
}

/* ---------- Footer ---------- */
/* ✅ footer en bas de page (dans le flow), pas fixed */
.footer{
  position: static;
  width: 100%;
  text-align: center;
  pointer-events: none;
  z-index: 2;
  opacity: .35;
  margin: 18px 0 22px;
  white-space: normal;
}

/* ---------- Tool preview (SVG) ---------- */
/* ✅ preview centré + stable */
#preview{
  width: 100%;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px;
  background: #fff; /* ✅ blanc */
}

#preview svg{
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ---------- Utilities ---------- */
.hidden { display: none !important; }
.muted { color: var(--text-dim); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 600px) {
  .brand__logo { width: 45vw; }
  .p { font-size: 1rem; }
  .btn { width: min(360px, 92vw); }
}