/*RESET & VARIABLES*/

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font: system-ui, -apple-system, sans-serif;
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #666;
  --color-border: #ddd;
}

html { font-size: 100%; }

body {
  font-family: 'nectomonoregular', var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/*HEADER*/

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: transform 0.3s ease;
}

.header--hidden { transform: translateY(-100%); }

.header__logo {
  font-family: 'instrumentserif', sans-serif;
  font-weight: 700;
  font-size: 3.0rem;
  text-decoration: none;
  color: var(--color-text);
}

.header__nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.header__nav a { text-decoration: none; color: var(--color-muted); }
.header__nav a:hover, .header__nav a:focus { color: var(--color-text); }

/*CONTENU PRINCIPAL*/

main { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 3rem 0; }
.section h2 { font-size: 1.4rem; font-weight: 600; }
.section p { margin-bottom: 1rem; max-width: 60ch; }

/*SLIDESHOW*/

.slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 300px;
  overflow: hidden;
  border-radius: 4px;
  background: #eee;
}

.slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.slideshow img.active { opacity: 1; }

.slide-info { margin-top: 1rem; min-height: 3.5rem; }
.slide-info h2 { font-size: 1.1rem; margin-bottom: 0.25rem; font-weight: 600; }
.slide-info p { font-size: 0.9rem; color: var(--color-muted); }

/*NAV SLIDESHOW*/

.slideshow__nav {
  position: absolute;
  top: 0; bottom: 0; width: 50%;
  background: transparent; border: none; cursor: pointer; padding: 0; z-index: 2;
}

.slideshow__nav--prev { left: 0; }
.slideshow__nav--next { right: 0; }

/*FORMULAIRE*/

.contact-form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 32rem; }
.contact-form label { font-size: 0.9rem; font-weight: 600; }
.contact-form input, .contact-form textarea {
  font-family: inherit; font-size: 1rem; padding: 0.5rem;
  border: 1px solid var(--color-border); border-radius: 3px; background: #fff; width: 100%;
}
.contact-form button {
  font-family: inherit; font-size: 1rem; padding: 0.6rem 1.5rem;
  background: var(--color-text); color: #fff; border: none; border-radius: 3px; cursor: pointer; align-self: flex-start;
}
.contact-alt { margin-top: 1rem; font-size: 0.9rem; color: var(--color-muted); }

/*RÈGLES DE PAGE (IMPRESSION)*/

@page {
  size: A4 landscape;
  margin: 8mm;
  @top-center {
    content: "Julien Chevassus";
    font-size: 8pt;
    color: #888;
    margin-bottom: 5mm;
  }
}

.print-page {
  break-after: page;
  page-break-after: always;
  break-inside: avoid;
  page-break-inside: avoid;
  text-align: center;
  height: 185mm; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.print-page img {
  max-width: 100%;
  max-height: 160mm; 
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.print-page .print-caption { margin-top: 4mm; font-size: 10pt; color: #333; }
.print-page .print-caption strong { display: block; font-size: 11pt; color: #000; margin-bottom: 1mm; }

.colophon { break-before: page; page-break-before: always; text-align: center; padding: 60mm 0; font-size: 10pt; color: #333; }
.colophon__about { max-width: 120mm; margin: 10mm auto 0; font-style: italic; color: #555; }

/*VUE ÉCRAN & IMPRESSION*/

@media screen {
  .screen-only { display: block !important; }
  .print-only { display: none !important; }
  .pagedjs_pages { display: none !important; }
}

@media print {
  .screen-only { display: none !important; }
}

/*PAGE DE COUVERTURE*/

.cover-page {
  height: 185mm; 
  display: flex;
  justify-content: center;
  align-items: center;
  break-after: page; 
  page-break-after: always;
}

.cover-page h1 {
  font-family: 'instrumentserif', sans-serif;
  font-size: 6rem; 
  font-weight: normal; 
  text-align: center;
  color: var(--color-text);
  margin: 0;
}