/* Home tools — dinner finder */

.home-tonight {
  --tonight-ink: var(--color-secondary-dark, #1b4332);
  --tonight-muted: var(--color-text-light, #6b7280);
  --tonight-orange: var(--color-primary, #e85d04);
  --tonight-cream: #f7f2ea;
  --tonight-line: rgba(27, 67, 50, 0.09);
  --tonight-gold: var(--color-accent, #c9a227);
  width: 100%;
  max-width: 1120px;
  margin: -1.35rem auto 0;
  padding: 0 1.25rem 2.75rem;
  box-sizing: border-box;
}

.tonight-v2__intro {
  margin: 0 0 1.5rem;
  max-width: 40rem;
  text-align: left;
}

.tonight-v2__badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.7rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.14);
  color: var(--tonight-ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tonight-v2__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-brand, inherit);
  font-size: clamp(1.55rem, 2.8vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--tonight-ink);
}

.tonight-v2__lead {
  margin: 0;
  max-width: 38rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--tonight-muted);
}

.tonight-v2__shell {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
  padding: 1.4rem 1.4rem 1.5rem;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--tonight-line);
  box-shadow: 0 18px 42px rgba(27, 67, 50, 0.06);
}

.tonight-v2__questions {
  min-width: 0;
}

.tonight-v2__steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tonight-v2__step {
  padding: 0 0 1.45rem;
  margin: 0 0 1.45rem;
  border-bottom: 1px solid rgba(27, 67, 50, 0.07);
}

.tonight-v2__step:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.tonight-v2__step-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.tonight-v2__num {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.12rem;
  border-radius: 50%;
  background: rgba(27, 67, 50, 0.08);
  color: var(--tonight-ink);
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}

.tonight-v2__q {
  margin: 0 0 0.28rem;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--tonight-ink);
}

.tonight-v2__desc {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--tonight-muted);
}

.tonight-v2__moods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0 0 0.7rem;
  padding: 0;
  list-style: none;
}

.tonight-v2__mood {
  appearance: none;
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 7rem;
  padding: 1.2rem 1rem;
  border: 1.5px solid rgba(27, 67, 50, 0.12);
  border-radius: 18px;
  background: #fff;
  color: var(--tonight-ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(27, 67, 50, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.tonight-v2__mood--sale {
  background: #eef4ef;
  border-color: rgba(27, 67, 50, 0.1);
}

.tonight-v2__mood--sucre {
  background: #f8efe6;
  border-color: rgba(166, 110, 34, 0.12);
}

.tonight-v2__mood-title {
  font-size: clamp(1.35rem, 2.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.tonight-v2__mood-text {
  max-width: 12rem;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--tonight-muted);
}

.tonight-v2__mood:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(27, 67, 50, 0.2);
  box-shadow: 0 10px 22px rgba(27, 67, 50, 0.07);
}

.tonight-v2__mood.is-active,
.tonight-v2__mood[aria-pressed="true"] {
  border-color: var(--tonight-orange);
  background: #fff8f1;
  box-shadow: 0 10px 24px rgba(232, 93, 4, 0.1);
}

.tonight-v2__mood.is-active .tonight-v2__mood-text,
.tonight-v2__mood[aria-pressed="true"] .tonight-v2__mood-text {
  color: rgba(27, 67, 50, 0.72);
}

.tonight-v2__mood.is-active::after,
.tonight-v2__mood[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--tonight-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2l3 3 6-6' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.85rem no-repeat;
  box-shadow: 0 2px 8px rgba(232, 93, 4, 0.35);
}

.tonight-v2__mood:focus-visible {
  outline: 2px solid var(--tonight-orange);
  outline-offset: 2px;
}

.tonight-v2__chip {
  appearance: none;
  border: 1px solid rgba(27, 67, 50, 0.12);
  border-radius: 14px;
  background: #fff;
  color: var(--tonight-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.7rem 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tonight-v2__chip.is-active,
.tonight-v2__chip[aria-pressed="true"] {
  background: #eef6f1;
  border-color: var(--tonight-ink);
  color: var(--tonight-ink);
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.06);
}

.tonight-v2__chip:focus-visible {
  outline: 2px solid var(--tonight-orange);
  outline-offset: 2px;
}

.tonight-v2__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tonight-v2__opt {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(120, 100, 70, 0.18);
  border-radius: 14px;
  background: #fff;
  color: var(--tonight-ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tonight-v2__opt:hover {
  border-color: rgba(27, 67, 50, 0.22);
  background: #fffcf8;
}

.tonight-v2__opt.is-active,
.tonight-v2__opt[aria-pressed="true"] {
  background: #eef6f1;
  border-color: var(--tonight-ink);
  color: var(--tonight-ink);
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.06);
}

.tonight-v2__opt.is-active::before,
.tonight-v2__opt[aria-pressed="true"]::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2l3 3 6-6' stroke='%23e85d04' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tonight-v2__chip.is-active::before,
.tonight-v2__chip[aria-pressed="true"]::before {
  content: "";
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.35rem;
  vertical-align: -0.05rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2l3 3 6-6' stroke='%23e85d04' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tonight-v2__opt:focus-visible {
  outline: 2px solid var(--tonight-orange);
  outline-offset: 2px;
}

.tonight-v2__summary {
  position: sticky;
  top: 1.25rem;
  display: grid;
  gap: 0.95rem;
  padding: 1.1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffcf8 0%, #fff 42%);
  border: 1px solid rgba(27, 67, 50, 0.08);
  box-shadow: 0 12px 30px rgba(27, 67, 50, 0.05);
}

.tonight-v2__summary-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--tonight-ink);
}

.tonight-v2__preview {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #efeae2;
}

.tonight-v2__preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.tonight-v2__preview::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent 0%, rgba(20, 35, 28, 0.28) 100%);
  pointer-events: none;
}

.tonight-v2__preview-badge {
  position: absolute;
  z-index: 1;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--tonight-ink);
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(27, 67, 50, 0.12);
}

