/* Member settings — même shell Skool que admin, charte Skillesia */

#modal-member-settings {
  z-index: 10000;
  background: rgba(34, 32, 43, 0.45);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#modal-member-settings .settings-shell {
  width: min(920px, 96vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(32, 58, 124, 0.2);
}

#modal-member-settings .settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid #e5e7eb;
}

#modal-member-settings .settings-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-title, Poppins, sans-serif);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #22202b;
}

#modal-member-settings .settings-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #203a7c, #80348a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

#modal-member-settings .settings-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f8f9fc;
  font-size: 20px;
  cursor: pointer;
  color: #6b7280;
  transition: background 0.2s, color 0.2s;
}

#modal-member-settings .settings-close:hover {
  background: #e5e7eb;
  color: #22202b;
}

#modal-member-settings .settings-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 480px;
  max-height: calc(90vh - 80px);
}

#modal-member-settings .settings-nav {
  border-right: 1px solid #e5e7eb;
  padding: 16px 0;
  background: #fafbfc;
}

#modal-member-settings .settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 22px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

#modal-member-settings .settings-nav-item svg {
  width: 18px;
  height: 18px;
  color: #203a7c;
  flex-shrink: 0;
}

#modal-member-settings .settings-nav-item:hover {
  background: #f3f4f6;
  color: #22202b;
}

#modal-member-settings .settings-nav-item.active {
  background: #fff9e6;
  color: #22202b;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #f59e0b;
}

#modal-member-settings .settings-content {
  padding: 32px 36px;
  overflow-y: auto;
}

#modal-member-settings .settings-panel {
  display: none;
}

#modal-member-settings .settings-panel.active {
  display: block;
  animation: memberPanelIn 0.25s ease;
}

@keyframes memberPanelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

#modal-member-settings .settings-panel h2 {
  font-family: var(--font-title, Poppins, sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #22202b;
  margin-bottom: 8px;
}

#modal-member-settings .settings-sub {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 24px;
}

#modal-member-settings .member-invite-row {
  display: flex;
  gap: 0;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #f8f9fc;
}

#modal-member-settings .member-invite-row input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 16px 18px;
  font-size: 14px;
  color: #4b5563;
  outline: none;
  min-width: 0;
}

#modal-member-settings .member-copy-btn {
  padding: 0 28px;
  border: none;
  background: #fcd34d;
  color: #22202b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

#modal-member-settings .member-copy-btn:hover {
  background: #fbbf24;
}

#modal-member-settings .member-notif-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

#modal-member-settings .member-notif-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #203a7c, #80348a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

#modal-member-settings .member-notif-name {
  font-size: 15px;
  font-weight: 600;
  color: #22202b;
}

#modal-member-settings .member-following-badge {
  display: inline-block;
  margin-left: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

#modal-member-settings .member-notif-list {
  margin-top: 4px;
}

#modal-member-settings .member-notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: #22202b;
  cursor: pointer;
}

#modal-member-settings .member-toggle {
  width: 48px;
  height: 28px;
  appearance: none;
  background: #e5e7eb;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  border: none;
}

#modal-member-settings .member-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

#modal-member-settings .member-toggle:checked {
  background: #16a34a;
}

#modal-member-settings .member-toggle:checked::after {
  transform: translateX(20px);
}

#modal-member-settings .member-chat-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

#modal-member-settings .member-chat-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: #22202b;
  margin-bottom: 12px;
}

#modal-member-settings .member-chat-select {
  width: 100%;
  max-width: 200px;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #22202b;
  background: #fff;
  outline: none;
  cursor: pointer;
}

#modal-member-settings .member-chat-select:focus {
  border-color: #203a7c;
}

#modal-member-settings .member-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 0;
  border: none;
  border-bottom: 1px solid #f3f4f6;
  background: none;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #22202b;
  transition: color 0.2s;
}

#modal-member-settings .member-action-row:hover {
  color: #203a7c;
}

#modal-member-settings .member-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f8f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

#modal-member-settings .member-leave-link {
  display: inline-block;
  margin-top: 28px;
  background: none;
  border: none;
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

#modal-member-settings .member-membership-card {
  margin-top: 8px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafbfc;
}

#modal-member-settings .member-membership-plan {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #203a7c;
  margin-bottom: 4px;
}

/* About — vue membre lecture seule */
.about-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #203a7c, #493781, #80348a);
}

.about-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-gallery-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.about-gallery-item {
  border-radius: 12px;
  overflow: hidden;
  background: #f8f9fc;
  aspect-ratio: 16 / 10;
  position: relative;
}

.about-gallery-item img,
.about-gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-gallery-empty {
  text-align: center;
  padding: 48px 24px;
  color: #9ca3af;
  font-size: 14px;
  background: #f8f9fc;
  border-radius: 12px;
  margin-bottom: 24px;
}

.about-desc-readonly {
  font-size: 15px;
  line-height: 1.75;
  color: #4b5563;
  white-space: pre-wrap;
  cursor: default;
  user-select: text;
}

.about-readonly .about-desc:empty {
  display: none;
}

.about-gallery-readonly .about-gallery-item {
  pointer-events: auto;
}

.about-gallery-readonly .about-gallery-item img,
.about-gallery-readonly .about-gallery-item video {
  cursor: default;
}

.about-media-admin {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border: 2px dashed #e5e7eb;
  background: #f8f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 14px;
  color: #203a7c;
  cursor: pointer;
  font-weight: 500;
  transition: border 0.2s, background 0.2s;
}

.about-media-admin:hover {
  border-color: #203a7c;
  background: rgba(32, 58, 124, 0.04);
}

/* Classroom Skool cards */
.classroom-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.classroom-card {
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.classroom-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(32, 58, 124, 0.12);
}

.classroom-card-cover {
  aspect-ratio: 16 / 10;
}

.classroom-card-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: linear-gradient(135deg, #203a7c 0%, #493781 55%, #80348a 100%);
}

.classroom-card-cover-fallback-title {
  font-family: var(--font-title, Poppins, sans-serif);
  font-weight: 800;
  font-size: clamp(1rem, 4vw, 1.35rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  text-align: center;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.classroom-card-cover-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  font-family: var(--font-title, Poppins, sans-serif);
  font-weight: 800;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.classroom-card-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #203a7c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.classroom-card-body {
  padding: 16px 18px 18px;
}

.classroom-card-title {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.classroom-card-desc {
  font-size: 12px;
  margin-bottom: 12px;
  min-height: 36px;
}

.classroom-progress-wrap {
  height: 24px;
}

.classroom-new-card {
  min-height: 320px;
}

.admin-only {
  display: none !important;
}

body.skillesia-admin .admin-only {
  display: revert !important;
}

body.skillesia-admin .admin-only.flex {
  display: flex !important;
}

body.skillesia-admin .admin-only.block {
  display: block !important;
}

body:not(.skillesia-admin) .about-media-admin,
body:not(.skillesia-admin) .visibility-btn {
  display: none !important;
}
