/* Popup pré-accès Mon compte (#accountpreview) */

.account-preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 24px 16px;
  text-align: center;
  color: #4b5563;
}

.account-preview-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: #28c7a5;
  border-radius: 50%;
  animation: account-preview-spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes account-preview-spin {
  to {
    transform: rotate(360deg);
  }
}

.account-preview-loading-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.account-preview {
  padding: 4px 0 8px;
  position: relative;
}

.account-preview-status {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
  line-height: 1.4;
}

.ap-access {
  margin: 16px 0 0;
  padding: 0;
  position: relative;
}

.ap-see-courses {
  display: inline;
  margin: 0 0 0 4px;
  padding: 0;
  border: none;
  background: none;
  color: #0b41d8;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  line-height: inherit;
  vertical-align: baseline;
}

.ap-see-courses:hover,
.ap-see-courses:focus {
  color: #0830a8;
  outline: none;
}

.ap-courses-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: stretch;
  justify-content: stretch;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(1px);
  border-radius: 8px;
  padding: 8px;
  box-sizing: border-box;
}

.ap-courses-overlay[hidden] {
  display: none !important;
}

.ap-courses-dialog {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 14px 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  overflow: auto;
  max-height: 100%;
}

.ap-courses-dialog h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
}

.ap-courses-section {
  margin: 0 0 12px;
}

.ap-courses-section h4 {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: none;
}

.ap-courses-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  list-style: disc;
}

.ap-courses-list li {
  margin: 0 0 4px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #111827;
}

.ap-courses-empty {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #6b7280;
}

.ap-courses-back {
  align-self: flex-start;
  margin-top: auto;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
}

.ap-courses-back:hover {
  background: #f9fafb;
}

.ap-access-title {
  margin: 0 0 12px;
  font-size: 1.08rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.ap-access-row {
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.ap-access-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}

.ap-access-values {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ap-chip {
  display: inline-block;
  font-size: 0.95rem;
  line-height: 1.3;
}

.ap-chip--current {
  color: #111827;
  font-weight: 700;
}

.ap-chip--sep {
  color: #d1d5db;
  font-weight: 400;
}

.ap-chip--active {
  color: #000;
  font-weight: 700;
}

.ap-chip--alt {
  color: #9ca3af;
  font-weight: 600;
  text-decoration: line-through;
}

.ap-access-help {
  display: inline;
  margin: 0 5px;
  padding: 0 3px;
  border: solid 1px;
  border-radius: 5px;
  background: none;
  color: #6b7280;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  vertical-align: baseline;
  text-decoration: none;
}

.ap-access-help:hover,
.ap-access-help[aria-expanded="true"] {
  color: #111827;
  text-decoration: none;
}

.ap-access-hint {
  margin: 8px 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #4b5563;
  padding: 5px;
  border-radius: 5px;
  background: #f2f9fa;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

.ap-access-hint[hidden] {
  display: none;
}

.ap-access-row--end {
  border-bottom: 1px solid #f3f4f6;
}

.ap-access-cta-wrap {
  margin-top: 14px;
}

.ap-access-cta-lead {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111827;
}

.ap-access-note {
  margin: 6px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #000;
}

.ap-access-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  margin-right: 0;
  background: #a171e2;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.ap-access-cta:hover,
.ap-access-cta:focus,
.ap-access-cta:focus-visible {
  color: #fff;
  outline: none;
  border: none;
  box-shadow: none;
  background: #8b5fcf;
}

.account-preview-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #374151;
  margin: 20px 0 10px;
}

.account-preview-section-title:first-of-type {
  margin-top: 18px;
}

.account-preview-inline-value {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: #111827;
}

.account-preview-fields {
  margin: 0;
}

.account-preview-fields > div {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.account-preview-fields dt {
  flex: 0 0 38%;
  margin: 0;
  font-size: 0.88rem;
  color: #6b7280;
  font-weight: 600;
}

.account-preview-fields dd {
  flex: 1;
  margin: 0;
  font-size: 0.95rem;
  color: #111827;
  word-break: break-word;
}

.account-preview-subscription {
  margin-top: 8px;
  padding: 14px 14px 12px;
  background: #f8fafc;
  border-radius: 10px;
}

.account-preview-subscription p {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: #374151;
}

.account-preview-notice {
  padding: 10px;
  background: #fef3cd;
  border-radius: 6px;
  color: #856404 !important;
  font-size: 0.88rem !important;
}

.account-preview-cancel-btn {
  margin-top: 10px;
  background: transparent;
  color: #dc3545;
  border: 1px solid #dc3545;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
}

.account-preview-cancel-btn:hover {
  background: #fff5f5;
}

.account-preview-footer {
  margin-top: 20px;
  padding-top: 0;
  border-top: none;
}

.account-preview-footer--ruled {
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.account-preview-cta {
  width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(263deg, #28c7a5 0%, #1fbf54 35%, #5dd258 100%);
}

.account-preview-cta:hover {
  filter: brightness(1.03);
}

.account-preview-error {
  color: #dc3545;
  text-align: center;
  padding: 24px 12px;
}

.account-preview-cancel-overlay {
  position: fixed;
  inset: 0;
  z-index: 100060;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}

.account-preview-cancel-dialog {
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.account-preview-cancel-dialog h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: #1f2937;
}

.account-preview-cancel-dialog p {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
}

.account-preview-cancel-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.account-preview-cancel-actions button {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

#account-preview-cancel-back {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
}

#account-preview-cancel-confirm {
  border: none;
  background: #dc3545;
  color: #fff;
}

.account-preview-cancel-error {
  margin-top: 12px;
  color: #dc3545;
  font-size: 0.85rem;
}

/* Popup Mon compte : hauteur au contenu (pas 80vh fixe) */
#accountpreview.loecsen-menu-modal,
#accountpreview.loecsen-menu-modal.is-open {
  height: auto !important;
  max-height: none !important;
}

#accountpreview .loecsen-menu-modal__dialog {
  height: auto !important;
  max-height: none !important;
}

#accountpreview .loecsen-menu-modal__body {
  overflow-x: hidden;
  overflow-y: visible;
  max-width: 100%;
  box-sizing: border-box;
}

#accountpreview .loecsen-menu-modal__body > .infos {
  padding: 8px 20px 20px;
  overflow-x: hidden;
  overflow-y: visible;
  max-height: none;
  max-width: 100%;
  box-sizing: border-box;
}

.account-preview,
.account-preview-fields,
.account-preview-subscription,
.account-preview-footer {
  max-width: 100%;
  box-sizing: border-box;
}

.account-preview-fields > div {
  min-width: 0;
}

.account-preview-fields dt,
.account-preview-fields dd {
  min-width: 0;
  overflow-wrap: anywhere;
}
