/* ============================================================================
   Kopo · Landing-specific styles
   Sections : Hero (Aube), Manifesto, Services, Infrastructure (Halo), Stats
   (Encre), Kosmos, Partenaires, Peek-Kobot
   ============================================================================ */

/* ============================================================================
   SHARED ANIMATIONS · utilisées par plusieurs sections
   ============================================================================ */
@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(40px, 30px); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-30px, -40px); }
}

section { padding: 9rem var(--container-px); }

/* ============================================================================
   HERO · gradient Aube, Kobot suspendu, blobs flottants
   ============================================================================ */
.hero {
  min-height: 100vh;
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  padding: 7rem var(--container-px) 4rem;
  background:
    linear-gradient(170deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.6) 45%, rgba(255,255,255,0.78) 100%),
    url('assets/BanniaireKopoJour.png') center/cover no-repeat;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(60px); opacity: 0.6;
}
.hero::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(178,219,255,0.9) 0%, transparent 70%);
  top: -10%; left: -8%;
  animation: float1 14s ease-in-out infinite;
}
.hero::after {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(249,236,226,0.9) 0%, transparent 70%);
  bottom: -15%; right: -5%;
  animation: float2 18s ease-in-out infinite;
}

.hero-inner {
  position: relative; z-index: 2;
  max-width: var(--container-max); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem; align-items: center;
}
.hero-text { padding-bottom: 2rem; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(20, 26, 30, 0.12);
  border-radius: 999px;
  font-size: 0.78rem; font-weight: 500;
  color: var(--nimbus-soft);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  margin-bottom: 1.75rem;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cirrus);
  animation: pulse 2.4s var(--ease-in-out) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(87, 184, 255, 0.6); }
  50%      { box-shadow: 0 0 0 8px rgba(87, 184, 255, 0); }
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 700; line-height: 1; letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--nimbus-soft);
  max-width: 480px; margin-top: 1.5rem;
  text-wrap: pretty;
}
.hero-ctas { display: flex; gap: 0.9rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-kobot-wrap { width: clamp(240px, 32vw, 400px); justify-self: center; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-kobot-wrap { order: -1; justify-self: start; width: clamp(180px, 40vw, 240px); }
}

/* ============================================================================
   MANIFESTO · gradient Brume centré
   ============================================================================ */
.manifesto {
  background: radial-gradient(ellipse at top, #eaf4ff 0%, var(--cumulus) 60%);
  padding: 12rem var(--container-px);
}
.manifesto-inner { max-width: 1000px; margin: 0 auto; }
.manifesto-tag {
  display: inline-block;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cirrus); font-weight: 600; margin-bottom: 2.5rem;
}
.manifesto-quote {
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  font-weight: 500; line-height: 1.2; letter-spacing: -0.022em;
  text-wrap: balance;
}
.manifesto-quote em {
  font-style: normal;
  color: var(--stratus);
  transition: color 600ms var(--ease-out);
}
.manifesto.in-view .manifesto-quote em { color: var(--nimbus); }

/* ============================================================================
   SERVICES · cartes lift au hover, halo bleu
   ============================================================================ */
.services { background: var(--cumulus); }
.services-header { max-width: var(--container-max); margin: 0 auto 5rem; }
.services-header .section-title { max-width: 22ch; }
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  max-width: var(--container-max); margin: 0 auto;
}
.service-card {
  position: relative;
  padding: 2.5rem 2rem; border-radius: 24px;
  background: linear-gradient(180deg, #f4f8fc 0%, var(--cumulus) 100%);
  border: 1px solid var(--stratus-soft);
  transition: transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out), border-color 400ms;
  display: flex; flex-direction: column; gap: 1rem;
  min-height: 320px; overflow: hidden;
}
.service-card::after {
  content: ''; position: absolute; top: -60%; right: -40%;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(178,219,255,0.45) 0%, transparent 70%);
  border-radius: 50%; opacity: 0;
  transition: opacity 500ms var(--ease-out);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px -20px rgba(20, 26, 30, 0.18);
  border-color: var(--cirrus);
}
.service-card:hover::after { opacity: 1; }
.service-card .icon-circle {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--cumulus);
  border: 1px solid var(--stratus-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--nimbus);
  position: relative; z-index: 1;
  transition: background 320ms, color 320ms;
}
.service-card:hover .icon-circle { background: var(--nimbus); color: var(--cumulus); }
.service-card .num { font-size: 0.72rem; letter-spacing: 0.18em; color: var(--stratus); font-weight: 500; position: relative; z-index: 1; }
.service-card h3 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.018em; position: relative; z-index: 1; }
.service-card p { font-size: 0.95rem; color: var(--nimbus-soft); line-height: 1.55; flex-grow: 1; position: relative; z-index: 1; }
.service-card .arrow-link {
  font-size: 0.85rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.4rem;
  opacity: 0.65; transition: opacity 280ms;
  position: relative; z-index: 1;
}
.service-card:hover .arrow-link { opacity: 1; }
.service-card .arrow-link svg { transition: transform 320ms; }
.service-card:hover .arrow-link svg { transform: translateX(3px); }
@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr; } }

