/* Styles d'état des formulaires branchés via HeloForm */

.field.is-invalid .field__input {
  border-color: #ff0004;
}
.checkbox.is-invalid .checkbox__mark {
  border-color: #ff0004;
}

/* Affichage selon la connexion (classe posée par la garde de bootstrap.php avant l'affichage) */
html.helo-user [data-helo-show="guest"],
html.helo-guest [data-helo-show="user"] {
  display: none !important;
}
/* Page réservée sans connexion : rien n'est montré pendant la redirection vers le login */
html.helo-redirecting body {
  visibility: hidden;
}

/* Placeholders atténués : en #34363b (charte) ils se confondaient avec une saisie (#000).
 * #7d8899 reste lisible sur blanc (contraste ≈ 3,6:1) tout en se distinguant nettement. */
.field__input::placeholder {
  color: #7d8899;
  font-weight: 400;
}
/* Liste déroulante encore sur son choix vide (« Sélectionnez… ») : même rendu qu'un placeholder */
select.field__input:has(option[value=""]:checked) {
  color: #7d8899;
  font-weight: 400;
}
select.field__input option {
  color: #000;
}

/* Champ non modifiable (SIRET vérifié, IBAN…) : distinct d'un champ de saisie */
.field__input[readonly] {
  background: #f2f2f2;
  color: #34363b;
  cursor: default;
}
.field__input[readonly]:focus {
  border-color: #cbd9e7;
}

/* profile-info : Prénom puis Nom désormais dans cet ordre dans le HTML ; l'inversion visuelle de la maquette
 * (order: 2) faisait diverger l'ordre de tabulation de l'ordre affiché */
.profile-info__pair-name > .field:nth-child(1) {
  order: 0;
}

/* profile-info : bloc SIRET / RNA, même présentation que le bloc IBAN de l'intégrateur */
.profile-info__serial-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-info__serial-group[hidden] {
  display: none;
}
.profile-info__serial-note {
  font-size: 13px;
  font-weight: 500;
  line-height: 21px;
  color: #34363b;
}
.profile-info__serial-note a {
  text-decoration: underline;
}

/* .field est en display:flex, ce qui annulerait l'attribut hidden */
.field[hidden] {
  display: none;
}

.field__error {
  font-size: 14px;
  line-height: 21px;
  color: #ff0004;
}

.helo-form-error {
  /* Formulaire en grille (form-cols) : ligne entière, hauteur de son contenu */
  grid-column: 1 / -1;
  align-self: start;
  padding: 12px 16px;
  border: 1px solid #ff0004;
  border-radius: 8px;
  background: #fff5f5;
  font-size: 14px;
  line-height: 21px;
  color: #ff0004;
}

/* Champ mot de passe avec bouton afficher / masquer (HeloPassword) */
.helo-password {
  position: relative;
  display: block;
}
.helo-password .field__input {
  padding-right: 52px;
}
.helo-password__toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0054a4;
  cursor: pointer;
  transform: translateY(-50%);
}
.helo-password__toggle:hover {
  color: #003672;
}
.helo-password__toggle:focus-visible {
  outline: 2px solid #0054a4;
  outline-offset: 2px;
}
/* Œil natif d'Edge : doublon avec le nôtre */
.helo-password input::-ms-reveal {
  display: none;
}

/* Modale de choix du canal du code secret (SMS / e-mail) */
.modal-signup-channel__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Code secret : 6 cases au lieu de 5 dans la maquette, elles se partagent la largeur */
.modal-signup-complete__code {
  gap: 12px;
}
.modal-signup-complete__code-input {
  flex: 1 1 0;
  min-width: 0;
  max-width: 81px;
}

/* Toast de confirmation (HeloToast) */
.helo-toast {
  position: fixed;
  top: 32px;
  left: 50%;
  z-index: 1100; /* au-dessus de .modal-overlay (1000) */
  max-width: calc(100% - 32px);
  padding: 16px 24px;
  border-radius: 12px;
  background: #003672;
  box-shadow: 0 8px 24px rgba(0, 54, 114, 0.25);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.helo-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
  .helo-toast {
    transform: translate(-50%, 0);
  }
}

