/* ==========================================================================
   Étude Salaire 2026 — collection site
   Loaded after tokens.css and site.css, on /etude/salaire2026 only. Holds the
   chrome of the standalone pages and the form primitives the showcase site
   never needed (it has no native form at all).
   ========================================================================== */

/* ---- Page chrome ---- */

.nv-etude {
  font-family: var(--font-body);
  color: var(--text-body);
}

.nv-etude-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 40px 20px;
}

.nv-etude-progress-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.nv-etude-progress {
  margin-bottom: 32px;
}

.nv-etude-progress-track {
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--border-dark);
  overflow: hidden;
}

.nv-etude-progress-track > span {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent);
  transition: width var(--dur-slow) var(--ease-out);
}

.nv-etude-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 40px 96px;
}

.nv-etude-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 40px 40px;
  font-size: 12px;
  color: var(--text-muted);
}

.nv-etude-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

/* ---- Typography ---- */

.nv-etude-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin: 0;
}

.nv-etude-lead {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-body);
  margin: 20px 0 0;
}

.nv-etude-step-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  margin: 0 0 8px;
}

/* Argument row: the shared .nv-iconfeature stacks its icon above the text,
   which is too airy in this reading column, so the icon sits to the side. */
.nv-etude-feature {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.nv-etude-feature-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 4px;
}

.nv-etude-feature-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* ---- Reassurance panel ---- */

.nv-etude-notice {
  position: relative;
  background: var(--surface-raised);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 40px;
}

.nv-etude-notice h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 20px;
  color: var(--text-strong);
  margin: 0 0 12px;
  padding-right: 32px;
}

.nv-etude-notice p,
.nv-etude-notice li {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-body);
}

.nv-etude-notice ul {
  margin: 8px 0 16px;
  padding-left: 18px;
}

.nv-etude-notice li {
  margin-bottom: 6px;
}

.nv-etude-notice-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

/* ---- Fields ---- */

.nv-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.nv-field-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.45;
}

/* Related numbers side by side under a single question, so "années
   d'expérience" reads as one thing rather than three. */
.nv-field-grid {
  display: grid;
  gap: 12px;
}

.nv-field-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.nv-field-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.nv-subfield-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-muted);
}

.nv-field-hint {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: -2px 0 2px;
}

.nv-input,
.nv-select,
.nv-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-strong);
  background: var(--surface-raised);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: border-color var(--dur) var(--ease-out);
  appearance: none;
}

.nv-input::placeholder,
.nv-textarea::placeholder {
  color: var(--text-muted);
}

.nv-select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A94A3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.nv-input:focus-visible,
.nv-select:focus-visible,
.nv-textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Spinners are dropped: they collide with the "€" and "%" suffixes, and
   nudging a salary one unit at a time is of no use. */
.nv-input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.nv-input[type="number"]::-webkit-outer-spin-button,
.nv-input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

/* A suffix such as "€" or "%" sitting inside the field. */
.nv-input-group {
  position: relative;
  display: block;
}

.nv-input-group .nv-input {
  padding-right: 44px;
}

.nv-input-suffix {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ---- Choices ---- */

.nv-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nv-choice {
  position: relative;
  display: inline-flex;
}

.nv-choice input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.nv-choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 15px;
  line-height: 1.2;
  color: var(--text-body);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}

.nv-choice input:checked + span {
  color: var(--text-strong);
  border-color: var(--accent);
  background: rgba(255, 107, 91, 0.12);
}

.nv-choice input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Two mutually exclusive answers side by side. */
.nv-choices--binary .nv-choice {
  flex: 1 1 0;
  min-width: 120px;
}

.nv-choices--binary .nv-choice span {
  width: 100%;
}

/* Stacked checkboxes for the multi-answer questions. */
.nv-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nv-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-body);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out);
}

.nv-checklist input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.nv-checklist input:checked ~ span {
  color: var(--text-strong);
}

/* ---- Autofilled values, editable on demand ---- */

.nv-autofill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 16px;
  font-size: 16px;
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-dark-strong);
  border-radius: var(--radius-sm);
}

.nv-autofill-edit {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.nv-autofill:hover .nv-autofill-edit,
.nv-autofill:focus-within .nv-autofill-edit {
  opacity: 1;
}

.nv-autofill-edit:focus-visible {
  opacity: 1;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* On a touchscreen there is no hover to reveal the pencil with, and a value
   nobody can reach is a value nobody can correct. */
@media (hover: none) {
  .nv-autofill-edit {
    opacity: 1;
  }
}

/* ---- Follow-up questions ---- */

/* A question that opens because of a previous answer slides in rather than
   popping, so the page does not appear to jump on its own. */
.nv-appear {
  animation: nv-appear var(--dur) var(--ease-out) both;
}

@keyframes nv-appear {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nv-appear {
    animation: none;
  }
}

/* ---- Sharing ---- */

.nv-share {
  margin-top: 48px;
  padding: 32px;
  background: var(--surface-raised);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
}

/* The prize, set slightly apart from the reason to share: the argument and the
   incentive are two different things and should not read as one paragraph. */
.nv-share-prize {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
}

.nv-share-prize-visual {
  flex: none;
  width: 132px;
  height: auto;
  display: block;
}

.nv-share-prize-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
}

.nv-share-prize-text strong {
  color: var(--text-strong);
}

.nv-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.nv-share-actions .nv-btn {
  flex: 1 1 0;
  min-width: 140px;
  text-decoration: none;
}

.nv-share-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
}

.nv-share-link-label {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.nv-share-link code {
  flex: 1 1 auto;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-body);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nv-share-link .nv-btn {
  flex: none;
}

/* ---- Feedback ---- */

.nv-field-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--danger);
}

/* The error colour is the brand accent, so the border carries the meaning too. */
.nv-field--invalid .nv-input,
.nv-field--invalid .nv-select,
.nv-field--invalid .nv-textarea {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.nv-etude-status {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---- Actions ---- */

.nv-etude-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border-dark);
}

.nv-etude-actions--end {
  justify-content: flex-end;
}

/* ---- Mobile ---- */

@media (max-width: 640px) {
  .nv-etude-header {
    padding: 20px 20px 16px;
  }

  .nv-etude-main {
    padding: 28px 20px 72px;
  }

  .nv-etude-footer {
    padding: 0 20px 32px;
  }

  .nv-etude-title {
    font-size: 30px;
  }

  .nv-etude-step-title {
    font-size: 24px;
  }

  .nv-etude-notice {
    padding: 20px;
  }

  /* Three number fields side by side stop being tappable well below 640px. */
  .nv-field-grid--3 {
    grid-template-columns: 1fr;
  }

  .nv-share {
    padding: 24px 20px;
  }

  /* Side by side, the card leaves the text too narrow a column to read. */
  .nv-share-prize {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .nv-share-actions .nv-btn {
    flex-basis: 100%;
  }

  /* The link is far too long to sit on the same row as its label and button. */
  .nv-share-link {
    flex-wrap: wrap;
  }

  .nv-share-link code {
    flex-basis: 100%;
    order: 1;
  }

  .nv-etude-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .nv-etude-actions .nv-btn {
    width: 100%;
  }
}
