/* Chantier de confiance : tunnel de demande en 5 écrans (13/11/2026), avec tunnel.js.
   Couleurs de la charte (timber-charte.css) avec repli ; contrastes AA vérifiés (texte ≥ 4,5:1, bords ≥ 3:1) ;
   cibles tactiles de 48 px au moins ; champs en 17 px (pas de zoom automatique sur iPhone). */
/* Place réservée avant le démarrage du script : la page ne saute pas (CLS). */
[data-tunnel]:not(.tn) { display: block; min-height: 31.5rem; } /* écran 0 : 505 px mesurés à 375 px */
[data-tunnel][data-metier]:not(.tn) { min-height: 28rem; }
.tn {
  --tn-encre: var(--tb-encre, #15120E); --tn-texte: var(--tb-texte, #3A3631); --tn-doux: var(--tb-doux, #6E685F);
  --tn-trait: var(--tb-trait, #E7E4DF); --tn-gris: var(--tb-gris, #F6F5F3); --tn-action: var(--tb-action, #A85F1C);
  --tn-fonce: var(--tb-action-survol, #8A5418); --tn-bord: #948D82; --tn-clair: #FDF3E8; --tn-vert: #1E7A46; --tn-rouge: #B3261E;
  box-sizing: border-box; max-width: 36rem; margin: 0 auto; padding: 12px 16px 16px; background: #fff;
  border: 1px solid var(--tn-trait); border-radius: 12px; color: var(--tn-texte); font-size: 1rem; line-height: 1.45;
  text-align: left; scroll-margin-top: 72px;
}
.tn *, .tn *::before, .tn *::after { box-sizing: border-box; }
.tn p, .tn ul, .tn ol { margin: 0; }
.tn button, .tn input { font: inherit; letter-spacing: normal; text-transform: none; }
.tn a { color: var(--tn-fonce); font-weight: 600; }

.tn-haut { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; }
.tn-retour {
  min-height: 48px; margin-left: -10px; padding: 0 10px; border: 0; border-radius: 8px; background: none;
  color: var(--tn-fonce); font-weight: 600; cursor: pointer;
}
.tn-etape { color: var(--tn-doux); font-size: .875rem; }
.tn-barre { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0 0 14px; }
.tn-barre i { display: block; height: 6px; border-radius: 3px; background: var(--tn-trait); transition: background .25s; }
.tn-barre i.plein { background: var(--tn-action); }

.tn .tn-q { margin: 0 0 12px; color: var(--tn-encre); font-size: 1.3rem; font-weight: 800; line-height: 1.25; outline: none; }
.tn-choix { display: grid; gap: 8px; }
.tn-choix--2 { grid-template-columns: 1fr 1fr; }
.tn-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; margin: 0; padding: 8px 12px;
  border: 1.5px solid var(--tn-bord); border-radius: 10px; background: #fff; color: var(--tn-encre);
  font-weight: 600; line-height: 1.2; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, background-color .15s;
}
@media (hover: hover) { .tn-btn:hover { border-color: var(--tn-action); background: #FFFBF7; } .tn-envoi:hover { background: var(--tn-fonce); } }
.tn-btn[aria-pressed="true"] { border-color: var(--tn-action); background: var(--tn-clair); box-shadow: inset 0 0 0 1.5px var(--tn-action); }
.tn-tuile { min-height: 60px; padding: 5px 8px 5px 5px; }
.tn-tuile img { flex: none; width: 48px; height: 48px; border-radius: 7px; object-fit: cover; background: var(--tn-gris); }
.tn button:focus-visible, .tn a:focus-visible, .tn input:focus-visible { outline: 3px solid var(--tn-fonce); outline-offset: 2px; }

.tn-confiance { margin-top: 14px; padding: 0; list-style: none; font-size: .9rem; }
.tn-confiance li { position: relative; padding-left: 1.4em; }
.tn-confiance li + li { margin-top: 2px; }
.tn-confiance li::before { content: "✓"; position: absolute; left: 0; color: var(--tn-vert); font-weight: 800; }
.tn-appel { margin-top: 6px; color: var(--tn-doux); font-size: .9rem; }
.tn-appel a, .tn-petit a { display: inline-block; padding: 13px 2px; margin: -13px 0; white-space: nowrap; }
.tn-appel a { padding-top: 12px; padding-bottom: 12px; margin: -4px 0; }

.tn-prix { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--tn-clair); color: var(--tn-encre); font-size: .95rem; }
.tn-prix-titre { color: var(--tn-fonce); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tn-prix .tn-petit { color: var(--tn-texte); margin-top: 2px; }
.tn-alerte { margin: 0 0 12px; padding: 8px 12px; border-left: 4px solid var(--tn-action); background: var(--tn-gris); color: var(--tn-encre); font-size: .93rem; }
.tn-petit { margin-top: 10px; color: var(--tn-doux); font-size: .85rem; }

.tn-form { margin: 0; }
.tn-label { display: block; margin: 12px 0 4px; color: var(--tn-encre); font-weight: 600; }
.tn-form .tn-label:first-child { margin-top: 0; }
.tn-champ {
  display: block; width: 100%; min-height: 52px; margin: 0; padding: 12px 14px; border: 1.5px solid var(--tn-bord);
  border-radius: 10px; background: #fff; color: var(--tn-encre); font-size: 1.0625rem; box-shadow: none;
}
.tn-champ:focus { border-color: var(--tn-action); outline: 3px solid rgba(168, 95, 28, .25); outline-offset: 0; }
.tn-champ[aria-invalid="true"] { border-color: var(--tn-rouge); }
.tn-champ[name="cp"] { max-width: 11rem; letter-spacing: .08em; }
.tn-err { margin-top: 4px; color: var(--tn-rouge); font-size: .9rem; font-weight: 600; }
.tn-err:empty { display: none; }
.tn-note { margin-top: 6px; color: var(--tn-texte); font-size: .88rem; }
.tn-ville .tn-choix { margin-top: 6px; }
.tn-ok { margin-top: 8px; color: var(--tn-vert); font-weight: 700; }
.tn-zone { margin-top: 2px; font-size: .92rem; }
.tn-zone--hors { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--tn-gris); color: var(--tn-encre); }

.tn-envoi {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin-top: 16px;
  padding: 12px 16px; border: 0; border-radius: 10px; background: var(--tn-action); color: #fff; font-size: 1.05rem;
  font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
}
.tn a.tn-envoi { color: #fff; }
.tn-envoi:disabled { opacity: .75; cursor: progress; }
.tn-recap { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--tn-gris); font-size: .92rem; }
.tn-lien {
  display: inline-block; min-height: 44px; margin: -8px 0; padding: 0 4px; border: 0; background: none;
  color: var(--tn-fonce); font-weight: 600; text-decoration: underline; cursor: pointer;
}

.tn--fin .tn-barre i { background: var(--tn-vert); }
.tn-sous { margin: 0 0 6px; color: var(--tn-encre); font-weight: 700; }
.tn-suite { margin: 0 0 12px; padding-left: 1.3em; }
.tn-suite li { margin-bottom: 6px; }
.tn--fin .tn-ecran > p { margin-bottom: 10px; }
.tn--fin .tn-alerte { margin-bottom: 0; }
.tn-carte { margin-top: 14px; padding: 12px; border: 1px solid var(--tn-trait); border-radius: 10px; }
.tn-carte .tn-envoi { margin-top: 10px; background: var(--tn-vert); }
.tn-carte .tn-envoi:hover { background: #17603A; }
.tn-annonce { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 340px) { .tn-choix--2 { grid-template-columns: 1fr; } .tn { padding: 10px 12px 14px; } }
@media (prefers-reduced-motion: reduce) { .tn * { transition: none !important; } }
/* 13/11 : retour au tunnel depuis les autres boutons de la page (en-tête fixe du site au-dessus) ; lien « comment on vérifie ». */
.tn { scroll-margin-top: 84px; }
.tn-confiance a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* Accueil v5 (interrupteur timber_tunnel_accueil) : le tunnel remplace la carte, sans double cadre. */
.v5-carte--tunnel { padding: 0 !important; background: none !important; box-shadow: none !important; border: 0 !important; }
