/* =====================================================================
   demande.css — la demande de devis (demande.js)
   ---------------------------------------------------------------------
   Toutes les classes portent le préfixe dq- : rien ici ne touche au
   reste du site. La feuille ne connaît que les jetons de trimbour.css
   (--bg, --fg, --fg-2, --fg-3, --hair, --hair-2, --mark…) et en ajoute
   trois : la peinture de la jauge, sa seconde passe, et le rouge des
   erreurs — le seul rouge du site, réservé à ça.

   Angles vifs partout sauf les cercles (numéros d'étape, portrait),
   comme le reste du site. Un intitulé est en Sentient, le texte en
   Switzer.
   ===================================================================== */

.dq-sec {
  --dq-peinture: var(--taupe-marque);
  --dq-peinture-2: var(--taupe);
  --dq-rouge: #A0372A;
  background: var(--bg);
}

/* Un élément masqué l'est vraiment : plusieurs composants posent leur
   propre display, qui écraserait sinon l'attribut hidden. */
.dq [hidden], .dq-merci [hidden], .dq-depot[hidden], .dq-rappel[hidden] { display: none !important; }

.dq-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.dq-cache { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dq-piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.dq-note { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--fg-3); }

.dq-lien {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--hair-2);
  text-underline-offset: 3px;
  cursor: pointer;
  transition: text-decoration-color .25s var(--sortie), color .25s var(--sortie);
}
.dq-lien:hover { color: var(--mark); text-decoration-color: currentColor; }

/* ------------------------------ trame ------------------------------- */

.dq-tete .tb-note { max-width: 30ch; }

.dq-grille {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 350px);
  gap: clamp(40px, 5.4vw, 92px);
  align-items: start;
}

/* ------------------------------ étapes ------------------------------ */

.dq-etape {
  padding: clamp(30px, 3.2vw, 44px) 0 clamp(30px, 3.2vw, 44px) 50px;
  border-top: 1px solid var(--hair);
}
.dq-etape[data-n="1"] { border-top: 0; padding-top: 4px; }

.dq--attente .dq-etape {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .75s var(--sortie), transform .85s var(--sortie);
}
.dq--attente .dq-etape.dq-vu { opacity: 1; transform: none; }

.dq-etape__t {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 0 -50px;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(22px, 2vw, 27px);
  line-height: 1.2;
  letter-spacing: -.012em;
}

.dq-num {
  position: relative;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--hair-2);
  border-radius: 50%;
  font-family: var(--f-display);
  font-size: 16px;
  line-height: 1;
  font-variant-numeric: lining-nums;
  color: var(--fg-2);
  transition: background .45s var(--sortie), border-color .45s var(--sortie);
}
.dq-num > span { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity .3s var(--sortie), transform .45s var(--sortie); }
.dq-num__ok { width: 16px; height: 16px; opacity: 0; transform: scale(.4); color: var(--sur-ink); }
.dq-num__ok svg { width: 16px; height: 16px; }
.dq-etape--faite .dq-num { background: var(--ink); border-color: var(--ink); }
.dq-etape--faite .dq-num__c { opacity: 0; transform: scale(.4); }
.dq-etape--faite .dq-num__ok { opacity: 1; transform: none; }

/* Le petit signe du chiffre 1 à l'arrivée depuis un bouton « devis ». */
.dq-signe { animation: dq-signe .95s var(--sortie); }
@keyframes dq-signe {
  0%   { transform: none; box-shadow: 0 0 0 0 rgba(147, 138, 122, .55); }
  25%  { transform: scale(1.2) rotate(-9deg); }
  50%  { transform: scale(1.08) rotate(6deg); }
  100% { transform: none; box-shadow: 0 0 0 14px rgba(147, 138, 122, 0); }
}

.dq-etape__s {
  margin: 8px 0 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-2);
  max-width: 58ch;
}

/* --------------------------- les pastilles -------------------------- */

.dq-pastilles { display: flex; flex-wrap: wrap; gap: 8px; }

