/* Charte Experconnect. ponytail: fonts nommees + fallback systeme ; woff2 self-hosted a poser en it.5
   (pas de Google Fonts CDN -> RGPD). Tailles >=16px, fort contraste (lisibilite). */
:root {
  --fuchsia: #BD007B;
  --orange: #E95D0F;
  --gris: #837F7C;
  --ink: #1f1b1a;
  --bg: #f6f4f2;
  --card: #ffffff;
  --line: #e7e2de;
  --radius: 14px;
  --title: "Poppins", system-ui, "Segoe UI", sans-serif;
  --body: "Montserrat", system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.55;
}
h1, h2, .brand { font-family: var(--title); }
h1 { font-size: 1.7rem; margin: 0 0 .6rem; color: var(--fuchsia); }
h2 { font-size: 1.25rem; margin: 0 0 .8rem; }

.topbar {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 1rem 1.25rem; background: var(--card); border-bottom: 3px solid var(--fuchsia);
}
.brand { font-weight: 700; font-size: 1.3rem; color: var(--fuchsia); }
.brand span { color: var(--orange); }
.brand-sub { color: var(--gris); font-size: .95rem; }

#app { max-width: 860px; margin: 1.5rem auto; padding: 0 1rem; display: grid; gap: 1.25rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.hidden { display: none !important; }
.lead { font-size: 1.02rem; }
.meta { color: var(--gris); }

.video {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  aspect-ratio: 16/9; background: #2a2724; color: #fff; border-radius: var(--radius);
  margin: 1rem 0; font-size: 1.1rem;
}
.video em { color: var(--gris); }

.btn {
  font-family: var(--title); font-size: 1.05rem; font-weight: 600;
  border: 0; border-radius: 10px; padding: .8rem 1.4rem; cursor: pointer; margin-top: .4rem;
}
.btn.primary { background: var(--fuchsia); color: #fff; }
.btn.primary:hover { background: #a30069; }
.btn.link { background: none; color: var(--fuchsia); text-decoration: underline; padding: .4rem; }
.btn:disabled { opacity: .5; cursor: default; }

.field { display: block; margin: 1rem 0; font-weight: 600; }
.field input[type=number], .field select {
  display: block; margin-top: .35rem; width: 10rem; font-size: 1.1rem;
  padding: .5rem; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
input[type=range] { width: 100%; accent-color: var(--fuchsia); margin-top: .4rem; }
.ticks {
  display: flex; justify-content: space-between; color: var(--gris);
  font-size: .8rem; margin-top: .2rem; letter-spacing: normal;
}

.otp {
  font-family: var(--title); font-size: 2rem; letter-spacing: .5rem; text-align: center;
  width: 100%; max-width: 12rem; padding: .5rem; border: 2px solid var(--line); border-radius: 10px;
}
.hint { color: var(--gris); }
.error { color: #c0392b; font-weight: 600; }
.warn { color: var(--orange); font-weight: 600; }
.callout {
  background: #fbeef5; border-left: 4px solid var(--fuchsia); padding: .8rem 1rem; border-radius: 8px;
}

/* Resultats : barres proportionnelles */
.result { margin: .7rem 0; }
.result-head { display: flex; justify-content: space-between; align-items: baseline; }
.result-name { font-weight: 600; }
.result-val { font-family: var(--title); font-size: 1.15rem; }
.result-val small { color: var(--gris); font-family: var(--body); font-size: .85rem; font-weight: 400; }
.bar { height: 12px; background: #eee; border-radius: 6px; overflow: hidden; margin-top: .3rem; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--fuchsia), var(--orange)); }
.result.best .result-val { color: var(--fuchsia); }

.chat-log { display: flex; flex-direction: column; gap: .5rem; max-height: 260px; overflow-y: auto; margin: .8rem 0; }
.msg { padding: .55rem .85rem; border-radius: 12px; max-width: 85%; white-space: pre-wrap; line-height: 1.45; }
.msg.user { align-self: flex-end; background: var(--fuchsia); color: #fff; }
.msg.bot { align-self: flex-start; background: #f0ece8; color: var(--ink); }
.chat-form { display: flex; gap: .5rem; }
.chat-form input { flex: 1; font-size: 1rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.disclaimer { color: var(--gris); font-size: .9rem; text-align: center; }
