/* Houdayouz — univers rose, chaleureux et lisible */
:root {
  --blush-25: #fffafb;
  --blush-50: #fff4f7;
  --blush-100: #ffe6ee;
  --blush-200: #ffcfdf;
  --blush-300: #fdb0c8;
  --rose-400: #f27aa5;
  --rose-500: #e4568c;
  --rose-600: #c93a73;
  --rose-700: #a12a5b;
  --plum-900: #3a1830;
  --plum-700: #5d2f4d;
  --plum-500: #8a5f7b;
  --plum-300: #c3a7b9;
  --line: #f3d6e1;
  --white: #ffffff;
  --mint-600: #16875a;
  --mint-500: #1f9d68;
  --mint-100: #dcf5e9;
  --amber-600: #b46a00;
  --amber-100: #fff0d6;
  --red-600: #c22f3d;
  --red-100: #fde3e5;
  --sky-600: #2f6fb3;
  --sky-100: #e2eefb;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(161, 42, 91, .06), 0 8px 24px -12px rgba(161, 42, 91, .22);
  --shadow-lg: 0 20px 50px -20px rgba(161, 42, 91, .35);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "Tajawal", "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--plum-900);
  background: var(--blush-50);
  background-image:
    radial-gradient(1200px 500px at 110% -10%, rgba(253, 176, 200, .35), transparent 60%),
    radial-gradient(900px 400px at -10% 0%, rgba(255, 207, 223, .45), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--rose-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rose-700); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--plum-500); }
.muted { font-size: .92rem; }
hr { border: 0; border-top: 1px dashed var(--line); margin: 1.25rem 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
[hidden] { display: none !important; }

/* --- Structure --------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 250, 251, .86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--plum-900); }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.5rem; letter-spacing: -.02em; }
.brand-name span { color: var(--rose-500); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  color: var(--plum-700); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.nav a:hover { background: var(--blush-100); color: var(--rose-700); }
.nav a.active { background: var(--rose-500); color: var(--white); box-shadow: 0 6px 16px -8px var(--rose-600); }
.nav svg { width: 18px; height: 18px; }
.nav .badge { background: var(--white); color: var(--rose-600); }
.nav a:not(.active) .badge { background: var(--rose-500); color: var(--white); }
.user-menu { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--plum-500); }
.user-menu form { margin: 0; }
.page { max-width: 1240px; margin: 0 auto; padding: 24px 20px 96px; }
.page-narrow { max-width: 760px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head p { margin: 0; }
.crumbs { font-size: .9rem; margin-bottom: 6px; }
.crumbs a { text-decoration: none; }

.bottomnav { display: none; }

@media (max-width: 900px) {
  .nav, .user-menu .who { display: none; }
  .topbar-inner { padding: 10px 16px; justify-content: space-between; }
  .page { padding: 18px 16px 110px; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(6, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px;
    color: var(--plum-500); text-decoration: none; font-size: .68rem; font-weight: 700; position: relative;
  }
  .bottomnav a.active { color: var(--rose-600); background: var(--blush-100); }
  .bottomnav svg { width: 22px; height: 22px; }
  .bottomnav .badge { position: absolute; top: 0; right: 14%; font-size: .65rem; padding: 0 6px; }
}

/* --- Composants -------------------------------------------------------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card.soft { background: var(--blush-25); box-shadow: none; }
.card.tight { padding: 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-sidebar { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.btn {
  --bg: var(--rose-500); --fg: var(--white); --bd: transparent;
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--bd);
  background: var(--bg); color: var(--fg); font: 700 .95rem/1.1 var(--font-body);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { color: var(--fg); filter: brightness(1.04); box-shadow: 0 8px 18px -10px rgba(161, 42, 91, .6); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn svg { width: 18px; height: 18px; }
.btn-ghost { --bg: var(--white); --fg: var(--rose-700); --bd: var(--blush-300); }
.btn-ghost:hover { --bg: var(--blush-50); }
.btn-soft { --bg: var(--blush-100); --fg: var(--rose-700); }
.btn-call { --bg: var(--mint-500); --fg: var(--white); }
.btn-call:hover { box-shadow: 0 8px 18px -10px var(--mint-600); }
.btn-danger { --bg: var(--white); --fg: var(--red-600); --bd: #f2b8bf; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .85rem; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--rose-600); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; padding: 1px 7px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--blush-100); color: var(--rose-700); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.plain::before { display: none; }
.chip.green { background: var(--mint-100); color: var(--mint-600); }
.chip.amber { background: var(--amber-100); color: var(--amber-600); }
.chip.red { background: var(--red-100); color: var(--red-600); }
.chip.blue { background: var(--sky-100); color: var(--sky-600); }
.chip.grey { background: #f1ecef; color: var(--plum-500); }

.flash { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.flash li { padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; border: 1px solid; }
.flash .success { background: var(--mint-100); border-color: #b8e8d0; color: var(--mint-600); }
.flash .error { background: var(--red-100); border-color: #f5c2c8; color: var(--red-600); }
.flash .warning { background: var(--amber-100); border-color: #f6d9a6; color: var(--amber-600); }
.flash .info { background: var(--sky-100); border-color: #c8dcf3; color: var(--sky-600); }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--blush-50); border: 1px dashed var(--blush-300); color: var(--plum-700); font-size: .93rem; }
.notice.warn { background: var(--amber-100); border-color: #f0cf91; color: #7a4a00; }
.notice.err { background: var(--red-100); border-color: #f2b8bf; color: var(--red-600); }
.notice.ok { background: var(--mint-100); border-color: #b8e8d0; color: #0f5f3f; }
.error-text { color: var(--red-600); font-size: .88rem; font-weight: 600; margin-top: 4px; }

/* --- Formulaires -------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-weight: 700; font-size: .92rem; color: var(--plum-700); }
.field .hint { font-size: .84rem; color: var(--plum-500); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--white); color: var(--plum-900);
  font: 500 1rem var(--font-body); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rose-400); box-shadow: 0 0 0 4px rgba(242, 122, 165, .18); }
input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--rose-500); margin-top: 2px; flex: none; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 46px; }
.input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--plum-500); font-weight: 700; font-size: .9rem; }
.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--blush-100); gap: 4px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span { display: inline-block; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .92rem; color: var(--plum-700); cursor: pointer; }
.segmented input:checked + span { background: var(--white); color: var(--rose-700); box-shadow: var(--shadow); }
.segmented input:focus-visible + span { outline: 2px solid var(--rose-400); }

/* --- Tableaux ------------------------------------------------------------ */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .94rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--plum-500); font-weight: 800; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 10px; border-bottom: 1px solid #f8e7ee; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--blush-25); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }

/* Matrice couleur × taille */
.matrix { display: grid; gap: 10px; }
.matrix-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius-sm); background: var(--blush-25); border: 1px solid var(--line); }
.matrix-color { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.matrix-color img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; }
.matrix-cells { display: flex; flex-wrap: wrap; gap: 8px; }
.cell { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 70px; }
.cell .size { font-size: .82rem; font-weight: 800; color: var(--plum-700); }
.cell input { width: 70px; text-align: center; padding: 8px 6px; min-height: 40px; }
.cell input.extra { border-color: var(--rose-400); background: var(--blush-50); }
.cell .stock { font-size: .78rem; color: var(--plum-500); text-align: center; line-height: 1.3; }
.cell .stock b { color: var(--plum-900); font-size: 1rem; }
.cell.zero .stock b { color: var(--red-600); }
@media (max-width: 600px) { .matrix-row { grid-template-columns: 1fr; } }

/* --- Indicateurs --------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: var(--blush-100); opacity: .7; }
.kpi.hot { background: linear-gradient(140deg, var(--rose-500), var(--rose-400)); color: var(--white); border-color: transparent; }
.kpi.hot::after { background: rgba(255, 255, 255, .15); }
.kpi .k-label { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; opacity: .8; position: relative; z-index: 1; }
.kpi .k-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; margin-top: 6px; position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: .82rem; opacity: .85; margin-top: 2px; position: relative; z-index: 1; }
.kpi.neg .k-value { color: var(--red-600); }

.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerts a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--blush-25); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.alerts a:hover { border-color: var(--blush-300); background: var(--blush-50); }
.alerts .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--rose-500); }
.alerts .rupture .dot, .alerts .erreur .dot { background: var(--red-600); }
.alerts .probleme .dot { background: var(--amber-600); }
.alerts .retour .dot { background: var(--sky-600); }
.alerts strong { display: block; }
.alerts span { font-size: .88rem; color: var(--plum-500); }

.breakdown { width: 100%; border-collapse: collapse; }
.breakdown td { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.breakdown tr.total td { border-bottom: 0; border-top: 2px solid var(--plum-900); font-size: 1.1rem; font-weight: 800; padding-top: 10px; }
.breakdown .minus td:last-child::before { content: "− "; color: var(--plum-500); }

.period { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.period a { padding: 6px 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--plum-700); font-weight: 700; font-size: .86rem; }
.period a.on { background: var(--plum-900); color: var(--white); border-color: var(--plum-900); }
.period form { display: flex; gap: 6px; align-items: center; }
.period input[type=date] { min-height: 34px; padding: 4px 8px; font-size: .86rem; width: auto; }

/* --- Commandes ----------------------------------------------------------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; gap: 8px; align-items: center; padding: 9px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--plum-700); font-weight: 800; font-size: .92rem; }
.tabs a.on { background: var(--rose-500); color: var(--white); border-color: var(--rose-500); }
.tabs a .badge { background: var(--blush-100); color: var(--rose-700); }
.tabs a.on .badge { background: var(--white); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { max-width: 280px; min-height: 40px; }
.toolbar input[type=date] { width: auto; min-height: 40px; }
.bulkbar { position: sticky; bottom: 76px; z-index: 15; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 999px; background: var(--plum-900); color: var(--white); box-shadow: var(--shadow-lg); margin-top: 12px; }
@media (min-width: 901px) { .bulkbar { bottom: 16px; } }
.bulkbar .btn-ghost { --bg: transparent; --fg: var(--white); --bd: rgba(255, 255, 255, .35); }

.order-list { display: grid; gap: 10px; }
.order-card { display: grid; grid-template-columns: 28px minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.order-card.dup { border-color: var(--amber-600); }
.order-card .sel input { width: 20px; height: 20px; accent-color: var(--rose-500); }
.order-ref { font-weight: 800; text-decoration: none; color: var(--plum-900); }
.order-ref:hover { color: var(--rose-600); }
.order-meta { font-size: .84rem; color: var(--plum-500); }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumb { display: flex; gap: 8px; align-items: center; background: var(--blush-25); border-radius: 12px; padding: 4px 10px 4px 4px; font-size: .84rem; }
.thumb img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; }
.thumb b { font-weight: 800; }
.order-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.phone { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.copy { border: 0; background: var(--blush-100); color: var(--rose-700); border-radius: 8px; padding: 2px 8px; font-size: .75rem; font-weight: 800; cursor: pointer; }
@media (max-width: 1000px) {
  .order-card { grid-template-columns: 28px 1fr; }
  .order-card > :nth-child(n+3) { grid-column: 2; }
  .order-actions { justify-content: flex-start; }
}
.callbox { display: flex; flex-wrap: wrap; gap: 6px; }
details.more > summary { cursor: pointer; font-weight: 700; color: var(--rose-700); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; }
details.more[open] > summary::before { content: "– "; }
details.more[open] > summary { margin-bottom: 10px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--blush-200); }
.timeline li { position: relative; padding: 0 0 14px 10px; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 3px solid var(--rose-400); }
.timeline time { display: block; font-size: .78rem; color: var(--plum-500); }

.empty { text-align: center; padding: 40px 20px; color: var(--plum-500); }
.empty svg { width: 64px; height: 64px; margin: 0 auto 12px; color: var(--blush-300); }

/* --- Produits ------------------------------------------------------------ */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.product { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s; }
.product:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: inherit; }
.product .ph { aspect-ratio: 4 / 3; background: var(--blush-100); position: relative; }
.product .ph img { width: 100%; height: 100%; object-fit: cover; }
.product .swatches { position: absolute; left: 10px; bottom: 10px; display: flex; gap: -6px; }
.product .swatches img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--white); object-fit: cover; margin-right: -8px; }
.product .body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.product .name { font-weight: 800; }
.product .meta { display: flex; justify-content: space-between; font-size: .88rem; color: var(--plum-500); }

