/* AyoPlus - Cart page. Requires ayo-base.css.
   Split out of the former single cart.css; edit here, not there. */

/* Collapse the archive furniture the shop/cart page collision drags in, so the
   cart starts near the header instead of a screen and a half below it. */
body.ayo-cart-page .woocommerce-breadcrumb,
body.ayo-cart-page .woocommerce-products-header__title,
body.ayo-cart-page .ast-archive-description {
  display: none;
}

body.ayo-cart-page .woocommerce-products-header,
body.ayo-cart-page .page-description {
  margin: 0;
  padding: 0;
}

body.ayo-cart-page .site-content > .ast-container {
  padding-top: 18px;
}
body.ayo-cart-page .ast-woocommerce-container {
  padding-top: 0;
}
body.ayo-cart-page .entry-content > :first-child {
  margin-top: 0;
}

.ayo-step-line {
  flex: 0 1 220px;
  height: 1px;
  background: var(--ayo-line);
}
.ayo-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.ayo-step-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ayo-red);
  color: #fff;
  font-size: 22px;
}
.ayo-step-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ayo-red);
}

/* ---------- header ---------- */
.ayo-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ayo-red);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
}
.ayo-back-link:hover {
  color: var(--ayo-red-dark);
}
.ayo-back-link svg {
  width: 18px;
  height: 18px;
}

.ayo-cart-title {
  margin: 14px 0 18px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ayo-cart-title span {
  font-size: 20px;
  font-weight: 500;
  color: var(--ayo-muted);
}

.ayo-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
  color: #1e3a5f;
}
.ayo-notice-icon {
  color: #3b82f6;
  font-size: 20px;
  flex: 0 0 auto;
}

/* ---------- layout ---------- */
.ayo-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
  align-items: start;
}
.ayo-cart-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* ---------- line items ---------- */
.ayo-item {
  background: #fff;
  border: 1px solid var(--ayo-line);
  border-radius: var(--ayo-card-radius);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 165px;
  box-shadow: 0 2px 8px rgba(20, 35, 60, 0.02);
}

.ayo-item-media img {
  width: 125px;
  height: 125px;
  object-fit: contain;
  border-radius: 12px;
  background: #fafafa;
  display: block;
}
.ayo-item-body {
  min-width: 0;
}

.ayo-item-title {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;

  /* Imported AliExpress titles are very long: show at most 3 lines and let
       the title attribute carry the full name on hover. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  cursor: help;
}
.ayo-item-title a {
  color: inherit;
  text-decoration: none;
}
.ayo-item-title a:hover {
  color: var(--ayo-red);
}

.ayo-item-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.ayo-item-meta li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ayo-muted);
  font-size: 13px;
}
.ayo-item-meta svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

/* Remove link and stepper share one row; neither may grow or wrap. */
.ayo-item-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}
.ayo-item-actions .ayo-item-remove,
.ayo-item-actions .ayo-qty {
  flex: 0 0 auto;
  width: auto;
}
.ayo-item-remove {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ayo-red);
  font-weight: 650;
  text-decoration: none;
  font-size: 13px;
}
.ayo-item-remove:hover {
  color: var(--ayo-red-dark);
}
.ayo-item-remove svg {
  width: 15px;
  height: 15px;
}

.ayo-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  overflow: hidden;
  height: 28px;
  line-height: 1;
}
/* Compound selectors on purpose: the theme styles bare button / input[type]
   elements, which outranks a lone class and stretched this control full-width. */
