/* Le choix d’une activité est une page de navigation, distincte des paillasses. */
.phyto-hub, .phyto-activity {
  --forest: #173f28;
  --sage-line: #c1cfb9;
  background: #fbfaf6;
}
.phyto-hub { position: relative; isolation: isolate; }
@media screen {
  .phyto-hub::before {
    --serre: url('/assets/phytolab/greenhouse-background-v2.webp');
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    height: clamp(255px, 35vw, 510px);
    pointer-events: none;
    background-image:
      linear-gradient(180deg, transparent 18%, rgb(251 250 246 / 8%) 36%, rgb(251 250 246 / 76%) 60%, #fbfaf6 98%),
      radial-gradient(ellipse 45% 52% at 50% 32%, rgb(255 253 244 / 94%) 8%, rgb(255 253 244 / 69%) 51%, transparent 100%),
      var(--serre);
    background-position: center, center, center 38%;
    background-size: cover;
    background-repeat: no-repeat;
  }
}
.masthead {
  height: auto;
  min-height: 58px;
  background: #fffefa;
  border-bottom: 1px solid var(--sage-line);
}
.phyto-brand { display: flex; align-items: center; gap: 18px; }
.phyto-collection { border-left: 1px solid var(--sage-line); padding-left: 18px; font-size: 14px; text-decoration: none; }
.phyto-collection:hover { text-decoration: underline; }
.phyto-hub main { max-width: 1300px; margin-inline: auto; }
.phyto-welcome { padding: clamp(20px, 3vw, 43px) 0 18px; text-align: center; }
.phyto-wordmark { margin: 0; color: #366943; font: 600 clamp(24px, 2.5vw, 36px)/1.06 var(--serif); }
.phyto-welcome h1 {
  max-width: none;
  margin: 5px 0 0;
  color: #102d20;
  font: 720 clamp(36px, 4.2vw, 62px)/1.04 var(--sans);
  letter-spacing: -.05em;
  text-wrap: balance;
}
.phyto-access { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px 0 0; color: #4c614f; font-size: 14px; }
.phyto-access::before, .phyto-access::after { content: ""; width: 44px; height: 1px; background: #a9bd9e; }
.phyto-divider {
  display: flex; align-items: center; gap: 17px;
  margin: 9px 0 14px; color: var(--forest);
  font: 680 clamp(20px, 2.15vw, 30px)/1.18 var(--sans); letter-spacing: -.035em;
}
.phyto-divider::after { content: ""; flex: 1; min-width: 14px; height: 1px; background: var(--sage-line); }
.phyto-paths, .phyto-companions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.phyto-card, .phyto-companion {
  display: block; position: relative; min-width: 0;
  color: var(--forest); background: #fffefa; border: 1px solid #c5d2bd;
  border-radius: 13px; text-decoration: none;
}
.phyto-card { overflow: hidden; }
.phyto-card:hover, .phyto-companion:hover { border-color: #597d53; background-color: #f2f5eb; }
.phyto-card:focus-visible, .phyto-companion:focus-visible, .phyto-back a:focus-visible { outline: 3px solid #92601a; outline-offset: 3px; }
.phyto-card-picture { position: relative; background: #e1e9d9; }
.phyto-card-picture img { display: block; width: 100%; height: clamp(148px, 16vw, 211px); object-fit: cover; }
.phyto-card-picture span {
  position: absolute; left: 14px; bottom: 12px; padding: 3px 10px;
  border-radius: 20px; background: #f4f6e6; color: #264631; font-size: 12px; font-weight: 650;
}
.phyto-card-copy { position: relative; padding: 17px 53px 22px 18px; }
.phyto-card h3, .phyto-companion h3 { margin: 0; font: 690 clamp(19px, 1.9vw, 26px)/1.14 var(--sans); letter-spacing: -.032em; }
.phyto-card p, .phyto-companion p { margin: 6px 0 0; color: #45584c; font-size: 15px; line-height: 1.45; }
.phyto-arrow {
  position: absolute; top: 17px; right: 14px;
  display: grid; place-items: center; width: 28px; height: 28px;
  border: 1px solid #b9cbb2; border-radius: 50%; font-size: 18px; line-height: 1;
}
.phyto-card:hover .phyto-arrow, .phyto-companion:hover .phyto-arrow { color: #fff; background: var(--forest); }
.phyto-resources { margin-top: clamp(23px, 3vw, 37px); }
.phyto-companion { padding: 17px 46px 18px 16px; background: #f1f4e9; border-color: #d2dbcb; }
.phyto-companion h3 { font-size: clamp(17px, 1.45vw, 21px); }
.phyto-companion p { font-size: 14px; }
.phyto-companion .phyto-arrow { width: 24px; height: 24px; right: 12px; background: #fffefa; font-size: 15px; }
.phyto-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; margin: 28px 0 0; padding: 15px 0; border-top: 1px solid var(--sage-line); color: #465a4c; font-size: 13px; }
.phyto-hub .phyto-footer {
  justify-content: flex-start; border: 0; border-top: 1px solid var(--sage-line);
  border-radius: 0; box-shadow: none; background: transparent;
}
.phyto-footer span { margin-left: auto; }
.phyto-footer a, .phyto-back a { display: inline-flex; align-items: center; min-height: 44px; }
.phyto-back { margin: 10px 0; }
.phyto-back a { gap: 8px; color: #285637; font-weight: 650; }
.phyto-page-title { padding: 6px 0 16px; }
.phyto-activity h1 { margin: 0; color: var(--forest); font: 700 clamp(30px, 3.8vw, 51px)/1.08 var(--sans); letter-spacing: -.043em; }
.phyto-page-title p { max-width: 70ch; margin: 9px 0 0; }
.phyto-related { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.phyto-lab-options { margin: 0 0 14px; }
.phyto-lab-options summary { width: fit-content; padding: 8px 0; color: #285637; font-weight: 600; }
.phyto-lab-options div { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 6px; padding: 6px 0 10px; }
.phyto-activity #load-message { min-height: 0; }
.g-continuity > a, .g-project > a, #garden .g-toolbar a { display: inline-flex; align-items: center; gap: .35em; margin-right: 14px; min-height: 44px; font-weight: 600; }
.phyto-activity .g-toolbar p { max-width: 72ch; }
@media (max-width: 900px) {
  .phyto-paths, .phyto-companions { gap: 12px; }
  .phyto-card-copy { padding: 14px 39px 16px 12px; }
  .phyto-arrow { width: 23px; height: 23px; top: 14px; right: 9px; font-size: 15px; }
  .phyto-card p, .phyto-companion p { font-size: 14px; }
}
@media (max-width: 700px) {
  .phyto-hub::before {
    --serre: url('/assets/phytolab/greenhouse-background-v2-700.webp');
    height: clamp(218px, 54vw, 300px);
  }
  .masthead { min-height: 54px; padding: 5px 15px; gap: 8px; }
  .phyto-collection { display: none; }
  .phyto-welcome { padding: 19px 0 15px; }
  .phyto-welcome h1 { font-size: clamp(29px, 7.3vw, 40px); }
  .phyto-access { font-size: 12px; margin-top: 6px; }
  .phyto-paths, .phyto-companions { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .phyto-divider { gap: 9px; margin: 7px 0 10px; }
  .phyto-card { display: grid; grid-template-columns: clamp(79px, 24vw, 130px) minmax(0, 1fr); }
  .phyto-card-picture { display: flex; overflow: hidden; }
  .phyto-card-picture img { position: absolute; inset: 0; height: 100%; }
  .phyto-card-picture span { display: none; }
  .phyto-card-copy { align-self: center; padding: 13px 29px 13px 12px; }
  .phyto-card-copy h3 { font-size: 19px; }
  .phyto-card-copy p { font-size: 14px; line-height: 1.35; }
  .phyto-card .phyto-arrow { border: 0; right: 4px; top: 12px; }
  .phyto-companion { padding: 11px 37px 12px 13px; }
  .phyto-resources { margin-top: 18px; }
  .phyto-companion h3 { font-size: 17px; }
  .phyto-companion p { margin-top: 3px; }
  .phyto-footer { gap: 2px 16px; margin-top: 18px; padding: 8px 0 18px; }
  .phyto-footer span { flex-basis: 100%; margin: 0; }
}
@media (forced-colors: active), (prefers-reduced-motion: reduce) {
  .phyto-hub::before { content: none; background-image: none; }
}
@media (forced-colors: active) {
  .phyto-card, .phyto-companion, .phyto-arrow { border-color: LinkText; }
  .phyto-card h3, .phyto-companion h3 { text-decoration: underline; }
}
@media print {
  .masthead, .phyto-back, .phyto-lab-options, .phyto-arrow { display: none; }
  .phyto-card, .phyto-companion { break-inside: avoid; }
}
