/* ============================================================
   AUREC · VALIDATION MARCHÉ — formulaire.css
   Formulaire de traction redesigné dans le thème institutionnel.
   Réutilise les variables de style.css (--navy, --orange, etc.).
   style.css N'EST PAS modifié.
   ============================================================ */

/* ---------- HERO / DASHBOARD LIVE ---------- */
.form-hero {
  padding-top: 64px;
  padding-bottom: 80px;
  border-bottom: 2px solid var(--border);
}

.form-hero .label {
  display: block;
  color: var(--orange);
  margin-bottom: 16px;
}

.form-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  margin-bottom: 24px;
}

.form-hero__purpose {
  max-width: 62ch;
  color: var(--navy-60);
  margin-bottom: 48px;
}

.form-hero__purpose strong {
  color: var(--black);
  font-weight: 600;
}

/* Bloc statistiques live */
.live {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  border-top: 2px solid var(--border);
  border-left: 2px solid var(--border);
  margin-bottom: 40px;
}

.live__counter,
.live__feed {
  border-right: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  padding: 36px 32px;
}

.live__counter {
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.live__counter .label { color: var(--orange); display: block; margin-bottom: 16px; }

.live__num {
  font-weight: 900;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.live__num.is-zero { color: var(--white-15); }

.live__num-label {
  color: var(--white-70);
  font-size: 15px;
  margin: 8px 0 24px;
}

.live__bar {
  height: 14px;
  background: var(--white-15);
  border: 2px solid var(--white);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.live__bar-fill {
  height: 100%;
  width: 0;
  background: var(--orange);
  transition: width 1s ease-out;
}

.live__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white-70);
}

.live__foot .obj { color: var(--orange); }

.live__feed {
  background: var(--white);
}

.live__feed .label { color: var(--orange); display: block; margin-bottom: 18px; }

.feed-empty {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-60);
  padding: 16px 0;
}

/* Viewport du défilement continu */
.feed-list {
  display: none;
  position: relative;
  height: 264px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
}

/* Piste qui défile (liste dupliquée → boucle sans couture) */
.feed-track {
  display: flex;
  flex-direction: column;
  will-change: transform;
  animation: feed-scroll linear infinite;
}

.feed-list:hover .feed-track { animation-play-state: paused; }

@keyframes feed-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .feed-track { animation: none; }
  .feed-list { height: auto; -webkit-mask-image: none; mask-image: none; }
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--navy-10);
  font-size: 14px;
}

.feed-item:last-child { border-bottom: none; }

.feed-dot {
  width: 8px;
  height: 8px;
  background: var(--orange);
  flex-shrink: 0;
}

.feed-name { font-weight: 700; }

.feed-pro {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: 2px 8px;
  flex-shrink: 0;
}

.feed-ago {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-60);
  flex-shrink: 0;
}

/* Insights — MÊME structure que la grille du portail (.exec-stats) */
.insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 2px solid var(--border);
  border-left: 2px solid var(--border);
  max-width: 1000px;
  margin: 0 auto 40px;
}

.insight {
  border-right: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  padding: 30px 22px;
  text-align: center;
}

.insight__stat {
  font-weight: 900;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1;
  color: var(--orange);
  letter-spacing: -0.02em;
}

.insight__label {
  font-size: 13px;
  color: var(--navy-60);
  line-height: 1.45;
  margin-top: 12px;
}

/* ---------- LE FORMULAIRE (carte institutionnelle) ---------- */
.form-shell {
  border: 2px solid var(--border);
  background: var(--white);
  max-width: 720px;
  margin: 0 auto;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.fprogress {
  display: none;
  align-items: center;
  gap: 16px;
  padding: 18px 32px;
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}

.fprogress.is-visible { display: flex; }

.fprogress__back {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  background: var(--white);
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 200ms ease, color 200ms ease;
}

.fprogress__back:hover { background: var(--navy); color: var(--white); }
.fprogress__back.is-hidden { visibility: hidden; }

.fprogress__track {
  flex: 1;
  height: 10px;
  background: var(--navy-10);
  border: 2px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.fprogress__fill {
  height: 100%;
  width: 0;
  background: var(--orange);
  transition: width 400ms ease;
}

.fprogress__step {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--orange);
  flex-shrink: 0;
  min-width: 42px;
  text-align: right;
}

/* Écrans */
.fscreen {
  display: none;
  flex-direction: column;
  flex: 1;
  padding: 40px 40px 44px;
}

.fscreen.is-active {
  display: flex;
  animation: ffade 220ms ease both;
}

@keyframes ffade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fscreen--center { justify-content: center; }

/* Logo mini institutionnel (texte) */
.flogo {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--navy-60);
  margin-bottom: 28px;
}

.flogo span { color: var(--orange); }

/* Prénom / Profil titres */
.fbig-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.fsub {
  color: var(--navy-60);
  margin-bottom: 28px;
}

/* Question */
.q-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: 16px;
}

.q-context {
  background: var(--navy-10);
  border-left: 4px solid var(--orange);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 600;
  color: var(--navy);
}

