/* ──────────────────────────────────────────────────────────────────────────────
   Notification Preferences Module - CoursMarketing
   Préférences utilisateur : cloche/dashboard + email
   /var/www/cm-platform/frontend/modules/notifications/notification-preferences.css
   ────────────────────────────────────────────────────────────────────────────── */

.cm-notifPrefs,
.cm-notifPrefs * {
  box-sizing: border-box;
}

.cm-notifPrefs {
  width: 100%;
  color: #132f57;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cm-notifPrefsHero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid #dbe6f2;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 14px 34px rgba(17, 38, 66, .06);
}

.cm-notifPrefsEyebrow {
  margin-bottom: 7px;
  color: #204a9d;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cm-notifPrefsHero h2 {
  margin: 0;
  color: #082f63;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -.035em;
}

.cm-notifPrefsHero p {
  max-width: 720px;
  margin: 9px 0 0;
  color: #60758f;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 650;
}

.cm-notifPrefsLegend {
  min-width: 220px;
  padding: 13px;
  border: 1px solid #dbe6f2;
  border-radius: 16px;
  background: #ffffff;
  display: grid;
  gap: 8px;
}

.cm-notifPrefsLegend span {
  color: #657992;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.cm-notifPrefsLegend strong {
  color: #102f57;
  font-weight: 950;
}

.cm-notifPrefsNotice {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #eff6ff;
  color: #31527a;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.cm-notifPrefsNotice strong {
  color: #204a9d;
  font-weight: 950;
}

.cm-notifPrefsGrid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.cm-notifPrefsCategory {
  border: 1px solid #dbe6f2;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 38, 66, .055);
  overflow: hidden;
}

.cm-notifPrefsCategoryHead {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #edf2f8;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.cm-notifPrefsCategoryIcon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: #eaf2ff;
  color: #204a9d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.cm-notifPrefsCategoryHead h3 {
  margin: 0;
  color: #102f57;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 950;
  letter-spacing: -.02em;
}

.cm-notifPrefsCategoryHead p {
  margin: 5px 0 0;
  color: #6b7f98;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
}

.cm-notifPrefsTable {
  width: 100%;
}

.cm-notifPrefsTableHead,
.cm-notifPrefsRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 105px 105px;
  align-items: center;
}

.cm-notifPrefsTableHead {
  min-height: 38px;
  padding: 0 18px;
  border-bottom: 1px solid #edf2f8;
  background: #fbfdff;
  color: #71849d;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.cm-notifPrefsTableHead > div:nth-child(2),
.cm-notifPrefsTableHead > div:nth-child(3) {
  text-align: center;
}

.cm-notifPrefsRow {
  padding: 14px 18px;
  border-bottom: 1px solid #edf2f8;
}

.cm-notifPrefsRow:last-child {
  border-bottom: 0;
}

.cm-notifPrefsEvent {
  min-width: 0;
  padding-right: 12px;
}

.cm-notifPrefsEventTop {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cm-notifPrefsEvent strong {
  color: #102f57;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 950;
}

.cm-notifPrefsEvent p {
  margin: 4px 0 0;
  color: #677b94;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}

.cm-notifPrefsBadge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
}

.cm-notifPrefsSwitchCell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.cm-notifSwitch {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 28px;
  cursor: pointer;
}

.cm-notifSwitch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cm-notifSwitch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #dbe6f2;
  transition: background .18s ease, box-shadow .18s ease;
}

.cm-notifSwitch span::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(17, 38, 66, .16);
  transition: transform .18s ease;
}

.cm-notifSwitch input:checked + span {
  background: #204a9d;
  box-shadow: 0 8px 16px rgba(32, 74, 157, .18);
}

.cm-notifSwitch input:checked + span::before {
  transform: translateX(20px);
}

.cm-notifSwitch input:focus-visible + span {
  outline: 3px solid rgba(32, 74, 157, .22);
  outline-offset: 2px;
}

.cm-notifPrefsActions {
  position: sticky;
  bottom: 0;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #dbe6f2;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 36px rgba(17, 38, 66, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cm-notifPrefsMessage {
  min-height: 18px;
  color: #667b94;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 800;
}

.cm-notifPrefsMessage--success {
  color: #15803d;
}

.cm-notifPrefsMessage--error {
  color: #b91c1c;
}

.cm-notifPrefsMessage--warning {
  color: #b45309;
}

.cm-notifPrefsMessage--info {
  color: #204a9d;
}

.cm-notifPrefsSave {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  border-radius: 14px;
  background: #204a9d;
  color: #ffffff;
  min-height: 44px;
  padding: 0 18px;
  font-size: 13px;
  line-height: 1;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(32, 74, 157, .18);
}

.cm-notifPrefsSave:hover {
  background: #173f86;
}

.cm-notifPrefsSave:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.cm-notifPrefsLoading,
.cm-notifPrefsError {
  border: 1px solid #dbe6f2;
  border-radius: 20px;
  background: #ffffff;
  padding: 24px;
  color: #667b94;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 750;
  text-align: center;
}

.cm-notifPrefsError {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b91c1c;
  display: grid;
  gap: 6px;
}

.cm-notifPrefsError strong {
  color: #991b1b;
  font-size: 15px;
}

.cm-notifPrefsError span {
  color: #b91c1c;
}
