/* ================================================================
   HEAR THE LIGHT — Composants partagés (refonte nov. 2026)
   Chargé par toutes les pages refaites, après css/htl.css.
   Contient : tiroir panier (cart.js), modale « Conditions » (#kcond-modal),
   modale de connexion (#auth-modal), bouton + menu compte (#account-ctrl),
   pastilles GOAT / ABEL, bandeau cookies, cartes de commande, toast.
   Règles : jetons htl uniquement (marche sur les 6 palettes), pas de
   repli « mouvement réduit », mobile uniquement dans @media (max-width: 768px).
   ================================================================ */

/* Repère lu par cookie-consent.js : si présent, il n'injecte pas son CSS de secours */
:root { --htl-components: 1; }

@keyframes htl-pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* Petit bouton rond générique des composants (fermer, retirer…) */
.cart-close, .kcond-x, .auth-close {
  width: 40px; height: 40px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%; padding: 0;
  background: transparent; color: var(--fg); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .25s, transform .4s var(--ease-out);
}
.cart-close:hover, .kcond-x:hover, .auth-close:hover { box-shadow: inset 0 0 0 1px var(--fg); transform: rotate(90deg); }
.cart-close svg, .kcond-x svg, .auth-close svg { width: 18px; height: 18px; }

/* ================================================================
   TIROIR PANIER
   ================================================================ */
#cart-overlay {
  position: fixed; inset: 0; z-index: 3999;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .45s var(--ease-out);
}
body.cart-open #cart-overlay { opacity: 1; pointer-events: auto; }
body.cart-open { overflow: hidden; }

#cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 4000;
  width: min(460px, 100vw);
  display: flex; flex-direction: column;
  background: var(--bg-2); color: var(--fg);
  border-left: 1px solid var(--line);
  font-family: var(--font-body);
  transform: translateX(100%);
  transition: transform .6s var(--ease-out);
  overflow: hidden;
}
#cart-drawer.open { transform: none; }
/* Un fil de lumière le long du bord quand le tiroir s'ouvre */
#cart-drawer::before {
  content: ''; position: absolute; left: -1px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--light), var(--light-2), transparent);
  opacity: 0; transition: opacity .8s var(--ease-out) .2s;
}
#cart-drawer.open::before { opacity: 1; }

.cart-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 26px 28px 22px; flex: none;
}
.cart-title {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: 34px; line-height: 1; letter-spacing: -.01em;
  font-variation-settings: 'wdth' 84;
}

#cart-items {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 28px 12px;
  display: flex; flex-direction: column;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}

.cart-empty { margin: auto 0; padding: 32px 0; display: grid; gap: 10px; justify-items: start; }
.cart-empty-title {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: 28px; line-height: 1; font-variation-settings: 'wdth' 90;
}
.cart-empty-txt { margin: 0 0 10px; color: var(--muted); font-size: 15px; }

.cart-item {
  position: relative;
  padding: 20px 0 20px 18px;
  border-top: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 1px solid var(--line); }
.cart-item::before {
  content: ''; position: absolute; left: 0; top: 22px; bottom: 22px; width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--light), var(--light-2));
}
.cart-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.cart-item-txt { display: grid; gap: 4px; min-width: 0; }
.cart-item-name {
  font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.05;
  font-variation-settings: 'wdth' 96;
}
.cart-item-desc { color: var(--muted); font-size: 14px; line-height: 1.45; }
.cart-item-extra { margin-top: 8px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-remove {
  width: 36px; height: 36px; flex: none; margin: -4px -4px 0 0;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%; padding: 0; cursor: pointer;
  background: transparent; color: var(--muted);
  transition: color .25s, box-shadow .25s;
}
.cart-item-remove:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.cart-item-remove svg { width: 16px; height: 16px; }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.cart-item-note { color: var(--muted); font-size: 13px; }
.cart-qty-controls { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line); padding: 3px; }
.cart-qty-btn {
  width: 32px; height: 32px; border: 0; border-radius: 50%; padding: 0; cursor: pointer;
  background: transparent; color: var(--fg); font-size: 16px; line-height: 1;
  transition: background-color .2s;
}
.cart-qty-btn:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); }
.cart-qty-val { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-item-price { font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }

/* Saisie de code promo (optionnelle : seulement si la page a #promo-input) */
.cart-promo { padding: 14px 28px 0; flex: none; }
.cart-promo-row { display: flex; gap: 8px; }
.cart-promo-row input {
  flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--fg); font: inherit; font-size: 14px;
  box-shadow: inset 0 0 0 1px var(--line); outline: none;
}
.cart-promo-row input:focus { box-shadow: inset 0 0 0 1px var(--fg); }
.promo-feedback { margin: 8px 0 0; font-size: 13px; color: var(--muted); min-height: 1em; }
.promo-feedback.ok { color: var(--fg); }

