/* Les commandes et la typographie restent indépendantes des dioramas. */
#f-home, .f-page .fh-in-home { display: none; }
.fh-account { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; }
.fh-account .maxdecours-tool-subscription-cta { margin: 0; min-height: 44px; }
.fh-member-offer, .fh-laboratory, .fh-back { color: inherit; font-weight: 650; text-decoration: none; }
.fh-member-offer { color: #ffdfa0; padding: .6rem; text-decoration: underline; text-underline-offset: .22em; }
.fh-laboratory, .fh-back { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; }
.f-page .f-masthead nav .fh-back { display: inline-flex; }
.f-page[data-f-home] {
  --fh-forest: #10372c;
  --fh-ivory: var(--a-paper);
  --fh-brass: var(--a-brass);
  --fh-serif: var(--a-serif);
  background: #153a2f linear-gradient(#153a2f, #0c2e25);
  color: #15392e;
}
.f-page[data-f-home]::before {
  content: ""; display: block; position: absolute; inset: 0 0 auto; height: max(100vh, 76vw);
  z-index: -1; pointer-events: none; opacity: 1;
  background: linear-gradient(180deg, #0a241da6, #0e2a22b8 28%, #102c25db 72%, #102d29 100%),
    url("./verriere.webp") center top / cover no-repeat;
}
.f-page[data-f-home] .f-main { max-width: 1490px; padding: 0 clamp(16px, 2.75vw, 44px); }
.f-page[data-f-home] .f-masthead {
  max-width: none; min-height: 50px; padding: 3px max(2.75vw, calc((100vw - 1410px) / 2));
  gap: clamp(10px, 1.6vw, 28px); color: var(--fh-ivory);
  background: #0b3028; border-bottom: 1px solid #c9a35f;
}
.f-page[data-f-home] .f-brand { font-family: var(--a-serif); }
.f-page[data-f-home] .f-brand img { width: 26px; height: 26px; }
.f-page[data-f-home] .f-masthead nav { margin-left: auto; gap: .5rem; }
.f-page[data-f-home] .fh-laboratory, .f-page[data-f-home] .f-masthead .fh-in-home {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 .95rem;
  font: 650 .88rem/1.2 var(--a-sans); border-radius: 9px;
}
.f-page[data-f-home] .fh-laboratory { border-inline-start: 1px solid #a88e61; border-radius: 0; }
.f-page[data-f-home] .f-masthead a:hover { text-decoration: underline; text-underline-offset: .25em; }
.f-page[data-f-home] .fh-account .maxdecours-tool-subscription-cta { font-size: .84rem; }
.f-page[data-f-home] .f-masthead :is(.fh-in-game, .fh-back),
.f-page[data-f-home] .f-intro :is(.f-breadcrumb, .g-feature) { display: none; }
.f-page[data-f-home] .f-intro {
  display: grid; justify-content: center; text-align: center; padding: 8px 0 6px; color: var(--fh-ivory);
}
.f-page[data-f-home] .f-intro h1 { margin: 0; color: var(--a-paper); }
.f-page[data-f-home] .f-intro .a-tagline {
  display: block; max-width: none; padding: 0; margin: 5px 0 0;
  color: var(--a-paper);
}
.f-page[data-f-home] .f-intro .f-access { margin: 3px 0 0; color: #d4dfd7; }
.f-page[data-f-home] .a-tagline span { white-space: nowrap; }
.f-page[data-f-home] #f-home { display: block; }
@media (scripting: enabled) {
  .f-page[data-f-home] .f-main > :not(.f-intro):not(#f-home) { display: none !important; }
}
.fh-resume {
  margin: 0 auto 11px; width: fit-content; max-width: 100%; min-height: 54px; padding: 3px 9px 3px 6px;
  display: flex; align-items: center; gap: 15px; border: 1px solid #bcb49b; border-radius: 8px;
  background: #f4f0e4; box-shadow: 0 3px 12px #041a1555;
}
.fh-resume img { display: block; width: 88px; height: 48px; border-radius: 4px; object-fit: cover; }
.fh-resume strong, .fh-resume div > span { display: block; }
.fh-resume strong { font: 600 clamp(1.1rem, 1.43vw, 1.45rem)/1.15 var(--fh-serif); }
.fh-resume div > span { margin-top: 2px; font-size: .86rem; line-height: 1.3; }
.fh-gold, .fh-explore {
  display: inline-flex; justify-content: center; align-items: center; gap: .5em; min-height: 44px;
  text-align: center; text-decoration: none; font-weight: 650; line-height: 1.14; border-radius: 5px;
}
.fh-gold { padding: .55rem 1.1rem; border: 1px solid #b89b61; background: #dfc186; color: #192b24; }
.fh-gold:hover { background: #eed39c; }
.fh-gold i, .fh-explore i { font: 600 1.26em/.7 Georgia, serif; }
#fh-status:empty { display: none; }
.f-page[data-fh-opening] #fh-status:not(:empty) { position: fixed; z-index: 10; bottom: 1rem; right: 1rem; max-width: calc(100% - 2rem); box-shadow: 0 3px 12px #041a153d; pointer-events: none; }
#fh-status:not(:empty), .fh-notice { padding: .75rem; background: #fff4d9; color: #15392e; border-radius: .7rem; margin: .5rem 0; }
.fh-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; grid-auto-rows: 1fr; }
.fh-card {
  position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #a59e85; border-radius: 8px; background: #f3f0e5;
  box-shadow: 0 3px 10px #071b174d;
}
.fh-card:hover, .fh-card:focus-within { border-color: #e5c47f; }
.fh-diorama { display: block; width: 100%; height: auto; aspect-ratio: 2.24; object-fit: cover; background: #16251c; border-bottom: 1px solid #ada78e; }
.fh-caption {
  flex: 1; display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto auto; align-items: end; align-content: center;
  gap: 3px 7px; padding: 8px 11px; color: #102e25;
}
.f-page .fh-caption h2 {
  align-self: start; grid-column: 1/-1; grid-row: 1; margin: 0;
  font: 600 clamp(1.2rem, 1.65vw, 1.56rem)/1.05 var(--fh-serif); letter-spacing: -.025em;
}
.fh-caption p { grid-column: 1; grid-row: 2; align-self: center; margin: 0; font: 500 clamp(.84rem, .99vw, .94rem)/1.2 var(--a-sans); }
.fh-explore {
  grid-column: 2; grid-row: 2; align-self: center; min-height: 28px; padding: 4px 10px; border: 1px solid #284b40; background: #20453a; color: #faf8ed; font-size: .84rem;
}
.fh-explore::after { content: ""; position: absolute; inset: 0; border-radius: 7px; }
.fh-card:focus-within { outline: 3px solid #fff7d9; outline-offset: 2px; }
.fh-card:hover .fh-explore, .fh-explore:focus-visible { background: #0b3427; }
.fh-guided {
  margin-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 7px 16px; background: #13362d; border-block: 1px solid #a99060; border-radius: 3px;
  color: var(--fh-ivory);
}
.fh-guided > strong { font: 600 clamp(1.2rem,1.7vw,1.55rem)/1 var(--fh-serif); }
.fh-guided ol, .fh-guided li, .fh-guided li a { display: flex; align-items: center; }
.fh-guided ol { margin: 0; padding: 0; list-style: none; flex: 1; justify-content: space-evenly; }
.fh-guided li:not(:last-child)::after { content: "→"; color: #e1c582; margin: 0 .6vw; }
.fh-guided li a { gap: 6px; min-height: 44px; text-decoration: none; color: #fffae9; padding: 0 4px; font-weight: 650; }
.fh-guided li a:hover, .fh-foot a:hover { text-decoration: underline; }
.fh-guided li b { color: #e2c891; font: italic 1.15rem/1 var(--fh-serif); }
.fh-foot { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 24px; padding: 5px 0; color: #fcf5e4; font-size: .85rem; }
.fh-foot a { min-height: 44px; display: inline-flex; align-items: center; gap: .4em; color: #ffdfa0; }
.fh-read { margin: 0 12px 10px; }
.fh-read a { display: inline-flex; align-items: center; min-height: 44px; color: #20453a; font-weight: 650; }
@media (scripting: none) {
  .f-page[data-f-home] .fh-in-home, .f-page[data-f-home] .f-masthead .fh-in-home,
  #f-home .fh-resume, #f-home .fh-guided, #f-home .fh-explore { display: none; }
}
#f-home :focus-visible, .f-page[data-f-home] .f-masthead :focus-visible { outline: 3px solid #f8cf68; outline-offset: 3px; }
@media (min-width: 1051px) {
  .f-page[data-f-home] .f-masthead { min-height: 45px; padding-block: 0; }
  .f-page[data-f-home] .f-intro { padding-block: 3px; }
  .f-page[data-f-home] .f-intro .a-tagline { line-height: 1.15; }
  .fh-resume { margin-bottom: 8px; }
  .fh-grid { row-gap: 10px; }
  .fh-diorama { max-height: clamp(93px, calc((100svh - 624px) / 3), 160px); }
  .fh-caption { padding-block: 6px; row-gap: 2px; }
  .f-page .fh-caption h2 { font-size: clamp(1.18rem, 1.55vw, 1.48rem); }
  .fh-explore { min-height: 25px; }
  .fh-guided { margin-top: 10px; padding-block: 3px; }
  .fh-foot { padding-block: 1px; }
}
@media (max-width: 1050px) {
  .fh-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fh-guided { flex-wrap: wrap; }
  .fh-guided ol { order: 3; flex-basis: 100%; justify-content: space-between; }
  .f-page[data-f-home] .f-masthead { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 10px; padding: 5px 16px; }
  .f-page[data-f-home] .f-brand { grid-area: 1/1; }
  .f-page[data-f-home] .fh-account { grid-area: 1/2; justify-self: end; max-width: 53vw; }
  .f-page[data-f-home] .fh-laboratory { grid-area: 2/1; border: 0; justify-content: flex-start; padding: 0; }
  .f-page[data-f-home] .f-masthead nav { grid-area: 2/2; width: auto; justify-content: flex-end; gap: 1px; }
}
@media (max-width: 740px) {
  .f-page[data-f-home]::before { height: 720px; background-image: linear-gradient(180deg,#0a241d99,#102d29b5 40%,#102d29 100%),url("./verriere-mobile.webp"); }
  .f-page[data-f-home] .f-masthead .fh-in-home { padding: 0 .4rem; font-size: .79rem; }
  .fh-resume { max-width: 100%; gap: 8px; }
  .fh-resume img { width: 54px; }
  .fh-gold { font-size: .88rem; }
  .fh-guided { gap: 5px; padding: 8px 12px; }
  .fh-guided li:not(:last-child)::after { margin: 0 2px; }
  .fh-guided li a { gap: 4px; font-size: .84rem; }
}
@media (max-width: 540px) {
  .f-page[data-f-home] .f-main { padding: 0 14px; }
  .f-page[data-f-home] .f-intro { padding: 16px 0 12px; }
  .f-page[data-f-home] .f-intro .a-tagline { max-width: 29ch; margin: .35rem auto 0; }
  .fh-grid { grid-template-columns: minmax(0,1fr); grid-auto-rows: auto; }
  .fh-resume { display: grid; grid-template-columns: 65px minmax(0,1fr); width: 100%; padding: 8px; gap: 6px 10px; }
  .fh-resume img { width: 65px; height: 44px; }
  .fh-resume .fh-gold { grid-column: 1/-1; }
  .fh-caption { padding: 10px 13px; }
  .f-page .fh-caption h2 { font-size: 1.45rem; }
  .fh-explore { min-height: 36px; }
  .fh-guided ol { display: grid; grid-template-columns: 1fr 1fr; }
  .fh-guided li:not(:last-child)::after { content: none; }
  .fh-foot { gap: 0; flex-direction: column; padding-top: 9px; }
}
@media (forced-colors: active) {
  .fh-card, .fh-explore, .fh-guided li b, .fh-gold { border: 1px solid ButtonText; }
}
@media (max-width: 380px) {
  .f-page[data-f-home] .f-masthead { padding-inline: 10px; column-gap: 4px; }
  .f-page[data-f-home] .f-brand { font-size: 1.25rem; }
  .f-page[data-f-home] .f-brand img { width: 22px; height: 22px; }
  .f-page[data-f-home] .fh-account { max-width: 140px; }
  .f-page[data-f-home] .fh-account .maxdecours-tool-subscription-cta { max-width: 100%; white-space: normal; font-size: .75rem; }
  .f-page[data-f-home] .fh-laboratory { white-space: nowrap; font-size: .76rem; }
  .f-page[data-f-home] .f-masthead .fh-in-home { padding-inline: .24rem; font-size: .74rem; }
}
body:not([data-f-home]):not(.e-open):not(.e-city-open) #f-path-chooser .e-door { display: none; }
