/* ==========================================================================
   QORSEC — styles propres à l'outil « Suis-je concerné par la loi 05-20 ? »
   Préfixe .lq- ; s'appuie sur les jetons de /assets/css/site.css (aucune couleur en dur
   hors des teintes de la charte). Orange = signalisation uniquement, jamais sur un bouton.
   ========================================================================== */

/* Titre : « 05-20 » ne se coupe jamais au trait d'union grâce à la classe partagée .nowrap (site.css). */

/* ---------- questionnaire ---------- */
.lq-disclaimer { margin-bottom: 22px; }
@media (max-width: 560px) {
  .lq-disclaimer { padding: 10px 12px; gap: 10px; font-size: .88rem; }
  .lq-disclaimer p { font-size: .84rem; line-height: 1.45; }
}
.lq-progress { margin-bottom: 20px; }
.lq-progress .progress-row { font-weight: 700; color: var(--fg-muted); }
.lq-progress .progress { height: 6px; }
.lq-progress .progress > span { transition: width .5s var(--ease-out); }

.lq-form { display: grid; gap: 18px; }
.lq-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.lq-q__legend { display: block; width: 100%; padding: 0; margin: 0 0 6px; }
.lq-q__num {
  display: inline-block; margin-bottom: 8px; padding: 2px 9px; border-radius: var(--r-pill);
  font-size: .74rem; font-weight: 800; letter-spacing: .08em; color: var(--cyan-700);
  background: rgba(14, 165, 233, .09); border: 1px solid rgba(3, 105, 161, .2);
}
.lq-q__title { display: block; font-size: clamp(1.15rem, 1.05rem + .5vw, 1.42rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; color: var(--fg); outline: none; }
.lq-q__title:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.lq-q__hint { margin: 4px 0 0; font-size: .88rem; color: var(--fg-muted); }
.lq-q__hint[hidden] { display: none; }

.lq-options { display: grid; gap: 10px; margin-top: 16px; }
.lq-options--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .lq-options--grid { grid-template-columns: minmax(0, 1fr); } }
.lq-opt {
  position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 13px 16px; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--white);
  cursor: pointer; font-size: .97rem; line-height: 1.45; color: var(--fg);
  transition: border-color var(--t-fast, .15s), background-color var(--t-fast, .15s), box-shadow var(--t-fast, .15s);
}
.lq-opt:hover { border-color: var(--blue-600); background: #f7f9ff; }
.lq-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.lq-opt__mark {
  width: 20px; height: 20px; margin-top: 1px; border: 2px solid #8391ab; border-radius: 50%; background: var(--white);
  display: grid; place-items: center; transition: border-color .15s, background-color .15s;
}
.lq-opt input[type="checkbox"] + .lq-opt__mark { border-radius: 6px; }
.lq-opt input:checked + .lq-opt__mark { border-color: var(--blue-600); background: var(--blue-600); box-shadow: inset 0 0 0 3px var(--white); }
.lq-opt input[type="checkbox"]:checked + .lq-opt__mark { box-shadow: none; background: var(--blue-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.lq-opt:has(input:checked) { border-color: var(--blue-600); background: #eef3ff; box-shadow: 0 0 0 1px var(--blue-600); }
.lq-opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.lq-opt--neutral { border-style: dashed; }
.lq-opt--neutral:has(input:checked) { border-style: solid; }

.lq-help { border-radius: var(--r-md); background: var(--paper-50); border: 1px solid var(--border); }
.lq-help summary {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; list-style: none;
  font-size: .9rem; font-weight: 700; color: var(--cyan-700);
}
.lq-help summary::-webkit-details-marker { display: none; }
.lq-help summary svg { width: 18px; height: 18px; flex: none; }
.lq-help summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-md); }
.lq-help[open] summary { border-bottom: 1px solid var(--border); }
.lq-help__body { padding: 12px 16px 14px; }
.lq-help__body p { margin: 0 0 10px; font-size: .92rem; line-height: 1.6; color: var(--ink-700); }
.lq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lq-chips[hidden] { display: none; }
.chip.lq-ref { white-space: normal; text-align: left; color: var(--cyan-700); background: rgba(14, 165, 233, .06); border-color: rgba(3, 105, 161, .18); font-weight: 700; }

.lq-error { margin: 0; padding: 10px 14px; border-radius: var(--r-sm); background: #fdeeee; color: var(--red-700); font-size: .92rem; font-weight: 700; border: 1px solid rgba(185, 28, 28, .25); }
.lq-error[hidden] { display: none; }
.lq-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.lq-nav #lq-next { margin-left: auto; }
.lq-nav .btn svg { width: 18px; height: 18px; }
.lq-back-icon { margin-right: 6px; }
.lq-nav [hidden] { display: none; }

.lq-done { display: grid; gap: 14px; }
.lq-done[hidden] { display: none; }
.lq-done__text { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-weight: 700; color: var(--fg); }
.lq-done__text svg { width: 22px; height: 22px; flex: none; color: var(--green-700); }

/* ---------- rapport ---------- */
.lq-results.is-done { box-shadow: var(--sh-2); }
.lq-report__head { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.lq-report__head .eyebrow { color: var(--cyan-700); }
.lq-report__title { margin: 10px 0 10px; font-size: clamp(1.45rem, 1.2rem + 1.2vw, 2.1rem); line-height: 1.15; letter-spacing: -.03em; outline: none; }
.lq-report__title:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.lq-report__sum { margin: 0; color: var(--ink-700); font-size: 1.02rem; line-height: 1.6; max-width: 70ch; }
.lq-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.lq-stat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--paper-50); border: 1px solid var(--border); min-width: 0; }
.lq-stat__v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.lq-stat__l { font-size: .82rem; font-weight: 700; color: var(--fg-muted); line-height: 1.3; }
.lq-stat__s { font-weight: 600; color: var(--orange-700); }
.lq-stats__note { margin: 8px 0 0; font-size: .78rem; color: var(--fg-subtle); }
@media (max-width: 560px) { .lq-stats { grid-template-columns: minmax(0, 1fr); } .lq-stat { padding: 10px 12px; } }

.lq-report__disc { margin-top: 18px; }
.lq-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.lq-sec { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); }
.lq-sec__title { margin: 0 0 6px; font-size: 1.22rem; letter-spacing: -.02em; }
.lq-sec__intro { margin: 0 0 14px; font-size: .92rem; color: var(--fg-muted); max-width: 72ch; }
.lq-sub { margin: 18px 0 8px; font-size: 1rem; }

.lq-cats { display: grid; gap: 12px; }
.lq-cat { position: relative; padding: 16px 18px 16px 20px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--white); overflow: hidden; }
.lq-cat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--green-700); }
.lq-cat--verify::before { background: var(--orange-600); }
.lq-cat__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lq-cat__top h4 { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.lq-cert { flex: none; }
.lq-cat__kind { margin: 4px 0 0; font-size: .8rem; font-weight: 700; color: var(--fg-subtle); }
.lq-cat__why { margin: 8px 0 0; font-size: .92rem; color: var(--ink-700); }
.lq-cat__notes { margin: 10px 0 0; padding-left: 1.1em; font-size: .9rem; color: var(--ink-700); }
.lq-cat__notes li { margin: .3em 0; }
.lq-def { margin: 10px 0 10px; }
.lq-def summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--cyan-700); width: max-content; max-width: 100%; }
.lq-def summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.lq-def p { margin: 6px 0 0; font-size: .88rem; color: var(--fg-muted); line-height: 1.6; }

