/* MILIM — prototype autonome. Réglages partagés : couleurs, grille, rythme et fontes. */
:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #748169;
  --heading: #57694b;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --page-width: 76%;
  --page-max: 1600px;
  --gutter: clamp(22px, 2.1vw, 44px);
  --sequence-space: clamp(80px, 7.8vw, 150px);
  --body-size: .875rem;
  --body-weight: 300;
  --fade: 1800ms;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--body-size); font-weight: 400; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible { outline: 1px solid currentColor; outline-offset: 5px; }
.container { width: var(--page-width); max-width: var(--page-max); margin-inline: auto; }
.skip-link { position: absolute; top: -80px; left: 24px; z-index: 20; background: white; padding: 14px; }
.skip-link:focus { top: 16px; }
/* L'ouverture : une seule surface photographique, sans animation de cadrage. */
.hero { position: relative; color: white; background: #202b29; }
.hero .slideshow-stage { aspect-ratio: 2 / 1; }
.slideshow-stage { position: relative; width: 100%; isolation: isolate; }
.slide { display: block; position: absolute; inset: 0; opacity: 0; transition: opacity var(--fade) ease-in-out; pointer-events: none; }
.slide.is-active { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; }
.hero .slide img { object-fit: cover; object-position: center; }
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: clamp(24px, 2.7vw, 54px) 7.2%; gap: 28px; }
.site-header img { width: clamp(78px, 6vw, 110px); }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(18px, 1.7vw, 34px); font-size: .75rem; letter-spacing: .09em; line-height: 1.5; }
nav a { padding-block: 8px; transition: opacity 400ms ease; }
nav a:hover { opacity: .65; }
nav [aria-disabled] { cursor: default; }
.hero-signature { position: absolute; z-index: 2; left: 7%; right: 7%; top: 63%; transform: translateY(-50%); text-align: center; pointer-events: none; }
.hero-signature h1 { font-family: 'Avenir Next', Avenir, var(--sans); font-size: clamp(42px, 4vw, 78px); font-weight: 400; letter-spacing: .1em; line-height: 1.1; margin: 0 0 18px; }
.hero-signature p { font: 400 clamp(10px, .7vw, 14px)/1.8 var(--serif); letter-spacing: .28em; margin: 0; }
.slideshow-controls { display: flex; justify-content: flex-end; align-items: center; gap: 20px; }
.slideshow-controls[hidden] { display: none; }
.hero .slideshow-controls { position: absolute; z-index: 3; bottom: 18px; right: 7.2%; }
.slide-selectors { display: flex; gap: 2px; }
.slide-select, .slideshow-pause { border: 0; background: none; padding: 0; cursor: pointer; min-height: 44px; }
.slide-select { width: 28px; display: grid; place-items: center; }
.slide-select span { width: 16px; height: 1px; background: currentColor; opacity: .35; transition: opacity 500ms; }
.slide-select[aria-pressed='true'] span { opacity: 1; height: 2px; }
.slideshow-pause { font-size: 11px; letter-spacing: .07em; min-width: 52px; text-align: right; }
/* Une seule largeur parente pour les trois séquences : 3 / panoramique / 3. */
.portfolio { padding-top: var(--sequence-space); }
.section-title { font: 400 .875rem/1.5 var(--serif); color: var(--heading); text-align: center; letter-spacing: .27em; margin: 0 0 clamp(48px, 4.2vw, 80px); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); width: 100%; }
.project-card { min-width: 0; }
.project-image { width: 100%; }
.project-image img { width: 100%; height: auto; transition: opacity 900ms ease; }
@media (hover: hover) { .project-image:hover img { opacity: .92; } }
.project-card h3 { font: 600 .8125rem/1.7 var(--serif); color: var(--heading); letter-spacing: .11em; margin: 24px 0 12px; }
.project-card p { font-weight: var(--body-weight); margin: 0; font-size: var(--body-size); line-height: 1.75; letter-spacing: .025em; }
.panorama { margin-block: var(--sequence-space); width: 100%; }
.panorama .slideshow-stage { aspect-ratio: 1967 / 948; }
.panorama .slide img { object-fit: contain; }
.panorama .slideshow-controls { margin-top: 9px; }
.project-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--sequence-space); }
.project-grid--two .project-card p { max-width: 57ch; }
/* Présentation éditoriale du studio entre les deux séries de projets. */
.about { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 29%) minmax(0, 1fr); align-items: start; gap: clamp(16px, 1.4vw, 32px); margin-block: clamp(48px, 4.2vw, 96px); padding-block: clamp(48px, 4.2vw, 96px); }
.about::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #f5f1ee; box-shadow: 0 0 0 100vmax #f5f1ee; clip-path: inset(0 -100vmax); pointer-events: none; }
.about-copy { max-width: 60ch; text-align: left; }
.about .eyebrow { font-family: var(--serif); font-style: normal; font-weight: 400; line-height: 1.5; font-size: .75rem; letter-spacing: .095em; margin: 0 0 26px; }
.about .eyebrow::after { content: ""; display: block; width: 3.5ch; height: 1px; background: currentColor; opacity: .45; margin-top: 16px; }
.about p { font-style: normal; font-weight: var(--body-weight); font-size: var(--body-size); line-height: 1.5; letter-spacing: .02em; margin: 0 0 20px; }
.about > img { width: 100%; height: auto; margin: 0; }
.contact-invitation { display: inline-block; margin: 16px 0 0 -8px; padding: 6px 8px; font-style: normal; font-weight: 500; color: var(--heading); background: transparent; font-size: .75rem; letter-spacing: .095em; line-height: 1.8; }
.contact-invitation span { display: inline-block; font-size: 1.05em; line-height: 1; transition: transform 400ms ease; }
@media (hover: hover) { .contact-invitation:hover span { transform: translateX(3px); } }
.site-footer { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 48px; margin-top: var(--sequence-space); padding: 48px 7.2%; min-height: 170px; }
.site-footer img { width: 112px; }
.site-footer > a { position: absolute; left: 50%; transform: translateX(-50%); }
.site-footer nav { font-size: .6875rem; }
@media (min-width: 1800px) { :root { --body-size: .9375rem; } }
@media (max-width: 1050px) {
  :root { --page-width: 86%; --gutter: 24px; --sequence-space: 80px; --body-size: .875rem; }
  .site-header { padding-inline: 5%; }
  .hero .slideshow-stage { aspect-ratio: 1.7 / 1; }
  .project-card h3 { letter-spacing: .07em; font-size: .75rem; }
  .about { grid-template-columns: minmax(0, 29%) minmax(0, 1fr); }
  .site-footer > a { position: static; transform: none; }
}
@media (max-width: 700px) and (min-width: 601px) {
  :root { --page-width: 90%; --gutter: 18px; }
  .project-card p { font-size: .875rem; line-height: 1.65; }
  .about { gap: 18px; }
}
@media (max-width: 600px) {
  :root { --page-width: calc(100% - 40px); --gutter: 28px; --sequence-space: 64px; --body-size: .9375rem; }
  html { scroll-padding-top: 24px; }
  .site-header { padding: 24px 20px; display: block; }
  .site-header img { width: 72px; margin: 0 auto 20px; }
  .site-header nav { justify-content: center; gap: 20px; font-size: .625rem; letter-spacing: .08em; }
  .hero .slideshow-stage { aspect-ratio: 4 / 5; min-height: 470px; }
  .hero-signature { top: 67%; left: 20px; right: 20px; }
  .hero-signature h1 { font-size: 48px; margin-bottom: 20px; }
  .hero-signature p { max-width: 30ch; margin-inline: auto; font-size: 10px; line-height: 2; letter-spacing: .2em; }
  .hero .slideshow-controls { bottom: 10px; right: 20px; }
  .section-title { font-size: .75rem; letter-spacing: .22em; margin-bottom: 40px; }
  .project-grid, .project-grid--two { grid-template-columns: minmax(0, 1fr); gap: 52px; }
  .project-card h3 { font-size: .8125rem; margin-top: 22px; letter-spacing: .1em; }
  .project-card p { line-height: 1.7; }
  .panorama .slideshow-stage { aspect-ratio: 1089 / 2725; }
  .panorama .slideshow-controls { margin-top: 4px; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-block: 40px; padding-block: 40px; }
  .about > img { width: 58%; max-width: 220px; }
  .about .eyebrow { margin-bottom: 28px; }
    .about p:last-child { margin-bottom: 0; }
  .site-footer { padding: 0 20px 40px; flex-direction: column; gap: 36px; min-height: auto; }
  .site-footer nav { justify-content: center; gap: 20px; font-size: .625rem; }
  .site-footer img { width: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* LA MATRONE : lien sur toute l'image, sans changement de cadrage. */
.matrone-link { display: block; position: relative; isolation: isolate; }
.matrone-link::after { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at center, rgb(255 255 255 / 18%), rgb(255 255 255 / 10%)); opacity: 0; transition: opacity 900ms ease; pointer-events: none; }
.matrone-plus { position: absolute; z-index: 2; left: 50%; top: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); opacity: 0; transition: opacity 900ms ease; pointer-events: none; }
.matrone-plus::before, .matrone-plus::after { content: ""; position: absolute; background: #fff; }
.matrone-plus::before { width: 18px; height: 1px; top: 8.5px; left: 0; }
.matrone-plus::after { width: 1px; height: 18px; top: 0; left: 8.5px; }
@media (hover: hover) {
  .matrone-link:hover img { opacity: 1; }
  .matrone-link:hover::after, .matrone-link:hover .matrone-plus,
  .matrone-link:focus-visible::after, .matrone-link:focus-visible .matrone-plus { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .matrone-link::after, .matrone-plus { transition: none; }
}

/* Micro-ajustement : corps -3 %, interlettrage +0,005 em. */
.project-card p, .about p { font-size: calc(var(--body-size) * .97); }
.project-card p { letter-spacing: .03em; }
.about p { letter-spacing: calc(.5px + .005em); }
@media (max-width: 600px) { .about p { letter-spacing: calc(.2px + .005em); } }
.about .eyebrow { font-size: .75rem; letter-spacing: .095em; }
nav { font-size: .7275rem; letter-spacing: .095em; }
.site-footer nav { font-size: .666875rem; }
@media (max-width: 600px) {
  .site-header nav, .site-footer nav { font-size: .60625rem; }
  .site-header nav { letter-spacing: .085em; }
}

/* Logo inférieur uniquement ; boîte et alignement conservés. */
.site-footer img { scale: .45; transform-origin: right center; }
/* Navigation à 75 % ; interlettrage conservé en valeur absolue. */
nav { font-size: .545625rem; letter-spacing: .0691125rem; }
.site-footer nav { font-size: .50015625rem; letter-spacing: .063353125rem; }
@media (max-width: 600px) {
  .site-header nav, .site-footer nav { font-size: .4546875rem; }
  .site-header nav { letter-spacing: .05153125rem; }
  .site-footer nav { letter-spacing: .05759375rem; }
}

/* Desktop uniquement : logo inférieur sur l’axe droit de la grille. */
@media (min-width: 1051px) {
  .site-footer > a {
    left: auto;
    right: max(calc((100% - var(--page-width)) / 2), calc((100% - var(--page-max)) / 2));
    transform: none;
  }
  .site-footer img { width: 64px; scale: none; }
}

/* Ajustement Home uniquement : logo constant et bandeau allégé. */
#home .site-header { padding-block: clamp(19.2px, 2.16vw, 43.2px); }
#home .site-header img {
  width: calc(clamp(78px, 6vw, 110px) * .75);
  transform: none;
  transition: filter 600ms ease, margin-bottom 600ms ease;
}
#home .site-header.is-scrolled {
  min-height: calc((24px + clamp(78px, 6vw, 110px) * 109 / 230) * .8);
  padding-block: calc(9.6px + clamp(78px, 6vw, 110px) * 109 / 230 * .025);
  background-color: rgba(255, 255, 255, .846);
}
@media (max-width: 600px) {
  #home .site-header { padding-block: 19.2px; }
  #home .site-header img { width: 54px; margin-bottom: 16px; }
  #home .site-header.is-scrolled { min-height: 66.42px; padding-block: 5.4px; }
  #home .site-header.is-scrolled img { margin-bottom: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  #home .site-header img { transition: none; }
}

/* Réduction du logo de la Home, indépendante de la signature centrale. */
#home .site-header img { transform: scale(.8); }
