/* ============================================================================
   SPECULAR STUDIO — base.css
   Reset, typographie fluide, couches d'ambiance, utilitaires structurels
   ============================================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.6s ease, color 0.6s ease;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; display: block; }
button { font-family: inherit; }
a { color: inherit; }

::selection { background: var(--c-primary); color: var(--c-on-primary); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
::-webkit-scrollbar-thumb { background: var(--grad-brand); border-radius: 8px; }

/* --- Accessibilité ----------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; top: -60px; left: 1rem; z-index: 300;
  background: var(--grad-brand); color: var(--c-on-primary);
  font-weight: 800; font-size: 0.85rem;
  padding: 0.7rem 1.2rem; border-radius: 0 0 0.8rem 0.8rem;
  text-decoration: none;
  transition: top 0.25s ease;
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --- Typographie fluide ------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-display, 900);
  font-style: oblique var(--slant-display, 0deg);
  line-height: 1.12;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 4.4rem); line-height: 1.06; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
p { margin: 0 0 1em; }

.font-display { font-family: var(--font-display); }
.muted { color: var(--c-muted); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.72rem; }
.bold { font-weight: 700; }
.black { font-weight: 900; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-all { word-break: break-all; }

.eyebrow {
  display: block;
  font-size: 0.72rem; font-weight: 900;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 0.9rem;
}
.lead {
  color: var(--c-muted);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  max-width: 640px;
}
.lead strong { color: var(--c-text); }

.gradient-text {
  background: linear-gradient(90deg, var(--c-primary), var(--c-secondary), var(--c-primary));
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: liquidShift 5s linear infinite;
}

.logo-metal {
  background: linear-gradient(110deg, #cbd5e1 10%, #ffffff 28%, var(--c-primary) 46%, #cbd5e1 62%, #ffffff 80%, #94a3b8 95%);
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: metalShine 6s linear infinite;
  letter-spacing: 0.06em;
}

/* --- Couches d'ambiance (fond personnalisé, canvas FX, textures) -------------- */

#custom-bg {
  position: fixed; inset: 0; z-index: -4;
  background-position: center; background-repeat: no-repeat;
  pointer-events: none;
}
#mesh-bg {
  position: fixed; inset: -12%; z-index: -3;
  pointer-events: none;
  filter: blur(50px) saturate(1.3);
  opacity: 0.55;
  display: none;
  animation: meshBreath 16s ease-in-out infinite alternate;
}
@keyframes meshBreath {
  from { transform: scale(1) rotate(0deg); }
  to   { transform: scale(1.14) rotate(2.5deg); }
}
#fx-canvas {
  position: fixed; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  pointer-events: none;
}
#fx-overlay {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
#lightning-flash {
  position: fixed; inset: 0; z-index: 40;
  background: radial-gradient(circle at 30% 10%, rgba(216, 180, 254, 0.55), rgba(255, 255, 255, 0.15) 45%, transparent 75%);
  opacity: 0; pointer-events: none;
}
#lightning-flash.flashing { animation: lightningFlash 0.65s ease-out; }

.bg-orb {
  position: fixed; border-radius: 9999px; filter: blur(90px);
  z-index: -2; pointer-events: none; opacity: 0.5;
  animation: orbFloat 16s ease-in-out infinite alternate;
}

/* --- Surfaces en verre --------------------------------------------------------- */

.glass {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.glass-strong {
  background: var(--c-surface-strong);
  border: 1px solid var(--c-border);
  backdrop-filter: blur(26px) saturate(1.6);
  -webkit-backdrop-filter: blur(26px) saturate(1.6);
}

/* --- Structure ------------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.section { position: relative; z-index: 1; padding-block: 5.5rem; }
.section-sm { position: relative; z-index: 1; padding-block: 3rem; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 3.2rem; }
.section-head .lead { margin-inline: auto; }

/* --- Utilitaires layout ---------------------------------------------------------- */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1 1 0%; }
.min-w-0 { min-width: 0; }
.shrink-0 { flex-shrink: 0; }

.gap-05 { gap: 0.35rem; }
.gap-1 { gap: 0.6rem; }
.gap-15 { gap: 0.9rem; }
.gap-2 { gap: 1.25rem; }
.gap-3 { gap: 2rem; }

.grid { display: grid; gap: var(--gap, 1.5rem); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; gap: 2.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }

.mt-05 { margin-top: 0.35rem; }
.mt-1 { margin-top: 0.6rem; }
.mt-2 { margin-top: 1.25rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }
.mb-05 { margin-bottom: 0.35rem; }
.mb-1 { margin-bottom: 0.6rem; }
.mb-2 { margin-bottom: 1.25rem; }
.mb-3 { margin-bottom: 2rem; }
.mx-auto { margin-inline: auto; }
.w-full { width: 100%; }

.hidden { display: none !important; }
.mobile-only { display: none; }

/* --- Barre de statut / topbar ----------------------------------------------------- */

.topbar {
  position: relative; z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  font-size: 0.75rem;
  color: var(--c-muted);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 0.55rem; flex-wrap: wrap; row-gap: 0.2rem;
}
.topbar a { text-decoration: none; font-weight: 600; transition: color 0.3s ease; }
.topbar a:hover { color: var(--c-text); }
.topbar-links { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.status-live { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.status-dot { width: 8px; height: 8px; border-radius: 9999px; background: var(--c-success); }
