/**
 * @file
 * Habillage du parcours « crédit sur l'honneur », charte TSB.
 *
 * Le formulaire porte les classes « form-standard centre-form » du thème TSB :
 * l'habillage de base des champs, des libellés et du bouton d'envoi est donc
 * fourni par themes/tsb/css/style.css, de même que ses déclinaisons
 * responsive et RTL. Les règles ci-dessous couvrent les composants propres à
 * ce parcours — fil d'étapes, cartes de choix, grille de saisie, dépôt des
 * pièces, récapitulatif, accusé de réception — et reprennent la palette de la
 * charte :
 *
 *   #d90937  rouge TSB (accent, état actif)
 *   #cd1733  rouge TSB au survol
 *   #435463  gris-bleu des titres et libellés
 *   #303e4a  gris foncé des intitulés
 *   #9ba8b5  gris des bordures de champ
 *   #e2e8ed  gris des filets
 *   #f0f4f5  gris clair des fonds de bloc
 *
 * Les sélecteurs de formulaire cumulent « form-standard » et « tsb-ch-form »
 * pour passer devant les règles du thème, chargées après ce fichier. Les
 * propriétés directionnelles sont écrites en logique « début / fin » afin de
 * rester correctes en arabe.
 */

/* ------------------------------------------------------------- Gabarit. */

/* Colonne un peu plus large que les formulaires d'une seule page : la grille
   de saisie à deux colonnes et le fil d'étapes y respirent. */
.form-standard.centre-form.tsb-ch-form {
  width: 100%;
  max-width: 780px;
}

/* ---------------------------------------------------------------- Étapes. */

.tsb-ch-progression {
  display: flex;
  list-style: none;
  margin: 0 0 55px;
  padding: 0;
  counter-reset: none;
}

.tsb-ch-progression__etape {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 6px;
  color: #9ba8b5;
  text-align: center;
}

/* Filet reliant chaque étape à la précédente, du bord d'une pastille au bord
   de la suivante. */
.tsb-ch-progression__etape::before {
  content: "";
  position: absolute;
  top: 21px;
  inset-inline-start: calc(-50% + 32px);
  inset-inline-end: calc(50% + 32px);
  height: 2px;
  border-radius: 2px;
  background: #e2e8ed;
  transition: background-color 0.3s ease;
}

.tsb-ch-progression__etape:first-child::before {
  display: none;
}

.tsb-ch-progression__etape.is-terminee::before,
.tsb-ch-progression__etape.is-active::before {
  background: #435463;
}

.tsb-ch-progression__numero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border: 2px solid #d5dde3;
  border-radius: 50%;
  background: #fff;
  color: #9ba8b5;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.3s ease;
}

.tsb-ch-progression__etape.is-terminee .tsb-ch-progression__numero {
  border-color: #435463;
  background: #435463;
  /* Le chiffre reste lu par les lecteurs d'écran ; seule la coche est vue. */
  color: transparent;
}

.tsb-ch-progression__etape.is-terminee .tsb-ch-progression__numero::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 13px;
  margin: -9px 0 0 -4px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.tsb-ch-progression__etape.is-active .tsb-ch-progression__numero {
  border-color: #d90937;
  background: #d90937;
  color: #fff;
  box-shadow: 0 0 0 6px rgba(217, 9, 55, 0.12);
}