.dq-pastille {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--hair-2);
  background: transparent;
  color: var(--fg);
  font-size: 14.5px;
  line-height: 1.2;
  cursor: pointer;
  transition: background .25s var(--sortie), border-color .25s var(--sortie), color .25s var(--sortie), gap .25s var(--sortie);
}
.dq-pastille:hover { border-color: var(--fg); }
.dq-pastille__c { display: inline-grid; width: 0; overflow: hidden; transition: width .25s var(--sortie); }
.dq-pastille__c svg { width: 14px; height: 14px; color: var(--taupe-clair); }
.dq-pastille[aria-pressed="true"] {
  gap: 8px;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--sur-ink);
}
.dq-pastille[aria-pressed="true"] .dq-pastille__c { width: 14px; }

.dq-autre {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  color: var(--taupe);
  cursor: pointer;
}
.dq-autre svg { width: 16px; height: 16px; }
.dq-autre span:last-child { border-bottom: 1px solid currentColor; }
.dq-autre:hover { color: var(--fg); }

/* ------------------------------ champs ------------------------------
   Étiquette flottante : posée dans le champ tant qu'il est vide, elle
   monte au focus ou dès qu'il porte une valeur. L'exemple n'apparaît
   qu'au focus — sinon il se superposerait à l'étiquette. */

.dq-champ { position: relative; margin-top: 12px; }
.dq-pastilles + .dq-autre + .dq-champ,
.dq-pastilles + .dq-autre[hidden] + .dq-champ { margin-top: 22px; }

.dq-champ__i {
  display: block;
  width: 100%;
  min-height: 60px;
  margin: 0;
  padding: 25px 16px 9px;
  border: 1px solid var(--hair-2);
  border-radius: 0;
  background: var(--table);
  font: inherit;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--fg);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s var(--sortie), box-shadow .2s var(--sortie);
}
textarea.dq-champ__i {
  min-height: 156px;
  padding-top: 30px;
  line-height: 1.6;
  resize: none;
  overflow: hidden;
}
.dq-champ__i::placeholder { color: transparent; transition: color .2s var(--sortie); }
.dq-champ__i:focus::placeholder { color: var(--fg-3); }
.dq-champ__i:hover { border-color: var(--fg-3); }
.dq-champ__i:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

.dq-champ__l {
  position: absolute;
  left: 17px;
  top: 18px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--fg-3);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .22s var(--sortie), color .22s var(--sortie);
}
.dq-champ__i:focus + .dq-champ__l,
.dq-champ__i:not(:placeholder-shown) + .dq-champ__l {
  transform: translateY(-10px) scale(.76);
  color: var(--taupe);
}
.dq-champ--multi .dq-champ__l { top: 20px; }

.dq-champ__i[aria-invalid="true"] { border-color: var(--dq-rouge); box-shadow: inset 0 -2px 0 var(--dq-rouge); }
.dq-champ__i[aria-invalid="true"]:focus { box-shadow: 0 0 0 1px var(--dq-rouge), inset 0 -2px 0 var(--dq-rouge); }
.dq-champ__err {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--dq-rouge);
}
.dq-etape > .dq-champ__err { margin-top: 12px; }

.dq-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }

/* ------------------------------ amorces ----------------------------- */

.dq-amorces { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin-top: 10px; }
.dq-amorces > .dq-note { margin-right: 4px; }
.dq-amorce {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 4px 9px;
  border: 0;
  background: none;
  font-size: 13.5px;
  color: var(--fg-2);
  cursor: pointer;
  transition: color .2s var(--sortie), background .2s var(--sortie);
}
.dq-amorce span:first-child { color: var(--taupe); font-weight: 500; }
.dq-amorce span:last-child { border-bottom: 1px dashed var(--hair-2); }
.dq-amorce:hover { color: var(--fg); background: var(--taupe-pale); }

/* ------------------------------ photos ------------------------------ */

.dq-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.dq-case {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  aspect-ratio: 4 / 3;
  min-height: 96px;
  padding: 12px 10px;
  border: 1px dashed var(--hair-2);
  background: transparent;
  font: inherit;
  color: var(--fg);
  text-align: center;
  overflow: hidden;
  transition: border-color .25s var(--sortie), background .25s var(--sortie);
}
button.dq-case { cursor: pointer; }
.dq-case--vide:hover, .dq-case--plus:hover { border-color: var(--taupe); background: var(--table); }
.dq-case__d { display: block; width: 48px; height: 36px; color: var(--taupe); }
.dq-case__d svg { width: 100%; height: 100%; }
.dq-case--plus .dq-case__d { width: 24px; height: 24px; }
.dq-case__n { font-size: 14px; font-weight: 500; line-height: 1.3; }
.dq-case__a { font-size: 12.5px; line-height: 1.35; color: var(--fg-3); }

