/* ============================================================================
   Kopo · Shared base styles
   Palette officielle (cf. Brand Guide V1.3) :
     Cumulus #FFFFFF · Nimbus #141A1E · Cirrus #57B8FF · Virga #85BAFF
     Arcus #B2DBFF · Stratus #BCC8D2 · Haboob #F9ECE2
     Vesper #23255D · Aurore #504A97 · Sirocco #E6213A (paupière uniquement)
   Ce fichier contient : tokens, reset, typo, kobot interactif, nav, footer,
   boutons, reveal-on-scroll. Importé par toutes les pages.
   ============================================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@900,700,500,400,300&display=swap');

/* === DESIGN TOKENS ======================================================== */
:root {
  --cumulus: #FFFFFF;
  --nimbus: #141A1E;
  --nimbus-soft: #2a3138;
  --cirrus: #57B8FF;
  --virga: #85BAFF;
  --arcus: #B2DBFF;
  --stratus: #BCC8D2;
  --stratus-soft: #E5EAF0;
  --haboob: #F9ECE2;
  --vesper: #23255D;
  --aurore: #504A97;
  --sirocco: #E6213A;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --container-px: clamp(1.25rem, 4vw, 3rem);
  --container-max: 1440px;
}

/* === RESET ================================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: 'Satoshi', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--nimbus);
  background: var(--cumulus);
  line-height: 1.4;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* === KOBOT (logo + pupille blanche overlay) =============================== */
.kobot {
  position: relative;
  display: inline-block;
  width: 100%;
  aspect-ratio: 1;
}
.kobot img {
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}
.kobot .pupil-zone {
  /* Cercle rouge = 22% du diamètre, centré */
  position: absolute;
  left: 50%; top: 50%;
  width: 22%; height: 22%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.kobot .pupil {
  /* Pupille blanche : 7% du diamètre du Kobot ≈ 32% de la zone œil */
  position: absolute;
  left: 50%; top: 50%;
  width: 32%; height: 32%;
  background: var(--cumulus);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 350ms var(--ease-out), opacity 80ms ease-out, height 90ms ease-in-out;
  will-change: transform;
}
.kobot.blinking .pupil { height: 6%; opacity: 0; }

/* Variante long-arm : tête en bas, câble qui déborde vers le haut */
.kobot.kobot-longarm { overflow: visible; }
.kobot.kobot-longarm img {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: auto;
  pointer-events: none;
}

/* Architecture pendule à 2 éléments :
   - .kobot-swing-anchor : wrapper qui swing en permanence (jamais touché par le drag)
   - .kobot.kobot-longarm : intérieur qui porte la rotation du drag */
@keyframes swing-long {
  0%, 100% { transform: rotate(-1deg); }
  50%      { transform: rotate(1deg); }
}
.kobot-swing-anchor {
  display: block;
  width: 100%;
  animation: swing-long 5.5s ease-in-out infinite;
  transform-origin: 50% -600%;
}
/* Pause du swing pendant le grab (pas de reset, animation reprend depuis sa frame) */
.kobot-swing-anchor:has(.kobot.is-grabbed) { animation-play-state: paused; }

.kobot.kobot-longarm {
  --drag-rotate: 0deg;
  --drag-y: 0px;
  transform: translateY(var(--drag-y)) rotate(var(--drag-rotate));
  transform-origin: 50% -600%;
  cursor: grab;
}
.kobot.kobot-longarm:active { cursor: grabbing; }
body.kobot-dragging,
body.kobot-dragging * { cursor: grabbing !important; user-select: none; }
.kobot.kobot-longarm.is-returning { transition: transform 1000ms var(--ease-out); }

/* Pupille · états expressifs pendant le grab */
@keyframes pupil-panic {
  0%   { transform: translate(calc(-50% + 22%), calc(-50% - 18%)); }
  12%  { transform: translate(calc(-50% - 24%), calc(-50% - 14%)); }
  25%  { transform: translate(calc(-50% + 18%), calc(-50% + 22%)); }
  38%  { transform: translate(calc(-50% - 22%), calc(-50% + 16%)); }
  52%  { transform: translate(calc(-50% + 24%), calc(-50% - 22%)); }
  66%  { transform: translate(calc(-50% - 18%), calc(-50% + 24%)); }
  80%  { transform: translate(calc(-50% + 26%), calc(-50% - 8%)); }
  100% { transform: translate(calc(-50% - 16%), calc(-50% - 22%)); }
}
.kobot.is-grabbed .pupil {
  animation: pupil-panic 0.36s steps(8) infinite;
  transition: none;
}
@keyframes pupil-look-up {
  0%   { transform: translate(-50%, -50%); }
  35%  { transform: translate(-50%, calc(-50% - 24%)); }
  100% { transform: translate(-50%, calc(-50% - 18%)); }
}
.kobot.is-pleading .pupil {
  animation: pupil-look-up 0.5s ease-in-out;
  width: 50%; height: 50%;
  border-radius: 0;
  background: transparent;
  transform: translate(-50%, calc(-50% - 18%));
}
.kobot.is-pleading .pupil::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--cumulus);
  clip-path: polygon(50% 0%, 100% 100%, 75% 100%, 50% 50%, 25% 100%, 0% 100%);
}