.lq-vig { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.lq-vig li { position: relative; padding: 11px 14px 11px 40px; border-radius: var(--r-md); background: #fff4ec; border: 1px solid rgba(184, 77, 6, .2); font-size: .92rem; color: var(--ink-700); line-height: 1.55; }
.lq-vig li::before { content: "!"; position: absolute; left: 13px; top: 11px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-600); color: #fff; font-size: .72rem; font-weight: 800; }

.lq-theme { margin-top: 18px; }
.lq-theme__title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--navy-800); }
.lq-theme__count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--navy-800); color: #fff; font-size: .72rem; letter-spacing: 0; }
.lq-obls { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lq-obl { padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--white); }
.lq-obl--verify { border-style: dashed; border-color: rgba(184, 77, 6, .4); background: #fffaf6; }
.lq-obl__if { margin: 0 0 6px; font-size: .78rem; font-weight: 800; letter-spacing: .02em; color: var(--orange-700); }
.lq-obl__text { margin: 0; font-size: .95rem; line-height: 1.6; color: var(--fg); }
.lq-obl__cond { margin: 8px 0 0; padding: 7px 10px; border-radius: var(--r-sm); background: var(--paper-50); font-size: .86rem; color: var(--ink-700); }
.lq-obl__cond.is-met { background: #ecf9f0; }
.lq-obl__cond.is-classif { background: #fff4ec; }
.lq-obl__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.lq-obl__via { font-size: .78rem; color: var(--fg-subtle); }
.lq-obl__san { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 10px 0 0; font-size: .86rem; font-weight: 700; color: var(--red-700); }
.lq-obl__san-k { padding: 1px 8px; border-radius: var(--r-pill); background: #fdeeee; border: 1px solid rgba(185, 28, 28, .22); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.lq-obl__san.is-note { font-weight: 500; color: var(--fg-muted); font-size: .84rem; }

.lq-hidden { margin-top: 18px; padding: 12px 14px; border-radius: var(--r-md); border: 1px dashed var(--border-strong); }
.lq-hidden h4 { margin: 0 0 6px; font-size: .88rem; }
.lq-hidden ul { margin: 0; padding-left: 1.1em; font-size: .86rem; color: var(--fg-muted); }

.lq-san td { font-size: .88rem; }
.lq-san__art { white-space: nowrap; font-weight: 700; }
.lq-san__amt { white-space: nowrap; font-weight: 800; color: var(--navy-800); }
.lq-san__note { display: block; margin-top: 6px; font-size: .8rem; color: var(--orange-700); }
.lq-san tr.is-verify td { background: #fffaf6; }
@media (max-width: 640px) {
  .lq-san thead { display: none; }
  .lq-san, .lq-san tbody, .lq-san tr, .lq-san td { display: block; width: 100%; }
  .lq-san tr { padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .lq-san td { padding: 2px 0; border: 0; text-align: left !important; }
  .lq-san__art, .lq-san__amt { white-space: normal; }
}

.lq-list { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: .92rem; color: var(--ink-700); }
.lq-sources a { font-weight: 700; overflow-wrap: anywhere; }
.lq-sources .muted { display: block; font-size: .82rem; }

.lq-steps { margin: 0; padding: 0; list-style: none; counter-reset: lqs; display: grid; gap: 8px; }
.lq-steps li { counter-increment: lqs; position: relative; padding: 11px 14px 11px 48px; border-radius: var(--r-md); background: var(--paper-50); border: 1px solid var(--border); font-size: .93rem; line-height: 1.55; color: var(--ink-700); }
.lq-steps li::before { content: counter(lqs); position: absolute; left: 12px; top: 10px; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: linear-gradient(140deg, var(--blue-600), var(--cyan-500)); color: #fff; font-size: .78rem; font-weight: 800; }
.lq-step__if { display: block; margin: 0 0 3px; font-size: .76rem; font-weight: 800; letter-spacing: .02em; color: var(--orange-700); }
.lq-step__link { display: inline-flex; font-size: .88rem; font-weight: 700; white-space: nowrap; }

.lq-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .lq-tools { grid-template-columns: minmax(0, 1fr); } }
.lq-tool { position: relative; display: grid; gap: 4px; padding: 16px 40px 16px 16px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--white); text-decoration: none; color: var(--fg); transition: border-color .15s, box-shadow .15s, transform .15s; }
.lq-tool:hover { border-color: var(--blue-600); box-shadow: var(--sh-2); transform: translateY(-1px); }
.lq-tool:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lq-tool__t { font-weight: 800; color: var(--blue-600); }
.lq-tool__d { font-size: .86rem; color: var(--fg-muted); line-height: 1.5; }
.lq-tool__go { position: absolute; right: 16px; top: 16px; font-weight: 800; color: var(--blue-600); }

.lq-answers { margin: 0; display: grid; gap: 0; }
.lq-answer { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 4px 16px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.lq-answer:last-child { border-bottom: 0; }
.lq-answer dt { color: var(--fg-muted); }
.lq-answer dd { margin: 0; font-weight: 700; color: var(--fg); }
.lq-answer.is-skip dd { font-weight: 500; color: var(--fg-subtle); font-style: italic; }
.lq-answer__n { font-weight: 800; color: var(--cyan-700); }
.lq-answer__edit { margin-left: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: .8rem; font-weight: 700; color: var(--blue-600); text-decoration: underline; cursor: pointer; }
.lq-answer__edit:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 560px) { .lq-answer { grid-template-columns: minmax(0, 1fr); } }
.lq-generated { margin: 24px 0 0; font-size: .8rem; color: var(--fg-subtle); }

/* ---------- aside, méthode ---------- */
.lq-pro-note { font-size: .82rem !important; margin-top: 10px; }
.lq-method__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .lq-method__steps { grid-template-columns: minmax(0, 1fr); } }
.lq-mstep { position: relative; padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--white); box-shadow: var(--sh-1); }
.lq-mstep h3 { margin: 14px 0 8px; font-size: 1.08rem; }
.lq-mstep p { margin: 0; font-size: .93rem; color: var(--fg-muted); line-height: 1.6; }
.lq-mstep__n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-weight: 800; color: #fff; background: linear-gradient(140deg, var(--navy-800), var(--blue-600)); }
.lq-rules td { font-size: .86rem; }
.lq-rules td:first-child { min-width: 240px; }
#lq-unverified li { margin: .2em 0; }

/* ---------- impression ---------- */
@media print {
  /* le rapport commence page 1 : en-tête de l'outil masqué (l'en-tête imprimé .print-header le remplace)
     et rapport autorisé à se couper (site.css impose break-inside: avoid à .tool-results) */
  .tool-hero { display: none !important; }
  .lq-results { padding: 0 !important; border: 0 !important; break-inside: auto !important; }
  .lq-report__title { font-size: 18pt; }
  .lq-stats { grid-template-columns: repeat(3, 1fr); }
  .lq-stat { border-color: #bbb; background: #fff; }
  .lq-cat, .lq-obl, .lq-steps li, .lq-vig li, .lq-tool { break-inside: avoid; background: #fff !important; border-color: #bbb !important; }
  .lq-sec { break-inside: auto; }
  .lq-sec__title, .lq-theme__title { break-after: avoid; }
  .lq-def summary { display: none; }
  .lq-def p { margin-top: 4px; }
  .lq-tool__go { display: none; }
  .lq-san thead { display: table-header-group; }
  .chip.lq-ref { border-color: #bbb; }
  .lq-steps li::before { background: #10214b; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .lq-answer__edit { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lq-opt, .lq-tool, .lq-progress .progress > span { transition: none; }
  .lq-tool:hover { transform: none; }
}