.cart-promonote { margin: 0; padding: 16px 28px 0; font-size: 13px; line-height: 1.5; color: var(--muted); flex: none; }
.cart-promonote strong { color: var(--fg); font-weight: 600; }

.cart-summary { flex: none; padding: 18px 28px 6px; }
.cart-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 15px; color: var(--muted); }
.cart-row > span:last-child { color: var(--fg); font-variant-numeric: tabular-nums; }
.cart-row.discount > span:last-child { color: var(--light); }
.cart-row.total { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--fg); align-items: center; }
.cart-row.total > span:first-child { font-weight: 600; }
.cart-row.total > span:last-child {
  font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1;
  font-variation-settings: 'wdth' 88; letter-spacing: -.01em;
}

.cart-footer { flex: none; padding: 18px 28px 28px; display: grid; gap: 12px; }
.cart-checkout-btn { width: 100%; height: 56px; font-size: 16px; }
.cart-checkout-btn:disabled { opacity: .35; cursor: not-allowed; }
.cart-checkout-btn:disabled::before { display: none; }
.cart-stripe-note { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--muted); }
.cart-stripe-note::before {
  content: ''; width: 12px; height: 12px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ================================================================
   MODALE « CONDITIONS HEAR THE LIGHT » (avant Stripe)
   ================================================================ */
#kcond-modal { position: fixed; inset: 0; z-index: 9500; display: none; align-items: center; justify-content: center; padding: 24px; }
#kcond-modal.open { display: flex; }
.kcond-overlay, .auth-overlay {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.kcond-card {
  position: relative; z-index: 1;
  width: min(640px, 100%); max-height: min(88vh, 820px);
  display: flex; flex-direction: column;
  background: var(--bg-2); color: var(--fg);
  border-radius: var(--r-media);
  padding: 36px 36px 28px;
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 120px -40px rgba(var(--a1), .35);
  animation: htl-pop .5s var(--ease-out);
}
.kcond-x { position: absolute; top: 20px; right: 20px; }
.kcond-title {
  margin: 0 0 18px; padding-right: 56px;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3.2vw, 40px);
  line-height: .95; letter-spacing: -.01em; font-variation-settings: 'wdth' 84;
}
.kcond-body {
  overflow-y: auto; overscroll-behavior: contain;
  color: var(--muted); font-size: 15px; line-height: 1.62;
  padding-right: 8px; margin-right: -8px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.kcond-body p { margin: 0 0 12px; }
.kcond-body strong { color: var(--fg); font-weight: 600; }
.kcond-accept {
  flex: none; width: 100%; height: 56px; margin-top: 20px;
  border: 0; border-radius: var(--r-pill); cursor: pointer;
  background: var(--light); color: var(--on-light);
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  transition: transform .4s var(--ease-out), filter .3s;
}
.kcond-accept:hover { filter: brightness(1.06); }
.kcond-accept:active { transform: scale(.99); }

/* ================================================================
   MODALE DE CONNEXION (auth.js)
   ================================================================ */
body.auth-lock { overflow: hidden; }
#auth-modal { position: fixed; inset: 0; z-index: 7000; display: none; align-items: center; justify-content: center; padding: 24px; }
#auth-modal.open { display: flex; }
.auth-card {
  position: relative; z-index: 1;
  width: min(440px, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--bg-2); color: var(--fg);
  border-radius: var(--r-media);
  padding: 40px 36px 30px;
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 120px -40px rgba(var(--a1), .4);
  animation: htl-pop .5s var(--ease-out);
}
.auth-close { position: absolute; top: 18px; right: 18px; }
.auth-head { margin-bottom: 28px; }
.auth-klogo {
  position: relative; width: 52px; height: 52px; margin: 0 0 26px;
  display: grid; place-items: center; color: var(--light);
  background: none; box-shadow: none; border-radius: 0;
}
.auth-klogo::before {
  content: ''; position: absolute; inset: -18px; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(var(--a1), .32), transparent);
}
.auth-klogo svg { width: 52px; height: 52px; }
.auth-head h3 {
  margin: 0 0 10px; font-family: var(--font-display); font-weight: 800;
  font-size: 44px; line-height: .92; letter-spacing: -.01em; font-variation-settings: 'wdth' 84;
}
.auth-head p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.auth-google {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; height: 56px; padding: 0 22px;
  border: 0; border-radius: var(--r-pill); cursor: pointer;
  background: var(--fg); color: var(--bg);
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  transition: transform .4s var(--ease-out), opacity .3s;
}
.auth-google:hover { transform: translateY(-1px); }
.auth-google:disabled { cursor: progress; }
.auth-google-ic { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.auth-google-ic svg { width: 17px; height: 17px; }
.auth-error {
  display: none; margin: 14px 0 0; padding: 12px 14px;
  border-left: 2px solid var(--light-2); background: rgba(var(--a2), .1);
  color: var(--fg); font-size: 14px; line-height: 1.45;
}
.auth-legal { margin: 22px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

/* ================================================================
   BOUTON + MENU COMPTE (injectés par auth.js dans .nav-right)
   ================================================================ */
#account-ctrl { position: relative; display: inline-flex; }
.account-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 0 12px;
  border: 0; border-radius: var(--r-pill); cursor: pointer;
  background: transparent; color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  transition: box-shadow .25s, background-color .25s;
}
.account-btn:hover { box-shadow: inset 0 0 0 1px var(--fg); }
.account-btn svg { width: 18px; height: 18px; flex: none; }
.account-btn.logged { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.account-btn.logged::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--light); box-shadow: 0 0 10px var(--light);
}
.account-label { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }

.account-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 4001;
  min-width: 250px; padding: 8px;
  background: var(--bg-2); color: var(--fg);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px -30px rgba(var(--a1), .35);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility 0s linear .25s;
}
.account-menu.open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s var(--ease-out), transform .25s var(--ease-out); }
.account-menu-head { padding: 12px 12px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.account-menu-pseudo { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu-email { margin-top: 2px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu-item {
  display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 10px; background: none; cursor: pointer;
  color: var(--fg); font-family: var(--font-body); font-size: 14px; font-weight: 500; text-align: left;
  transition: background-color .2s;
}
.account-menu-item:hover { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.account-menu-item.is-out { color: var(--muted); margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.account-menu-item.is-out:hover { color: var(--fg); }

/* ================================================================
   PASTILLES GOAT / ABEL (débloquées par les quiz des formations)
   Couleurs de médaille fixes (or, cyan) : ce sont des récompenses, pas la marque.
   ================================================================ */
#km-goat, #km-abel {
  position: fixed; top: calc(var(--nav-h, 76px) + 14px); right: var(--gutter, 20px); z-index: 890;
  width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  transition: transform .4s var(--ease-out), right .4s var(--ease-out);
}
#km-goat { background: radial-gradient(circle at 34% 28%, #fff4c2, #f5c84a 45%, #c8901a 80%); color: #3a2600; box-shadow: 0 0 0 1px rgba(255, 214, 90, .5), 0 10px 30px -8px rgba(245, 190, 60, .6); animation: km-goat-float 3.6s ease-in-out infinite; }
#km-abel { background: radial-gradient(circle at 34% 28%, #d8fff7, #4fe3cc 45%, #1597b8 80%); color: #00303b; box-shadow: 0 0 0 1px rgba(79, 227, 204, .5), 0 10px 30px -8px rgba(21, 151, 184, .6); }
#km-abel.with-goat { right: calc(var(--gutter, 20px) + 62px); }
#km-goat:hover, #km-abel:hover { transform: scale(1.08); }
#km-goat.playing, #km-abel.playing { animation: km-goat-float 3.6s ease-in-out infinite, km-goat-shake .5s ease-in-out infinite; }
.km-goat-emoji, .km-abel-emoji { display: grid; place-items: center; line-height: 1; }
.km-goat-emoji svg, .km-abel-emoji svg { width: 34px; height: 34px; }
.km-goat-ring, .km-abel-ring { position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0; pointer-events: none; }
#km-goat .km-goat-ring { border-color: rgba(255, 220, 120, .7); animation: km-goat-pulse 2.6s ease-out infinite; }
#km-abel .km-abel-ring { border-color: rgba(120, 255, 235, .7); }
#km-abel.playing .km-abel-ring { animation: km-goat-pulse 2.6s ease-out infinite; }
@keyframes km-goat-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes km-goat-shake { 0%, 100% { rotate: -7deg; } 50% { rotate: 7deg; } }
@keyframes km-goat-pulse { 0% { transform: scale(.85); opacity: .7; } 100% { transform: scale(1.55); opacity: 0; } }

#km-goat-mute, #km-abel-mute {
  position: fixed; top: calc(var(--nav-h, 76px) + 74px); right: calc(var(--gutter, 20px) + 5px); z-index: 890;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg-2) 85%, transparent); color: var(--fg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line);
  opacity: 0; transform: translateY(-6px) scale(.9); pointer-events: none;
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out), right .4s var(--ease-out), color .25s;
}
#km-goat-mute svg, #km-abel-mute svg { width: 18px; height: 18px; }
#km-abel-mute.with-goat { right: calc(var(--gutter, 20px) + 67px); }
#km-goat-mute.show, #km-abel-mute.show { opacity: 1; transform: none; pointer-events: auto; }
#km-goat-mute.muted, #km-abel-mute.muted { color: var(--muted); }