/* Envoi en cours : indicateur à droite du libellé (le gap de .btn assure l'espacement) */
.btn[aria-busy="true"] {
  cursor: progress;
}
.btn[aria-busy="true"]::after {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: helo-spin 0.7s linear infinite;
}
/* Zone en cours de chargement (HeloLoading) : contenu masqué (visibility, l'opacité étant pilotée par
 * les animations GSAP de l'intégrateur) et indicateur seul au centre, sans voile. Le contenu apparaît
 * ensuite avec HeloReveal. Classe posée dès le HTML quand rien ne doit apparaître avant le script. */
.helo-loading {
  position: relative;
  min-height: 120px;
  pointer-events: none;
}
.helo-loading > * {
  visibility: hidden;
}
.helo-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 11;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 4px solid #0054a4;
  border-right-color: transparent;
  border-radius: 50%;
  animation: helo-spin 0.7s linear infinite;
}

/* Liens de modale (« Renvoyer le code »…) : même indicateur, à la suite du texte */
.modal__link[aria-busy="true"] {
  cursor: progress;
}
.modal__link[aria-busy="true"]::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  vertical-align: -1px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: helo-spin 0.7s linear infinite;
}
@keyframes helo-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .btn[aria-busy="true"]::after,
  .modal__link[aria-busy="true"]::after,
  .helo-loading::after {
    animation-duration: 2s;
  }
}

/* discover : vignettes générées depuis l'API (discover.js), sous les deux vignettes statiques de la maquette */
.discover__cards--api {
  flex-wrap: wrap;
  min-height: 120px; /* place pour l'indicateur de chargement */
}
.discover__cards--api:empty:not(.helo-loading) {
  display: none;
}
/* Titre et description saisis dans un textarea du backoffice : retours à la ligne conservés */
.discover__cards--api .discover__card-title,
.discover__cards--api .discover__card-desc {
  white-space: pre-line;
}
.discover__empty {
  font-size: 18px;
  line-height: 28px;
  color: #34363b;
  text-align: center;
}
/* Élément invisible qui réserve la place d'un bouton ou d'un lien absent (alignement des vignettes) */
.helo-placeholder {
  visibility: hidden;
}
/* <picture> de la vignette (version mobile) hors mise en page : sinon il compte comme 3e élément
 * du space-between et remonte le bouton au milieu de la carte. L'image reste positionnée sur la carte. */
.discover__cards--api .discover__card > picture {
  display: contents;
}

/* participation : numéro de l'écran au-dessus du titre du document */
.participation__progress {
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
  color: #0054a4;
}
.participation__progress:empty {
  display: none;
}

/* promotion et participation (desktop) : mise en page d'origine de l'intégrateur, mais le bloc est décalé
 * de 150px vers le haut pour réduire le grand vide au-dessus du contenu (décalage visuel : la mise en page ne bouge pas).
 * Le header reste au-dessus, pour que ses liens restent cliquables malgré le chevauchement. */
@media (min-width: 1321px) {
  :root {
    --helo-main-lift: 150px; /* hauteur du décalage, à ajuster ici */
  }
  main.promotion--custom {
    top: calc(-1 * var(--helo-main-lift));
  }
  /* participation : remontée réduite par HeloLift (--helo-lift-fit) quand le contenu est trop haut pour
   * la place disponible (adresse, messages d'erreur), afin de ne jamais passer sous le header */
  main.participation {
    top: calc(-1 * var(--helo-lift-fit, var(--helo-main-lift)));
  }
  /* promotion-1 : seul le contenu remonte, les animaux restent posés sur le footer ; remontée réduite par
   * HeloLift si le contenu (message d'erreur…) passerait sous le header */
  main.promotion-1.promotion .promotion-1__content {
    top: calc(-1 * var(--helo-lift-fit, var(--helo-main-lift)));
  }
  body:has(> main.promotion, > main.promotion--custom, > main.participation) > .header {
    z-index: 20;
  }
}

