/* ABONNEMENT — paiement, administration, bandeau (abonnement.js) */

.ab-titre {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: 16px;
}

.ab-carte-statut .ab-jours {
  color: #1f3a68;
  font-weight: 700;
}

.ab-carte-statut.ab-expire .ab-jours,
.ab-carte-statut.ab-suspendu .ab-jours,
.ab-carte-statut.ab-grace .ab-jours {
  color: #b42318;
}

.ab-barre {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5e7eb;
}

.ab-barre i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #16a34a, #f59e0b);
}

.ab-alerte,
.ab-info {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
}

.ab-alerte { background: #fee2e2; color: #991b1b; }
.ab-info { background: #eff6ff; color: #1e40af; }

.ab-etape {
  margin: 16px 0 8px;
  color: #1f3a68;
  font-size: 14px;
  font-weight: 700;
}

.ab-durees {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ab-duree,
.ab-moyen {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}

.ab-duree strong {
  font-size: 15px;
}

.ab-duree.actif,
.ab-moyen.actif {
  border-color: #1f3a68;
  background: #eef2ff;
}

.ab-moyens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.ab-moyen {
  font-size: 14px;
  font-weight: 700;
}

.ab-paiement {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #c7d2fe;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 14px;
}

.ab-paiement p {
  margin: 0 0 8px;
}

.ab-aide {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 12.5px;
  line-height: 1.5;
}

.ab-bouton {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.ab-bouton.ab-principal {
  width: 100%;
  margin-top: 12px;
  border-color: #1f3a68;
  background: #1f3a68;
  color: #fff;
}

.ab-bouton.ab-wave {
  border-color: #1dc8ff;
  background: #1dc8ff;
  color: #0b1f33;
}

.ab-bouton.ab-djamo {
  border-color: #3b2d8f;
  background: #3b2d8f;
  color: #fff;
}

.ab-ligne-boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ab-bouton.ab-admin {
  border-color: #7c3aed;
  background: #7c3aed;
  color: #fff;
}

.ab-bouton:disabled {
  opacity: .6;
  cursor: wait;
}

.ab-formulaire {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ab-formulaire label {
  display: grid;
  gap: 4px;
  color: #374151;
  font-size: 12.5px;
  font-weight: 600;
}

.ab-formulaire .ab-plein {
  grid-column: 1 / -1;
}

.ab-formulaire input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
}

.ab-message {
  margin: 10px 0 0;
  color: #15803d;
  font-size: 13.5px;
  font-weight: 600;
}

.ab-message:empty { display: none; }
.ab-ko { color: #b42318 !important; }

.ab-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f1f3;
  font-size: 14px;
}

.ab-ligne small {
  display: block;
  margin-top: 2px;
  color: #6b7280;
  font-size: 12.5px;
}

.ab-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.ab-petit {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.ab-petit.ab-ok { border-color: #16a34a; background: #16a34a; color: #fff !important; }
.ab-petit.ab-ko { border-color: #fecaca; color: #b42318; }

.ab-pastille {
  padding: 3px 9px;
  border-radius: 99px;
  background: #f3f4f6;
  color: #374151;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.ab-pastille.ab-validee,
.ab-pastille.ab-actif { background: #dcfce7; color: #166534; }
.ab-pastille.ab-en-attente,
.ab-pastille.ab-essai { background: #e0f2fe; color: #075985; }
.ab-pastille.ab-bientot,
.ab-pastille.ab-grace { background: #fef3c7; color: #92400e; }
.ab-pastille.ab-refusee,
.ab-pastille.ab-expire,
.ab-pastille.ab-suspendu { background: #fee2e2; color: #991b1b; }

.ab-vide {
  margin: 8px 0;
  color: #6b7280;
  font-size: 13.5px;
}

.ab-pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* Administration */
.ab-admin-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ab-chiffres {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.ab-chiffres div {
  padding: 10px;
  border-radius: 10px;
  background: #f3f6fb;
  color: #4b5563;
  font-size: 12px;
}

.ab-chiffres b {
  display: block;
  color: #1f3a68;
  font-size: 18px;
}

.ab-onglets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}

.ab-onglets button {
  padding: 8px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: #4b5563;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.ab-onglets button.actif {
  border-bottom-color: #1f3a68;
  color: #1f3a68;
}

.ab-compteur {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

/* Bandeau en haut de l'application */
.ab-bandeau {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 1500;
  width: max-content;
  max-width: calc(100vw - 24px);
  transform: translateX(-50%);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -6px 18px rgba(15, 23, 42, .15);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px;
  background: #e0f2fe;
  color: #075985;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
}

.ab-bandeau[hidden] { display: none; }
.ab-bandeau.ab-bandeau-alerte { background: #fef3c7; color: #92400e; }
.ab-bandeau.ab-bandeau-danger { background: #fee2e2; color: #991b1b; }

.ab-bandeau button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #1f3a68;
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.ab-bandeau .ab-bandeau-x {
  min-height: 26px;
  padding: 0 8px;
  background: transparent;
  color: inherit;
  font-size: 18px;
}

@media (max-width: 600px) {
  .ab-durees,
  .ab-chiffres {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ab-formulaire,
  .ab-moyens {
    grid-template-columns: 1fr;
  }

  .ab-ligne {
    flex-direction: column;
    align-items: stretch;
  }

  .ab-actions {
    justify-content: flex-start;
  }
}
