/* NDOLI — structure : bandeau démo, en-tête, menus, sections, pied de page, navigation mobile. */

/* Bandeau démonstration (données fictives) */
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin: 0;
  padding: 7px var(--gutter);
  background: var(--nd-primary-deep);
  color: var(--nd-lavender);
  font-size: var(--fs-xs);
  text-align: center;
}
.demo-banner .icon { width: 14px; height: 14px; color: var(--nd-gold); }
.demo-banner strong { color: var(--nd-white); }

/* ---------- En-tête ---------- */
/* Bandeau « nuit » : il porte le logo NDOLI (fond transparent, texte clair), voir partials/logo.php. */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--nd-gradient-night);
  color: var(--nd-on-night);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.site-header.is-scrolled { box-shadow: 0 10px 28px rgba(18, 8, 32, .28); }
.site-header :focus-visible { outline-color: var(--nd-gold-bright); }

/* Logo : fichier transparent à texte clair (partials/logo.php), posé tel quel sur le bandeau sombre. */
.logo { position: relative; display: inline-flex; }
.logo__full { display: block; }
.logo__img { display: block; width: auto; height: 100%; }

.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo search actions";
  align-items: center;
  column-gap: var(--sp-6);
  min-height: var(--header-h);
  padding-block: var(--sp-3);
}
.site-header__logo { grid-area: logo; display: inline-flex; border-radius: var(--radius-sm); }
.site-header__logo .logo__img { height: 56px; }
.site-header__search { grid-area: search; }
.main-nav { grid-area: nav; display: none; }
.header-actions { grid-area: actions; display: flex; align-items: center; gap: var(--sp-2); }

/* Recherche */
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 560px;
  height: 50px;
  padding: 0 5px 0 46px;
  border: 1px solid var(--nd-border);
  border-radius: var(--radius-pill);
  background: var(--nd-white);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.search:focus-within { border-color: var(--nd-primary); box-shadow: var(--focus-halo); }
.search__icon { position: absolute; left: 17px; width: 20px; height: 20px; color: var(--nd-text-muted); pointer-events: none; }
.search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  /* Couleur propre : sinon le texte hérite du blanc de l'en-tête sombre et devient invisible. */
  color: var(--nd-text);
  caret-color: var(--nd-primary);
  font-size: var(--fs-base);
  outline: none;
}
.search__input::placeholder { color: var(--nd-text-muted); opacity: 1; }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search__submit {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--nd-gradient-cta);
  color: var(--nd-white);
  transition: transform var(--dur-press) var(--ease-out), filter var(--dur-fast) ease;
}
.search__submit .icon { width: 18px; height: 18px; }
.search__submit:hover { filter: brightness(1.08); }
.search__submit:active { transform: scale(.94); }

/* Navigation principale */
.main-nav__list { display: flex; align-items: center; gap: 2px; }
.main-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--nd-on-night);
  font-size: var(--fs-sm);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.main-nav__link .icon { width: 19px; height: 19px; color: var(--nd-on-night-icon); }
.main-nav__link:hover { background: var(--nd-on-night-fill-hover); color: var(--nd-white); }
.main-nav__link--highlight { background: var(--nd-on-night-accent); color: var(--nd-white); font-weight: 600; }
.main-nav__link--highlight .icon { color: var(--nd-white); }
.main-nav__link[aria-current="page"] { background: var(--nd-on-night-accent); color: var(--nd-white); }

/* Actions d'en-tête */
.header-action {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--nd-on-night);
  font-size: var(--fs-xs);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.header-action .icon { width: 24px; height: 24px; color: var(--nd-on-night-icon); }
.header-action:hover { background: var(--nd-on-night-fill-hover); color: var(--nd-white); }
.site-header .cart-badge { border-color: var(--nd-night); }