/* Listes select2 (participation) : même rendu que les .field__input de l'intégrateur */
.field .select2-container--default .select2-selection--single {
  height: 50px;
  padding: 0 44px 0 20px;
  background: #ffffff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%230054a4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4.5,7 9,12 13.5,7'/%3E%3C/svg%3E") no-repeat right 16px center / 18px 18px;
  border: 1px solid #cbd9e7;
  border-radius: 8px;
  display: flex;
  align-items: center;
}
.field .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  color: #000;
}
.field .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #7d8899;
  font-weight: 400;
}
/* Flèche de select2 remplacée par celle de la charte (fond ci-dessus) */
.field .select2-container--default .select2-selection--single .select2-selection__arrow {
  display: none;
}
.field .select2-container--default.select2-container--focus .select2-selection--single,
.field .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #0054a4;
  outline: none;
}
.field.is-invalid .select2-container--default .select2-selection--single {
  border-color: #ff0004;
}
/* Liste déroulante (ajoutée à la fin du <body>) */
.select2-dropdown {
  border-color: #0054a4;
  border-radius: 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  overflow: hidden;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #0054a4;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border-color: #cbd9e7;
  border-radius: 6px;
}

/* participation : champs du document puis case « adresse de livraison », espacés comme le formulaire d'order-kit-2 */
.participation__fields {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.participation__fields:empty {
  display: none;
}
/* Colonne de grille : sans min-width:0, la liste select2 élargirait sa colonne au lieu de rester à 50 % */
.participation__fields .form-cols__pair > .field {
  min-width: 0;
}

/* participation : ligne de 3 champs (code postal, ville, pays), empilés sur mobile comme form-cols__pair--stack */
.helo-cols-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 25px;
}
@media (max-width: 900px) {
  .helo-cols-3 {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}
.participation__fields .helo-cols-3 > .field {
  min-width: 0;
}
/* Zone de texte : même apparence que les champs, plus haute et redimensionnable en hauteur */
textarea.field__input {
  height: auto;
  min-height: 100px;
  resize: vertical;
}

/* Mes participations : ligne de message (aucune participation, erreur) sur toute la largeur du tableau */
.participations__row--message {
  display: block;
  padding: 24px 20px;
}
.participations__row--error {
  color: #ff0004;
}

/* Mes participations : loupe en bout de ligne, ouvre le détail de la participation dans un nouvel onglet */
.participations__row {
  grid-template-columns: repeat(4, 1fr) 40px;
}
.participations__tracking {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #0054a4;
  transition: background 0.1s ease;
}
.participations__tracking:hover {
  background: rgba(0, 84, 164, 0.1);
}
.participations__tracking svg {
  transition: transform 0.15s ease;
}
.participations__tracking:hover svg {
  transform: scale(1.25);
}
@media (prefers-reduced-motion: reduce) {
  .participations__tracking:hover svg {
    transform: none;
  }
}
.participations__tracking:focus-visible {
  outline: 2px solid #0054a4;
  outline-offset: 2px;
}
.participations__tracking[aria-busy="true"] {
  cursor: progress;
}
.participations__tracking[aria-busy="true"] svg {
  display: none;
}
.participations__tracking[aria-busy="true"]::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: helo-spin 0.7s linear infinite;
}
/* Bouton « Mon espace » (mobile) : icône seule, libellé gardé pour les lecteurs d'écran */
@media (max-width: 900px) {
  .header__cta {
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
  }
  .header__cta-icon {
    width: 20px;
    height: 20px;
  }
  .header__cta span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.participations__tracking-label {
  display: none;
}
/* Mes participations (mobile) : une carte par participation, libellé à gauche et valeur à droite (data-label),
 * bouton « Accéder au détail » centré sous les informations */
@media (max-width: 900px) {
  /* Cartes plus larges que le titre, qui reste aligné sur le logo */
  .participations {
    padding-right: 20px;
    padding-left: 20px;
  }
  .participations__title {
    padding: 0 20px;
  }
  .participations__body .participations__row:not(.participations__row--message) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 18px 16px;
    border: 1px solid #cbd9e7;
    border-radius: 16px;
    text-align: right;
  }
  .participations__body .participations__row--message {
    background: #ffffff;
    border-radius: 12px;
  }
  .participations__op,
  .participations__num,
  .participations__date,
  .participations__state {
    display: flex;
    align-self: stretch;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #66676b;
  }
  .participations__op {
    color: #34363b;
  }
  .participations__op::before,
  .participations__num::before,
  .participations__date::before,
  .participations__state::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-weight: 700;
    color: #66676b;
  }
  .participations__state .status {
    text-align: left;
  }
  .participations__state .status::before {
    flex-shrink: 0;
  }
  .participations__tracking {
    align-self: center;
    gap: 8px;
    width: auto;
    height: auto;
    min-height: 44px;
    margin-top: 4px;
    padding: 8px 20px;
    border: 2px solid #0054a4;
    border-radius: 30px;
  }
  .participations__tracking:hover svg {
    transform: none;
  }
  .participations__tracking-label {
    display: inline;
    font-size: 14px;
    font-weight: 600;
  }
  /* Pagination masquée par l'intégrateur : sans elle, seule la première page serait accessible */
  .participations__pagination {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .participations__page-info {
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 14px;
  }
  .participations__count {
    width: 100%;
  }
  .participations__nav {
    gap: 12px;
  }
  .participations__nav .btn {
    flex: 1;
    padding: 12px 8px;
    font-size: 15px;
  }
}

