/* ==========================================================================
   Kinkly — charte du site vitrine
   Reprise de la direction « 1C — Clair & joueur » (Claude Design, tour 1).
   Fond clair, Space Grotesk, accent magenta, bande sombre de rupture.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #faf6f4;
  --surface: #fff;
  --surface-alt: #f3ece9;
  --dark: #1c1418;

  /* Traits */
  --border: #ece4e0;
  --border-strong: #e6ddd9;
  --border-input: #ded3ce;

  /* Texte */
  --text: #1c1418;
  --text-muted: #5d5158;
  --text-subtle: #8a7d83;
  --on-dark: #faf6f4;
  --on-dark-muted: #c9bdb8;

  /* Accent */
  --accent: #c4007a;
  --accent-deep: #8f0f68;
  --accent-soft: #f3e4f0;
  --accent-wash: #f9e9f4;
  --accent-on-dark: #ff7ec6;

  /* Rythme */
  --radius-sm: 9px;
  --radius: 12px;
  --radius-lg: 18px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(48px, 8vw, 72px);
  --maxw: 1080px;

  --shadow-card: 0 18px 50px rgba(28, 20, 24, .07);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { opacity: .78; }

/* Liens dans les paragraphes de contenu : soulignés, sinon invisibles. */
.prose a,
p a:not(.btn):not(.card) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { letter-spacing: -.02em; text-wrap: balance; margin-top: 0; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ En-tête */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  flex: none;
}
.logo img { width: 34px; height: 34px; object-fit: contain; }

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14.5px;
  color: var(--text-muted);
}
.nav a[aria-current="page"] { color: var(--text); font-weight: 500; }
.nav .sep { color: #c9bdb8; }
.nav .lang-on { color: var(--text); font-weight: 500; }
.nav .lang-switch {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .04em;
}
.nav .lang-switch:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  border: 1px solid var(--border-input);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
}

/* --------------------------------------------------------------- Boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  border-radius: 11px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { opacity: 1; transform: translateY(-1px); }
.btn:active { transform: none; }

.btn-primary { background: var(--dark); color: var(--on-dark); font-weight: 700; }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(28, 20, 24, .18); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-input); }
.btn-secondary:hover { box-shadow: 0 10px 24px rgba(28, 20, 24, .08); }

.btn-sm { padding: 10px 18px; font-size: 14.5px; border-radius: var(--radius-sm); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }

/* ------------------------------------------------------------------- Héros */

.hero {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(28px, 4vw, 44px);
  align-items: center;
  padding-block: clamp(40px, 7vw, 64px) clamp(40px, 6vw, 56px);
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 49px);
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 0 0 20px;
  font-weight: 700;
}
.hero h1 .accent { color: var(--accent); }

.lead {
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 30px;
  max-width: 44ch;
  text-wrap: pretty;
}

.hero-note { font-size: 13.5px; color: var(--text-subtle); margin: 16px 0 0; }

/* ------------------------------------------- Aperçu jouable du questionnaire */

.teaser {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-card);
}

.teaser-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-subtle);
}
.teaser-head .label { letter-spacing: .08em; text-transform: uppercase; }

.teaser h2 { font-size: clamp(19px, 2.6vw, 23px); line-height: 1.25; margin: 0 0 6px; font-weight: 700; }
.teaser-cat { font-size: 14.5px; color: var(--text-subtle); margin: 0 0 22px; }

.teaser-options { display: flex; flex-direction: column; gap: 10px; }

.teaser-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 15.5px;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.teaser-option:hover { border-color: var(--accent); }
.teaser-option .hint { font-size: 13px; color: var(--text-subtle); flex: none; }
.teaser-option[aria-pressed="true"] {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--accent-deep);
}
.teaser-option[aria-pressed="true"] .hint { color: var(--accent-deep); }

.teaser-foot { font-size: 13px; color: var(--text-subtle); margin: 20px 0 0; line-height: 1.55; }

/* ------------------------------------------------------- Bande sombre étapes */

.band-dark {
  background: var(--dark);
  color: var(--on-dark);
  padding-block: var(--section-y);
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 36px); }
.step-title { font-size: 15px; font-weight: 700; color: var(--accent-on-dark); margin-bottom: 12px; }
.steps p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--on-dark-muted); }

/* ------------------------------------------------------------- Sections */

.section { padding-block: var(--section-y); }
.section-alt { background: var(--surface-alt); border-top: 1px solid var(--border-strong); }
.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
}

.section h2 { font-size: clamp(26px, 4vw, 36px); line-height: 1.1; margin: 0 0 18px; font-weight: 700; }
.section-lead { font-size: 16px; color: var(--text-muted); margin: 0 0 32px; max-width: 54ch; }

.stack { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { font-size: 16px; margin: 0 0 6px; font-weight: 700; }
.card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-muted); }

/* Emplacement de l'illustration. Format carré, image à déposer dans
   lib/pictures/. Tant qu'elle est absente, un motif discret tient la place. */
