/**
 * sis-public-hero — styles v2 (logos intégrés)
 *
 * Évolution depuis v1-2026-06-05-gen.css :
 *   - logo maker space (PNG) à la place du carré bleu "U" dans la nav
 *   - mention "Soutenu par NUTTéO" dans les trust signals avec micro-logo
 *   - reste identique : direction éditorial technique français,
 *     soulignement biseauté jaune, grille blueprint, SVG line-art atelier.
 *
 * Light DOM.
 */

/* ============================================================================
   Custom stack typo locale (sans webfont externe — offline-first)
   ============================================================================ */
sis-public-hero {
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Hoefler Text",
                  "Times New Roman", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* Couleurs locales (toutes dérivées des tokens UTTOP) */
  --hero-bg: var(--color-bg);
  --hero-grid: color-mix(in srgb, var(--uttop-compl-5) 8%, transparent);
  --hero-line-art: color-mix(in srgb, var(--uttop-compl-1) 18%, transparent);
  --hero-accent-stripe: var(--uttop-compl-3);
  --hero-accent-eyebrow: var(--uttop-compl-1);

  display: block;
  position: relative;
  color: var(--color-text);
}

/* ============================================================================
   Skip link accessibilité
   ============================================================================ */
.sph-skip {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  background: var(--uttop-principale);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  z-index: 1000;
  transition: top var(--transition-fast);
}
.sph-skip:focus {
  top: var(--space-md);
}

/* ============================================================================
   NAV TOP
   ============================================================================ */
.sph-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-bg);
  z-index: var(--z-sticky);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition-base),
              border-color var(--transition-base);
}
.sph-nav.is-scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--color-border);
}

.sph-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xs) var(--space-lg);
  gap: var(--space-lg);
  /* v2.1 : padding vertical réduit pour rééquilibrer avec logo plus grand */
}

.sph-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-text);
}
.sph-brand__logo {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: var(--uttop-principale);
  object-fit: cover;
  flex-shrink: 0;
  /* Logo officiel maker space (rendu sur fond bleu UTTOP qui matche le fond)
     v2.1 (2026-06-05) : passé de 48px à 72px (≈ 150%) sur retour Cédrick. */
}
.sph-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.sph-brand__line1 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sph-brand__line2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-top: 2px;
  color: var(--color-text);
}

.sph-nav__links {
  display: none;
  align-items: center;
  gap: var(--space-lg);
  margin-left: auto;
  margin-right: var(--space-lg);
}
.sph-nav__link {
  position: relative;
  font-size: 0.9375rem;
  color: var(--color-text);
  padding: var(--space-xs) 0;
  white-space: nowrap;
}
.sph-nav__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--uttop-compl-2);
  transition: width var(--transition-base), left var(--transition-base);
}
.sph-nav__link:hover::after,
.sph-nav__link:focus-visible::after {
  width: 100%;
  left: 0;
}

.sph-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--uttop-principale);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
              background var(--transition-fast);
  min-height: var(--touch-target-min);
}
.sph-nav__cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: color-mix(in srgb, var(--uttop-principale) 88%, black);
}
.sph-nav__cta__arrow {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Burger */
.sph-burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: var(--radius-md);
  margin-left: auto;
  cursor: pointer;
  background: transparent;
}
.sph-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
  transform-origin: center;
}
.sph-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.sph-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.sph-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Overlay menu mobile */
.sph-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  background: var(--color-bg);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
  padding: calc(var(--space-2xl) + 60px) var(--space-xl) var(--space-xl);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  z-index: calc(var(--z-sticky) - 1);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.sph-mobile-menu.is-open {
  transform: translateX(0);
}
.sph-mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-text);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}
.sph-mobile-menu .sph-nav__cta {
  margin-top: var(--space-lg);
  justify-content: center;
  font-size: 1rem;
}

/* ============================================================================
   HERO
   ============================================================================ */
.sph-hero {
  position: relative;
  min-height: 75vh;
  display: grid;
  align-items: center;
  padding: var(--space-2xl) var(--space-lg) var(--space-3xl);
  overflow: hidden;
}

/* Grille blueprint en arrière-plan */
.sph-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.sph-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--hero-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hero-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 30% 50%, black 30%, transparent 80%);
}

/* SVG line-art décoratif */
.sph-hero__decor {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: min(520px, 60%);
  height: auto;
  stroke: var(--hero-line-art);
  fill: none;
  stroke-width: 1.2;
  opacity: 0.9;
  pointer-events: none;
}

/* Cotation stylisée style blueprint */
.sph-hero__measure {
  position: absolute;
  top: 100px;
  right: var(--space-xl);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-soft);
  letter-spacing: 0.08em;
  display: none;
}
.sph-hero__measure::before,
.sph-hero__measure::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 36px;
  height: 1px;
  background: var(--color-text-soft);
  opacity: 0.4;
}
.sph-hero__measure::before { left: -44px; }
.sph-hero__measure::after { right: -44px; }

