/* Page Connexions + wizard « Demander la connexion d'une boutique ». */

body.has-overlay { overflow: hidden; }

/* ---------- Logos de marque ---------- */
.logo-tile {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--highlight);
}
.logo-tile svg { width: 22px; height: 22px; }
.logo-tile--sm { width: 26px; height: 26px; border-radius: 7px; }
.logo-tile--sm svg { width: 15px; height: 15px; }
.logo-tile--xl { width: 56px; height: 56px; border-radius: 14px; background: var(--well); }
.logo-tile--xl svg { width: 32px; height: 32px; }
/* Une pastille de logo posée dans un cadre (wizard) prend la taille du cadre au lieu de déborder. */
.logo-tile:has(> .logo-tile) { border: 0; background: none; box-shadow: none; }
.logo-tile > .logo-tile { width: 100%; height: 100%; border-radius: inherit; }
.logo-tile > .logo-tile svg { width: 58%; height: 58%; }

/* ---------- Tableau des connexions ---------- */
.btn--lg { height: 42px; padding: 0 18px; }
.table--conn td { padding-top: 14px; padding-bottom: 14px; }
.conn-shop { display: flex; align-items: center; gap: 12px; min-width: 0; }
.conn-shop div { min-width: 0; }
.conn-shop strong { display: block; font-weight: 600; white-space: nowrap; }
/* `div span` et pas `span` : sinon la règle attrape aussi la pastille logo (span) et casse son centrage. */
.conn-shop div span { display: block; color: var(--muted); font-size: var(--t-xs); }
.host {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--r-sm);
  background: var(--well); border: 1px solid var(--line); color: var(--ink-2); font-size: var(--t-sm); white-space: nowrap;
}
.host svg { width: 12px; height: 12px; color: var(--muted); }
.registrar { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); white-space: nowrap; }
.conn-status { display: flex; align-items: center; gap: 10px; }
.track { display: inline-flex; gap: 3px; }
.track i { width: 16px; height: 3px; border-radius: 2px; background: var(--chip); transition: background var(--dur); }
.track i.on { background: var(--accent); }
.table--conn tbody tr.is-fresh { animation: row-fresh 2.6s var(--ease); }
@keyframes row-fresh { 0%, 30% { background: var(--accent-soft); } 100% { background: transparent; } }
/* Seuils sur la largeur réelle de la carte (barre latérale comprise), pas sur celle de l'écran. */
@container table-wrap (max-width: 1029px) { .table--conn .col-checkout { display: none; } }
@container table-wrap (max-width: 819px) { .table--conn .col-registrar { display: none; } }
@container table-wrap (max-width: 499px) {
  .table--conn .track { display: none; }
  .table--conn .status { height: auto; min-height: 22px; padding-block: 3px; white-space: normal; line-height: 1.25; }
}
@container table-wrap (max-width: 329px) { .table--conn .conn-shop > .logo-tile { display: none; } }

/* ---------- Couche + fenêtre ---------- */
.wz-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(8, 12, 22, 0.42); backdrop-filter: blur(4px); animation: fade-in var(--dur) ease; }
:root[data-theme="dark"] .wz-backdrop { background: rgba(0, 0, 0, 0.6); }
.wz {
  position: fixed; z-index: 51; left: 50%; top: 50%; translate: -50% -50%;
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 48px); display: flex; flex-direction: column;
  border-radius: 20px; background: var(--card-hover); border: 1px solid var(--line-strong);
  box-shadow: var(--highlight), var(--shadow-pop); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  animation: wz-pop var(--dur) var(--ease);
}
@keyframes wz-pop { from { opacity: 0; translate: -50% -46%; scale: 0.97; } to { opacity: 1; translate: -50% -50%; scale: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.wz-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); }
.wz-head strong { display: block; font-size: var(--t-base); font-weight: 650; }
.wz-head span { display: block; color: var(--muted); font-size: var(--t-xs); margin-top: 1px; }
.wz-body { padding: var(--sp-5); overflow-y: auto; }
.wz-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line); }
.wz-foot .btn { min-width: 120px; }

