/*
 * tsp-partner.css — espace partenaire (/customer/partner…) : titre et statut, lien et code, QR code, ventes, paiements,
 * coordonnées de paiement, inscription.
 *
 * Chargée après tsp-customer.css, dont elle reprend les variables (définies sur .tsp-cust) : mêmes couleurs pastel,
 * mêmes arrondis. Propriétés logiques : la mise en page s'inverse d'elle-même en arabe.
 */

.tsp-cust { --tsp-lilac-bg: #f1edfb; --tsp-lilac-bd: #d9cff3; --tsp-lilac: #5b4a8b; }

/* Titre et statut */
.tsp-p-head { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 14px; }

.tsp-p-head .tsp-c-title { margin: 0; }

.tsp-p-status.is-active { border-color: var(--tsp-green-bd); background: var(--tsp-green-bg); color: #1d6b37; }

.tsp-p-status.is-pending, .tsp-p-status.is-unverified { border-color: var(--tsp-lilac-bd); background: var(--tsp-lilac-bg); color: var(--tsp-lilac); }

.tsp-p-status.is-refused, .tsp-p-status.is-suspended, .tsp-p-status.is-closed { border-color: var(--tsp-red-bd); background: var(--tsp-red-bg); color: var(--tsp-red); }

.tsp-p-state ul, .tsp-p-contact { margin: 0; padding-inline-start: 18px; }

/* Mentions */
.tsp-p-keep {
  margin: 12px 0; padding: 12px 16px; border: 1px solid var(--tsp-green-bd); border-radius: var(--tsp-radius-btn);
  background: var(--tsp-green-bg); color: #1d5e33; font-size: 14px;
}

.tsp-p-privacy { margin-top: 12px; }

/* Indicateurs et solde */
.tsp-p-kpis { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.tsp-p-kpis .tsp-c-stat-num { font-size: 20px; }

.tsp-p-balance-amount { margin: 0 0 6px; color: var(--tsp-navy); font-size: 18px; font-weight: 800; }

/* Lien, code et QR code */
.tsp-p-link-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; align-items: start; }

.tsp-p-label { display: block; margin: 10px 0 6px; color: var(--tsp-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }

.tsp-p-copy { display: flex; gap: 8px; align-items: center; }

.tsp-p-copy[hidden] { display: none; }

.tsp-p-copy input {
  flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--tsp-border2);
  border-radius: var(--tsp-radius-btn); background: var(--tsp-bg); color: var(--tsp-navy); font: 600 14px/1.3 var(--tsp-font);
}

.tsp-p-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 0; }

.tsp-p-qr { margin: 0; padding: 12px; border: 1px solid var(--tsp-border); border-radius: var(--tsp-radius); background: #fff; text-align: center; }

.tsp-p-qr img { display: block; width: 180px; height: 180px; margin: 0 auto 8px; }

.tsp-p-qr figcaption { color: var(--tsp-muted); font-size: 13px; }

/* Ventes */
.tsp-p-src, .tsp-p-base { display: block; font-size: 12px; }

.tsp-p-sales td { vertical-align: top; }

/* Paiements */
.tsp-p-payout .tsp-c-facts { margin-bottom: 12px; }

.tsp-p-payout .tsp-c-facts li span { color: var(--tsp-muted); }

.tsp-p-docs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }

.tsp-p-problem { margin-top: 12px; }

.tsp-p-problem summary { color: var(--tsp-blue); font-size: 14px; font-weight: 600; cursor: pointer; }

.tsp-p-problem form { margin-top: 10px; }

/* Inscription et coordonnées */
.tsp-p-join .tsp-c-subtitle { margin-top: 22px; }

.tsp-p-types, .tsp-p-methods { margin: 0 0 14px; padding: 0; border: 0; }

.tsp-p-types legend, .tsp-p-methods legend { margin-bottom: 6px; color: var(--tsp-navy); font-size: 14px; font-weight: 700; }

.tsp-p-types .tsp-c-check, .tsp-p-methods .tsp-c-check { margin: 6px 0; }

.tsp-p-socials { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Formulaire « Devenir partenaire » : sections, largeur de lecture, choix du profil en tuiles. */
.tsp-p-joinform { max-width: 760px; margin-inline: auto; gap: 18px; }

.tsp-p-sec { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; border: 1px solid var(--tsp-border); border-radius: 14px; background: var(--tsp-surface); }

.tsp-p-join .tsp-p-sec-title { display: flex; align-items: center; gap: 10px; margin: 0 0 2px; font-size: 17px; }

.tsp-p-sec-title .tsp-c-ico { position: static; display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 9px; background: var(--tsp-blue-soft); color: var(--tsp-blue); transform: none; }

.tsp-p-type-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }

.tsp-p-types .tsp-c-check.tsp-p-tile { position: relative; align-items: center; margin: 0; padding: 12px 14px; border: 1.5px solid var(--tsp-border2); border-radius: 12px; background: #fff; transition: border-color .12s, background-color .12s; }

.tsp-p-tile .tsp-c-ico { position: static; color: var(--tsp-blue); transform: none; }

.tsp-p-types .tsp-c-check.tsp-p-tile:has(input:checked) { border-color: var(--tsp-blue); background: var(--tsp-blue-soft); }

.tsp-p-socials-box { padding: 14px 16px 16px; border-radius: 12px; background: #f8f9fd; }

.tsp-p-socials-box .tsp-c-minititle { margin: 0; }

.tsp-p-socials-box > .tsp-c-hint { margin: 2px 0 10px; }

.tsp-p-social label { font-size: 13px; }

.tsp-p-sec-terms { gap: 10px; }

/* Espace partenaire, Réglages : profil (réseaux en pastilles cliquables). */
.tsp-p-profile { margin-bottom: 18px; }

.tsp-p-profile .tsp-p-sec-title { display: flex; align-items: center; gap: 10px; margin-top: 0; }

.tsp-p-social-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }

.tsp-p-social-chips li { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--tsp-border); border-radius: 999px; background: #f8f9fd; font-size: 14px; }

.tsp-p-social-chips .tsp-c-ico { position: static; color: var(--tsp-blue); transform: none; }

.tsp-p-profile-facts { margin: 0 0 10px; }

.tsp-p-profile-facts li { display: inline-flex; align-items: center; gap: 6px; }

.tsp-p-profile-facts .tsp-c-ico { position: static; color: var(--tsp-blue); transform: none; }

.tsp-p-profile-facts li span:not(.tsp-c-ico) { color: var(--tsp-muted); }

.tsp-p-profile-pres { margin: 0 0 12px; padding: 10px 14px; border-inline-start: 3px solid var(--tsp-blue-soft); color: var(--tsp-body); line-height: 1.6; }

.tsp-p-chip-net { color: var(--tsp-muted); font-size: 12px; }

.tsp-p-profile-edit summary { margin: 4px 0 12px; color: var(--tsp-blue); font-weight: 600; cursor: pointer; }

.tsp-p-join textarea, .tsp-p-payform textarea, .tsp-p-problem textarea, .tsp-p-profile textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--tsp-border2); border-radius: var(--tsp-radius-btn);
  background: #fff; color: var(--tsp-text); font: 15px/1.5 var(--tsp-font);
}

