/* ==========================================================
   EQUILIBRE · Proposer un terrain · terrain.css
   Espace de travail carte + panneau, mode application mobile,
   formulaires, confirmation, contenu éditorial.
   ========================================================== */

/* Police de repli aux métriques proches d'Inter : pas de saut de mise en page au chargement */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

.tr-page {
  --fb: 'Inter', 'Inter Fallback', 'Calibri', system-ui, sans-serif;
  --fm: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --header-h: 60px;
  --panel-w: 448px;
  --pp: 28px;                                   /* marge intérieure du panneau */
  --e1: 0 1px 2px rgba(10,15,26,.06), 0 0 0 1px rgba(10,15,26,.06);
  --e2: 0 1px 2px rgba(15,30,51,.08), 0 6px 18px -6px rgba(15,30,51,.22);
  --e3: 0 20px 44px -18px rgba(15,30,51,.26);
  --ease-out: cubic-bezier(.4,0,1,1);
  --ease-sheet: cubic-bezier(.32,.72,0,1);
  --err: #9E3B2F;
  font-family: var(--fb);
  background: #fff;
}
.tr-page main { padding-top: var(--header-h); }

.tr-workspace svg, .tr-how svg, .tr-page .tr-intro-tel svg {
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Utilitaires ---------- */
.tr-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.tr-skip {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--blue-6); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px;
}
.tr-skip:focus { top: 10px; }
.tr-mono { font-family: var(--fm); letter-spacing: .02em; }
.tr-opt { color: var(--grey-4); font-weight: 400; }
[hidden] { display: none !important; }

.tr-link-btn {
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--blue-5);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  padding: 6px 0; background: none; border: 0; cursor: pointer; min-height: 32px;
}
.tr-link-btn:hover { color: var(--blue-4); }
.tr-link-light { color: var(--blue-5); }
.tr-link-light:hover { color: var(--blue-4); }