.tonight-v2__empty-title {
  margin: 0 0 0.3rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--tonight-ink);
  line-height: 1.35;
}

.tonight-v2__empty-text {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--tonight-muted);
  line-height: 1.45;
}

.tonight-v2__facts {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tonight-v2__facts[hidden],
.tonight-v2__empty[hidden] {
  display: none !important;
}

.tonight-v2__facts li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(27, 67, 50, 0.06);
  font-size: 0.9rem;
}

.tonight-v2__facts li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.tonight-v2__facts span {
  color: var(--tonight-muted);
  font-weight: 500;
}

.tonight-v2__facts strong {
  color: var(--tonight-ink);
  font-weight: 800;
  text-align: right;
}

.tonight-v2__match {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tonight-ink);
  line-height: 1.4;
}

.tonight-v2__submit {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0.95rem 1.1rem;
  background: var(--tonight-orange);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(232, 93, 4, 0.22);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.tonight-v2__submit:hover {
  background: #d45303;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(232, 93, 4, 0.26);
}

.tonight-v2__submit:focus-visible {
  outline: 2px solid var(--tonight-orange);
  outline-offset: 3px;
}

.tonight-v2__note {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--tonight-muted);
}

/* ——— Résultats ——— */

.home-tonight__outcome {
  margin-top: 1.5rem;
  padding: 1.35rem 1.2rem 1.4rem;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--tonight-line);
  box-shadow: 0 12px 30px rgba(27, 67, 50, 0.045);
}

.home-tonight__outcome[hidden] {
  display: none !important;
}

.home-tonight__outcome-head {
  margin: 0 0 1.1rem;
}

.home-tonight__outcome-title {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--tonight-ink);
}

.home-tonight__status {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--tonight-muted);
}

.home-tonight__results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .home-tonight__results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .home-tonight__results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-tonight__results[hidden] {
  display: none !important;
}

.home-tonight__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(27, 67, 50, 0.08);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(27, 67, 50, 0.035);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.home-tonight__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(27, 67, 50, 0.06);
}

.home-tonight__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #efeae2;
  overflow: hidden;
}

.home-tonight__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-tonight__badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--tonight-ink);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(27, 67, 50, 0.1);
}

.home-tonight__body {
  display: grid;
  gap: 0.6rem;
  padding: 0.95rem 1rem 1.05rem;
  flex: 1;
}

.home-tonight__name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--tonight-ink);
}

.home-tonight__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-tonight__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--tonight-cream);
  border: 1px solid rgba(27, 67, 50, 0.05);
  color: var(--tonight-ink);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.home-tonight__cta {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  color: var(--tonight-orange);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.home-tonight__cta:hover {
  color: #d45303;
}

.home-tonight__cta:focus-visible {
  outline: 2px solid var(--tonight-orange);
  outline-offset: 2px;
}

/* Responsive */

@media (max-width: 979px) {
  .tonight-v2__shell {
    grid-template-columns: 1fr;
    padding: 1.2rem;
  }

  .tonight-v2__summary {
    position: static;
  }
}

@media (max-width: 699px) {
  .home-tonight {
    margin-top: -1rem;
    padding: 0 1rem 2.3rem;
  }

  .tonight-v2__intro {
    margin-bottom: 1.2rem;
  }

  .tonight-v2__shell {
    padding: 1rem;
    border-radius: 22px;
  }

  .tonight-v2__opts {
    gap: 0.45rem;
  }

  .tonight-v2__opt {
    flex: 1 1 calc(50% - 0.45rem);
    min-width: calc(50% - 0.45rem);
    text-align: center;
  }

  .tonight-v2__opts--count .tonight-v2__opt {
    flex: 1 1 calc(50% - 0.45rem);
  }

  .home-tonight__card:hover,
  .tonight-v2__mood:hover,
  .tonight-v2__submit:hover {
    transform: none;
  }
}

@media (min-width: 700px) and (max-width: 979px) {
  .tonight-v2__moods {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-tonight__card,
  .tonight-v2__mood,
  .tonight-v2__opt,
  .tonight-v2__chip,
  .tonight-v2__submit {
    transition: none;
  }

  .home-tonight__card:hover,
  .tonight-v2__mood:hover,
  .tonight-v2__submit:hover {
    transform: none;
  }
}
