/* ============================================================
   YEPMO MARKET — Design system
   ============================================================ */

:root {
  --primary: #FF6A1F;
  --primary-dark: #E4570F;
  --primary-soft: #FFF1E7;
  --ink: #17181C;
  --ink-dark: #14152B;
  --navy: #1E1B4B;
  --navy-light: #322C7A;
  --gray-900: #1F2430;
  --gray-600: #6B7280;
  --gray-400: #9CA3AF;
  --gray-200: #E7E9EE;
  --gray-100: #F4F5F8;
  --success: #1EA672;
  --whatsapp: #25D366;
  --white: #FFFFFF;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(17, 18, 28, 0.06);
  --shadow: 0 6px 20px rgba(17, 18, 28, 0.08);
  --nav-height: 64px;
  --header-height: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-tap-highlight-color: transparent; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--gray-100);
  line-height: 1.5;
  padding-bottom: calc(var(--nav-height) + 8px);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
ul { list-style: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.icon { display: inline-flex; width: 1em; height: 1em; }
.icon svg { width: 100%; height: 100%; }

/* TOP HEADER */
.site-header { background: var(--white); border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 12px; height: var(--header-height); }
.header-top-row { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.header-search-row { padding-bottom: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 999px; background: var(--gray-100); color: var(--ink); border: none; flex-shrink: 0; position: relative;
}
.icon-btn .icon { width: 20px; height: 20px; }
.icon-btn .badge {
  position: absolute; top: -4px; right: -4px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.logo { font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -0.3px; white-space: nowrap; display: flex; align-items: center; }
.logo span { color: var(--primary); }
.logo-img { height: 38px; width: auto; display: block; }
.logo-text { margin-left: 8px; font-weight: 800; font-size: 16px; letter-spacing: -0.2px; line-height: 1; white-space: nowrap; color: var(--navy); }
.logo-text b { color: var(--primary); font-weight: 800; }
@media (max-width: 359px) { .logo-text { display: none; } }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  background: var(--primary); color: #fff; border-radius: 9px; font-weight: 800; font-size: 14px; margin-right: 8px;
}
.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: 999px;
  padding: 11px 16px;
  min-width: 0;
}
.search-bar .icon { width: 19px; height: 19px; color: var(--primary); flex-shrink: 0; }
.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14.5px;
  font-weight: 500;
  width: 100%;
  color: var(--ink);
}
.search-bar button, .search-submit-btn {
  background: none; border: none; display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0; cursor: pointer; padding: 0;
}
.header-back { display: none; }
.page-with-back .header-back { display: flex; }
.page-with-back .logo { display: none; }