/* Goutte de sueur · drop bleu Cirrus sur la tempe droite */
.kobot-sweat {
  position: absolute;
  top: 22%; right: 24%;
  width: 7%; height: 11%;
  background: linear-gradient(180deg, var(--virga) 0%, var(--cirrus) 100%);
  border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  transform: scale(0) translateY(-10px);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(35, 37, 93, 0.25));
  transition: opacity 220ms ease-out, transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.kobot.is-sweating .kobot-sweat {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: sweat-bob 1.4s var(--ease-in-out) infinite 280ms;
}
@keyframes sweat-bob {
  0%, 100% { transform: scale(1) translateY(0); }
  50%      { transform: scale(1.08) translateY(8%); }
}

/* Mini kobot pour les lockups (nav, footer) · respecte le ratio cap-height = 0.55H */
.kobot-mini {
  width: 40px;
  height: 40px;
  background: url('assets/KopoLogo.png') center/contain no-repeat;
  position: relative;
  flex-shrink: 0;
}
.kobot-mini::after {
  content: '';
  position: absolute;
  width: 7%; height: 7%;
  background: var(--cumulus);
  border-radius: 50%;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}

/* === BOUTONS ==============================================================
   Style aligné sur download.kopo.systems :
   - corps neutre (radius 6px, padding 12/24, font 0.875rem 500, gap 8px)
   - .btn-primary : fond Nimbus, texte Cumulus → hover : fond Cirrus
   - .btn-ghost (= .btn-outline) : transparent + bordure Stratus → hover : tout Cirrus
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Satoshi', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--nimbus); color: var(--cumulus); }
.btn-primary:hover { background: var(--cirrus); color: var(--cumulus); }
.btn-ghost {
  background: transparent;
  color: var(--nimbus);
  border-color: var(--nimbus);
}
.btn-ghost:hover { color: var(--cirrus); border-color: var(--cirrus); }
.btn .arrow { display: inline-block; transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* === REVEAL =============================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 90ms; }
.reveal.delay-2 { transition-delay: 180ms; }
.reveal.delay-3 { transition-delay: 270ms; }
.reveal.delay-4 { transition-delay: 360ms; }

/* === NAV ================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 1.25rem var(--container-px);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0px);
  transition: background 350ms var(--ease-out), backdrop-filter 350ms var(--ease-out), border-color 350ms var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: rgba(20, 26, 30, 0.06);
}
/* Lockup logo : cap-height ≈ 0.55× Kobot, gap = 0.35H (cf. Brand Guide §06) */
.nav-logo {
  display: flex; align-items: center; gap: 14px;
  font-family: 'Satoshi', system-ui, sans-serif;
  font-weight: 700; font-size: 1.875rem; letter-spacing: -0.02em; line-height: 1;
}
.nav-logo sup { font-size: 0.45em; vertical-align: super; opacity: 0.55; font-weight: 500; margin-left: 0.1em; }
.nav-links { display: flex; gap: 2.25rem; font-size: 0.9rem; font-weight: 500; }
.nav-links a { position: relative; opacity: 0.78; transition: opacity 200ms; }
.nav-links a:hover { opacity: 1; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1px; background: currentColor;
  transition: width 280ms var(--ease-out);
}
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--nimbus);
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--nimbus);
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.nav-cta:hover { color: var(--cirrus); border-color: var(--cirrus); }

