/* =============================================================================
   Pages « flux » : demande-flux.html (cabinets) et partenaires-compagnies.html (compagnies)
   Page autonome (header et footer propres, comme partenaires-compagnies.html),
   tokens du système de design Majors. Tout est préfixé kf- pour rester étanche.
   ============================================================================= */

:root {
  --violet: #7A4DFF;  --violet-600: #6A3BF0;  --violet-50: #F4F0FF;  --violet-100: #E9E1FF;
  --peach: #F08A6B;
  --ink: #0D1023;     --ink-2: #2A2E45;       --muted: #5B6178;      --subtle: #8A8FA3;
  --line: #E6E8F0;    --line-soft: #F0F1F6;   --bg: #FFFFFF;         --bg-soft: #F7F8FC;
  --success: #12B76A; --success-bg: #E7F8EF;  --success-ink: #0B8A4E;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 0.8125rem; --fs-sm: 0.9375rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-h3: 1.0625rem; --fs-h2: 1.75rem;   --fs-h1: clamp(2rem, 3.2vw, 2.5rem);

  --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 88px;
  --r-md: 10px; --r-lg: 16px; --r-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(13, 16, 35, .05);
  --shadow-md: 0 2px 4px rgba(13, 16, 35, .04), 0 10px 28px -8px rgba(13, 16, 35, .10);
  --shadow-lg: 0 4px 8px rgba(13, 16, 35, .04), 0 28px 64px -16px rgba(50, 30, 120, .28);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.6;
  color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--violet-600); }
h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
[hidden] { display: none !important; }
.kf-sprite { display: none; }
.kf-ico { width: 18px; height: 18px; flex-shrink: 0; }
.kf-ico--sm { width: 16px; height: 16px; }

.kf-container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s-5); }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--violet); outline-offset: 3px;
}

/* ---------- Header / footer ---------- */
.kf-header {
  position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center;
  background: rgba(255, 255, 255, .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.kf-header.is-scrolled { border-bottom-color: var(--line); }
.kf-header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.kf-logo img { height: 40px; width: auto; }
.kf-header-tag {
  font-size: var(--fs-xs); font-weight: 600; color: var(--violet);
  background: var(--violet-50); border-radius: 99px; padding: 4px 12px;
}

.kf-footer { border-top: 1px solid var(--line); padding: var(--s-6) 0; }
.kf-footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-4); }
.kf-footer img { height: 40px; width: auto; }
.kf-footer p { font-size: var(--fs-xs); color: var(--subtle); }
.kf-footer nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.kf-footer nav a { font-size: var(--fs-xs); color: var(--muted); }
.kf-footer nav a:hover { color: var(--violet); }

