/* ==========================================================================
   Espace partenaire — page unique, design inspiré du dashboard Bounce,
   aux couleurs Stash & Go (tokens.css chargé avant ce fichier).
   ========================================================================== */

/* Polices : les mêmes woff2 que le site public. */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/Manrope-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/Manrope-800-latin.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/DMSans-400-latin.woff2") format("woff2");
}

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

.ep {
  min-height: 100vh;
  background: #F6F7FC;
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.ep a { color: var(--c-primary); }
.ep h1, .ep h2 { font-family: var(--f-display); color: var(--c-ink); }

/* ---------- Barre du haut ---------- */
.ep-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: #fff;
  border-bottom: .75px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.ep-topbar img { display: block; }
.ep-topbar__droite { display: flex; align-items: center; gap: 16px; }
.ep-topbar__nom { font-weight: 500; color: var(--c-body); }
.ep-topbar__sortie {
  font-size: 14px;
  color: var(--c-body);
  text-decoration: none;
  padding: 8px 16px;
  border: .75px solid var(--c-border);
  border-radius: 999px;
  transition: color .15s, border-color .15s;
}
.ep-topbar__sortie:hover { color: var(--c-primary); border-color: var(--c-primary); }

/* ---------- Corps ---------- */
.ep-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 40px) 40px;
}
.ep-titre { font-size: clamp(26px, 4vw, 34px); font-weight: 800; }
.ep-sous-titre { margin: 8px 0 28px; color: var(--c-body); }
.ep-vide { color: var(--c-body); }
.ep-note { margin-top: 14px; font-size: 13px; color: var(--c-body-2); }
.ep-erreur {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: #FDECEC;
  color: #B4232A;
  border-radius: 12px;
  font-size: 14px;
}

