/* ════════════════════════════════════════════════════════════
   SECTION ALERTES — Notifications push
   ════════════════════════════════════════════════════════════ */

.alertes-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
}

.alertes-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.alertes-card-header i { color: var(--accent); }

.alertes-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  margin-left: auto;
}

.alertes-badge-on  { background: rgba(0,201,141,.15); color: var(--accent); }
.alertes-badge-off { background: rgba(239,68,68,.12);  color: var(--red);   }
.alertes-badge-pending { background: rgba(245,158,11,.12); color: var(--amber); }

/* Toggle checkbox stylé */
.alertes-toggle {
  width: 36px;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--hover);
  border: 1px solid var(--border2);
  border-radius: 20px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background .2s;
}
.alertes-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--muted);
  border-radius: 50%;
  transition: left .2s, background .2s;
}
.alertes-toggle:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.alertes-toggle:checked::after {
  left: 18px;
  background: #fff;
}

/* Ligne de préférence */
.alertes-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--hover);
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.alertes-pref-row:hover { background: var(--border2); }

/* Historique items */
.alertes-history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border2);
}
.alertes-history-item:last-child { border-bottom: none; }

.alertes-history-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.alertes-history-icon.type-offres    { background: rgba(0,201,141,.12);  color: var(--accent); }
.alertes-history-icon.type-relance   { background: rgba(245,158,11,.12); color: var(--amber);  }
.alertes-history-icon.type-message   { background: rgba(99,102,241,.12); color: #818cf8; }
.alertes-history-icon.type-systeme   { background: var(--hover); color: var(--muted); }

@media(max-width:600px) {
  .alertes-card { padding: 12px 14px; }
  .alertes-pref-row { padding: 8px 10px; }
}

/* ══════════════════════════════════════════════════════
   BANNIÈRE INVITATION NOTIFICATIONS
════════════════════════════════════════════════════════ */
.notif-invite-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: auto;
  max-width: 400px;
  background: var(--card-bg);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 245;
  box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 0 0 1px rgba(212,168,48,.2);
  animation: notifSlideIn .35s cubic-bezier(.34,1.56,.64,1) both;
}

.notif-invite-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-invite-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.notif-invite-text span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.notif-invite-dismiss {
  padding: 4px 8px !important;
  min-height: 28px !important;
  font-size: 12px !important;
  flex-shrink: 0;
}

.notif-invite-out {
  animation: notifSlideOut .3s ease forwards;
}

@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes notifSlideOut {
  to { opacity: 0; transform: translateY(16px); }
}

@media(max-width: 900px) {
  .notif-invite-banner {
    bottom: 76px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}

/* ══════════════════════════════════════════════════════
   BOTTOM NAVIGATION — Mobile (≤ 900px)
════════════════════════════════════════════════════════ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  z-index: 250;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media(max-width: 900px) {
  .bottom-nav { display: flex; }

  /* Espace pour ne pas masquer le contenu derrière la bottom nav.
     env(safe-area-inset-bottom) couvre la barre d'accueil iPhone (~34px). */
  .section         { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  #section-editeur { padding-bottom: 0; } /* l'éditeur gère son propre layout */

  /* Float nav et bottom nav se calent sur la safe-area */
  #mobile-float-nav { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  min-height: 52px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i { font-size: 19px; }

.bottom-nav-item.active { color: var(--accent); }

.bottom-nav-item:active { opacity: .75; }

/* Bouton CTA central (Créer CV) */
.bottom-nav-item--cta {
  color: var(--muted);
  position: relative;
  top: -8px;
}

.bottom-nav-cta-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #0f1117;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(0, 201, 141, 0.45);
  transition: transform .15s, box-shadow .15s;
}

.bottom-nav-item--cta i { font-size: 18px; }

.bottom-nav-item--cta:active .bottom-nav-cta-circle {
  transform: scale(.90);
  box-shadow: 0 2px 8px rgba(0, 201, 141, 0.3);
}

