/*
 * Flaynn Card v3 - certificat de deal partageable (SSR /score/:slug)
 *
 * Objectif : valider le projet (le "check") ET intriguer un investisseur qui
 * ne connait pas le founder. Objet self-contained, pro, reutilisable par le
 * founder (LinkedIn, PNG, lien public).
 *
 * Couleurs de marque partout : violet #7B2D8E + orange #E8651A.
 * Le verdict garde sa couleur (Yes violet #a85ec0, Strong Yes vert #22c55e),
 * pilotee par --fcp-verdict reassignee via .fcp--strongyes.
 *
 * Typo : IBM Plex Sans (UI), IBM Plex Serif (these / forces, editorial),
 * IBM Plex Mono (chiffres, labels, refs).
 */

:root {
  --fcp-bg:        #030407;
  --fcp-paper:     #07080d;
  --fcp-ink-1:     #f3f1ec;
  --fcp-ink-2:     #b8b6ae;
  --fcp-ink-3:     #84827b;
  --fcp-ink-4:     #54534e;
  --fcp-rule:      rgba(243, 241, 236, 0.10);
  --fcp-rule-soft: rgba(243, 241, 236, 0.05);
  --fcp-rule-str:  rgba(243, 241, 236, 0.18);

  --fcp-violet:    #7B2D8E;
  --fcp-violet-2:  #a85ec0;
  --fcp-orange:    #E8651A;
  --fcp-orange-2:  #f6924f;

  --fcp-yes:       #a85ec0;
  --fcp-strongyes: #22c55e;

  --fcp-sans:  'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --fcp-serif: 'IBM Plex Serif', Georgia, serif;
  --fcp-mono:  'IBM Plex Mono', ui-monospace, monospace;
}

body.fc-public {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 50% -8%, rgba(123, 45, 142, 0.10), transparent 62%),
    radial-gradient(ellipse 55% 45% at 100% 105%, rgba(232, 101, 26, 0.05), transparent 60%),
    var(--fcp-bg);
  background-attachment: fixed;
  color: var(--fcp-ink-1);
  font-family: var(--fcp-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 1, "lnum" 1, "kern" 1;
  text-rendering: optimizeLegibility;
}
body.fc-public *,
body.fc-public *::before,
body.fc-public *::after { box-sizing: border-box; }

/* Fond LP Flaynn : starfield anime (canvas) derriere la carte. Le JS vit dans
 * /js/ds/starfield.js (externe, CSP). Le canvas est decoratif, pointer-events none. */
#canvas-bg {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.fc-page { position: relative; z-index: 1; padding: 44px 16px 72px; }

/* ============================ CARTE ============================ */
.fcp {
  --fcp-verdict:      var(--fcp-yes);
  --fcp-verdict-soft: rgba(168, 94, 192, 0.10);
  --fcp-verdict-bd:   rgba(168, 94, 192, 0.34);
  --fcp-verdict-glow: rgba(168, 94, 192, 0.20);

  max-width: 760px;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 30%),
    var(--fcp-paper);
  border: 1px solid var(--fcp-rule);
  border-top: 2px solid var(--fcp-verdict);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
  animation: fcpIn .6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.fcp--strongyes {
  --fcp-verdict:      var(--fcp-strongyes);
  --fcp-verdict-soft: rgba(34, 197, 94, 0.10);
  --fcp-verdict-bd:   rgba(34, 197, 94, 0.34);
  --fcp-verdict-glow: rgba(34, 197, 94, 0.20);
}
@keyframes fcpIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .fcp { animation: none; } }

/* ---------- EN-TETE : logo Flaynn + verdict ---------- */
.fcp__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--fcp-rule);
}
.fcp__brand { display: inline-flex; align-items: center; }
.fcp__brand-logo { height: 34px; width: auto; display: block; }
.fcp__verdict {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fcp-mono);
  font-weight: 600; font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--fcp-verdict);
  background: var(--fcp-verdict-soft);
  border: 1px solid var(--fcp-verdict-bd);
  padding: 7px 12px;
}
.fcp__verdict-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px var(--fcp-verdict-glow);
}

/* ---------- LE CHECK : nom + score + certification ---------- */
.fcp__hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 34px 32px 30px;
}
.fcp__hero-l { min-width: 0; }
.fcp__kicker {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 16px;
  font-family: var(--fcp-mono);
  font-weight: 500; font-size: 10.5px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--fcp-ink-3);
}
.fcp__kicker::before {
  content: ""; width: 5px; height: 5px; border-radius: 999px;
  background: var(--fcp-verdict);
  box-shadow: 0 0 10px var(--fcp-verdict-glow);
}
.fcp__name {
  margin: 0 0 12px;
  font-family: var(--fcp-sans);
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 50px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--fcp-ink-1);
  text-wrap: balance;
}
.fcp__lede {
  margin: 0;
  max-width: 42ch;
  font-family: var(--fcp-serif);
  font-style: italic;
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.45;
  color: var(--fcp-ink-2);
  text-wrap: pretty;
}
.fcp__scorebox {
  display: flex; flex-direction: column; align-items: flex-end;
  flex: 0 0 auto;
}
.fcp__score-label {
  font-family: var(--fcp-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--fcp-ink-3);
  margin-bottom: 4px;
}
.fcp__score {
  display: inline-flex; align-items: baseline;
  font-family: var(--fcp-mono);
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
}
.fcp__score-num {
  font-weight: 700;
  font-size: clamp(56px, 9vw, 78px);
  letter-spacing: -0.04em;
  color: var(--fcp-verdict);
  text-shadow: 0 0 48px var(--fcp-verdict-glow);
}
.fcp__score-den {
  font-weight: 400; font-size: 22px;
  color: var(--fcp-ink-4); letter-spacing: -0.01em;
}