/* ---------- Sections ---------- */
.kf-section { padding: var(--s-8) 0; }
.kf-section--soft { background: var(--bg-soft); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.kf-section-head { margin-bottom: var(--s-7); max-width: 660px; }
.kf-section-head h2 { font-size: var(--fs-h2); margin-top: var(--s-2); }
.kf-section-head p { color: var(--muted); font-size: var(--fs-lg); margin-top: var(--s-3); line-height: 1.5; }
.kf-eyebrow { font-size: var(--fs-xs); font-weight: 600; color: var(--violet); }

/* ---------- Boutons ---------- */
.kf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font: 600 var(--fs-sm)/1 var(--font); border-radius: 99px; border: 0; cursor: pointer;
  padding: 12px 20px; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, box-shadow .2s, color .2s, border-color .2s;
}
.kf-btn-primary { background: var(--violet); color: #fff; box-shadow: 0 1px 2px rgba(122, 77, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .18); }
.kf-btn-primary:hover { background: var(--violet-600); color: #fff; }
.kf-btn-light { background: #fff; color: var(--ink); }
.kf-btn-light:hover { background: var(--violet-50); color: var(--ink); }
.kf-arrow { display: inline-block; transition: transform .25s var(--ease); }
.kf-btn:hover .kf-arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.kf-hero { position: relative; padding: var(--s-7) 0 var(--s-8); overflow: hidden; isolation: isolate; }
.kf-hero-bg {
  position: absolute; inset: 0 0 auto 0; height: 620px; z-index: -1;
  background:
    radial-gradient(42% 60% at 8% 18%, rgba(122, 77, 255, .22), transparent 70%),
    radial-gradient(34% 52% at 52% 0%, rgba(255, 179, 138, .26), transparent 70%),
    radial-gradient(42% 60% at 96% 26%, rgba(160, 120, 255, .20), transparent 70%),
    linear-gradient(180deg, #FBFAFF, #FFFFFF);
  background-size: 130% 130%;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
  animation: kf-drift 20s ease-in-out infinite alternate;
}
@keyframes kf-drift { from { background-position: 0% 0%; } to { background-position: 100% 40%; } }

.kf-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: var(--s-8); align-items: center; }
.kf-badge-offer {
  display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); font-weight: 500; color: var(--ink-2);
  background: rgba(255, 255, 255, .75); border: 1px solid var(--violet-100); border-radius: 99px; padding: 4px 12px 4px 4px;
}
.kf-badge-offer b { background: var(--violet); color: #fff; font-weight: 600; border-radius: 99px; padding: 2px 9px; font-size: .75rem; }
.kf-hero h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-top: var(--s-5); max-width: 560px; }
.kf-lede { font-size: var(--fs-lg); color: var(--muted); margin-top: var(--s-4); max-width: 520px; line-height: 1.55; }
.kf-hero-actions { margin-top: var(--s-6); }

.kf-steps { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-4); max-width: 520px; counter-reset: kf-step; }
.kf-steps li { display: grid; grid-template-columns: 28px 1fr; gap: var(--s-3); counter-increment: kf-step; }
.kf-steps li::before {
  content: counter(kf-step); width: 26px; height: 26px; border-radius: 99px; background: #fff;
  border: 1px solid var(--violet-100); color: var(--violet); font-size: var(--fs-xs); font-weight: 600;
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.kf-steps strong { display: block; color: var(--ink); font-weight: 600; font-size: var(--fs-sm); }
.kf-steps span { color: var(--muted); font-size: var(--fs-sm); }

/* Visuel : fenêtre de messagerie illustrative */
.kf-visual {
  border-radius: var(--r-xl); padding: 28px 28px 0;
  background: linear-gradient(160deg, #F6F2FF 0%, #F7F8FC 55%, #FFF4EE 100%);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow-lg);
}
.kf-win {
  background: #fff; border-radius: 12px 12px 0 0; border: 1px solid var(--line); border-bottom: 0;
  box-shadow: 0 10px 30px -12px rgba(50, 30, 120, .25); font-size: .8rem;
}
.kf-win-bar { display: flex; align-items: center; gap: 5px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.kf-win-bar i { width: 8px; height: 8px; border-radius: 99px; background: #E3E5EE; display: block; }
.kf-win-bar span { margin-left: 8px; font-weight: 600; color: var(--ink-2); font-size: .76rem; }
.kf-win-body { padding: 14px; display: grid; gap: 8px; }
.kf-win-row {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  border-bottom: 1px solid var(--line-soft); padding: 0 2px 8px; color: var(--ink-2);
}
.kf-win-row small { color: var(--subtle); width: 42px; flex-shrink: 0; font-size: .72rem; }
.kf-win-row b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-chip { font-size: .68rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.kf-chip--violet { background: var(--violet-50); color: var(--violet); }
.kf-chip--ok { background: var(--success-bg); color: var(--success-ink); }
.kf-win-text { color: var(--muted); line-height: 1.55; padding: 4px 2px 0; }
.kf-win-text span { display: block; height: 7px; border-radius: 99px; background: var(--line-soft); margin-top: 8px; }
.kf-win-text span:nth-child(2) { width: 88%; }
.kf-win-text span:nth-child(3) { width: 64%; }
.kf-win-files { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 16px; }
.kf-file {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font-weight: 500; color: var(--ink-2); font-size: .74rem;
}
.kf-file svg { color: var(--violet); }

/* ---------- Modèle d'email ---------- */
.kf-card-main {
  position: relative; background: #fff; border-radius: var(--r-xl); padding: var(--s-6);
  box-shadow: var(--shadow-lg); border: 1px solid rgba(13, 16, 35, .06);
}
.kf-card-main::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--violet), var(--peach), transparent);
}
.kf-tpl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-6); align-items: start; }
.kf-tpl-meta {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s-3) var(--s-4); margin: 0;
  padding-bottom: var(--s-5); border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm);
}
.kf-tpl-meta dt { color: var(--subtle); }
.kf-tpl-meta dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.kf-tpl-body {
  white-space: pre-line; overflow-wrap: anywhere; margin-top: var(--s-5);
  font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-2);
}
.kf-tpl mark {
  background: var(--violet-50); color: var(--violet-600); font-weight: 600;
  border-radius: 4px; padding: 0 3px;
}
.kf-tpl-actions { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line-soft); }
.kf-copy-mini {
  margin-left: 6px; background: none; border: 1px solid var(--line); border-radius: 99px; cursor: pointer;
  font: 600 .75rem var(--font); color: var(--violet); padding: 2px 10px; vertical-align: 1px;
}
.kf-copy-mini:hover { border-color: var(--violet); }
.kf-tips {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5);
}
.kf-tips h3 { font-size: var(--fs-h3); }
.kf-tips .kf-list li { font-size: var(--fs-sm); color: var(--muted); }
.kf-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ---------- Cartes (ce que reçoit la compagnie) ---------- */
.kf-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.kf-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5);
  box-shadow: var(--shadow-sm); transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.kf-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.kf-card-ico {
  width: 40px; height: 40px; border-radius: var(--r-md); background: var(--violet-50); color: var(--violet);
  display: grid; place-items: center;
}
.kf-card h3 { font-size: var(--fs-h3); margin-top: var(--s-4); }
.kf-card p { color: var(--muted); font-size: var(--fs-sm); margin-top: 6px; }
.kf-list { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: grid; gap: var(--s-2); }
.kf-list li { position: relative; padding-left: 20px; font-size: var(--fs-sm); color: var(--ink-2); }
.kf-list li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 99px;
  background: linear-gradient(135deg, var(--violet), #B06CFF);
}

