html {
  background: #fff;
  color: #222;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: #222;
  font-family: Arial, Helvetica, sans-serif;
}

.site {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 58px 0 50px;
}

.site-header {
  margin-bottom: 54px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 31px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.section-nav {
  margin-top: 18px;
  color: #888;
  font-size: 13px;
  line-height: 1.8;
}

.section-nav a {
  color: #555;
  text-decoration: none;
}

.section-nav a:hover,
.section-nav a:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-nav span {
  margin: 0 8px;
  color: #bbb;
}

.publication-section {
  margin-top: 64px;
  scroll-margin-top: 24px;
}

.publication-section:first-of-type {
  margin-top: 0;
}

.publication-section h2 {
  margin: 0 0 35px;
  padding-top: 18px;
  border-top: 1px solid #d8d8d8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 52px;
  row-gap: 55px;
}

.book {
  min-width: 0;
  text-align: center;
}

.book-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.cover-frame {
  height: 355px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 19px;
  overflow: hidden;
}

.book-cover {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.cover-fallback {
  width: min(220px, 90%);
  min-height: 300px;
  padding: 35px 24px;
  border: 1px solid #d7d7d7;
  background: #f7f7f5;
  color: #555;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
}

.book-title {
  width: min(310px, 100%);
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.42;
}

.book-role {
  margin-top: 7px;
  color: #777;
  font-size: 12px;
  line-height: 1.4;
}

.book-link:hover .book-title,
.book-link:focus .book-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.book-link:focus-visible {
  outline: 2px solid #555;
  outline-offset: 6px;
}

.contact {
  margin-top: 75px;
  padding-top: 24px;
  border-top: 1px solid #d8d8d8;
  text-align: center;
  font-size: 14px;
}

.contact a {
  color: #333;
  text-decoration: none;
}

.contact a:hover,
.contact a:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .site {
    width: min(760px, calc(100% - 36px));
    padding-top: 42px;
  }

  .books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 38px;
  }

  .cover-frame {
    height: 330px;
  }
}

@media (max-width: 580px) {
  .site {
    width: calc(100% - 30px);
    padding: 34px 0 38px;
  }

  .site-header {
    margin-bottom: 42px;
  }

  h1 {
    font-size: 27px;
  }

  .section-nav {
    max-width: 310px;
    margin-left: auto;
    margin-right: auto;
  }

  .section-nav span {
    margin: 0 5px;
  }

  .publication-section {
    margin-top: 50px;
  }

  .publication-section h2 {
    margin-bottom: 30px;
    font-size: 20px;
  }

  .books-grid {
    grid-template-columns: 1fr;
    row-gap: 45px;
  }

  .cover-frame {
    height: 325px;
  }

  .book-title {
    max-width: 310px;
  }

  .contact {
    margin-top: 58px;
  }
}


/* Liens professionnels en tête de page */
.profile-links {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #777;
  font-size: 12.5px;
}

.profile-links a {
  color: #555;
  text-decoration: none;
}

.profile-links a:hover,
.profile-links a:focus {
  color: #222;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-separator {
  color: #bbb;
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}

.linkedin-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid #777;
  border-radius: 2px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.linkedin-link:hover .linkedin-icon,
.linkedin-link:focus .linkedin-icon {
  border-color: #222;
}

@media (max-width: 580px) {
  .profile-links {
    margin-top: 11px;
    font-size: 12px;
  }
}
