/* =========================================================
   Portfolio — Emilie Gernigon
   Reproduction du PDF (pages 1133.86 × 841.89 pt).
   Toutes les positions sont en « points PDF » (variables --x, --y,
   --w, --h posées dans le HTML) et converties via --pt, qui vaut
   1/1133.86e de la largeur de la page affichée.
   ========================================================= */

@font-face {
  font-family: "CirrusCumulus";
  src: url("../fonts/CirrusCumulus.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

/* Manrope (open source, licence SIL OFL — voir assets/fonts/Manrope-LICENSE.txt)
   Police variable : toutes les graisses de 200 à 800 dans un seul fichier. */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --pf-ink: #3c3c3c;     /* textes courants et sous-titres */
  --pf-black: #000;      /* titres et numéros de page */
  --pf-bg: #fff;
  --pf-sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  /* Manrope est ~2,7 % plus large qu'Avenir : 14.6 pt garde la taille
     visuelle et les retours à la ligne du PDF (15 pt en Avenir). */
  --pf-body: 14.6;
  --pf-script: "CirrusCumulus", "Manrope", sans-serif;
  --pf-ratio: calc(1133.86 / 841.89);
  /* Écart entre deux projets (était 5 mm) */
  --pf-gap: 10mm;
  /* Largeur d'une page : toute la largeur de l'écran, pour que les photos
     touchent les bords (direction artistique du PDF). */
  --pf-sheet-w: 100vw;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.pf-body {
  margin: 0;
  background: var(--pf-bg);
  color: var(--pf-ink);
  font-family: var(--pf-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.pf-main {
  display: block;
}

a {
  color: inherit;
}

/* ---------------------------------------------------------
   Menu provisoire (à propos)
   --------------------------------------------------------- */

.pf-nav {
  position: fixed;
  z-index: 100;
  /* aligné sur la marge droite de la page, même quand elle est centrée */
  top: calc(18 / 1133.86 * var(--pf-sheet-w));
  right: calc((100vw - var(--pf-sheet-w)) / 2 + 56.69 / 1133.86 * var(--pf-sheet-w));
  /* même police que « portfolio » sur l'accueil, un peu plus grande
     que l'ancien menu car Cirrus Cumulus dessine plus petit */
  font-family: var(--pf-script);
  font-size: max(16px, calc(17 / 1133.86 * var(--pf-sheet-w)));
  line-height: 1;
  letter-spacing: 0.01em;
  -webkit-text-stroke: max(0.6px, calc(0.6 / 1133.86 * var(--pf-sheet-w))) currentColor;
}

.pf-nav a {
  color: var(--pf-black);
  text-decoration: none;
}

.pf-nav a:hover,
.pf-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* Sur la page « à propos », la fleur passe à gauche,
   avec la même marge (56.69 pt) que le menu à droite */
.pf-nav--left {
  right: auto;
  left: calc((100vw - var(--pf-sheet-w)) / 2 + 56.69 / 1133.86 * var(--pf-sheet-w));
}

/* Sur la page « à propos » : la fleur de l'accueil, en petit, pour revenir */
.pf-nav__logo img {
  display: block;
  width: auto;
  height: max(26px, calc(30 / 1133.86 * var(--pf-sheet-w)));
  transition: opacity 0.2s;
}

.pf-nav__logo:hover img,
.pf-nav__logo:focus-visible img {
  opacity: 0.6;
}

/* ---------------------------------------------------------
   Une page du portfolio
   --------------------------------------------------------- */

.pf-sheet {
  position: relative;
  width: min(100%, var(--pf-sheet-w));
  margin-inline: auto;
  aspect-ratio: 1133.86 / 841.89;
  overflow: hidden;
  container-type: inline-size;
  background: var(--pf-bg);
}

.pf-sheet * {
  --pt: calc(100cqw / 1133.86);
}

.pf-sheet > *,
.pf-cover__keys > * {
  position: absolute;
  margin: 0;
}

/* Écart entre les pages (réglé par --pf-gap, en haut du fichier) */
.pf-sheet + .pf-sheet {
  margin-top: var(--pf-gap);
}

/* Quand une photo touche le bas d'une page ET qu'une photo touche le haut
   de la suivante, l'écart paraît trop serré : on ajoute l'équivalent
   d'une marge de page pour que l'écart paraisse le même partout. */
.pf-sheet--bleed-bottom + .pf-sheet--bleed-top {
  margin-top: calc(var(--pf-gap) + 3 / 100 * var(--pf-sheet-w));
}

/* Plus d'air entre l'accueil (et sa flèche) et le premier projet */
.pf-cover-wrap + .pf-sheet {
  margin-top: clamp(64px, 14vh, 160px);
}

/* Images */
.pf-img {
  left: calc(var(--x) * var(--pt));
  top: calc(var(--y) * var(--pt));
  width: calc(var(--w) * var(--pt));
  height: calc(var(--h) * var(--pt));
}

.pf-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pf-img--frame {
  outline: max(0.5px, calc(0.5 * var(--pt))) solid var(--pf-black);
}

/* Titre (gras) + sous-titre, alignés sur la colonne en dessous */
.pf-title {
  z-index: 2;
  left: calc(var(--x) * var(--pt));
  top: calc(34 * var(--pt));
  font-weight: normal;
  color: var(--pf-black);
  /* jamais au-delà de la marge droite (1077 pt) : un titre long passe sur 2 lignes */
  max-width: calc((1077.17 - var(--x)) * var(--pt));
}

/* Titre en Cirrus Cumulus (comme la couverture). La police n'existe qu'en
   une graisse fine : on l'épaissit avec un contour de la même couleur.
   --pf-title-stroke règle l'épaisseur (0 = graisse d'origine). */
.pf-title__main {
  --pf-title-stroke: 0.9;
  display: block;
  font-family: var(--pf-script);
  font-size: calc(28 * var(--pt));
  font-weight: normal;
  line-height: 1.1;
  letter-spacing: 0.01em;
  -webkit-text-stroke: calc(var(--pf-title-stroke) * var(--pt)) currentColor;
}

.pf-title__sub {
  display: block;
  margin-top: calc(6 * var(--pt));
  font-size: calc(var(--pf-body) * var(--pt));
  line-height: calc(19 / 14.6);
  color: var(--pf-ink);
}

/* Texte courant */
.pf-text {
  z-index: 2;
  left: calc(var(--x) * var(--pt));
  top: calc(var(--y) * var(--pt));
  width: calc(var(--w) * var(--pt));
  font-size: calc(var(--pf-body) * var(--pt));
  line-height: calc(19 / 14.6);
  color: var(--pf-ink);
}

.pf-text p {
  margin: 0;
}

.pf-text p + p {
  margin-top: calc(12 * var(--pt));
}

/* ---------------------------------------------------------
   Couverture (page d'accueil)
   --------------------------------------------------------- */

.pf-cover-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100svh;
}

.pf-cover {
  width: min(100%, calc(100vh * var(--pf-ratio)));
  width: min(100%, calc(100svh * var(--pf-ratio)));
}

.pf-cover__label,
.pf-cover__name,
.pf-cover__role {
  left: 0;
  width: 100%;
  top: calc(var(--y) * var(--pt));
  font-family: var(--pf-script);
  font-weight: normal;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  color: var(--pf-ink);
}

/* « portfolio » épaissi comme les titres des projets
   (même rapport épaisseur/taille : 0.9 pour 28 pt -> 1.2 pour 37 pt) */
.pf-cover__label {
  font-size: calc(37 * var(--pt));
  -webkit-text-stroke: calc(1.2 * var(--pt)) currentColor;
  transform: translateX(calc(var(--dx, 0) * var(--pt)));
}

.pf-cover__name,
.pf-cover__role {
  font-size: calc(25 * var(--pt));
}

.pf-cover__logo,
.pf-key {
  display: block;
  left: calc(var(--x) * var(--pt));
  top: calc(var(--y) * var(--pt));
  width: calc(var(--w) * var(--pt));
  height: calc(var(--h) * var(--pt));
}

.pf-cover__keys {
  inset: 0;
  pointer-events: none;
}

.pf-key {
  overflow: visible;
}

/* remplissage des serrures (même noir que le logo) */
.pf-key__fill {
  fill: #000;
}

/* Flèche « descendre » en bas au centre de l'accueil */
.pf-scroll {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  padding: 6px;
  color: var(--pf-ink);
  line-height: 0;
}

.pf-scroll svg {
  display: block;
  width: 14px;
  height: 32px;
}

.pf-scroll:hover,
.pf-scroll:focus-visible {
  color: var(--pf-black);
}

/* ---------------------------------------------------------
   Dernière page : coordonnées au centre
   --------------------------------------------------------- */

.pf-end {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  margin-top: var(--pf-gap);
  /* coordonnées placées dans le haut de la page (plutôt qu'au centre),
     pour qu'on les voie arriver plus tôt en défilant */
  padding: 22vh 16px 16px;
  padding: 22svh 16px 16px;
  text-align: center;
}

/* Flèche en haut de la dernière page */
.pf-scroll--top {
  top: max(16px, 6svh);
  bottom: auto;
}

/* Titre « contact » : même police et même taille que le titre
   « contact » de la page Contact (28 pt, Cirrus Cumulus épaissi) */
.pf-end__title {
  /* même écart visible qu'entre le sous-titre « à propos » et son texte */
  margin: 0 0 calc(17 / 1133.86 * var(--pf-sheet-w));
  font-family: var(--pf-script);
  font-size: max(28px, calc(28 / 1133.86 * var(--pf-sheet-w)));
  font-weight: normal;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--pf-black);
  -webkit-text-stroke: max(0.9px, calc(0.9 / 1133.86 * var(--pf-sheet-w))) currentColor;
}

.pf-end__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: max(16px, calc(17 / 1133.86 * var(--pf-sheet-w)));
  line-height: 1.9;
  color: var(--pf-ink);
}

.pf-end__list a {
  text-decoration: none;
}

.pf-end__list a:hover,
.pf-end__list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* ---------------------------------------------------------
   Contact
   --------------------------------------------------------- */

/* Deux colonnes : À propos (gauche) + Contact (droite).
   Le titre et le texte se suivent dans chaque colonne. */
.pf-contact__col {
  left: calc(var(--x) * var(--pt));
  /* descendu (34 → 95 pt) pour laisser la place à la fleur en haut à gauche */
  top: calc(95 * var(--pt));
  width: calc(var(--w) * var(--pt));
}

.pf-contact__col > .pf-title,
.pf-contact__col > .pf-text {
  position: static;
  width: auto;
}

.pf-contact__col > .pf-title {
  margin: 0;
}

/* Même hauteur de bloc titre dans les deux colonnes,
   pour que les deux textes démarrent à la même ligne */
.pf-contact__col > .pf-title {
  min-height: calc(56 * var(--pt));
}

.pf-contact__col > .pf-text {
  margin-top: calc(30 * var(--pt));
}

/* Portrait dans la colonne Contact, entre le titre et les coordonnées.
   Sa largeur se règle ici (en points de page). */
.pf-contact__photo {
  margin: calc(30 * var(--pt)) 0 0;
  width: calc(140 * var(--pt));
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.pf-contact__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* La page Contact peut s'allonger si les textes grandissent */
.pf-contact {
  overflow: visible;
}

/* Titres en minuscules, comme « portfolio » sur la couverture */
.pf-lower {
  text-transform: lowercase;
}

.pf-contact__photo + .pf-text {
  margin-top: calc(24 * var(--pt));
}

/* Le haut de la photo s'aligne sur le sous-titre de « à propos »
   (même hauteur : ligne du titre + 6 pt d'écart + haut des lettres). */
.pf-contact__col > .pf-title--photo {
  min-height: 0;
}

.pf-title--photo + .pf-contact__photo {
  margin-top: calc(10.5 * var(--pt));
}

/* Texte de la colonne contact : lignes plus courtes */
.pf-contact__photo + .pf-text {
  max-width: calc(232 * var(--pt));
  text-wrap: pretty;
}

.pf-contact__list {
  list-style: none;
  margin: calc(12 * var(--pt)) 0 0;
  padding: 0;
}

.pf-contact__list a {
  text-decoration: none;
}

.pf-contact__list a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------
   Téléphone : la double page devient une colonne
   (titre, images, texte), dans le même esprit.
   --------------------------------------------------------- */

@media (max-width: 760px) {

  .pf-sheet--bleed-bottom + .pf-sheet--bleed-top {
    margin-top: var(--pf-gap);
  }

  /* Les pages ont déjà une marge haute sur téléphone */
  .pf-cover-wrap + .pf-sheet {
    margin-top: 16px;
  }

  .pf-nav {
    top: 16px;
    right: 16px;
  }

  .pf-nav--left {
    right: auto;
    left: 16px;
  }

  .pf-nav {
    font-size: 17px;
    padding: 4px 6px;
    margin: -4px -6px;
    background: rgba(255, 255, 255, 0.85);
  }

  .pf-sheet {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    aspect-ratio: auto;
    padding: 72px 16px 40px;
    container-type: normal;
  }

  .pf-sheet > * {
    position: static;
    width: auto;
    height: auto;
    transform: none;
  }

  .pf-title {
    order: -1;
  }

  .pf-title__main {
    font-size: 28px;
    -webkit-text-stroke-width: 0.9px;
  }

  .pf-title__sub {
    margin-top: 6px;
    font-size: 15px;
  }

  .pf-img {
    width: 100%;
    aspect-ratio: var(--w) / var(--h);
  }

  .pf-img--small {
    width: 70%;
    align-self: center;
  }

  .pf-img--frame {
    outline-width: 0.5px;
  }

  .pf-text {
    font-size: 15px;
    line-height: 1.45;
  }

  .pf-text p + p {
    margin-top: 12px;
  }

  /* Couverture */
  .pf-cover {
    width: 100%;
    min-height: 100%;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 56px 16px;
  }

  .pf-cover__label {
    font-size: 37px;
    -webkit-text-stroke-width: 1.2px;
    margin-bottom: 36px;
  }

  .pf-cover__logo {
    width: 112px;
    height: auto;
    margin-bottom: 44px;
  }

  .pf-cover__name,
  .pf-cover__role {
    font-size: 25px;
    line-height: 1.42;
  }

  .pf-cover__keys {
    position: static;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 3.5%;
    width: 100%;
    margin-top: 72px;
  }

  .pf-cover__keys > .pf-key {
    position: static;
    width: auto;
    height: min(64px, 13vw);
  }

  .pf-contact {
    gap: 48px;
  }

  .pf-contact__col > .pf-title {
    min-height: 0;
  }

  .pf-contact__col > .pf-text {
    margin-top: 16px;
  }

  .pf-contact__photo {
    width: min(42%, 170px);
    margin-top: 16px;
  }
}