.tsb-ch-progression__titre {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.tsb-ch-progression__etape.is-terminee .tsb-ch-progression__titre {
  color: #435463;
}

.tsb-ch-progression__etape.is-active .tsb-ch-progression__titre {
  color: #d90937;
  font-weight: 700;
}

/* ---------------------------------------------------- Titres et textes. */

.form-standard.tsb-ch-form .title-default {
  margin-bottom: 20px;
}

.tsb-ch-intro {
  margin: 0 0 35px;
  color: #435463;
  font-size: 16px;
  line-height: 1.6;
}

.tsb-ch-etape--informations {
  padding-top: 15px;
}

.tsb-ch-section {
  margin: 0 0 20px;
}

.tsb-ch-section + .tsb-ch-section {
  margin-top: 15px;
}

.tsb-ch-section__titre {
  position: relative;
  margin: 0 0 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8ed;
  color: #303e4a;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.tsb-ch-section__titre::after {
  content: "";
  position: absolute;
  bottom: -1px;
  inset-inline-start: 0;
  width: 40px;
  height: 2px;
  background: #d90937;
}

/* Libellés, aides et messages d'erreur. */
.form-standard.tsb-ch-form .control-label,
.form-standard.tsb-ch-form legend {
  margin-bottom: 10px;
  color: #435463;
  font-size: 15px;
  font-weight: 600;
}

.form-standard.tsb-ch-form legend {
  width: auto;
  border: 0;
  line-height: 1.3;
}

.form-standard.tsb-ch-form .form-group.form-item {
  margin-bottom: 26px;
}

.form-standard.tsb-ch-form .help-block,
.form-standard.tsb-ch-form .description {
  margin: 7px 0 0;
  color: #6f7f8e;
  font-size: 13px;
  line-height: 1.45;
}

/* Messages de la validation navigateur du thème (jQuery Validate). Le thème
   les place en absolu sous le champ, par-dessus le libellé suivant : on les
   remet dans le flux. */
.form-standard.tsb-ch-form label.error {
  position: static;
  display: block;
  margin: 7px 0 0;
  color: #d90937;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.form-standard.tsb-ch-form .form-control {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* La flèche des listes est centrée sur leur conteneur, qui grandit quand un
   message d'erreur s'y affiche : on la cale sur la mi-hauteur du champ. */
.form-standard.tsb-ch-form .select-wrapper::after {
  top: 22.5px;
}

.form-standard.tsb-ch-form .form-control:focus {
  border-color: #435463;
  box-shadow: 0 0 0 3px rgba(67, 84, 99, 0.12);
  outline: 0;
}

.form-standard.tsb-ch-form .form-control.error,
.form-standard.tsb-ch-form .has-error .form-control {
  border-color: #d90937;
}

.form-standard.tsb-ch-form .form-control.error:focus,
.form-standard.tsb-ch-form .has-error .form-control:focus {
  box-shadow: 0 0 0 3px rgba(217, 9, 55, 0.12);
}

.form-standard.tsb-ch-form .has-error .control-label {
  color: #d90937;
}

/* ------------------------------------------------- Cartes de choix (1). */

.tsb-ch-form fieldset.tsb-ch-profils,
.tsb-ch-form fieldset.tsb-ch-clt-tsb {
  min-width: 0;
  margin: 0 0 35px;
  padding: 0;
  border: 0;
}

.tsb-ch-form fieldset.tsb-ch-profils > legend,
.tsb-ch-form fieldset.tsb-ch-clt-tsb > legend {
  margin-bottom: 14px;
}

.tsb-ch-form #edit-type-client,
.tsb-ch-form #edit-clt-tsb {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-standard.tsb-ch-form .tsb-ch-profils .form-item,
.form-standard.tsb-ch-form .tsb-ch-clt-tsb .form-item {
  position: relative;
  display: flex;
  margin: 0;
  padding: 0;
  border: 1px solid #d5dde3;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-standard.tsb-ch-form .tsb-ch-profils .control-label,
.form-standard.tsb-ch-form .tsb-ch-clt-tsb .control-label {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 20px 22px;
  padding-inline-start: 58px;
  color: #303e4a;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
}

.form-standard.tsb-ch-form .tsb-ch-clt-tsb .control-label {
  padding-top: 16px;
  padding-bottom: 16px;
  font-weight: 700;
}

/* Bouton radio redessiné, calé en haut au début de la carte. */
.form-standard.tsb-ch-form .tsb-ch-profils .form-radio,
.form-standard.tsb-ch-form .tsb-ch-clt-tsb .form-radio {
  position: absolute;
  top: 21px;
  left: 22px;
  inset-inline-start: 22px;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid #9ba8b5;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-standard.tsb-ch-form .tsb-ch-clt-tsb .form-radio {
  top: 17px;
}

[dir="rtl"] .form-standard.tsb-ch-form .tsb-ch-profils .form-radio,
[dir="rtl"] .form-standard.tsb-ch-form .tsb-ch-clt-tsb .form-radio {
  left: auto;
  right: 22px;
}

.form-standard.tsb-ch-form .tsb-ch-profils .form-radio:checked,
.form-standard.tsb-ch-form .tsb-ch-clt-tsb .form-radio:checked {
  border-color: #d90937;
  background: #d90937;
  box-shadow: inset 0 0 0 4px #fff;
}

.form-standard.tsb-ch-form .tsb-ch-profils .form-radio:focus-visible,
.form-standard.tsb-ch-form .tsb-ch-clt-tsb .form-radio:focus-visible {
  outline: 2px solid #435463;
  outline-offset: 3px;
}

.form-standard.tsb-ch-form .tsb-ch-profils .form-item:hover,
.form-standard.tsb-ch-form .tsb-ch-clt-tsb .form-item:hover {
  border-color: #9ba8b5;
  box-shadow: 0 4px 14px rgba(48, 62, 74, 0.08);
}

/* Carte retenue : classe posée par credit-honneur.js, « :has() » en relais. */
.form-standard.tsb-ch-form .tsb-ch-profils .form-item.is-checked,
.form-standard.tsb-ch-form .tsb-ch-clt-tsb .form-item.is-checked,
.form-standard.tsb-ch-form .tsb-ch-profils .form-item:has(.form-radio:checked),
.form-standard.tsb-ch-form .tsb-ch-clt-tsb .form-item:has(.form-radio:checked) {
  border-color: #d90937;
  background: #fff8f9;
  box-shadow: inset 0 0 0 1px #d90937;
}

.form-standard.tsb-ch-form .tsb-ch-profils .form-item.has-error,
.form-standard.tsb-ch-form .tsb-ch-clt-tsb .form-item.has-error {
  border-color: #eca3b3;
}

/* Le message de la validation navigateur s'insèrerait dans la carte ; le
   liseré rouge et le message de tête suffisent. */
.form-standard.tsb-ch-form .tsb-ch-profils label.error,
.form-standard.tsb-ch-form .tsb-ch-clt-tsb label.error {
  display: none !important;
}

.tsb-ch-profils__label {
  display: block;
  color: #303e4a;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.tsb-ch-profils__description {
  display: block;
  margin-top: 6px;
  color: #6f7f8e;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

/* ------------------------------------------------ Grille de saisie (2). */

.tsb-ch-etape--informations .tsb-ch-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
}

.tsb-ch-etape--informations .tsb-ch-section > * {
  min-width: 0;
}

/* Pleine largeur : titres, zones de texte, listes longues, et le champ resté
   seul sur sa ligne selon le profil. */
.tsb-ch-etape--informations .tsb-ch-section__titre,
.tsb-ch-etape--informations .form-type-textarea,
.tsb-ch-etape--informations .form-item-gouvernorat-code,
.tsb-ch-etape--informations .form-item-type-financement,
.tsb-ch-etape--informations .form-type-item,
.tsb-ch-etape--informations .form-item-nature-projet,
.tsb-ch-etape--informations .form-item-activite {
  grid-column: 1 / -1;
}

.tsb-ch-etape--informations .tsb-ch-section:not(:has(.form-item-revenu)) .form-item-montant-demande,
.tsb-ch-etape--informations .tsb-ch-section:not(:has(.form-item-besoin-fonds-roulement)) .form-item-volume-investissement {
  grid-column: 1 / -1;
}

/* Le thème Bootstrap pose « form-inline » sur les champs téléphone. */
.form-standard.tsb-ch-form .form-inline .form-control {
  display: block;
  width: 100%;
}

/* Type de financement unique : affiché en lecture seule. */
.form-standard.tsb-ch-form .form-type-item {
  color: #303e4a;
  font-size: 17px;
  font-weight: 700;
}

.form-standard.tsb-ch-form .form-type-item .control-label {
  display: block;
  font-size: 15px;
}

/* ------------------------------------------- Pièces justificatives (3). */

.tsb-ch-etape--pieces .tsb-ch-intro {
  padding: 16px 20px;
  padding-inline-start: 50px;
  position: relative;
  border-radius: 4px;
  background: #f0f4f5;
  font-size: 15px;
}

/* Pastille « i » dessinée en CSS, sans dépendance à une police d'icônes. */
.tsb-ch-etape--pieces .tsb-ch-intro::before {
  content: "i";
  position: absolute;
  top: 17px;
  inset-inline-start: 18px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #435463;
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.tsb-ch-etape--pieces > .form-group {
  margin-bottom: 16px;
}

.form-standard.tsb-ch-form .tsb-ch-etape--pieces .form-type-managed-file {
  margin: 0;
  padding: 20px 22px;
  border: 1px dashed #b7c3ce;
  border-radius: 4px;
  background: #f8fafb;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form-standard.tsb-ch-form .tsb-ch-etape--pieces .form-type-managed-file:hover {
  border-color: #9ba8b5;
}

/* Pièce déposée : la carte passe en trait plein. */
.form-standard.tsb-ch-form .tsb-ch-etape--pieces .form-type-managed-file:has(.file) {
  border-style: solid;
  border-color: #e2e8ed;
  background: #fff;
}

.form-standard.tsb-ch-form .tsb-ch-etape--pieces .form-type-managed-file.has-error {
  border-color: #d90937;
  background: #fff8f9;
}

.form-standard.tsb-ch-form .tsb-ch-etape--pieces .form-type-managed-file > .control-label {
  margin-bottom: 12px;
  color: #303e4a;
  font-size: 16px;
  font-weight: 700;
}

.tsb-ch-etape--pieces .form-managed-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Le champ fichier hérite de « form-control » (20px gras, cadre) : on le
   ramène à une ligne sobre, avec un bouton de sélection aux couleurs TSB. */
.form-standard.tsb-ch-form .tsb-ch-etape--pieces .form-file {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #6f7f8e;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
}

.tsb-ch-etape--pieces .form-file::file-selector-button {
  margin-inline-end: 14px;
  padding: 11px 22px;
  border: 1px solid #435463;
  border-radius: 3px;
  background: #fff;
  color: #435463;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.tsb-ch-etape--pieces .form-file::-webkit-file-upload-button {
  margin-inline-end: 14px;
  padding: 11px 22px;
  border: 1px solid #435463;
  border-radius: 3px;
  background: #fff;
  color: #435463;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.tsb-ch-etape--pieces .form-file:hover::file-selector-button {
  background: #435463;
  color: #fff;
}

.tsb-ch-etape--pieces .form-file:hover::-webkit-file-upload-button {
  background: #435463;
  color: #fff;
}

/* Fichier déposé. */
.tsb-ch-etape--pieces .file {
  display: flex;
  flex: 1 1 260px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 3px;
  background: #f0f4f5;
  color: #435463;
  font-size: 14px;
}

/* Bootstrap habille la ligne en « input-group » : une case encadrée par
   segment. On la ramène à une seule pastille. */
.tsb-ch-form .tsb-ch-etape--pieces .file > span,
.tsb-ch-form .tsb-ch-etape--pieces .file > span:first-child,
.tsb-ch-form .tsb-ch-etape--pieces .file > span:last-child {
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.4;
}

.tsb-ch-etape--pieces .file .file-icon {
  flex: none;
  color: #d90937;
  font-size: 16px;
}

.tsb-ch-etape--pieces .file .file-icon .text-primary {
  color: #d90937;
}

.tsb-ch-etape--pieces .file .file-link {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tsb-ch-etape--pieces .file .file-link a {
  color: #303e4a;
  font-weight: 600;
  text-decoration: none;
}

.tsb-ch-etape--pieces .file .file-link a:hover {
  color: #d90937;
}

.tsb-ch-etape--pieces .file .file-size {
  flex: none;
  color: #6f7f8e;
  font-size: 13px;
}

.form-standard.tsb-ch-form .tsb-ch-etape--pieces .btn-danger {
  flex: none;
  float: none;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid #d5dde3;
  border-radius: 3px;
  background: #fff;
  color: #435463;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  transition: all 0.2s ease;
}

.form-standard.tsb-ch-form .tsb-ch-etape--pieces .btn-danger:hover,
.form-standard.tsb-ch-form .tsb-ch-etape--pieces .btn-danger:focus {
  border-color: #d90937;
  background: #fff;
  color: #d90937;
}

.form-standard.tsb-ch-form .tsb-ch-etape--pieces .btn-danger .icon {
  margin-inline-end: 4px;
}

.tsb-ch-etape--pieces .ajax-progress {
  color: #435463;
  font-size: 13px;
}

/* ---------------------------------------------------- Récapitulatif (4). */

.tsb-ch-recapitulatif {
  margin-bottom: 30px;
}

.tsb-ch-recapitulatif__section {
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid #e2e8ed;
  border-radius: 4px;
  background: #fff;
}

.tsb-ch-recapitulatif__titre {
  position: relative;
  margin: 0;
  padding: 14px 24px;
  padding-inline-start: 36px;
  background: #f0f4f5;
  color: #435463;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 1.3;
  text-transform: uppercase;
}

.tsb-ch-recapitulatif__titre::before {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-start: 24px;
  width: 4px;
  height: 16px;
  margin-top: -8px;
  border-radius: 2px;
  background: #d90937;
}

.tsb-ch-recapitulatif__liste {
  display: grid;
  grid-template-columns: minmax(160px, 38%) minmax(0, 1fr);
  margin: 0;
  padding: 4px 24px 6px;
}

.tsb-ch-recapitulatif__liste dt,
.tsb-ch-recapitulatif__liste dd {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid #eef2f4;
  line-height: 1.45;
}

.tsb-ch-recapitulatif__liste dt:first-of-type,
.tsb-ch-recapitulatif__liste dt:first-of-type + dd {
  border-top: 0;
}

.tsb-ch-recapitulatif__liste dt {
  padding-inline-end: 20px;
  color: #6f7f8e;
  font-size: 14px;
  font-weight: 400;
}

.tsb-ch-recapitulatif__liste dd {
  color: #303e4a;
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------- Consentement, envoi. */

.form-standard.tsb-ch-form .form-item-consentement {
  margin: 30px 0;
  padding: 20px 24px;
  border: 0;
  border-inline-start: 3px solid #d90937;
  border-radius: 0 4px 4px 0;
  background: #f0f4f5;
}

[dir="rtl"] .form-standard.tsb-ch-form .form-item-consentement {
  border-radius: 4px 0 0 4px;
}

/* Le thème masque la case réelle et en dessine une fausse, décalée hors du
   bloc : on rend la case native, redessinée, dans le flux du libellé. */
.form-standard.tsb-ch-form .form-item-consentement .control-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  padding: 0;
  color: #303e4a;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  cursor: pointer;
}

.form-standard.tsb-ch-form .form-item-consentement .control-label::before,
.form-standard.tsb-ch-form .form-item-consentement .control-label::after {
  content: none;
  display: none;
}

.form-standard.tsb-ch-form .form-item-consentement .form-checkbox {
  position: static;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid #9ba8b5;
  border-radius: 3px;
  background: #fff no-repeat center / 14px 14px;
  opacity: 1;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.form-standard.tsb-ch-form .form-item-consentement .form-checkbox:checked {
  border-color: #d90937;
  background-color: #d90937;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E");
}

.form-standard.tsb-ch-form .form-item-consentement .form-checkbox:focus-visible {
  outline: 2px solid #435463;
  outline-offset: 3px;
}

.form-standard.tsb-ch-form .form-item-consentement.has-error {
  border-inline-start-color: #d90937;
  background: #fff1f4;
}

/* CAPTCHA (module contrib). */
.form-standard.tsb-ch-form fieldset.captcha {
  min-width: 0;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}

.form-standard.tsb-ch-form fieldset.captcha > legend {
  margin-bottom: 12px;
  padding: 0;
  color: #6f7f8e;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.form-standard.tsb-ch-form .form-item-captcha-response .form-control {
  max-width: 180px;
}

/* Navigation : « Précédent » au début, action principale à la fin. */
.form-standard.tsb-ch-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #e2e8ed;
  text-align: start;
}

/* Le clearfix Bootstrap de « form-group » deviendrait un élément flex et
   décalerait les boutons. */
.form-standard.tsb-ch-form .form-actions::before,
.form-standard.tsb-ch-form .form-actions::after {
  display: none;
}

.form-standard.tsb-ch-form .form-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  float: none;
  min-width: 170px;
  margin: 0;
  padding: 16px 32px;
  border: 1px solid #d90937;
  border-radius: 3px;
  background-color: #d90937;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.form-standard.tsb-ch-form .form-actions .button:hover,
.form-standard.tsb-ch-form .form-actions .button:focus {
  border-color: #cd1733;
  background-color: #cd1733;
  color: #fff;
}

.form-standard.tsb-ch-form .form-actions .tsb-ch-suivant,
.form-standard.tsb-ch-form .form-actions .tsb-ch-envoyer {
  margin-inline-start: auto;
}

.form-standard.tsb-ch-form .form-actions .tsb-ch-precedent {
  border-color: #9ba8b5;
  background-color: #fff;
  color: #435463;
}

.form-standard.tsb-ch-form .form-actions .tsb-ch-precedent:hover,
.form-standard.tsb-ch-form .form-actions .tsb-ch-precedent:focus {
  border-color: #435463;
  background-color: #f0f4f5;
  color: #303e4a;
}

/* Chevrons dessinés en CSS, retournés en arabe. */
.form-standard.tsb-ch-form .form-actions .tsb-ch-suivant::after,
.form-standard.tsb-ch-form .form-actions .tsb-ch-precedent::before {
  content: "";
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transition: transform 0.2s ease;
}

.form-standard.tsb-ch-form .form-actions .tsb-ch-suivant::after {
  transform: rotate(45deg);
}

.form-standard.tsb-ch-form .form-actions .tsb-ch-precedent::before {
  transform: rotate(-135deg);
}

.form-standard.tsb-ch-form .form-actions .tsb-ch-suivant:hover::after {
  transform: translateX(3px) rotate(45deg);
}

.form-standard.tsb-ch-form .form-actions .tsb-ch-precedent:hover::before {
  transform: translateX(-3px) rotate(-135deg);
}

[dir="rtl"] .form-standard.tsb-ch-form .form-actions .tsb-ch-suivant::after {
  transform: rotate(-135deg);
}

[dir="rtl"] .form-standard.tsb-ch-form .form-actions .tsb-ch-precedent::before {
  transform: rotate(45deg);
}

[dir="rtl"] .form-standard.tsb-ch-form .form-actions .tsb-ch-suivant:hover::after {
  transform: translateX(-3px) rotate(-135deg);
}

[dir="rtl"] .form-standard.tsb-ch-form .form-actions .tsb-ch-precedent:hover::before {
  transform: translateX(3px) rotate(45deg);
}

.form-standard.tsb-ch-form .form-actions .button[disabled],
.form-standard.tsb-ch-form .form-actions .button.form-disabled,
.form-standard.tsb-ch-form .form-actions .is-en-cours {
  border-color: #d90937;
  background-color: #d90937;
  opacity: 0.4;
  cursor: not-allowed;
}

.tsb-ch-envoi-en-cours {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: #435463;
  font-size: 15px;
  justify-content: flex-end;
}

.tsb-ch-envoi-en-cours::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8ed;
  border-top-color: #d90937;
  border-radius: 50%;
  animation: tsb-ch-rotation 0.8s linear infinite;
}

@keyframes tsb-ch-rotation {
  to {
    transform: rotate(360deg);
  }
}

/* -------------------------------------------------- Accusé de réception. */

.tsb-ch-confirmation {
  max-width: 700px;
  margin: 20px auto 0;
  padding: 40px 45px;
  border: 1px solid #e2e8ed;
  border-top: 4px solid #d90937;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(48, 62, 74, 0.06);
}

.tsb-ch-confirmation--attente {
  border-top-color: #9ba8b5;
}

.tsb-ch-confirmation__titre {
  margin: 0 0 25px;
  color: #303e4a;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.tsb-ch-confirmation__references {
  margin: 0 0 25px;
  padding: 22px 26px;
  border-radius: 4px;
  background: #f0f4f5;
}

.tsb-ch-confirmation__references dt {
  margin-bottom: 4px;
  color: #6f7f8e;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.tsb-ch-confirmation__references dd {
  margin: 0 0 16px;
  color: #303e4a;
  font-size: 16px;
  font-weight: 700;
}

.tsb-ch-confirmation__references dd:last-child {
  margin-bottom: 0;
}

.tsb-ch-confirmation__references .tsb-ch-confirmation__reference {
  color: #d90937;
  font-size: 26px;
  letter-spacing: 1px;
}

.tsb-ch-confirmation p {
  color: #435463;
  font-size: 15px;
  line-height: 1.6;
}

.tsb-ch-confirmation .btn,
.tsb-ch-confirmation .button {
  display: inline-block;
  margin-top: 10px;
  padding: 16px 45px;
  border: 1px solid #d90937;
  border-radius: 3px;
  background-color: #d90937;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.tsb-ch-confirmation .btn:hover,
.tsb-ch-confirmation .button:hover,
.tsb-ch-confirmation .btn:focus {
  border-color: #cd1733;
  background-color: #cd1733;
  color: #fff;
}

/* --------------------------------------------------------- Page de suivi. */

.tsb-ch-suivi-resultat {
  margin-bottom: 30px;
  padding: 20px 25px;
  border: 0;
  border-inline-start: 3px solid #d90937;
  border-radius: 0;
  background: #f0f4f5;
  color: #303e4a;
}

.tsb-ch-suivi-resultat ul {
  margin: 0;
  padding-inline-start: 20px;
}

/* --------------------------------------------------------- Écrans moyens. */

@media (max-width: 991px) {
  .tsb-ch-progression__titre {
    font-size: 14px;
  }
}

/* ---------------------------------------------------------- Petits écrans. */

@media (max-width: 767px) {
  .tsb-ch-progression {
    margin-bottom: 40px;
  }

  .tsb-ch-progression__etape {
    padding: 0 2px;
  }

  .tsb-ch-progression__etape::before {
    top: 17px;
    inset-inline-start: calc(-50% + 24px);
    inset-inline-end: calc(50% + 24px);
  }

  .tsb-ch-progression__numero {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    font-size: 15px;
  }

  .tsb-ch-progression__etape.is-active .tsb-ch-progression__numero {
    box-shadow: 0 0 0 4px rgba(217, 9, 55, 0.12);
  }

  .tsb-ch-progression__titre {
    font-size: 12px;
  }

  .form-standard.tsb-ch-form .title-default {
    font-size: 24px;
  }

  .tsb-ch-form #edit-type-client,
  .tsb-ch-form #edit-clt-tsb {
    gap: 12px;
  }

  .tsb-ch-form #edit-type-client {
    grid-template-columns: 1fr;
  }

  .tsb-ch-etape--informations .tsb-ch-section {
    grid-template-columns: 1fr;
  }

  .tsb-ch-recapitulatif__titre {
    padding-inline-end: 18px;
    padding-inline-start: 30px;
  }

  .tsb-ch-recapitulatif__titre::before {
    inset-inline-start: 18px;
  }

  .tsb-ch-recapitulatif__liste {
    grid-template-columns: 1fr;
    padding: 4px 18px 8px;
  }

  .tsb-ch-recapitulatif__liste dt {
    padding: 12px 0 2px;
  }

  .tsb-ch-recapitulatif__liste dd {
    padding: 0 0 12px;
    border-top: 0;
  }

  .form-standard.tsb-ch-form .tsb-ch-etape--pieces .form-type-managed-file {
    padding: 18px;
  }

  .form-standard.tsb-ch-form .form-item-consentement {
    padding: 18px;
  }

  /* Boutons empilés, action principale en premier. */
  .form-standard.tsb-ch-form .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
  }

  .form-standard.tsb-ch-form .form-actions .button {
    width: 100%;
    margin: 0;
  }

  /* En colonne inversée, l'ordre -1 place l'indicateur sous les boutons. */
  .tsb-ch-envoi-en-cours {
    order: -1;
    justify-content: center;
  }

  .tsb-ch-confirmation {
    padding: 28px 20px;
  }

  .tsb-ch-confirmation__titre {
    font-size: 23px;
  }
}