/* Langue FR / EN */
.lang-badge {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border: 1.5px solid currentColor;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
}
.header-action--lang .lang-badge { margin-block: 1px; color: var(--nd-on-night-icon); }
.drawer__lang {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 48px;
  margin-top: auto;
  padding: 0 var(--sp-3);
  border-radius: var(--radius-sm);
  background: var(--nd-lavender-soft);
  color: var(--nd-primary-ink);
  font-weight: 600;
}
.site-footer__langs { display: flex; gap: var(--sp-3); }
.site-footer__langs a[aria-current="true"] { color: var(--nd-white); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.site-header .icon-btn,
.drawer__head .icon-btn {
  border-color: var(--nd-on-night-line);
  background: var(--nd-on-night-fill);
  color: var(--nd-white);
  box-shadow: none;
}
.site-header .icon-btn:hover,
.drawer__head .icon-btn:hover { background: var(--nd-on-night-fill-hover); }
.header-action__icon { position: relative; display: inline-flex; }
.header-action--cart { display: flex; }

.cart-badge {
  position: absolute;
  top: -7px;
  right: -10px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--nd-white);
  border-radius: var(--radius-pill);
  background: var(--nd-gold-bright);
  color: var(--nd-primary-deep);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.cart-badge[hidden] { display: none; }
.cart-badge.is-bumping { animation: badge-bump 420ms var(--ease-out); }
@keyframes badge-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  70% { transform: scale(.92); }
  100% { transform: scale(1); }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--nd-border);
  border-radius: 50%;
  background: var(--nd-white);
  color: var(--nd-primary-deep);
  box-shadow: var(--shadow-xs);
  transition: background-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out);
}
.icon-btn:hover { background: var(--nd-lavender-soft); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .icon { width: 22px; height: 22px; }

/* Mobile et tablette : recherche sur sa propre ligne */
@media (max-width: 1023px) {
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "logo actions" "search search";
    row-gap: var(--sp-3);
    min-height: 0;
  }
  .site-header__logo .logo__img { height: 42px; }
  .search { max-width: none; height: 48px; }
  .header-action--cart {
    width: 46px;
    min-width: 0;
    height: 46px;
    padding: 0;
    justify-content: center;
    border: 1px solid var(--nd-on-night-line);
    border-radius: 50%;
    background: var(--nd-on-night-fill);
  }
  .header-action--cart .header-action__label { display: none; }
  .header-action--cart .icon { width: 22px; height: 22px; }
  .header-action--cart .cart-badge { top: -9px; right: -11px; }
}

/* Petit desktop : navigation sous la barre de recherche */
@media (min-width: 1024px) {
  .header-menu-btn { display: none; }
  .header-action { display: flex; }
  .site-header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo search actions" "nav nav nav";
    row-gap: 4px;
  }
  .main-nav { display: block; }
  .main-nav__list { justify-content: center; }
}

/* Grand écran : l'ancienne mise en page « tout sur une ligne » (maquette) a été retirée le 24/11/2026 :
   avec « Créer ma boutique » dans l'en-tête, elle dépassait d'environ 195 px (conteneur plafonné à
   --content-max). La mise en page sur deux lignes (navigation sous la recherche) vaut pour tout ordinateur. */

/* ---------- Menu mobile (dialog) ---------- */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(360px, 88vw);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.drawer::backdrop { background: var(--nd-scrim); opacity: 0; transition: opacity var(--dur-base) ease; }
.drawer__panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  height: 100%;
  padding: calc(var(--sp-4) + env(safe-area-inset-top)) var(--sp-4) var(--sp-6);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: var(--nd-white);
  box-shadow: var(--shadow-float);
  transform: translateX(104%);
  transition: transform 260ms var(--ease-out);
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer.is-open::backdrop { opacity: 1; }
/* Tête du menu : même bandeau « nuit » que l'en-tête, pour le logo original */
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: calc(-1 * (var(--sp-4) + env(safe-area-inset-top))) calc(-1 * var(--sp-4)) 0;
  padding: calc(var(--sp-3) + env(safe-area-inset-top)) var(--sp-4) var(--sp-3);
  border-top-left-radius: var(--radius-lg);
  background: var(--nd-gradient-night);
}
.drawer__logo .logo__img { height: 40px; }
.drawer__list { display: grid; gap: 2px; }
.drawer__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 52px;
  padding: 0 var(--sp-3);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: background-color var(--dur-fast) ease;
}
.drawer__link .icon { color: var(--nd-primary); }
.drawer__link:hover { background: var(--nd-lavender-soft); }
.drawer__chevron { margin-left: auto; color: var(--nd-text-muted) !important; width: 18px; height: 18px; }
body.has-drawer { overflow: hidden; }