.color-block { border: 1px dashed var(--blush-300); border-radius: var(--radius-sm); padding: 14px; background: var(--blush-25); margin-bottom: 12px; }
.color-tile { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.color-tile img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.size-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--blush-100); font-weight: 700; font-size: .85rem; }
.size-tag form { display: inline; }
.size-tag button { border: 0; background: none; color: var(--plum-500); cursor: pointer; padding: 0 0 0 2px; font-size: 1rem; line-height: 1; }

/* --- Assistant ----------------------------------------------------------- */
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; counter-reset: s; flex-wrap: wrap; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-weight: 700; font-size: .88rem; color: var(--plum-500); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blush-100); color: var(--rose-700); font-weight: 800; }
.steps li.on { color: var(--plum-900); border-color: var(--rose-400); }
.steps li.on::before { background: var(--rose-500); color: var(--white); }
.steps li.done::before { content: "✓"; background: var(--mint-500); color: var(--white); }

/* --- Pages d'accueil / auth ----------------------------------------------- */
.auth { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 30px 16px; }
.auth .card { width: 100%; max-width: 440px; padding: 28px; }
.hero { max-width: 1100px; margin: 0 auto; padding: 56px 20px 40px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-style: italic; }
.hero h1 em { color: var(--rose-500); font-style: italic; }
.hero p.lead { font-size: 1.15rem; color: var(--plum-700); max-width: 520px; }
.hero-art { position: relative; }
.hero-card { background: var(--white); border-radius: 26px; box-shadow: var(--shadow-lg); padding: 18px; border: 1px solid var(--line); transform: rotate(1.5deg); }
.hero-card + .hero-card { margin: -30px 0 0 40px; transform: rotate(-2deg); }
.features { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .hero, .features { grid-template-columns: 1fr; } .hero { padding-top: 30px; } }
.code-box { font-family: ui-monospace, Menlo, monospace; font-size: 1.4rem; letter-spacing: .12em; text-align: center; padding: 18px; border-radius: var(--radius-sm); background: var(--blush-50); border: 2px dashed var(--rose-400); font-weight: 800; user-select: all; }