/* ============================================================================
   INFRASTRUCTURE · gradient Halo (Vesper → Aurore), serveurs SVG animés
   ============================================================================ */
.infra {
  background: linear-gradient(160deg, var(--vesper) 0%, var(--aurore) 60%, #6e7ab7 100%);
  color: var(--cumulus);
  position: relative; overflow: hidden;
}
.infra::before, .infra::after {
  content: ''; position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.infra::before {
  width: 540px; height: 540px;
  background: radial-gradient(circle, rgba(178, 219, 255, 0.25) 0%, transparent 70%);
  top: -10%; right: -8%;
  animation: float1 16s ease-in-out infinite;
}
.infra::after {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(80, 74, 151, 0.45) 0%, transparent 70%);
  bottom: -15%; left: -10%;
  animation: float2 20s ease-in-out infinite;
}
.infra-inner-wrap { position: relative; z-index: 2; max-width: var(--container-max); margin: 0 auto; }
.infra-header { margin: 0 0 4.5rem; }
.infra-header h2 { color: var(--cumulus); max-width: 18ch; }

.constellation { position: relative; aspect-ratio: 16 / 8; margin: 0 auto 5rem; max-width: 1080px; }
.constellation svg { width: 100%; height: 100%; overflow: visible; display: block; }

.infra-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 800px) { .constellation { aspect-ratio: 4 / 3; } }
.infra-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2.25rem;
  backdrop-filter: blur(14px);
  transition: background 320ms, border-color 320ms, transform 320ms;
}
.infra-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
}
.infra-card .num-mark {
  display: block;
  font-size: 0.72rem; letter-spacing: 0.18em;
  color: var(--cirrus); font-weight: 500;
  margin-bottom: 1.5rem;
}
.infra-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.85rem; letter-spacing: -0.015em; }
.infra-card p { font-size: 0.95rem; color: rgba(255, 255, 255, 0.72); line-height: 1.55; }
@media (max-width: 800px) { .infra-grid { grid-template-columns: 1fr; } }

/* ============================================================================
   STATS · gradient Encre
   ============================================================================ */
.stats {
  background: linear-gradient(180deg, var(--nimbus) 0%, #1a2333 100%);
  color: var(--cumulus);
  padding: 8rem var(--container-px);
}
.stats-inner {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem;
  align-items: end;
  max-width: var(--container-max); margin: 0 auto;
}
.stat-block { border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 1.75rem; }
.stat-value {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700; line-height: 0.95; letter-spacing: -0.04em;
}
.stat-value .unit { font-size: 0.5em; font-weight: 500; color: var(--cirrus); margin-left: 0.05em; }
.stat-label {
  margin-top: 1rem; font-size: 0.85rem;
  color: var(--stratus); letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 500;
}
@media (max-width: 800px) { .stats-inner { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ============================================================================
   KOSMOS · texte + mockup intégré (cadre bleu sidebar/walls + main-stage)
   ============================================================================ */
.kosmos { background: var(--cumulus); }
.kosmos-inner {
  display: grid; grid-template-columns: 1fr 0.85fr; gap: 4rem;
  align-items: center;
  max-width: var(--container-max); margin: 0 auto;
}
.kosmos-text .badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--stratus); border-radius: 999px;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--nimbus-soft);
  margin-bottom: 1.5rem;
}
.kosmos-features { margin: 2rem 0 2.5rem; border-top: 1px solid var(--stratus-soft); }
.kosmos-features li {
  display: grid; grid-template-columns: 32px 1fr; gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--stratus-soft);
  align-items: center;
  font-size: 0.95rem; font-weight: 500;
}
.kosmos-features li svg { color: var(--cirrus); }

