/* Batimat 2026 — direction B « Stand mode »
   Sombre, contrasté, gros CTA — pensé mobile, debout, sur un stand. */

:root {
  --bg: #0c1024;
  --panel: #1a2040;
  --panel-focus: #232a52;
  --text: #ffffff;
  --muted: #9aa3c7;
  --cta: #ffd23f;
  --cta-text: #0c1024;
  --ok: #41d98d;
  --radius: 12px;
}
body[data-entity="gap"] { --accent: #5b78ff; --accent-soft: rgba(91, 120, 255, 0.18); }
body[data-entity="am"]  { --accent: #6d84ff; --accent-soft: rgba(109, 132, 255, 0.18); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Sora", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.wrap { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 22px; }

/* ---------- Header ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 0;
}
.logo { font-weight: 800; font-size: 15px; letter-spacing: -0.3px; line-height: 1.2; }
.logo span { color: var(--accent); }
.logo small { display: block; font-weight: 400; font-size: 10.5px; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.pill {
  font-size: 10px;
  font-weight: 700;
  background: var(--cta);
  color: var(--cta-text);
  padding: 6px 11px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ---------- Étape 1 : formulaire ---------- */
#step-form { padding: 22px 0 40px; }
h1 { font-size: 27px; line-height: 1.14; letter-spacing: -0.8px; margin-bottom: 9px; }
h1 span { color: var(--accent); }
.lead { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; line-height: 1.5; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

label.field { display: block; margin-bottom: 11px; position: relative; }
label.field .lbl {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin: 0 0 5px 2px;
}
input {
  width: 100%;
  border: 2px solid transparent;
  background: var(--panel);
  padding: 14px 15px;
  color: var(--text);
  font-size: 16px; /* ≥16px : empêche le zoom auto iOS */
  font-family: inherit;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
input::placeholder { color: #6f7799; }
input:focus { border-color: var(--accent); background: var(--panel-focus); }
input:invalid:not(:placeholder-shown):not(:focus) { border-color: #ff6b6b55; }

/* Dropdown Pappers */
.company-wrap { position: relative; }
#pappers-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: #141936;
  border: 1px solid #2b3363;
  border-radius: var(--radius);
  margin-top: 6px;
  max-height: 280px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}
#pappers-dropdown.open { display: block; }
.pp-item { padding: 12px 14px; cursor: pointer; border-bottom: 1px solid #232a52; }
.pp-item:active, .pp-item:hover { background: var(--panel-focus); }
.pp-name { font-weight: 600; font-size: 14px; }
.pp-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.pp-free {
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--accent);
  cursor: pointer;
  background: var(--accent-soft);
}

/* Aperçu conseiller */
#advisor-preview {
  display: none;
  align-items: center;
  gap: 11px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin: 4px 0 14px;
}
#advisor-preview.visible { display: flex; }
.avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 99px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13.5px;
  color: #fff;
}
.advisor-txt small { display: block; font-size: 11px; color: var(--muted); }
.advisor-txt b { font-size: 14px; }

/* CTA */
button.cta {
  width: 100%;
  background: var(--cta);
  color: var(--cta-text);
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  padding: 17px;
  border: none;
  border-radius: var(--radius);
  font-size: 16.5px;
  cursor: pointer;
  margin-top: 10px;
  transition: transform 0.1s, opacity 0.15s;
}
button.cta:active { transform: scale(0.98); }
button.cta:disabled { opacity: 0.6; }

.reassure {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 15px;
  justify-content: center;
  text-align: center;
}
.dot { width: 8px; height: 8px; min-width: 8px; background: var(--ok); border-radius: 99px; }

/* ---------- Étape 2 : agenda ---------- */
#step-meeting { display: none; flex: 1; flex-direction: column; padding-bottom: 20px; }
body.step-2 #step-form { display: none; }
body.step-2 #step-meeting { display: flex; }

.meeting-head { display: flex; align-items: center; gap: 11px; padding: 18px 0 12px; }
.meeting-head .advisor-txt b { font-size: 15px; }
#back-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  padding: 6px 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.frame-wrap {
  flex: 1;
  background: #fff;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  min-height: 560px;
}
#meeting-frame { width: 100%; height: 100%; min-height: 560px; border: none; }

/* ---------- Chooser racine ---------- */
.chooser { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; gap: 14px; }
.chooser h1 { text-align: center; margin-bottom: 20px; }
a.entity-btn {
  display: block;
  background: var(--panel);
  border: 2px solid #2b3363;
  border-radius: 14px;
  padding: 20px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: border-color 0.15s;
}
a.entity-btn:hover { border-color: #5b78ff; }
a.entity-btn small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 4px; }

@media (min-width: 700px) {
  h1 { font-size: 32px; }
  #step-form { padding-top: 34px; }
}
