html,
body {
  min-width: 1200px;
}

.site-shell {
  width: min(calc(100% - 2rem), var(--page));
  margin-inline: auto;
}
.reading-width { width: min(100%, var(--measure)); }

.site-header {
  background: var(--bg);
}
.site-header__inner {
  position: relative;
  display: grid;
  gap: .68rem;
  padding-block: 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
}
.site-header__inner .site-nav {
  width: max-content;
  max-width: 100%;
  margin-left: .8rem;
  gap: .58rem;
}
.site-nav__row:first-child { justify-self: start; }
.site-nav__row:nth-child(2) { justify-self: center; }
.site-nav__item { position: static; }
.nav-preview {
  position: absolute;
  top: 3.28rem;
  left: clamp(39rem, 60%, 43.5rem);
  right: 1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .7rem;
  width: auto;
  min-height: 4.25rem;
  color: var(--nav-color, var(--text));
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 550;
  line-height: 1.3;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-.15rem);
  transition: opacity 150ms ease, transform 150ms ease;
}
.nav-preview__icon {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-preview__icon-dot {
  fill: currentColor;
  stroke: none;
}
.nav-preview__text { max-width: 30ch; }
.site-nav__item:hover .nav-preview,
.site-nav__item:focus-within .nav-preview {
  opacity: 1;
  transform: translateY(0);
}

main { padding-block: clamp(2.5rem, 6vw, 5rem); }
.home-latest { padding-top: 1.35rem; }
.home-latest__featured {
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid #ebe3d7;
  border-radius: 1.25rem;
  background: #fbf8f1;
}
.home-latest__heading {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.4rem;
  align-items: baseline;
  margin-bottom: 1rem;
}
.home-latest__title {
  position: relative;
  margin: 0;
  padding-bottom: .48rem;
  font-size: clamp(1.9rem, 3vw, 2.25rem);
  line-height: 1;
}
.home-latest__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.4rem;
  height: 2px;
  background: var(--accent);
}
.home-latest__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}
.site-footer {
  margin-top: var(--space-6);
  padding-bottom: var(--space-5);
}
.home-latest + .site-footer { margin-top: var(--space-4); }
.site-footer .site-shell {
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: var(--space-5);
}
.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.home-latest__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(22rem, 1fr);
  gap: var(--space-5);
  align-items: stretch;
}
.home-latest__lead,
.home-latest__lead .article-card { height: 100%; }
.home-latest__more {
  display: grid;
  grid-template-rows: auto repeat(3, minmax(0, 1fr)) auto;
  gap: .5rem;
  align-self: stretch;
  min-height: 0;
}
.home-latest__more-heading {
  align-self: end;
  justify-self: end;
  text-align: right;
}
.home-latest__more-title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.25rem);
  line-height: 1;
}
.home-latest__more-title--bottom {
  justify-self: end;
  text-align: right;
}
.home-latest__more-subtitle {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .82rem;
}
.home-latest__more .home-archive--rail {
  align-self: start;
  margin-top: 0;
  padding-inline: 0;
  text-align: right;
  line-height: 1;
}
.home-latest__more .article-card {
  height: 100%;
  min-height: 0;
}
.home-latest__more .article-card--compact .article-card__image,
.home-latest__more .article-card--compact .article-card__image img {
  height: 100%;
  min-height: 0;
}
.home-latest__lead .article-card h2 { font-size: clamp(1.75rem, 3vw, 2.45rem); }
.home-latest__lead .article-card__image img { aspect-ratio: 16 / 8.7; }