/* Stepper */
.wz-steps { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; }
.wz-steps li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: var(--t-xs); font-weight: 600; }
.wz-steps__dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--chip); color: var(--muted); font-size: var(--t-2xs); font-weight: 700; transition: background var(--dur), color var(--dur); }
.wz-steps__dot svg { width: 12px; height: 12px; }
.wz-steps li.is-current .wz-steps__dot { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.wz-steps li.is-current { color: var(--ink); }
.wz-steps li.is-done .wz-steps__dot { background: var(--ok); color: #fff; }
.wz-steps__label { display: none; }
@media (min-width: 480px) { .wz-steps__label { display: inline; } }
.wz-progress { height: 3px; border-radius: 3px; background: var(--chip); overflow: hidden; margin-bottom: var(--sp-5); }
.wz-progress span { display: block; width: var(--p); height: 100%; border-radius: 3px; background: var(--grad-brand); transition: width var(--dur) var(--ease); }

.wz-pane { animation: pane-in 260ms var(--ease); }
@keyframes pane-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.wz-title { margin: 0; font-size: var(--t-xl); font-weight: 650; letter-spacing: -0.02em; }
.wz-sub { margin: 4px 0 var(--sp-5); color: var(--muted); font-size: var(--t-sm); }
.wz-body .field + .field, .wz-body .field + .wz-safe, .wz-body .checkout-preview + .field { margin-top: var(--sp-4); }
.wz-hint { margin: 2px 0 0; color: var(--muted); font-size: var(--t-xs); }
.wz-err { margin: 4px 0 0; color: var(--bad); font-size: var(--t-xs); font-weight: 600; }
.field.has-error .input, .field.has-error .select { border-color: var(--bad); }
.wz-body .select { width: 100%; height: 40px; font-size: 16px; }
.wz-safe { display: block; position: relative; margin: var(--sp-4) 0 0; padding: 10px 12px 10px 34px; border-radius: var(--r-sm); background: var(--ok-soft); color: var(--ink-2); font-size: var(--t-xs); }
.wz-safe svg { position: absolute; left: 12px; top: 12px; width: 14px; height: 14px; color: var(--ok); }
.wz-safe strong { color: var(--ink); }

/* Étape 1 : cartes d'hébergeur */
.host-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.host-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: var(--sp-5) var(--sp-3);
  border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--card); text-align: center;
  box-shadow: var(--highlight); transition: transform var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
  animation: pane-in 320ms var(--ease) both; animation-delay: calc(var(--i) * 60ms);
}
.host-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--highlight), var(--shadow-card); }
.host-card strong { font-size: var(--t-base); font-weight: 650; }
.host-card > span:not(.logo-tile) { color: var(--muted); font-size: var(--t-xs); line-height: 1.3; }
.host-card.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.host-card__tick { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--on-accent); opacity: 0; scale: 0.6; transition: opacity var(--dur-fast), scale var(--dur-fast); }
.host-card__tick svg { width: 12px; height: 12px; }
.host-card.is-on .host-card__tick { opacity: 1; scale: 1; }
@media (max-width: 480px) {
  .host-grid { grid-template-columns: 1fr; }
  .host-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--sp-3); row-gap: 2px; padding: var(--sp-3) var(--sp-4); text-align: left; }
  .host-card > .logo-tile { grid-row: span 2; }
  .host-card strong { align-self: end; }
  .host-card > span:not(.logo-tile) { align-self: start; }
}

/* Plateforme choisie (rappel) */
.chosen { display: flex; align-items: center; gap: 12px; margin-bottom: var(--sp-5); padding: 10px 12px; border-radius: var(--r-md); background: var(--well); border: 1px solid var(--line); }
.chosen__text { flex: 1; min-width: 0; line-height: 1.3; }
.chosen__text strong { display: block; font-size: var(--t-sm); font-weight: 650; }
.chosen__text span { display: block; color: var(--muted); font-size: var(--t-xs); }
.chosen .link { padding: 0 8px; }