/* ---------- Sections ---------- */
.section { margin-top: var(--section-gap); }
.section--tight { margin-top: calc(var(--section-gap) * .8); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-4);
}
.section-title {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--nd-text);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.section-title__icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--nd-lavender);
  color: var(--nd-primary);
}
.section-title__icon .icon { width: 21px; height: 21px; }
.section-title__icon--warm { background: var(--nd-warm-soft); color: var(--nd-warm); }
.section-head--compact .section-title { font-size: var(--fs-xl); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--nd-primary);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}
.link-more .icon { width: 17px; height: 17px; transition: transform var(--dur-fast) var(--ease-out); }
.link-more:hover .icon { transform: translateX(3px); }

/* Messages flash */
.flash-stack { display: grid; gap: var(--sp-2); padding-top: var(--sp-4); }
.flash {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  font-weight: 500;
}
.flash--success { background: var(--nd-success-soft); color: var(--nd-success-ink); }
.flash--error { background: var(--nd-danger-soft); color: var(--nd-danger-ink); }

/* ---------- Pied de page ---------- */
.site-footer {
  margin-top: calc(var(--section-gap) * 1.6);
  padding-top: var(--sp-12);
  background: var(--nd-night);
  color: var(--nd-on-night-soft);
  font-size: var(--fs-sm);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-8) var(--sp-5);
}
.site-footer__brand { grid-column: 1 / -1; }
.site-footer__brand { display: grid; gap: var(--sp-4); max-width: 360px; }
.site-footer__logo { display: inline-flex; margin-left: -10px; }
.site-footer__logo .logo__img { height: 68px; }
.site-footer__heading { margin-bottom: var(--sp-3); color: var(--nd-white); font-size: var(--fs-base); font-weight: 600; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer__col ul { display: grid; gap: 4px; }
.site-footer a { display: inline-flex; min-height: 32px; align-items: center; transition: color var(--dur-fast) ease; }
.site-footer a:hover { color: var(--nd-white); }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-10);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--nd-on-dark-line);
}
.site-footer__legal ul { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.site-footer :focus-visible { outline-color: var(--nd-gold); }

@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: auto; }
}

/* ---------- Navigation inférieure mobile ---------- */
.bottom-nav { display: none; }

@media (max-width: 1023px) {
  body { padding-bottom: calc(var(--bottom-nav-h) + 24px + env(safe-area-inset-bottom)); }
  .site-footer { padding-bottom: 0; }

  .bottom-nav {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: var(--z-bottom-nav);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: min(440px, calc(100% - 24px));
    padding: 8px;
    border-radius: var(--radius-pill);
    background: var(--nd-white);
    box-shadow: var(--shadow-float);
    transform: translateX(-50%);
  }
  .bottom-nav__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 50px;
    height: 50px;
    padding: 0 13px;
    border-radius: var(--radius-pill);
    color: var(--nd-primary-deep);
    transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
  }
  .bottom-nav__icon { position: relative; display: inline-flex; }
  .bottom-nav__item .icon { width: 23px; height: 23px; }
  .bottom-nav__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .bottom-nav__item.is-active {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 150px;
    background: var(--nd-gradient-cta);
    color: var(--nd-white);
    box-shadow: var(--shadow-cta);
  }
  .bottom-nav__item.is-active .bottom-nav__label {
    position: static;
    width: auto;
    min-width: 0;
    height: auto;
    overflow: hidden;
    clip: auto;
    font-size: var(--fs-sm);
    font-weight: 600;
    text-overflow: ellipsis;
  }
  /* Très petits téléphones (320 px) : les 5 destinations tiennent sur une ligne */
  @media (max-width: 359px) {
    .bottom-nav { gap: 2px; padding: 6px; }
    .bottom-nav__item { min-width: 44px; padding: 0 10px; }
  }
  .bottom-nav__item:active { transform: scale(.96); }
  .cart-badge--small { top: -6px; right: -9px; min-width: 18px; height: 18px; font-size: 10px; }
}

