/* Composants du site Komokrea. */

/* ── En-tête ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, .86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--ligne);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--texte);
  flex-shrink: 0;
}
.brand:hover { color: var(--texte); }
.brand img { width: 32px; height: 32px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.nav-toggle {
  margin-left: auto;
  font: inherit;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--texte);
  background: var(--surface);
  border: 1px solid var(--ligne-forte);
  border-radius: var(--r-pill);
  padding: var(--s-2) var(--s-4);
  cursor: pointer;
}

.site-nav { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; color: var(--texte-doux); font-weight: 500; font-size: var(--fs-sm); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--texte); }

.no-js .site-nav,
.site-nav.is-open {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  padding: var(--s-5) var(--s-4) var(--s-6);
  background: var(--nuit-2);
  border-bottom: 1px solid var(--ligne);
}
.site-nav.is-open > ul:first-child { display: flex; flex-direction: column; gap: var(--s-3); }
.site-nav.is-open > ul:first-child a { font-size: var(--fs-lg); color: var(--texte); }

.lang-switch { display: flex; gap: var(--s-1); }
.lang-switch li { margin: 0; }
.lang-switch a {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs) !important;
  font-weight: 700 !important;
  letter-spacing: .04em;
}
.lang-switch a[aria-current="true"] { background: var(--surface-2); color: var(--texte); }

.nav-actions { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.nav-login { color: var(--texte) !important; }

@media (min-width: 1040px) {
  .nav-toggle { display: none; }
  .site-nav, .no-js .site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--s-5);
    flex: 1;
    position: static;
    padding: 0;
    background: none;
    border: 0;
  }
  .site-nav > ul:first-child { display: flex; gap: var(--s-5); margin-left: var(--s-6); }
  .site-nav > ul:first-child li { margin: 0; }
  .lang-switch { margin-left: auto; }
}

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-base);
  line-height: 1.2;
  text-decoration: none;
  color: var(--nuit);
  background: var(--acide);
  border: 1.5px solid var(--acide);
  border-radius: var(--r-pill);
  padding: 13px 24px;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--acide-fonce); border-color: var(--acide-fonce); color: var(--nuit); transform: translateY(-1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { font-size: var(--fs-sm); padding: 9px 18px; }
.site-nav .btn { color: var(--nuit); }
.btn-ghost { background: transparent; color: var(--texte); border-color: var(--ligne-forte); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--texte-faible); color: var(--texte); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { padding-block: var(--s-8); }
.section-tight { padding-block: var(--s-6) var(--s-8); }
.section-alt {
  background: var(--nuit-2);
  border-block: 1px solid var(--ligne);
}
@media (min-width: 760px) { .section { padding-block: var(--s-9); } }

.section-head { max-width: 760px; margin-bottom: var(--s-7); }
.section-head h2 { margin-bottom: var(--s-4); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--acide);
  margin-bottom: var(--s-4);
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acide);
  box-shadow: 0 0 0 4px var(--acide-voile);
}

.lead { font-size: var(--fs-lg); color: var(--texte-doux); line-height: 1.55; }
.fine { font-size: var(--fs-sm); color: var(--texte-faible); margin-top: var(--s-5); }

/* ── Accueil : héros ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--s-8) var(--s-8);
  background:
    radial-gradient(600px 320px at 85% 10%, rgba(198, 244, 50, .10), transparent 70%),
    radial-gradient(520px 300px at 10% 90%, rgba(92, 200, 255, .07), transparent 70%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: var(--s-7); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 56ch; margin-bottom: var(--s-6); }
.hero-note { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--texte-faible); }
@media (min-width: 960px) {
  .hero { padding-block: var(--s-9); }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: var(--s-8); }
}

.flow-card {
  margin: 0;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--ligne-forte);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-card);
}
.flow-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  padding-bottom: var(--s-4);
  margin-bottom: var(--s-4);
  border-bottom: 1px dashed var(--ligne-forte);
}
.flow-product { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); }
.flow-price { font-family: var(--font-mono); color: var(--acide); font-weight: 700; white-space: nowrap; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.flow-steps li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-3);
  margin: 0;
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--ligne);
  font-size: var(--fs-sm);
}
.flow-steps .icon { width: 20px; height: 20px; color: var(--ok); }
.flow-steps small { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--texte-faible); }
.flow-steps .is-final { border-color: rgba(198, 244, 50, .45); background: var(--acide-voile); }
.flow-steps .is-final .icon { color: var(--acide); }
.flow-card figcaption { margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--texte-faible); }
@media (max-width: 420px) {
  .flow-steps li { grid-template-columns: auto 1fr; }
  .flow-steps small { display: none; }
}

/* ── Grilles et cartes ───────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--s-4); }
@media (min-width: 680px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .grid { gap: var(--s-5); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  transition: border-color .2s ease;
}
.card:hover { border-color: var(--ligne-forte); }
.card h3 { font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.card p { color: var(--texte-doux); font-size: var(--fs-sm); margin: 0; }
.card-plain { background: transparent; }
.card-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--acide-voile);
  color: var(--acide);
  margin-bottom: var(--s-4);
}
.card-icon .icon { width: 22px; height: 22px; }

.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-4); }
.module-num { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--texte-faible); }
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--r-pill);
}
.tag-soon { color: var(--ambre); background: var(--ambre-voile); }

.chips { list-style: none; padding: 0; margin: 0 0 var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips li {
  margin: 0;
  padding: 6px 14px;
  border: 1px solid var(--ligne-forte);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--texte);
  background: var(--surface);
}

.sdk-band {
  display: grid;
  gap: var(--s-5);
  align-items: center;
  margin-top: var(--s-6);
  padding: var(--s-5);
  border: 1px solid var(--ligne-forte);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.sdk-band h3 { display: flex; align-items: center; gap: var(--s-2); }
.sdk-band h3 .icon { color: var(--acide); flex-shrink: 0; }
.sdk-band p { color: var(--texte-doux); margin: 0; }
.code {
  margin: 0;
  padding: var(--s-4) var(--s-5);
  background: var(--nuit);
  border: 1px solid var(--ligne);
  border-radius: var(--r-md);
  color: var(--acide);
  font-size: var(--fs-sm);
  line-height: 1.8;
  overflow-x: auto;
}
@media (min-width: 860px) { .sdk-band { grid-template-columns: 1.3fr 1fr; padding: var(--s-6); } }

/* ── Étapes ──────────────────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-4); counter-reset: step; }
.step {
  margin: 0;
  position: relative;
  padding: var(--s-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--ligne);
  background: var(--surface);
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--acide);
  color: var(--nuit);
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: var(--s-4);
}
.step h3 { font-size: var(--fs-lg); }
.step p { color: var(--texte-doux); font-size: var(--fs-sm); margin: 0; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); } }

/* ── Sécurité ────────────────────────────────────────────────────────────── */
.split { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--s-8); } }
.checklist { list-style: none; padding: 0; margin: 0 0 var(--s-5); display: grid; gap: var(--s-3); }
.checklist li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3);
  margin: 0;
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--ligne);
  color: var(--texte-doux);
  font-size: var(--fs-sm);
}
.checklist .icon { width: 20px; height: 20px; color: var(--acide); margin-top: 2px; }

