/*
 * Mise en page du parcours de réservation (assurances, options, résumé),
 * côté client et admin. Chargé par templates/base.html.
 * Les couleurs du mode sombre sont dans parcours-sombre.css.
 */

/* Barre d'étapes sur téléphone : boutons et traits plus serrés, pour que
 * « Résumé » ne touche plus le bord de l'écran. */
@media (max-width: 575.98px) {
  .bs-stepper .bs-stepper-header {
    padding: 0 .25rem;
    flex-wrap: nowrap;
  }
  .bs-stepper .bs-stepper-header .step-trigger {
    padding: .25rem;
  }
  .bs-stepper .bs-stepper-header .line {
    flex: 1 1 6px;
    min-width: 6px;
    margin: 0 .2rem;
    /* au milieu du rond (40 px + .25rem de marge), et non au milieu de
     * l'ensemble rond + libellé, sinon le tiret tombe trop bas */
    align-self: flex-start;
    margin-top: calc(.25rem + 23px);
  }
  .bs-stepper .bs-stepper-header .bs-stepper-label {
    font-size: .8rem;
    margin: .2rem 0 0;
  }
}

/* Résumé : carte « Vos informations » (titulaire de la location). */
.rl-titulaire {
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--bs-body-bg);
}
.rl-titulaire__tete {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
}
.rl-titulaire__titre {
  margin: 0; display: flex; align-items: center; gap: .5rem; font-size: 1.1rem;
}
.rl-titulaire__titre .bi { color: var(--bs-primary); }
.rl-titulaire__lien { font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.rl-titulaire__lien:hover { text-decoration: underline; }
.rl-titulaire__note { margin: .35rem 0 1rem; font-size: .88rem; color: var(--bs-secondary-color); }
.rl-titulaire__grille {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.5rem; margin: 0;
}
.rl-titulaire__grille > div { min-width: 0; }
.rl-titulaire__grille .rl-large { grid-column: 1 / -1; }
.rl-titulaire__grille dt {
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--bs-secondary-color); margin-bottom: .15rem;
}
.rl-titulaire__grille dd {
  margin: 0; color: var(--bs-emphasis-color); font-weight: 500; overflow-wrap: anywhere;
}
.rl-titulaire__vide { color: var(--bs-secondary-color); font-weight: 400; font-style: italic; }
@media (max-width: 575.98px) {
  .rl-titulaire { padding: 1rem; }
  .rl-titulaire__grille { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
}

/* En-tête des pages assurances / options (titre, total, « continuer ») sur
 * téléphone : titre plus petit, puis total à gauche et bouton à droite sur
 * une même ligne (avant : tout serré à droite sous le titre). */
@media (max-width: 575.98px) {
  .rl-entete h4 {
    font-size: 1.2rem;
    line-height: 1.3;
    hyphens: none;
  }
  .rl-entete .float-end {
    float: none !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    margin-top: .75rem;
  }
  .rl-entete .float-end > .h6 {
    margin: 0 !important;
  }
  .rl-entete .float-end > .btn {
    padding: .5rem 1.25rem;
    font-size: 1rem;
  }
}

/* Paiement : conditions de retrait en 3 lignes courtes, au-dessus du
 * formulaire (avant : un grand encadré qui le cachait sur téléphone). */
.rl-conditions {
  border: 1px solid var(--bs-info-border-subtle);
  background: var(--bs-info-bg-subtle);
  color: var(--bs-info-text-emphasis);
  border-radius: .75rem;
  padding: .75rem 1rem;
  margin-bottom: 1.25rem;
}
.rl-conditions__titre { margin: 0 0 .4rem; font-weight: 700; font-size: .95rem; }
.rl-conditions__liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .9rem; }
.rl-conditions__liste li { display: flex; gap: .55rem; align-items: baseline; }
.rl-conditions__liste .bi { flex: 0 0 auto; }
@media (max-width: 575.98px) {
  .rl-titre-paiement { font-size: 1.45rem !important; }
}

/* Barre d'étapes : même espacement sur assurances, options et résumé. Avant,
 * assurance.css ajoutait 20 px à tous les .container et le bloc de messages
 * vide était placé au-dessus de la barre : 76 px, 16 px ou 0 px selon la page. */
.rl-etapes { padding-top: 1.25rem !important; padding-bottom: .5rem !important; }
.rl-etapes > .container { padding-top: 0 !important; padding-bottom: 0 !important; }
.rl-messages { padding-top: 0 !important; padding-bottom: 0 !important; }

/* Étape en cours (classe « completed » dans les gabarits) : orange, sur toutes
 * les pages (le résumé n'avait pas ce style). */
.bs-stepper .step.completed .bs-stepper-circle { background-color: #f9b000; color: #fff; border: none; }
.bs-stepper .step.completed .bs-stepper-label { color: #f9b000; }
@media (max-width: 575.98px) {
  /* Paiement : moins de vide entre le titre et les conditions (3rem + 1rem avant). */
  .vstack:has(> .card-header .rl-titre-paiement) { gap: 1rem !important; }
  .vstack:has(> .card-header .rl-titre-paiement) > .card-body { margin-top: 0 !important; }
}

/* Résumé : bloc « Règlement sécurisé » (montants dans un encadré, une seule
 * case pour les conditions avec les deux documents liés dans la phrase). */
.rl-reglement label { font-size: .9rem; color: var(--bs-secondary-color); margin-bottom: .25rem; }
.rl-prix {
  list-style: none; margin: 0 0 1.25rem; padding: .75rem 1rem;
  border: 1px solid var(--bs-border-color); border-radius: .75rem;
}
.rl-prix > li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border: 0; background: transparent; }
.rl-prix > li .h6 { font-size: .95rem; margin: 0; }
.rl-prix__total {
  border-top: 1px solid var(--bs-border-color) !important;
  margin-top: .45rem; padding-top: .7rem !important;
  align-items: baseline; font-weight: 700; color: var(--bs-emphasis-color);
}
.rl-prix__total > span:first-child { font-size: 1.1rem; }
.rl-prix__total #prixtotalresult { font-size: 1.6rem; }
.rl-accord {
  background: var(--bs-tertiary-bg); border-radius: .75rem;
  padding: .85rem 1rem .85rem 2.6rem; margin-bottom: 1.25rem;
}
.rl-accord .form-check-input { margin-left: -1.6rem; margin-top: .2rem; }
.rl-reglement .rl-accord label { font-size: .92rem; color: var(--bs-body-color); margin: 0; }
.rl-accord a { color: var(--bs-link-color); text-decoration: underline; text-underline-offset: 2px; }