.tr-btn-dark { background: var(--ink); color: #fff; justify-content: center; }
.tr-btn-dark:hover { background: var(--blue-5); }
.tr-btn-outline { border: 1px solid var(--grey-3); color: var(--ink); background: #fff; justify-content: center; }
.tr-btn-outline:hover { border-color: var(--blue-4); background: var(--off); }
.tr-btn-light { background: var(--blue-6); color: #fff; justify-content: center; }
.tr-btn-light:hover { background: var(--blue-5); }
.tr-btn-sm { padding: 10px 16px; font-size: 13px; }
.tr-btn-block { width: 100%; }
.btn[aria-disabled="true"] { cursor: not-allowed; }

.tr-icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; flex: none;
  border-radius: 999px; color: var(--grey-4); transition: background .12s, color .12s;
}
.tr-icon-btn svg { width: 18px; height: 18px; }
.tr-icon-btn:hover { background: var(--off); color: var(--ink); }
.tr-icon-btn[aria-disabled="true"] { opacity: .38; cursor: default; }
.tr-icon-btn[aria-disabled="true"]:hover { background: none; color: var(--grey-4); }
.tr-icon-btn-light { color: var(--blue-5); }
.tr-icon-btn-light:hover { background: #fff; color: var(--blue-6); }

.tr-chip-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px;
  padding: 7px 13px 7px 11px; border: 1px solid var(--grey-2); border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 13px; font-weight: 500;
  transition: border-color .12s, background .12s;
}
.tr-chip-btn svg { width: 16px; height: 16px; color: var(--blue-4); }
.tr-chip-btn:hover { border-color: var(--blue-3); background: var(--off); }
.tr-chip-btn[aria-expanded="true"] { border-color: var(--blue-5); background: var(--blue-1); }

/* ---------- En-tête du site (plein, compact) ---------- */
.tr-header.site-header {
  height: var(--header-h); padding: 0; display: flex; align-items: center;
  background: #fff; color: var(--ink); border-bottom: 1px solid var(--grey-1);
}
.tr-header .header-inner { width: 100%; }
.tr-header .brand img { height: 36px; width: auto; }
.tr-header .nav-primary a { color: var(--grey-5); opacity: 1; }
.tr-header .nav-primary a:hover { color: var(--blue-5); }
.tr-header .btn-outline-header { font-family: var(--fm); letter-spacing: .02em; color: var(--blue-6); border-color: var(--grey-2); }
.tr-header .btn-outline-header:hover { background: var(--off); border-color: var(--blue-3); }
.tr-header .burger span { background: var(--ink); }
.tr-header .mobile-menu { background: #fff; border-top: 1px solid var(--grey-1); }
.tr-header .mobile-menu a { color: var(--ink); border-bottom-color: var(--grey-1); }

/* =====================================================
   ESPACE DE TRAVAIL (desktop)
   ===================================================== */
.tr-workspace {
  position: relative;
  display: grid;
  grid-template-columns: var(--panel-w) minmax(0, 1fr);
  height: clamp(560px, calc(100svh - var(--header-h) - 56px), 1100px);
  background: var(--off);
  isolation: isolate;
}

.tr-panel {
  position: relative; z-index: 3;
  display: flex; flex-direction: column; min-height: 0;
  background: #fff;
  box-shadow: 1px 0 0 var(--grey-1);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--grey-2) transparent;
  scroll-padding-bottom: 200px;
}
.tr-appbar, .tr-sheet-handle, .tr-start, .tr-intro-tel, .tr-intro-alt { display: none; }

/* --- En-tête du panneau --- */
.tr-top { padding: 26px var(--pp) 0; }



.tr-title {
  font-weight: 300; font-size: clamp(23px, 1.75vw, 26px); line-height: 1.18; letter-spacing: -.018em;
  color: var(--ink); margin: 0;
}
.tr-title b { font-weight: 500; color: var(--blue-5); }
.tr-title { transition: font-size .28s var(--ease); }
/* Poste de travail : titre replié dès que l'utilisateur agit, toujours lu par les lecteurs d'écran */
@media (min-width: 760px) and (min-height: 560px) {
  .tr-top.is-compact { padding-top: 4px; }
  .tr-top.is-compact .tr-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.tr-nomap-note:focus { outline: none; }
.tr-search.is-compact .tr-search-hint,
.tr-search.is-compact .tr-search-actions,
.tr-search.is-compact .tr-geoloc-note { display: none; }
.tr-search.is-compact { padding-top: 12px; }

.tr-collapsible { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .28s var(--ease), opacity .2s; }
.tr-collapsible > div { overflow: hidden; min-height: 0; }
.tr-collapsible.is-collapsed { grid-template-rows: 0fr; opacity: 0; }
.tr-lead { margin: 10px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--grey-4); }
.tr-guarantees { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 2px; padding: 0; list-style: none; }
.tr-guarantees li { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--blue-5); }
.tr-guarantees svg { width: 15px; height: 15px; stroke-width: 2.2; color: var(--blue-4); }

/* --- Recherche --- */
.tr-search { position: relative; padding: 20px var(--pp) 0; }
/* Libellé et aide portés par le champ (placeholder) ; conservés pour les lecteurs d'écran */
.tr-search-label, .tr-search-hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tr-omni { position: relative; }
.tr-omni-input {
  width: 100%; height: 52px; padding: 0 86px 0 46px;
  font: 400 16px/1 var(--fb); color: var(--ink);
  background: #fff; border: 1px solid var(--grey-3); border-radius: 999px;
  box-shadow: var(--e1); outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .12s, box-shadow .12s;
}
.tr-omni-input::placeholder { color: var(--grey-4); opacity: 1; }
.tr-omni-input:hover { border-color: var(--blue-3); }
.tr-omni-input:focus { border-color: var(--blue-4); box-shadow: 0 0 0 4px rgba(91,123,163,.25); }
.tr-omni-ico { position: absolute; left: 17px; top: 50%; width: 19px; height: 19px; margin-top: -9.5px; color: var(--grey-4); pointer-events: none; }
.tr-omni-kbd {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-family: var(--fm); font-size: 11px; color: var(--grey-4);
  border: 1px solid var(--grey-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 7px; background: var(--off);
}
.tr-omni.has-value .tr-omni-kbd, .tr-omni:focus-within .tr-omni-kbd { display: none; }
.tr-omni-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; color: var(--grey-4); }
.tr-omni-clear:hover { background: var(--off); color: var(--ink); }
.tr-omni-clear svg { width: 18px; height: 18px; }
.tr-omni-busy {
  position: absolute; right: 50px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border: 2px solid var(--blue-1); border-top-color: var(--blue-4); border-radius: 50%;
  opacity: 0; transition: opacity .12s; animation: tr-spin .8s linear infinite;
}
.tr-omni.is-busy .tr-omni-busy { opacity: 1; }
@keyframes tr-spin { to { transform: rotate(360deg); } }

.tr-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30;
  margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--grey-1); border-radius: 14px; box-shadow: var(--e3);
  max-height: min(380px, 55vh); overflow-y: auto; overscroll-behavior: contain;
}
.tr-result {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer; min-height: 48px;
}
.tr-result.is-active, .tr-result:hover { background: var(--blue-1); }
.tr-result-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--off); color: var(--blue-4); }
.tr-result.is-active .tr-result-ico { background: #fff; }
.tr-result-ico svg { width: 16px; height: 16px; }
.tr-result-l { display: block; font-size: 14.5px; font-weight: 500; color: var(--ink); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-result-s { display: block; font-size: 12.5px; color: var(--grey-4); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-result-t { font-family: var(--fm); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-4); }
.tr-result-note { padding: 12px 12px; font-size: 13.5px; color: var(--grey-4); line-height: 1.5; cursor: default; }
.tr-results-note { padding: 12px 14px; font-size: 13.5px; color: var(--grey-4); line-height: 1.5; }
.tr-results:not([hidden]) + .tr-results-note { top: auto; position: relative; margin-top: 6px; }
.tr-item-static { cursor: default; }
.tr-chip-unv { background: #fff; color: var(--grey-5); outline: 1px dashed var(--grey-3); }
.tr-result-note button { margin-top: 4px; }
.tr-results-mini { position: static; margin-top: 6px; max-height: 260px; box-shadow: var(--e1); }

.tr-search-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tr-geoloc-note { margin: 8px 0 0; font-size: 12.5px; color: var(--blue-5); }

/* --- Zone défilante --- */
.tr-sheet { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; margin-top: 14px; }
.tr-sheet-body { padding: 6px var(--pp) 24px; }
.tr-view { animation: tr-view-in .28s var(--ease) both; }
.tr-view.from-left { animation-name: tr-view-in-left; }
@keyframes tr-view-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes tr-view-in-left { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

/* État vide */
.tr-empty { padding: 8px 0 4px; }
.tr-empty-art { width: 100%; max-width: 280px; height: auto; display: block; margin: 0 0 14px; }
.tr-empty-art .a { stroke: var(--grey-2); stroke-width: 1.3; }
.tr-empty-art .b { stroke: var(--blue-5); stroke-width: 2.2; fill: rgba(91,123,163,.18); }
.tr-empty-art .c { fill: var(--blue-5); stroke: #fff; stroke-width: 2; }
.tr-empty-art .d { fill: none; stroke: var(--blue-3); stroke-width: 1.2; transform-origin: 196px 62px; animation: tr-ping 2.4s var(--ease) infinite; }
@keyframes tr-ping { 0% { transform: scale(.5); opacity: .9; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.tr-howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tr-howto li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--grey-5); line-height: 1.4; }
.tr-howto li > span:first-child {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--fm); font-size: 11px; color: var(--blue-5); border: 1px solid var(--blue-2);
}

/* Cartes internes (référence, je ne trouve pas) */
.tr-card { margin-top: 12px; padding: 18px; border: 1px solid var(--grey-1); border-radius: 14px; background: #fff; box-shadow: var(--e1); }
.tr-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tr-card-title { font-size: 16px; font-weight: 500; color: var(--ink); letter-spacing: -.005em; outline: none; }
.tr-card-text { font-size: 13.5px; color: var(--grey-4); line-height: 1.55; margin: 6px 0 0; }
.tr-ref-status { font-size: 13px; color: var(--grey-4); min-height: 20px; margin: 10px 0; }
.tr-ref-status.is-ok { color: var(--blue-5); font-weight: 500; }
.tr-ref-status.is-err { color: var(--err); }
.tr-details { margin-top: 12px; border-top: 1px solid var(--grey-1); padding-top: 10px; }
.tr-details summary { cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--blue-5); padding: 4px 0; }
.tr-details p { font-size: 13px; color: var(--grey-4); line-height: 1.55; margin: 8px 0 0; }
.tr-details textarea { margin-top: 8px; width: 100%; font: 14px/1.5 var(--fm); padding: 10px 12px; border: 1px solid var(--grey-3); border-radius: 10px; resize: vertical; }
.tr-details .btn { margin-top: 8px; }
.tr-taxdoc { margin-top: 10px; border: 1px solid var(--grey-2); border-radius: 8px; overflow: hidden; font-family: var(--fm); font-size: 10.5px; }
.tr-taxdoc-head { display: flex; justify-content: space-between; padding: 6px 10px; background: var(--off); color: var(--grey-4); text-transform: uppercase; letter-spacing: .08em; font-size: 9.5px; }
.tr-taxdoc-row { display: grid; grid-template-columns: 1.4fr .8fr .8fr 1fr; gap: 6px; padding: 6px 10px; border-top: 1px solid var(--grey-1); color: var(--grey-5); }
.tr-taxdoc-row:nth-child(2) { color: var(--grey-4); font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; }
.tr-taxdoc .hl { background: var(--blue-1); color: var(--blue-6); font-weight: 500; border-radius: 3px; padding: 0 4px; outline: 1px solid var(--blue-3); }

.tr-lost-options { display: grid; gap: 8px; margin-top: 14px; }
.tr-option {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 12px 14px; border: 1px solid var(--grey-2); border-radius: 12px; background: #fff; min-height: 56px;
  transition: border-color .12s, background .12s;
}
.tr-option b { font-size: 14px; font-weight: 500; color: var(--ink); }
.tr-option span { font-size: 12.5px; color: var(--grey-4); }
.tr-workspace.is-nomap .tr-option-nomap { display: none; }
.tr-option:hover { border-color: var(--blue-3); background: var(--off); }
.tr-option[aria-pressed="true"] { border-color: var(--blue-5); background: var(--blue-1); box-shadow: inset 0 0 0 1px var(--blue-5); }
.tr-pin-box, .tr-describe-box { margin-top: 14px; }
.tr-row-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }

/* Bandeaux */
.tr-banner { margin: 6px 0 12px; padding: 14px 16px; border-radius: 12px; background: var(--blue-1); color: var(--blue-6); font-size: 13.5px; line-height: 1.5; }
.tr-banner p + p { margin-top: 4px; }
.tr-resume-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px 10px;
  margin: 2px 0 12px; padding: 12px 8px 12px 16px; border-radius: 14px; background: var(--off); border: 1px solid var(--grey-1);
}
.tr-resume-card[hidden] { display: none; }
.tr-resume-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.tr-resume-meta { font-family: var(--fm); font-size: 11.5px; color: var(--grey-4); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Liste de sélection */
.tr-sel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 6px; }
.tr-sel-title { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--blue-5); outline: none; }
.tr-sel-tools { display: flex; align-items: center; gap: 2px; }
.tr-menu { position: relative; }
.tr-menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 270px;
  list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--grey-1); border-radius: 12px; box-shadow: var(--e3);
}
.tr-menu-list button { width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; color: var(--ink); min-height: 40px; }
.tr-menu-list button:hover, .tr-menu-list button:focus-visible { background: var(--off); }
.tr-menu-list button.danger { color: var(--err); }
.tr-menu-list .tr-confirm { display: flex; gap: 8px; padding: 6px; }

