/* Business Plan Generator – Reki. Tokens repris de la Home reki.eu : DM Sans, encre #1E1C1B, fond #FDFEFE, accent #F4C54E */
.rbp {
  --rbp-ink: #1E1C1B;
  --rbp-ink-2: #475467;
  --rbp-ink-3: #737373;
  --rbp-bg: #FDFEFE;
  --rbp-surface: #FFFFFF;
  --rbp-surface-2: #F9FAFB;
  --rbp-line: #E5E7EB;
  --rbp-accent: #F4C54E;
  --rbp-accent-soft: #FDF3D6;
  --rbp-good: #12B76A;
  --rbp-warn: #F08C00;
  --rbp-bad: #E14F89;
  --rbp-radius: 8px;
  --rbp-radius-lg: 16px;
  font-family: "DM Sans", "DM Sans Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--rbp-ink);
  background: var(--rbp-bg);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  box-sizing: border-box;
}
.rbp *, .rbp *::before, .rbp *::after { box-sizing: border-box; }
.rbp h1, .rbp h2, .rbp h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.rbp h1 { font-size: clamp(28px, 4vw, 44px); }
.rbp h2 { font-size: 22px; }
.rbp h3 { font-size: 16px; }
.rbp p { margin: 0; }
.rbp-muted { color: var(--rbp-ink-2); }
.rbp-small { font-size: 14px; }
.rbp-hero { text-align: center; max-width: 760px; margin: 0 auto 32px; }
.rbp-hero p { margin-top: 12px; font-size: 18px; color: var(--rbp-ink-2); }
.rbp-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--rbp-accent-soft); color: var(--rbp-ink); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.rbp-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rbp-accent); }

/* Stepper */
.rbp-steps { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 28px; padding: 0; list-style: none; }
.rbp-steps li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--rbp-ink-3); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rbp-line); background: var(--rbp-surface); }
.rbp-steps li span { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--rbp-surface-2); color: var(--rbp-ink-3); }
.rbp-steps li.is-active { color: var(--rbp-ink); border-color: var(--rbp-ink); font-weight: 600; }
.rbp-steps li.is-active span { background: var(--rbp-ink); color: var(--rbp-accent); }
.rbp-steps li.is-done span { background: var(--rbp-accent); color: var(--rbp-ink); }

/* Cards & layout */
.rbp-card { background: var(--rbp-surface); border: 1px solid var(--rbp-line); border-radius: var(--rbp-radius-lg); padding: 24px; }
.rbp-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.rbp-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .rbp-grid, .rbp-grid-2 { grid-template-columns: 1fr; } }
.rbp-stack { display: grid; gap: 16px; }
.rbp-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rbp-between { justify-content: space-between; }
.rbp-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 20px; }