/* ---------- Bouton « Retour » (pages publiques) ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  min-height: 40px;
  color: var(--nd-text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: color var(--dur-fast) ease;
}
.back-link .icon { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease-out); }
.back-link:hover { color: var(--nd-primary); }
.back-link:hover .icon { transform: translateX(-2px); }
.back-link:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
/* Fil d'Ariane : sur mobile, un seul bouton « Retour » vers la page parente (plus lisible, plus grand). */
.back-link--crumb { margin-top: var(--sp-3); }
@media (max-width: 767px) { .breadcrumb--with-back { display: none; } }
@media (min-width: 768px) { .back-link--crumb { display: none; } }
@media (prefers-reduced-motion: reduce) { .back-link .icon { transition: none; } }

/* ---------- Animation du logo de l'en-tête (CSS seul, partials/logo.php avec 'animate') ----------
 * Choix du client (23/11/2026) : à chaque page, le sac arrive avec un léger rebond, « NDOLI » se
 * révèle de gauche à droite, « THE MARKETPLACE » s'ouvre depuis le centre, puis un reflet traverse
 * le logo (≈ 1,3 s). Les 3 calques ont le même cadre que le logo complet : ils se superposent exactement.
 * CSS seul : démarre dès le premier affichage, sans attendre le JavaScript. À 1,35 s, le logo complet
 * remplace les calques (rendu identique). Si l'appareil demande moins d'animations : logo complet direct.
 */