.home-teasers {
  margin-top: var(--space-5);
  padding: clamp(1.15rem, 2.4vw, 1.75rem);
  border: 1px solid #ebe3d7;
  border-radius: 1.25rem;
  background: #fbf8f1;
}
.home-teasers__heading {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  align-items: baseline;
  margin-bottom: 1rem;
}
.home-teasers__heading-main {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.4rem;
  align-items: baseline;
}
.home-teasers__heading h2 {
  position: relative;
  margin: 0;
  padding-bottom: .48rem;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  line-height: 1;
}
.home-teasers__heading h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.4rem;
  height: 2px;
  background: var(--accent);
}
.home-teasers__heading p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}
.home-teasers__all {
  flex: 0 0 auto;
  color: var(--accent-sidestep);
  font-weight: 650;
  text-decoration: none;
}
.home-teasers__all:hover { text-decoration: underline; }
.home-teasers__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(20rem, .92fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: stretch;
}
.home-teasers__feature {
  display: grid;
  grid-template-columns: minmax(12rem, .95fr) minmax(0, 1.05fr);
  overflow: hidden;
  border: 1px solid #e8e2d8;
  border-radius: .9rem;
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.home-teasers__feature:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 .65rem 1.5rem rgba(57, 43, 31, .1);
}
.home-teasers__feature-image {
  display: block;
  overflow: hidden;
}
.home-teasers__feature-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 18.5rem;
  object-fit: cover;
  transition: transform 220ms ease;
}
.home-teasers__feature:hover .home-teasers__feature-image img { transform: scale(1.012); }
.home-teasers__feature-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1rem, 2.2vw, 1.55rem);
}
.home-teasers__feature-body .categories,
.home-teasers__row .categories {
  margin: 0;
  color: var(--accent);
}
.home-teasers__feature-body h3 {
  margin: .55rem 0 0;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.04;
}
.home-teasers__feature-body h3 a,
.home-teasers__row h3 a {
  color: var(--text);
  text-decoration: none;
}
.home-teasers__feature-body h3 a:hover,
.home-teasers__row h3 a:hover { color: var(--accent); }
.home-teasers__feature-summary {
  margin-top: .8rem;
  color: var(--text);
  line-height: 1.5;
}
.home-teasers__date {
  margin-top: .75rem;
  color: var(--muted);
  font-size: .78rem;
}
.home-teasers__stack {
  overflow: hidden;
  border: 1px solid #e8e2d8;
  border-radius: .9rem;
  background: var(--surface);
}
.home-teasers__row {
  display: grid;
  grid-template-columns: 5.8rem minmax(0, 1fr) 2.6rem;
  gap: 1rem;
  align-items: center;
  min-height: 8rem;
  padding: .65rem .8rem .65rem .65rem;
  border-bottom: 1px solid var(--line);
}
.home-teasers__row:last-child { border-bottom: 0; }
.home-teasers__row-image {
  display: block;
  overflow: hidden;
  border-radius: .55rem;
}
.home-teasers__row-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 180ms ease;
}
.home-teasers__row:hover .home-teasers__row-image img { transform: scale(1.018); }
.home-teasers__row .categories { font-size: .65rem; }
.home-teasers__row h3 {
  margin: .35rem 0 0;
  font-size: 1rem;
  line-height: 1.1;
}
.home-teasers__row .home-teasers__date { margin-top: .4rem; }
.home-teasers__arrow {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.25rem;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.home-teasers__arrow:hover {
  transform: translateX(2px);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.home-latest__more .home-archive__hint {
  top: auto;
  right: calc(100% - .35rem);
  bottom: calc(100% - .12rem);
  background: #fbf8f1;
  box-shadow: none;
  border-radius: 0;
}

/* Troisième étage : les six portes de Meshorizons, sans nouvelle grille de cartes. */
.home-rooms {
  margin-top: var(--space-5);
  padding: clamp(1.25rem, 2.5vw, 1.8rem);
  border: 1px solid #ebe3d7;
  border-radius: 1.25rem;
  background: #fbf8f1;
}
.home-rooms__heading {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.4rem;
  align-items: baseline;
  margin-bottom: 1.1rem;
}
.home-rooms__heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.1vw, 2.3rem);
  line-height: 1;
}
.home-rooms__heading p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}
.home-rooms__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.8rem, 4vw, 3.5rem);
  row-gap: 0;
}
.home-room {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "mark arrow"
    "title arrow"
    "text text";
  gap: .35rem 1rem;
  min-height: 8rem;
  padding: 1rem .1rem 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.home-room__mark {
  grid-area: mark;
  display: block;
  width: 1.7rem;
  height: 2px;
  margin-bottom: .25rem;
  background: var(--accent);
  transition: width 170ms ease;
}
.home-room__title {
  grid-area: title;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 650;
  line-height: 1.05;
}
.home-room__text {
  grid-area: text;
  max-width: 31ch;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
  transition: color 160ms ease;
}
.home-room__arrow {
  grid-area: arrow;
  align-self: start;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 160ms ease;
}
.home-room:hover .home-room__mark,
.home-room:focus-visible .home-room__mark { width: 3.25rem; }
.home-room:hover .home-room__text,
.home-room:focus-visible .home-room__text { color: var(--text); }
.home-room:hover .home-room__arrow,
.home-room:focus-visible .home-room__arrow { transform: translateX(.2rem); }
.home-rooms__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: .35rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
}
.home-rooms__footer a {
  color: var(--accent-archive);
  font-family: var(--font-serif);
  font-weight: 600;
  text-underline-offset: .2em;
}

@media (prefers-reduced-motion: reduce) {
  .home-teasers__feature,
  .home-teasers__feature-image img,
  .home-teasers__row-image img,
  .home-teasers__arrow,
  .home-room__mark,
  .home-room__text,
  .home-room__arrow { transition: none; }
  .home-teasers__feature:hover,
  .home-teasers__arrow:hover,
  .home-room:hover .home-room__arrow { transform: none; }
  .home-teasers__feature:hover .home-teasers__feature-image img,
  .home-teasers__row:hover .home-teasers__row-image img { transform: none; }
}