/* Mockup Kosmos · cadre bleu Cirrus (sidebar+walls) entoure une stage blanche */
.kosmos-mock {
  background: linear-gradient(160deg, #cae6ff 0%, var(--haboob) 100%);
  border-radius: 26px; padding: 2.5rem;
  aspect-ratio: 4 / 3.1;
  position: relative; display: flex;
  box-shadow: 0 30px 70px -30px rgba(35, 37, 93, 0.35);
}
.kosmos-mock-inner {
  flex-grow: 1; display: flex; min-width: 0;
  background: var(--cirrus);
  border-radius: 14px;
  overflow: hidden;
}
/* Sidebar */
.km-sidebar {
  width: 46px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 0 12px;
  color: var(--cumulus);
}
.km-sidebar .km-logo {
  width: 38px; height: 38px;
  background: url('assets/KopoLogo.png') center/contain no-repeat;
}
.km-sidebar .km-nav { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.km-sidebar .km-nav i {
  display: block; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}
.km-sidebar .km-nav i.active { background: var(--cumulus); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18); }
/* Wall + main stage blanche */
.km-stage-wrap { flex-grow: 1; min-width: 0; padding: 14px 14px 14px 0; }
.km-stage {
  background: var(--cumulus);
  border-radius: 12px; height: 100%; box-sizing: border-box;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
/* Skeletons gris abstraits à la place du texte */
.km-skel {
  display: inline-block; height: 7px; border-radius: 4px;
  background: var(--stratus-soft); vertical-align: middle;
}
.km-skel.lg { height: 9px; }
.km-led {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  flex-shrink: 0;
}
/* 4 stat tiles */
.km-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.km-stat {
  background: #fafbfd; border: 1px solid #eef0f4; border-radius: 10px;
  padding: 10px 11px;
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.km-stat .l {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.55rem; color: #777; letter-spacing: 0.02em;
  text-transform: uppercase; font-weight: 600; line-height: 1;
  white-space: nowrap;
}
.km-stat .l::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.km-stat.vpn   .l::before { background: linear-gradient(135deg, var(--aurore), var(--cirrus)); }
.km-stat.games .l::before { background: linear-gradient(135deg, #fe72ba, var(--cirrus)); }
.km-stat.ctn   .l::before { background: linear-gradient(135deg, var(--cirrus), #0EA5E9); }
.km-stat.svc   .l::before { background: linear-gradient(135deg, #22c55e, #10B981); }
.km-stat .v {
  font-size: 1.05rem; font-weight: 700; color: var(--nimbus);
  letter-spacing: -0.025em; line-height: 1;
  display: flex; align-items: center; min-height: 16px;
}
.km-status {
  flex-grow: 1; min-height: 0;
  background: #fafbfd; border: 1px solid #eef0f4; border-radius: 10px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.km-status-row { display: flex; justify-content: space-between; align-items: center; }
.km-status-row + .km-status-row { padding-top: 10px; border-top: 1px solid #eef0f4; }

@media (max-width: 900px) { .kosmos-inner { grid-template-columns: 1fr; gap: 3rem; } }

.restricted {
  margin-top: 1rem; font-size: 0.78rem;
  color: var(--stratus); letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 500;
}

/* ============================================================================
   PARTENAIRES · bandeau mince
   ============================================================================ */
.partners {
  background: var(--cumulus);
  padding: 6rem var(--container-px);
  border-top: 1px solid var(--stratus-soft);
  border-bottom: 1px solid var(--stratus-soft);
}
.partners-inner {
  display: grid; grid-template-columns: auto 1fr 1fr; gap: 4rem;
  align-items: center;
  max-width: var(--container-max); margin: 0 auto;
}
.partners-label { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stratus); font-weight: 500; }
.partner { display: flex; align-items: center; gap: 1.25rem; }
.partner-logo { width: 60px; height: 60px; object-fit: contain; flex-shrink: 0; }
.partner .name { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.partner .desc { font-size: 0.85rem; color: var(--nimbus-soft); margin-top: 0.2rem; line-height: 1.4; }
.partner-link { transition: transform 0.2s var(--ease-out); }
.partner-link:hover { transform: translateY(-2px); }
.partner-link:hover .name { color: var(--cirrus); }
.partner-arrow {
  display: inline-block; margin-left: 0.25rem;
  font-weight: 500; opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s var(--ease-out);
}
.partner-link:hover .partner-arrow { opacity: 1; transform: translate(2px, -2px); }
@media (max-width: 800px) { .partners-inner { grid-template-columns: 1fr; gap: 1rem; } }

/* ============================================================================
   PEEK KOBOT · descend du haut quand on scroll au-delà du hero
   ============================================================================ */
.kobot-peek {
  position: fixed;
  top: 0;
  right: clamp(1.25rem, 4vw, 3.5rem);
  width: clamp(72px, 9vw, 110px);
  z-index: 40;
  pointer-events: none;
  overflow: visible;
  transform: translateY(-200%);
  transition: transform 800ms var(--ease-out);
}
.kobot-peek.is-visible { transform: translateY(clamp(58px, 8vh, 95px)); }
.kobot-peek-body { display: block; pointer-events: auto; }

/* ============================================================================
   SVG SERVER RACKS · styles utilitaires (réservés pour usage futur)
   ============================================================================ */
.r-body { fill: rgba(20, 26, 30, 0.55); stroke: rgba(255, 255, 255, 0.18); stroke-width: 1; }
.r-unit { fill: rgba(255, 255, 255, 0.04); stroke: rgba(255, 255, 255, 0.1); stroke-width: 0.6; }
.r-unit-active { fill: rgba(87, 184, 255, 0.08); stroke: rgba(87, 184, 255, 0.35); stroke-width: 0.6; }
.r-led-on { fill: var(--cirrus); animation: ledBreathe 1.6s ease-in-out infinite; }
.r-led-on.d2 { animation-delay: 0.3s; }
.r-led-on.d3 { animation-delay: 0.7s; }
.r-led-on.d4 { animation-delay: 1.1s; }
@keyframes ledBreathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ============================================================================
   RESPONSIVE · tablet / mobile
   On respire moins, on simplifie : padding réduits, blobs adoucis,
   mockup Kosmos resserré, peek Kobot en retrait.
   ============================================================================ */
@media (max-width: 1024px) {
  section { padding: 7rem var(--container-px); }
  .hero { padding: 6rem var(--container-px) 3rem; }
  .manifesto { padding: 9rem var(--container-px); }
  .stats { padding: 6rem var(--container-px); }
  .partners { padding: 5rem var(--container-px); }
}

@media (max-width: 800px) {
  section { padding: 5rem var(--container-px); }

  /* Hero : on resserre, on rétrécit les blobs pour ne pas étouffer */
  .hero { padding: 5.5rem var(--container-px) 3rem; min-height: auto; }
  .hero-inner { gap: 2.5rem; }
  .hero::before { width: 320px; height: 320px; opacity: 0.45; }
  .hero::after { width: 280px; height: 280px; opacity: 0.45; }
  .hero-eyebrow { font-size: 0.72rem; padding: 0.4rem 0.8rem; margin-bottom: 1.25rem; }
  .hero-sub { margin-top: 1.1rem; }
  .hero-ctas { margin-top: 2rem; }
  .hero-kobot-wrap { width: clamp(160px, 38vw, 220px); }

  /* Manifesto : moitié de padding vertical */
  .manifesto { padding: 6rem var(--container-px); }
  .manifesto-tag { margin-bottom: 1.75rem; }

  /* Services */
  .services-header { margin-bottom: 3rem; }
  .service-card { padding: 2rem 1.5rem; min-height: 0; gap: 0.85rem; }

  /* Infrastructure */
  .infra-header { margin-bottom: 3rem; }
  .constellation { margin: 0 auto 3rem; }
  .infra-card { padding: 1.75rem; }
  .infra-card .num-mark { margin-bottom: 1rem; }

  /* Stats */
  .stat-block { padding-top: 1.25rem; }

  /* Kosmos : mockup resserré, tuiles 2x2 */
  .kosmos-inner { gap: 2.5rem; }
  .kosmos-mock { padding: 1.25rem; aspect-ratio: 4 / 3.4; }
  .km-stage-wrap { padding: 12px 12px 12px 0; }
  .km-stage { padding: 14px 14px; gap: 12px; }
  .km-stats { grid-template-columns: repeat(2, 1fr); }

  /* Partenaires : label centré au-dessus, partners empilés */
  .partners-inner { gap: 2rem; text-align: left; }
  .partners-label { letter-spacing: 0.16em; }

  /* Peek Kobot : un peu plus discret + se cache si le menu est ouvert */
  .kobot-peek { width: clamp(56px, 14vw, 80px); right: 1rem; }
  body.menu-open .kobot-peek { opacity: 0; }
}

@media (max-width: 480px) {
  section { padding: 4rem var(--container-px); }
  .hero { padding: 5rem var(--container-px) 2.5rem; }
  .hero-title { line-height: 1.05; }
  .hero-ctas .btn { flex: 1; min-width: 0; }
  .manifesto { padding: 5rem var(--container-px); }
  .stats-inner { gap: 2rem; }
  .kosmos-mock { padding: 1rem; }
  .kosmos-features li { padding: 0.85rem 0; font-size: 0.9rem; }
  .partner { gap: 1rem; }
  .partner-logo { width: 48px; height: 48px; }
}

/* Reduce motion : on calme les blobs et le LED breathing */
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after,
  .infra::before, .infra::after,
  .kobot-swing-anchor,
  .r-led-on,
  .hero-eyebrow .dot { animation: none !important; }
  .reveal { transition-duration: 0.001ms; }
}