.logo__layers { display: none; }
.logo--motion .logo__full { opacity: 0; animation: logo-show 1ms linear 1.35s forwards; }
.logo--motion .logo__layers {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  animation: logo-hide 1ms linear 1.35s forwards;
}
.logo__layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.logo--motion .logo__layer--icone { transform-origin: 20% 75%; animation: logo-bag 640ms cubic-bezier(.34, 1.56, .64, 1) both; }
.logo--motion .logo__layer--nom { animation: logo-word 620ms cubic-bezier(.22, 1, .36, 1) 140ms both; }
.logo--motion .logo__layer--slogan { animation: logo-tagline 520ms cubic-bezier(.22, 1, .36, 1) 440ms both; }
/* Reflet : bande claire limitée aux pixels du logo (le logo lui-même sert de masque). */
.logo--motion .logo__layers::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%;
  -webkit-mask: url("../images/brand/ndoli-logo-480.webp") center / 100% 100% no-repeat;
  mask: url("../images/brand/ndoli-logo-480.webp") center / 100% 100% no-repeat;
  animation: logo-shine 600ms cubic-bezier(.4, 0, .2, 1) 720ms both;
}
@keyframes logo-show { to { opacity: 1; } }
@keyframes logo-hide { to { visibility: hidden; } }
@keyframes logo-bag {
  0% { opacity: 0; transform: translateY(10%) scale(.72) rotate(-8deg); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes logo-word {
  0% { opacity: .3; clip-path: inset(0 62% 0 37%); transform: translateX(-1.5%); }
  100% { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
}
@keyframes logo-tagline {
  0% { opacity: 0; clip-path: inset(0 36% 0 64%); transform: translateY(8%); }
  100% { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
}
@keyframes logo-shine {
  from { background-position: 115% 0; }
  to { background-position: -15% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .logo--motion .logo__full { opacity: 1; animation: none; }
  .logo--motion .logo__layers { display: none; }
}

/* ---------- Suggestions de recherche (components/search-suggest.js) ---------- */
.suggest {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 5;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--nd-border);
  border-radius: var(--radius-lg);
  background: var(--nd-white);
  color: var(--nd-text);
  box-shadow: var(--shadow-float);
}
.suggest[hidden] { display: none; }
.suggest__head { margin: 8px 10px 4px; color: var(--nd-text-muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.suggest__option { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border-radius: var(--radius-md); color: var(--nd-text); }
.suggest__option:hover, .suggest__option.is-active { background: var(--nd-lavender-soft); }
.suggest__option > .icon { flex: none; width: 20px; height: 20px; margin: 0 10px; color: var(--nd-primary); }
.suggest__thumb { flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--nd-ivory); object-fit: cover; }
.suggest__text { display: grid; min-width: 0; }
.suggest__main { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.suggest__sub { overflow: hidden; color: var(--nd-text-muted); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.suggest__option--all { margin-top: 4px; border-top: 1px solid var(--nd-border); color: var(--nd-primary-ink); }

/* ---------- « Créer ma boutique » et « Connexion » tout en haut (mobile, tablette) ---------- */
.top-cta { border-bottom: 1px solid var(--nd-on-night-line); background: var(--nd-night); }
.top-cta__inner { display: flex; gap: var(--sp-2); padding-block: 8px; }
.top-cta__btn {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--nd-on-night-line);
  border-radius: var(--radius-pill);
  color: var(--nd-on-night);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}
.top-cta__btn .icon { flex: none; width: 18px; height: 18px; }
.top-cta__btn span { overflow: hidden; text-overflow: ellipsis; }
.top-cta__btn--primary { border-color: transparent; background: var(--nd-gradient-cta); color: var(--nd-white); box-shadow: var(--shadow-cta); }
.top-cta__btn:focus-visible { outline: 2px solid var(--nd-gold-bright); outline-offset: 2px; }
@media (max-width: 359px) {
  /* Très petits écrans : sans icônes, « Créer ma boutique » garde son texte entier. */
  .top-cta__btn { padding-inline: 10px; }
  .top-cta__btn .icon { display: none; }
  .top-cta__btn--primary { flex: 1.35 1 0; }
}
.header-cta { display: none; }
@media (min-width: 1024px) {
  .top-cta { display: none; }
  .header-cta {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    background: var(--nd-gradient-cta);
    color: var(--nd-white);
    font-size: var(--fs-sm);
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--shadow-cta);
  }
  .header-cta .icon { width: 18px; height: 18px; }
  .header-cta:focus-visible { outline: 2px solid var(--nd-gold-bright); outline-offset: 2px; }
}

/* ---------- Bandeau cookies (partials/cookie-notice.php) ---------- */
.cookie-notice {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: calc(var(--z-bottom-nav) + 1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  max-width: 760px;
  margin-inline: auto;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--nd-on-night-line);
  border-radius: var(--radius-lg);
  background: var(--nd-night);
  color: var(--nd-on-night);
  box-shadow: var(--shadow-float);
  transition: opacity 200ms ease, transform 200ms var(--ease-out);
}
.cookie-notice.is-leaving { opacity: 0; transform: translateY(8px); }
.cookie-notice__text { display: flex; flex: 1 1 260px; align-items: flex-start; gap: 8px; margin: 0; font-size: var(--fs-sm); }
.cookie-notice__text .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--nd-on-night-icon); }
.cookie-notice__text a { color: var(--nd-white); font-weight: 600; text-decoration: underline; }
.cookie-notice__ok { flex: none; min-height: 42px; }
@media (max-width: 1023px) {
  /* Au-dessus de la barre de navigation du bas. */
  .cookie-notice { bottom: calc(var(--bottom-nav-h) + 24px + env(safe-area-inset-bottom)); }
}
@media (max-width: 699px) {
  /* Mobile : bandeau compact, bouton à droite du texte. */
  .cookie-notice { flex-wrap: nowrap; gap: var(--sp-2); padding: 10px 10px 10px 14px; border-radius: var(--radius-md); }
  .cookie-notice__text { flex: 1 1 auto; min-width: 0; font-size: var(--fs-xs); line-height: 1.45; }
  .cookie-notice__text .icon { display: none; }
  .cookie-notice .cookie-notice__ok { min-height: 40px; padding-inline: 14px; font-size: var(--fs-sm); }
}
/* Pendant une recherche, le bandeau s'efface pour laisser voir les propositions. */
body:has(.suggest:not([hidden])) .cookie-notice,
body:has(.search__input:focus) .cookie-notice { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .cookie-notice { transition: none; } }

/* ---------- Jauge de chargement (components/progress.js) ---------- */
.nav-progress {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  right: 0;
  left: 0;
  z-index: 2000;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--nd-gold-bright), var(--nd-primary));
  box-shadow: 0 0 10px rgba(138, 79, 216, .55);
  transition: opacity 200ms ease;
}
.nav-progress.is-active { opacity: 1; animation: nav-progress 14s cubic-bezier(.08, .8, .2, 1) forwards; }
@keyframes nav-progress {
  0% { transform: scaleX(0); }
  8% { transform: scaleX(.3); }
  100% { transform: scaleX(.94); }
}
/* Image en cours de chargement (components/progress.js) : bloc lavande qui « respire » à sa place
   (opacité seule, DESIGN.md), puis l'image apparaît en fondu. Sans JavaScript : rien de tout cela. */
.img-pending--anchor { position: relative; }
/* Le squelette passe DERRIÈRE le contenu du conteneur (titre du hero, badges) : jamais de texte masqué. */
.img-pending { isolation: isolate; }
.img-pending::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--nd-lavender);
  pointer-events: none;
  animation: img-breathe 1.1s ease-in-out infinite alternate;
}
@keyframes img-breathe { from { opacity: .4; } to { opacity: .85; } }
.img-fade { opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.img-fade.img-ready { opacity: 1; }
/* Texte en attente (squelettes de cartes, favoris) : mêmes blocs lavande. */
.skeleton-line, .skeleton-block {
  display: block;
  border-radius: var(--radius-sm);
  background: var(--nd-lavender);
  animation: img-breathe 1.1s ease-in-out infinite alternate;
}
.skeleton-line { height: .8em; margin-top: 8px; }
.skeleton-line--short { width: 55%; }
.skeleton-line--price { width: 38%; height: 1.1em; margin-top: 14px; }
.skeleton-block { aspect-ratio: 1; border-radius: var(--radius-md); }
@media (prefers-reduced-motion: reduce) {
  .img-pending::before, .skeleton-line, .skeleton-block { animation: none; opacity: .7; }
  .img-fade { transition: none; }
}

/* ---------- Propositions de recherche : attente ---------- */
.suggest__loading { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 16px; color: var(--nd-text-muted); font-size: var(--fs-sm); }
.suggest__loading::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--nd-lavender);
  border-top-color: var(--nd-primary);
  border-radius: 50%;
  animation: btn-spin 700ms linear infinite;
}
/* iPhone : un champ de moins de 16 px fait zoomer la page à la saisie. */
@media (max-width: 1023px) {
  .search__input { font-size: 16px; text-overflow: ellipsis; }
}