.kf-trust {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--s-5);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
}
.kf-trust > div { padding: var(--s-5); border-left: 1px solid var(--line); }
.kf-trust > div:first-child { border-left: 0; }
.kf-trust .k { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.kf-trust .k svg { color: var(--violet); }
.kf-trust .v { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.kf-note { margin-top: var(--s-5); font-size: var(--fs-sm); color: var(--muted); }

/* ---------- FAQ ---------- */
.kf-faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--s-8); align-items: start; }
.kf-faq-grid .kf-section-head { margin-bottom: 0; }
.kf-faq details { border-bottom: 1px solid var(--line); }
.kf-faq details:first-child { border-top: 1px solid var(--line); }
.kf-faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-weight: 500; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
}
.kf-faq summary::-webkit-details-marker { display: none; }
.kf-faq summary svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--subtle); transition: transform .25s var(--ease); }
.kf-faq details[open] summary svg { transform: rotate(45deg); color: var(--violet); }
.kf-faq details p { color: var(--muted); font-size: var(--fs-sm); padding: 0 var(--s-7) 18px 0; }

/* ---------- CTA final ---------- */
.kf-cta {
  position: relative; overflow: hidden; text-align: center; border-radius: var(--r-xl);
  padding: var(--s-7) var(--s-6); background: var(--ink); color: #fff; isolation: isolate;
}
.kf-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(45% 90% at 0% 0%, rgba(122, 77, 255, .55), transparent 70%),
    radial-gradient(40% 90% at 100% 100%, rgba(240, 138, 107, .38), transparent 70%);
}
.kf-cta h2 { color: #fff; font-size: var(--fs-h2); }
.kf-cta p { color: #B9BCD0; margin-top: var(--s-2); }
.kf-cta .kf-btn { margin-top: var(--s-5); }

/* demande-flux : introduction courte, modèle juste en dessous */
.kf-hero--compact { padding-bottom: var(--s-7); }
.kf-hero--compact .kf-hero-bg { height: 420px; }
.kf-hero--compact h1, .kf-hero--compact .kf-lede { max-width: 680px; }
.kf-hero--compact .kf-simple { max-width: 680px; }
.kf-section--tight { padding-top: var(--s-7); }

/* Proposition « écrivez-nous simplement », sous les boutons du hero */
.kf-simple { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--muted); max-width: 520px; }
.kf-simple a { font-weight: 600; }

/* ---------- Espace compagnies (partenaires-compagnies.html) ---------- */
.kf-btn-ghost { background: transparent; color: var(--ink-2); padding: 12px 8px; }
.kf-btn-ghost:hover { color: var(--violet); }
.kf-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); }
.kf-chips { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.kf-chips li {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-2);
  background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px;
}
.kf-chips svg { color: var(--violet); }

