/* ============================================================
   Cooking mode
   ============================================================ */

.hn-cooking-mode {
  margin: 1rem 0;
}

/* ------------------------------------------------------------
   Bouton
   ------------------------------------------------------------ */

.hn-cooking-mode__btn {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: transparent;
  cursor: pointer;
  position: relative;
  font: inherit;
}

/* Etat actif */
.hn-cooking-mode__btn[aria-pressed="true"] {
  font-weight: 600;
  border-color: rgba(0, 0, 0, 0.45);
}

/* Etat désactivé */
.hn-cooking-mode__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ------------------------------------------------------------
   Tooltip
   ------------------------------------------------------------ */

.hn-cooking-mode__btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  max-width: 260px;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-size: 0.85rem;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  font-weight: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 10;
}

/* Flèche du tooltip */
.hn-cooking-mode__btn::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

/* Affichage au hover et au focus clavier */
.hn-cooking-mode__btn:hover::after,
.hn-cooking-mode__btn:hover::before,
.hn-cooking-mode__btn:focus-visible::after,
.hn-cooking-mode__btn:focus-visible::before {
  opacity: 1;
}

/* ------------------------------------------------------------
   Sécurité anti héritage
   Le tooltip reste toujours en font-weight normal
   ------------------------------------------------------------ */

.hn-cooking-mode__btn[aria-pressed="true"]::after,
.hn-cooking-mode__btn[aria-pressed="true"]::before {
  font-weight: 400;
}