/* === BURGER + MOBILE DRAWER ===============================================
   Burger discret côté nav. Drawer fullscreen qui réutilise la DA Aube
   (blur + dégradé blanc/bleu) pour rester cohérent avec le hero.
   ========================================================================== */
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--nimbus);
  border-radius: 6px;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease;
  position: relative; z-index: 51;
}
.nav-burger:hover { border-color: var(--cirrus); }
.nav-burger span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--nimbus);
  border-radius: 1px;
  transform-origin: center;
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0;
  z-index: 45;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.97) 0%, rgba(234, 244, 255, 0.97) 60%, rgba(249, 236, 226, 0.97) 100%);
  backdrop-filter: blur(24px) saturate(140%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2.5rem;
  padding: 6rem 1.5rem 3rem;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
.nav-mobile.is-open { opacity: 1; visibility: visible; }
.nav-mobile-links {
  display: flex; flex-direction: column; align-items: center;
  gap: 1.4rem; text-align: center;
}
.nav-mobile-links a {
  font-size: clamp(1.4rem, 6vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--nimbus);
  position: relative;
  transition: color 0.2s ease;
}
.nav-mobile-links a:hover,
.nav-mobile-links a:focus-visible { color: var(--cirrus); outline: none; }
.nav-mobile .btn { font-size: 1rem; padding: 14px 32px; }
body.menu-open { overflow: hidden; }

@media (max-width: 800px) {
  .nav { padding: 0.85rem var(--container-px); }
  .nav-logo { font-size: 1.45rem; gap: 12px; }
  .nav-logo .kobot-mini { width: 32px; height: 32px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
}

/* === SECTION SHARED ======================================================= */
.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 600; color: var(--cirrus); margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.05;
  max-width: 18ch; text-wrap: balance;
}
.section-title::after {
  content: '';
  display: block;
  width: 160px; height: 3px;
  background: var(--cirrus);
  border-radius: 2px;
  margin-top: 1.5rem;
}
.section-lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--nimbus-soft);
  max-width: 560px; margin-top: 1.4rem; line-height: 1.5; text-wrap: pretty;
}
.container { max-width: var(--container-max); margin: 0 auto; }

/* === FOOTER =============================================================== */
.footer { background: var(--nimbus); color: var(--cumulus); padding: 6rem var(--container-px) 2.5rem; }
.footer-inner {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem;
  margin: 0 auto 5rem; max-width: var(--container-max);
}
.footer-brand { max-width: 320px; }
.footer-brand .logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.88rem; color: var(--stratus); line-height: 1.55; }
.footer h4 { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stratus); font-weight: 500; margin-bottom: 1.25rem; }
.footer ul { display: flex; flex-direction: column; gap: 0.7rem; }
.footer ul a { font-size: 0.92rem; opacity: 0.85; transition: opacity 200ms; }
.footer ul a:hover { opacity: 1; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem; color: var(--stratus);
  max-width: var(--container-max); margin: 0 auto;
}
@media (max-width: 800px) {
  .footer { padding: 4rem var(--container-px) 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2.25rem; margin-bottom: 3rem; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-brand { max-width: none; }
}