.tsp-p-group { margin-top: 14px; }

.tsp-p-group[hidden] { display: none; }

/* Cases et boutons radio aux couleurs de la boutique (le thème peut les teinter autrement). */
.tsp-cust .tsp-p-join input[type="radio"], .tsp-cust .tsp-p-join input[type="checkbox"],
.tsp-cust .tsp-p-payform input[type="radio"] { accent-color: var(--tsp-blue); }

.tsp-cust .tsp-p-fees th { color: var(--tsp-navy); font-size: 14px; font-weight: 600; letter-spacing: 0; text-align: start; text-transform: none; }

.tsp-p-text { line-height: 1.7; }

/* Commander pour un client. */
.tsp-pl-lines { display: grid; gap: 8px; margin-bottom: 10px; }

.tsp-pl-line { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 8px; align-items: center; }

.tsp-pl-line[hidden] { display: none; }

.tsp-pl-line select, .tsp-pl-line input { width: 100%; }

.tsp-pl-form .tsp-c-subtitle { margin-top: 22px; }

.tsp-pl-form textarea, .tsp-oc textarea, .tsp-oc-contest textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--tsp-border2); border-radius: var(--tsp-radius-btn);
  background: #fff; color: var(--tsp-text); font: 15px/1.5 var(--tsp-font);
}

.tsp-pl-pay { margin: 16px 0 10px; padding: 0; border: 0; }

.tsp-pl-pay legend { margin-bottom: 6px; color: var(--tsp-navy); font-size: 14px; font-weight: 700; }

.tsp-cust .tsp-pl-form input[type="radio"], .tsp-cust .tsp-pl-form input[type="checkbox"] { accent-color: var(--tsp-blue); }

.tsp-pl-summary { border-color: var(--tsp-lilac-bd); background: var(--tsp-lilac-bg); }

.tsp-pl-done .tsp-c-notice { margin-top: 0; }

.tsp-pl-sub { display: block; font-size: 12px; }

/* Lien du client : copié par le bouton, champ invisible (une ligne de tableau ne déborde pas). */
.tsp-pl-copy { position: relative; }

.tsp-pl-url { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

.tsp-pl-table td:last-child { white-space: nowrap; }

.tsp-oc-actions form + .tsp-oc-contest { margin-top: 16px; }

.tsp-oc-contest summary { color: var(--tsp-muted); font-size: 14px; font-weight: 600; cursor: pointer; }

@media (max-width: 720px) {

  .tsp-p-link-grid { grid-template-columns: minmax(0, 1fr); }

  .tsp-p-copy { flex-wrap: wrap; }

  .tsp-p-socials { grid-template-columns: minmax(0, 1fr); }

  .tsp-p-sec { padding: 14px 14px 16px; }

  .tsp-pl-line { grid-template-columns: minmax(0, 1fr) 72px; }

  .tsp-pl-line .tsp-pl-remove { grid-column: 1 / -1; justify-self: start; }
}