/* ── Tarifs ──────────────────────────────────────────────────────────────── */
.price-card .price-line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xl);
  color: var(--texte);
  margin-bottom: var(--s-3);
  line-height: 1.2;
}
.price-card.is-featured { border-color: rgba(198, 244, 50, .5); box-shadow: 0 0 0 1px rgba(198, 244, 50, .15), var(--shadow-card); }
.price-card.is-featured h3 { color: var(--acide); }

/* ── Bandeau d'appel ─────────────────────────────────────────────────────── */
.cta-band {
  display: grid;
  gap: var(--s-5);
  align-items: center;
  padding: var(--s-6) var(--s-5);
  border-radius: var(--r-lg);
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(198, 244, 50, .16), transparent 70%),
    var(--surface-2);
  border: 1px solid var(--ligne-forte);
}
.cta-band h2 { font-size: var(--fs-2xl); }
.cta-band p { color: var(--texte-doux); margin: 0; max-width: 60ch; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1fr auto; padding: var(--s-7); } }

/* ── Pages de texte ──────────────────────────────────────────────────────── */
.page-head {
  padding-block: var(--s-8) var(--s-5);
  border-bottom: 1px solid var(--ligne);
  background: radial-gradient(500px 240px at 90% 0%, rgba(198, 244, 50, .07), transparent 70%);
}
.page-head h1 { font-size: var(--fs-3xl); max-width: 22ch; }
.page-head .lead { max-width: 62ch; }

.prose { padding-block: var(--s-6) var(--s-8); color: var(--texte-doux); }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--s-7); color: var(--texte); }
.prose h3 { font-size: var(--fs-lg); margin-top: var(--s-5); }
.prose a { color: var(--acide); }

/* ── Formulaire ──────────────────────────────────────────────────────────── */
.split-form { align-items: start; }
.side-card { margin-top: var(--s-5); }
.side-card p { margin-bottom: var(--s-4); }
.form-card {
  background: var(--surface);
  border: 1px solid var(--ligne-forte);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
@media (min-width: 600px) { .form-card { padding: var(--s-6); } }
.form { display: grid; gap: var(--s-4); }
.field-row { display: grid; gap: var(--s-4); }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 600; font-size: var(--fs-sm); color: var(--texte); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: var(--fs-base);
  color: var(--texte);
  background: var(--nuit);
  border: 1px solid var(--ligne-forte);
  border-radius: var(--r-sm);
  padding: 11px 13px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--texte-faible); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--acide); outline: none; box-shadow: 0 0 0 3px var(--acide-voile); }
.field-check { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); font-size: var(--fs-sm); color: var(--texte-doux); }
.field-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--acide); }
.field-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--ligne-forte);
  background: var(--surface-2);
  margin-bottom: var(--s-4);
}
.notice p { margin: 0; }
.notice-ok { border-color: rgba(74, 222, 128, .5); background: rgba(74, 222, 128, .08); }
.notice-error { border-color: rgba(255, 107, 91, .5); background: rgba(255, 107, 91, .08); }
.form-status:focus { outline: none; }

/* ── Pied de page ────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--ligne); background: var(--nuit-2); padding-block: var(--s-7) var(--s-5); font-size: var(--fs-sm); }
.footer-grid { display: grid; gap: var(--s-6); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-brand p { color: var(--texte-faible); margin-top: var(--s-4); max-width: 36ch; }
.site-footer h2 {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--texte-faible);
  margin-bottom: var(--s-4);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { color: var(--texte-doux); text-decoration: none; }
.site-footer li a:hover { color: var(--texte); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--ligne);
  color: var(--texte-faible);
  font-size: var(--fs-xs);
}
.footer-bottom p { margin: 0; }