.dq-case--prepa { border-style: solid; border-color: var(--hair); background: var(--taupe-pale); }
.dq-case--prepa .dq-case__n { font-weight: 400; color: var(--fg-2); animation: dq-pouls 1.2s ease-in-out infinite; }
@keyframes dq-pouls { 50% { opacity: .45; } }

.dq-case--pleine { justify-content: flex-end; padding: 0; border-style: solid; border-color: var(--hair); background: var(--table); }
.dq-case__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dq-case--pleine .dq-case__d { margin: auto; }
.dq-case--pleine .dq-case__n {
  position: relative;
  width: 100%;
  padding: 20px 10px 7px;
  font-size: 12.5px;
  text-align: left;
  color: #FBFAF9;
  background: linear-gradient(rgba(36, 37, 40, 0), rgba(36, 37, 40, .78));
}
.dq-case--pleine .dq-case__d + .dq-case__n { color: var(--fg-2); background: none; overflow-wrap: anywhere; }

.dq-retirer {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg-2);
  cursor: pointer;
}
.dq-retirer svg { width: 16px; height: 16px; }
.dq-retirer:hover { color: var(--fg); }
.dq-case .dq-retirer { position: absolute; top: 2px; right: 2px; }
.dq-case .dq-retirer::before {
  content: '';
  position: absolute;
  inset: 6px;
  background: rgba(244, 243, 240, .94);
  z-index: -1;
}
.dq-case .dq-retirer { z-index: 1; isolation: isolate; color: var(--ink); }

.dq-photos__msg {
  margin: 12px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--dq-rouge);
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg);
}

.dq-docs-r { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 16px; }
.dq-bouton {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--hair-2);
  background: transparent;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-2);
  cursor: pointer;
  transition: color .25s var(--sortie), border-color .25s var(--sortie);
}
.dq-bouton svg { width: 17px; height: 17px; color: var(--taupe); }
.dq-bouton:hover { color: var(--fg); border-color: var(--fg); }
.dq-bouton:disabled { opacity: .5; cursor: default; }

.dq-docs { margin: 10px 0 0; padding: 0; list-style: none; }
.dq-docs li { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--hair); font-size: 14px; }
.dq-docs li:last-child { border-bottom: 1px solid var(--hair); }
.dq-docs__i { width: 18px; height: 18px; color: var(--taupe); flex: none; }
.dq-docs__i svg { width: 100%; height: 100%; display: block; }
.dq-docs__n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dq-astuce { margin-top: 12px; }
@media (hover: none) { .dq-astuce { display: none; } }

/* ------------------------- brouillon, profil ------------------------ */

.dq-brouillon, .dq-profil {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  margin: 0 0 26px 50px;
  padding: 11px 16px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--taupe-pale);
}
.dq-profil { background: none; padding: 0 0 0 14px; border-left: 2px solid var(--taupe); }
.dq-brouillon .dq-lien, .dq-profil .dq-lien { min-height: 32px; }

/* ------------------------------ panneau ----------------------------- */

.dq-panneau {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-left: clamp(28px, 3vw, 44px);
  border-left: 1px solid var(--hair);
}

.dq-feuille { display: flex; flex-direction: column; gap: 18px; }

.dq-qui { display: flex; align-items: center; gap: 14px; }
.dq-qui__i { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center 20%; background: var(--taupe-pale); }
.dq-qui p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--fg-2); }
.dq-qui b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 18px; color: var(--fg); }

/* La fiche chantier : la seule surface posée du panneau, un bon de
   papier qui se remplit. Chaque ligne arrive comme une encre qui se
   pose — un cache qui s'ouvre et un flou qui se resserre. */
