/* ==========================================================
   BLOOPIN — PORTAIL PARTENAIRE SURECART
========================================================== */

.bp-affiliate{
  --bp-aff-bg: #fffdf9;
  --bp-aff-surface: #ffffff;
  --bp-aff-muted: #f3f4f6;
  --bp-aff-text: #0F172A;
  --bp-aff-soft: #64748B;
  --bp-aff-primary: #22A1EE;
  --bp-aff-border: rgba(15,23,42,.10);
  --bp-aff-border-input: rgba(15,23,42,.12);

  width: 100%;
  color: var(--bp-aff-text);
  font-family: 'Poppins', sans-serif;
}

.bp-affiliate *,
.bp-affiliate *::before,
.bp-affiliate *::after{
  box-sizing: border-box;
}

.bp-affiliate [hidden]{
  display: none !important;
}

/* ==========================================================
   CHARGEMENT
========================================================== */

.bp-affiliate__loading{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 320px;
  padding: 30px;
  color: var(--bp-aff-soft);
  font-size: 14px;
  font-weight: 600;
}

.bp-affiliate__spinner{
  width: 24px;
  height: 24px;
  border: 3px solid rgba(15,23,42,.10);
  border-top-color: var(--bp-aff-primary);
  border-radius: 50%;
  animation: bp-affiliate-spin .75s linear infinite;
}

@keyframes bp-affiliate-spin{
  to{ transform: rotate(360deg); }
}

/* ==========================================================
   STRUCTURE
========================================================== */

.bp-affiliate__layout{
  display: grid;
  grid-template-columns: minmax(260px, .78fr) minmax(0, 1.35fr);
  min-height: 620px;
  overflow: hidden;
  background: var(--bp-aff-bg);
  border: 3px solid var(--bp-aff-border);
  border-radius: 28px;
  box-shadow:
    0 18px 46px rgba(15,23,42,.07),
    0 4px 14px rgba(15,23,42,.035);
}