.tr-tip { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--off); font-size: 12.5px; line-height: 1.5; color: var(--grey-5); }
.tr-tip svg { width: 16px; height: 16px; flex: none; color: var(--blue-4); margin-top: 1px; }

.tr-group + .tr-group { margin-top: 14px; }
.tr-group-h {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 8px 2px 6px; border-bottom: 1px solid var(--grey-1);
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.tr-group-h span { font-family: var(--fm); font-size: 12px; font-weight: 500; color: var(--grey-4); }
.tr-group ul { list-style: none; margin: 0; padding: 0; }
.tr-item { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--grey-1); border-radius: 0; transition: background .12s; }
.tr-item.is-hover, .tr-item:hover { background: var(--off); }
.tr-item.is-new { animation: tr-new 1.2s var(--ease); }
@keyframes tr-new { from { background: var(--blue-1); } to { background: transparent; } }
.tr-item-main {
  flex: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px;
  min-height: 48px; padding: 6px 6px; text-align: left; border-radius: 8px;
}
.tr-chip {
  font-family: var(--fm); font-size: 13px; font-weight: 500; letter-spacing: .02em;
  background: var(--blue-1); color: var(--blue-6); padding: 4px 9px; border-radius: 6px; white-space: nowrap;
}
.tr-item-sub { font-size: 12.5px; color: var(--grey-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-item-area { font-family: var(--fm); font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-item-area.is-loading { color: transparent; background: linear-gradient(90deg, var(--grey-1), var(--off), var(--grey-1)); background-size: 200% 100%; border-radius: 4px; animation: tr-shimmer 1.2s linear infinite; }
@keyframes tr-shimmer { to { background-position: -200% 0; } }
.tr-item-flag { font-size: 11px; color: var(--err); }
.tr-item-rm { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 999px; color: var(--grey-4); }
.tr-item-rm svg { width: 16px; height: 16px; }
.tr-item-rm:hover { background: #fff; color: var(--err); }
.tr-item-rm .tr-rm-txt { display: none; }
.tr-notice { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--off); color: var(--grey-5); font-size: 12.5px; line-height: 1.5; border-left: 2px solid var(--grey-3); }

.tr-nomap-toggle { display: block; margin-top: 18px; color: var(--grey-4); font-weight: 400; font-size: 13px; }
.tr-nomap-note { margin-top: 12px; font-size: 13px; color: var(--grey-4); line-height: 1.5; }
.tr-nearby { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--grey-1); border-radius: 12px; overflow: hidden; }
.tr-nearby li + li { border-top: 1px solid var(--grey-1); }
.tr-nearby label { display: grid; grid-template-columns: 20px auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; min-height: 48px; cursor: pointer; font-size: 13.5px; }
.tr-nearby input { width: 18px; height: 18px; accent-color: var(--blue-5); }
.tr-nearby .tr-here { font-size: 11px; color: var(--blue-5); font-weight: 600; }
.tr-nearby-more { width: 100%; padding: 10px; font-size: 13px; color: var(--blue-5); text-decoration: underline; }

/* --- Dock --- */
.tr-dock {
  position: sticky; bottom: 0; z-index: 7; overflow: hidden; flex: none;
  padding: 14px var(--pp) 12px;
  background: #fff; color: var(--ink);
  border-top: 1px solid var(--grey-1);
  box-shadow: 0 -10px 24px -18px rgba(15,30,51,.25);
}
.tr-dock > * { position: relative; }
.tr-dock-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; column-gap: 14px; row-gap: 2px; }
.tr-figure { display: flex; align-items: baseline; line-height: 1; font-weight: 200; font-size: 44px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; min-inline-size: 3ch; }
.tr-figure { color: var(--blue-6); }
.tr-figure-u { font-size: 14px; font-weight: 500; letter-spacing: .02em; color: var(--blue-4); margin-left: 6px; }
.tr-dock.is-empty .tr-figure-v { color: var(--grey-3); }
.tr-dock-meta { font-family: var(--fm); font-size: 12px; color: var(--grey-4); padding-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-criterion { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--grey-4); }
.tr-criterion::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--grey-3); box-shadow: 0 0 0 3px rgba(136,146,160,.18); flex: none; }
.tr-criterion.is-ok { color: var(--blue-5); }
.tr-criterion.is-ok::before { background: var(--blue-4); box-shadow: 0 0 0 3px rgba(58,86,128,.16); }
.tr-dock-actions { display: flex; gap: 8px; margin-top: 14px; }
.tr-cta { background: var(--blue-6); color: #fff; }
.tr-cta:hover { background: var(--blue-5); }
.tr-cta { flex: 1; min-width: 0; justify-content: space-between; min-height: 48px; font-size: 15px; padding: 12px 18px 12px 22px; white-space: normal; text-align: left; line-height: 1.25; }
#tr-cta-label { min-width: 0; }
.tr-done-actions .btn, .tr-fail-actions .btn { white-space: normal; text-align: center; }
.tr-cta svg { width: 18px; height: 18px; flex: none; transition: transform .2s var(--ease); }
.tr-cta:hover svg { transform: translateX(3px); }
.tr-cta[aria-disabled="true"] { background: var(--grey-1); color: var(--grey-4); }
.tr-cta[aria-disabled="true"]:hover { background: var(--grey-1); }
.tr-cta[aria-disabled="true"] svg { opacity: .4; }
.tr-cta.is-sending { pointer-events: none; }
.tr-cta.is-sending svg { animation: tr-spin .8s linear infinite; }
.tr-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px 0 10px;
  border-radius: 999px; border: 1px solid var(--grey-2); color: var(--ink); font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.tr-back svg { width: 16px; height: 16px; }
.tr-back:hover { background: var(--off); }
.tr-cta-note { margin-top: 8px; text-align: center; font-size: 12px; color: var(--grey-4); }
.tr-dock-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.tr-dock-links .tr-link-btn { font-size: 12.5px; font-weight: 400; }
.tr-dock-tel { font-size: 12.5px; color: var(--grey-4); }
.tr-workspace[data-step="1"] .tr-dock.is-empty .tr-dock-summary { display: none; }
.tr-workspace[data-step="1"] .tr-dock.is-empty .tr-dock-actions { margin-top: 0; }
@media (min-width: 760px) and (min-height: 560px) {
  .tr-dock-tel { display: none; }
  .tr-empty, .tr-search-actions { display: none; }
  /* Sans carte : accessible depuis « Je ne trouve pas mes parcelles » ; lien visible seulement pour en sortir */
  .tr-workspace:not(.is-nomap) .tr-nomap-toggle { display: none; }
}
@media (min-width: 760px) and (max-height: 820px) {
  .tr-figure { font-size: 32px; }
  .tr-dock { padding-top: 12px; }
}
.tr-dock-tel b { font-family: var(--fm); font-weight: 500; color: var(--blue-6); letter-spacing: .02em; }
.tr-dock-tel:hover b { text-decoration: underline; }
.tr-workspace:not([data-step="1"]) .tr-lost-open, .tr-workspace:not([data-step="1"]) #tr-lost-open { display: none; }
.tr-workspace:not([data-step="1"]) .tr-figure { font-size: 30px; }

/* --- Formulaires (étapes 2 et 3) --- */
.tr-form { padding-top: 6px; }
.tr-view-title { font-size: 22px; font-weight: 300; line-height: 1.25; letter-spacing: -.015em; color: var(--ink); outline: none; }
.tr-view-sub { margin-top: 6px; font-size: 13.5px; color: var(--grey-4); line-height: 1.5; }
.tr-fieldset { border: 0; margin: 22px 0 0; padding: 0; min-width: 0; }
.tr-fieldset legend { font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 10px; padding: 0; line-height: 1.35; }
.tr-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tr-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tr-tile-wide { grid-column: 1 / -1; }
.tr-tile, .tr-seg label { position: relative; display: flex; cursor: pointer; }
.tr-tile input, .tr-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tr-tile > span {
  flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1px;
  min-height: 56px; padding: 9px 12px 9px 38px;
  border: 1px solid var(--grey-3); border-radius: 12px; background: #fff;
  font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--ink);
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.tr-tile > span small { font-size: 12px; font-weight: 400; color: var(--grey-4); }
.tr-tile > span::before {
  content: ''; position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border: 1.5px solid var(--grey-3); border-radius: 50%; background: #fff; transition: all .12s;
}
.tr-tile:hover > span { border-color: var(--blue-3); }
.tr-tile input:checked + span { border-color: var(--blue-5); box-shadow: inset 0 0 0 1px var(--blue-5); background: var(--blue-1); }
.tr-tile input:checked + span::before {
  border-color: var(--blue-5); background: var(--blue-5)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.6L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.tr-tile:has(:focus-visible) > span, .tr-seg label:has(:focus-visible) > span { outline: 2px solid var(--blue-4); outline-offset: 2px; }
.tr-fieldset.is-invalid .tr-tile > span { border-color: var(--err); }

.tr-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-seg label > span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 15px;
  border: 1px solid var(--grey-3); border-radius: 999px; background: #fff;
  font-size: 13.5px; font-weight: 500; color: var(--ink); line-height: 1.25;
  transition: border-color .12s, background .12s, color .12s;
}
.tr-seg label:hover > span { border-color: var(--blue-3); }
.tr-seg input:checked + span { background: var(--blue-6); border-color: var(--blue-6); color: #fff; }

.tr-cond { margin-top: 12px; padding: 2px 0 4px 14px; border-left: 2px solid var(--blue-1); }
.tr-cond .tr-fieldset { margin-top: 14px; }
.tr-reassure { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(220,230,243,.55); color: var(--blue-5); font-size: 13px; line-height: 1.5; }

.tr-field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; min-width: 0; }
.tr-field > label { font-size: 13px; font-weight: 500; color: var(--grey-5); }
.tr-field input, .tr-field select, .tr-field textarea, .tr-mini-combo input {
  width: 100%; min-height: 48px; padding: 0 14px;
  font: 400 16px/1.4 var(--fb); color: var(--ink);
  background: #fff; border: 1px solid var(--grey-3); border-radius: 10px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.tr-field textarea { padding: 12px 14px; resize: vertical; min-height: 88px; }
.tr-field select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%234A5568' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") right 10px center/18px no-repeat; }
.tr-field input:hover, .tr-field select:hover, .tr-field textarea:hover { border-color: var(--blue-3); }
.tr-field input:focus, .tr-field select:focus, .tr-field textarea:focus, .tr-mini-combo input:focus { border-color: var(--blue-4); box-shadow: 0 0 0 4px rgba(91,123,163,.2); }
.tr-field input:disabled, .tr-field select:disabled { background: var(--off); color: var(--grey-4); cursor: not-allowed; }
.tr-field [aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 3px rgba(158,59,47,.12); }
.tr-field-narrow { max-width: 220px; }
.tr-mini-combo { position: relative; }
.tr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tr-hint { font-size: 12.5px; color: var(--grey-4); line-height: 1.45; margin: 0; }
.tr-contact-group .tr-hint { margin-top: -4px; }
.tr-error { font-size: 13px; color: var(--err); line-height: 1.45; margin: 0; }
.tr-error::before { content: 'Erreur\00A0: '; font-weight: 600; }
.tr-errsum { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(158,59,47,.07); border-left: 2px solid var(--err); color: #8C3528; font-size: 13.5px; outline: none; }
.tr-suggest { font-size: 13px; color: var(--blue-5); margin: 0; }
.tr-suggest button { font-weight: 600; text-decoration: underline; color: var(--blue-5); padding: 4px; }
.tr-check { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--grey-5); line-height: 1.5; cursor: pointer; }
.tr-check input { width: 20px; height: 20px; min-height: 0; flex: none; margin-top: 1px; accent-color: var(--blue-5); padding: 0; }
.tr-check a { color: var(--blue-5); text-decoration: underline; text-underline-offset: 2px; }
.tr-legal { margin-top: 12px; font-size: 12px; color: var(--grey-4); line-height: 1.5; }
.tr-msg { margin-top: 16px; }
.tr-msg textarea { font-family: var(--fb); font-size: 16px; min-height: 84px; }
.tr-form #hint-contact { margin-top: 8px; }

/* --- Confirmation --- */
.tr-done { padding-top: 4px; }
.tr-blueprint { margin-bottom: 18px; border-radius: 14px; overflow: hidden; background: var(--off); border: 1px solid var(--grey-1); }
.tr-blueprint svg { display: block; width: 100%; height: auto; }
.tr-blueprint .bp-grid { stroke: rgba(30,58,95,.07); stroke-width: 1; }
.tr-blueprint .bp-p { fill: rgba(91,123,163,.18); stroke: var(--blue-5); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); animation: tr-draw .9s var(--ease) forwards; }
.tr-blueprint .bp-t { fill: var(--blue-5); font-family: var(--fm); font-size: 11px; letter-spacing: .08em; stroke: none; }
@keyframes tr-draw { to { stroke-dashoffset: 0; } }
.tr-kicker { display: block; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--blue-4); margin-bottom: 8px; }
.tr-callback { margin-top: 14px; font-size: 15px; line-height: 1.5; color: var(--ink); }
.tr-callback b { font-weight: 600; color: var(--blue-5); }
.tr-next { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; position: relative; }
.tr-next li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 0 0 14px; position: relative; }
.tr-next li::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: 0; width: 1px; background: var(--grey-2); }
.tr-next li:last-child::before { display: none; }
.tr-next-n { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; font-family: var(--fm); font-size: 10px; color: var(--blue-5); border: 1.5px solid var(--blue-4); background: #fff; }
.tr-next li:first-child .tr-next-n { background: var(--blue-4); color: #fff; }
.tr-next b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.tr-next p { font-size: 13px; color: var(--grey-4); line-height: 1.5; margin-top: 2px; }
.tr-done-recap { margin-top: 6px; padding: 12px 14px; border-radius: 12px; background: var(--off); font-size: 13px; color: var(--grey-5); line-height: 1.6; }
.tr-done-recap b { font-family: var(--fm); font-weight: 500; color: var(--ink); }
.tr-done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.tr-fail-actions { display: grid; gap: 10px; margin-top: 16px; }
.tr-fail-actions .btn { justify-content: center; }

/* --- Fiche interne --- */
.tr-lead-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 14px 0 0; background: var(--grey-1); border: 1px solid var(--grey-1); border-radius: 12px; overflow: hidden; }
.tr-lead-kpis div { background: #fff; padding: 10px 12px; }
.tr-lead-kpis dt { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-4); }
.tr-lead-kpis dd { margin: 2px 0 0; font-family: var(--fm); font-size: 13.5px; color: var(--ink); }
.tr-lead-table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--grey-1); border-radius: 12px; }
.tr-lead-table { width: 100%; border-collapse: collapse; font-family: var(--fm); font-size: 12px; }
.tr-lead-table th, .tr-lead-table td { padding: 7px 9px; text-align: left; border-bottom: 1px solid var(--grey-1); white-space: nowrap; }
.tr-lead-table th { font-family: var(--fb); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey-4); background: var(--off); }
.tr-lead-table td.num { text-align: right; }
.tr-lead-table a { color: var(--blue-5); text-decoration: underline; }
.tr-lead-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tr-lead-links a { font-size: 12.5px; padding: 7px 12px; border: 1px solid var(--grey-2); border-radius: 999px; color: var(--blue-5); }
.tr-lead-links a:hover { border-color: var(--blue-4); background: var(--off); }

