/* =========================================================
   TiraMaison — Composants réutilisables
   ========================================================= */

/* ---------- Boutons ---------- */
.tm-btn {
  --h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: var(--h);
  padding: 0 26px;
  border-radius: var(--tm-r-sm);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: center;
  border: 2px solid transparent;
  transition: background var(--tm-t), color var(--tm-t), border-color var(--tm-t), transform var(--tm-t), box-shadow var(--tm-t);
}
.tm-btn svg { width: 19px; height: 19px; flex: none; }
.tm-btn:active { transform: translateY(1px); }
.tm-btn[disabled], .tm-btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.tm-btn--primary { background: var(--tm-yellow); color: var(--tm-ink); }
.tm-btn--primary:hover { background: var(--tm-yellow-600); }

.tm-btn--dark { background: var(--tm-ink); color: var(--tm-white); }
.tm-btn--dark:hover { background: var(--tm-ink-700); }

.tm-btn--ghost {
  background: transparent;
  color: var(--tm-ink);
  border-color: var(--tm-line-strong);
}
.tm-btn--ghost:hover { border-color: var(--tm-ink); }

.tm-btn--ghost-light {
  background: transparent;
  color: var(--tm-white);
  border-color: rgba(255, 255, 255, 0.35);
}
.tm-btn--ghost-light:hover { border-color: var(--tm-white); background: rgba(255, 255, 255, 0.08); }

.tm-btn--sm { --h: 34px; padding: 0 16px; font-size: 15px; gap: 8px; }
.tm-btn--md { --h: 40px; padding: 0 20px; font-size: 15px; gap: 10px; }
.tm-btn--md svg { width: 17px; height: 17px; }
.tm-btn--sm svg { width: 16px; height: 16px; }
.tm-btn--lg { --h: 56px; padding: 0 32px; font-size: 18px; }
.tm-btn--block { width: 100%; }

/* Lien souligné avec flèche (maquette) */
.tm-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  color: inherit;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
  transition: gap var(--tm-t), opacity var(--tm-t);
}
.tm-link:hover { gap: 14px; }
.tm-link svg { width: 16px; height: 16px; }
.tm-link--muted { color: var(--tm-muted); }

/* ---------- Sur-titre / eyebrow ---------- */
.tm-eyebrow {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(16px, 1.41vw, 18px);
  line-height: 1.25;
  letter-spacing: 0.045em;
  color: rgba(255, 255, 255, 0.86);
}
.tm-eyebrow--ink { color: var(--tm-muted); }

.tm-kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--tm-muted);
}

/* ---------- Badges / puces ---------- */
.tm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--tm-r-pill);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--tm-yellow-soft);
  color: var(--tm-ink);
  white-space: nowrap;
}
.tm-badge--yellow { background: var(--tm-yellow); }
.tm-badge--dark { background: var(--tm-ink); color: var(--tm-white); }
.tm-badge--ok { background: var(--tm-success-bg); color: var(--tm-success); }
.tm-badge--warn { background: #fdf1dc; color: #8a5a08; }
.tm-badge--off { background: #f0eee9; color: var(--tm-muted); }
.tm-badge--demo {
  background: repeating-linear-gradient(-45deg, #fdf3de, #fdf3de 6px, #fbe9c4 6px, #fbe9c4 12px);
  color: #7a5a0a;
  border: 1px solid #f0dcae;
}

/* ---------- Cartes ---------- */
.tm-card {
  background: var(--tm-white);
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-r);
  box-shadow: var(--tm-shadow-xs);
}
.tm-card--pad { padding: clamp(20px, 2vw, 28px); }
.tm-card--soft { background: var(--tm-yellow-soft); border-color: #f1e4c8; }

/* ---------- Carte produit (référence maquette) ---------- */
/*
 * Grille produits.
 *
 * La gamme compte cinq parfums : `auto-fit` les place sur une seule ligne dès
 * qu'ils tiennent (environ 1 100 px), puis retombe naturellement à 4, 3 puis
 * 2 colonnes. On évite ainsi la cinquième carte esseulée sur sa propre ligne,
 * sans figer un nombre de colonnes qui vieillirait au prochain parfum.
 */
.tm-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.tm-product {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--tm-white);
  border-radius: var(--tm-r);
  overflow: hidden;
  box-shadow: var(--tm-shadow-xs);
  transition: box-shadow var(--tm-t), transform var(--tm-t);
}
.tm-product:hover { box-shadow: var(--tm-shadow-md); transform: translateY(-3px); }

.tm-product__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #f4efe7;
  overflow: hidden;
}
.tm-product__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 380ms cubic-bezier(0.4, 0, 0.2, 1);
}
.tm-product:hover .tm-product__media img { transform: scale(1.035); }

