/* Outil « Préparer sa demande de devis » — styles propres à l'outil (variables du site, thème sombre compris). */
.pd-tool { max-width: 900px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, .8rem + 2vw, 2.4rem); }
.pd-tool *, .pd-tool *::before, .pd-tool *::after { min-width: 0; }
.pd-head h2 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem); margin-bottom: .5rem; }
.pd-intro { color: var(--muted); margin: 0 0 .6rem; }
.pd-privacy { font-size: .9rem; border-inline-start: 3px solid var(--g-text); padding-inline-start: .8rem; margin: 0 0 1.4rem; color: var(--text); }

/* Avancement */
.pd-prog { margin-bottom: 1.2rem; }
.pd-pstep { font-family: var(--mono); font-size: .8rem; letter-spacing: .05em; color: var(--copper-ink); margin: 0 0 .45rem; }
[dir="rtl"] .pd-pstep { font-family: var(--sans); letter-spacing: 0; font-size: .95rem; }
.pd-bar { position: relative; height: 8px; border-radius: 999px; background: var(--sand); border: 1px solid var(--line); overflow: hidden; }
.pd-bar span { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--g-text); border-radius: 999px; transition: width .4s var(--ease); }

/* Écran */
.pd-screen { display: grid; gap: 1.15rem; }
.pd-screen[hidden] { display: none; }
.pd-ql { font-size: clamp(1.15rem, 1rem + .7vw, 1.45rem); line-height: 1.3; margin: 0; }
.pd-ql:focus { outline: none; }
.pd-ql:focus-visible { outline: 2px solid var(--copper); outline-offset: 4px; }
.pd-lead { margin-top: -.6rem !important; }
.pd-fs { border: 0; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pd-fs legend { padding: 0; margin-bottom: .45rem; width: 100%; font-weight: 600; font-size: .95rem; }
.pd-fs.pd-main legend { margin-bottom: .2rem; }
.pd-hint { color: var(--muted); font-size: .9rem; margin: 0; font-weight: 400; }
.pd-opt { color: var(--muted); font-weight: 400; font-size: .85em; }
.pd-opts { display: grid; gap: .55rem; }
.pd-opts.pd-compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); }
.pd-ow { display: grid; gap: .1rem; }
.pd-o { display: flex; align-items: flex-start; gap: .7rem; padding: .8rem .95rem; border: 1px solid var(--input-line); border-radius: 12px; background: var(--paper); cursor: pointer; font-weight: 550; line-height: 1.45; overflow-wrap: break-word; }
.pd-o:hover { border-color: var(--copper); }
.pd-o input { flex: none; width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; accent-color: var(--copper-btn); }
.pd-o small { display: block; font-weight: 400; color: var(--muted); font-size: .88rem; margin-top: .15rem; }
.pd-o:has(input:checked) { border-color: var(--copper); box-shadow: inset 0 0 0 1px var(--copper); background: var(--surface); }
.pd-o:has(input:checked) > span { font-weight: 700; }
.pd-o:has(input:checked) small { font-weight: 400; }
.pd-o:has(input:focus-visible), .pd-c:has(input:focus-visible) { outline: 2px solid var(--copper); outline-offset: 2px; }
.pd-more { margin: 0; padding-inline-start: 2.8rem; font-size: .85rem; }
.pd-more a, .pd-src a, .pd-tool .pd-note a { color: var(--g-text); text-underline-offset: 3px; }
.pd-ol { font-size: .85em; color: var(--muted); }
.pd-field { display: grid; gap: .35rem; }
.pd-field label { font-weight: 600; font-size: .95rem; }
.pd-field input:not([type=checkbox]):not([type=radio]):not([type=file]), .pd-field select, .pd-field textarea {
  font: inherit; font-size: 1rem; padding: .7rem .9rem; border: 1px solid var(--input-line); border-radius: 10px; background: var(--paper); color: var(--text); width: 100%; max-width: 100%; }
