/* Récit guidé (story-guide.js), chargé par la seule page d'accueil.
   En mode guidé, la zone libre et sa dictée s'effacent derrière les questions ;
   le champ reste dans le formulaire, c'est lui qui part au serveur. */
.form-step.is-guided .story-field { display: none; }

.story-guide { display: grid; gap: 14px; }
.story-guide[hidden] { display: none; }
.story-guide-field { display: grid; gap: 6px; }
.story-guide-field label { font-size: 14px; font-weight: 850; }
.story-guide-field label small { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.story-guide-field .field-help { margin: 0; }
.story-guide input,
.story-guide textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1.5px solid #aca6a0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
}
.story-guide textarea { min-height: 112px; line-height: 1.5; resize: vertical; }
.story-guide input:focus,
.story-guide textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(237, 91, 98, .15); }
.story-guide-field.is-main label { font-size: 15px; }
.story-guide-field.is-main textarea { border-color: var(--line); }
.story-guide-tip { margin: -2px 0 0; }
.story-guide-tip[hidden] { display: none; }

/* La jauge : trois crans, du plus simple au plus riche. */
.story-meter { margin-top: 14px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 12px; }
.story-meter[hidden] { display: none; }
.story-meter-bar { display: flex; gap: 4px; }
.story-meter-bar span { width: 22px; height: 8px; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; }
.story-meter[data-level="1"] .story-meter-bar span:nth-child(-n + 1),
.story-meter[data-level="2"] .story-meter-bar span:nth-child(-n + 2),
.story-meter[data-level="3"] .story-meter-bar span { background: var(--yellow); }
.story-meter[data-level="3"] .story-meter-bar span { background: #8fcf8a; }
.story-meter-label { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.story-meter-label strong { margin-right: 4px; color: var(--ink); }

.story-guide-switch { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.story-guide-switch[hidden] { display: none; }
.story-mode-toggle { padding-left: 0; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.story-example { width: 100%; }
.story-example summary { width: fit-content; min-height: 44px; display: flex; align-items: center; color: var(--coral-dark); font-size: 14px; font-weight: 800; cursor: pointer; }
.story-example-body { margin-top: 6px; padding: 14px; display: grid; grid-template-columns: 112px 1fr; gap: 14px; border: 1.5px solid var(--border); border-radius: 12px; background: #fffcf6; }
.story-example-body img { width: 112px; height: auto; border: 2px solid var(--line); border-radius: 4px; background: #fff; }
.story-example-body dl { margin: 0; display: grid; gap: 6px; font-size: 13px; line-height: 1.4; }
.story-example-body dt { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.story-example-body dd { margin: 0 0 4px; }
.story-example-body .field-help { grid-column: 1 / -1; margin: 0; }
@media (max-width: 420px) {
  .story-example-body { grid-template-columns: 1fr; }
  .story-example-body img { width: 150px; }
}

/* Proposition de compléter, avant de lancer. */
.story-gate .auth-shell { max-width: 520px; }
.story-gate h2 { font-size: clamp(27px, 6vw, 36px); }
.story-gate-tips { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.story-gate-actions { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }

/* Seconde chance, sous une planche tirée d'un récit d'une ligne. */
.story-boost { margin: 14px 0 0; padding: 14px 16px; display: grid; gap: 10px; justify-items: start; border: 2px solid var(--line); border-radius: 12px; background: #fff8dc; text-align: left; }
.story-boost[hidden] { display: none; }
.story-boost p { margin: 0; font-size: 14px; line-height: 1.45; }
