/* ==================================================================
 * Composant : cb-page-hero
 * Style inspiré de https://krausen.io (bannière About / Blog)
 * Fond dark navy + grille subtile + eyebrow + H1 avec accent + lead
 * S'utilise en haut de page, full width.
 * ================================================================ */

.cb-page-hero {
  position: relative;
  background:
    radial-gradient(ellipse 900px 500px at 50% 100%,
      color-mix(in srgb, var(--cb-primary, #326ce5) 18%, transparent),
      transparent 70%),
    linear-gradient(180deg, #0a1628 0%, #0d1a30 100%);
  padding: clamp(72px, 10vw, 140px) 24px clamp(80px, 11vw, 150px);
  margin: 0 0 0;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cb-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center center;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 85%);
  z-index: -1;
  pointer-events: none;
}

.cb-page-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 600px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--cb-primary, #326ce5) 60%, transparent),
    transparent);
  z-index: 0;
  pointer-events: none;
}

.cb-page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
}

.cb-page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(99, 179, 237, 0.10);
  border: 1px solid rgba(99, 179, 237, 0.25);
  color: #7dc8f5;
  font-family: var(--cb-font-sans, 'Inter', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cb-page-hero__eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: cbPageHeroDotPulse 2.4s var(--cb-ease-out, cubic-bezier(.16,1,.3,1)) infinite;
}

@keyframes cbPageHeroDotPulse {
  0%, 60%, 100% { opacity: 1; transform: scale(1); }
  30% { opacity: 0.6; transform: scale(1.25); }
}

/* Bumped specificity (multiple selectors + the wrapping .cb-page-hero scope)
   to win against the global "h1 { color: var(--cb-text) !important }" rule
   from 07-design-system-v2.css. */
.cb-page-hero h1.cb-page-hero__title,
.entry-content .cb-page-hero h1.cb-page-hero__title,
.cb-page-hero .cb-page-hero__inner h1.cb-page-hero__title {
  font-family: var(--cb-font-sans, 'Inter', system-ui, sans-serif) !important;
  font-size: clamp(38px, 6vw, 76px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.05 !important;
  color: #ffffff !important;
  margin: 0 0 24px !important;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.cb-page-hero h1.cb-page-hero__title .cb-page-hero__title-accent,
.cb-page-hero__title-accent {
  background: linear-gradient(135deg, #7dc8f5 0%, #5b9bd5 50%, #4a90e2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  font-style: normal;
  text-shadow: none;
}

.cb-page-hero p.cb-page-hero__lead,
.entry-content .cb-page-hero p.cb-page-hero__lead {
  font-family: var(--cb-font-sans, 'Inter', system-ui, sans-serif) !important;
  font-size: clamp(16px, 1.7vw, 19px) !important;
  line-height: 1.6 !important;
  color: #cbd5e1 !important;
  max-width: 680px;
  margin: 0 auto !important;
  font-weight: 400;
  text-wrap: pretty;
}

.cb-page-hero__meta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  justify-content: center;
}

.cb-page-hero__chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #e2e8f0;
  font-family: var(--cb-font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.cb-page-hero__chip:hover {
  background: rgba(99, 179, 237, 0.10);
  border-color: rgba(99, 179, 237, 0.30);
  color: #7dc8f5;
}

/* Tighten the spacing the page uses below the hero */
.cb-page-hero + * { margin-top: 0 !important; padding-top: 0 !important; }

/* Force the hero to stretch full-width even inside narrow containers */
.entry-content > .cb-page-hero,
.entry-content > .alignfull > .cb-page-hero {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  max-width: none !important;
}

/* When the global v2 CSS removes container padding for select pages,
   ensure the hero still hugs the header (no double spacing). */
.cb-page-hero { margin-top: 0 !important; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cb-page-hero__eyebrow-dot { animation: none; }
}

/* Mobile refinements */
@media (max-width: 640px) {
  .cb-page-hero { padding-left: 20px; padding-right: 20px; }
  .cb-page-hero__title { letter-spacing: -0.025em !important; }
  .cb-page-hero__lead { font-size: 16px !important; }
}