/* ==========================================================================
   BOPOIL — page Lucky Bones (lucky-bones.html) et son calculateur de ration
   (js/lucky-bones.js). Chargée sur cette page seulement.
   ========================================================================== */

.lb-title { text-transform: none; margin-bottom: 20px; }

/* --------------------------------------------------------------------------
   EN-TÊTE — texte à gauche, logo de l'équipe sur une carte blanche à droite
   -------------------------------------------------------------------------- */

.lb-hero { padding-block: 72px; }
.lb-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.lb-hero__title {
  font-family: var(--headline-font);
  font-size: var(--font-step-3);
  line-height: var(--lh-headline);
  margin: 0 0 28px;
}
.lb-hero__text p { max-width: 62ch; }
.lb-hero__logo {
  justify-self: center;
  width: 100%;
  max-width: 360px;
  padding: 24px;
  border-radius: 24px;
  background: var(--pure-white);
}
.lb-hero__logo img { display: block; width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   BIENFAITS
   -------------------------------------------------------------------------- */

.lb-benefits-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: start;
}
.lb-benefits__intro p { margin: 0; max-width: 56ch; }
.lb-benefits {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lb-benefits li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--pure-white);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.lb-benefits li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-plum) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.lb-benefits__note { grid-column: 1 / -1; margin: 8px 0 0; max-width: 90ch; color: var(--color-gray-70); }

/* --------------------------------------------------------------------------
   RECETTES
   -------------------------------------------------------------------------- */

.lb-recipes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 8px;
}
.lb-recipe {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--image-border-radius);
  background: var(--pure-white);
  box-shadow: 0 10px 30px rgba(20,20,20,.08);
}
.lb-recipe__media img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.lb-recipe__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.lb-recipe__title {
  font-family: var(--headline-font);
  font-size: var(--font-step-1);
  line-height: var(--lh-headline);
  margin: 0 0 10px;
}
.lb-recipe__body p { margin: 0; }
.lb-recipe__meta {
  margin-top: auto !important;
  padding-top: 16px;
  font-size: var(--font-step--1);
  letter-spacing: .04em;
  color: var(--accent-plum);
}
.lb-recipes__note { margin: 32px 0 0; max-width: 90ch; }

/* --------------------------------------------------------------------------
   PRODUITS DE MASTICATION — photo de la boutique à gauche
   -------------------------------------------------------------------------- */

.lb-chews { display: grid; grid-template-columns: 1fr 1fr; }
.lb-chews__media { position: relative; min-height: 420px; }
/* The dog's head sits left of centre: keep it in frame when the sides are cropped. */
.lb-chews__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.lb-chews__body { padding: 72px 64px; align-self: center; }
.lb-chews__body p { max-width: 60ch; }
.lb-shop-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 32px 0 0;
  font-family: var(--headline-font);
  font-size: var(--font-step-1);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   CALCULATEUR — trois champs, puis le résultat dès que le poids est entré
   -------------------------------------------------------------------------- */

.lb-calc__head { max-width: 760px; margin-bottom: 32px; }
.lb-calc__head p { margin: 0; }

.lb-calc {
  overflow: hidden;
  border-radius: 20px;
  background: var(--pure-white);
  box-shadow: 0 18px 50px rgba(20,20,20,.1);
}
.lb-calc__inputs {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 24px;
  align-items: start;
  padding: 32px 36px;
}

.lb-field { min-width: 0; }
.lb-label { display: block; margin: 0 0 10px; font-weight: 600; }
.lb-hint { margin: 8px 0 0; font-size: var(--font-step--1); color: var(--color-critical); }
.lb-hint:empty { display: none; }