/* ---------- ACCROCHE : la these ---------- */
.fcp__thesis {
  padding: 28px 32px;
  border-top: 1px solid var(--fcp-rule);
  background: linear-gradient(180deg, rgba(123, 45, 142, 0.04), transparent);
}
.fcp__thesis-body {
  margin: 0;
  font-family: var(--fcp-serif);
  font-weight: 400;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--fcp-ink-1);
  max-width: 60ch;
  text-wrap: pretty;
}
.fcp__thesis-body em {
  font-style: italic;
  color: var(--fcp-orange);
  font-weight: 500;
}
.fcp__thesis-sign {
  margin: 18px 0 0;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--fcp-mono);
  font-size: 10.5px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--fcp-ink-3);
}
.fcp__thesis-sign::before {
  content: ""; width: 26px; height: 1px; background: var(--fcp-rule-str);
}
.fcp__thesis-quote {
  margin: 16px 0 0;
  font-family: var(--fcp-serif);
  font-style: italic;
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.45;
  color: var(--fcp-orange-2);
  text-wrap: pretty;
}

/* ---------- LES FAITS DU DEAL ---------- */
.fcp__facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--fcp-rule);
}
.fcp__fact {
  padding: 16px 32px;
  border-right: 1px solid var(--fcp-rule-soft);
}
.fcp__fact:last-child { border-right: 0; }
.fcp__fact-label {
  display: block;
  font-family: var(--fcp-mono);
  font-size: 9.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--fcp-ink-4);
  margin-bottom: 6px;
}
.fcp__fact-val {
  display: block;
  font-family: var(--fcp-sans);
  font-size: 14px; font-weight: 500;
  color: var(--fcp-ink-1);
  font-variant-numeric: tabular-nums;
}

/* ---------- SECTIONS ---------- */
.fcp__sec {
  padding: 28px 32px;
  border-top: 1px solid var(--fcp-rule);
}
.fcp__sec-h {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin: 0 0 20px;
}
.fcp__sec-title {
  margin: 0;
  font-family: var(--fcp-mono);
  font-weight: 600; font-size: 11px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--fcp-ink-2);
}
.fcp__sec-note {
  font-family: var(--fcp-mono);
  font-size: 10.5px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--fcp-ink-4);
}

/* Forces (preuves) */
.fcp__force {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 18px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--fcp-rule-soft);
}
.fcp__force:first-of-type { border-top: 0; padding-top: 0; }
.fcp__force-n {
  font-family: var(--fcp-mono);
  font-weight: 600; font-size: 13px;
  letter-spacing: .1em;
  color: var(--fcp-orange);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}
.fcp__force-t {
  margin: 0;
  font-family: var(--fcp-serif);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.4;
  color: var(--fcp-ink-1);
  text-wrap: pretty;
}

/* Piliers */
.fcp__pillar {
  display: grid;
  grid-template-columns: 120px 1fr 56px;
  align-items: center;
  column-gap: 18px;
  padding: 11px 0;
  border-top: 1px solid var(--fcp-rule-soft);
}
.fcp__pillar:first-of-type { border-top: 0; }
.fcp__pillar-name {
  font-family: var(--fcp-sans);
  font-size: 13.5px; font-weight: 500;
  color: var(--fcp-ink-2);
}
.fcp__pillar-track {
  position: relative; height: 4px;
  background: var(--fcp-rule);
  overflow: hidden;
}
.fcp__pillar-fill {
  position: absolute; inset: 0 auto 0 0;
  width: var(--w, 0%);
  background: linear-gradient(90deg, var(--fcp-violet), var(--fcp-violet-2));
  transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1) .2s;
}
.fcp__pillar--strong .fcp__pillar-fill {
  background: linear-gradient(90deg, var(--fcp-violet-2), var(--fcp-orange));
}
.fcp__pillar-score {
  font-family: var(--fcp-mono);
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 600;
  text-align: right;
  color: var(--fcp-ink-1);
  letter-spacing: -0.01em;
}
.fcp__pillar-score small { color: var(--fcp-ink-4); font-weight: 400; }