.dq-fiche {
  position: relative;
  padding: 14px 18px 12px;
  border: 1px solid var(--hair);
  background: var(--table);
}
.dq-fiche__t { margin: 0 0 6px; }
.dq-fiche__vide { margin: 2px 0 4px; font-size: 13.5px; line-height: 1.5; color: var(--fg-3); }
.dq-fiche__l { margin: 0; }
.dq-fiche__r {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--hair);
  font-size: 13.5px;
  line-height: 1.45;
}
.dq-fiche__r dt {
  padding-top: 2px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.dq-fiche__r dd { margin: 0; color: var(--fg); overflow-wrap: anywhere; }
.dq-mini { display: inline-block; width: 30px; height: 30px; margin: 0 4px 2px 0; object-fit: cover; vertical-align: middle; background: var(--taupe-pale); }

.dq-encre { animation: dq-encre .75s var(--sortie) both; }
@keyframes dq-encre {
  from { clip-path: inset(0 100% 0 0); opacity: .25; filter: blur(1.6px); }
  to   { clip-path: inset(0 0 0 0); opacity: 1; filter: none; }
}

.dq-tampon {
  position: absolute;
  top: 9px;
  right: 12px;
  padding: 3px 9px 2px;
  border: 1.5px solid currentColor;
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--taupe);
  opacity: 0;
  transform: rotate(-7deg) scale(1.7);
  transition: opacity .2s var(--sortie), transform .4s cubic-bezier(.3, 1.6, .5, 1);
  pointer-events: none;
}
.dq-fiche--complete .dq-tampon { opacity: .92; transform: rotate(-7deg) scale(1); }

/* — la jauge — */
.dq-jauge { position: relative; }
.dq-score { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dq-pct-w { position: relative; }
.dq-pct {
  font-family: var(--f-display);
  font-size: 42px;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--fg);
}
.dq-niveau {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: right;
  color: var(--mark-t);
}
.dq-envol {
  position: absolute;
  left: 100%;
  top: -2px;
  margin-left: 8px;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: lining-nums;
  white-space: nowrap;
  color: var(--taupe);
  opacity: 0;
  pointer-events: none;
}
.dq-envol--go { animation: dq-envol 1.2s var(--sortie); }
@keyframes dq-envol {
  0%   { opacity: 0; transform: translateY(8px); }
  18%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-24px); }
}

.dq-rouleau { display: block; width: 100%; height: 24px; margin-top: 10px; overflow: visible; }
.dq-rouleau__piste { fill: var(--hair-2); }
.dq-rouleau__couche { fill: var(--dq-peinture); transition: fill 1s var(--sortie); }
.dq-rouleau__stries { fill: #000; transition: opacity 1s var(--sortie); }
.dq-rouleau__fond { flood-color: var(--bg); }
.dq-rouleau--sec .dq-rouleau__couche { fill: var(--dq-peinture-2); }
.dq-rouleau--sec .dq-rouleau__stries { opacity: 0; }

.dq-deplieur { display: none; }

/* — le conseil — */
.dq-conseil {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  background: none;
  font: inherit;
  font-size: 14.5px;
  line-height: 1.35;
  text-align: left;
  color: var(--fg);
  cursor: pointer;
}
.dq-conseil__g { flex: none; min-width: 48px; font-weight: 500; font-variant-numeric: lining-nums; color: var(--taupe); }
.dq-conseil__t { flex: 1; }
.dq-conseil__f { flex: none; width: 15px; height: 15px; color: var(--fg-3); transition: transform .3s var(--sortie), color .3s var(--sortie); }
.dq-conseil__f svg { width: 100%; height: 100%; display: block; }
.dq-conseil:hover .dq-conseil__f { transform: translateX(3px); color: var(--fg); }

.dq-statut {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg-2);
}
.dq-statut::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--dq-peinture); }
.dq-statut--pret { color: var(--fg); }
.dq-statut--pret::before { background: var(--fg); }

/* — l'envoi — */
.dq-envoyer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 16px 22px;
  border: 0;
  background: var(--ink);
  color: var(--sur-ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .3s var(--sortie);
}
.dq-envoyer > span:last-child { display: grid; width: 18px; height: 18px; color: var(--taupe-clair); transition: transform .3s var(--sortie); }
.dq-envoyer svg { width: 100%; height: 100%; }
.dq-envoyer:hover { background: #3E4046; }
.dq-envoyer:hover > span:last-child { transform: translateX(4px); }
.dq-envoyer:disabled { cursor: progress; opacity: .8; }
.dq-secoue .dq-envoyer { animation: dq-secoue .5s var(--sortie); }
@keyframes dq-secoue {
  15% { transform: translateX(-7px); }
  35% { transform: translateX(6px); }
  55% { transform: translateX(-4px); }
  75% { transform: translateX(2px); }
}

.dq-echec {
  display: grid;
  gap: 4px;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--dq-rouge);
  font-size: 14px;
  line-height: 1.5;
}
.dq-echec p { margin: 0; }
.dq-echec .dq-note a { color: var(--fg); border-bottom: 1px solid var(--hair-2); }
.dq-lien-fort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 500;
  color: var(--fg);
}
.dq-lien-fort span:first-child { border-bottom: 1px solid currentColor; }
.dq-lien-fort span:last-child { display: grid; width: 15px; height: 15px; }