/* BOTTOM NAVIGATION */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-height); background: var(--white);
  border-top: 1px solid var(--gray-200); display: flex; z-index: 30; box-shadow: 0 -4px 16px rgba(17,18,28,0.05);
}
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--gray-400); font-size: 11px; font-weight: 600; }
.bn-item.active { color: var(--primary); }
.bn-icon { position: relative; width: 22px; height: 22px; }
.bn-icon svg { width: 100%; height: 100%; }
.bn-badge {
  position: absolute; top: -4px; right: -8px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 14px; border: none; cursor: pointer; white-space: nowrap; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-outline { background: #fff; border: 1.5px solid var(--gray-200); color: var(--ink); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* HERO */
.hero { margin: 14px 0; border-radius: var(--radius-lg); padding: 26px 22px; background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; background: radial-gradient(circle, rgba(255,106,31,0.35), transparent 70%); }
.hero h1 { font-size: 21px; font-weight: 800; margin-bottom: 6px; max-width: 260px; position: relative; }
.hero p { font-size: 13px; opacity: 0.85; margin-bottom: 16px; max-width: 260px; position: relative; }
.hero .btn { position: relative; }

.quick-categories { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; }
.qc-pill { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; background: var(--white); border: 1.5px solid var(--gray-200); font-size: 12.5px; font-weight: 600; color: var(--gray-900); white-space: nowrap; }
.qc-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.promo-carousel { position: relative; margin: 14px 0; border-radius: var(--radius-lg); overflow: hidden; }
.promo-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.promo-track::-webkit-scrollbar { display: none; }
.promo-slide { flex: 0 0 100%; scroll-snap-align: start; padding: 24px 22px; color: #fff; position: relative; overflow: hidden; min-height: 130px; display: flex; flex-direction: column; justify-content: center; }
.promo-slide h1 { font-size: 19px; font-weight: 800; margin-bottom: 6px; max-width: 260px; position: relative; }
.promo-slide p { font-size: 12.5px; opacity: 0.85; margin-bottom: 14px; max-width: 260px; position: relative; }
.promo-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 2; }
.promo-dots .dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.4); }
.promo-dots .dot.active { background: #fff; width: 16px; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.section-title h2 { font-size: 16px; font-weight: 800; }
.section-title a { font-size: 12px; color: var(--primary); font-weight: 700; }

/* PRODUCT GRID / CARD */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.category-rail { margin-bottom: 6px; }
.rail-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 4px; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track .product-card { flex: 0 0 148px; scroll-snap-align: start; }
.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: block; position: relative; transition: transform .12s ease; content-visibility: auto; contain-intrinsic-size: 190px 250px; }
.product-card:active { transform: scale(0.96); }
.btn, .icon-btn, .qc-pill, .tab, .bn-item { transition: transform .1s ease; }
.btn:active, .icon-btn:active, .qc-pill:active { transform: scale(0.94); }
.product-card .thumb { width: 100%; aspect-ratio: 1; background: var(--gray-100); overflow: hidden; position: relative; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card .fav-btn { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 999px; background: rgba(255,255,255,0.92); display: flex; align-items: center; justify-content: center; color: var(--gray-600); border: none; }
.product-card .fav-btn .icon { width: 14px; height: 14px; }
.badge-pill { position: absolute; top: 8px; left: 8px; background: var(--navy); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.product-card .card-body { padding: 10px; }
.product-card .name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .price { color: var(--primary); font-weight: 800; font-size: 14px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.product-card .price .old-price { color: var(--gray-400); font-weight: 500; font-size: 11.5px; text-decoration: line-through; }
.product-card .discount-badge { background: #E24B4B; color: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; }
.product-card .meta { font-size: 11px; color: var(--gray-400); margin-top: 2px; display: flex; align-items: center; gap: 4px; }

/* CATEGORIES PAGE */
.categories-layout { display: flex; min-height: 70vh; }
.cat-sidebar { width: 118px; flex-shrink: 0; background: var(--white); border-right: 1px solid var(--gray-200); overflow-y: auto; }
.cat-sidebar button { display: block; width: 100%; text-align: left; padding: 14px 10px; font-size: 12.5px; font-weight: 600; color: var(--gray-600); background: none; border: none; border-left: 3px solid transparent; }
.cat-sidebar button.active { color: var(--primary); background: var(--primary-soft); border-color: var(--primary); }
.cat-content { flex: 1; padding: 16px; min-width: 0; }
.cat-content h2 { font-size: 15px; font-weight: 800; margin-bottom: 12px; }

/* FORMS */
.form-page { max-width: 440px; margin: 0 auto; padding: 20px 16px 32px; }
.form-page h1 { margin-bottom: 18px; font-size: 20px; font-weight: 800; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12.5px; margin-bottom: 5px; color: var(--gray-600); font-weight: 600; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 14px; background: var(--white); color: var(--ink); outline: none; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-error { color: #D33; font-size: 13px; margin-top: 8px; }
.form-success { color: var(--success); font-size: 13px; margin-top: 8px; }

/* PRODUCT DETAIL */
.product-photo { width: 100%; aspect-ratio: 1; background: var(--gray-100); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.product-info .price { font-size: 24px; color: var(--primary); font-weight: 800; margin: 6px 0 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.product-info .price .old-price { font-size: 15px; color: var(--gray-400); font-weight: 500; text-decoration: line-through; }
.product-info .price .discount-badge { background: #E24B4B; color: #fff; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 8px; }
.store-link { display: inline-flex; align-items: center; gap: 6px; color: var(--gray-600); font-size: 13px; margin-bottom: 14px; }
.store-link a { font-weight: 800; color: var(--primary); background: var(--primary-soft); padding: 4px 10px; border-radius: 999px; }

.store-visit-card {
  display: flex; align-items: center; gap: 12px; background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px;
}
.store-visit-card .store-avatar {
  width: 52px; height: 52px; border-radius: 14px; background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; overflow: hidden;
}
.store-visit-card .store-avatar img { width: 100%; height: 100%; object-fit: cover; }
.store-visit-card .store-info { flex: 1; min-width: 0; }
.store-visit-card .store-info .name { font-weight: 800; font-size: 14.5px; display: flex; align-items: center; gap: 5px; }
.store-visit-card .store-info .sub { font-size: 12px; color: var(--gray-600); margin-top: 2px; display: block; }
.store-visit-card .visit-btn {
  flex-shrink: 0; display: flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 700; font-size: 12.5px;
  background: var(--primary-soft); padding: 8px 12px; border-radius: 999px;
}
.product-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.description-block { margin-top: 18px; font-size: 14px; color: var(--gray-900); line-height: 1.6; }

/* STORE PAGE */
.store-hero { background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: #fff; border-radius: var(--radius-lg); padding: 22px; margin: 14px 0; }
.store-hero h1 { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.store-hero .rating { display: flex; align-items: center; gap: 5px; font-size: 13px; margin: 8px 0; opacity: 0.9; }
.store-hero .rating .icon { width: 14px; height: 14px; color: #FFC94A; }
.store-hero p.desc { font-size: 13px; opacity: 0.85; margin: 8px 0 14px; }
.store-hero .store-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* LIST ROWS */
.data-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--white); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.data-row .main { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.data-row .main strong { font-size: 14px; }
.data-row select { border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); padding: 6px 8px; font-size: 12.5px; }

/* MESSAGERIE */
.conv-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--gray-200); }
.avatar-circle { width: 44px; height: 44px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.conv-item .body { flex: 1; min-width: 0; }
.conv-item .top-row { display: flex; justify-content: space-between; gap: 8px; }
.conv-item .name { font-weight: 700; font-size: 14px; }
.conv-item .date { font-size: 11px; color: var(--gray-400); flex-shrink: 0; }
.conv-item .preview { font-size: 12.5px; color: var(--gray-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.unread-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--primary); flex-shrink: 0; }

.msg-layout { display: flex; gap: 0; min-height: 60vh; min-width: 0; max-width: 100%; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.msg-list { width: 100%; min-width: 0; }
.msg-list.hidden-mobile { display: none; }
.msg-thread { flex: 1; display: none; flex-direction: column; min-width: 0; max-width: 100%; border-left: 1px solid var(--gray-200); padding: 14px; }
.msg-thread.open { display: flex; }
/* Téléphone : la conversation ouverte occupe tout l'écran entre l'en-tête et la barre du bas,
   la zone d'écriture reste collée en bas et le bouton « Envoyer » est toujours visible. */
@media (max-width: 759px) {
  .msg-thread.open {
    position: fixed; top: var(--header-height); bottom: var(--nav-height); left: 0; right: 0;
    z-index: 15; background: var(--white); border-left: none; padding: 10px 12px 8px; width: 100%;
  }
}
@media (min-width: 760px) {
  .msg-list { width: 300px; flex-shrink: 0; }
  .msg-list.hidden-mobile { display: block; }
  .msg-thread.open, .msg-thread { display: flex; }
}
.msg-bubble { max-width: 78%; min-width: 0; padding: 9px 13px; border-radius: 14px; margin-bottom: 8px; font-size: 13.5px; overflow-wrap: anywhere; word-break: break-word; }
.msg-row { display: flex; align-items: flex-end; gap: 6px; margin-bottom: 8px; max-width: 100%; }
.msg-row.mine { flex-direction: row-reverse; }
.msg-row .msg-avatar { width: 28px; height: 28px; border-radius: 999px; background: var(--gray-200); color: var(--gray-600); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.msg-row .msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-bubble { margin-bottom: 0; }
.msg-bubble .msg-time { display: block; font-size: 10px; opacity: .65; margin-top: 3px; text-align: right; }
/* Couleur selon le RÔLE de l'expéditeur (identique quel que soit celui qui regarde : client, vendeur, admin) */
.msg-bubble.role-client { background: #DCEBFF; color: #12315C; }
.msg-bubble.role-vendeur { background: #DFF5E3; color: #14502A; }
.msg-row.mine .msg-bubble { border-bottom-right-radius: 4px; }
.msg-row:not(.mine) .msg-bubble { border-bottom-left-radius: 4px; }
.role-tag { font-size: 10px; font-weight: 800; letter-spacing: .3px; display: block; margin-bottom: 2px; opacity: .8; }
.msg-input { display: flex; gap: 8px; margin-top: 8px; flex-shrink: 0; align-items: center; }
.msg-input input { flex: 1; min-width: 0; width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-200); border-radius: 999px; outline: none; font-size: 13.5px; }
.thread-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-shrink: 0; min-width: 0; }
.thread-header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-thread #messages-container { min-height: 0; }
.msg-thread #templates-row { flex-shrink: 0; }
.msg-thread #product-context { flex-shrink: 0; }
.msg-thread #product-context .data-row { margin-bottom: 6px; padding: 8px 10px; }
.msg-input .btn { flex-shrink: 0; white-space: nowrap; }

/* PROFILE / COMPTE */
.profile-hero { background: linear-gradient(135deg, var(--ink-dark), var(--navy-light)); color: #fff; padding: 30px 20px 26px; text-align: center; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.profile-hero .avatar-lg { width: 76px; height: 76px; border-radius: 999px; background: rgba(255,255,255,0.15); margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; }
.profile-hero h2 { font-size: 17px; font-weight: 800; }
.profile-hero p { font-size: 12.5px; opacity: 0.75; margin-top: 2px; }

.menu-list { background: var(--white); border-radius: var(--radius); margin: 14px 0; box-shadow: var(--shadow-sm); overflow: hidden; }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--gray-100); }
.menu-row:last-child { border-bottom: none; }
.menu-row .menu-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--gray-100); color: var(--ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.menu-row .menu-icon .icon { width: 18px; height: 18px; }
.menu-row .menu-text { flex: 1; }
.menu-row .menu-text .title { font-size: 14px; font-weight: 700; }
.menu-row .menu-text .subtitle { font-size: 12px; color: var(--gray-600); margin-top: 1px; }
.menu-row .chevron { color: var(--gray-400); width: 16px; height: 16px; }

.promo-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--primary-soft), #fff); border: 1px solid #FFE1CC; border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; }
.promo-card .promo-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.promo-card .promo-icon .icon { width: 20px; height: 20px; }
.promo-card .promo-text { flex: 1; }
.promo-card .promo-text .title { font-weight: 800; font-size: 14px; }
.promo-card .promo-text .subtitle { font-size: 12px; color: var(--gray-600); }

/* TABS */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 16px 0; background: var(--gray-200); border-radius: 999px; padding: 4px; }
.tab { padding: 9px 16px; cursor: pointer; white-space: nowrap; color: var(--gray-600); font-size: 13px; font-weight: 700; border-radius: 999px; flex: 1; text-align: center; }
.tab.active { color: var(--ink); background: var(--white); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.stat-cards { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 14px; min-width: 130px; flex: 1; box-shadow: var(--shadow-sm); }
.stat-card .value { font-size: 20px; font-weight: 800; color: var(--primary); }
.stat-card .label { font-size: 11.5px; color: var(--gray-600); margin-top: 2px; }

/* WIZARD (création boutique) */
.wizard-header { background: linear-gradient(135deg, var(--ink-dark), var(--navy-light)); color: #fff; padding: 22px 18px 26px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.wizard-steps { display: flex; gap: 6px; margin-top: 16px; }
.wizard-steps .step-track { flex: 1; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.25); }
.wizard-steps .step-track.done { background: var(--primary); }
.wizard-labels { display: flex; justify-content: space-between; font-size: 11px; opacity: 0.8; margin-top: 6px; }

.plan-card { border: 2px solid var(--gray-200); border-radius: var(--radius); padding: 16px; margin: 12px 0; background: var(--white); position: relative; }
.plan-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.plan-card .plan-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plan-card .plan-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.plan-card .plan-price { font-weight: 800; color: var(--primary); font-size: 15px; white-space: nowrap; }
.plan-card .plan-desc { font-size: 12.5px; color: var(--gray-600); margin: 6px 0 10px; }
.plan-card ul { display: flex; flex-direction: column; gap: 7px; }
.plan-card li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--gray-900); }
.plan-card li .icon { width: 14px; height: 14px; color: var(--success); flex-shrink: 0; }
.plan-badge { position: absolute; top: -10px; right: 14px; background: var(--navy); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

.type-card { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; background: var(--white); }
.type-card.selected { border-color: var(--primary); background: var(--primary-soft); }
.type-card .type-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--gray-100); color: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.type-card .type-icon .icon { width: 20px; height: 20px; }
.type-card .type-text .title { font-weight: 700; font-size: 14px; }
.type-card .type-text .subtitle { font-size: 12px; color: var(--gray-600); margin-top: 2px; }

.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 10px; margin: 10px 0 6px; }
.color-swatch { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
.color-swatch .dot { width: 34px; height: 34px; border-radius: 999px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.color-swatch.selected .dot { border-color: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.color-swatch span { font-size: 10.5px; color: var(--gray-600); text-align: center; }

.wizard-footer { position: sticky; bottom: 0; background: linear-gradient(to top, var(--gray-100) 60%, transparent); padding: 16px 0 4px; }

/* MISC */
.empty-state { text-align: center; padding: 40px 20px; color: var(--gray-600); }
.empty-state .icon { width: 40px; height: 40px; color: var(--gray-400); margin-bottom: 10px; }
.notice-banner { display: flex; align-items: flex-start; gap: 10px; background: var(--primary-soft); border: 1px solid #FFE1CC; border-radius: var(--radius); padding: 12px 14px; font-size: 12.5px; color: var(--gray-900); margin: 14px 0; }
.notice-banner .icon { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; margin-top: 1px; }

@media (min-width: 760px) {
  body { padding-bottom: calc(var(--nav-height) + 8px); }
  .bottom-nav {
    left: 50%; right: auto; transform: translateX(-50%);
    width: min(480px, 90vw); border-radius: 999px; bottom: 16px;
    border-top: none; box-shadow: 0 8px 28px rgba(17,18,28,0.16);
  }

  /* Page produit : média à gauche, infos à droite, au lieu d'empilé */
  #product-detail { display: flex; gap: 28px; align-items: flex-start; }
  #product-detail .media-carousel { flex: 0 0 440px; max-height: 440px; margin-bottom: 0; }
  #product-detail .product-info { flex: 1; min-width: 0; }

  /* Carrousel promo un peu plus grand sur grand écran */
  .promo-slide { min-height: 170px; padding: 32px 40px; }
  .promo-slide h1 { font-size: 24px; max-width: 380px; }
  .promo-slide p { max-width: 380px; }

  /* Header : recherche jamais écrasée par le logo */
  .header-top-row { max-width: 640px; }

  /* Boutique : bannière plus haute */
  .store-hero { min-height: 160px; }

  /* Formulaires des tableaux de bord : éviter des champs étirés sur toute la largeur */
  #product-form, #store-form, #create-store-form, #setup-form, #register-form, #login-form { max-width: 460px; }
}

/* Ordinateur : 3 produits par ligne en tablette, 4 en grand écran (avant : 6 ou plus, trop touffu) */
@media (min-width: 760px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  /* Tablette : une rangée = 6 produits maximum, tous visibles (3 par ligne sur 2 lignes), plus rien de caché à faire défiler */
  .rail-track { flex-wrap: wrap; overflow: visible; gap: 16px; scroll-snap-type: none; }
  .rail-track .product-card { flex: 0 0 calc((100% - 32px) / 3); }
}
@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  /* Ordinateur : 6 produits côte à côte, tous visibles */
  .rail-track { flex-wrap: nowrap; gap: 14px; }
  .rail-track .product-card { flex: 0 0 calc((100% - 70px) / 6); }
  .rail-track .product-card .card-body { padding: 10px; }
  .rail-track .product-card .name { font-size: 13px; }
  .product-card .card-body { padding: 12px; }
  .product-card .name { font-size: 14px; }
}


/* ============================================================
   Boutons lumineux : l'option choisie (ou par défaut) clignote doucement.
   Choix unique : la lumière passe sur la nouvelle option ; choix multiple : toutes les options cochées brillent.
   ============================================================ */
@keyframes ymGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,106,31,.55), 0 0 6px 1px rgba(255,106,31,.40); }
  50%      { box-shadow: 0 0 0 4px rgba(255,106,31,.16), 0 0 16px 4px rgba(255,106,31,.70); }
}
.tab.active, .choice.selected, .choice-card.selected, .delivery-option.selected, .plan-card.selected, .glow {
  animation: ymGlow 1.7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .tab.active, .choice.selected, .choice-card.selected, .delivery-option.selected, .plan-card.selected, .glow {
    animation: none; box-shadow: 0 0 0 3px var(--primary-soft);
  }
}
.choice { display: inline-block; border: 1.5px solid var(--gray-200); background: var(--white); border-radius: 999px; padding: 9px 14px; font-weight: 700; font-size: 13px; cursor: pointer; margin: 0 6px 8px 0; color: var(--ink); }
.choice.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.choice-card { display: block; width: 100%; text-align: left; border: 2px solid var(--gray-200); background: var(--white); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; cursor: pointer; }
.choice-card strong { display: block; font-size: 15px; margin-bottom: 3px; }
.choice-card span { font-size: 12.5px; color: var(--gray-600); }
.choice-card.selected { border-color: var(--primary); background: var(--primary-soft); }


/* Propositions de recherche */
.suggest-box { position: absolute; z-index: 80; background: var(--white); border-radius: 16px; box-shadow: 0 12px 34px rgba(17,18,28,.22); max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; }
.suggest-title { padding: 10px 16px 4px; font-size: 11.5px; font-weight: 800; color: var(--gray-600); text-transform: uppercase; letter-spacing: .4px; }
.suggest-row { display: flex; gap: 10px; align-items: center; padding: 11px 16px; font-size: 14px; color: var(--ink, #1B2A4A); text-decoration: none; border-bottom: 1px solid var(--gray-100, #F1F2F5); }
.suggest-row:last-child { border-bottom: none; }
.suggest-row:hover, .suggest-row:active { background: var(--primary-soft); }
.suggest-row span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-row em { font-style: normal; font-size: 11.5px; color: var(--gray-600); margin-left: 4px; }


/* Messagerie : coches de lecture et indicateur « en train d'écrire » */
.msg-tick { margin-left: 6px; font-weight: 800; font-size: 11px; opacity: .7; letter-spacing: -2px; }
.msg-tick.read { color: #1E88E5; opacity: 1; }
.preview .msg-tick { margin-left: 0; margin-right: 2px; }
#typing-indicator { display: none; flex-shrink: 0; font-size: 12px; color: var(--gray-600); padding: 2px 6px 6px; }
#typing-indicator #typing-name { font-weight: 700; }
.typing-dots span { display: inline-block; font-weight: 800; animation: ymDot 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes ymDot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .typing-dots span { animation: none; } }


/* Photos et vidéos dans la messagerie */
.msg-media { display: block; max-width: 100%; max-height: 300px; border-radius: 10px; margin-bottom: 4px; background: #000; object-fit: contain; }
.msg-bubble a { display: block; }

/* SERVICES : grandes cartes avec vidéo (accueil, onglet Services) */
.product-grid.service-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
.service-card { display: block; background: var(--white); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); transition: transform .12s ease; }
.service-card:active { transform: scale(0.98); }
.svc-media { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0F1530; overflow: hidden; }
.svc-media img, .svc-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #6B7280; }
.svc-badge { position: absolute; top: 10px; left: 10px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 11px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.svc-play { position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; transition: opacity .2s; }
.svc-play .icon { width: 14px; height: 14px; }
.svc-media.playing .svc-play { opacity: 0; }
.svc-body { padding: 14px 16px 16px; }
.svc-cat { font-size: 12.5px; color: var(--gray-600); font-weight: 600; margin-bottom: 4px; }
.svc-name { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.25; margin-bottom: 6px; }
.svc-desc { font-size: 13.5px; color: var(--gray-600); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.svc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--gray-200); padding-top: 12px; }
.svc-price { color: var(--primary); font-weight: 800; font-size: 16px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.svc-price .old-price { color: var(--gray-400); font-weight: 500; font-size: 12px; text-decoration: line-through; }
.svc-price .discount-badge { background: #E24B4B; color: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; }
.svc-cta { background: var(--primary-soft); color: var(--primary-dark); font-size: 13px; font-weight: 800; padding: 9px 14px; border-radius: 10px; white-space: nowrap; }
@media (min-width: 700px) { .product-grid.service-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .product-grid.service-list { grid-template-columns: repeat(3, 1fr); } }
