/* === Portail client : accès & historique ================================== */

.ctp-client-portal {
  min-height: 70vh;
  padding: 40px 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #f3f4f6;
  box-sizing: border-box;
}

.ctp-client-card {
  width: 100%;
  max-width: 960px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  padding: 32px 28px 28px;
  box-sizing: border-box;
}

.ctp-client-card--login {
  max-width: 480px;
}

.ctp-client-title {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: #111827;
}

.ctp-client-subtitle {
  margin: 0 0 24px;
  font-size: 15px;
  color: #6b7280;
}

/* Login form */

.ctp-client-login form {
  margin: 0;
}

.ctp-client-login .login-username,
.ctp-client-login .login-password {
  margin-bottom: 16px;
}

.ctp-client-login label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #374151;
}

.ctp-client-login input[type="text"],
.ctp-client-login input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  box-sizing: border-box;
}

.ctp-client-login input[type="text"]:focus,
.ctp-client-login input[type="password"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.ctp-client-login .login-remember {
  margin: 8px 0 14px;
  font-size: 13px;
  color: #4b5563;
}

.ctp-client-login .login-submit input[type="submit"] {
  width: 100%;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.08s ease;
}

.ctp-client-login .login-submit input[type="submit"]:hover {
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.ctp-client-login-note {
  margin-top: 12px;
  font-size: 12px;
  color: #9ca3af;
}

/* Tableau historique */

.ctp-client-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 8px;
}

.ctp-client-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ctp-client-table thead {
  background: #f9fafb;
}

.ctp-client-table th,
.ctp-client-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.ctp-client-table th {
  font-weight: 600;
  font-size: 13px;
  color: #6b7280;
  text-transform: uppercase;
}

.ctp-client-table tbody tr:hover {
  background: #f3f4f6;
}

/* Badges de statut */

.ctp-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.ctp-badge--confirmed,
.ctp-badge--paid {
  background: #ecfdf3;
  color: #166534;
}

.ctp-badge--pending {
  background: #fef9c3;
  color: #92400e;
}

.ctp-badge--cancelled,
.ctp-badge--canceled {
  background: #fee2e2;
  color: #b91c1c;
}

.ctp-badge--default {
  background: #e5e7eb;
  color: #374151;
}

/* Boutons & notes */

.ctp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.ctp-btn-secondary {
  background: #eef2ff;
  color: #3730a3;
}

.ctp-btn-secondary:hover {
  background: #e0e7ff;
}

.ctp-client-note-small {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.ctp-client-note-small-muted {
  color: #9ca3af;
}

/* Vidage */

.ctp-client-empty {
  margin-top: 8px;
  font-size: 14px;
  color: #6b7280;
}

/* Responsive : table empilée sur mobile */

@media (max-width: 700px) {
  .ctp-client-card {
    padding: 24px 18px 20px;
  }

  .ctp-client-table thead {
    display: none;
  }

  .ctp-client-table tr {
    display: block;
    border-radius: 12px;
    margin-bottom: 10px;
    background: #f9fafb;
  }

  .ctp-client-table td {
    display: flex;
    justify-content: space-between;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 12px;
  }

  .ctp-client-table td:last-child {
    border-bottom: none;
  }

  .ctp-client-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 12px;
    color: #6b7280;
    margin-right: 10px;
  }
}