.dq-rassure { display: grid; gap: 4px; }
.dq-garanties { margin: 0; font-size: 13px; color: var(--fg-2); }
.dq-avis { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: 13px; color: var(--fg-2); justify-self: start; }
.dq-avis:hover { color: var(--fg); }
.dq-etoiles { display: inline-flex; gap: 1px; color: var(--taupe); }
.dq-etoiles span, .dq-etoiles svg { display: block; width: 12px; height: 12px; }
.dq-rassure-bas { display: none; margin-top: 18px; }

/* ------------------------- dépôt, rappel ---------------------------- */

.dq-depot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(244, 243, 240, .94);
  pointer-events: none;
}
.dq-depot::before { content: ''; position: absolute; inset: 16px; border: 2px dashed var(--taupe); }
.dq-depot[hidden] { display: none; }
.dq-depot p { margin: 0; display: grid; gap: 6px; text-align: center; color: var(--fg-2); }
.dq-depot__t { font-family: var(--f-display); font-size: clamp(28px, 3.4vw, 42px); color: var(--ink); }

.dq-rappel {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 58;
  display: flex;
  align-items: center;
  background: var(--ink);
  color: var(--sur-ink);
  box-shadow: 0 10px 30px rgba(30, 31, 34, .18);
  transform: translateX(-50%);
  animation: dq-monte .5s var(--sortie) both;
}
.dq-rappel[hidden] { display: none; }
.dq-rappel__a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 6px 0 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.dq-rappel__a span:last-child { display: grid; width: 16px; height: 16px; color: var(--taupe-clair); }
.dq-rappel__x { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; background: none; color: var(--sur-ink-2); cursor: pointer; }
.dq-rappel__x svg { width: 15px; height: 15px; }
.dq-rappel__x:hover { color: var(--sur-ink); }
@keyframes dq-monte { from { opacity: 0; translate: 0 12px; } }

/* -------------------------- confirmation ---------------------------- */

.dq-merci { display: grid; justify-items: start; gap: 14px; max-width: 760px; padding-left: 0; }
.dq-merci > .tb-lbl { margin-top: 4px; }
.dq-merci__t {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.1;
  letter-spacing: -.018em;
}
.dq-merci__t:focus { outline: none; }
.dq-merci__t:focus-visible { outline: 2px solid var(--taupe); outline-offset: 6px; }
.dq-merci__s { margin: 0; font-size: clamp(16.5px, 1.2vw, 18px); color: var(--fg-2); }

.dq-sceau { width: 132px; height: 132px; margin: -10px 0 0 -14px; }
.dq-sceau svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dq-sceau__tache { fill: var(--dq-peinture-2); transform-origin: 80px 80px; }
.dq-sceau__gerbe circle { fill: var(--dq-peinture); transform-origin: 80px 80px; }
.dq-sceau__coche { fill: none; stroke: var(--paper); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }

.dq-merci--go .dq-sceau__tache { animation: dq-tache .55s cubic-bezier(.3, 1.5, .5, 1) both; }
.dq-merci--go .dq-sceau__gerbe circle { animation: dq-goutte .7s var(--sortie) both; animation-delay: calc(.12s + var(--i) * 14ms); }
.dq-merci--go .dq-sceau__coche { animation: dq-trace .55s var(--sortie) .42s both; }
@keyframes dq-tache { from { transform: scale(.3); opacity: 0; } }
@keyframes dq-goutte { from { transform: scale(.25); opacity: 0; } }
@keyframes dq-trace { from { stroke-dashoffset: 1; } }

