/* ==================================================
   ANNABELLE MILON — FEUILLE DE STYLE
   Règles regroupées par zone pour faciliter les modifications.
   ================================================== */

/* 1. POLICES ET VARIABLES GÉNÉRALES */
@font-face {
  font-family: "Bastardo";
  src: url("../fonts/BastardoV2-Regular.17d973f9.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Bastardo";
  src: url("../fonts/BastardoV2-SemiBold.3b57e4e2.woff") format("woff");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #fff;
  --ink: #391512;
  --page-pad-x: clamp(17px, 2.88vw, 36px);
  --page-pad-y: clamp(17px, 3.36vw, 36px);
  --sidebar-width: clamp(180px, 23vw, 250px);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  padding: var(--page-pad-y) var(--page-pad-x);
  color: var(--ink);
  background: var(--paper);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* 2. STRUCTURE GÉNÉRALE ET NAVIGATION */
.site-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 60px);
  align-items: start;
}

#site-header {
  min-width: 0;
}

.site-header {
  position: sticky;
  top: var(--page-pad-y);
  align-self: start;
  display: flex;
  flex-direction: column;
}

.site-name {
  display: inline-block;
  width: fit-content;
  margin: 0 0 67px;
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(21px, 2vw, 25px);
  font-weight: 700;
  line-height: 1.15;
}

.site-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.site-nav a {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

.site-nav a[aria-current="page"] {
  filter: blur(1px);
}

.main-content {
  width: 100%;
  min-width: 0;
  padding: 0 0 80px;
}

/* 3. PROJETS ET IMAGES */
.project {
  width: 100%;
  margin: 0 0 clamp(70px, 10vw, 130px);
}

.project img {
  display: block;
  width: 100%;
  height: auto;
}

.project--large,
.project--medium,
.project--small {
  max-width: 100%;
}

.project-caption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.project-caption p {
  margin: 0;
}

.project-caption .project-title {
  margin-bottom: 2px;
  font-size: 15px;
}

/* 4. PAGE D'ACCUEIL */
.home {
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.home .main-content.home-content {
  width: 100%;
  max-width: none;
  justify-self: stretch;
  padding-top: 0;
}

.home-image img {
  display: block;
  width: 100%;
  height: auto;
}

.home-projects {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.home .project {
  width: min(100%, 560px);
}

/* Ordinateur : image centrée sur la largeur de la fenêtre.
   Réglages à modifier : top (hauteur), left (axe horizontal), width (taille). */
@media (min-width: 761px) {
  .home-image {
    position: absolute;
    top: calc(var(--page-pad-y) + clamp(100px, 16vh, 210px));
    left: 50vw;
    width: min(18vw, 480px);
    margin: 0 0 0 calc(-1 * min(15vw, 240px));
    transform: none;
  }
}

/* 5. PAGE ABOUT ET CV */
.about-content,
.cv-content {
  max-width: 920px;
}

.about-content {
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.about-content .about-intro {
  margin: 0 0 26px;
  font-weight: 400;
}

.about-content h2 {
  margin: 24px 0 10px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.about-content h2:first-of-type,
.about-content h2:first-child {
  margin-top: 0;
}

.about-content p {
  margin: 0 0 3px;
  line-height: 1.4;
}

.about-content strong {
  font-weight: 700;
}

.about-content em,
.cv-content em {
  font-style: italic;
}

.cv-content h2 {
  margin: 0 0 17px;
  padding-top: 18px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .015em;
  line-height: 1.4;
}

.cv-content h2:first-child {
  padding-top: 0;
}

.cv-content p {
  margin: 0 0 7px;
}

.cv-content strong {
  font-weight: 600;
}

.cv-content .year-hidden {
  color: transparent;
}

.cv-content table {
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
}

.cv-content td {
  padding: 0 0 7px;
  vertical-align: top;
}

.cv-content td:first-child {
  width: 105px;
  white-space: nowrap;
}

/* Entrées du CV sur deux colonnes : année / liste */
.cv-entry--list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 4px;
  align-items: start;
  margin: 0 0 3px;
  line-height: 1.4;
}

.cv-entry--list > strong {
  white-space: nowrap;
}

.cv-entry--list ul {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cv-entry--list li {
  margin: 0 0 3px;
  padding: 0;
  text-indent: 0;
}

/* 6. PAGE STATEMENT */
.statement-content {
  max-width: 850px;
}

.statement-language p {
  margin: 0 0 17px;
}

.statement-divider {
  margin: 32px 0;
}

/* 7. PAGE NEWS */
.news-list {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 0 clamp(0px, 3vw, 42px);
}

.news-item {
  margin: 0 0 clamp(55px, 8vw, 100px);
  line-height: 1.4;
}

.news-item img {
  display: block;
  width: 100%;
  height: auto;
}

.news-caption {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.4;
}

.news-page,
.news-page .news-caption {
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.4;
}

.news-page .news-caption {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 400;
}

.news-page .news-caption--link {
  margin-top: 0;
}

.news-page .news-item:has(img) .news-caption {
  margin-top: 12px;
}

.news-page .news-item a::before {
  content: "→ ";
}

/* 8. PAGE CONTACT */
.contact-page .main-content {
  display: flex;
  min-height: 70vh;
  align-items: center;
  justify-content: center;
}

.contact-content,
.contact-page .contact-content {
  width: 100%;
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
}

/* 9. PAGES DE DOCUMENTS PDF */
.document-page .main-content {
  min-width: 0;
}

.document-viewer {
  width: 100%;
}

.document-viewer iframe {
  display: block;
  width: 100%;
  height: min(82vh, 1050px);
  min-height: 620px;
  border: 0;
  background: #f7f7f7;
}

.document-fallback {
  margin: 8px 0 0;
  font-size: 13px;
}

.document-fallback a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-document-link {
  margin-top: 42px;
}

/* 10. ADAPTATION MOBILE */
@media (max-width: 760px) {
  :root {
    --page-pad-x: 20px;
    --page-pad-y: 18px;
  }

  body {
    padding: var(--page-pad-y) var(--page-pad-x);
  }

  .site-layout {
    display: block;
  }

  .site-header {
    position: static;
    margin-bottom: 38px;
  }

  .site-name {
    margin-bottom: 24px;
    font-size: 22px;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: 34px;
    row-gap: 9px;
  }

  .site-nav a {
    font-size: 15px;
  }

  .home .main-content.home-content {
    padding-top: 35px;
  }

  /* Mobile : l'image reste dans le flux, sous le menu. */
  .home-image {
    position: relative;
    top: auto;
    left: auto;
    width: min(62%, 420px);
    margin: 0 auto 80px;
    transform: none;
  }

  .home .project {
    width: 100%;
  }

  .project {
    max-width: none;
    margin-bottom: 58px;
  }

  .project img {
    width: 100%;
  }

  .news-list {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .cv-content td:first-child {
    width: 82px;
  }

  .cv-content {
    overflow-wrap: anywhere;
  }

  .cv-entry--list {
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 7px;
  }

  .document-viewer iframe {
    height: 72vh;
    min-height: 480px;
  }
}