.illustration {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(196, 0, 122, .07), transparent 55%),
    radial-gradient(circle at 72% 70%, rgba(143, 15, 104, .06), transparent 55%),
    var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.illustration img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------- Cartes SEO */

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.card-link {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 26px;
  display: block;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card-link:hover { opacity: 1; transform: translateY(-2px); box-shadow: var(--shadow-card); }
.card-link .eyebrow {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.card-link h3 { font-size: 19px; margin: 0 0 8px; font-weight: 700; }
.card-link p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-muted); }

/* ---------------------------------------------------------------- CTA final */

.cta {
  padding-block: clamp(52px, 8vw, 72px);
  text-align: center;
  border-top: 1px solid var(--border-strong);
}
.cta h2 {
  font-size: clamp(28px, 4.6vw, 42px);
  letter-spacing: -.025em;
  margin: 0 0 14px;
  font-weight: 700;
  line-height: 1.08;
}
.cta p { font-size: 17px; color: var(--text-muted); margin: 0 auto 28px; max-width: 46ch; }

/* ------------------------------------------------------------- Pied de page */

.site-footer {
  border-top: 1px solid var(--border-strong);
  padding-block: 36px;
  font-size: 13.5px;
  color: var(--text-subtle);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: inherit; }
.site-footer .credit a { color: var(--text-muted); }

/* -------------------------------------------------- Pages de contenu */

.page-head { padding-block: clamp(32px, 5vw, 52px) 8px; }
.back-link { font-size: 14px; color: var(--text-subtle); display: inline-block; margin-bottom: 20px; }
.page-title { font-size: clamp(30px, 5vw, 42px); margin: 0 0 10px; font-weight: 700; letter-spacing: -.025em; }
.page-lead { font-size: 17px; color: var(--text-muted); margin: 0; max-width: 60ch; }

.prose { padding-block: clamp(28px, 4vw, 40px) var(--section-y); max-width: 72ch; }
.prose h2 { font-size: clamp(20px, 3vw, 24px); margin: 40px 0 10px; font-weight: 700; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17px; margin: 26px 0 6px; font-weight: 700; }
.prose p { margin: 0 0 14px; color: var(--text-muted); }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; color: var(--text-muted); }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--text); }

.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0;
}
.note p:last-child { margin-bottom: 0; }

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  word-break: break-all;
}

/* ----------------------------------------------------------------- Mobile */

@media (max-width: 900px) {
  .hero, .section-split { grid-template-columns: 1fr; }
  .steps, .cards-3 { grid-template-columns: 1fr; }
  .illustration { max-width: 480px; margin-inline: auto; }
  .lead { max-width: none; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-header .container { flex-wrap: wrap; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-block: 8px 12px;
    font-size: 16px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding-block: 9px; }
  .nav .sep { display: none; }
  .nav .btn { margin-top: 8px; }
  .site-footer .container { flex-direction: column; gap: 18px; }
  .footer-links { gap: 14px 20px; }
}

/* Sans JavaScript, le menu reste déplié plutôt qu'inaccessible. */
@media (max-width: 760px) {
  html.no-js .nav { display: flex; }
  html.no-js .nav-toggle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------- Glossaire, FAQ, test */

.chip-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.chip-nav a {
  display: inline-block;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-size: 14px;
  color: var(--text-muted);
}
.chip-nav a:hover { opacity: 1; border-color: var(--accent); color: var(--accent); }

.glossary { max-width: none; }
.glossary h2 {
  font-size: clamp(21px, 3vw, 26px);
  margin: 48px 0 6px;
  scroll-margin-top: 90px;
}
.glossary h2:first-of-type { margin-top: 8px; }
.glossary .section-note { color: var(--text-subtle); font-size: 14.5px; margin: 0 0 20px; }

.terms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin: 0;
}
.terms > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.terms dt { font-weight: 700; font-size: 16px; margin-bottom: 5px; }
.terms dd { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-muted); }
.terms .alt { color: var(--text-subtle); font-weight: 400; font-size: 14px; }

/* FAQ en accordéon natif, sans JavaScript. */
.faq { max-width: 74ch; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 20px;
  margin-bottom: 12px;
}
.faq details[open] { border-color: var(--border-input); }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16.5px;
  padding: 18px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  flex: none;
  line-height: 1;
}
.faq details[open] summary::after { content: '–'; }
.faq details > *:not(summary) { margin: 0 0 18px; color: var(--text-muted); font-size: 15px; }

/* Mini-test */
.quiz { max-width: 70ch; }
.quiz-progress { font-size: 14px; color: var(--text-subtle); margin-bottom: 10px; }
.quiz-bar { height: 4px; background: var(--border); border-radius: 100px; overflow: hidden; margin-bottom: 28px; }
.quiz-bar span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s ease; }
.quiz h2 { font-size: clamp(21px, 3.2vw, 27px); margin: 0 0 6px; line-height: 1.25; }
.quiz .quiz-cat { font-size: 14.5px; color: var(--text-subtle); margin: 0 0 24px; }
.quiz-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; align-items: center; }
.quiz-skip { background: none; border: 0; font: inherit; font-size: 14.5px; color: var(--text-subtle); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.result-score {
  font-size: clamp(48px, 12vw, 76px);
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--accent);
  line-height: 1;
  margin: 0 0 8px;
}
.result-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.result-list li {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 100px;
  padding: 7px 14px;
  font-size: 14px;
}
