/* Page /projet/ : questionnaire en étapes. Jetons de couleur : assets/css/site.css. */
.projet { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 8vw, 96px); }
.projet .wrap { max-width: 760px; }
.projet-head { margin: 14px 0 34px; scroll-margin-top: 96px; }
.projet-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-stretch: 86%; margin: 12px 0 14px; }
.projet-lead { color: var(--graphite); font-size: 1.06rem; max-width: 60ch; }
.projet-facts { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.projet-facts li {
  font: 500 0.75rem/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--graphite);
  padding: 9px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card);
}
.projet-noscript { padding: 18px 20px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); }

/* Carte du questionnaire */
.q-app { background: var(--card); border: 1px solid var(--rule); border-radius: 22px; padding: clamp(22px, 4vw, 40px); }
.q-progress { height: 4px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.q-progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width 0.4s var(--ease); }
.q-count { margin: 14px 0 0; }
.q-form { scroll-margin-top: 120px; }
.q-title { font-size: clamp(1.6rem, 3.4vw, 2.1rem); font-stretch: 90%; margin: 18px 0 8px; }
.q-title:focus:not(:focus-visible) { outline: none; }
.q-intro { color: var(--graphite); margin-bottom: 6px; }
.q-step { display: grid; gap: 22px; }
.q-step[hidden] { display: none; }

/* Champs */
.q-field { display: grid; gap: 8px; min-width: 0; }
.q-label, .q-choices legend { font-weight: 600; font-size: 0.98rem; color: var(--ink); line-height: 1.4; padding: 0; }
.q-field input:not([type=checkbox]):not([type=radio]), .q-field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid color-mix(in srgb, var(--ink) 45%, var(--rule));
  border-radius: 12px; padding: 12px 14px; min-height: 48px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.q-field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.q-field input:focus-visible, .q-field textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.q-field [aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px color-mix(in srgb, var(--error) 22%, transparent); }
.q-choices { border: 0; margin: 0; padding: 0; }
.q-hint { font-size: 0.86rem; color: var(--graphite); margin: -2px 0 2px; }
.q-options { display: grid; gap: 8px; }
.q-option { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px;
  padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--ink) 35%, var(--rule)); border-radius: 12px; background: var(--paper); min-height: 48px; }
.q-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--paper)); }
.q-option:has(input:disabled) { opacity: 0.55; }
.q-option input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.q-option label { cursor: pointer; line-height: 1.4; padding: 12px 0; margin: -12px 0; }
.q-option label::before { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* toute la rangée est cliquable */
.q-option input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.q-option .q-detail { position: relative; z-index: 1; grid-column: 2; margin-top: 4px; min-height: 42px; padding: 9px 12px; }

/* Navigation et envoi */
.q-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 22px; border-top: 1px dashed var(--rule); }
.q-nav .btn:only-child, .q-nav #q-suiv { margin-left: auto; }
.q-nav.is-recap { border-top: 0; margin-top: 10px; padding-top: 0; }
.q-nav.is-recap #q-prec { margin-left: 0; }
.q-send { display: grid; gap: 14px; margin-top: 30px; padding-top: 22px; border-top: 1px dashed var(--rule); }
.q-send[hidden] { display: none; }
.q-send > .btn-primary { justify-self: start; }
.q-send-alt { display: flex; flex-wrap: wrap; gap: 10px; }
.q-note { font-size: 0.9rem; color: var(--graphite); max-width: 62ch; }
.q-reset { justify-self: start; font: inherit; font-size: 0.88rem; color: var(--graphite); background: none; border: 0; padding: 10px 0;
  text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; min-height: 44px; }
.q-reset:hover { color: var(--ink); }
.q-status { margin-top: 16px; font-size: 0.92rem; color: var(--ink); min-height: 1.4em; }
.q-status:empty { margin: 0; min-height: 0; }
.q-privacy { margin-top: 22px; font-size: 0.86rem; color: var(--graphite); }

/* Récapitulatif */
.q-summary { display: grid; gap: 14px; }
.q-sum-step { border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px; background: var(--paper); }
.q-sum-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.q-sum-head h3 { font-size: 1.05rem; font-stretch: 92%; margin: 0; }
.q-edit { font: inherit; font-size: 0.88rem; color: var(--accent); background: none; border: 0; padding: 10px 4px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.2em; min-height: 44px; }
.q-dl { display: grid; gap: 4px 0; margin: 8px 0 0; }
.q-dl dt { font-size: 0.84rem; color: var(--graphite); margin-top: 8px; }
.q-dl dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.q-empty { color: var(--graphite); font-size: 0.92rem; margin-top: 6px; }

@media (max-width: 560px) {
  .q-nav .btn, .q-send > .btn-primary { flex: 1 1 auto; justify-content: center; }
  .q-send > .btn-primary { justify-self: stretch; }
  .q-send-alt .btn { flex: 1 1 100%; justify-content: center; }
}
/* Les boutons .btn sont en inline-flex : l'attribut hidden doit toujours l'emporter */
.q-app [hidden] { display: none !important; }

/* Champ anti-robots : hors écran, jamais vu ni atteint au clavier */
.q-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.q-secours { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper); }
.q-secours[hidden] { display: none; }
.q-secours-titre { font-weight: 600; }
#q-effacer { margin-top: 12px; }
.q-merci { background: var(--card); border: 1px solid var(--rule); border-radius: 22px; padding: clamp(22px, 4vw, 40px); display: grid; gap: 14px; }
.q-merci[hidden] { display: none; }
.q-merci h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-stretch: 88%; outline: none; }
.q-merci p { color: var(--graphite); }
.q-merci strong { color: var(--ink); overflow-wrap: anywhere; }