.kf-summary-title { font-size: var(--fs-xs); font-weight: 600; color: var(--violet); }
.kf-summary dl { margin: var(--s-4) 0 0; display: grid; grid-template-columns: 104px minmax(0, 1fr); }
.kf-summary dt, .kf-summary dd { padding: var(--s-3) 0; border-top: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.kf-summary dt { color: var(--subtle); padding-right: var(--s-3); }
.kf-summary dd { margin: 0; color: var(--ink); font-weight: 500; line-height: 1.5; }

.kf-trust--top { margin-top: 0; }
.kf-engage {
  margin-top: var(--s-5); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5) var(--s-6);
}
.kf-list--cols { margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3) var(--s-6); }
.kf-engage .kf-note { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line-soft); font-size: var(--fs-xs); }

.kf-flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.kf-flow-n {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 99px;
  background: var(--violet-50); color: var(--violet); font-weight: 600; font-size: var(--fs-sm);
}

.kf-cta-mail { font-size: var(--fs-sm); }
.kf-cta-mail a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.kf-cta-mail a:hover { color: var(--violet-100); }
.kf-cta .kf-btn + .kf-cta-mail { margin-top: var(--s-4); }
.kf-note--center { text-align: center; }

/* ---------- Toast ---------- */
.kf-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 16px);
  background: var(--ink); color: #fff; font-size: var(--fs-sm); font-weight: 500;
  padding: 12px 20px; border-radius: 12px; box-shadow: 0 16px 40px -14px rgba(13, 16, 35, .5);
  opacity: 0; visibility: hidden; max-width: calc(100vw - 32px);
  transition: transform .28s var(--ease), opacity .2s, visibility .2s;
}
.kf-toast.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kf-hero-bg { animation: none; }
  .kf-card, .kf-arrow, .kf-toast { transition: none; }
  .kf-card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .kf-section { padding: 64px 0; }
  .kf-hero { padding-top: var(--s-6); }
  .kf-hero-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .kf-cards { grid-template-columns: 1fr; }
  .kf-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kf-trust > div:nth-child(3) { border-left: 0; }
  .kf-trust > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kf-faq-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .kf-tpl-grid { grid-template-columns: 1fr; }
  .kf-flow { grid-template-columns: 1fr; }
  .kf-list--cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  :root { --fs-h2: 1.375rem; }
  .kf-card-main { padding: var(--s-5); }
  .kf-tpl-actions .kf-btn { width: 100%; }
  .kf-summary dl { grid-template-columns: 1fr; }
  .kf-summary dt { padding-bottom: 0; }
  .kf-summary dd { border-top: 0; padding-top: 2px; }
  .kf-engage { padding: var(--s-5); }
  .kf-visual { padding: 18px 18px 0; }
  .kf-trust { grid-template-columns: 1fr; }
  .kf-trust > div { border-left: 0; border-top: 1px solid var(--line); }
  .kf-trust > div:first-child { border-top: 0; }
  .kf-cta { padding: var(--s-6) var(--s-5); }
  .kf-header-tag { display: none; }
  .kf-faq details p { padding-right: 0; }
}