.tm-product__flags {
  position: absolute;
  top: 10px; left: 10px;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}

.tm-product__body {
  padding: 10px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.tm-product__name {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tm-product__name a::after { content: ""; position: absolute; inset: 0; }
.tm-product__meta {
  font-size: 14px;
  line-height: 1.2;
  color: var(--tm-muted);
  display: flex; align-items: center; gap: 7px;
}
.tm-product__meta b { color: var(--tm-ink); font-weight: 700; }
.tm-product__cta { margin-top: 6px; position: relative; z-index: 1; }
.tm-product.is-out .tm-product__media img { filter: grayscale(0.75); opacity: 0.6; }

/* ---------- Bande « comment ça marche » ---------- */
.tm-steps {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tm-step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px clamp(8px, 2vw, 28px);
  font-size: clamp(16px, 1.41vw, 18px);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.tm-step + .tm-step { border-left: 1px solid var(--tm-line-strong); }
.tm-step svg { width: 30px; height: 30px; flex: none; }

/* ---------- Vérification de zone ---------- */
.tm-zipbar { background: var(--tm-cream-2); border-bottom: 1px solid var(--tm-line); }
.tm-zipbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-block: 12px;
  min-height: 74px;
  flex-wrap: wrap;
}
.tm-zipbar__label {
  display: inline-flex; align-items: center; gap: 11px;
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
}
.tm-zipbar__label svg { width: 21px; height: 21px; }
.tm-zipform { display: flex; align-items: center; gap: 8px; }
.tm-zipform .tm-input { width: 230px; min-height: 36px; padding-block: 6px; }
.tm-zipform .tm-btn { --h: 36px; padding-inline: 22px; font-size: 15px; }
.tm-zip-result { width: 100%; display: flex; justify-content: center; }

/* ---------- Formulaires ---------- */
.tm-field { display: grid; gap: 7px; }
.tm-field__label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tm-field__hint { font-size: 13px; color: var(--tm-muted); }

.tm-input,
.tm-select,
.tm-textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 15px;
  background: var(--tm-white);
  border: 1px solid var(--tm-line-strong);
  border-radius: var(--tm-r-sm);
  font-size: 16px;
  color: var(--tm-ink);
  transition: border-color var(--tm-t), box-shadow var(--tm-t);
}
.tm-textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.tm-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
  padding-right: 40px;
}
.tm-input::placeholder, .tm-textarea::placeholder { color: #9d978d; }
.tm-input:focus, .tm-select:focus, .tm-textarea:focus {
  outline: none;
  border-color: var(--tm-ink);
  box-shadow: var(--tm-ring);
}
.tm-input[aria-invalid="true"],
.tm-select[aria-invalid="true"],
.tm-textarea[aria-invalid="true"] { border-color: var(--tm-danger); }

.tm-field__error {
  font-size: 13px;
  font-weight: 600;
  color: var(--tm-danger);
  display: none;
}
.tm-field.is-invalid .tm-field__error { display: block; }

.tm-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14.5px;
  line-height: 1.45;
  cursor: pointer;
}
.tm-check input {
  width: 20px; height: 20px;
  margin-top: 1px;
  flex: none;
  accent-color: var(--tm-ink);
  cursor: pointer;
}
.tm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.tm-form-grid .tm-col-2 { grid-column: 1 / -1; }

/* ---------- Sélecteur de quantité ---------- */
.tm-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--tm-line-strong);
  border-radius: var(--tm-r-sm);
  background: var(--tm-white);
  overflow: hidden;
}
.tm-qty button {
  width: 42px; height: 44px;
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 19px;
  font-weight: 700;
  color: var(--tm-ink);
  transition: background var(--tm-t);
}
.tm-qty button:hover { background: var(--tm-cream-2); }
.tm-qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.tm-qty input {
  width: 46px;
  height: 44px;
  border: 0;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: transparent;
  -moz-appearance: textfield;
}
.tm-qty input::-webkit-outer-spin-button,
.tm-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tm-qty input:focus { outline: none; }

