:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  background: #1a201e;
  --edge: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }

.landscapes, .scene, .landscapes::after {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.landscapes { pointer-events: none; isolation: isolate; }
.scene {
  object-fit: cover;
  object-position: var(--focus);
  opacity: 0;
  transition: opacity 2.4s ease;
}
.scene.outgoing { opacity: 1; }
.scene.active { opacity: 1; z-index: 1; }
.landscapes::after {
  z-index: 2;
  content: "";
  background: linear-gradient(0deg, #101615d4, #10161540 24%, transparent 44%);
}

.portal {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding-inline: var(--edge);
}

footer {
  --rubrique-gap: clamp(16px, 2.5vw, 38px);
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  padding-bottom: max(clamp(22px, 4vw, 54px), env(safe-area-inset-bottom));
}

.brand { --logo-width: clamp(112px, 14vw, 172px); grid-column: 1; grid-row: 1; margin: 0; }
.brand img { display: block; width: var(--logo-width); height: auto; }
nav {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: end;
  column-gap: var(--rubrique-gap);
}
a { color: inherit; text-underline-offset: 5px; }
nav a, .private-login > .pill, .account-actions > form > .pill {
  display: inline-flex;
  align-items: end;
  min-height: 44px;
  padding-bottom: 1px;
  font-size: .875rem;
  line-height: 1.2;
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
nav a:hover, .private-login > .pill:hover, .private-login[open] > .pill, .account-actions > form > .pill:hover {
  text-decoration-line: underline;
  text-decoration-color: #ffffff85;
}
.access {
  position: relative;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
.private-login > .pill, .account-actions > form > .pill {
  padding-inline: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.account-actions { --action-size: 44px; display: flex; align-items: center; gap: 7px; }
.key-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
}
summary.pill { display: flex; }
.access > .private-entry {
  width: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
}

summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
:focus-visible { outline: 2px solid white; outline-offset: 4px; }

.project {
  padding: 22px;
  border: 1px solid #ffffff44;
  border-radius: 14px;
  background: #131917f5;
}
[data-login-panel][open] > .login-backdrop, .password-change[open]::before {
  content: "";
  position: fixed;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
[data-login-panel][open] > .login-backdrop { pointer-events: auto; }

.login {
  position: fixed;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(370px, calc(100vw - 2 * var(--edge)));
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
  padding: 28px clamp(20px, 4vw, 32px) 24px;
  border: 1px solid #ffffff85;
  border-radius: 22px;
  background: #fafafaa3;
  color: #1d1d1f;
  color-scheme: light;
  text-align: center;
  box-shadow: 0 14px 52px #0004;
}
.login-mark { display: block; margin: 0 auto 12px; }
.login h2 {
  margin: 0 0 22px;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -.035em;
}
.login-fields {
  display: grid;
  overflow: hidden;
  border: 1px solid #1d1d1f2b;
  border-radius: 11px;
  background: #ffffff73;
}
.login input {
  min-width: 0;
  min-height: 46px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.login input + input { border-top: 1px solid #1d1d1f26; }
.login input::placeholder { color: #626267; opacity: 1; }
.login button {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 11px;
  background: #242426;
  color: #fff;
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}
.login button:hover { background: #404043; }
.login .login-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  margin: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
}
.login .login-close:hover { background: #1d1d1f15; }
.login :focus-visible { outline-color: #242426; }
.login-note { margin: 14px 0 0; color: #626267; font-size: .75rem; }
.login [role="alert"] { margin: 14px 0 0; color: #811b1b; font-size: .875rem; }
.account-notice {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: calc(100vw - 2 * var(--edge));
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #131917e6;
  font-size: .8rem;
}
.project h2 { margin: 0; font-size: 1.25rem; font-weight: 500; }
.project p { font-size: .9rem; }
.project { align-self: center; justify-self: center; }

.mobile-menu { display: none; }
@media (max-width: 820px) {
  footer { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .brand { --logo-width: clamp(88px, 27vw, 130px); }
  .access { grid-column: 2; }
  .account-actions { --action-size: 40px; gap: 3px; }
  .desktop-projects { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu nav {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: calc(100% + 8px);
    display: grid;
    gap: 2px;
    min-width: 148px;
    padding: 6px;
    border: 1px solid #ffffff38;
    border-radius: 12px;
    background: #181b19ed;
  }
  .mobile-menu nav a {
    padding: 11px 12px;
    border-radius: 7px;
    text-box: normal;
    margin: 0;
  }
  .mobile-menu nav a:hover { background: #ffffff20; }
}
@media (prefers-reduced-motion: reduce) {
  .scene { transition: none; }
}


/* Align the visible artwork, including the transparent edge in the logo PNG. */
.brand img { margin-bottom: calc(-1 * var(--logo-width) * 8 / 591); }
nav a { display: block; min-height: 0; line-height: 1; padding-top: 20px; padding-bottom: 0; }
nav a { text-box: trim-both cap alphabetic; }
@supports not (text-box: trim-both cap alphabetic) {
  nav a { margin-bottom: -0.15em; }
}
.account-actions :is(.private-entry, .key-button, .contact-button, .menu-button) {
  position: relative; display: flex; width: var(--action-size); height: var(--action-size); min-height: 0; align-items: flex-end;
  justify-content: center; padding: 0; border-radius: 50%; cursor: pointer;
}
.account-actions :is(.private-entry, .key-button, .contact-button, .menu-button) svg {
  position: relative; display: block; width: 18px; height: 18px; margin-bottom: -2px;
}
.account-actions :is(.private-entry, .key-button, .contact-button, .menu-button):is(:hover, :focus-visible)::before {
  content: "";
  position: absolute;
  /* Le centre du SVG est à 7 px du bas du bouton. */
  inset: auto 0 calc(7px - var(--action-size) / 2);
  height: var(--action-size);
  border-radius: 50%;
  background: #ffffff20;
  pointer-events: none;
}
.account-actions > form { display: flex; margin: 0; }
@media (min-width: 821px) {
  footer {
    grid-template-columns: max-content minmax(0, 1fr) auto;
    column-gap: var(--rubrique-gap);
  }
  /* Compense les 14 pixels transparents à droite du logo d’origine. */
  .brand { margin-inline-end: calc(-1 * var(--logo-width) * 14 / 591); }
  nav { justify-content: flex-start; }
}
