/**
 * Manusk UI — chrome de reconnaissance + primitives partagées
 * Dépend de manusk-tokens.css
 *
 * Activer sur la page :
 *   <html class="manusk-app" data-manusk-product="…">
 *   ou <body class="manusk-app" data-manusk-product="…">
 */

@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap");

/* —— Signature bar (reconnaissance immédiate, une seule fois) —— */
body.manusk-app::before,
html.manusk-app > body:not(.manusk-app)::before {
  content: "";
  display: block;
  height: var(--m-signature-bar);
  width: 100%;
  background: var(--m-gradient-signature);
  position: sticky;
  top: 0;
  z-index: 10000;
  flex-shrink: 0;
}

html.manusk-app,
body.manusk-app {
  font-family: var(--m-font-sans);
  color: var(--m-text);
  line-height: var(--m-lh-body);
  -webkit-font-smoothing: antialiased;
}

body.manusk-app,
html.manusk-app > body {
  margin: 0;
  min-height: 100%;
  font-family: var(--m-font-sans);
  background: var(--m-gradient-hero), var(--m-canvas);
  background-attachment: fixed;
  color: var(--m-text);
  line-height: var(--m-lh-body);
}

/* —— Typo de base —— */
.manusk-app h1,
.manusk-app h2,
.manusk-app h3,
body.manusk-app h1,
body.manusk-app h2,
body.manusk-app h3 {
  font-family: var(--m-font-sans);
  font-weight: var(--m-fw-bold);
  letter-spacing: var(--m-track-title);
  line-height: var(--m-lh-tight);
  color: var(--m-text);
}

.manusk-eyebrow {
  font-size: var(--m-fs-xs);
  font-weight: var(--m-fw-semibold);
  letter-spacing: var(--m-track-eyebrow);
  text-transform: uppercase;
  color: var(--m-accent);
  margin: 0 0 0.5rem;
}

.manusk-muted {
  color: var(--m-muted);
}

/* —— Badge écosystème —— */
.manusk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.7rem 0.28rem 0.35rem;
  border-radius: var(--m-radius-pill);
  background: color-mix(in srgb, var(--m-primary) 22%, var(--m-surface));
  border: 1px solid color-mix(in srgb, var(--m-primary) 45%, var(--m-border));
  color: var(--m-text);
  font-family: var(--m-font-sans);
  font-size: var(--m-fs-xs);
  font-weight: var(--m-fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.manusk-badge img,
.manusk-badge .manusk-badge-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  flex-shrink: 0;
}

.manusk-badge-mark {
  display: grid;
  place-items: center;
  background: var(--m-gradient-mark);
  color: var(--m-text);
  font-size: 0.65rem;
  font-weight: 700;
}

.manusk-badge--footer {
  opacity: 0.92;
}

.manusk-badge--footer:hover {
  opacity: 1;
  border-color: var(--m-accent);
}

/* —— Footer écosystème (auto si .manusk-footer présent) —— */
.manusk-footer {
  margin-top: 2.5rem;
  padding: 1.25rem 1rem 1.75rem;
  border-top: 1px solid var(--m-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: var(--m-fs-sm);
  color: var(--m-muted);
}

.manusk-footer a {
  color: var(--m-accent);
  text-decoration: none;
}

.manusk-footer a:hover {
  text-decoration: underline;
}

/* —— Primitives UI —— */
.manusk-card {
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-lg);
  padding: 1rem 1.1rem;
  box-shadow: var(--m-shadow-soft);
}

.manusk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border: none;
  border-radius: var(--m-radius);
  font-family: var(--m-font-sans);
  font-size: var(--m-fs-base);
  font-weight: var(--m-fw-semibold);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease;
}

.manusk-btn:active {
  transform: scale(0.98);
}

.manusk-btn--primary {
  background: var(--m-primary);
  color: var(--m-white);
}

.manusk-btn--primary:hover {
  background: var(--m-primary-hover);
}

.manusk-btn--secondary {
  background: var(--m-surface-2);
  color: var(--m-text);
  border: 1px solid var(--m-border-strong);
}

.manusk-btn--accent {
  background: var(--m-product-accent);
  color: var(--m-canvas);
}

.manusk-input {
  width: 100%;
  min-height: var(--m-touch);
  border-radius: var(--m-radius-sm);
  border: 1px solid var(--m-border-strong);
  background: var(--m-canvas);
  color: var(--m-text);
  padding: 0.75rem 0.9rem;
  font-family: var(--m-font-sans);
  font-size: var(--m-fs-base);
}

.manusk-input:focus {
  outline: 2px solid color-mix(in srgb, var(--m-accent) 55%, transparent);
  outline-offset: 1px;
  border-color: var(--m-accent);
}

.manusk-link {
  color: var(--m-accent);
  text-decoration: none;
}

.manusk-link:hover {
  text-decoration: underline;
}

/* —— Topbar marque —— */
.manusk-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--m-primary-dark);
  border-bottom: 1px solid var(--m-border);
}

.manusk-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: var(--m-fw-bold);
  font-size: var(--m-fs-lg);
  color: var(--m-text);
  text-decoration: none;
}

.manusk-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.manusk-product-name {
  font-weight: var(--m-fw-bold);
}

.manusk-product-name .by {
  font-weight: var(--m-fw-semibold);
  font-size: var(--m-fs-xs);
  color: var(--m-accent);
  letter-spacing: var(--m-track-eyebrow);
  text-transform: uppercase;
  margin-left: 0.35rem;
}

/* Focus ring accessible */
.manusk-app :focus-visible {
  outline: 2px solid var(--m-accent);
  outline-offset: 2px;
}