/* ---------- Accordéon ---------- */
.tm-acc { border-top: 1px solid var(--tm-line); }
.tm-acc__item { border-bottom: 1px solid var(--tm-line); }
.tm-acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4px;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  cursor: pointer;
}
.tm-acc__btn svg {
  width: 20px; height: 20px; flex: none;
  transition: transform var(--tm-t);
}
.tm-acc__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.tm-acc__panel { display: none; padding: 0 4px 22px; max-width: 78ch; color: var(--tm-muted); }
.tm-acc__panel.is-open { display: block; }
.tm-acc__panel p + p { margin-top: 12px; }
.tm-acc__panel a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; color: var(--tm-ink); }

/* ---------- Message / alerte ---------- */
.tm-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 16px;
  border-radius: var(--tm-r-sm);
  font-size: 14.5px;
  line-height: 1.45;
  background: var(--tm-yellow-soft);
  border: 1px solid #f0e2c1;
}
.tm-note svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.tm-note--ok { background: var(--tm-success-bg); border-color: #c3e3ce; color: #135c34; }
.tm-note--bad { background: var(--tm-danger-bg); border-color: #f2c9c2; color: #8f2413; }
.tm-note--info { background: var(--tm-info-bg); border-color: #cadcf7; color: var(--tm-info); }
.tm-note--demo {
  background: #fbf6ec;
  border: 1px dashed #d9c9a4;
  color: #6d5a2c;
}

/* ---------- Progression livraison offerte ---------- */
.tm-progress { display: grid; gap: 9px; }
.tm-progress__track {
  height: 8px;
  border-radius: var(--tm-r-pill);
  background: #ece5d6;
  overflow: hidden;
}
.tm-progress__bar {
  height: 100%;
  border-radius: inherit;
  background: var(--tm-yellow);
  transition: width 320ms cubic-bezier(0.4, 0, 0.2, 1);
}
.tm-progress__bar.is-done { background: var(--tm-success); }
.tm-progress__text { font-size: 14px; font-weight: 600; }
.tm-progress__text b { color: var(--tm-ink); }

/* ---------- Toast ---------- */
.tm-toasts {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: var(--tm-z-toast);
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}
.tm-toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--tm-ink);
  color: var(--tm-white);
  border-radius: var(--tm-r);
  box-shadow: var(--tm-shadow-lg);
  font-size: 14.5px;
  font-weight: 600;
  pointer-events: auto;
  animation: tm-toast-in 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
.tm-toast svg { width: 20px; height: 20px; color: var(--tm-yellow); flex: none; }
.tm-toast.is-out { animation: tm-toast-out 200ms ease forwards; }
@keyframes tm-toast-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes tm-toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ---------- Tableaux ---------- */
.tm-table-wrap { overflow-x: auto; border-radius: var(--tm-r); border: 1px solid var(--tm-line); background: var(--tm-white); }
.tm-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.tm-table th, .tm-table td { padding: 13px 16px; text-align: left; }
.tm-table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--tm-muted);
  background: var(--tm-cream);
  border-bottom: 1px solid var(--tm-line);
  white-space: nowrap;
}
.tm-table tbody tr + tr td { border-top: 1px solid var(--tm-line); }
.tm-table tbody tr:hover td { background: #fcfaf5; }
.tm-table td.tm-num { text-align: right; font-variant-numeric: tabular-nums; }
.tm-table th.tm-num { text-align: right; }

/* ---------- État vide ---------- */
.tm-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding: clamp(40px, 6vw, 72px) 24px;
  background: var(--tm-white);
  border: 1px dashed var(--tm-line-strong);
  border-radius: var(--tm-r-lg);
}
.tm-empty svg { width: 46px; height: 46px; color: var(--tm-line-strong); }
.tm-empty h3 { font-size: 20px; }
.tm-empty p { color: var(--tm-muted); max-width: 46ch; }

/* ---------- Fil d'ariane ---------- */
.tm-crumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--tm-muted);
  padding-block: 18px 0;
}
.tm-crumbs a:hover { color: var(--tm-ink); text-decoration: underline; text-underline-offset: 3px; }
.tm-crumbs [aria-current] { color: var(--tm-ink); font-weight: 600; }