/* Reserves (discretes) */
.fcp__sec--reserves { background: rgba(255, 255, 255, 0.012); }
.fcp__reserve {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 18px;
  align-items: start;
  padding: 11px 0;
  border-top: 1px solid var(--fcp-rule-soft);
}
.fcp__reserve:first-of-type { border-top: 0; padding-top: 0; }
.fcp__reserve-n {
  font-family: var(--fcp-mono);
  font-weight: 500; font-size: 12px;
  color: var(--fcp-ink-4);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.fcp__reserve-t {
  margin: 0;
  font-family: var(--fcp-sans);
  font-size: 14px; line-height: 1.45;
  color: var(--fcp-ink-2);
  text-wrap: pretty;
}

/* ---------- CTA INVESTISSEUR ---------- */
.fcp__cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding: 24px 32px;
  border-top: 1px solid var(--fcp-rule);
}
.fcp__cta-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--fcp-mono);
  font-weight: 600; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--fcp-violet) 0%, var(--fcp-orange) 130%);
  box-shadow: 0 0 0 1px rgba(123, 45, 142, 0.30), 0 10px 28px -10px rgba(123, 45, 142, 0.50);
  transition: filter .15s ease, transform .15s ease;
}
.fcp__cta-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.fcp__cta-btn .arr { font-size: 14px; }
.fcp__share {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--fcp-mono);
  font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--fcp-ink-3);
}
.fcp__share a, .fcp__share button {
  appearance: none; background: none; border: 0;
  color: var(--fcp-ink-2); text-decoration: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  padding: 6px 8px; cursor: pointer;
  transition: color .15s ease;
}
.fcp__share a:hover, .fcp__share button:hover { color: var(--fcp-orange); }
.fcp__share .sep { color: var(--fcp-ink-4); padding: 0; }

/* ---------- FOOTER ---------- */
.fcp__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 18px 32px 22px;
  border-top: 1px solid var(--fcp-rule);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.012));
  font-family: var(--fcp-mono);
  font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--fcp-ink-4);
}
.fcp__foot-l { display: inline-flex; align-items: center; gap: 10px; }
.fcp__foot-logo { height: 14px; width: auto; opacity: 0.8; }
.fcp__foot a { color: var(--fcp-ink-3); text-decoration: none; }
.fcp__foot a:hover { color: var(--fcp-ink-1); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .fc-page { padding: 24px 12px 48px; }
  .fcp__head { padding: 16px 20px; }
  .fcp__hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 20px;
  }
  .fcp__scorebox { align-items: flex-start; }
  .fcp__thesis, .fcp__sec, .fcp__cta { padding: 22px 20px; }
  .fcp__facts { grid-template-columns: 1fr 1fr; }
  .fcp__fact { border-bottom: 1px solid var(--fcp-rule-soft); }
  .fcp__fact:nth-child(2n) { border-right: 0; }
  .fcp__pillar { grid-template-columns: 88px 1fr 48px; column-gap: 12px; }
  .fcp__cta { flex-direction: column; align-items: stretch; }
  .fcp__cta-btn { justify-content: center; }
  .fcp__foot { padding: 16px 20px 20px; }
}

/* ---------- PRINT / PNG : lisible en clair ---------- */
@media print {
  body.fc-public { background: #fff !important; color: #000 !important; }
  .fcp { background: #fff; border-color: #000; box-shadow: none; }
  .fcp__name, .fcp__score-num, .fcp__pillar-score, .fcp__thesis-body, .fcp__force-t { color: #000; }
  .fcp__verdict { color: #000; border-color: #000; background: #fff; }
  .fcp__pillar-fill { background: #000; }
  .fcp__pillar-track { background: #ddd; }
}

/* ---------- Apercu .fcp dans le dashboard founder (frame .fc-internal) ----------
 * Le frame fournit deja une bordure : la carte interne est compacte, sans
 * bordure propre (sauf l'accent verdict en haut), sans ombre ni animation. */
.fc-internal .fcp {
  border: 0;
  border-top: 2px solid var(--fcp-verdict);
  max-width: none;
  box-shadow: none;
  animation: none;
  background: var(--fcp-paper);
}
.fc-internal .fcp__head { padding: 14px 20px; }
.fc-internal .fcp__brand-logo { height: 28px; }
.fc-internal .fcp__hero { padding: 24px 20px 20px; gap: 18px; }
.fc-internal .fcp__name { font-size: clamp(26px, 4vw, 38px); }
.fc-internal .fcp__score-num { font-size: clamp(42px, 6.5vw, 58px); }
.fc-internal .fcp__lede { font-size: 15px; }
.fc-internal .fcp__thesis,
.fc-internal .fcp__sec,
.fc-internal .fcp__cta { padding: 20px; }
.fc-internal .fcp__thesis-body { font-size: 16px; }
.fc-internal .fcp__facts .fcp__fact { padding: 14px 20px; }
.fc-internal .fcp__pillar { grid-template-columns: 100px 1fr 48px; column-gap: 14px; }
.fc-internal .fcp__foot { padding: 16px 20px; }