/* Textarea */
.rbp textarea { width: 100%; min-height: 420px; resize: vertical; font: inherit; font-size: 15px; line-height: 1.55; color: var(--rbp-ink); background: var(--rbp-surface); border: 1px solid var(--rbp-line); border-radius: var(--rbp-radius); padding: 14px 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.rbp textarea:focus { border-color: var(--rbp-ink); box-shadow: 0 0 0 3px rgba(244, 197, 78, .35); }
.rbp textarea::placeholder { color: #9CA3AF; }
.rbp-counter { font-size: 13px; color: var(--rbp-ink-3); }

/* Guide */
.rbp-guide h3 { margin-bottom: 4px; }
.rbp-guide ol { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.rbp-guide li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.rbp-guide li b { display: block; color: var(--rbp-ink); }
.rbp-guide li span.rbp-n { width: 26px; height: 26px; border-radius: 8px; background: var(--rbp-accent-soft); display: inline-grid; place-items: center; font-weight: 600; font-size: 13px; }
.rbp-guide li em { font-style: normal; color: var(--rbp-ink-2); }
.rbp-tip { margin-top: 16px; padding: 12px 14px; background: var(--rbp-surface-2); border-radius: var(--rbp-radius); font-size: 13px; color: var(--rbp-ink-2); }

/* Buttons */
.rbp-btn { appearance: none; border: 1px solid var(--rbp-ink); background: var(--rbp-ink); color: #fff; font: inherit; font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; transition: transform .1s, background .15s; text-decoration: none; }
.rbp-btn:hover { background: #000; }
.rbp-btn:active { transform: scale(.98); }
.rbp-btn:disabled { opacity: .5; cursor: not-allowed; }
.rbp-btn.is-accent { background: var(--rbp-accent); border-color: var(--rbp-accent); color: var(--rbp-ink); }
.rbp-btn.is-accent:hover { background: #EDB93A; border-color: #EDB93A; }
.rbp-btn.is-ghost { background: transparent; color: var(--rbp-ink); border-color: var(--rbp-line); }
.rbp-btn.is-ghost:hover { background: var(--rbp-surface-2); }
.rbp-btn.is-small { padding: 8px 14px; font-size: 13px; }
.rbp-btn svg { width: 16px; height: 16px; }

/* Status / alerts */
.rbp-alert { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 14px; border-radius: var(--rbp-radius); font-size: 14px; border: 1px solid var(--rbp-line); background: var(--rbp-surface-2); }
.rbp-alert .rbp-ic { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.rbp-alert.is-warn { background: #FFF7E6; border-color: #FBE1B0; }
.rbp-alert.is-warn .rbp-ic { background: var(--rbp-warn); }
.rbp-alert.is-error { background: #FDECF3; border-color: #F7C6DA; }
.rbp-alert.is-error .rbp-ic { background: var(--rbp-bad); }
.rbp-alert.is-good { background: #E9F9F0; border-color: #BDEBD3; }
.rbp-alert.is-good .rbp-ic { background: var(--rbp-good); }
.rbp-alert.is-info .rbp-ic { background: var(--rbp-ink); color: var(--rbp-accent); }

.rbp-progress { height: 8px; border-radius: 999px; background: var(--rbp-line); overflow: hidden; }
.rbp-progress > div { height: 100%; background: var(--rbp-accent); border-radius: 999px; transition: width .4s; }

/* Questions */
.rbp-q { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--rbp-line); border-radius: var(--rbp-radius); background: var(--rbp-surface); }
.rbp-q label { font-weight: 600; font-size: 15px; }
.rbp-q .rbp-why { font-size: 13px; color: var(--rbp-ink-3); }
.rbp-q input { width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--rbp-line); border-radius: var(--rbp-radius); outline: none; }
.rbp-q input:focus { border-color: var(--rbp-ink); box-shadow: 0 0 0 3px rgba(244, 197, 78, .35); }
.rbp-q .rbp-default { font-size: 13px; color: var(--rbp-ink-2); }
.rbp-q .rbp-default b { font-weight: 600; }

/* KPI tiles */
.rbp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.rbp-tile { background: var(--rbp-surface); border: 1px solid var(--rbp-line); border-radius: var(--rbp-radius-lg); padding: 16px 18px; }
.rbp-tile .rbp-k { font-size: 13px; color: var(--rbp-ink-2); }
.rbp-tile .rbp-v { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.rbp-tile .rbp-d { font-size: 12px; color: var(--rbp-ink-3); margin-top: 2px; }
.rbp-tile.is-bad .rbp-v { color: var(--rbp-bad); }

/* Charts */
.rbp-chart { width: 100%; height: auto; display: block; font-family: inherit; }
.rbp-chart text { font-size: 12px; fill: var(--rbp-ink-2); }
.rbp-chart .rbp-axis { stroke: var(--rbp-line); }
.rbp-chart .rbp-grid { stroke: var(--rbp-line); stroke-dasharray: 2 4; }
.rbp-chart .rbp-bar { fill: var(--rbp-ink); }
.rbp-chart .rbp-bar:hover { fill: #000; }
.rbp-chart .rbp-lbl { font-weight: 600; fill: var(--rbp-ink); }
.rbp-chart .rbp-line { fill: none; stroke: var(--rbp-ink); stroke-width: 2; stroke-linejoin: round; }
.rbp-chart .rbp-area { fill: var(--rbp-accent); opacity: .35; }
.rbp-chart .rbp-zero { stroke: var(--rbp-bad); stroke-width: 1; stroke-dasharray: 4 3; }
.rbp-chart .rbp-dot { fill: #fff; stroke: var(--rbp-ink); stroke-width: 2; }
.rbp-chart .rbp-dot.is-min { stroke: var(--rbp-bad); }
.rbp-chart-wrap { position: relative; }
.rbp-tooltip { position: absolute; pointer-events: none; background: var(--rbp-ink); color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 6px; transform: translate(-50%, -120%); white-space: nowrap; display: none; }
.rbp-tooltip b { color: var(--rbp-accent); }

/* Tables */
.rbp-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.rbp-table th, .rbp-table td { padding: 9px 10px; border-bottom: 1px solid var(--rbp-line); text-align: right; white-space: nowrap; }
.rbp-table th:first-child, .rbp-table td:first-child { text-align: left; }
.rbp-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--rbp-ink-3); font-weight: 600; }
.rbp-table tr.is-total td { font-weight: 600; background: var(--rbp-ink); color: var(--rbp-accent); }
.rbp-table tr.is-total td:first-child { border-radius: 6px 0 0 6px; }
.rbp-table tr.is-total td:last-child { border-radius: 0 6px 6px 0; }
.rbp-table td.is-neg { color: var(--rbp-bad); font-weight: 600; }
.rbp-table-wrap { overflow-x: auto; }

/* Lists */
.rbp-list { margin: 0; padding-left: 18px; font-size: 14px; color: var(--rbp-ink-2); display: grid; gap: 4px; }
.rbp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rbp-chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--rbp-surface-2); border: 1px solid var(--rbp-line); color: var(--rbp-ink-2); }

/* Loading */
.rbp-loading { display: grid; place-items: center; gap: 14px; padding: 48px 16px; text-align: center; }
.rbp-spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--rbp-line); border-top-color: var(--rbp-accent); animation: rbp-spin .8s linear infinite; }
@keyframes rbp-spin { to { transform: rotate(360deg); } }
.rbp-loading .rbp-steps-log { font-size: 14px; color: var(--rbp-ink-2); min-height: 22px; }

.rbp-final { text-align: center; padding: 40px 16px; }
.rbp-final .rbp-check { width: 64px; height: 64px; border-radius: 50%; background: var(--rbp-accent); display: inline-grid; place-items: center; margin-bottom: 16px; }
.rbp-footer-note { font-size: 12px; color: var(--rbp-ink-3); text-align: center; margin-top: 24px; }
details.rbp-details summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.rbp-details { border: 1px solid var(--rbp-line); border-radius: var(--rbp-radius); padding: 12px 16px; background: var(--rbp-surface); }

/* Formulaire avant téléchargement */
.rbp-lead { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 860px) { .rbp-lead { grid-template-columns: 1fr; } }
.rbp-field { display: grid; gap: 6px; min-width: 0; }
.rbp-field label { font-size: 13px; font-weight: 600; color: var(--rbp-ink-2); }
.rbp-field input { width: 100%; font: inherit; font-size: 15px; padding: 11px 12px; border: 1px solid var(--rbp-line); border-radius: var(--rbp-radius); outline: none; background: var(--rbp-surface); color: var(--rbp-ink); }
.rbp-field input:focus { border-color: var(--rbp-ink); box-shadow: 0 0 0 3px rgba(244, 197, 78, .35); }
.rbp-field-btn .rbp-btn { width: 100%; justify-content: center; white-space: nowrap; }
.rbp-lead-note { grid-column: 1 / -1; margin: 0; }
.rbp-lead-error { grid-column: 1 / -1; background: #FDECF3; border: 1px solid #F7C6DA; color: #9B1C4B; border-radius: var(--rbp-radius); padding: 10px 14px; font-size: 14px; font-weight: 500; }
.rbp-field input.is-invalid { border-color: var(--rbp-bad); box-shadow: 0 0 0 3px rgba(225, 79, 137, .2); }

/* Étape 1 : en-têtes numérotés, dépôt de documents */
.rbp-step-head { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.rbp-step-head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rbp-step-head p { margin-top: 4px; }
.rbp-step-n { width: 36px; height: 36px; border-radius: 10px; background: var(--rbp-ink); color: var(--rbp-accent); display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.rbp-optional { font-size: 12px; font-weight: 600; color: var(--rbp-ink-2); background: var(--rbp-surface-2); border: 1px solid var(--rbp-line); border-radius: 999px; padding: 3px 10px; letter-spacing: .02em; text-transform: uppercase; }
.rbp-drop { border: 2px dashed var(--rbp-line); border-radius: var(--rbp-radius-lg); padding: 28px 16px; text-align: center; cursor: pointer; background: var(--rbp-surface-2); transition: border-color .15s, background .15s; outline: none; }
.rbp-drop:hover, .rbp-drop:focus-visible { border-color: var(--rbp-ink); background: #FFFDF5; }
.rbp-drop.is-over { border-color: var(--rbp-accent); background: var(--rbp-accent-soft); }
.rbp-drop-inner { display: grid; gap: 6px; justify-items: center; font-size: 15px; }
.rbp-drop-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--rbp-accent); display: grid; place-items: center; margin-bottom: 4px; }
.rbp-drop-icon svg { width: 20px; height: 20px; }
.rbp-link { color: var(--rbp-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--rbp-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.rbp-doc-types { display: flex; flex-wrap: wrap; gap: 6px; }
.rbp-files { display: grid; gap: 8px; }
.rbp-files:empty { display: none; }
.rbp-file { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--rbp-line); border-radius: var(--rbp-radius); background: var(--rbp-surface); }
.rbp-file.is-error { border-color: #F7C6DA; background: #FDECF3; }
.rbp-file-ic { width: 22px; height: 22px; border-radius: 50%; background: var(--rbp-good); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.rbp-file.is-error .rbp-file-ic { background: var(--rbp-bad); }
.rbp-file-meta { display: grid; min-width: 0; }
.rbp-file-meta b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbp-file-rm { appearance: none; border: 0; background: transparent; color: var(--rbp-ink-3); font-size: 14px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.rbp-file-rm:hover { background: var(--rbp-surface-2); color: var(--rbp-ink); }
.rbp textarea:focus::placeholder { color: transparent; }

/* Étape 1 : la carte « Décrivez » s'étire à la hauteur de la carte d'instructions, la zone de texte prend l'espace */
.rbp-grid-stretch { align-items: stretch; }
.rbp-grid-stretch > .rbp-card { display: flex; flex-direction: column; }
.rbp-grid-stretch > .rbp-card > textarea { flex: 1 1 auto; min-height: 600px; }
.rbp-grid-stretch > .rbp-card > .rbp-row { margin-top: auto; }