/* Badge prototype */
.sph-hero__badge {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-lg);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 10px;
  background: var(--uttop-compl-3);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  z-index: 2;
}
.sph-hero__badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text);
  animation: sph-blink 2s ease-in-out infinite;
}

@keyframes sph-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Contenu principal */
.sph-hero__content {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}

.sph-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--hero-accent-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: sph-reveal 600ms cubic-bezier(0.2, 0.7, 0.2, 1) 100ms forwards;
}
.sph-hero__eyebrow__dash {
  width: 32px;
  height: 1px;
  background: var(--hero-accent-eyebrow);
  flex-shrink: 0;
}

.sph-hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--color-text);
  margin: 0 0 var(--space-lg);
  opacity: 0;
  animation: sph-reveal 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 200ms forwards;
}

/* Soulignement biseauté jaune signature */
.sph-hero__title__highlight {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.sph-hero__title__highlight::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 0.08em;
  height: 0.32em;
  background: var(--hero-accent-stripe);
  z-index: -1;
  transform: skew(-12deg);
  border-radius: 2px;
  opacity: 0;
  animation: sph-stripe 800ms cubic-bezier(0.2, 0.7, 0.2, 1) 550ms forwards;
}

@keyframes sph-stripe {
  0% { transform: skew(-12deg) scaleX(0); transform-origin: left; opacity: 0; }
  100% { transform: skew(-12deg) scaleX(1); transform-origin: left; opacity: 1; }
}

.sph-hero__lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--color-text-soft);
  max-width: 640px;
  margin: 0 0 var(--space-xl);
  opacity: 0;
  animation: sph-reveal 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 350ms forwards;
}

.sph-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  opacity: 0;
  animation: sph-reveal 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 450ms forwards;
}

.sph-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  min-height: var(--touch-target-comfortable);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
              background var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
}
.sph-cta__arrow {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: transform var(--transition-base);
}
.sph-cta:hover .sph-cta__arrow {
  transform: translateX(4px);
}

.sph-cta--primary {
  background: var(--uttop-principale);
  color: #fff;
  border: 2px solid var(--uttop-principale);
}
.sph-cta--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -10px rgba(0, 80, 120, 0.45);
  background: color-mix(in srgb, var(--uttop-principale) 88%, black);
}

.sph-cta--ghost {
  background: transparent;
  color: var(--uttop-principale);
  border: 2px solid var(--uttop-principale);
}
.sph-cta--ghost:hover {
  background: var(--uttop-principale);
  color: #fff;
  transform: translateY(-1px);
}

.sph-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-soft);
  letter-spacing: 0.04em;
  opacity: 0;
  animation: sph-reveal 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 600ms forwards;
}
.sph-hero__trust__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sph-hero__trust__item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--uttop-compl-2);
  flex-shrink: 0;
}
.sph-hero__trust__sep {
  width: 4px;
  height: 4px;
  background: var(--color-text-soft);
  border-radius: 50%;
  opacity: 0.4;
}

/* Bloc soutenu par (logo NUTTéO) */
.sph-hero__support {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sph-hero__support__logo {
  height: 22px;
  width: auto;
  /* le PNG NUTTéO a un fond clair / transparent → s'intègre tel quel */
  filter: contrast(1.05) saturate(0.9);
}
.sph-hero__support__sep {
  width: 1px;
  height: 14px;
  background: var(--color-border);
}

/* Indicateur scroll */
.sph-hero__scroll {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-soft);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  animation: sph-reveal 700ms ease 900ms forwards;
}
.sph-hero__scroll__chevron {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  animation: sph-bounce 2s ease-in-out infinite 1.2s;
}

@keyframes sph-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(4px); opacity: 1; }
}

@keyframes sph-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (min-width: 768px) {
  .sph-hero {
    min-height: 80vh;
    padding: var(--space-3xl) var(--space-xl);
  }
  .sph-hero__measure {
    display: block;
  }
}

@media (min-width: 1024px) {
  .sph-nav__links {
    display: flex;
  }
  .sph-burger {
    display: none;
  }
  .sph-mobile-menu {
    display: none;
  }
  .sph-hero {
    min-height: 85vh;
  }
}

@media (max-width: 1023px) {
  .sph-nav__cta--desktop {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sph-hero__eyebrow,
  .sph-hero__title,
  .sph-hero__lead,
  .sph-hero__ctas,
  .sph-hero__trust,
  .sph-hero__scroll {
    animation: none;
    opacity: 1;
  }
  .sph-hero__title__highlight::after {
    animation: none;
    opacity: 1;
    transform: skew(-12deg) scaleX(1);
  }
  .sph-hero__badge__dot,
  .sph-hero__scroll__chevron {
    animation: none;
  }
}