.ayo-qty button.ayo-qty-btn {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #26344d;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}
.ayo-qty button.ayo-qty-btn:hover {
  background: #f5f7fa;
  color: var(--ayo-red);
}
.ayo-qty-btn:hover {
  background: #f7f8fa;
}
.ayo-qty input.ayo-qty-input {
  flex: 0 0 34px;
  width: 34px;
  min-width: 0;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  border-left: 1px solid #dfe4eb;
  border-right: 1px solid #dfe4eb;
  border-radius: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 28px;
  background: #fff;
  box-shadow: none;
  -moz-appearance: textfield;
}
.ayo-qty input.ayo-qty-input:focus {
  outline: 0;
  box-shadow: none;
}
.ayo-qty-input::-webkit-outer-spin-button,
.ayo-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ayo-item-price {
  font-size: 18px;
  font-weight: 750;
  white-space: nowrap;
  align-self: start;
  padding-top: 3px;
}

/* The stepper submits the form, so the fallback button is only for no-JS. */
.ayo-update-cart {
  margin-top: 6px;
  background: #fff;
  border: 1px solid var(--ayo-line);
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
}
.ayo-cart-form.is-js .ayo-update-cart {
  display: none;
}

/* ---------- coupon ---------- */
.ayo-coupon {
  margin-top: 18px;
  border: 1px solid var(--ayo-line);
  border-radius: var(--ayo-card-radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--ayo-shadow, 0 8px 28px rgba(20, 35, 60, 0.06));
  background: #fff;
}
.ayo-coupon-content {
  flex: 1;
  min-width: 0;
}
.ayo-coupon-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.ayo-coupon-text {
  color: var(--ayo-muted);
  font-size: 12px;
}
.ayo-coupon-icon {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #fff1f1;
  display: grid;
  place-items: center;
  color: var(--ayo-red);
  font-size: 20px;
}

.ayo-coupon-form {
  display: flex;
  width: 360px;
  max-width: 100%;
}
.ayo-coupon-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid #dfe4eb;
  border-right: 0;
  border-radius: 9px 0 0 9px;
  padding: 0 13px;
  outline: none;
}
.ayo-coupon-input:focus {
  outline: 2px solid #fecaca;
  border-color: var(--ayo-red);
}
.ayo-btn-outline {
  height: 39px;
  padding: 0 22px;
  border: 0;
  border-radius: 0 9px 9px 0;
  background: var(--ayo-red);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  font-size: 16px;
}
.ayo-btn-outline:hover {
  background: var(--ayo-red-dark);
}

/* ---------- trust badges ---------- */
.ayo-trust {
  margin-top: 18px;
  border: 1px solid var(--ayo-line);
  border-radius: var(--ayo-card-radius);
  padding: 20px 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  background: #fff;
}
.ayo-trust-item {
  text-align: left;
}
.ayo-trust-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  margin-bottom: 9px;
  font-size: 17px;
  padding: 13px;
}
.ayo-trust-icon.is-blue {
  background: #eff6ff;
  color: #3b82f6;
}
.ayo-trust-icon.is-green {
  background: #f0fdf4;
  color: #16a34a;
}
.ayo-trust-icon.is-purple {
  background: #f5f3ff;
  color: #8b5cf6;
}
.ayo-trust-icon.is-amber {
  background: #fffbeb;
  color: #f59e0b;
}
.ayo-trust-item strong {
  display: block;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
}
.ayo-trust-item span {
  color: var(--ayo-muted);
  font-size: 11px;
  line-height: 1.5;
  margin-top: 5px;
  display: block;
}

/* ---------- summary ---------- */
.ayo-cart-side {
  position: sticky;
  top: 20px;
}
.ayo-summary {
  padding: 24px;
  box-shadow: 0 8px 28px rgba(20, 35, 60, 0.06);
}
.ayo-summary-title {
  margin: 0 0 22px;
  font-size: 18px;
  font-weight: 700;
}

.ayo-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  font-size: 15px;
  margin: 15px 0 6px 0;
  padding: 0;
}
.ayo-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #344054;
}
.ayo-summary-value {
  font-weight: 700;
  white-space: nowrap;
}

.ayo-info {
  color: #98a2b3;
  cursor: help;
  font-size: 16px;
}
.ayo-info svg {
  width: 16px;
  height: 16px;
}

