/* ============================================
   Toggle world_cron_active dans la navbar
   ============================================ */

/* Bloc contenant le switch dans la nav */
.nav-cron-wrapper {
  display: flex;
  align-items: center;
  height: 40px;
  gap: 10px;
}

/* Conteneur du toggle */
.cron-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
}

/* On cache l’input, mais il garde le focus clavier */
.cron-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* La “pilule” verte/grise */
.cron-toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #4b5563;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
  flex-shrink: 0;
}

/* Le rond blanc qui glisse */
.cron-toggle-track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
  transition: transform 0.18s ease;
}

/* État ON : pilule verte + rond à droite */
.cron-toggle input:checked + .cron-toggle-track {
  background: #22c55e;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}

.cron-toggle input:checked + .cron-toggle-track::before {
  transform: translateX(18px);
}

/* Focus clavier sur le toggle */
.cron-toggle input:focus-visible + .cron-toggle-track {
  box-shadow:
    0 0 0 2px rgba(34,197,94,0.7),
    inset 0 0 0 1px rgba(0,0,0,0.3);
}

/* Label textuel à côté du switch */
.cron-toggle-label {
  color: var(--text-muted, #9ca3af);
  font-size: 0.8rem;
}

/* ============================================
   Navigation avec emoji + label au survol
   ============================================ */

/* Si tu n’as pas déjà un style pour .main-nav, tu peux utiliser ceci : */
.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* liens nav avec emoji + label */
.main-nav .nav-link {
  display: inline-flex;
  align-items: center;
  position: relative;
  text-decoration: none;
}

/* emoji visible en permanence */
.nav-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

/* label replié par défaut */
.nav-label {
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  transform: translateX(-4px);
  transition:
    max-width 0.50s ease,
    opacity 0.50s ease,
    margin-left 0.50s ease,
    transform 0.50s ease;
  font-size: 0.95rem;
}


/* au survol ou focus clavier : on déplie le texte à droite de l’emoji */
.main-nav .nav-link:hover .nav-label,
.main-nav .nav-link:focus-visible .nav-label {
  max-width: 120px;       /* à ajuster si certains labels sont très longs */
  opacity: 1;
  margin-left: 6px;
  transform: translateX(0);
}

/* Badge messages non lus dans le header */

.nav-link--has-badge {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444; /* rouge pastille */
  color: #ffffff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.4); /* léger contour sombre */
}

/* lien actif : label toujours visible (emoji + texte permanents) */
.main-nav .nav-link--active .nav-label {
  max-width: 140px;      /* tu peux ajuster */
  opacity: 1;
  margin-left: 6px;
  transform: translateX(0);
}