/* Champs avec icône + œil */
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap__icon { position: absolute; left: 12px; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
.input-wrap__icon svg { width: 15px; height: 15px; }
.input { width: 100%; }
.input--iconed { padding-left: 36px; }
.input-wrap__eye { position: absolute; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.input-wrap__eye:hover { background: var(--hover); color: var(--ink); }
.input-wrap__eye svg { width: 16px; height: 16px; }
.input--area { min-height: 64px; padding: 10px 12px; resize: vertical; line-height: 1.5; font-family: inherit; }

/* Aperçu du checkout */
.checkout-preview { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-3); padding: 12px 14px; border-radius: var(--r-md); border: 1px dashed var(--line-strong); background: var(--well); transition: border-color var(--dur), background var(--dur); }
.checkout-preview.is-set { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.checkout-preview__label { color: var(--muted); font-size: var(--t-sm); }
.checkout-preview__host { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.checkout-preview__host svg { width: 14px; height: 14px; color: var(--accent); }
.checkout-preview { flex-wrap: wrap; row-gap: 4px; }
.checkout-preview__host { min-width: 0; overflow-wrap: anywhere; }

/* Récap */
.recap { display: flex; flex-direction: column; margin: 0 0 var(--sp-4); padding: 6px 2px; border-radius: var(--r-md); }
.recap__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: 9px 0; border-top: 1px solid var(--line); }
.recap__row:first-child { border-top: 0; }
.recap__row dt { color: var(--muted); font-size: var(--t-sm); }
.recap__row dd { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--t-sm); font-weight: 600; text-align: right; }

/* Confirmation */
.wz-done { padding: var(--sp-5) var(--sp-2) var(--sp-2); text-align: center; animation: pane-in 320ms var(--ease); }
.wz-done__badge { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto var(--sp-4); border-radius: 50%; background: var(--ok-soft); color: var(--ok); animation: badge-pop 420ms var(--ease) both; }
.wz-done__badge svg { width: 28px; height: 28px; }
@keyframes badge-pop { 0% { opacity: 0; scale: 0.4; } 60% { scale: 1.12; } 100% { opacity: 1; scale: 1; } }
.wz-done h3 { margin: 0 0 6px; font-size: var(--t-xl); font-weight: 650; }
.wz-done > p { margin: 0 auto var(--sp-5); max-width: 42ch; color: var(--muted); font-size: var(--t-sm); }
.wz-timeline { margin: 0 0 var(--sp-5); padding: 0; list-style: none; text-align: left; }
.wz-timeline li { position: relative; display: flex; gap: 14px; padding: 0 0 var(--sp-5) 4px; }
.wz-timeline li > span { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--well); border: 1px solid var(--line); color: var(--accent); z-index: 1; }
.wz-timeline li > span svg { width: 16px; height: 16px; }
.wz-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 34px; bottom: 6px; width: 2px; background: var(--line); }
.wz-timeline div { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.wz-timeline strong { font-size: var(--t-sm); font-weight: 650; }
.wz-timeline div span { color: var(--muted); font-size: var(--t-xs); line-height: 1.4; }
.wz-timeline .host { padding: 1px 6px; }
.wz-done__btn { width: 100%; }

@media (max-width: 560px) {
  .wz { left: 0; right: 0; bottom: 0; top: auto; translate: none; width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; animation: sheet-up var(--dur) var(--ease); }
  @keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
  .wz-head .icon-btn { width: 40px; height: 40px; }
  .input-wrap__eye { right: 0; width: 40px; height: 40px; }
  .input-wrap:has(.input-wrap__eye) .input { padding-right: 44px; }
  .chosen .link { height: 40px; }
  .wz-foot { padding-bottom: calc(var(--sp-4) + env(safe-area-inset-bottom)); }
  .wz-foot .btn { height: 44px; }
}

/* ---------- Pastilles de logo teintées à la marque ---------- */
.brand-badge { background: color-mix(in srgb, var(--brand) 13%, var(--card)); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); color: var(--brand); }
.brand-badge svg { color: var(--brand); }
:root[data-theme="dark"] .brand-badge { background: color-mix(in srgb, var(--brand) 20%, var(--panel-solid, #0c1424)); }
:root[data-theme="dark"] .brand-badge svg { color: color-mix(in srgb, var(--brand) 72%, #ffffff); }

/* ---------- Bannière « Brancher une boutique » ---------- */
.cbanner {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: var(--sp-6); margin-bottom: var(--sp-5);
  padding: var(--sp-6) var(--sp-7); border-radius: 18px; background: var(--card); border: 1px solid var(--line-strong);
  box-shadow: var(--highlight), var(--shadow-card); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.cbanner__wash {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(90% 160% at -5% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(70% 180% at 108% 120%, color-mix(in srgb, var(--accent-2, #00b4ff) 16%, transparent), transparent 55%);
}
.cbanner__text { position: relative; flex: 1; min-width: 0; }
.cbanner__eyebrow {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-ink); font-size: var(--t-xs); font-weight: 600;
}
.cbanner__eyebrow svg { width: 12px; height: 12px; }
.cbanner__text h1 { margin: 12px 0 4px; font-size: var(--t-hero); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.cbanner__text > p { margin: 0; max-width: 54ch; color: var(--ink-2); font-size: var(--t-base); line-height: 1.5; }
.cbanner__text > p strong { color: var(--ink); font-weight: 650; }
.cbanner__brands { display: flex; align-items: center; gap: 8px; margin-top: var(--sp-4); }
.cbanner__brands .logo-tile { width: 32px; height: 32px; border-radius: 9px; }
.cbanner__brands .logo-tile svg { width: 17px; height: 17px; }
.cbanner__brands-label { margin-left: 4px; color: var(--muted); font-size: var(--t-sm); }
.cbanner__cta { position: relative; z-index: 2; flex: none; height: 48px; padding: 0 22px; font-size: var(--t-base); }
/* Ondes concentriques derrière le bouton (effet « connexion »). */
.cbanner__art { position: absolute; top: 50%; right: 70px; translate: 0 -50%; width: 300px; height: 300px; pointer-events: none; z-index: 0; }
.cbanner__ring, .cbanner__ring::before, .cbanner__ring::after {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%; border-radius: 50%; content: "";
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}
.cbanner__ring { width: 120px; height: 120px; animation: ring-pulse 4s var(--ease) infinite; }
.cbanner__ring::before { width: 200px; height: 200px; border-color: color-mix(in srgb, var(--accent) 15%, transparent); }
.cbanner__ring::after { width: 290px; height: 290px; border-color: color-mix(in srgb, var(--accent) 8%, transparent); }
.cbanner__plug { position: absolute; top: 50%; left: 50%; translate: -50% -50%; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--card); border: 1px solid var(--line-strong); color: var(--accent); box-shadow: var(--shadow-card); }
.cbanner__plug svg { width: 20px; height: 20px; }
@keyframes ring-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.7; } }

@media (max-width: 920px) {
  .cbanner { flex-direction: column; align-items: flex-start; gap: var(--sp-4); padding: var(--sp-5); }
  .cbanner__art { display: none; }
  .cbanner__cta { width: 100%; }
}