.dq-recap {
  width: 100%;
  margin: 10px 0 4px;
  border-bottom: 1px solid var(--hair);
}
.dq-recap > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--hair);
  font-size: 15px;
  line-height: 1.55;
}
.dq-recap dt { padding-top: 3px; font-size: 10.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-3); }
.dq-recap dd { margin: 0; color: var(--fg); overflow-wrap: anywhere; white-space: pre-line; }

.dq-suite {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin: 10px 0;
  padding: 0;
  list-style: none;
  counter-reset: dq;
}
.dq-suite li { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--hair-2); counter-increment: dq; font-size: 14px; color: var(--fg-2); }
.dq-suite li::before {
  content: counter(dq);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  border: 1px solid var(--hair-2);
  border-radius: 50%;
  font-family: var(--f-display);
  font-size: 15px;
  font-variant-numeric: lining-nums;
  color: var(--fg-2);
}
.dq-suite b { font-family: var(--f-display); font-weight: 400; font-size: 19px; color: var(--fg); }
.dq-suite--en-cours { border-top-color: var(--ink) !important; }
.dq-suite--en-cours::before { background: var(--ink); border-color: var(--ink) !important; color: var(--sur-ink) !important; }
.dq-suite--en-cours span { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); }
.dq-suite--en-cours span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--dq-peinture); animation: dq-pouls 1.6s ease-in-out infinite; }

.dq-signature { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.dq-signature .dq-qui__i { width: 60px; height: 60px; }
.dq-signature p { margin: 0; display: grid; font-size: 14px; color: var(--fg-2); }
.dq-signature b { font-family: var(--f-display); font-weight: 400; font-size: 20px; color: var(--fg); }

.dq-merci__liens { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin: 8px 0 0; font-size: 15px; color: var(--fg-2); }
.dq-merci__liens .dq-lien { font-variant-numeric: lining-nums; }

/* La confirmation se lève dans l'ordre de lecture. */
.dq-merci > * { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--sortie), transform .7s var(--sortie); }
.dq-merci--go > * { opacity: 1; transform: none; }
.dq-merci--go > :nth-child(2) { transition-delay: .5s; }
.dq-merci--go > :nth-child(3) { transition-delay: .58s; }
.dq-merci--go > :nth-child(4) { transition-delay: .66s; }
.dq-merci--go > :nth-child(n+5) { transition-delay: .8s; }
.dq-merci > .dq-sceau { opacity: 1; transform: none; }

/* -------------------- « Ou directement » -------------------------- */

.dq-direct .tb-h2 { font-size: clamp(26px, 2.6vw, 38px); }

/* --------------------------- ordinateur étroit, mobile ---------------
   Sous 1 024 px, le panneau devient une barre collée en bas : le score,
   le bouton, la jauge et le conseil. Le portrait et la fiche se
   déplient au-dessus en touchant le score. Elle prend le relais de la
   barre d'appel tant que le formulaire est à l'écran. */