/* ---------- Responsive composants ---------- */
@media (max-width: 1100px) {
  .tm-products { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
@media (max-width: 860px) {
  .tm-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .tm-steps { flex-direction: column; align-items: stretch; }
  .tm-step { justify-content: flex-start; padding: 15px 4px; }
  .tm-step + .tm-step { border-left: 0; border-top: 1px solid var(--tm-line-strong); }
  .tm-form-grid { grid-template-columns: minmax(0, 1fr); }
  .tm-section__head { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 560px) {
  .tm-zipbar__inner { justify-content: flex-start; }
  .tm-zipform { width: 100%; }
  .tm-zipform .tm-input { width: auto; flex: 1; min-height: 48px; }
  .tm-zipform .tm-btn { --h: 48px; }
  .tm-toasts { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

/* =========================================================
   Carrousel produits — version mobile de la maquette
   (défilement horizontal avec accroche + pastilles)
   ========================================================= */
.tm-carousel { position: relative; }
.tm-carousel__dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.tm-carousel__dots button {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #ded6c6;
  cursor: pointer;
  padding: 0;
  transition: background var(--tm-t), transform var(--tm-t);
}
.tm-carousel__dots button[aria-current="true"] { background: var(--tm-yellow); transform: scale(1.15); }

@media (max-width: 700px) {
  .tm-carousel .tm-products {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--tm-gutter);
    margin-inline: calc(var(--tm-gutter) * -1);
    padding: 2px var(--tm-gutter) 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .tm-carousel .tm-products::-webkit-scrollbar { display: none; }
  .tm-carousel .tm-product {
    flex: 0 0 46.5%;
    scroll-snap-align: start;
  }
  .tm-carousel .tm-product:hover { transform: none; }
  .tm-carousel__dots { display: flex; }
}

/* =========================================================
   Suggestions de boisson (cross-sell)
   ---------------------------------------------------------
   Trois emplacements, un seul composant : accueil, retour
   d'ajout et panier. La suggestion reste une ligne de plus,
   jamais un passage obligé.
   ========================================================= */
.tm-drinks {
  background: var(--tm-white);
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-r-lg);
  padding: clamp(18px, 2vw, 26px);
}
.tm-drinks--compact { padding: 15px; border-radius: var(--tm-r); background: var(--tm-cream); }

.tm-drinks__head h3 {
  font-family: var(--tm-font-display);
  font-weight: 800;
  font-size: clamp(19px, 2vw, 24px);
  letter-spacing: -0.02em;
}
.tm-drinks--compact .tm-drinks__head h3 { font-size: 16.5px; }
.tm-drinks__head p { color: var(--tm-muted); font-size: 14.5px; margin-top: 5px; }
.tm-drinks--compact .tm-drinks__head p { font-size: 13px; }

.tm-drinks__list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.tm-drinks--compact .tm-drinks__list { margin-top: 12px; gap: 8px; grid-template-columns: 1fr; }

/*
 * Dans le retour d'ajout, la place est comptée : la carte passe en ligne
 * pour que le bouton « Commander » reste visible sans faire défiler.
 */
.tm-drinks--compact .tm-drink {
  grid-template-rows: none;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
}
.tm-drinks--compact .tm-drink__media { aspect-ratio: 1; width: 52px; }
.tm-drinks--compact .tm-drink__ph svg { width: 26px; height: 26px; }
.tm-drinks--compact .tm-drink__add { width: auto; }

.tm-drink {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-r);
  background: var(--tm-white);
}
.tm-drink__media {
  aspect-ratio: 1;
  border-radius: var(--tm-r-sm);
  background: var(--tm-cream-2);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.tm-drink__media img { width: 100%; height: 100%; object-fit: contain; }
.tm-drink__ph { color: var(--tm-muted-2); }
.tm-drink__ph svg { width: 38px; height: 38px; }
.tm-drink__name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; line-height: 1.2; }
.tm-drink__meta { font-size: 13px; color: var(--tm-muted); margin-top: 2px; }
.tm-drink__meta b { color: var(--tm-ink); }
.tm-drink__add { width: 100%; justify-content: center; }
.tm-drink__add svg { width: 15px; height: 15px; }

/* Confirmation d'ajout, sur le bouton lui-même. */
.tm-btn.is-added { background: var(--tm-success) !important; color: #fff !important; border-color: var(--tm-success) !important; }

/* =========================================================
   Retour d'ajout — panneau court
   ========================================================= */
body.tm-noscroll { overflow: hidden; }

.tm-mini {
  position: fixed;
  inset: 0;
  z-index: var(--tm-z-drawer);
  visibility: hidden;
  pointer-events: none;
}
.tm-mini.is-open { visibility: visible; pointer-events: auto; }

.tm-mini__scrim {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.5);
  opacity: 0;
  transition: opacity var(--tm-t);
}
.tm-mini.is-open .tm-mini__scrim { opacity: 1; }

.tm-mini__panel {
  position: absolute;
  right: 0; bottom: 0;
  width: min(100%, 440px);
  max-height: min(88vh, 88dvh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--tm-white);
  border-radius: var(--tm-r-xl) var(--tm-r-xl) 0 0;
  /* Zone sûre iPhone : le dernier bouton ne passe jamais sous la barre d'accueil. */
  padding: 10px clamp(16px, 4vw, 22px) calc(18px + env(safe-area-inset-bottom));
  transform: translateY(14px);
  opacity: 0;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms;
  display: grid;
  gap: 15px;
  align-content: start;
}
.tm-mini.is-open .tm-mini__panel { transform: translateY(0); opacity: 1; }

@media (min-width: 761px) {
  .tm-mini__panel {
    top: 0; bottom: 0;
    max-height: none;
    border-radius: var(--tm-r-xl) 0 0 var(--tm-r-xl);
    transform: translateX(18px);
    padding-top: 22px;
  }
  .tm-mini.is-open .tm-mini__panel { transform: translateX(0); }
}

.tm-mini__grip {
  width: 40px; height: 4px;
  border-radius: 999px;
  background: var(--tm-line-strong);
  justify-self: center;
}
@media (min-width: 761px) { .tm-mini__grip { display: none; } }

.tm-mini__head { display: flex; align-items: flex-start; gap: 12px; }
.tm-mini__ok {
  flex: 1;
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 15.5px; line-height: 1.35;
}
.tm-mini__ok svg { width: 21px; height: 21px; flex: none; color: var(--tm-success); margin-top: 1px; }
.tm-mini__close {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--tm-cream-2);
  flex: none;
}
.tm-mini__close svg { width: 17px; height: 17px; }

.tm-mini__line {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--tm-cream);
  border-radius: var(--tm-r);
}
.tm-mini__thumb { aspect-ratio: 1; border-radius: var(--tm-r-sm); overflow: hidden; background: var(--tm-cream-2); }
.tm-mini__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tm-mini__name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.tm-mini__meta { font-size: 13px; color: var(--tm-muted); margin-top: 2px; }

.tm-mini__progress { display: grid; gap: 8px; }
.tm-mini__progress p { font-size: 13.5px; color: var(--tm-muted); }
.tm-mini__progress b { color: var(--tm-ink); }

.tm-mini__totals {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 13px;
  border-top: 1px solid var(--tm-line);
  font-size: 15px;
  color: var(--tm-muted);
}
.tm-mini__totals b { font-size: 21px; color: var(--tm-ink); font-weight: 800; letter-spacing: -0.02em; }

.tm-mini__actions { display: grid; gap: 9px; }
.tm-mini__row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

/* =========================================================
   Panier — code promo
   ========================================================= */
.tm-promo { display: grid; gap: 9px; margin-top: 16px; }
.tm-promo__row { display: flex; gap: 8px; }
.tm-promo__row .tm-input { flex: 1; min-width: 0; text-transform: uppercase; }
.tm-promo__applied {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--tm-success-bg);
  color: var(--tm-success);
  border-radius: var(--tm-r-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
}
.tm-promo__applied button { text-decoration: underline; font-size: 13px; color: inherit; }
.tm-promo__error { color: var(--tm-danger); font-size: 13.5px; }
.tm-promo__toggle { font-size: 14px; text-decoration: underline; color: var(--tm-muted); justify-self: start; }

/* Devis en cours / estimation locale : jamais présenté comme vérifié. */
.tm-summary__pending { font-size: 12.5px; color: var(--tm-muted-2); margin-top: 8px; }
.tm-summary__offline {
  font-size: 13px;
  color: #8a5a08;
  background: #fdf1dc;
  border-radius: var(--tm-r-sm);
  padding: 9px 11px;
  margin-top: 10px;
}

/* =========================================================
   Interrupteur
   ---------------------------------------------------------
   Partagé par l'administration ET le site client (réglage de
   mesure d'audience sur /cookies/). La case native est masquée
   mais reste focalisable au clavier ; la piste est la cible.
   ========================================================= */
.tm-switch {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 14px; font-weight: 600;
  flex: none;
}
.tm-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.tm-switch__track {
  width: 50px; height: 30px;
  border-radius: 999px;
  background: #d9d2c4;
  position: relative;
  transition: background var(--tm-t);
  flex: none;
}
.tm-switch__track::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform var(--tm-t);
}
.tm-switch input:checked + .tm-switch__track { background: var(--tm-success); }
.tm-switch input:checked + .tm-switch__track::after { transform: translateX(20px); }
.tm-switch input:focus-visible + .tm-switch__track { box-shadow: var(--tm-ring); }
.tm-switch input:disabled + .tm-switch__track { opacity: 0.5; }