/* Mes participations (desktop) : typographie des colonnes selon la maquette — en-têtes et opération en 15px,
 * numéro et date en 16px gris, lignes plus hautes */
@media (min-width: 901px) {
  .participations__row--header {
    font-size: 15px;
    font-weight: 700;
    color: rgb(102, 103, 107);
  }
  .participations__body .participations__row {
    padding-top: 28px;
    padding-bottom: 28px;
  }
  .participations__op {
    font-size: 15px;
    font-weight: 500;
    color: rgb(52, 54, 59);
  }
  .participations__num,
  .participations__date {
    font-size: 16px;
    font-weight: 500;
    color: rgb(102, 103, 107);
  }
}

/* login (desktop) : bloc remonté de 100px (carte centrée verticalement sur toute la hauteur restante),
 * réduit par HeloLift (--helo-lift-fit) sur les écrans peu hauts pour que la carte reste sous le header */
@media (min-width: 901px) {
  main.login {
    position: relative;
    top: calc(-1 * var(--helo-lift-fit, 100px));
  }
  body:has(> main.login) > .header {
    z-index: 20;
  }
}

/* signup-index : lien « Retour » masqué (l'élément reste dans la maquette) */
.signup-index__back {
  display: none;
}

/* signup-2-refuge : mention des champs obligatoires et consentement, absents de la maquette refuge ;
 * styles repris de signup-2-eleveur.css, non chargé sur cette page */
.signup-2-refuge .signup-2__note {
  grid-column: 1/-1;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  color: #0054a4;
  margin-top: 20px;
}
.signup-2-refuge .signup-2__consent {
  grid-column: 1/-1;
  justify-self: center;
  max-width: 724px;
}
@media (max-width: 900px) {
  .signup-2-refuge .signup-2__note {
    order: -1;
    font-size: 16px;
    margin-top: 0;
  }
  .signup-2-refuge .signup-2__consent {
    justify-self: start;
    max-width: none;
    font-size: 13px;
    line-height: 22px;
  }
}

/* Modale de consentement de la participation : plus large que les modales de l'intégrateur (550px),
 * comme la maquette (titre sur 2 lignes) */
.modal-participation-consent {
  max-width: 760px;
}

/* Message d'erreur avec une liste de raisons (non-conformités d'une participation) */
.helo-form-error--list ul {
  margin: 6px 0 0;
  padding-left: 20px;
  list-style: disc;
}
.helo-form-error--list li + li {
  margin-top: 4px;
}
/* Message en HTML (paragraphes du backoffice, page promotion) */
.helo-form-error p {
  margin: 0;
}
.helo-form-error p + p {
  margin-top: 6px;
}

