/* /barometre/barometre.css
   CEO Inside — Baromètre 2026 — composants formulaire
   Charte alignée : Arial, palette ink/red, accents rouges
   Tailwind gère le layout, ce fichier ne fait que les composants spécifiques.
   ───────────────────────────────────────────────────── */

/* ─── Step / fieldset ─── */
.step {
  border: 0;
  padding: 0;
  margin: 0;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Field ─── */
.field { margin: 0 0 32px 0; }
.field:last-child { margin-bottom: 0; }

.q {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
  color: #111;
  margin: 0 0 16px 0;
  letter-spacing: -0.005em;
}
.hint {
  display: inline;
  font-weight: 400;
  font-size: 13px;
  color: #888;
  font-style: italic;
}

/* ─── Options (radio / checkbox custom) ─── */
.opts {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.opt {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  border-top: none;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
  background: #fff;
  font-size: 15px;
  line-height: 1.45;
  color: #2a2a2a;
}
.opt:first-child { border-top: 1px solid #e5e5e5; }
.opt:hover {
  background: #fafafa;
  border-color: #c8c8c8;
}
.opt input {
  margin: 4px 0 0 0;
  flex-shrink: 0;
  accent-color: #C0392B;
  width: 16px;
  height: 16px;
}
.opt:has(input:checked) {
  background: #111;
  color: #fff;
  border-color: #111;
}
.opt:has(input:checked) + .opt { border-top-color: #111; }

/* ─── Scale 1-10 ─── */
.scale {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin: 0 0 10px 0;
}
.scale-opt {
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #e5e5e5;
  padding: 14px 0;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 15px;
  background: #fff;
  transition: all .12s ease;
  color: #111;
}
.scale-opt input { display: none; }
.scale-opt:hover { border-color: #c8c8c8; }
.scale-opt:has(input:checked) {
  background: #C0392B;
  color: #fff;
  border-color: #C0392B;
}
.scale-legend {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
  letter-spacing: 0.02em;
  margin: 6px 2px 0 2px;
}
@media (max-width: 600px) {
  .scale { grid-template-columns: repeat(5, 1fr); }
}

/* ─── Inputs texte / textarea ─── */
input[type="text"],
input[type="email"],
input[type="url"],
textarea,
.select-native {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: #fff;
  color: #111;
  transition: border-color .12s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus,
.select-native:focus {
  outline: none;
  border-color: #C0392B;
}
textarea {
  resize: vertical;
  min-height: 88px;
  font-family: Arial, Helvetica, sans-serif;
}

/* Select natif : flèche custom + arrière propre */
.select-native {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath fill='%23111111' d='M6 8L0 0h12z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.grid-2 .field {
  margin-bottom: 0;
}
@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ─── Personal block ─── */
.personal-block {
  margin: 16px 0 32px 0;
  padding: 28px;
  border: 2px solid #111;
  background: #fafafa;
}

/* ─── Consents ─── */
.consents {
  margin: 32px 0 0 0;
  padding: 24px 0 0 0;
  border-top: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: #2a2a2a;
  cursor: pointer;
}
.consent input {
  margin: 3px 0 0 0;
  flex-shrink: 0;
  accent-color: #C0392B;
  width: 16px;
  height: 16px;
}

/* ─── Honeypot ─── */
.hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─── Form nav ─── */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 48px 0 0 0;
  padding: 28px 0 0 0;
  border-top: 1px solid #e5e5e5;
}
.btn-primary, .btn-secondary {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 28px;
  cursor: pointer;
  transition: all .15s ease;
  border: 2px solid transparent;
  text-decoration: none;
  display: inline-block;
}
.btn-primary {
  background: #111;
  color: #fff;
  border-color: #111;
}
.btn-primary:hover {
  background: #C0392B;
  border-color: #C0392B;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-secondary {
  background: transparent;
  color: #111;
  border-color: #111;
}
.btn-secondary:hover {
  background: #111;
  color: #fff;
}

#btn-next, #btn-submit {
  margin-left: auto;
}

/* ─── Erreur ─── */
.form-error {
  margin: 24px 0 0 0;
  padding: 14px 18px;
  border-left: 3px solid #C0392B;
  background: #fef2f2;
  color: #C0392B;
  font-size: 14px;
  font-weight: 500;
}

.field-error {
  color: #C0392B;
}
.opt.has-error,
.scale-opt.has-error,
input.has-error,
textarea.has-error,
.consent.has-error {
  border-color: #C0392B !important;
}