/* ---------- Installer l'application (partials/install-banner.php) ---------- */
.install-banner {
  position: fixed;
  right: 12px;
  bottom: calc(var(--bottom-nav-h) + 24px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: calc(var(--z-bottom-nav) + 1);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin-inline: auto;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--nd-border);
  border-radius: var(--radius-md);
  background: var(--nd-white);
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms var(--ease-out);
}
.install-banner.is-visible { opacity: 1; transform: none; }
.install-banner[hidden] { display: none; }
.install-banner__icon { flex: none; width: 44px; height: 44px; border-radius: 12px; }
.install-banner__text { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; margin: 0; font-size: var(--fs-xs); line-height: 1.4; }
.install-banner__text strong { color: var(--nd-text); font-size: var(--fs-sm); }
.install-banner__text span { color: var(--nd-text-muted); }
.install-banner__share { width: 16px; height: 16px; vertical-align: -3px; color: var(--nd-primary); }
.install-banner .install-banner__action { flex: none; min-height: 40px; padding-inline: 14px; }
.install-banner__close { flex: none; width: 36px; height: 36px; box-shadow: none; }
.install-banner__close .icon { width: 18px; height: 18px; }
@media (min-width: 1024px) { .install-banner { bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { .install-banner { transition: none; } }
.drawer__install {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: 48px;
  margin-top: var(--sp-3);
  padding: 0 var(--sp-3);
  border: 1px dashed var(--nd-primary);
  border-radius: var(--radius-sm);
  background: var(--nd-white);
  color: var(--nd-primary-ink);
  font-weight: 600;
  text-align: left;
}
.drawer__install[hidden] { display: none; }
.drawer__install .icon { width: 20px; height: 20px; }

/* ---------- Page « Pas de connexion » ---------- */
.offline-page { display: grid; justify-items: center; gap: var(--sp-3); max-width: 560px; padding-block: 64px; text-align: center; }
.offline-page__icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--nd-lavender-soft); color: var(--nd-primary); }
.offline-page__icon .icon { width: 34px; height: 34px; }
.offline-page h1 { margin: 0; }
.offline-page p { margin: 0; color: var(--nd-text-muted); }
.offline-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-2); }