/* =========================================================
   Confort tactile sur téléphone
   ---------------------------------------------------------
   Sur mobile, toute action reste atteignable au pouce sans
   viser : 44 px minimum, y compris pour les actions d'achat
   et les pastilles du carrousel. Le visuel ne change pas,
   c'est la zone sensible qui grandit.
   ========================================================= */
@media (max-width: 760px) {
  /* Le bouton « Ajouter » des cartes produit et boisson est l'action d'achat. */
  .tm-btn--sm { --h: 44px; }
  .tm-btn--md { --h: 46px; }

  .tm-line__del { width: 44px; height: 44px; }
  .tm-promo__toggle { min-height: 44px; display: inline-flex; align-items: center; }

  /* Le point reste petit ; la zone touchée fait 44 px. */
  .tm-carousel__dots { gap: 0; }
  .tm-carousel__dots button {
    width: 44px; height: 44px;
    background: transparent;
    border-radius: 0;
    display: grid; place-items: center;
    transform: none;
  }
  .tm-carousel__dots button::before {
    content: "";
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #ded6c6;
    transition: background var(--tm-t), transform var(--tm-t);
  }
  .tm-carousel__dots button[aria-current="true"] { background: transparent; transform: none; }
  .tm-carousel__dots button[aria-current="true"]::before {
    background: var(--tm-yellow);
    transform: scale(1.15);
  }

  /* Case à cocher des CGV : la ligne entière fait office de cible. */
  .tm-check { min-height: 44px; align-items: center; padding-block: 4px; }
  .tm-check input { width: 24px; height: 24px; margin-top: 0; }

  /* Interrupteurs : la piste visible reste la cible, et elle est confortable. */
  .tm-switch { min-height: 44px; display: inline-flex; align-items: center; }
}