/* ================================================================
   BANDEAU COOKIES (cookie-consent.js)
   ================================================================ */
.km-cookie {
  position: fixed; left: var(--gutter); bottom: 80px; z-index: 6500;
  width: min(420px, calc(100vw - 2 * var(--gutter)));
  padding: 24px 24px 22px;
  background: var(--bg-2); color: var(--fg);
  border-radius: var(--r-media);
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 90px -30px rgba(var(--a1), .35);
  font-family: var(--font-body);
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
  overflow: hidden;
}
.km-cookie::before {
  content: ''; position: absolute; left: 24px; right: 24px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--light), var(--light-2), transparent);
}
.km-cookie.show { opacity: 1; transform: none; }
.km-cookie h4 {
  margin: 0 0 8px; font-family: var(--font-display); font-weight: 800;
  font-size: 24px; line-height: 1; letter-spacing: -.005em; font-variation-settings: 'wdth' 88;
}
.km-cookie p { margin: 0 0 18px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.km-cookie p strong { color: var(--fg); font-weight: 600; }
.km-cookie a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.km-cookie a:hover { text-decoration-color: currentColor; }
.km-cookie-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.km-cookie button {
  height: 44px; padding: 0 20px; border: 0; border-radius: var(--r-pill); cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  transition: box-shadow .25s, background-color .25s, transform .4s var(--ease-out);
}
.km-cookie .kc-accept { background: var(--fg); color: var(--bg); }
.km-cookie .kc-accept:hover { transform: translateY(-1px); }
.km-cookie .kc-refuse { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.km-cookie .kc-refuse:hover { box-shadow: inset 0 0 0 1px var(--fg); }

/* Position du bouton « rouvrir » : rangé dans le dock par htl.css ; ici, son apparence */
#km-cookie-reopen {
  position: fixed; z-index: 885;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--fg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .25s;
}
#km-cookie-reopen:hover { box-shadow: inset 0 0 0 1px var(--fg); }
#km-cookie-reopen svg { width: 18px; height: 18px; }

/* ================================================================
   COMMANDES (compte.html) — un registre, pas une grille de cartes
   ================================================================ */
.order-list { border-bottom: 1px solid var(--line); }
.order-card {
  display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto;
  gap: 16px 40px; align-items: baseline;
  padding: 30px 0; border-top: 1px solid var(--line);
}
.order-date { color: var(--muted); font-size: 14px; }
.order-body { display: grid; gap: 10px; min-width: 0; }
.order-item { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.order-item-name {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.02;
  font-variation-settings: 'wdth' 92;
}
.order-item-meta { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.order-formation { margin-top: 4px; }
.order-total {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 4vw, 56px); line-height: .9;
  font-variation-settings: 'wdth' 70; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
  transition: font-variation-settings .8s var(--ease-out), color .4s;
}
.order-card:hover .order-total { font-variation-settings: 'wdth' 110; color: var(--light); }

/* ================================================================
   TOAST (message court, bas de l'écran)
   Usage : <div class="htl-toast" role="status"></div> + classe .is-on
   ================================================================ */
.htl-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 7500;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: 14px 22px; border-radius: var(--r-pill);
  background: var(--fg); color: var(--bg);
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.htl-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ================================================================
   MOBILE (≤ 768px)
   ================================================================ */
@media (max-width: 768px) {
  #cart-drawer { width: 100vw; border-left: 0; }
  .cart-header { padding: 18px 20px 16px; }
  .cart-title { font-size: 30px; }
  #cart-items { padding: 4px 20px 12px; }
  .cart-promonote, .cart-promo { padding-left: 20px; padding-right: 20px; }
  .cart-summary { padding: 16px 20px 4px; }
  .cart-footer { padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .cart-row.total > span:last-child { font-size: 30px; }

  #kcond-modal, #auth-modal { padding: 12px; align-items: flex-end; }
  .kcond-card { padding: 28px 20px 20px; max-height: 90vh; }
  .kcond-x { top: 14px; right: 14px; }
  .kcond-title { font-size: 28px; padding-right: 48px; }
  .kcond-body { font-size: 14px; }
  .auth-card { padding: 32px 22px 24px; }
  .auth-close { top: 14px; right: 14px; }
  .auth-head h3 { font-size: 38px; }

  .account-btn { width: 40px; padding: 0; justify-content: center; }
  .account-label { display: none; }
  .account-btn.logged::after { position: absolute; top: 4px; right: 4px; }
  #account-ctrl .account-btn { position: relative; }
  .account-menu { position: fixed; top: calc(var(--nav-h, 64px) + 4px); left: var(--gutter); right: var(--gutter); min-width: 0; }

  #km-goat, #km-abel { width: 44px; height: 44px; top: calc(var(--nav-h, 64px) + 10px); }
  .km-goat-emoji svg, .km-abel-emoji svg { width: 30px; height: 30px; }
  #km-abel.with-goat { right: calc(var(--gutter, 20px) + 54px); }
  #km-goat-mute, #km-abel-mute { top: calc(var(--nav-h, 64px) + 62px); right: calc(var(--gutter, 20px) + 2px); }
  #km-abel-mute.with-goat { right: calc(var(--gutter, 20px) + 56px); }

  .km-cookie { left: 16px; right: 16px; width: auto; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); padding: 20px 18px 18px; }
  .km-cookie h4 { font-size: 22px; }
  .km-cookie-btns button { flex: 1 1 auto; }

  .order-card { grid-template-columns: 1fr auto; gap: 10px 16px; padding: 24px 0; }
  .order-card > .order-top { grid-column: 1 / -1; }
  .order-total { font-size: 34px; }
  .htl-toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* ================================================================
   CHANTIER MOBILE (30/11) — téléphones uniquement (≤ 768 px)
   ================================================================ */
@media (max-width: 768px) {
  /* Bandeau cookies compact : titre et boutons du hero restent visibles.
     Le dock n'est plus là sur mobile : le bandeau descend près du bord. */
  .km-cookie { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding: 16px 16px 14px; border-radius: 20px; }
  .km-cookie h4 { font-size: 19px; margin-bottom: 6px; }
  .km-cookie p { font-size: 14px; line-height: 1.45; margin-bottom: 12px; }
  .km-cookie-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .km-cookie-btns button { height: 46px; padding: 0 10px; white-space: normal; line-height: 1.15; }
  .km-cookie a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  /* Accueil : le bandeau se pose sur les projecteurs (décor), sous la nav ;
     le titre HEAR THE LIGHT et les deux boutons du hero restent visibles */
  body[data-htl-page="index"] .km-cookie { top: calc(var(--nav-h) + 8px); bottom: auto; transform: translateY(-14px); }
  body[data-htl-page="index"] .km-cookie.show { transform: none; }

  /* Panier : cibles de 44 px, petits textes lisibles */
  .cart-close { width: 44px; height: 44px; }
  .cart-item-remove { width: 44px; height: 44px; margin: -8px -10px 0 0; }
  .cart-item-remove svg { width: 18px; height: 18px; }
  .cart-qty-btn { width: 38px; height: 38px; }
  .cart-promonote, .cart-stripe-note { font-size: 14px; }
  .cart-item-note, .cart-item-extra { font-size: 14px; }
  /* Panier vide : pas de total à 0 € ni de bouton grisé, l'action utile en grand */
  #cart-drawer:has(.cart-empty) :is(.cart-summary, .cart-promonote, .cart-footer) { display: none; }
  .cart-empty { justify-items: stretch; }
  .cart-empty .htl-btn { width: 100%; height: 52px; --b-bg: var(--light); --b-fg: var(--on-light); box-shadow: none; }

  /* Fenêtres de connexion / conditions : croix de 44 px */
  .kcond-x, .auth-close { width: 44px; height: 44px; }
  .account-btn { width: 44px; height: 44px; }
}
