/* ==========================================================================
   /onboard — design exact : fond beige, carte blanche centrée (style Typeform)
   ========================================================================== */

html, body { height: 100%; }
body {
  margin: 0;
  background: #f3efe6; /* beige */
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ---- Header : sigle+tibida | FR/EN + Accueil ---- */
.pf-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  flex: none;
}
.pf-brand {
  display: inline-flex; align-items: center;
}
/* Wordmark officiel tibida (mot noir + point jaune) — v1.8.416 */
.pf-wordmark { height: 30px; width: auto; display: block; }
.pf-top-right { display: flex; align-items: center; gap: 10px; }
.pf-langswitch {
  display: inline-flex; background: #e8e2d4; border-radius: 999px; padding: 3px;
}
.pf-langopt {
  border: none; background: none; cursor: pointer;
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  color: #6b655a;
}
.pf-langopt.sel { background: #1a1a1a; color: #fff; }
.pf-home {
  font-size: 13px; font-weight: 600; color: #6b655a; text-decoration: none;
  background: #e8e2d4; border-radius: 999px; padding: 7px 12px;
}
.pf-home:hover { color: #1a1a1a; }

/* ---- Scène ---- */
.pf-stage {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px 20px 16px;
  overflow-y: auto;
}
.pf-card {
  width: 100%; max-width: 560px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(60, 50, 30, 0.10);
  padding: 34px 38px 28px;
  animation: pfIn 0.32s ease;
}
@keyframes pfIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Compteur + progression ---- */
.pf-count {
  font-size: 12px; color: #a09a8c; text-align: center; margin: 0 0 8px;
  font-variant-numeric: tabular-nums;
}
.pf-progress {
  height: 3px; border-radius: 2px; background: #efe9db;
  overflow: hidden; margin-bottom: 22px;
}
.pf-progress-bar {
  height: 100%; width: 0%;
  background: #1a1a1a; border-radius: 2px;
  transition: width 0.35s ease;
}

/* ---- Question ---- */
.pf-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  color: #6b655a; margin: 0 0 10px;
}
.pf-question {
  margin: 0 0 8px;
  font-size: 27px; font-weight: 800; line-height: 1.25;
  letter-spacing: -0.4px;
}
.pf-hint {
  margin: 0 0 22px;
  font-size: 15px; color: #6b655a; line-height: 1.5;
}
.pf-flabel {
  display: block; font-size: 13px; font-weight: 700; margin: 0 0 8px;
}
.pf-error {
  display: none;
  margin: 0 0 12px; padding: 10px 12px;
  border-radius: 10px;
  background: #fdecec; color: #b3261e;
  font-size: 14px; line-height: 1.45;
}
.pf-error.show { display: block; }

/* ---- Ligne Turnstile + bouton ---- */
.pf-captcha-row {
  display: flex; align-items: center; gap: 12px; margin: 18px 0 4px;
  flex-wrap: wrap;
}
.pf-captcha-row .pf-captcha { flex: 1 1 auto; min-height: 65px; }
.pf-captcha-row .t-btn-primary { flex: none; }

/* ---- Bas de carte : hint clavier + Continuer ---- */
.pf-cardfoot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid #f0ece2;
}
.pf-keyhint { font-size: 12px; color: #a09a8c; }
.pf-keyhint kbd {
  background: #f3efe6; border: 1px solid #e2dccb; border-radius: 6px;
  padding: 2px 8px; font-size: 11px; font-family: inherit;
}
.pf-continue {
  border: none; cursor: pointer;
  background: #1a1a1a; color: #fff;
  font-size: 15px; font-weight: 700;
  padding: 13px 26px; border-radius: 999px;
}
.pf-continue:disabled { background: #c9c2b2; cursor: not-allowed; }

/* ---- Divers (champs, cartes, récap, succès) ---- */
.pf-actions { display: flex; gap: 10px; margin-top: 20px; }
.pf-actions .t-btn, .pf-actions .t-btn-primary { flex: 1; min-height: 52px; font-size: 16px; }
.pf-back {
  margin-top: 14px; background: none; border: none; padding: 8px 0;
  color: #6b655a; font-size: 14px; cursor: pointer;
}
.pf-back:hover { color: #1a1a1a; }
.pf-skip {
  margin-top: 6px; background: none; border: none; padding: 8px 0;
  color: #6b655a; font-size: 14px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; display: block;
}
.pf-resend {
  margin-top: 14px; background: none; border: none; padding: 8px 0;
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.pf-resend:disabled { opacity: 0.45; cursor: not-allowed; }
.pf-code {
  font-size: 28px !important; letter-spacing: 10px; text-align: center;
  font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 14px 12px !important;
}
.pf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.pf-card-opt {
  border: 1.5px solid #e2dccb; border-radius: 12px; background: #fbf9f4;
  padding: 16px 12px; cursor: pointer; text-align: center;
  font-size: 15px; font-weight: 600;
  min-height: 64px; display: flex; align-items: center; justify-content: center;
}
.pf-card-opt.sel { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }

/* ---- Onboarding v2 : cartes produits (multisélection) ---- */
.pf-products { grid-template-columns: 1fr; }
.pf-prod {
  flex-direction: column; align-items: flex-start; justify-content: center;
  text-align: left; gap: 4px; padding: 16px; min-height: 0;
}
.pf-prod-t { font-size: 16px; font-weight: 700; }
.pf-prod-d { font-size: 13px; font-weight: 400; line-height: 1.45; color: #6b655a; }
.pf-prod.sel .pf-prod-d { color: #d8d2c4; }

/* ---- Onboarding v2 : sélecteur de sous-domaine ---- */
.pf-sub-wrap { display: flex; align-items: stretch; gap: 0; }
.pf-sub-input { flex: 1 1 auto; min-width: 0; border-radius: 10px 0 0 10px; }
.pf-sub-suffix {
  flex: none; display: inline-flex; align-items: center;
  padding: 0 14px; font-size: 15px; font-weight: 600; color: #6b655a;
  background: #f5f1e6; border: 1px solid #e2dccb; border-left: none;
  border-radius: 0 10px 10px 0;
}
.pf-sub-msg { margin: 12px 0 0; font-size: 14px; line-height: 1.45; font-weight: 600; }
.pf-sub-msg.checking { color: #6b655a; }
.pf-sub-msg.ok { color: #137333; }
.pf-sub-msg.err { color: #b3261e; }
.pf-suggs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pf-sugg {
  border: 1.5px solid #1a1a1a; background: #fff; color: #1a1a1a;
  border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.pf-sugg:hover { background: #1a1a1a; color: #fff; }
.pf-siteurl { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; margin-top: 6px; word-break: break-all; }
.pf-recap { margin: 4px 0 8px; border: 1px solid #e2dccb; border-radius: 12px; overflow: hidden; }
.pf-recap-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 14px; font-size: 15px; border-bottom: 1px solid #f0ece2;
}
.pf-recap-row:last-child { border-bottom: none; }
.pf-recap-k { color: #6b655a; flex: none; }
.pf-recap-v { font-weight: 600; text-align: right; word-break: break-word; }
.pf-recap-edit {
  background: none; border: none; color: #6b655a;
  font-size: 13px; cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px; padding: 2px 0;
}
.pf-success { text-align: center; }
.pf-success-check {
  width: 72px; height: 72px; border-radius: 50%;
  background: #1a1a1a; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700; margin-bottom: 18px;
}
.pf-pin {
  font-size: 40px; font-weight: 800; letter-spacing: 8px;
  font-variant-numeric: tabular-nums; margin: 12px 0 4px;
}
.pf-optional { font-size: 13px; font-weight: 400; color: #a09a8c; }
#pfPhoneWrap .pf-wrap { width: 100%; }
#pfWaWrap .pf-wrap { width: 100%; }
#pfWaWrap { margin-top: 2px; }

/* ---- Carte adresse (OpenStreetMap, pointeur noir tibida) ---- */
.pf-map {
  height: 260px; border-radius: 14px; overflow: hidden;
  border: 1px solid #e2dccb; margin-top: 12px;
  position: relative; z-index: 0; background: #e8e2d4;
}
.pf-map .leaflet-container { font-family: inherit; }
.pf-pin-wrap { background: none; border: none; }
.pf-pin {
  width: 28px; height: 28px; background: #161616;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35);
  position: relative;
}
.pf-pin::after {
  content: ''; position: absolute; width: 9px; height: 9px;
  background: #fff; border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.pf-locate {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid #1a1a1a; background: #fff; color: #1a1a1a;
  font-size: 14px; font-weight: 700; padding: 10px 16px; border-radius: 999px;
  cursor: pointer; margin-top: 4px;
}
.pf-locate:disabled { opacity: .5; cursor: wait; }
#fAddrSearch { margin-bottom: 10px; }
/* Champ adresse en lecture seule : synchronisé par la carte (règle permanente) */
#fAddress[readonly] { background: #f5f5f7; color: #1d1d1f; cursor: default; }

/* ---- Écran fuseau horaire (v1.8.426) : recherche + liste IANA ---- */
.pf-tz-list {
  margin-top: 10px; max-height: 264px; overflow-y: auto;
  border: 1px solid #e3ded2; border-radius: 12px; background: #fff;
}
.pf-tz-opt {
  display: block; width: 100%; text-align: left; padding: 11px 14px;
  min-height: 44px; background: none; border: none; cursor: pointer;
  border-bottom: 1px solid #f0ece1; font-size: 15px; color: #1a1a1a;
}
.pf-tz-opt:last-child { border-bottom: none; }
.pf-tz-opt.sel { background: #1a1a1a; color: #fff; font-weight: 600; }

/* ---- Écran menu facultatif (v1.8.426) ---- */
.pf-file-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; box-sizing: border-box; cursor: pointer; text-align: center;
}
.pf-menu-file {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; margin-top: 8px;
  border: 1px solid #e3ded2; border-radius: 10px; background: #faf8f2;
}
.pf-menu-fname { font-size: 14px; font-weight: 600; word-break: break-all; }
.pf-menu-remove {
  flex: none; border: none; background: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #b3261e; padding: 6px 4px;
}
.pf-menu-text { resize: vertical; min-height: 120px; }
.pf-skip {
  display: block; margin: 14px auto 0; border: none; background: none;
  cursor: pointer; font-size: 14px; font-weight: 600; color: #6b655a;
  text-decoration: underline; padding: 8px;
}

/* ---- Footer ---- */
.pf-footer {
  text-align: center; font-size: 12px; color: #a09a8c;
  padding: 0 20px 22px; flex: none;
}

@media (max-width: 420px) {
  .pf-card { padding: 26px 22px 22px; }
  .pf-question { font-size: 23px; }
  .pf-captcha-row { flex-direction: column; align-items: stretch; }
  .pf-captcha-row .t-btn-primary { width: 100%; }
}