.q-text {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
}

.q-sub {
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 14px;
  padding-top: 16px;
  border-top: 2px solid var(--navy-10);
}

.hl {
  color: var(--orange);
  font-weight: 800;
  box-shadow: inset 0 -2px 0 rgba(255, 140, 0, 0.4);
}

/* Options */
.fopts { display: flex; flex-direction: column; gap: 12px; }

.opt {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  min-height: 56px;
  display: flex;
  align-items: center;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.opt:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.opt.is-selected {
  border-color: var(--orange);
  background: var(--navy-10);
  color: var(--black);
  box-shadow: inset 4px 0 0 var(--orange);
}

/* OUI / NON */
.ouinon { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-oui,
.btn-non {
  padding: 20px;
  border-radius: 4px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  min-height: 62px;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn-oui {
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
}
.btn-oui:hover { background: var(--orange); border-color: var(--orange); color: var(--black); }

.btn-non {
  background: transparent;
  color: var(--black);
  border: 2px solid var(--border);
}
.btn-non:hover { background: var(--black); color: var(--white); }

/* Joke */
.fjoke {
  background: var(--navy-10);
  border-left: 4px solid var(--orange);
  padding: 14px 18px;
  font-size: 14px;
  font-style: italic;
  font-weight: 500;
  color: var(--navy);
  margin-top: 18px;
  line-height: 1.55;
}

/* Inputs */
.finput {
  width: 100%;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 15px 18px;
  font-size: 15px;
  color: var(--black);
  outline: none;
  transition: border-color 200ms ease;
}

.finput::placeholder { color: var(--navy-60); }
.finput:focus { border-color: var(--orange); }
.finput.is-error { border-color: var(--black); }

.finput-error {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--black);
  margin-top: 6px;
  display: none;
}
.finput-error.is-show { display: block; }

textarea.finput { resize: vertical; min-height: 90px; }

/* Boutons du form (réutilisent .btn de style.css, + variantes) */
.fscreen .btn { margin-top: 16px; }
.fscreen .btn--block { width: 100%; }

.fskip {
  display: inline-block;
  text-align: center;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy-60);
  margin-top: 16px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.fskip:hover { color: var(--orange); }

/* Profil cards */
.profil-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.profil-card {
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.profil-card:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.profil-card.is-selected {
  border-color: var(--orange);
  background: var(--navy-10);
  box-shadow: inset 0 -4px 0 var(--orange);
}

.profil-card__label { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.profil-card__desc { font-size: 13px; color: var(--navy-60); line-height: 1.4; }
.profil-card:hover .profil-card__desc { color: var(--white-70); }

/* Toggle email / tel */
.ftoggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }

.ftoggle__btn {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 13px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy-60);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.ftoggle__btn.is-active {
  border-color: var(--orange);
  background: var(--navy-10);
  color: var(--black);
}

/* Confirmation / warn */
.confirm-warn {
  font-size: 14px;
  color: var(--navy);
  background: var(--navy-10);
  border-left: 4px solid var(--orange);
  padding: 14px 18px;
  margin-bottom: 22px;
  line-height: 1.6;
}

.fhint { font-size: 12px; color: var(--navy-60); margin-top: 10px; }

/* Écrans centrés (partage / final) */
.fscreen--message { justify-content: center; text-align: center; }

.fmsg-title { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin-bottom: 14px; }
.fmsg-text { color: var(--navy-60); line-height: 1.7; margin-bottom: 28px; max-width: 48ch; margin-left: auto; margin-right: auto; }

/* Bloc lien parrainage */
.lien-box {
  border: 2px solid var(--border);
  border-left: 6px solid var(--orange);
  padding: 22px 24px;
  margin-bottom: 24px;
  text-align: left;
}

.lien-label {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: 8px;
}

.lien-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.15em;
  color: var(--navy);
}

.lien-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--navy-60);
  margin-top: 8px;
  word-break: break-all;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--orange);
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 9999;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .live { grid-template-columns: 1fr; }
  .insights { grid-template-columns: repeat(2, 1fr); }
  .form-shell { min-height: 0; }
  .fscreen { padding: 28px 22px 32px; }
  .fprogress { padding: 16px 22px; }
  .profil-cards { grid-template-columns: 1fr; }
}

/* ===== Choix anonyme / prénom (boutons côte à côte) ===== */
.fchoice { display:flex; gap:10px; margin-top:6px; }
.fchoice .btn { flex:1; margin:0; }
@media (max-width:380px) { .fchoice { flex-direction:column; } }

/* ===== Phrase dynamique de progression (live) ===== */
.live__phrase {
  margin-top:12px;
  font-size:13px;
  font-weight:700;
  color:var(--orange);
  line-height:1.4;
  min-height:18px;
}

/* ===== Sélecteur de devise (formulaire international) ===== */
.fcurrency { margin:6px 0 14px; text-align:left; }
.fcurrency__label {
  display:block;
  font-size:12px;
  font-weight:600;
  opacity:.7;
  margin-bottom:6px;
}
.fcurrency select.finput { cursor:pointer; }