/* participation : QR code du document facture (vers evidence.php), même bloc que la maquette promotion-2 */
.participation__qr {
  display: flex;
  align-items: center;
  gap: 25px;
}
/* Taille identique à QR_SIZE (participation.js) */
.participation__qr-code {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}
.participation__qr-code svg {
  display: block;
}
.participation__qr-text {
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  color: #34363b;
}
@media (max-width: 900px) {
  /* QR code au-dessus du texte : à côté, il laisserait trop peu de place au texte */
  .participation__qr {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .participation__qr-text {
    font-size: 12px;
    line-height: 18px;
  }
}

/* evidence : prise des preuves sur mobile (page ouverte depuis le QR code), une colonne quelle que soit la largeur */
main.evidence {
  align-items: center;
  padding: 30px 16px 50px;
}
.evidence__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 560px;
  min-height: 200px;
}
.evidence__content [hidden] {
  display: none;
}
.evidence__title {
  overflow-wrap: anywhere;
}
.evidence__back {
  align-self: flex-start;
  padding: 0;
  background: none;
  cursor: pointer;
}
.evidence__desc,
.evidence__hint,
.evidence__note {
  font-size: 14px;
  line-height: 21px;
  color: #34363b;
}
.evidence__note {
  padding: 12px 16px;
  border-radius: 8px;
  background: #eaf3fc;
}
.evidence__progress {
  font-size: 14px;
  font-weight: 600;
  color: #0054a4;
}
.evidence__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.evidence__actions .btn,
.evidence__section > .btn,
.evidence__step > .btn,
.evidence__manual .btn {
  flex: 1 1 auto;
  width: 100%;
}
.evidence__actions .btn {
  width: auto;
}
.evidence__list,
.evidence__fields,
.evidence__step,
.evidence__manual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.evidence__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border: 1px solid #cbd9e7;
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}
.evidence__card-title {
  font-size: 16px;
  font-weight: 700;
  color: #003672;
}
.evidence__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.evidence__badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 30px;
  background: #fff4e5;
  color: #8a4b00;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.evidence__badge.is-done {
  background: #f0feed;
  color: #259800;
}
.evidence__badge:empty {
  display: none;
}
.evidence__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: #ffffff;
}
.evidence__section-title {
  font-size: 18px;
  font-weight: 700;
  color: #0054a4;
}
.evidence__saved {
  min-height: 18px;
  font-size: 12px;
  color: #259800;
}
.evidence__items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.evidence__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #e5edf5;
}
.evidence__item-info,
.evidence__item-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.evidence__item-actions {
  align-items: flex-end;
  flex-shrink: 0;
}
.evidence__item-name {
  font-size: 14px;
  font-weight: 600;
  color: #003672;
}
.evidence__item-meta {
  font-size: 12px;
  color: #34363b;
}
.evidence__link {
  align-self: flex-start;
  padding: 0;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: #0054a4;
  text-decoration: underline;
  cursor: pointer;
}
.evidence__link--danger {
  color: #ff0004;
}
.evidence__preview {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 12px;
  background: #ffffff;
}
/* Code de contrôle à écrire puis photographier */
.evidence__code {
  padding: 24px 16px;
  border: 2px dashed #0054a4;
  border-radius: 12px;
  background: #ffffff;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-align: center;
  color: #003672;
}
.evidence__code--reminder {
  padding: 10px 16px;
  font-size: 24px;
}
/* Ligne du haut d'un exemplaire : Retour à gauche, Supprimer à droite */
.evidence__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.evidence__topbar .evidence__link {
  align-self: center;
}
/* Enseigne « Autre » : nom saisi sous la liste */
.evidence__other {
  margin-top: 4px;
}
/* Appareil photo dans la page (getUserMedia) */
.evidence__shutter {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.evidence__video {
  width: 100%;
  max-height: 60vh;
  border-radius: 12px;
  background: #000000;
  object-fit: cover;
}
/* Lecture du code-barres en continu : cadre avec un repère horizontal au centre */
.evidence__scanner {
  position: relative;
  overflow: hidden; /* voile du repère limité à la vidéo */
  border-radius: 12px;
}
.evidence__scanner .evidence__video {
  display: block;
}
/* Cadre de visée (format d'un code-barres EAN) : extérieur assombri, repère rouge au milieu */
.evidence__scanner-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 40%;
  transform: translate(-50%, -50%);
  border: 3px solid #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.evidence__scanner-guide::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 6%;
  right: 6%;
  height: 2px;
  background: #ff0004;
  opacity: 0.8;
}
/* Message sur la vidéo pendant la photo du code-barres (« Ne bougez plus… 2 ») */
.evidence__scanner-notice {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 54, 114, 0.9);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}
.evidence__scanner-notice[hidden] {
  display: none;
}