.ayo-summary-note {
  display: grid;
  gap: 2px;
  color: var(--ayo-muted);
  font-size: 13.5px;
  line-height: 1.45;
  margin: -8px 0 0;
}

.ayo-summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ayo-line);
  margin-top: 18px;
  padding-top: 18px;
  font-size: 20px;
  font-weight: 750;
}
.ayo-summary-total strong {
  color: var(--ayo-red);
  font-size: 27px;
  font-weight: 800;
}
.ayo-summary-total .amount {
  color: var(--ayo-red);
}

.ayo-summary-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: #16a34a;
  font-size: 13px;
}
.ayo-summary-badge svg {
  width: 17px;
  height: 17px;
}

.ayo-delivery {
  background: #effbf3;
  border: 1px solid #d7f3df;
  border-radius: 12px;
  padding: 14px;
  margin: 18px 0;
  color: #16713b;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ayo-delivery-icon {
  color: #16a34a;
  font-size: 22px;
  flex: 0 0 auto;
}
.ayo-delivery strong {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: #16713b;
}
.ayo-delivery span {
  font-size: 12px;
  margin-top: 4px;
  color: #16713b;
}

.ayo-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  border-radius: 11px;
  background: var(--ayo-red);
  color: #fff !important;
  font-size: 16px;
  font-weight: 750;
  text-decoration: none;
  transition: 0.2s;
}
.ayo-checkout-btn:hover {
  background: var(--ayo-red-dark);
  transform: translateY(-1px);
}
.ayo-checkout-btn svg {
  width: 19px;
  height: 19px;
}

.ayo-checkout-note {
  color: var(--ayo-muted);
  font-size: 11px;
  text-align: center;
  margin: 11px 0 18px;
}

/* ---------- empty state ---------- */
.ayo-empty {
  text-align: center;
  padding: 56px 24px;
}
.ayo-empty-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #fef2f2;
  color: var(--ayo-red);
  font-size: 32px;
}
.ayo-empty h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
}
.ayo-empty p {
  margin: 0 0 22px;
  color: var(--ayo-muted);
}
.ayo-empty .ayo-checkout-btn {
  max-width: 320px;
  margin: 0 auto;
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .ayo-cart-layout {
    grid-template-columns: 1fr;
  }
  .ayo-cart-side {
    position: static;
  }
}
@media (max-width: 720px) {
  .ayo-cart {
    padding: 8px 14px 40px;
  }
  .ayo-cart-title {
    font-size: 27px;
  }
  .ayo-item {
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 16px;
    gap: 14px;
  }
  .ayo-item-price {
    grid-column: 2;
  }
  .ayo-item-actions {
    gap: 14px;
  }
  .ayo-item-line-total {
    width: 100%;
    margin-left: 0;
    text-align: right;
  }
  .ayo-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ayo-step-line {
    flex: 1 1 auto;
  }
}

/* ---------- détail du fret ---------- */

/* Replié par défaut : le client qui veut seulement le montant ne le voit pas,
   celui qui conteste la facture le déplie. <details> fait cela sans une ligne
   de JavaScript, et reste ouvrable au clavier. */
.ayo-fret-detail {
  margin: 8px 0 0;
  border: 1px solid var(--ayo-line);
  border-radius: 10px;
  background: #fbfcfd;
  font-size: 13px;
}

