/* Kalent LP — styles de sections.
   Une section = un bloc commenté. Les composants viennent des screenshots,
   la peau vient de css/tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Rythme vertical — une seule règle pour toutes les sections.
   L'écart vit sur le HAUT de chaque section : deux paddings adjacents ne
   s'additionnent donc jamais. Une section qui porte un fond (.section--bg)
   referme le sien en bas, et la suivante annule son padding haut. */
.section { padding-block: var(--section-gap) 0; position: relative; }
.section--bg { padding-bottom: var(--section-gap); }
.section--bg + .section,
.hero + .section,
.quote + .section { padding-top: 0; }   /* le bloc du dessus a déjà donné l'écart */

/* Accessibilité : lien d'évitement + focus visible */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--k-black); color: var(--k-white);
  padding: var(--space-sm) var(--space-md); border-radius: var(--radius-btn); z-index: 100;
}
.skip-link:focus { left: var(--gutter); top: var(--space-md); }
:focus-visible { outline: 2px solid var(--k-purple); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   SECTIONS — ajoutées au fur et à mesure des screenshots
   ============================================================ */

/* Gris de texte accessible : #7E7E7E de la charte passe sous 4.5:1 en corps de texte,
   on le garde pour les labels et on descend d'un cran pour le texte courant. */
:root { --text-muted: #57505C; --hairline: #E7E2ED; }

/* Le bandeau d'annonce est retiré pour l'instant ; ses styles sont conservés
   dans l'historique git si on le remet. */

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  /* Fond translucide + flou : le contenu passe dessous sans gêner la lecture. */
  background: rgba(250, 249, 252, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.nav-wrap.is-scrolled { border-bottom-color: var(--hairline); background: rgba(250, 249, 252, 0.92); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-lg); padding-block: var(--space-md);
}
.nav__left { display: flex; align-items: center; gap: var(--space-sm); flex: none; }
.nav__brand { display: flex; align-items: center; flex: none; }
.nav__brand img { height: 26px; width: auto; }

.menu { display: flex; align-items: center; gap: 0.15rem;
  list-style: none; margin: 0; padding: 0; }
.menu__item { position: relative; }

.menu__link {
  display: inline-flex; align-items: center; gap: 0.28rem;
  font-family: var(--font-body); font-size: 0.9375rem; font-weight: 500;
  color: var(--text-primary); text-decoration: none;
  background: none; border: 0; cursor: pointer;
  padding: 0.5rem 0.7rem; border-radius: var(--radius-btn);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.menu__link:hover { background: rgba(255,255,255,0.7); color: var(--k-purple); }
.menu__chev { width: 12px; height: 12px; transition: transform 0.18s ease; }

/* Le panneau s'ouvre au survol ET au focus clavier : pas de JS, et tabulable. */
.menu__panel {
  position: absolute; top: calc(100% + 0.45rem); left: 50%; translate: -50% 0;
  z-index: 40; min-width: 15rem;
  background: var(--k-white); border: 1px solid var(--hairline);
  border-radius: var(--radius-card); box-shadow: var(--shadow-float);
  padding: 0.45rem;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.menu__panel--wide { min-width: 19.5rem; }
.menu__panel ul { list-style: none; margin: 0; padding: 0; }

.menu__item--has-sub:hover .menu__panel,
.menu__item--has-sub:focus-within .menu__panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.menu__item--has-sub:hover .menu__chev,
.menu__item--has-sub:focus-within .menu__chev { transform: rotate(180deg); }
.menu__item--has-sub:hover > .menu__link,
.menu__item--has-sub:focus-within > .menu__link { color: var(--k-purple); }

/* Pont invisible sous le bouton : la souris peut descendre sans fermer le menu. */
.menu__item--has-sub::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 0.5rem;
}

.mi {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 0.6rem; border-radius: var(--radius-btn);
  text-decoration: none; color: var(--text-primary); font-size: 0.9375rem;
  transition: background-color 0.13s ease;
}
.mi:hover { background: var(--k-purple-bg); }
.mi__icon {
  flex: none; display: grid; place-items: center; width: 1.9rem; height: 1.9rem;
  border-radius: 8px; background: var(--k-purple-bg); color: var(--k-purple);
}
.mi__icon svg { width: 16px; height: 16px; }
.mi__label { line-height: 1.3; }
.mi__soon {
  display: inline-block; margin-left: 0.35rem; vertical-align: 1px;
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.03em;
  color: var(--text-muted); background: var(--k-gray-bg);
  border: 1px solid var(--hairline); padding: 0.05rem 0.4rem;
  border-radius: var(--radius-pill);
}

.nav__actions { display: flex; align-items: center; gap: var(--space-sm); flex: none; }
.btn--soft { background: rgba(255,255,255,0.72); color: var(--text-primary); border: 1px solid var(--hairline); }
.btn--soft:hover { background: var(--k-white); }
.nav__actions .btn { padding: 0.6rem 0.95rem; font-size: 0.9375rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-block: clamp(3rem, 7vw, 6rem) var(--section-gap);
  /* Mesh Kalent : crème en haut à gauche, violet sur les bords,
     centre éclairci pour garder le titre lisible (règle de la slide 17). */
  /* Repris tel quel de .hero1_section en prod :
     noise-pattern.svg répété par-dessus sun.avif en 2000px, position 10% 40%. */
  background-color: var(--surface-page);
  background-image:
    linear-gradient(rgba(255,255,255,0.42), rgba(255,255,255,0.42)),   /* voile : adoucit le violet */
    url('../assets/sun.avif');
  background-position: 0 0, 10% 40%;
  background-repeat: repeat, no-repeat;
  background-size: auto, 2200px;
}
.hero::after { z-index: 0; }              /* grain au-dessus du fond, sous le fondu */
.hero__inner { position: relative; z-index: 2; display: flex; flex-direction: column;
  align-items: center; text-align: center; }

.hero__pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: rgba(255,255,255,0.8); border: 1px solid var(--hairline);
  border-radius: var(--radius-pill); padding: 0.45rem 0.95rem;
  font-size: var(--fs-small); color: var(--text-primary); text-decoration: none;
  box-shadow: 0 1px 2px rgba(10,4,6,0.04); backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.hero__pill { margin: 0; padding-left: 0.55rem; }
.hero__pill img { width: 20px; height: 20px; }
.hero__pill img + img { margin-left: -0.3rem; }

.hero__title { margin-top: var(--space-2xl); max-width: none; }
/* Coupures choisies : « candidate's signal » reste d'un bloc, « in real time » conclut.
   Sur petit écran on laisse le texte se replacer tout seul. */
@media (max-width: 760px) { .br-lg { display: none; } }
.hero__lead {
  margin: var(--space-xl) 0 0; font-size: var(--fs-lead);
  color: var(--text-muted); max-width: 54ch; line-height: 1.65;
}

.hero__cta { display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--space-sm); margin-top: var(--space-xl); }  /* sous le widget de recherche */
.btn--ghost { background: var(--k-white); color: var(--k-black); }
.btn--ghost:hover { background: var(--k-purple-bg); }
.btn__arrow--ghost { background: var(--k-purple-bg); color: var(--k-black); }
.btn--ghost:hover .btn__arrow--ghost { background: var(--k-white); }

/* ---------- Widget de recherche ---------- */
.searchbox {
  width: min(740px, 100%); margin-top: clamp(2rem, 4vw, 2.75rem);
  background: var(--k-white); border-radius: var(--radius-card);
  box-shadow: var(--shadow-float); padding: var(--space-md) var(--space-lg);
  text-align: left;
}
/* Requête tapée en direct. Le texte complet est dans le HTML source :
   le script le réécrit, il ne le crée pas. */
.searchbox__typed {
  margin: 0 0 var(--space-sm); min-height: 3.1em;
  font-size: 1rem; line-height: 1.5; color: var(--text-primary);
  text-align: left;
}
.searchbox__caret {
  display: inline-block; width: 2px; height: 1.05em; margin-left: 1px;
  vertical-align: -0.16em; background: var(--k-purple);
  animation: caret-blink 1.05s steps(1) infinite;
}
@keyframes caret-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .searchbox__caret { animation: none; } }
.searchbox__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }

.searchbox__tabs { display: inline-flex; background: var(--k-gray-bg);
  border-radius: var(--radius-btn); padding: 3px; }
.tab {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 0; background: transparent;
  font-family: var(--font-body); font-size: 0.9375rem; font-weight: 500;
  color: var(--text-muted); padding: 0.45rem 0.8rem; border-radius: 8px;
}
.tab.is-active { background: var(--k-white); color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(10,4,6,0.08); }
.tab__icon { display: grid; place-items: center; width: 1rem; height: 1rem; }
.tab__icon svg { width: 100%; height: 100%; }
.tab.is-active .tab__icon { color: var(--text-primary); }

.searchbox__actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem;
  border: 0; border-radius: 8px; cursor: pointer;
  background: var(--k-gray-bg); color: var(--text-muted); font-size: 1.05rem;
}
.icon-btn:hover { background: #ECE7F3; }
.icon-btn--go { background: var(--k-purple); color: var(--k-white); }
.icon-btn--go:hover { background: #6D2FD9; }

/* ---------- Éléments flottants du hero ---------- */
.float { position: absolute; z-index: 2; }
.float--signals { top: 42%; left: 4.5%; }
.float--sources { top: 66%; right: 4.5%; }

/* B · extrait de réponse API */
.apicard {
  margin: 0; background: #16111C; color: #E6DFF2; border-radius: 12px;
  padding: 0.9rem 1.05rem; font-size: 0.75rem; line-height: 1.75;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  box-shadow: 0 2px 8px rgba(22,17,28,0.18), 0 20px 45px rgba(22,17,28,0.24);
}
.apicard .k { color: #B88EFF; }
.apicard .s { color: #86E1A8; }
.apicard .b { color: #FFD479; }

/* C · bandeau de sources */
.srcbar {
  display: flex; align-items: center; gap: 0.6rem;
  background: rgba(255,255,255,0.78); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 0.42rem 0.95rem 0.42rem 0.42rem;
  box-shadow: 0 3px 12px rgba(55,12,130,0.07); backdrop-filter: blur(8px);
}
.srcbar__dots { display: flex; }
.srcbar__dot {
  width: 24px; height: 24px; border-radius: 50%; background: #fff;
  border: 2px solid #fff; margin-left: -7px; display: grid; place-items: center;
  box-shadow: 0 1px 3px rgba(10,4,6,0.18);
}
.srcbar__dot:first-child { margin-left: 0; }
.srcbar__dot svg { width: 14px; height: 14px; }
.srcbar__txt { font-size: 0.8125rem; font-weight: 500; color: #3D3644; line-height: 1.45;
  text-align: center; }

/* D · signaux, étiquette nue */
.bare {
  display: flex; align-items: center; gap: 0.5rem; margin: 0;
  font-size: 0.8125rem; font-weight: 500; color: #3D3644; line-height: 1.45;
  text-align: center; gap: 0.5rem;
  background: rgba(255,255,255,0.78); border: 1px solid var(--hairline);
  border-radius: var(--radius-pill); padding: 0.5rem 0.95rem;
  box-shadow: 0 3px 12px rgba(55,12,130,0.07); backdrop-filter: blur(8px);
}
.bare__pulse {
  position: relative; width: 9px; height: 9px; border-radius: 50%;
  background: #17A34A; flex: none;
  box-shadow: 0 0 0 4px rgba(23,163,74,0.18);
  animation: signal-core 2.4s ease-in-out infinite;
}
/* Onde qui part du point, comme un signal qui tombe */
.bare__pulse::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #17A34A;
  animation: signal-ring 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}
@keyframes signal-ring {
  0%   { transform: scale(1);   opacity: 0.65; }
  70%  { transform: scale(3.4); opacity: 0; }
  100% { transform: scale(3.4); opacity: 0; }
}
@keyframes signal-core {
  0%, 100% { background: #17A34A; }
  50%      { background: #22C55E; }
}

/* ============================================================
   GRILLE DE LOGOS
   ============================================================ */
/* Fond commun à toutes les sections de contenu : blanc cassé + points gris.
   Seul le hero garde le dégradé. */
.logos {
  position: relative; isolation: isolate;
}
.logos > .container { position: relative; z-index: 1; }
.logos__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline);
}
.logos__cell {
  position: relative; display: grid; place-items: center;
  min-height: 108px; padding: var(--space-lg);
  border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.logos__cell img { max-height: 26px; width: auto;
  filter: grayscale(1) brightness(0.35); opacity: 0.9; }
.logos__cell--text { font-family: var(--font-display); font-weight: 500;
  letter-spacing: 0.04em; color: var(--text-primary); }
.logos__arrow { position: absolute; top: 0.6rem; right: 0.7rem;
  font-size: 0.75rem; color: var(--text-muted); opacity: 0.5; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1180px) {
  .float { display: none; }                 /* décoratif : on le retire avant qu'il gêne */
}
@media (max-width: 960px) {
  .nav__menu { display: none; }
  .logos__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .nav__actions .btn--soft { display: none; }
  .hero__title { max-width: 100%; }
  .hero__cta { flex-direction: column; align-self: stretch; }
  .hero__cta .btn { justify-content: center; }
  .searchbox__row { flex-direction: column; align-items: stretch; gap: var(--space-sm); }
  .searchbox__actions { justify-content: flex-end; }
  .logos__grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Correctifs passe 2 --- */
.nav__brand img { height: 30px; }

/* Le dégradé se coupait net au-dessus des logos : fondu vers le blanc en bas. */
/* Fondu du hero vers la couleur exacte de la page, posé AU-DESSUS du grain :
   la jonction avec la bande de logos est un simple dégradé, sans bande grise. */
.hero::before {
  content: ''; position: absolute; inset: auto 0 0 0; height: 240px; z-index: 1;
  background: linear-gradient(to bottom,
    rgba(250, 249, 252, 0) 0%,
    rgba(250, 249, 252, 0.55) 45%,
    var(--surface-page) 100%);
  pointer-events: none;
}
.chip__star { width: 13px; height: auto; }
.float--left  { top: 56%; left: 0.5%; }
.float--right { top: 33%; right: 0.5%; }

/* ---------- Sélecteur de langue ---------- */
.lang { position: relative; }
.lang summary {
  display: inline-flex; align-items: center; gap: 0.35rem;
  list-style: none; cursor: pointer; padding: 0.5rem 0.6rem;
  border-radius: var(--radius-btn); font-size: 0.9375rem; color: var(--text-primary);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: rgba(255,255,255,0.6); }
.lang summary svg { width: 17px; height: 17px; }
.lang ul {
  position: absolute; top: calc(100% + 0.35rem); right: 0; z-index: 30;
  list-style: none; margin: 0; padding: 0.3rem; min-width: 150px;
  background: var(--k-white); border: 1px solid var(--hairline);
  border-radius: var(--radius-btn); box-shadow: var(--shadow-card);
}
.lang a {
  display: block; padding: 0.45rem 0.6rem; border-radius: 6px;
  font-size: 0.9375rem; text-decoration: none; color: var(--text-primary);
}
.lang a:hover { background: var(--k-purple-bg); }
.lang a[aria-current] { color: var(--k-purple); font-weight: 500; }

/* Cibles mises en pastille dans le sous-titre */
/* ============================================================
   KICKER DE SECTION
   Repris de .tag sur la LP en prod : petit tag à coins arrondis,
   fond dégradé en image, pastille étoile + libellé.
   ============================================================ */
.kicker {
  display: flex; width: max-content; align-items: center; gap: 0.25rem;
  height: 1.625rem; padding-inline: 0.38rem;
  /* Les têtes de section sont centrées : le kicker l'est aussi. */
  margin: 0 auto var(--space-md);
  border-radius: 0.25rem;
  background-image: url('../assets/tag-bg.avif');
  background-position: 0 0; background-repeat: no-repeat; background-size: cover;
  font-size: 0.875rem; font-weight: 500; color: var(--text-primary);
  white-space: nowrap;
}
.kicker img { width: 13px; height: auto; flex: none; }

/* Mots clés des sous-titres : violet signature + Inter Semi-Bold.
   C'est la règle du brand guidelines — mise en évidence en Inter Bold —
   et le motif déjà utilisé par le témoignage en prod. */
.hero__lead strong,
.uc__intro strong { color: var(--k-purple); font-weight: 600; }

/* « API » accolé au logo : le nom du produit est Kalent API. */
.nav__brand { gap: 0.45rem; text-decoration: none; }
.nav__api {
  font-family: var(--font-display); font-weight: 500; font-size: 1.125rem;
  line-height: 1; color: var(--k-purple);
  padding: 0.18rem 0.45rem; border-radius: 6px;
  background: var(--k-purple-bg); border: 1px solid rgba(124, 58, 237, 0.22);
}