/* =====================================================
   CARTE
   ===================================================== */
.tr-mapwrap { position: relative; min-width: 0; overflow: hidden; background: var(--off); z-index: 1; }
.tr-mapwrap .tr-map { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .4s var(--ease); }
.tr-mapwrap.is-ready .tr-map { opacity: 1; }
.tr-map canvas:focus { outline: none; }
.tr-map canvas:focus-visible { outline: 3px solid var(--blue-4); outline-offset: -3px; }

.tr-poster { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .4s var(--ease), visibility .4s; }
.tr-mapwrap.is-ready .tr-poster { opacity: 0; visibility: hidden; }
.tr-poster-grid {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(30,58,95,.05) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(30,58,95,.05) 0 1px, transparent 1px 64px);
}
.tr-poster-text { position: relative; font-family: var(--fm); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-4); }
.tr-poster-bar { position: absolute; left: 0; right: 0; top: 0; height: 2px; overflow: hidden; }
.tr-poster-bar::before { content: ''; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--blue-3), transparent); animation: tr-indet 1.4s var(--ease) infinite; }
@keyframes tr-indet { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Surfaces flottantes : blanches, lisibles sur tous les fonds */
.tr-ctrl-group, .tr-hint-pill, .tr-appbar-close, .tr-appbar-step, .tr-loading-chip, .tr-rect-bar, .tr-edit-pill {
  background: #fff; color: var(--ink); border: 1px solid var(--grey-1);
}

.tr-hint-pill {
  position: absolute; top: 64px; left: 50%; z-index: 4; width: max-content; max-width: calc(100% - 140px);
  transform: translateX(-50%); padding: 9px 16px; border-radius: 999px; box-shadow: var(--e2);
  font-size: 13px; font-weight: 500; text-align: center; pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.tr-hint-pill.is-hidden { opacity: 0; transform: translate(-50%, -6px); }
.tr-loading-chip {
  position: absolute; right: 16px; bottom: 36px; width: max-content; z-index: 4;
  padding: 6px 12px; border-radius: 999px; font-family: var(--fm); font-size: 11px; letter-spacing: .04em; pointer-events: none;
}

.tr-ctrls { position: absolute; top: 16px; right: 16px; z-index: 4; display: flex; flex-direction: column; gap: 8px; }
.tr-ctrl-group { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; box-shadow: var(--e2); }
.tr-ctrl { width: 40px; height: 40px; display: grid; place-items: center; color: var(--grey-5); transition: background .12s, color .12s; }
.tr-ctrl + .tr-ctrl { border-top: 1px solid var(--grey-1); }
.tr-ctrl svg { width: 18px; height: 18px; }
.tr-ctrl:hover { background: var(--off); color: var(--blue-6); }
.tr-ctrl:focus-visible, .tr-basemap:focus-visible, .tr-appbar-close:focus-visible, .tr-edit-pill:focus-visible { outline: 2px solid var(--blue-4); outline-offset: 2px; }
.tr-ctrl.is-active { color: var(--blue-4); }

.tr-basemap {
  position: absolute; left: 16px; bottom: 16px; z-index: 4;
  width: 68px; height: 68px; padding: 0; border-radius: 12px; overflow: hidden;
  border: 2px solid #fff; box-shadow: var(--e2); background: var(--off);
}
.tr-bm-thumb { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .3s var(--ease); }
.tr-basemap[data-next="plan"] .tr-bm-thumb { background-image: url("/assets/terrain/plan-thumb.webp"); }
.tr-basemap[data-next="ortho"] .tr-bm-thumb { background-image: url("https://data.geopf.fr/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ORTHOIMAGERY.ORTHOPHOTOS&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&TILEMATRIX=15&TILEROW=11291&TILECOL=16767"); }
.tr-basemap:hover .tr-bm-thumb { transform: scale(1.08); }
.tr-bm-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0 4px; text-align: center;
  font-size: 11px; font-weight: 600; color: var(--ink); letter-spacing: .02em;
  background: rgba(255,255,255,.94);
}


/* Contrôles MapLibre (échelle, attribution) */
.tr-map .maplibregl-ctrl-bottom-left { left: 96px; bottom: 12px; }
.tr-map .maplibregl-ctrl-scale {
  font-family: var(--fm); font-size: 10.5px; color: var(--ink);
  background: rgba(255,255,255,.88); border: 1.5px solid var(--ink); border-top: 0; padding: 0 6px; border-radius: 0 0 2px 2px;
}
.tr-map .maplibregl-ctrl-attrib {
  font-family: var(--fm); font-size: 10.5px; line-height: 1.5; color: var(--grey-5);
  background: rgba(255,255,255,.92); border-radius: 8px 0 0 0; padding: 3px 8px; max-width: 70vw;
}
.tr-map .maplibregl-ctrl-attrib a { color: var(--grey-5); }
.tr-map .maplibregl-ctrl-bottom-right .maplibregl-ctrl { margin: 0; }

.tr-reticle { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .12s; }
.tr-reticle::before, .tr-reticle::after { content: ''; position: absolute; background: #fff; box-shadow: 0 0 0 1px rgba(10,15,26,.6); }
.tr-reticle::before { left: 21px; top: 0; bottom: 0; width: 2px; }
.tr-reticle::after { top: 21px; left: 0; right: 0; height: 2px; }
.tr-reticle i { position: absolute; inset: 12px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(10,15,26,.6); }
.tr-mapwrap.kb-focus .tr-reticle { opacity: 1; }
.tr-center-card {
  position: absolute; left: 50%; top: calc(50% + 34px); transform: translateX(-50%); z-index: 4;
  padding: 8px 12px; border-radius: 10px; background: #fff; color: var(--ink); box-shadow: var(--e2); font-size: 13px; white-space: nowrap; pointer-events: none;
}
.tr-center-card small { display: block; color: var(--grey-4); font-size: 11.5px; }

.tr-tooltip {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none;
  padding: 8px 11px; border-radius: 8px; background: #fff; color: var(--ink); box-shadow: var(--e2);
  font-size: 13px; font-weight: 500; line-height: 1.35; white-space: nowrap; will-change: transform;
}
.tr-tooltip small { display: block; font-size: 11.5px; font-weight: 400; color: var(--grey-4); }
.tr-tooltip .tr-mono { font-weight: 500; }

.tr-popcard {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 6;
  width: min(320px, calc(100% - 24px)); padding: 14px 14px 12px 16px; border-radius: 14px;
  background: #fff; box-shadow: var(--e3); color: var(--ink);
}
.tr-popcard-t { font-family: var(--fm); font-size: 15px; font-weight: 500; }
.tr-popcard-s { font-size: 12.5px; color: var(--grey-4); margin-top: 2px; }
.tr-popcard .tr-row-btns { margin-top: 12px; }

.tr-edit-pill {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 5;
  padding: 11px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500; box-shadow: var(--e2);
}
.tr-edit-pill { color: var(--blue-6); font-weight: 600; }
.tr-edit-pill:hover { background: var(--off); }
.tr-rect-bar {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 6; width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 16px; border-radius: 999px; font-size: 13px; box-shadow: var(--e2);
}
.tr-rect {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none;
  background: rgba(157,180,208,.14); border: 1px dashed #DCE6F3; outline: 3px solid rgba(10,15,26,.5); outline-offset: 0;
}
.tr-slow {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 7;
  width: min(380px, calc(100% - 32px)); padding: 20px; border-radius: 14px;
  background: #fff; color: var(--ink); box-shadow: var(--e3); font-size: 14px; line-height: 1.5;
}
.tr-slow p + p { margin-top: 6px; color: var(--grey-4); }
.tr-slow a { color: var(--blue-5); font-family: var(--fm); text-decoration: underline; }

.tr-toasts { position: absolute; left: calc(var(--panel-w) + (100% - var(--panel-w)) / 2); bottom: var(--toast-bottom, 24px); transform: translateX(-50%); z-index: 9; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100% - var(--panel-w) - 32px); }
.tr-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 100%;
  padding: 8px 8px 8px 18px; border-radius: 22px; min-height: 44px;
  background: rgba(15,30,51,.96); color: #fff; box-shadow: var(--e2);
  font-size: 14px; font-weight: 500; animation: tr-toast-in .18s var(--ease) both;
}
.tr-toast.is-out { animation: tr-toast-out .14s var(--ease-out) both; }
.tr-toast .tr-mono { color: var(--blue-1); }
.tr-toast-t { min-width: 0; line-height: 1.35; }
.tr-toast button { min-height: 32px; padding: 0 14px; border-radius: 999px; color: var(--blue-1); font-weight: 600; font-size: 13.5px; }
.tr-toast button:hover { background: rgba(255,255,255,.1); color: #fff; }
@keyframes tr-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tr-toast-out { to { opacity: 0; transform: translateY(6px); } }

/* Mode sans carte */
.tr-workspace.is-nomap { grid-template-columns: minmax(0, 1fr); }
.tr-workspace.is-nomap .tr-mapwrap { display: none; }
.tr-workspace.is-nomap .tr-panel { max-width: 720px; width: 100%; margin: 0 auto; box-shadow: none; }
.tr-workspace.is-nomap .tr-toasts { left: 50%; max-width: calc(100% - 24px); }

/* =====================================================
   CONTENU ÉDITORIAL
   ===================================================== */
.tr-how { position: relative; padding: 64px 0 72px; background: #fff; border-top: 1px solid var(--grey-1); }
.tr-how .section-head { margin-bottom: 40px; }
.tr-how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); list-style: none; margin: 0; padding: 0; }
.tr-how-steps li { border-top: 2px solid var(--blue-1); padding-top: 20px; }
.tr-how-n { font-family: var(--fm); font-size: 12px; color: var(--blue-4); letter-spacing: .06em; }
.tr-how-steps h3 { margin: 10px 0 8px; font-size: 18px; font-weight: 500; color: var(--ink); letter-spacing: -.005em; }
.tr-how-steps p { font-size: 14.5px; line-height: 1.6; color: var(--grey-4); }