.ayo-fret-detail > summary {
  padding: 9px 12px;
  color: var(--ayo-muted);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

/* La flèche par défaut diffère d'un navigateur à l'autre - triangle sur
   Chrome, chevron sur Safari - et se place mal. Elle est remplacée par un
   chevron dessiné, qui pivote à l'ouverture. */
.ayo-fret-detail > summary::-webkit-details-marker { display: none; }

.ayo-fret-detail > summary::after {
  content: "";
  float: right;
  width: 7px;
  height: 7px;
  margin: 4px 2px 0 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.ayo-fret-detail[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: 7px;
}

.ayo-fret-detail > summary:hover { color: var(--ayo-ink); }

.ayo-fret-detail__liste {
  margin: 0;
  padding: 0 12px 4px;
  list-style: none;
}

.ayo-fret-detail__ligne {
  padding: 9px 0;
  border-top: 1px solid var(--ayo-line);
}

.ayo-fret-detail__titre {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ayo-ink);
  font-weight: 600;
}

.ayo-fret-detail__montant { white-space: nowrap; }

/* Chaque étape du calcul sur sa propre ligne : un téléphone et une tablette
   dans le même panier en produisent une chacun. */
.ayo-fret-detail__calcul {
  display: block;
  margin-top: 3px;
  color: var(--ayo-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.ayo-fret-detail__taux {
  margin: 0;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--ayo-line);
  color: var(--ayo-muted);
  font-size: 12px;
}

/* ---------- note de réassurance, sous le récapitulatif ---------- */
.ayo-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: #6d7889;
  font-size: 12px;
  margin: 18px 0 0;
}
.ayo-secure-note svg {
  width: 14px;
  height: 14px;
}

/* ---------- vider le panier ---------- */
.ayo-cart-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}
.ayo-cart-tools .ayo-empty-cart {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--ayo-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ayo-muted) !important;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.ayo-cart-tools .ayo-empty-cart:hover {
  border-color: var(--ayo-red);
  background: #fff5f5;
  color: var(--ayo-red) !important;
}
.ayo-cart-tools .ayo-empty-cart:focus-visible {
  outline: 2px solid var(--ayo-red);
  outline-offset: 2px;
}
.ayo-cart-tools .ayo-empty-cart svg {
  width: 15px;
  height: 15px;
}

/* ---------- la confirmation ----------
   Le <dialog> ne fait plus que placer : sans fond ni bordure, il laisse le clic
   à côté de la boîte atteindre le voile, et la boîte s'anime seule. */