/* participation : preuves du document (QR code puis exemplaires reçus du téléphone, lecture seule) */
.participation__evidence {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.participation__evidence:empty:not(.helo-loading) {
  display: none;
}
.participation__next--hidden {
  display: none;
}
/* Téléphone ou tablette : texte et bouton vers la page evidence, à la place du QR code */
.participation__device {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.participation__device .participation__qr-text {
  font-size: 14px;
  line-height: 20px;
}
.participation__device .btn {
  text-align: center;
}
.participation__received {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.participation__received-title {
  font-size: 16px;
  font-weight: 700;
  color: #003672;
}
.participation__received-count {
  font-size: 14px;
  line-height: 21px;
  color: #34363b;
}
.participation__received-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  border: 1px solid #cbd9e7;
  border-radius: 12px;
  background: #ffffff;
}
.participation__received-label {
  font-size: 15px;
  font-weight: 700;
  color: #003672;
}
.participation__received-field {
  font-size: 13px;
  line-height: 19px;
  color: #34363b;
}
.participation__received-products {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 19px;
  color: #34363b;
}
/* Produit : nom en gras, badges et œil sur une ligne, code-barres lu en dessous */
.participation__received-product {
  padding-top: 8px;
  border-top: 1px solid #e5edf5;
}
.participation__received-product-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.participation__received-product-name {
  font-size: 14px;
  font-weight: 700;
  color: #003672;
}
.participation__received-product-head .participation__preview {
  margin-left: 0;
}
.participation__received-product-ean {
  margin-top: 2px;
  font-size: 12px;
  color: #34363b;
}
.participation__received:empty {
  display: none;
}

/* evidence : bandeau de la vidéo pendant la vérification du produit, indicateur de chargement après le texte */
.evidence__scanner-notice[aria-busy="true"]::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: helo-spin 0.7s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .evidence__scanner-notice[aria-busy="true"]::after {
    animation-duration: 2s;
  }
}

/* participation : bouton œil d'aperçu d'un justificatif, à côté du badge ou du produit */
.participation__preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 6px;
  padding: 0;
  border: 1px solid #cbd9e7;
  border-radius: 50%;
  background: #ffffff;
  color: #0054a4;
  vertical-align: middle;
  cursor: pointer;
}
.participation__preview:hover,
.participation__preview:focus-visible {
  border-color: #0054a4;
  background: #eaf3fc;
}
.participation__received-field strong {
  font-weight: 700;
  color: #003672;
}

/* Modale d'aperçu du justificatif : plus large que les autres, PDF dans une iframe */
.modal.modal-evidence-preview {
  max-width: 900px;
  gap: 20px;
  padding: 40px;
}
.modal-evidence-preview__frame {
  width: 100%;
  height: 65vh;
  border: 1px solid #cbd9e7;
  border-radius: 12px;
  background: #f2f2f2;
}
@media (max-width: 900px) {
  .modal.modal-evidence-preview {
    padding: 24px;
  }
}

/* Modale de confirmation (HeloConfirm) : deux boutons côte à côte, confirmation en rouge pour une suppression */
.modal.modal-helo-confirm {
  max-width: 480px;
}
.modal-helo-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}
.modal-helo-confirm__actions .btn {
  flex: 1 1 140px;
}
.btn.modal-helo-confirm__danger {
  background: linear-gradient(to left, #ff0004, #c80003);
  color: #ffffff;
}
.btn.modal-helo-confirm__danger[aria-busy="true"] {
  background: linear-gradient(to left, #ff0004, #c80003);
  color: #ffffff;
}