.lb-calc .field { height: 48px; border-color: #bbb; background-color: var(--pure-white); color: var(--near-black); }
.lb-calc .field:focus { outline: 2px solid var(--near-black); outline-offset: 1px; }

.lb-weight { display: flex; gap: 12px; }
.lb-weight .field { flex: 1; min-width: 0; }

/* Unité : le bouton radio reste focalisable, la pastille le dessine. */
.lb-seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.lb-seg {
  display: inline-flex;
  flex: none;
  padding: 4px;
  border-radius: 10px;
  background: var(--gray-light-two);
}
.lb-seg label { position: relative; }
.lb-seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 40px;
  padding: 0 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.lb-seg input:checked + span { background: var(--near-black); color: var(--pure-white); }
.lb-seg input:focus-visible + span { outline: 3px solid var(--accent-plum); outline-offset: 2px; }

.lb-calc__results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 56px;
  padding: 32px 36px 36px;
  background: var(--near-black);
  color: var(--pure-white);
}
.lb-calc__results[hidden] { display: none; }
.lb-result__label {
  margin: 0 0 4px;
  font-size: var(--font-step--1);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
/* Figures and prices in Libre Franklin semibold, like the boutique's prices. */
.lb-result__big {
  margin: 0;
  font-family: var(--body-font);
  font-size: var(--font-step-3);
  font-weight: 600;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.lb-result__patties { margin: 10px 0 0; font-size: var(--font-step-1); }

.lb-patties { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.lb-patty {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-peach) calc(var(--fill, 1) * 360deg), rgba(255,255,255,.14) 0);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.lb-patties__more { align-self: center; color: rgba(255,255,255,.7); }

.lb-result__list { display: grid; gap: 10px; margin: 24px 0 0; }
.lb-result__list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.lb-result__list dt { color: rgba(255,255,255,.75); }
.lb-result__list dd { margin: 0; text-align: right; font-weight: 600; }
.lb-result__list--small { font-size: var(--font-step--1); }

.lb-budget .lb-result__big { font-size: var(--font-step-2); }

.lb-calc__disclaimer { margin: 20px 0 0; max-width: 90ch; font-size: var(--font-step--1); color: var(--color-gray-60); }
.lb-calc__noscript { margin: 16px 0 0; }

/* --------------------------------------------------------------------------
   VISITE, MOT DE LA FIN
   -------------------------------------------------------------------------- */

.lb-visit {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.lb-visit__card {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 16px;
  background: var(--pure-white);
}
.lb-visit__name { font-family: var(--headline-font); font-size: var(--font-step-1); margin: 0; }
.lb-visit__card address { font-style: normal; line-height: 1.9; }
.lb-visit__card a { color: var(--accent-plum); }

.lb-closing { margin-bottom: 0; font-size: var(--font-step-2); }

/* --------------------------------------------------------------------------
   TABLETTES ET TÉLÉPHONES
   -------------------------------------------------------------------------- */

@media (max-width: 1023px) {
  .lb-hero { padding-block: 48px; }
  .lb-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .lb-hero__logo { max-width: 280px; }
  .lb-benefits-wrap { grid-template-columns: 1fr; }
  .lb-recipes { grid-template-columns: 1fr; max-width: 560px; }
  .lb-chews { grid-template-columns: 1fr; }
  .lb-chews__media { min-height: 300px; }
  .lb-chews__body { padding: 48px 24px; }
  /* The weight on its own row, profile and recipe side by side. */
  .lb-calc__inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-calc__inputs > :first-child { grid-column: 1 / -1; }
  .lb-visit { grid-template-columns: 1fr; gap: 32px; }
}

/* Phones: one column and less space between sections (this stylesheet only
   loads on the Lucky Bones page). */
@media (max-width: 767px) {
  .section { padding-block: 48px; }
  .lb-hero { padding-block: 40px; }
  .lb-hero__inner { gap: 32px; }
  .lb-hero__logo { max-width: 220px; padding: 18px; }
  .lb-chews__media { min-height: 240px; }
  .lb-chews__body { padding: 40px 24px; }
  .lb-recipes__note { margin-top: 24px; }
  .lb-calc__head { margin-bottom: 24px; }
  .lb-visit { gap: 24px; }
  .lb-visit__card { gap: 14px; padding: 22px; }
  .lb-visit__card address { line-height: 1.7; }
}

@media (max-width: 640px) {
  .lb-calc__inputs { grid-template-columns: 1fr; gap: 18px; padding: 24px 20px; }
  .lb-calc__results { grid-template-columns: 1fr; gap: 28px; padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-seg span { transition: none; }
}