@media (max-width: 1023px) {
  .dq-grille { grid-template-columns: minmax(0, 1fr); }
  .dq-sec .tb-sec { padding-bottom: 150px; }

  .dq-panneau {
    --bg: var(--ink);
    --fg: var(--sur-ink);
    --fg-2: var(--sur-ink-2);
    --fg-3: var(--sur-ink-2);
    --hair: #43444A;
    --hair-2: #55575E;
    --mark-t: var(--taupe-clair);
    --dq-peinture: #B3A898;
    --dq-peinture-2: #E2DACE;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 62;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "score envoyer"
      "jauge jauge"
      "conseil conseil"
      "statut statut"
      "echec echec";
    gap: 2px 14px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border: 0;
    background: var(--bg);
    color: var(--fg);
    box-shadow: 0 -10px 30px rgba(30, 31, 34, .16);
    transform: translateY(110%);
    transition: transform .45s var(--sortie);
  }
  .dq-panneau--vu { transform: none; }
  .dq-jauge { display: contents; }
  .dq-score { grid-area: score; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
  .dq-pct { font-size: 26px; }
  .dq-niveau { font-size: 9.5px; text-align: left; letter-spacing: .18em; }
  .dq-envol { color: var(--taupe-clair); }
  .dq-rouleau { grid-area: jauge; height: 18px; margin-top: 4px; }
  .dq-envoyer { grid-area: envoyer; width: auto; min-height: 50px; padding: 12px 16px; font-size: 11px; letter-spacing: .13em; background: var(--paper); color: var(--ink); }
  .dq-envoyer:hover { background: #FFFFFC; }
  .dq-envoyer > span:last-child { color: var(--taupe); }
  .dq-conseil { grid-area: conseil; min-height: 44px; padding: 6px 0 4px; border: 0; font-size: 13.5px; }
  .dq-conseil__g { color: var(--taupe-clair); min-width: 42px; }
  .dq-statut { grid-area: statut; font-size: 12.5px; padding-bottom: 2px; }
  .dq-echec { grid-area: echec; margin: 6px 0 2px; }
  .dq-rassure { display: none; }
  .dq-rassure-bas { display: block; }

  /* Le score est aussi le bouton qui déplie la feuille. */
  .dq-deplieur {
    display: block;
    grid-area: score;
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .dq-deplieur:focus-visible { outline-offset: -4px; outline-color: var(--taupe-clair); }

  .dq-feuille {
    --bg: var(--paper);
    --fg: var(--ink);
    --fg-2: var(--ink-2);
    --fg-3: var(--ink-3);
    --hair: var(--line);
    --hair-2: var(--line-2);
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    max-height: min(64vh, 520px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 18px 16px 16px;
    background: var(--bg);
    color: var(--fg);
    border-top: 1px solid var(--line-2);
    box-shadow: 0 -14px 30px rgba(30, 31, 34, .14);
  }
  .dq-panneau--ouvert .dq-feuille { display: flex; animation: dq-feuille .35s var(--sortie); }
  @keyframes dq-feuille { from { transform: translateY(14px); opacity: 0; } }

  /* Pendant la frappe : la jauge et le bouton, rien d'autre. */
  .dq-panneau--frappe { grid-template-areas: "jauge envoyer"; align-items: center; padding-top: 7px; padding-bottom: 7px; }
  .dq-panneau--frappe .dq-score,
  .dq-panneau--frappe .dq-conseil,
  .dq-panneau--frappe .dq-statut,
  .dq-panneau--frappe .dq-deplieur { display: none; }
  .dq-panneau--frappe .dq-rouleau { margin-top: 0; }
  .dq-panneau--frappe .dq-envoyer { min-height: 44px; padding-block: 10px; }

  body.dq-barre-on .tb-barre { transform: translateY(102%) !important; }

  .dq-brouillon, .dq-profil { margin-left: 0; }
}

@media (max-width: 860px) {
  .dq-rappel { bottom: calc(82px + env(safe-area-inset-bottom)); }
}

@media (max-width: 620px) {
  .dq-etape { padding-left: 0; }
  .dq-etape__t { margin-left: 0; gap: 12px; }
  .dq-duo { grid-template-columns: minmax(0, 1fr); }
  .dq-photos { gap: 8px; }
  .dq-case { padding: 8px 6px; min-height: 0; aspect-ratio: 1 / 1; }
  .dq-case__a { display: none; }
  .dq-case__n { font-size: 13px; }
  .dq-case__d { width: 40px; height: 30px; }
  .dq-suite { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dq-suite li { grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; padding: 12px 0; }
  .dq-suite li::before { grid-row: span 2; margin: 0; }
  .dq-recap > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media (max-width: 380px) {
  .dq-envoyer { padding-inline: 12px; letter-spacing: .1em; }
}

@media (pointer: coarse) {
  .dq-amorce { min-height: 44px; }
  .dq-retirer { width: 44px; height: 44px; }
  .dq-brouillon .dq-lien, .dq-profil .dq-lien, .dq-merci__liens .dq-lien { min-height: 44px; display: inline-flex; align-items: center; }
  .dq-avis { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .dq--attente .dq-etape { opacity: 1; transform: none; transition: none; }
  .dq-encre, .dq-signe, .dq-secoue .dq-envoyer, .dq-envol--go,
  .dq-rappel, .dq-panneau--ouvert .dq-feuille { animation: none; }
  .dq-envol { display: none; }
  .dq-panneau { transition: none; }
  .dq-merci > * { opacity: 1; transform: none; transition: none; }
  .dq-merci--go .dq-sceau__tache, .dq-merci--go .dq-sceau__gerbe circle, .dq-merci--go .dq-sceau__coche { animation: none; }
  .dq-case--prepa .dq-case__n, .dq-suite--en-cours span::before { animation: none; }
}
