/* Global styles */
body {
  font-family: "Questrial", system-ui, sans-serif;
  margin-block-start: 0;
}

img,
picture,
video {
  display: block;
}

strong {
  color: #000;
}

main > p:has(> iframe:only-child) {
  margin-block: var(--step-6);
}

main > p > iframe:only-child {
  width: 100%;
}

:where(a, button, label, span, p, li, dt, dd, th, td, code, summary) svg {
  height: 1em;
  width: 1em;
}
:where(a, button, label, span, p, li, dt, dd, th, td, code, summary)
  svg.icon:not(.right) {
  margin-inline-end: 0.25rem;
}

/* General Layout */
body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
body > * {
  width: 100%;
}
main > section {
  margin-block: var(--step-6);
}

/* Navigation */
body > header {
  & li {
    margin-inline: 0;
  }
  & :is(a, abbr) {
    text-decoration: none;
    color: inherit;
  }
  & a[aria-current] {
    font-weight: bold;
    color: #000;
  }
}
body > header,
body > header nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
}
body > header nav {
  align-items: center;
  overflow: hidden;
  flex-grow: 1;
}
body > header ul {
  display: flex;
  flex-wrap: nowrap;
  /* align-items: center; */
}

body > header * {
  /* align-items: center;
  display: flex;
  flex-wrap: nowrap; */
}
body > header #main-nav {
  /* height: 3rem; */
}
body > header .nav-logo {
  margin-inline-end: auto;
  flex-shrink: 0;
}
/* body > header .lang-nav-ul {
  flex-wrap: nowrap;
  gap: 0.5rem;
} */
body > header .lang-nav-details {
  margin: 0;
  position: relative;
  background: white;
  & > * {
    padding-inline: 0.5rem;
    text-align: center;
  }
}
body > header .lang-nav-details summary {
  /* list-style-type: "⬇ "; */
  list-style-type: none;
  font-weight: bold;
  color: #000;
  border-bottom: solid 1px #000;
}
body > header .lang-nav-details summary::after {
  /* font-size: 0.8rem; */
  /* content: "⬇"; */
}
body > header .lang-nav-details .content {
  background: white;
  position: absolute;
  top: 0.5rem;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
#main-nav,
.nav-logo,
.lang-nav-ul,
body > header li,
body > header img,
body > header picture {
  max-height: 3rem;
  width: auto;
}

body > header.full-bleed-before {
  z-index: 1000;
  position: sticky;
  top: 0;
  background: inherit;
}
body > header::before {
  /* box-shadow: 0 0 0.5rem hsl(0 0% 0% / 0.3); */
  animation: navShadow linear forwards;
  animation-timeline: view(block);
  /* animation-timeline: view(); */
  animation-range-start: 100vh;
  animation-range-end: 200vh;
}
@keyframes navShadow {
  100% {
    box-shadow: 0 0.5rem 0.5rem hsl(0 0% 0% / 0.05);
    /* border-bottom: solid 5px red; */
  }
}

/* Footer */
footer {
  margin-block-start: auto;
  background-color: #d4d1a5;
  color: #3a471a;
  padding: 2em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  font-size: var(--step--1);
}
footer .infos {
  max-width: var(--width-max);
  margin-inline: auto;
  width: 100%;
  /* justify-items: flex-end; */
  --width-column-min: 12rem;
}
footer a {
  color: inherit;
}

/* Recurring Page Elements Layout */
/* Large horizontal images */
main > p:not(:first-child):has(> picture:only-child),
main > p:not(:first-child):has(> img:only-child) {
  max-width: var(--width-max);
  margin-block: var(--step-6);
}
main > p:not(:first-child) > picture:only-child,
main > p:not(:first-child) > img:only-child {
  aspect-ratio: 3;
  object-fit: cover;
}

/* Top illustration */
main > p:first-child:has(> picture:only-child),
main > p:first-child:has(> img:only-child) {
  padding-inline: 2rem;
}
main > p:first-child > picture:only-child,
main > p:first-child > img:only-child {
  max-width: 15rem;
  margin-inline: auto;
}

main > h1 {
  text-align: center;
}

/* Gallery */
/* Symetrical */
/* main > p:has(> picture + picture),
main > p:has(> img + img) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
main > p:has(> picture + picture) > picture,
main > p:has(> img + img) > img {
  aspect-ratio: 1;
} */
main > p:has(> picture + picture),
main > p:has(> img + img) {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(7, 1fr);
  /* grid-template-rows: repeat(4, 5rem); */
}
/* main > p:has(> picture + picture) > picture,
main > p:has(> img + img) > img {
  aspect-ratio: 1;
} */
main > p:has(> img + img) > img {
  grid-column: unset;
  grid-row: unset;

  &:first-child {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    aspect-ratio: 1.1;
  }
  &:nth-child(2) {
    grid-column: 3 / 6;
    grid-row: 1 / 3;
    aspect-ratio: 1.6;
  }
  &:nth-child(3) {
    grid-column: 6 / 8;
    grid-row: 1 / 5;
    aspect-ratio: 0.6;
  }
  &:nth-child(4) {
    grid-column: 1 / 4;
    grid-row: 3 / 5;
    aspect-ratio: 1.6;
  }
  &:nth-child(5) {
    grid-column: 4 / 6;
    grid-row: 3 / 5;
    aspect-ratio: 1.1;
  }
  &:nth-child(5) ~ * {
    display: none;
  }
}

/* Large message */
main > section.full-bleed-before {
  font-size: var(--step-2);
  background-color: #87855c;
  color: #fff;
  padding-block: 2rem;
}
main > section.full-bleed-before p {
  text-align: center;
  text-wrap: balance;
}

/* Callout */
.callout {
  max-width: var(--width-prose);
  padding: 1rem;
  border: 2px dotted #c09d74;
  text-wrap: balance;
  text-align: center;
}

/* Button */
.btn {
  text-decoration: none;
  color: #87855c;
  text-transform: uppercase;
  border: 3px solid currentColor;
  padding: 0.5rem 1rem;
}
.btn.book {
  max-width: 100%;
  width: max(30%, 16ch);
  /* width: max-content; */
  text-align: center;
}
.btn.book:hover {
  color: #fff;
  background-color: #87855c;
  border-color: #87855c;
}

/* azienda: img-txt sections */
.azienda-img-txt {
  max-width: var(--width-max);
  margin-inline: auto;
  margin-block: var(--step-6);
  align-items: center;
}
@media (min-width: 700px) {
  .azienda-img-txt.swap > .content {
    order: -1;
  }
}

/* Unique Elements */
/* Home header */
main > header img,
main > header picture {
  max-width: 300px;
  margin-inline: auto;
}
/* Home links */
.home-links {
  --width-wrap: 19rem;
}
.home-links li {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.home-links li a {
  text-decoration: none;
  color: inherit;
}
.home-links picture,
.home-links img {
  max-width: 150px;
  margin-inline: auto;
}
.home-links li a:hover {
  color: #87855c;
}
.home-links li:has(a:hover) img,
.home-links li:has(a:hover) picture {
  /* filter: sepia(1) hue-rotate(57.21deg) saturate(45) contrast(1)
    brightness(0.45); */
  filter: invert(20%);
}
@media (max-width: 400px) {
  .home-links li a {
    font-size: var(--step-0);
  }
}

/* Booking calendar */
ol.calendar-list {
  --_list-items-padding: 1rem;
  max-width: 100%;
  /* gap: 1rem; */
  /* justify-content: center; */
  padding: 1rem;
  align-items: stretch;
  scroll-snap-type: x mandatory;
  scroll-padding: var(--_list-items-padding);
}

.calendar-list > li {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: var(--_list-items-padding);
  scroll-snap-align: start;
}

table.calendar thead {
  /* color: #d4d1a5; */
  color: #c09d74;
  border-block-start: 1px solid currentColor;
}

table.calendar th {
  font-weight: normal;
  text-transform: uppercase;
}
table.calendar th,
table.calendar td {
  padding: 0.5rem 0.3rem;
  text-align: center;
}

/* Caption styling - month and year */
table.calendar caption {
  padding: 1rem 0.3rem;
  text-align: right;
}

table.calendar td[data-booked="true"] {
  color: #d8d8d8;
  position: relative;
}
table.calendar td[data-booked="true"]::after,
table.calendar td[data-booked="true"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 25%;
  width: 50%;
  height: 2px;
  transform: rotate(45deg);
  background-color: #d8d8d8;
}
table.calendar td[data-booked="true"]::before {
  transform: rotate(-45deg);
}

/* Photo potager recadrage */
img[src="/assets/images/vnGqJC_t4o-480.webp"] {
  object-position: 50% 61%;
}

/* Shadow scroll */
.scroll-shadows-horizontal {
  /* display: flex; */
  /* height: auto; */
  /* overflow-x: auto;
  overflow-y: hidden; */
  /* scrollbar-width: none; */
  /* scrollbar-color: white currentcolor; */
  background-image: linear-gradient(to right, white, white),
    linear-gradient(to right, white, white),
    linear-gradient(to right, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0)),
    linear-gradient(to left, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0));
  background-position: left center, right center, left center, right center;
  background-repeat: no-repeat;
  background-color: white;
  background-size: 20px 100%, 20px 100%, 10px 100%, 10px 100%;
  background-attachment: local, local, scroll, scroll;
}