/* ---------- Disposition : sommaire collant + contenu ---------- */
.ep-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.ep-nav {
  position: sticky;
  top: 102px;
  padding: 14px 10px;
  background: #fff;
  border: .75px solid var(--c-border);
  border-radius: 20px;
}
.ep-nav nav { display: flex; flex-direction: column; gap: 2px; }
.ep-nav__lien {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  font: 700 13.5px var(--f-display);
  color: var(--c-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.ep-nav__lien:hover { background: var(--c-bg-ghost); color: var(--c-primary); }
.ep-nav__lien.is-active { background: #E7EBFF; color: var(--c-primary); }
.ep-nav__trait {
  margin: 8px 4px;
  border: 0;
  border-top: .75px solid var(--c-border);
}
/* Cibles d'ancre : rester visibles sous la topbar sticky. */
.ep-contenu [id] { scroll-margin-top: 110px; }

@media (max-width: 900px) {
  .ep-layout { display: block; }
  .ep-nav {
    position: static;
    margin-bottom: 20px;
    padding: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ep-nav nav { flex-direction: row; gap: 4px; }
  .ep-nav__trait { display: none; }
}

/* ---------- Carte héro : le lien partenaire ---------- */
.ep-hero {
  display: flex;
  gap: 32px;
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
  background: linear-gradient(135deg, #EEF0FF 0%, #FAFAFF 60%, #F3F9FF 100%);
  border: .75px solid #DDE1FB;
  border-radius: 28px;
  margin-bottom: 24px;
}
.ep-hero__contenu { flex: 1; min-width: 0; }
.ep-hero h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.ep-hero p { color: var(--c-body); max-width: 56ch; }
.ep-hero__lien {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.ep-hero__lien input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font: 500 15px var(--f-body);
  color: var(--c-ink);
  background: #fff;
  border: .75px solid var(--c-border);
  border-radius: 14px;
}
.ep-hero__lien input:focus { outline: 2px solid var(--c-indigo-200); }
.ep-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.ep-hero__qr {
  flex-shrink: 0;
  text-align: center;
  background: #fff;
  border: .75px solid var(--c-border);
  border-radius: 20px;
  padding: 16px 16px 10px;
}
.ep-hero__qr img { display: block; }
.ep-hero__qr p { margin-top: 6px; font-size: 12px; color: var(--c-body-2); }

/* ---------- Boutons ---------- */
.ep-btn {
  display: inline-block;
  padding: 12px 22px;
  font: 700 14px var(--f-display);
  color: #fff;
  background: var(--c-primary);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.ep-btn:hover { background: var(--c-primary-700); }
.ep-btn--clair {
  background: #fff;
  color: var(--c-primary);
  border: .75px solid #DDE1FB;
}
.ep-btn--clair:hover { background: #fff; border-color: var(--c-primary); }
.ep-btn.is-copie { background: #12A150; }

/* ---------- Chiffres clés ---------- */
.ep-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.ep-stat {
  padding: 20px 22px;
  background: #fff;
  border: .75px solid var(--c-border);
  border-radius: 20px;
}
.ep-stat--accent { background: var(--c-primary); border-color: var(--c-primary); }
.ep-stat--accent .ep-stat__valeur,
.ep-stat--accent .ep-stat__valeur span,
.ep-stat--accent .ep-stat__libelle { color: #fff; }
.ep-stat__valeur {
  font: 800 26px/1.2 var(--f-display);
  color: var(--c-ink);
  overflow-wrap: anywhere;
}
.ep-stat__valeur span { font-size: 14px; color: var(--c-body-2); }
.ep-stat__libelle { margin-top: 4px; font-size: 13px; color: var(--c-body-2); }

/* ---------- Cartes génériques ---------- */
.ep-carte {
  padding: clamp(20px, 3vw, 32px);
  background: #fff;
  border: .75px solid var(--c-border);
  border-radius: 24px;
  margin-bottom: 24px;
}
.ep-carte h2 { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
/* L'ancre du sélecteur d'année atterrit sous la topbar sticky :
   la marge de défilement garde le titre visible. */
.ep-carte h2[id] { scroll-margin-top: 110px; }
.ep-carte__tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ep-carte__tete h2 { margin-bottom: 0; }

/* Sélecteur d'année du graphique (puces 2025 / 2026). */
.ep-annees { display: flex; gap: 6px; }
.ep-annees__choix {
  padding: 6px 14px;
  border-radius: 999px;
  border: .75px solid var(--c-border);
  font: 700 13px var(--f-display);
  color: var(--c-body);
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.ep-annees__choix:hover { color: var(--c-primary); border-color: var(--c-primary); }
.ep-annees__choix.is-active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

/* Onglets de la carte commissions (détail des gains / des paiements),
   soulignés façon Bounce. */
.ep-onglets { display: flex; gap: 2px; }
.ep-onglets__choix {
  padding: 8px 14px 10px;
  font: 700 13.5px var(--f-display);
  color: var(--c-body-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.ep-onglets__choix:hover { color: var(--c-primary); }
.ep-onglets__choix.is-active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}

/* Pagination du tableau des commissions. */
.ep-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.ep-pagination__choix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  border: .75px solid var(--c-border);
  font: 700 13px var(--f-display);
  color: var(--c-body);
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.ep-pagination__choix:hover { color: var(--c-primary); border-color: var(--c-primary); }
.ep-pagination__choix.is-active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.ep-pagination__points { color: var(--c-body-2); padding: 0 2px; }
.ep-pagination__info {
  margin-left: auto;
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--c-body-2);
}

/* Bandeau « prochain règlement » de l'onglet paiements. */
.ep-avenir {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #E7EBFF;
  border-radius: 12px;
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--c-body);
}

/* Alerte « RIB manquant », jaune façon Bounce. */
.ep-alerte {
  margin: 0 0 20px;
  padding: 13px 16px;
  background: #FFF6DE;
  border: .75px solid #F2DFAC;
  border-radius: 12px;
  font-family: var(--f-body);
  font-size: 14px;
  color: #6B5310;
}
.ep-alerte a { font-weight: 700; color: var(--c-primary); }

/* Formulaire des coordonnées bancaires (onglet paiements). */
.ep-form {
  margin-top: 24px;
  padding: 22px;
  background: var(--c-bg-ghost);
  border: .75px solid var(--c-border);
  border-radius: 16px;
  scroll-margin-top: 110px;
}
.ep-form__titre {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--c-ink);
  margin-bottom: 4px;
}
.ep-form__texte {
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--c-body-2);
  margin-bottom: 16px;
}
.ep-form__rang {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ep-form__champ { margin-bottom: 14px; }
.ep-form__champ label {
  display: block;
  margin-bottom: 6px;
  font: 700 13px var(--f-display);
  color: var(--c-ink);
}
.ep-form__champ label span { font-weight: 400; color: var(--c-body-2); }
.ep-form__champ input {
  width: 100%;
  padding: 11px 14px;
  font: 500 15px var(--f-body);
  color: var(--c-ink);
  background: #fff;
  border: .75px solid var(--c-border);
  border-radius: 12px;
}
.ep-form__champ input:focus { outline: 2px solid var(--c-indigo-200); }
.ep-form__maj {
  margin-left: 12px;
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--c-body-2);
}
.ep-succes {
  margin: 0 0 14px;
  padding: 10px 14px;
  background: #E2F7EA;
  color: #12784A;
  border-radius: 12px;
  font-family: var(--f-body);
  font-size: 14px;
}
@media (max-width: 640px) {
  .ep-form__rang { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Graphique des gains (barres CSS) ---------- */
.ep-graphe {
  display: flex;
  align-items: flex-end;
  gap: clamp(4px, 1.2vw, 14px);
  height: 190px;
  padding-top: 24px;
}
.ep-graphe__mois {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
  min-width: 0;
}
.ep-graphe__barre {
  width: min(100%, 34px);
  background: linear-gradient(180deg, var(--c-indigo-400), var(--c-primary));
  border-radius: 8px 8px 3px 3px;
}
.ep-graphe__valeur {
  font: 700 11px var(--f-display);
  color: var(--c-primary);
  white-space: nowrap;
}
.ep-graphe__nom { font-size: 12px; color: var(--c-body-2); }

/* ---------- Tableau des commissions ---------- */
.ep-table-wrap { overflow-x: auto; }
.ep-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ep-table th {
  text-align: left;
  padding: 10px 14px;
  font: 700 12px var(--f-display);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-body-2);
  border-bottom: .75px solid var(--c-border);
}
.ep-table td {
  padding: 13px 14px;
  border-bottom: .75px solid #F0F1F8;
  color: var(--c-body);
  white-space: nowrap;
}
.ep-table tr:last-child td { border-bottom: 0; }
.ep-table code {
  font: 600 13px ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--c-ink);
}
.ep-table__montant { font-weight: 600; color: var(--c-ink); }

.ep-pastille {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font: 600 12px var(--f-body);
}
.ep-pastille--en_attente { background: #FFF4DE; color: #9A6700; }
.ep-pastille--validee    { background: #E7EBFF; color: var(--c-primary-700); }
.ep-pastille--payee      { background: #E2F7EA; color: #12784A; }
.ep-pastille--annulee    { background: #F1F2F6; color: var(--c-body-2); }

/* ---------- Pied ---------- */
.ep-pied {
  text-align: center;
  padding: 24px 0 8px;
  font-size: 14px;
  color: var(--c-body-2);
}

/* ---------- Écran de connexion ---------- */
.ep--connexion {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ep-login {
  width: 400px;
  max-width: 100%;
  background: #fff;
  border: .75px solid var(--c-border);
  border-radius: 28px;
  padding: 40px 36px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(18, 26, 38, .07);
}
.ep-login__logo { margin-bottom: 12px; }
.ep-login h1 { font-size: 24px; font-weight: 800; }
.ep-login__lead { margin: 6px 0 22px; color: var(--c-body-2); font-size: 14px; }
.ep-login form { text-align: left; }
.ep-login label {
  display: block;
  margin: 14px 0 6px;
  font: 700 13px var(--f-display);
  color: var(--c-ink);
}
.ep-login input {
  width: 100%;
  padding: 12px 14px;
  font: 500 15px var(--f-body);
  border: .75px solid var(--c-border);
  border-radius: 12px;
}
.ep-login input:focus { outline: 2px solid var(--c-indigo-200); }
.ep-login button {
  width: 100%;
  margin-top: 20px;
  padding: 13px;
  font: 700 15px var(--f-display);
  color: #fff;
  background: var(--c-primary);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.ep-login button:hover { background: var(--c-primary-700); }
.ep-login__inscription { margin-top: 18px; font-size: 14px; color: var(--c-body-2); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ep-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .ep-hero { flex-direction: column-reverse; align-items: stretch; }
  .ep-hero__qr { align-self: center; }
  .ep-graphe { height: 150px; }
  .ep-graphe__valeur { display: none; }
}
@media (max-width: 480px) {
  .ep-stats { grid-template-columns: 1fr; }
  .ep-hero__lien { flex-direction: column; }
  .ep-topbar__nom { display: none; }
}
