/* ============================================================
   L'écran de la démo ASGO (phase 4). Feuille reprise de la
   maquette V9 actée le 12 août 2026, sans le panneau de
   démonstration. Application mobile, arabe d'abord : sur grand
   écran, la colonne s'affiche centrée à largeur de téléphone.
   Aucun état de survol : app mobile.
   ============================================================ */

:root {
  --marine: #004060;
  --marine-fonce: #00293F;
  --turquoise: #28B0A8;
  --turquoise-pale: #E3F4F3;
  --ambre: #D98324;
  --fond: #F2F6F7;
  --carte: #FFFFFF;
  --texte: #14313F;
  --texte-2: #5A7280;
  --trait: #E1E8EB;
  --rayon-carte: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  background: #DDE6E9;
  color: var(--texte);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 100vh;
}

/* ---------- Le téléphone ---------- */

.telephone {
  width: 400px;
  height: 850px;
  max-height: calc(100vh - 48px);
  flex: none;
  background: var(--fond);
  border-radius: 34px;
  border: 10px solid #10222C;
  box-shadow: 0 24px 60px rgba(0, 41, 63, .35);
  /* clip et non hidden : interdit aussi le défilement programmatique,
     le volet garé hors cadre ne peut jamais apparaître */
  overflow: clip;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ---------- Hors du cadre : la nouvelle conversation (chantier C) ----------
   Hors du flux (le cadre reste centré), dans la zone vide à droite du
   téléphone, à mi-hauteur de la page. */

.hors-cadre {
  position: fixed;
  top: 50%;
  left: calc(50% + 200px);
  width: calc(50% - 200px);
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 0 24px;
  font-family: inherit;
}
.bouton-nouvelle {
  display: inline-flex; align-items: center; gap: 12px;
  border: none; border-radius: 99px;
  padding: 8px 22px 8px 8px;
  background: var(--marine);
  color: #FFF;
  font-size: 14px; font-weight: 700; font-family: inherit;
  letter-spacing: .1px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 41, 63, .28), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.bouton-nouvelle .rond-icone {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--turquoise);
  color: #FFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.bouton-nouvelle:hover {
  background: var(--marine-fonce);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 41, 63, .34), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.bouton-nouvelle:active { transform: translateY(0); }