.ayo-modal {
  width: min(440px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ayo-ink);
  overflow: visible;
}
.ayo-modal::backdrop {
  background: rgba(16, 24, 40, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.ayo-modal-box {
  position: relative;
  padding: 32px 28px 26px;
  border-radius: 20px;
  background: #fff;
  text-align: center;
  /* Une ombre portée longue et un liseré très clair : la boîte se détache du
     voile flouté sans qu'une bordure franche vienne la durcir. */
  box-shadow:
    0 32px 64px -24px rgba(16, 24, 40, 0.45),
    0 0 0 1px rgba(16, 24, 40, 0.04);
}

.ayo-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--ayo-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
/* Le thème peint tous les <button> en rouge, et plus fort encore au survol et
   au focus (« button:hover », « button:focus », qui l'emportent sur une simple
   classe). Les états de la croix et des deux actions sont donc écrits sous
   .ayo-cart : deux classes battent un élément suivi d'une pseudo-classe, et la
   fenêtre garde ses couleurs. */
.ayo-cart .ayo-modal-close:hover,
.ayo-cart .ayo-modal-close:focus {
  background: #f2f4f7;
  border-color: transparent;
  color: var(--ayo-ink);
}
.ayo-cart .ayo-modal-close:focus-visible {
  outline: 2px solid var(--ayo-red);
  outline-offset: 2px;
}
.ayo-modal-close svg {
  width: 16px;
  height: 16px;
}

/* La pastille dit la couleur de l'action avant même qu'on lise le titre. */
.ayo-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffeceb;
  color: var(--ayo-red);
  box-shadow: 0 0 0 8px #fff5f4;
}
.ayo-modal-icon svg {
  width: 24px;
  height: 24px;
}

.ayo-modal-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.ayo-modal-text {
  margin: 0 0 24px;
  color: var(--ayo-muted);
  font-size: 14px;
  line-height: 1.55;
}

.ayo-modal-actions {
  display: flex;
  gap: 10px;
}
.ayo-modal-actions > * {
  flex: 1 1 0;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  padding: 10px 7px !important;
}
.ayo-modal-actions > *:active {
  transform: translateY(1px);
}
.ayo-modal-actions > *:focus-visible {
  outline: 2px solid var(--ayo-red);
  outline-offset: 2px;
}
.ayo-modal-actions svg {
  width: 16px;
  height: 16px;
}
/* « Annuler » reçoit le focus à l'ouverture : sans ses trois états écrits, le
   thème le repeint en rouge à l'instant même où la fenêtre s'affiche - deux
   boutons rouges côte à côte, dont un qui ne fait rien. */
.ayo-cart .ayo-modal-cancel,
.ayo-cart .ayo-modal-cancel:hover,
.ayo-cart .ayo-modal-cancel:focus {
  border: 1px solid var(--ayo-line);
  background: #fff !important;
  color: #46536b;
}
.ayo-cart .ayo-modal-cancel:hover,
.ayo-cart .ayo-modal-cancel:focus {
  border-color: #dbe1e9;
  background: #f6f7f9;
  color: var(--ayo-ink);
}
.ayo-cart .ayo-modal-confirm,
.ayo-cart .ayo-modal-confirm:hover,
.ayo-cart .ayo-modal-confirm:focus {
  border: 0;
  background: var(--ayo-red);
  color: #fff !important;
  box-shadow: 0 10px 20px -10px rgba(238, 49, 36, 0.9);
}
.ayo-cart .ayo-modal-confirm:hover,
.ayo-cart .ayo-modal-confirm:focus {
  background: var(--ayo-red-dark);
  box-shadow: 0 12px 22px -10px rgba(208, 38, 26, 0.95);
}

/* L'ouverture et la fermeture : la boîte monte et s'efface, le voile suit.
   La classe is-closing est posée par cart.js, qui attend la fin de l'animation
   avant d'appeler close() - sans elle, la fenêtre disparaîtrait d'un coup. */
.ayo-modal[open] .ayo-modal-box {
  animation: ayo-modal-in 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.ayo-modal[open]::backdrop {
  animation: ayo-backdrop-in 0.2s ease-out;
}
.ayo-modal.is-closing .ayo-modal-box {
  animation: ayo-modal-out 0.16s ease-in forwards;
}
.ayo-modal.is-closing::backdrop {
  animation: ayo-backdrop-out 0.16s ease-in forwards;
}
@keyframes ayo-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ayo-modal-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}
@keyframes ayo-backdrop-in {
  from {
    opacity: 0;
  }
}
@keyframes ayo-backdrop-out {
  to {
    opacity: 0;
  }
}

/* Sur un téléphone la fenêtre devient une feuille : elle remonte du bas, où le
   pouce se trouve déjà, et ses deux actions se rangent l'une sous l'autre -
   la rouge en premier, comme sur les feuilles du système. */
@media (max-width: 520px) {
  .ayo-modal {
    width: 100%;
    max-width: none;
    margin: auto auto 0;
  }
  .ayo-modal-box {
    padding: 28px 20px calc(22px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
  }
  .ayo-modal-actions {
    flex-direction: column-reverse;
  }
  .ayo-modal[open] .ayo-modal-box {
    animation-name: ayo-sheet-in;
  }
  .ayo-modal.is-closing .ayo-modal-box {
    animation-name: ayo-sheet-out;
  }
  @keyframes ayo-sheet-in {
    from {
      transform: translateY(100%);
    }
    to {
      transform: none;
    }
  }
  @keyframes ayo-sheet-out {
    to {
      transform: translateY(100%);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .ayo-modal[open] .ayo-modal-box,
  .ayo-modal[open]::backdrop,
  .ayo-modal.is-closing .ayo-modal-box,
  .ayo-modal.is-closing::backdrop {
    animation: none;
  }
}