/* --- Page cliente arabe ---------------------------------------------------- */
.cod { font-family: var(--font-ar); direction: rtl; text-align: right; }
.cod .wrap { max-width: 560px; margin: 0 auto; padding: 18px 16px 40px; }
.cod-head { text-align: center; padding: 12px 0 18px; }
.cod-head .shopname { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; color: var(--rose-600); direction: ltr; }
.cod-head p { margin: 4px 0 0; color: var(--plum-500); }
.cod .card { padding: 18px; }
.cod h2 { font-family: var(--font-ar); font-weight: 800; font-size: 1.15rem; }
.cod-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cod-line:last-child { border-bottom: 0; }
.cod-line img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; flex: none; }
.cod-line .info { flex: 1; }
.cod-line .name { font-weight: 800; }
.cod-line .opts { font-size: .9rem; color: var(--plum-500); }
.cod-line .opts bdi { color: var(--plum-900); font-weight: 700; }
.cod-line .price { font-weight: 800; white-space: nowrap; }
.cod input, .cod select, .cod textarea { font-family: var(--font-ar); font-size: 1rem; text-align: right; }
.cod input[type=tel] { direction: ltr; text-align: right; }
.cod .field label { font-size: 1rem; }
.cod .modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cod .mode { position: relative; }
.cod .mode input { position: absolute; opacity: 0; }
.cod .mode span { display: block; padding: 14px 12px; border: 2px solid var(--line); border-radius: 14px; text-align: center; font-weight: 800; cursor: pointer; background: var(--white); }
.cod .mode input:checked + span { border-color: var(--rose-500); background: var(--blush-50); color: var(--rose-700); }
.cod .mode input:disabled + span { opacity: .45; cursor: not-allowed; }
.cod .mode input:focus-visible + span { outline: 3px solid var(--blush-300); }
.cod .totals { display: grid; gap: 6px; font-size: 1.02rem; }
.cod .totals div { display: flex; justify-content: space-between; }
.cod .totals .grand { font-size: 1.3rem; font-weight: 800; padding-top: 8px; border-top: 2px solid var(--plum-900); margin-top: 4px; }
.cod .totals bdi { font-variant-numeric: tabular-nums; }
.swatch-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch-picker label { position: relative; cursor: pointer; text-align: center; font-size: .85rem; font-weight: 700; }
.swatch-picker input { position: absolute; opacity: 0; }
.swatch-picker img { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; border: 3px solid transparent; margin-bottom: 4px; }
.swatch-picker input:checked + img { border-color: var(--rose-500); box-shadow: 0 6px 14px -6px var(--rose-600); }
.size-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.size-picker label { position: relative; }
.size-picker input { position: absolute; opacity: 0; }
.size-picker span { display: inline-block; min-width: 52px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); text-align: center; font-weight: 800; background: var(--white); cursor: pointer; }
.size-picker input:checked + span { border-color: var(--rose-500); background: var(--blush-50); color: var(--rose-700); }
.size-picker input:disabled + span { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; direction: ltr; }
.qty button { width: 42px; height: 42px; border: 0; background: var(--blush-50); font-size: 1.3rem; font-weight: 800; color: var(--rose-700); cursor: pointer; }
.qty input { width: 52px; border: 0; text-align: center; min-height: 42px; border-radius: 0; padding: 0; }
.cod .submit { position: sticky; bottom: 0; padding: 12px 0 calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--blush-50) 30%); }
.success-art { width: 120px; height: 120px; margin: 10px auto 18px; }

@media print {
  .topbar, .bottomnav, .bulkbar, .no-print { display: none !important; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Ajustements après recette visuelle */
.user-menu .who { white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
  .user-menu .logout { display: none; }
  .toolbar input[type=search] { flex: 1 1 100%; max-width: none; }
  .toolbar input[type=date] { flex: 1 1 40%; min-width: 0; }
  .page-head .btn { min-height: 36px; }
}