.pd-field input:focus, .pd-field select:focus, .pd-field textarea:focus { outline: 2px solid var(--copper); outline-offset: 0; border-color: transparent; }
.pd-field input:disabled, .pd-field select:disabled { opacity: .55; }
.pd-field input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
.pd-row2, .pd-row3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.pd-row3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); align-items: end; }
.pd-checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.pd-c { display: inline-flex; align-items: flex-start; gap: .5rem; font-weight: 450; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; max-width: 100%; overflow-wrap: anywhere; line-height: 1.4; }
.pd-c input { flex: none; width: 1.05rem; height: 1.05rem; margin: .12rem 0 0; accent-color: var(--copper-btn); }
.pd-unk { align-self: end; margin-bottom: .2rem; border-radius: 10px; }
.pd-err { margin: 0; color: #b3261e; font-weight: 600; font-size: .92rem; }
.pd-err::before { content: "⚠ "; }
:root[data-theme="dark"] .pd-err, :root[data-theme="dark"] .pd-warn, :root[data-theme="dark"] .pd-sendst.err { color: #ffb4ab; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pd-err, :root:not([data-theme="light"]) .pd-warn, :root:not([data-theme="light"]) .pd-sendst.err { color: #ffb4ab; } }
.pd-err[hidden] { display: none; }
.pd-warn { color: #b3261e; font-weight: 650; }
.pd-chosen { margin: -.4rem 0 0; font-weight: 650; color: var(--copper-ink); }
.pd-nav { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .4rem; justify-content: space-between; }
.pd-nav .btn, .pd-actions .btn { cursor: pointer; font: inherit; font-weight: 650; }
.pd-nav .pd-next { margin-inline-start: auto; }
.pd-tool .btn.ghost { color: var(--text); }
.pd-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.pd-actions .btn { padding-block: .6rem; }

/* Diagnostic */
.pd-prop { background: var(--paper); border: 1px solid var(--line); border-inline-start: 4px solid var(--g-text); border-radius: 12px; padding: 1rem 1.1rem; }
.pd-prop p { margin: 0 0 .4rem; }
.pd-propt { font-size: 1.15rem; }
.pd-notes { margin: .6rem 0 0; padding-inline-start: 1.2rem; display: grid; gap: .5rem; font-size: .93rem; }
.pd-src { font-size: .82rem; color: var(--muted); margin: .2rem 0 0; }
.pd-src > span { font-weight: 600; }

/* Terrain et carte */
.pd-mapsec { display: grid; gap: .6rem; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: var(--paper); }
.pd-mapsec h4 { margin: 0; font-size: 1rem; }
.pd-markinfo { margin: 0; font-size: .93rem; overflow-wrap: anywhere; }
.pd-markinfo small { display: block; color: var(--muted); }
.pd-mapbox { display: grid; gap: .5rem; }
.pd-mapbox[hidden] { display: none; }
.pd-map { height: clamp(260px, 50vh, 420px); border-radius: 10px; border: 1px solid var(--line); z-index: 0; }
.pd-map:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }
.pd-pin span { display: block; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #b3261e; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.pd-coords summary { cursor: pointer; font-weight: 600; padding: .3rem 0; }
.pd-coords[open] > :not(summary) { margin-top: .7rem; }
.pd-coords .btn { cursor: pointer; font: inherit; font-weight: 650; }
.pd-cgps[hidden], .pd-clam[hidden], .pd-tf[hidden], .pd-rq[hidden], .pd-date[hidden], .pd-pro[hidden] { display: none; }
.pd-tool .leaflet-control-layers label { font-weight: 400; display: block; }

/* Documents */
.pd-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.pd-doc { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .85rem; background: var(--paper); }
.pd-doc .pd-c { border: 0; padding: 0; border-radius: 0; }
.pd-why { margin: .25rem 0 0; padding-inline-start: 1.6rem; font-size: .88rem; color: var(--muted); }
.pd-ar { font-family: "Plex Arabic", var(--sans); font-weight: 600; color: var(--copper-ink); margin-inline-start: .35rem; }
.pd-missing h4 { margin: .3rem 0 .3rem; font-size: 1rem; }
.pd-misslist { margin: .4rem 0 0; padding-inline-start: 1.2rem; display: grid; gap: .35rem; font-size: .93rem; }
.pd-allok { margin: 0; color: var(--g-text); font-weight: 650; }
.pd-flist { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.pd-flist li { overflow-wrap: anywhere; font-size: .93rem; }
.pd-fsize { color: var(--muted); }
.pd-note { margin: 0; }
.pd-note ul { margin: .3rem 0 0; padding-inline-start: 1.1rem; display: grid; gap: .4rem; }
.pd-note p { margin: 0; }

/* Consentement */
.pd-consent .pd-c { border: 0; padding: 0; border-radius: 0; font-size: .9rem; color: var(--muted); }
.pd-consent a { color: var(--g-text); }

/* Résumé et outils */
.pd-sum { margin-top: 1.6rem; }
.pd-sumd summary { cursor: pointer; }
.pd-sumh { display: inline; font-size: 1rem; margin: 0; }
.pd-answers { margin: .7rem 0 0; display: grid; gap: .7rem; font-size: .92rem; }
.pd-answers dt { font-weight: 700; }
.pd-answers dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
.pd-answers dd span { color: var(--muted); }
.pd-answers dd span::after { content: " :"; }
[lang="en"] .pd-answers dd span::after, [dir="rtl"] .pd-answers dd span::after { content: ":"; }
.pd-link { font: inherit; font-size: .9rem; background: none; border: 0; padding: .15rem .25rem; color: var(--g-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pd-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pd-saved { margin: 0; font-size: .85rem; color: var(--muted); }

/* Récapitulatif : carte sombre, comme le résultat du convertisseur Lambert */
.pd-result { background: var(--ink); color: #eeecff; border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.1rem, .8rem + 1.6vw, 2rem); overflow-wrap: break-word; }
.pd-result a { color: var(--copper-l); text-underline-offset: 3px; }
.pd-result a:hover { color: #f2c79d; }
.pd-result .pd-link { color: var(--copper-l); }
.pd-kicker { font-family: var(--mono); font-size: .78rem; color: var(--copper-l); margin: 0 0 .5rem; letter-spacing: .04em; }
[dir="rtl"] .pd-kicker { font-family: var(--sans); font-size: .92rem; letter-spacing: 0; }
.pd-rt { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem); color: #fff; margin: 0 0 .6rem; }
.pd-rt:focus { outline: none; }
.pd-rt:focus-visible { outline: 2px solid var(--copper-l); outline-offset: 4px; }
.pd-disc { font-size: .92rem; color: rgba(238, 236, 255, .85); border-inline-start: 3px solid var(--copper-l); padding-inline-start: .9rem; margin: 0 0 1rem; }
.pd-part { margin-top: 1.4rem; }
.pd-part h4 { font-size: 1.05rem; color: #fff; margin: 0 0 .6rem; padding-bottom: .4rem; border-bottom: 1px solid rgba(233, 230, 255, .18); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; }
.pd-dl { margin: 0; display: grid; gap: .45rem; }
.pd-dl > div { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: .2rem 1rem; }
.pd-dl dt { color: rgba(238, 236, 255, .78); font-size: .9rem; }
.pd-dl dd { margin: 0; overflow-wrap: anywhere; }
.pd-p-checks ul, .pd-nextl { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: .5rem; }
.pd-p-checks .pd-src, .pd-result .pd-small, .pd-result .pd-ol { color: rgba(238, 236, 255, .78); }
.pd-missline { margin: 1rem 0 0; padding: .7rem .9rem; border: 1px solid rgba(224, 153, 92, .55); border-radius: 10px; font-size: .93rem; }
.pd-msg { width: 100%; font-family: var(--mono); font-size: .85rem; line-height: 1.5; padding: .8rem; border-radius: 10px; border: 1px solid rgba(233, 230, 255, .3); background: rgba(255, 255, 255, .06); color: #eeecff; resize: vertical; }
[dir="rtl"] .pd-msg { font-family: var(--sans); font-size: .95rem; }
.pd-msg:focus { outline: 2px solid var(--copper-l); outline-offset: 1px; }
.pd-small { font-size: .85rem; margin: .7rem 0 0; }
.pd-send .pd-consent .pd-c { color: rgba(238, 236, 255, .88); }
.pd-send .pd-consent a { color: var(--copper-l); }
.pd-send .pd-err { color: #ffb4ab; }
.pd-send .btn { margin-top: .8rem; cursor: pointer; font: inherit; font-weight: 650; }
.pd-sendst { margin: .7rem 0 0; font-weight: 650; }
.pd-sendst:empty, .pd-otherst:empty { display: none; }
.pd-sendst.ok { color: #9be39e; }
.pd-sendst.err { color: #ffb4ab; }
.pd-otherst { margin: .6rem 0 0; font-weight: 600; }
.pd-result .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.pd-result .btn.ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.pd-result .btn:focus-visible { outline: 2px solid var(--copper-l); outline-offset: 2px; }
.pd-backnav { margin-top: 1rem; }
.pd-print-only { display: none; }

@media (max-width: 560px) {
  .pd-nav .btn, .pd-actions .btn { width: 100%; justify-content: center; }
  .pd-nav .pd-next { margin-inline-start: 0; }
  .pd-o { padding: .65rem .6rem; gap: .5rem; }
  .pd-tool { padding: .9rem .75rem; border-radius: 14px; }
  .pd-sec .wrap { width: min(100% - 1.5rem, var(--max)); }
  .pd-result { padding: 1rem .8rem; }
  .pd-dl > div { grid-template-columns: 1fr; }
  .pd-more { padding-inline-start: 1rem; }
  .pd-mapsec { padding: .75rem; }
}
@media (prefers-reduced-motion: reduce) { .pd-bar span { transition: none; } }
.a11y-rm .pd-bar span { transition: none; }

/* Impression : uniquement le récapitulatif, sur fond blanc */
@media print {
  @page { margin: 14mm; }
  .top, .foot, .page-head, .skip, .a11y, .listen-btn, .listen-bar, main > :not(.pd-sec),
  .pd-head, .pd-prog, .pd-screen, .pd-sum, .pd-tools, .pd-backnav, .pd-msgsec, .pd-send, .pd-other, .pd-status, .pd-edit, noscript, .hp { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; font-size: 10.5pt; }
  .pd-sec { padding: 0 !important; }
  .pd-sec .wrap { width: 100%; max-width: none; }
  .pd-tool { border: 0; padding: 0; max-width: none; background: #fff; }
  .pd-result { background: #fff !important; color: #000 !important; border: 0; padding: 0; }
  .pd-result a { color: #000 !important; }
  .pd-rt, .pd-part h4 { color: #000 !important; }
  .pd-kicker, .pd-disc, .pd-dl dt, .pd-result .pd-small, .pd-src, .pd-result .pd-ol { color: #222 !important; }
  .pd-disc { border-color: #000; }
  .pd-part h4 { border-color: #999; }
  .pd-missline { border-color: #000; }
  .pd-print-only { display: block; font-size: 9pt; color: #222; margin: 0 0 .4rem; }
  .pd-part { break-inside: avoid; }
  .pd-part h4 { break-after: avoid; }
}