/*
 * Débordement horizontal des formulaires en ligne.
 *
 * Un champ placé dans un conteneur flex garde par défaut `min-width: auto` :
 * il refuse de descendre sous sa largeur intrinsèque (liée à l'attribut
 * `size`), et pousse la ligne au-delà de l'écran. C'est ce qui faisait
 * dépasser la vérification de code postal de 27 px à 390 px de large.
 */
/*
 * Le formulaire est lui-même un élément de grille dans sa carte. Un élément
 * de grille garde `min-width: auto`, c'est-à-dire « au moins ma largeur
 * minimale de contenu » : la colonne s'élargissait donc au-delà de la carte,
 * et la page défilait horizontalement. `min-width: 0` autorise la colonne à
 * suivre la largeur disponible, et le champ à se réduire avec elle.
 */
.tm-zipform { max-width: 100%; min-width: 0; }
.tm-zipform .tm-input { min-width: 0; }
.tm-zipform .tm-btn { flex: none; }

/* Même précaution pour les autres lignes de formulaire en ligne. */
.tm-promo, .tm-promo__row { min-width: 0; }

/* Carte produit sans photo : même cadre neutre que la fiche. */
.tm-product__ph {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  color: var(--tm-muted-2);
  background: repeating-linear-gradient(45deg, #f4efe7, #f4efe7 8px, #ece5d8 8px, #ece5d8 16px);
}
.tm-product__ph svg { width: 40px; height: 40px; }

/*
 * Le badge « LE + COMMANDÉ 🔥 » est nettement plus long que « Best-seller ».
 * Sur une carte étroite (cinq colonnes à 1440 px), il doit rester entier :
 * on le laisse se resserrer plutôt que sortir de la vignette.
 */
.tm-product__flags { max-width: calc(100% - 20px); }
.tm-product__flags .tm-badge {
  white-space: nowrap;
  max-width: 100%;
  font-size: clamp(10.5px, 0.78vw, 12.5px);
  padding-inline: clamp(7px, 0.62vw, 10px);
}

/*
 * Cartes produit d'égale hauteur : les descriptions n'ont pas la même
 * longueur, mais les boutons « Je le veux » s'alignent sur une même ligne.
 * L'œil compare les parfums, pas la longueur des textes.
 */
.tm-product__cta { margin-top: auto; padding-top: 10px; }