.bp-affiliate__intro{
  display: flex;
  flex-direction: column;
  padding: clamp(34px, 4vw, 54px);
  color: #fff;
  background:
    radial-gradient(circle at 15% 8%, rgba(34,161,238,.24), transparent 32%),
    linear-gradient(150deg, #0F172A 0%, #111c33 65%, #0b1222 100%);
}

.bp-affiliate__eyebrow,
.bp-affiliate__step{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 11px;
  color: #075985;
  background: rgba(34,161,238,.12);
  border: 3px solid rgba(34,161,238,.18);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.bp-affiliate__intro .bp-affiliate__eyebrow{
  color: #7dd3fc;
  background: rgba(34,161,238,.12);
  border-color: rgba(125,211,252,.22);
}

.bp-affiliate__intro h2{
  margin: 26px 0 18px;
  color: #fff;
  font-size: clamp(2rem, 3.4vw, 3.35rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.055em;
}

.bp-affiliate__intro h2 span{
  color: #7dd3fc;
}

.bp-affiliate__intro > p{
  margin: 0;
  color: rgba(255,255,255,.70);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
}

.bp-affiliate__benefits{
  display: grid;
  gap: 10px;
  margin-top: 34px;
}

.bp-affiliate__benefits > div{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.bp-affiliate__benefits strong{
  color: #fff;
  font-size: 17px;
  font-weight: 850;
}

.bp-affiliate__benefits span{
  color: rgba(255,255,255,.58);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.bp-affiliate__aside-callout{
  margin-top: auto;
  padding-top: 34px;
}

.bp-affiliate__aside-callout span{
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.bp-affiliate__aside-callout p{
  margin: 7px 0 0;
  color: rgba(255,255,255,.58);
  font-size: 12px;
  line-height: 1.55;
}

.bp-affiliate__panel{
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(34px, 5vw, 62px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.98));
}

.bp-affiliate__heading{
  margin-bottom: 28px;
}

.bp-affiliate__heading--dashboard{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.bp-affiliate__heading h3,
.bp-affiliate__state h3{
  margin: 17px 0 10px;
  color: var(--bp-aff-text);
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.bp-affiliate__heading p,
.bp-affiliate__state p{
  margin: 0;
  color: var(--bp-aff-soft);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
}

.bp-affiliate__step--active{
  color: #047857;
  background: rgba(16,185,129,.10);
  border-color: rgba(16,185,129,.20);
}

.bp-affiliate__status{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 12px;
  color: #047857;
  background: rgba(16,185,129,.08);
  border: 3px solid rgba(16,185,129,.16);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.bp-affiliate__status i{
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(16,185,129,.12);
}

/* ==========================================================
   FORMULAIRE — STYLE CHECKOUT
========================================================== */

.bp-affiliate__form{
  display: grid;
  gap: 18px;
}

.bp-affiliate__form-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bp-affiliate__field{
  display: grid;
  gap: 8px;
}

.bp-affiliate__field > span{
  color: var(--bp-aff-text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.bp-affiliate__field > span b{
  color: #ef4444;
}

.bp-affiliate__field > span em{
  color: var(--bp-aff-soft);
  font-size: 12px;
  font-style: normal;
  font-weight: 550;
}

.bp-affiliate__field input,
.bp-affiliate__field textarea{
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  color: var(--bp-aff-text);
  background: var(--bp-aff-surface);
  border: 2px solid var(--bp-aff-border-input);
  border-radius: 14px;
  outline: none;
  box-shadow: none;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 500;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.bp-affiliate__field textarea{
  min-height: 132px;
  padding: 15px 16px;
  resize: vertical;
  line-height: 1.55;
}

.bp-affiliate__field input::placeholder,
.bp-affiliate__field textarea::placeholder{
  color: #94A3B8;
  opacity: 1;
}

.bp-affiliate__field input:hover,
.bp-affiliate__field textarea:hover{
  border-color: rgba(15,23,42,.22);
}

.bp-affiliate__field input:focus,
.bp-affiliate__field textarea:focus{
  border-color: var(--bp-aff-primary);
  box-shadow: 0 0 0 3px rgba(34,161,238,.12);
}

.bp-affiliate__field input:disabled{
  color: var(--bp-aff-soft);
  background: #f8fafc;
  cursor: not-allowed;
}

.bp-affiliate__field small{
  color: var(--bp-aff-soft);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

.bp-affiliate__consent{
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--bp-aff-soft);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.5;
  cursor: pointer;
}

.bp-affiliate__consent input{
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--bp-aff-text);
}

.bp-affiliate__button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 12px 20px;
  color: #fff !important;
  background: #0F172A;
  border: 3px solid #0F172A;
  border-radius: 14px;
  text-decoration: none !important;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.bp-affiliate__button:hover{
  color: #fff !important;
  background: #020617;
  border-color: #020617;
  transform: translateY(-1px);
}

.bp-affiliate__button:disabled{
  opacity: .65;
  cursor: wait;
  transform: none;
}

.bp-affiliate__feedback{
  padding: 12px 14px;
  color: #b91c1c;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.16);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

/* ==========================================================
   ÉTATS
========================================================== */

.bp-affiliate__state{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 560px;
}

.bp-affiliate__state-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  color: #075985;
  background: rgba(34,161,238,.10);
  border: 2px solid rgba(34,161,238,.16);
  border-radius: 16px;
  font-size: 22px;
  font-weight: 900;
}

.bp-affiliate__state .bp-affiliate__button{
  width: auto;
  margin-top: 24px;
  padding-inline: 24px;
}

.bp-affiliate__state-note{
  margin-top: 22px;
  padding: 13px 15px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 650;
}

.bp-affiliate__state--error .bp-affiliate__state-icon,
.bp-affiliate__state--denied .bp-affiliate__state-icon{
  color: #b91c1c;
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.16);
}

/* ==========================================================
   DASHBOARD PARTENAIRE
========================================================== */

.bp-affiliate__stats{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin: 4px 0 20px;
}

.bp-affiliate__stats article{
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 2px solid rgba(15,23,42,.09);
  border-radius: 16px;
}

.bp-affiliate__stats span{
  display: block;
  margin-bottom: 8px;
  color: var(--bp-aff-soft);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.bp-affiliate__stats strong{
  display: block;
  overflow: hidden;
  color: var(--bp-aff-text);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bp-affiliate__link-card{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  background: #f8fafc;
  border: 2px solid rgba(15,23,42,.09);
  border-radius: 16px;
}

.bp-affiliate__link-card > div{
  min-width: 0;
}

.bp-affiliate__link-card span{
  color: var(--bp-aff-soft);
  font-size: 11px;
  font-weight: 700;
}

.bp-affiliate__link-card p{
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--bp-aff-text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bp-affiliate__copy{
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 14px;
  color: #fff;
  background: #0F172A;
  border: 2px solid #0F172A;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.bp-affiliate__copy.is-copied{
  background: #047857;
  border-color: #047857;
}

.bp-affiliate__howto{
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(15,23,42,.08);
}

.bp-affiliate__howto h4{
  margin: 0 0 15px;
  color: var(--bp-aff-text);
  font-size: 15px;
  font-weight: 850;
}

.bp-affiliate__howto ol{
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bp-affiliate__howto li{
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.bp-affiliate__howto li > span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: #075985;
  background: rgba(34,161,238,.10);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 900;
}

.bp-affiliate__howto p{
  margin: 3px 0 0;
  color: var(--bp-aff-soft);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.5;
}

/* ==========================================================
   VERSION VERROUILLÉE
========================================================== */

.bp-affiliate--locked .bp-affiliate__notice{
  display: flex;
  gap: 18px;
  padding: 28px;
  background: #fff;
  border: 3px solid var(--bp-aff-border);
  border-radius: 22px;
}

.bp-affiliate__notice-icon{
  font-size: 24px;
}

.bp-affiliate__notice h2{
  margin: 0 0 7px;
  color: var(--bp-aff-text);
}

.bp-affiliate__notice p{
  margin: 0 0 18px;
  color: var(--bp-aff-soft);
}

.bp-affiliate__notice .bp-affiliate__button{
  width: auto;
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 900px){
  .bp-affiliate__layout{
    grid-template-columns: 1fr;
  }

  .bp-affiliate__intro{
    min-height: auto;
  }

  .bp-affiliate__benefits{
    grid-template-columns: repeat(3, minmax(0,1fr));
  }

  .bp-affiliate__benefits > div{
    display: block;
    padding: 13px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
  }

  .bp-affiliate__benefits span{
    display: block;
    margin-top: 3px;
    text-align: left;
  }

  .bp-affiliate__aside-callout{
    display: none;
  }
}

@media (max-width: 640px){
  .bp-affiliate__layout{
    border-radius: 22px;
  }

  .bp-affiliate__intro,
  .bp-affiliate__panel{
    padding: 28px 20px;
  }

  .bp-affiliate__intro h2{
    font-size: 2rem;
  }

  .bp-affiliate__benefits{
    grid-template-columns: 1fr;
  }

  .bp-affiliate__form-grid,
  .bp-affiliate__stats{
    grid-template-columns: 1fr;
  }

  .bp-affiliate__heading--dashboard,
  .bp-affiliate__link-card{
    align-items: stretch;
    flex-direction: column;
  }

  .bp-affiliate__status{
    align-self: flex-start;
  }

  .bp-affiliate__link-card p{
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .bp-affiliate__copy{
    width: 100%;
  }
}


/* ==========================================================
   BLOOPIN — AFFILIATE LOCKED / STATES
========================================================== */

.bp-affiliate--locked{
  padding: 24px 0;
}

.bp-affiliate__notice{
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 30px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 28px;
  box-shadow: 0 16px 40px rgba(15,23,42,.06);
}

.bp-affiliate__notice-content{
  flex: 1;
}

.bp-affiliate__notice-content h2{
  margin: 10px 0 10px;
  color: #0F172A;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.04em;
}

.bp-affiliate__notice-content p{
  margin: 0 0 22px;
  color: #5B6B84;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 560px;
}

.bp-affiliate__notice-icon,
.bp-affiliate__state-icon--lock{
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: linear-gradient(180deg, #eef8ff 0%, #e6f4ff 100%);
  border: 3px solid rgba(34,161,238,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
  font-size: 0;
}

.bp-affiliate__notice-icon::before,
.bp-affiliate__state-icon--lock::before{
  content: "";
  width: 28px;
  height: 28px;
  display: block;
  background: url('../img/icons/lock.svg') center center / contain no-repeat;
}

.bp-affiliate__state-icon--spinner{
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: linear-gradient(180deg, #eef8ff 0%, #e6f4ff 100%);
  border: 1px solid rgba(34,161,238,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
  font-size: 0;
}

.bp-affiliate__state-icon--spinner::before{
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 3px solid rgba(34,161,238,.18);
  border-top-color: #22A1EE;
  animation: bp-affiliate-spin .8s linear infinite;
}

@keyframes bp-affiliate-spin{
  to{
    transform: rotate(360deg);
  }
}

.bp-affiliate__step{
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(34,161,238,.08);
  border: 3px solid rgba(34,161,238,.14);
  color: #0A7BC2;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bp-affiliate__button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  background: #0F172A;
  color: #fff;
  border: 3px solid #0F172A;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: .2s ease;
}

.bp-affiliate__button:hover{
  background: #020617;
  border-color: #020617;
  color: #fff;
  transform: translateY(-1px);
}

.bp-affiliate__state{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bp-affiliate__state h3{
  margin: 0;
  color: #0F172A;
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.bp-affiliate__state p{
  margin: 0;
  color: #5B6B84;
  line-height: 1.7;
}

.bp-affiliate__state-note{
  padding: 14px 16px;
  background: rgba(15,23,42,.035);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px;
  color: #42526B;
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 767px){
  .bp-affiliate__notice{
    flex-direction: column;
    padding: 22px;
    gap: 18px;
    border-radius: 22px;
  }

  .bp-affiliate__notice-content h2{
    margin-top: 6px;
    font-size: clamp(1.7rem, 7vw, 2.1rem);
  }

  .bp-affiliate__notice-icon,
  .bp-affiliate__state-icon--lock,
  .bp-affiliate__state-icon--spinner{
    width: 60px;
    height: 60px;
    border-radius: 18px;
  }
}