.confirmation-nouvelle {
  width: 340px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid var(--trait);
  box-shadow: 0 14px 34px rgba(0, 41, 63, .16);
}
.confirmation-nouvelle p {
  font-size: 13.5px; font-weight: 600; color: var(--marine); line-height: 1.45;
}
.confirmation-nouvelle .choix {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px;
}
.confirmation-nouvelle button {
  border: none; border-radius: 99px;
  padding: 9px 18px;
  font-size: 13px; font-weight: 700; font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.confirmation-nouvelle .btn-annuler { background: #E6EEF2; color: var(--marine); }
.confirmation-nouvelle .btn-confirmer { background: var(--turquoise); color: #FFF; }

@media (max-width: 760px) {
  body { padding: 0; background: var(--fond); }
  .hors-cadre { display: none; }
  .telephone { width: 100%; height: 100vh; height: 100dvh; max-height: none; border: none; border-radius: 0; box-shadow: none; }
}

/* ---------- En-tête, avec le panier en pastille ---------- */

.entete {
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--carte);
  border-bottom: 1px solid var(--trait);
}
.entete img.logo { height: 34px; width: auto; }
.entete .titre { font-size: 15px; font-weight: 700; color: var(--marine); line-height: 1.2; }
.entete .sous-titre { font-size: 11px; color: var(--texte-2); }

.panier-entete {
  margin-inline-start: auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--marine);
  color: #F2F8FA;
  border: none; border-radius: 14px;
  padding: 7px 12px;
  font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.panier-entete:active { filter: brightness(1.15); }
.panier-entete .etq { display: block; font-size: 9.5px; font-weight: 600; color: #9FC2D2; line-height: 1.2; }
.pict-panier { position: relative; width: 26px; height: 26px; display: grid; place-items: center; }
.badge-compte {
  position: absolute; top: -4px; inset-inline-start: -5px;
  background: var(--turquoise); color: #FFF;
  font-size: 9px; font-weight: 700;
  min-width: 15px; text-align: center;
  padding: 1px 4px; border-radius: 99px;
  font-variant-numeric: tabular-nums;
}
.total-entete { display: block; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.total-entete i { font-style: normal; font-size: 9.5px; font-weight: 500; color: #9FC2D2; }
.total-entete.pulse { color: #FFC873; }

/* ---------- Le fil ---------- */

.fil {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* Le fil défile sans barre visible (décision d'Ayoub du 31 août 2026). */
  scrollbar-width: none;
}
.fil::-webkit-scrollbar { display: none; }

.rangee { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.rangee.cote-epicier { align-items: flex-end; flex-direction: column-reverse; }

.avatar {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
}
.avatar.agent { background: #FFF; border: 1px solid var(--trait); }
.avatar.agent img { width: 21px; height: auto; }
.avatar.epicier { background: var(--marine); }

.bulle {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.bulle.epicier {
  background: var(--marine);
  color: #F2F8FA;
  border-bottom-left-radius: 5px;
}
.bulle.agent {
  background: var(--carte);
  color: var(--texte);
  border: 1px solid var(--trait);
  border-bottom-right-radius: 5px;
}
.bulle.latin { direction: ltr; text-align: left; }

/* Les lignes produit dans une bulle de l'agent (sortie structurée) :
   miniature, marque et format, et le texte de l'agent mis en valeur. */
.bulle .ligne-bulle-texte { margin: 2px 0; }
.bulle .ligne-bulle-produit {
  display: flex; align-items: center; gap: 9px;
  margin: 7px 0; padding: 7px 9px;
  background: var(--fond); border: 1px solid var(--trait);
  border-radius: 11px;
}
.bulle .ligne-bulle-produit .vignette {
  flex: none; width: 34px; height: 34px;
  border-radius: 8px; border: 1px solid var(--trait);
  background: #FFF; object-fit: contain; padding: 2px;
}
.bulle .ligne-bulle-produit .infos { display: block; min-width: 0; }
.bulle .ligne-bulle-produit .titre-produit {
  display: block; font-size: 11.5px; color: var(--texte-2);
  line-height: 1.3; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.bulle .ligne-bulle-produit .texte-agent {
  display: block; font-size: 13.5px; font-weight: 700; line-height: 1.4;
}

/* L'erreur technique, honnête, hors des bulles de conversation */
.note-erreur {
  align-self: center;
  max-width: 90%;
  font-size: 12px;
  color: #8C2F28;
  background: #FCEBEA;
  border: 1px solid #F2C9C5;
  border-radius: 10px;
  padding: 7px 12px;
  text-align: center;
}

/* ---------- Le carrousel ---------- */

.carrousel {
  /* flex none : un conteneur défilant a une taille minimale de zéro
     dans la colonne du fil, sans cette règle il se fait écraser */
  flex: none;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.carrousel::-webkit-scrollbar { display: none; }
.carrousel .carte-produit { flex: 0 0 46%; scroll-snap-align: start; }

/* ---------- Les cartes produits ---------- */

.carte-produit {
  background: transparent;
  border: none;
  cursor: default;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* La tuile photo domine : grande, blanche, arrondie. Le badge du
   conditionnement et le bouton d'ajout vivent dessus */
.carte-produit .photo {
  height: 150px;
  background: #FFF;
  display: grid; place-items: center;
  border: 1px solid var(--trait);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.carte-produit .photo img { max-height: 122px; max-width: 82%; object-fit: contain; }

/* Le bouton d'ajout, posé sur la photo : + rond quand le produit
   n'est pas au panier, réglette dépliée avec la quantité sinon */
.ajout {
  position: absolute; bottom: 7px; inset-inline-end: 7px;
  z-index: 2;
  display: flex; align-items: center;
  background: var(--marine);
  border-radius: 99px;
  box-shadow: 0 3px 8px rgba(0, 41, 63, .28);
}
.ajout button {
  width: 27px; height: 27px;
  border: none; background: transparent; cursor: pointer;
  color: #FFF; font-size: 15px; font-weight: 700; line-height: 1;
  display: grid; place-items: center;
  font-family: inherit;
}
.ajout button:active { filter: brightness(1.3); }
.ajout .qte {
  color: #FFF; font-weight: 700; font-size: 12px;
  min-width: 14px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.ajout:not(.actif) .btn-moins,
.ajout:not(.actif) .qte { display: none; }
.ajout.actif { background: var(--turquoise); }

/* Le corps suit le contenu réel : aucune ligne vide réservée.
   Marque et format en tête, désignation dessous, prix ensuite */
.carte-produit .corps { padding: 8px 6px 0; }
.carte-produit .marque-format { font-size: 13.5px; font-weight: 700; line-height: 1.45; }
.carte-produit .designation { font-size: 12px; color: var(--texte-2); line-height: 1.4; margin-top: 1px; }

.badge {
  position: absolute; top: 8px; inset-inline-start: 8px;
  z-index: 2;
  font-size: 11px; font-weight: 700;
  padding: 2.5px 9px; border-radius: 99px;
  box-shadow: 0 1px 4px rgba(0, 41, 63, .10);
}
.badge.carton { background: #E8EEF3; color: var(--marine); }
.badge.pack   { background: var(--turquoise-pale); color: #157F78; }
.badge.piece  { background: #F1EFEA; color: #6B5E43; }

.carte-produit .prix { margin-top: 6px; display: flex; align-items: baseline; gap: 4px; white-space: nowrap; overflow: hidden; }
.carte-produit .prix .montant {
  font-size: 16.5px; font-weight: 700; color: var(--marine);
  font-variant-numeric: tabular-nums;
}
.carte-produit .prix .devise { font-size: 10.5px; color: var(--texte-2); }
.carte-produit .prix-second { margin-top: 1px; font-size: 11px; color: var(--texte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-produit .prix-second b { font-weight: 600; color: var(--texte); font-variant-numeric: tabular-nums; }

.carte-voirtout {
  flex: 0 0 32%;
  scroll-snap-align: start;
  border: 1.5px dashed #B9CAD3;
  border-radius: var(--rayon-carte);
  background: var(--carte);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  min-height: 200px;
  -webkit-tap-highlight-color: transparent;
}
.carte-voirtout:active { filter: brightness(.96); }
.carte-voirtout .rond {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--turquoise-pale);
  display: grid; place-items: center;
  color: #157F78; font-size: 17px; font-weight: 700;
}
.carte-voirtout .texte { font-size: 12.5px; font-weight: 700; color: var(--marine); text-align: center; }

/* ---------- Barre de saisie ---------- */

.barre-saisie {
  flex: none;
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--carte);
  border-top: 1px solid var(--trait);
}
.champ {
  flex: 1;
  padding: 10px 15px;
  font: inherit; font-size: 14px;
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
  border: 1px solid var(--trait);
  border-radius: 21px;
  /* Zone multi-lignes à hauteur automatique, pilotée par le script :
     pas de poignée de redimensionnement, pas de défilement parasite. */
  resize: none;
  overflow-y: auto;
  max-height: 110px;
}
.champ::placeholder { color: #8FA3AE; }
.bouton-principal {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: none; cursor: pointer;
  /* Au repos, neutre : on voit le bouton s'allumer quand il envoie
     (remarque d'Ayoub du 30 août 2026). */
  background: #E6EEF2;
  color: var(--marine);
  display: grid; place-items: center;
  box-shadow: none;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
  /* Le maintien du doigt ne doit ni sélectionner ni faire défiler */
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.bouton-principal svg { grid-area: 1 / 1; }
/* Un seul bouton, deux visages : le micro quand le champ est vide, la
   flèche quand il porte du texte ou qu'un enregistrement libre attend
   son envoi (chantier D, façon WhatsApp). */
.bouton-principal .icone-envoi { display: none; }
.barre-saisie.avec-texte .icone-micro { display: none; }
.barre-saisie.avec-texte .icone-envoi { display: block; }
.barre-saisie.libre .icone-micro { display: none; }
.barre-saisie.libre .icone-envoi { display: block; }
/* Actif, il envoie : le turquoise du logo. */
.barre-saisie.avec-texte .bouton-principal,
.barre-saisie.libre .bouton-principal {
  background: var(--turquoise);
  color: #FFF;
  box-shadow: 0 3px 10px rgba(40, 176, 168, .35);
}

/* La zone d'enregistrement remplace le champ. Ses éléments, en page de
   droite à gauche, se lisent du bouton (à droite) vers la gauche :
   maintien : indication au centre, chronomètre puis micro rouge à gauche ;
   libre : onde en direct, chronomètre, corbeille à gauche. */
.zone-vocale {
  flex: 1;
  display: none; align-items: center; gap: 10px;
  min-height: 44px;
  padding: 0 4px 0 2px;
  font-size: 17px; font-variant-numeric: tabular-nums;
  color: var(--texte);
}
.barre-saisie.enregistre .champ { display: none; }
.barre-saisie.enregistre .zone-vocale { display: flex; }
/* Minuteur en demi-gras et marine adouci (retouche du 31 août 2026,
   remarque d'Ayoub), taille inchangée. */
.zone-vocale .temps-vocal { flex: none; min-width: 42px; font-size: 17px; font-weight: 500; color: rgba(0, 64, 96, .78); }
.zone-vocale .onde-directe { display: none; flex: 1; height: 44px; min-width: 0; }
.zone-vocale .indication-annuler {
  display: none; align-items: center; gap: 5px;
  margin: 0 auto;
  font-size: 15px; font-weight: 500; color: var(--texte-2);
}
/* Le micro rouge du maintien : entièrement rouge, et il clignote
   franchement, allumé puis éteint. */
.zone-vocale .micro-rouge {
  display: none; flex: none; color: #E4572E; line-height: 0;
  animation: clignote-micro 1s infinite steps(1);
}
@keyframes clignote-micro {
  0% { opacity: 1; }
  50% { opacity: 0; }
}
.zone-vocale .bouton-corbeille {
  display: none; flex: none; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: transparent; color: var(--texte-2);
  place-items: center; cursor: pointer;
}
.zone-vocale .bouton-corbeille:hover { background: #F1E4E4; color: #C8442A; }
.barre-saisie.maintien .indication-annuler { display: flex; }
.barre-saisie.maintien .micro-rouge { display: block; }
.barre-saisie.libre .onde-directe { display: block; }
.barre-saisie.libre .bouton-corbeille { display: grid; }
/* Maintien du doigt : le bouton vire au rouge et pulse. */
.barre-saisie.maintien .bouton-principal {
  background: #E4572E;
  color: #FFF;
  box-shadow: 0 3px 10px rgba(228, 87, 46, .4);
  animation: pulse-vocal 1.2s infinite ease-in-out;
}
@keyframes pulse-vocal {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ---------- La bulle vocale (maquette V9) ---------- */

/* Retouche du 31 août 2026 (remarque d'Ayoub, Simulation 15) : toutes
   les bulles vocales ont la même largeur, le texte passe à la ligne
   dessous, et l'onde occupe toute la place entre le minuteur et le rond
   de lecture. */
.bulle.vocale { padding: 11px 13px 9px; width: 85%; }
/* L'onde se pose et se lit de gauche à droite : la première barre, la
   première lue, est à gauche, contre le bouton de lecture (décision
   d'Ayoub du 31 août 2026). */
.bulle.vocale .onde { flex: 1; justify-content: space-between; min-width: 0; direction: ltr; }
.ligne-vocale { display: flex; align-items: center; gap: 10px; }
.bouton-lecture {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, .18); border: none; cursor: default;
  display: grid; place-items: center;
}
.bouton-lecture svg { display: block; }
/* Chantier E (31 août 2026) : la bulle se joue, même design. Le bouton
   devient cliquable quand un enregistrement est en mémoire, et montre
   pause pendant la lecture. */
.bouton-lecture.jouable { cursor: pointer; }
.bouton-lecture.jouable:hover { background: rgba(255, 255, 255, .28); }
.bouton-lecture .icone-pause { display: none; }
.bouton-lecture.joue .icone-lecture { display: none; }
.bouton-lecture.joue .icone-pause { display: block; }
.onde { display: flex; align-items: center; gap: 2.5px; height: 26px; }
.onde i { width: 3px; border-radius: 2px; background: rgba(255, 255, 255, .55); }
.onde i.lu { background: #7FD4CE; }
.duree-vocale { font-size: 11.5px; color: rgba(255, 255, 255, .75); font-variant-numeric: tabular-nums; }
.transcription {
  margin-top: 7px; padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  font-size: 12.5px; color: rgba(255, 255, 255, .85);
}
.transcription b { font-weight: 400; color: #FFF; }
.transcription .etiquette { font-size: 10.5px; color: #7FD4CE; display: block; margin-bottom: 1px; }

/* ---------- Volets (سلة et « tout voir ») ---------- */

.voile {
  position: absolute; inset: 0;
  background: rgba(0, 41, 63, .45);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  z-index: 5;
}
.voile.visible { opacity: 1; pointer-events: auto; }

.volet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 76%;
  background: var(--carte);
  border-radius: 22px 22px 0 0;
  transform: translateY(102%);
  transition: transform .3s cubic-bezier(.2, .8, .25, 1);
  z-index: 6;
  display: flex; flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 41, 63, .25);
}
.volet.ouvert { transform: translateY(0); }
.poignee { flex: none; width: 42px; height: 4px; border-radius: 2px; background: #CFDAE0; margin: 10px auto 0; }

.volet-tout { height: 85%; max-height: 85%; }
.volet-tout .grille-tout {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
  row-gap: 24px;
  align-content: start;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
}

.entete-volet { flex: none; padding: 12px 18px 10px; border-bottom: 1px solid var(--trait); }
.entete-volet .titre-volet { font-size: 16px; font-weight: 700; color: var(--marine); }
.entete-volet .compte-volet { font-size: 11.5px; color: var(--texte-2); margin-top: 2px; }

.lignes { overflow-y: auto; padding: 4px 18px; }
.ligne-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px 62px;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--trait);
}
.lignes .ligne-article:last-child { border-bottom: none; }

.cellule-produit { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cellule-produit > div { min-width: 0; }
.vignette {
  flex: none; width: 42px; height: 42px;
  border-radius: 9px; border: 1px solid var(--trait);
  background: #FFF; object-fit: contain; padding: 2px;
}
.cellule-produit .marque-format {
  font-size: 13px; font-weight: 700; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cellule-produit .designation {
  font-size: 12px; color: var(--texte-2); line-height: 1.35; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.cellule-quantite { text-align: center; overflow: hidden; }
.cellule-quantite .choix { white-space: nowrap; }
.cellule-quantite .nombre { font-size: 19px; font-weight: 700; line-height: 1; }
.cellule-quantite .unite { font-size: 12px; font-weight: 600; }
.cellule-quantite .equivalent { font-size: 10.5px; color: var(--texte-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* La réglette du volet (chantier B, 30 août 2026) : + et − sur chaque
   ligne, même dessin que la réglette des cartes, l'unité dessous */
.reglette-volet {
  display: inline-flex; align-items: center;
  background: var(--marine);
  border-radius: 99px;
}
.reglette-volet button {
  width: 26px; height: 26px;
  border: none; background: transparent; cursor: pointer;
  color: #FFF; font-size: 15px; font-weight: 700; line-height: 1;
  display: grid; place-items: center;
  font-family: inherit;
}
.reglette-volet button:active { filter: brightness(1.3); }
.cellule-quantite .reglette-volet .nombre {
  color: #FFF; font-size: 13px; font-weight: 700; line-height: 1;
  min-width: 18px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.cellule-quantite div.unite { margin-top: 3px; }

/* La confirmation à zéro, sous la ligne, sur toute sa largeur */
.confirmation-retrait {
  grid-column: 1 / -1;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 2px; padding: 9px 12px;
  border-radius: 10px;
  background: #FFF6E8;
  border: 1px solid #F2DDBE;
}
.confirmation-retrait .question {
  flex: 1 1 100%;
  font-size: 12.5px; font-weight: 600; color: var(--marine); line-height: 1.4;
}
.confirmation-retrait button {
  border: none; border-radius: 99px;
  padding: 7px 16px;
  font-size: 12.5px; font-weight: 700; font-family: inherit;
  cursor: pointer;
}
.confirmation-retrait .btn-garder { background: #E6EEF2; color: var(--marine); }
.confirmation-retrait .btn-retirer { background: var(--ambre); color: #FFF; }

.ligne-article .montant {
  text-align: left;
  font-size: 15px; font-weight: 700; color: var(--marine);
  font-variant-numeric: tabular-nums;
}
.ligne-article .montant .devise { display: block; font-size: 10px; font-weight: 500; color: var(--texte-2); }

.ligne-vide { padding: 22px 0; text-align: center; font-size: 13px; color: var(--texte-2); }

.total-volet {
  flex: none;
  display: flex; align-items: baseline;
  padding: 13px 18px;
  border-top: 2px solid var(--marine);
  margin-top: 2px;
}
.total-volet .libelle { font-size: 14px; font-weight: 700; color: var(--marine); }
.total-volet .valeur {
  margin-inline-start: auto;
  font-size: 21px; font-weight: 700; color: var(--marine);
  font-variant-numeric: tabular-nums;
}
.total-volet .valeur .devise { font-size: 12px; font-weight: 500; color: var(--texte-2); }

.pied-volet { flex: none; padding: 0 18px calc(14px + env(safe-area-inset-bottom)); }
.bouton-valider {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px;
  font: inherit; font-size: 15.5px; font-weight: 700;
  color: #FFF; background: var(--turquoise);
  border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(40, 176, 168, .35);
}
.bouton-valider:active { filter: brightness(1.1); }
.bouton-valider:disabled { opacity: .4; pointer-events: none; box-shadow: none; }
.bouton-valider .rond-fleche {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  display: grid; place-items: center;
}

/* ---------- Le moment de validation ---------- */

.validation {
  position: absolute; inset: 0;
  background: var(--marine);
  color: #F2F8FA;
  z-index: 8;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  overflow-y: auto;
}
.validation.visible { opacity: 1; pointer-events: auto; }
.rond-coche {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--turquoise);
  display: grid; place-items: center;
  box-shadow: 0 0 0 12px rgba(40, 176, 168, .18);
  transform: scale(.4); opacity: 0;
}
.validation.visible .rond-coche { animation: apparait .45s cubic-bezier(.2, .8, .3, 1.2) .1s forwards; }
@keyframes apparait { to { transform: scale(1); opacity: 1; } }
.trace-coche { stroke-dasharray: 60; stroke-dashoffset: 60; }
.validation.visible .trace-coche { animation: trace .4s ease-out .45s forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }

.validation h3 { font-size: 20px; font-weight: 700; margin-top: 20px; }

.recapitulatif {
  width: 100%;
  background: #FFF; color: var(--texte);
  border-radius: var(--rayon-carte);
  margin-top: 22px;
  padding: 12px 16px 4px;
}
.recapitulatif .titre-recap {
  font-size: 12px; font-weight: 700; color: var(--marine);
  padding-bottom: 8px; border-bottom: 1px solid var(--trait);
}
.recapitulatif .titre-recap .reference { direction: ltr; unicode-bidi: embed; }
.recapitulatif .lignes { padding: 0; max-height: 300px; }
.recapitulatif .total-mini {
  display: flex; padding: 10px 0 8px;
  border-top: 2px solid var(--marine);
  font-size: 15px; font-weight: 700; color: var(--marine);
}
.recapitulatif .total-mini .valeur { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.bouton-fermer-validation {
  margin-top: 20px; padding: 10px 26px;
  font: inherit; font-size: 13px; font-weight: 600;
  color: #F2F8FA; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 99px; cursor: pointer;
}

/* ---------- Fantôme d'animation entre carte et pastille ---------- */

.fantome {
  position: absolute; z-index: 7;
  width: 56px; height: 56px; border-radius: 10px; overflow: hidden;
  background: #FFF; border: 1.5px solid var(--turquoise);
  box-shadow: 0 6px 18px rgba(0, 41, 63, .3);
  pointer-events: none;
}
.fantome img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Pause visible pendant un tour de l'agent ---------- */

.telephone.en-tour .ajout button { opacity: .35; pointer-events: none; }
.telephone.en-tour .reglette-volet button { opacity: .35; pointer-events: none; }
.telephone.en-tour .confirmation-retrait button { opacity: .35; pointer-events: none; }
.telephone.en-tour .champ,
.telephone.en-tour .bouton-principal,
.telephone.en-tour .bouton-corbeille { opacity: .45; pointer-events: none; }
.telephone.en-tour .bouton-valider { opacity: .4; pointer-events: none; }

/* ---------- L'agent écrit ---------- */

.tape { display: flex; gap: 4px; padding: 5px 2px; }
.tape i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #9FB4BF;
  animation: tape 1s infinite ease-in-out;
}
.tape i:nth-child(2) { animation-delay: .15s; }
.tape i:nth-child(3) { animation-delay: .3s; }
@keyframes tape {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .rond-coche { transform: scale(1); opacity: 1; }
  .trace-coche { stroke-dashoffset: 0; }
}