.tr-crit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tr-crit { border: 1px solid var(--grey-1); border-radius: 14px; padding: 24px 22px; transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); }
.tr-crit:hover { border-color: var(--blue-2); transform: translateY(-2px); box-shadow: 0 16px 32px -16px rgba(30,58,95,.18); }
.tr-crit-k { font-family: var(--fm); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-4); }
.tr-crit-v { margin: 10px 0 8px; font-size: 18px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.tr-crit p:last-child { font-size: 13.5px; line-height: 1.6; color: var(--grey-4); }
.tr-crit-note { margin-top: 28px; max-width: 820px; font-size: 13.5px; line-height: 1.65; color: var(--grey-4); }

.tr-talk { background: var(--blue-1); color: var(--ink); padding: 52px 0; }
.tr-talk-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.tr-talk .section-kicker { margin-bottom: 14px; }
.tr-talk .section-title { font-size: clamp(28px, 3.2vw, 40px); }
.tr-talk-links { display: flex; gap: 12px; flex-wrap: wrap; }
.tr-talk-links .btn:first-child { font-family: var(--fm); }

.tr-how, .tr-criteria, .tr-faq { content-visibility: auto; }
.tr-how { contain-intrinsic-size: auto 580px; }
.tr-criteria, .tr-faq { contain-intrinsic-size: auto 860px; }

/* =====================================================
   TABLETTE
   ===================================================== */
@media (max-width: 1180px) {
  .tr-page { --panel-w: 400px; --pp: 22px; }
  .tr-crit-grid { grid-template-columns: repeat(2, 1fr); }
  .tr-header .nav-primary ul { gap: 22px; }
}
@media (max-width: 1023px) {
  .tr-page { --panel-w: 372px; --pp: 20px; }
  .tr-hint-pill, .tr-rect-bar { top: 16px; }
  .tr-header .nav-primary { display: none; }
  .tr-header .burger { display: flex; }
  .tr-header .mobile-menu.open { display: block; }
}

/* =====================================================
   MOBILE : page d'accueil de l'outil + mode application
   ===================================================== */
@media (max-width: 759px), (max-height: 559px) {
  .tr-page { --pp: 18px; }
  .tr-header .btn-outline-header { display: none; }

  /* Accueil (avant ouverture de la carte) */
  .tr-workspace { display: block; height: auto; background: #fff; }
  .tr-workspace:not(.is-app) .tr-mapwrap,
  .tr-workspace:not(.is-app) .tr-sheet,
  .tr-workspace:not(.is-app) .tr-dock { display: none; }
  .tr-panel { box-shadow: none; }
  .tr-top { padding-top: 22px; }
  .tr-title { font-size: 28px; font-weight: 300; line-height: 1.15; }
  .tr-lead { font-size: 15.5px; }
  .tr-search { padding: 22px var(--pp) 32px; }
  .tr-omni-input { height: 52px; }
  .tr-omni-kbd { display: none; }
  .tr-omni-input { padding-right: 72px; }
  .tr-chip-btn { min-height: 44px; font-size: 14px; }
  .tr-start {
    display: flex; width: 100%; justify-content: center; gap: 10px; margin-top: 18px; min-height: 54px;
    background: var(--blue-6); color: #fff; font-size: 16px; font-weight: 600;
  }
  .tr-start:hover { background: var(--blue-5); }
  .tr-start svg { width: 18px; height: 18px; }
  .tr-intro-alt { display: block; margin: 10px auto 0; }
  .tr-intro-tel { display: block; margin-top: 16px; text-align: center; font-size: 14px; color: var(--grey-4); }
  .tr-intro-tel b { font-family: var(--fm); color: var(--blue-5); font-weight: 500; }
  .tr-results { max-height: 50vh; }

  /* Mode application plein écran */
  .tr-workspace.is-app {
    position: fixed; inset: 0; z-index: 400; height: auto; background: var(--off);
    --sheet-top: calc(env(safe-area-inset-top, 0px) + 120px);
  }
  .tr-workspace.is-app:not([data-step="1"]) { --sheet-top: calc(env(safe-area-inset-top, 0px) + 128px); }
  .tr-workspace.is-app .tr-mapwrap { position: absolute; inset: 0; display: block; }
  .tr-workspace.is-app .tr-panel { position: absolute; inset: 0; background: transparent; pointer-events: none; display: block; }
  .tr-workspace.is-app .tr-panel > * { pointer-events: auto; }
  .tr-workspace.is-app .tr-top { display: none; }
  .tr-workspace.is-app .tr-appbar {
    display: flex; position: absolute; z-index: 8; left: calc(12px + env(safe-area-inset-left, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); top: calc(env(safe-area-inset-top, 0px) + 10px);
    align-items: center; justify-content: space-between; gap: 10px; pointer-events: none;
  }
  .tr-appbar > * { pointer-events: auto; }
  .tr-appbar-close {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px 0 10px;
    border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: var(--e2);
  }
  .tr-appbar-close svg { width: 18px; height: 18px; }
  .tr-appbar-step { font-family: var(--fm); font-size: 12px; letter-spacing: .06em; padding: 7px 12px; border-radius: 999px; box-shadow: var(--e2); }

  .tr-workspace.is-app .tr-search { position: absolute; z-index: 7; left: calc(12px + env(safe-area-inset-left, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); top: calc(env(safe-area-inset-top, 0px) + 62px); padding: 0; }
  .tr-workspace.is-app .tr-search-actions,
  .tr-workspace.is-app .tr-geoloc-note,
  .tr-workspace.is-app .tr-start,
  .tr-workspace.is-app .tr-intro-alt,
  .tr-workspace.is-app .tr-intro-tel { display: none; }
  .tr-workspace.is-app .tr-omni-input { height: 48px; border-color: transparent; box-shadow: var(--e2); }
  .tr-workspace.is-app:not([data-step="1"]) .tr-search { display: none; }

  .tr-workspace.is-app .tr-sheet {
    position: absolute; left: 0; right: 0; z-index: 6; margin: 0;
    top: var(--sheet-top); bottom: var(--dock-h, 150px);
    background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 28px -14px rgba(15,30,51,.28);
    transform: translate3d(0, var(--sheet-y, 100%), 0);
    transition: transform .42s var(--ease-sheet);
    will-change: transform;
  }
  .tr-workspace.is-app .tr-sheet.is-dragging { transition: none; }
  .tr-workspace.is-app .tr-sheet-handle {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    width: 100%; min-height: 48px; padding: 8px 0 4px; flex: none; touch-action: none; cursor: grab;
  }
  .tr-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--grey-2); }
  .tr-sheet-handle-label { font-size: 12.5px; font-weight: 600; color: var(--blue-5); letter-spacing: .01em; }
  .tr-workspace.is-app .tr-sheet-body { padding: 4px var(--pp) 20px; }

  .tr-workspace.is-app .tr-dock {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 7;
    padding: 12px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 24px -16px rgba(15,30,51,.3);
  }
  .tr-workspace.is-app .tr-dock-summary { grid-template-columns: auto minmax(0,1fr); align-items: baseline; }
  .tr-workspace.is-app .tr-figure { font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
  .tr-workspace.is-app .tr-figure-u { font-size: 13px; }
  .tr-workspace.is-app .tr-dock-meta { font-size: 13px; padding-bottom: 0; }
  .tr-workspace.is-app .tr-criterion { margin-top: 4px; font-size: 12.5px; }
  .tr-workspace.is-app .tr-dock-actions { margin-top: 10px; }
  .tr-workspace.is-app .tr-cta { font-size: 16px; font-weight: 600; min-height: 50px; }
  .tr-workspace.is-app .tr-dock-links { margin-top: 6px; }
  .tr-workspace.is-app.kb-open .tr-dock { display: none; }
  .tr-workspace.is-app.kb-open .tr-sheet { bottom: 0; }

  .tr-toasts { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .tr-workspace.is-app .tr-toasts { position: absolute; left: 50%; bottom: var(--toast-bottom, 200px); }
  html:has(.tr-workspace.is-nomap:not(.is-app)) { scroll-padding-bottom: 240px; }
  .tr-workspace.is-nomap:not(.is-app) .tr-toasts { bottom: calc(var(--dock-h, 210px) + 12px); }
  .tr-workspace.is-app .tr-hint-pill { top: calc(env(safe-area-inset-top, 0px) + 122px); font-size: 14px; max-width: calc(100% - 136px); padding: 9px 14px; }
  .tr-workspace.is-app .tr-search { z-index: 8; }
  .tr-back { padding: 0 12px 0 8px; }
  .tr-workspace.is-app .tr-loading-chip { top: auto; right: auto; left: calc(12px + env(safe-area-inset-left, 0px)); bottom: calc(var(--dock-h, 150px) + 64px); }
  .tr-workspace.is-app .tr-ctrls { top: calc(env(safe-area-inset-top, 0px) + 120px); right: calc(12px + env(safe-area-inset-right, 0px)); }
  .tr-workspace.is-app .tr-ctrl { width: 44px; height: 44px; }
  .tr-workspace.is-app .tr-basemap { left: auto; right: 12px; bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 274px); width: 46px; height: 46px; border-radius: 12px; }
  .tr-workspace.is-app .tr-bm-label { font-size: 9.5px; padding: 10px 0 3px; }
  .tr-workspace.is-app .tr-map .maplibregl-ctrl-bottom-left { left: 8px; bottom: calc(var(--dock-h, 150px) + 60px); }
  .tr-workspace.is-app .tr-map .maplibregl-ctrl-bottom-right { bottom: calc(var(--dock-h, 150px) + 52px); }
  .tr-workspace.is-app .tr-map .maplibregl-ctrl-attrib { font-size: 9.5px; max-width: 64vw; }
  .tr-workspace.is-app .tr-popcard { bottom: calc(var(--dock-h, 150px) + 64px); }
  .tr-workspace.is-app .tr-edit-pill { top: calc(env(safe-area-inset-top, 0px) + 66px); bottom: auto; }
  .tr-workspace.is-app .tr-rect-bar { top: calc(env(safe-area-inset-top, 0px) + 122px); }
  .tr-workspace.is-app.is-sheet-high .tr-ctrls,
  .tr-workspace.is-app.is-sheet-high .tr-basemap { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s, visibility 0s .12s; }

  .tr-panel { overflow: visible; scroll-padding-bottom: 0; }
  .tr-workspace.is-app .tr-sheet-body {
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-padding: 24px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 16px), transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 16px), transparent 100%);
  }

  /* Mode sans carte sur mobile : le panneau reste dans la page */
  .tr-workspace.is-nomap:not(.is-app) .tr-sheet { display: flex; margin-top: 0; }
  .tr-workspace.is-nomap:not(.is-app) .tr-dock { display: block; position: sticky; bottom: 0; }
  .tr-workspace.is-nomap:not(.is-app) .tr-sheet-body { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .tr-workspace.is-nomap .tr-start, .tr-workspace.is-nomap .tr-intro-alt { display: none; }

  .tr-item-rm { width: auto; padding: 0 12px; min-height: 44px; }
  .tr-item-rm svg { display: none; }
  .tr-item-rm .tr-rm-txt { display: inline; font-size: 13px; font-weight: 500; color: var(--grey-4); }
  .tr-tiles-3 { grid-template-columns: 1fr 1fr; }
  .tr-view-title { font-size: 21px; font-weight: 400; }

  .tr-how { padding: 48px 0 56px; }
  .tr-how-steps { grid-template-columns: 1fr; gap: 20px; }
  .tr-crit-grid { grid-template-columns: 1fr; }
  .tr-talk-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 479px) {
  .tr-back { width: 48px; padding: 0; justify-content: center; }
  .tr-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tr-tiles { grid-template-columns: 1fr; }
  .tr-tiles-3 { grid-template-columns: 1fr 1fr; }
  .tr-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .tr-workspace.is-app { --col: min(380px, 46vw); --sheet-top: 108px; }
  .tr-workspace.is-app:not([data-step="1"]) { --sheet-top: 60px; }
  .tr-workspace.is-app .tr-appbar { right: auto; width: calc(var(--col) - 24px); }
  .tr-workspace.is-app .tr-appbar-step { display: none; }
  .tr-workspace.is-app .tr-search { top: 56px; right: auto; width: calc(var(--col) - 24px); }
  .tr-workspace.is-app .tr-sheet { right: auto; width: var(--col); left: env(safe-area-inset-left, 0px); border-radius: 0 16px 0 0; }
  .tr-workspace.is-app .tr-dock { right: auto; width: var(--col); left: env(safe-area-inset-left, 0px); padding-left: 14px; padding-right: 14px; }
  .tr-workspace.is-app .tr-dock-links { display: none; }
  .tr-workspace.is-app .tr-ctrls { top: 12px; }
  .tr-workspace.is-app .tr-basemap { top: auto; bottom: 16px; right: calc(12px + env(safe-area-inset-right, 0px)); }
  .tr-workspace.is-app .tr-hint-pill { top: 12px; left: calc(var(--col) + (100% - var(--col)) / 2); max-width: calc(100% - var(--col) - 140px); }
  .tr-workspace.is-app .tr-toasts { left: calc(var(--col) + (100% - var(--col)) / 2); bottom: 16px; max-width: calc(100% - var(--col) - 24px); }
  .tr-workspace.is-app .tr-loading-chip { left: calc(var(--col) + 12px); bottom: 40px; }
  .tr-workspace.is-app .tr-map .maplibregl-ctrl-bottom-left { left: calc(var(--col) + 8px); bottom: 8px; }
  .tr-workspace.is-app .tr-map .maplibregl-ctrl-bottom-right { bottom: 0; }
  .tr-workspace.is-app .tr-edit-pill { top: 12px; left: calc(var(--col) + (100% - var(--col)) / 2); }
  .tr-workspace.is-app.is-sheet-high .tr-ctrls, .tr-workspace.is-app.is-sheet-high .tr-basemap { opacity: 1; pointer-events: auto; }
}

html.tr-locked, html.tr-locked body { overflow: hidden; overscroll-behavior: none; }

@media (pointer: coarse) {
  .tr-verb-fine { display: none; }
}
.tr-coarse-only { display: none; }
@media (pointer: coarse) { .tr-coarse-only { display: inline-flex; } }

@media (forced-colors: active) {
  .tr-tile input:checked + span, .tr-seg input:checked + span { outline: 3px solid Highlight; }
  .tr-cta[aria-disabled="true"] { color: GrayText; }
}

@media (prefers-reduced-motion: reduce) {
  .tr-view { animation: none; }
  .tr-empty-art .d { animation: none; opacity: .5; }
  .tr-omni-busy, .tr-cta.is-sending svg, .tr-item-area.is-loading { animation: none; }
  .tr-poster-bar::before { animation: none; width: 100%; opacity: .5; }
}

/* =====================================================
   IMPRESSION DU RÉCAPITULATIF
   ===================================================== */
#tr-print { display: none; }
@media print {
  body.tr-printing > *:not(#tr-print) { display: none !important; }
  body.tr-printing #tr-print { display: block !important; color: #000; font: 11pt/1.45 Arial, sans-serif; }
  #tr-print h1 { font-size: 18pt; font-weight: 400; margin: 0 0 4pt; }
  #tr-print .p-ref { font-family: 'Courier New', monospace; font-size: 13pt; margin-bottom: 10pt; }
  #tr-print svg { width: 100%; max-height: 90mm; border: 1px solid #999; margin: 8pt 0; }
  #tr-print svg .bp-p { fill: #e6e6e6; stroke: #000; stroke-width: 1.2; }
  #tr-print svg .bp-grid { stroke: #eee; }
  #tr-print svg .bp-t { fill: #000; font-size: 9px; }
  #tr-print table { width: 100%; border-collapse: collapse; margin-top: 8pt; }
  #tr-print th, #tr-print td { border: 1px solid #999; padding: 3pt 5pt; text-align: left; }
  #tr-print caption { text-align: left; font-weight: 700; margin-bottom: 4pt; }
  #tr-print .p-foot { margin-top: 12pt; font-size: 9.5pt; color: #333; }
}

/* Étape 2 : mention d'information */
.tr-legal { margin: 16px 0 0; font-size: 12px; line-height: 1.5; color: var(--grey-4); }
.tr-legal a { color: var(--blue-5); text-decoration: underline; text-underline-offset: 2px; }

/* Confirmation : e-mail à transmettre */
.tr-done-share { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--off); border: 1px solid var(--grey-1); }
.tr-done-share-title { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.tr-done-share-text { margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--grey-4); }
.tr-done-share .tr-done-actions { margin-top: 12px; gap: 6px 16px; }
.tr-done-home { display: inline-block; margin-top: 14px; }
.tr-done-share-status { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--grey-1); font-size: 13px; line-height: 1.5; color: var(--grey-5); }
.tr-done-share-status b { color: var(--blue-5); font-weight: 600; }
.tr-done-share-status .tr-link-btn { font-size: 13px; min-height: 0; padding: 0; margin-left: 2px; }
