/* La Semaine Prête */

@font-face {
  font-family: "Young Serif";
  src: url("../fonts/young-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --papier: #f6f1eb;
  --fougere: #1b3a2b;
  --fougere-doux: #4a5f52;
  --volet: #e3a93b;
  --volet-vif: #eeb84f;
  --ocre: #a86c12;
  --kraft: #dccabd;
  --kraft-clair: #e9ddd2;

  --f-titre: "Young Serif", "Georgia", serif;
  --f-texte: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --marge: 1.25rem;
  --pas: clamp(4rem, 14vw, 8.5rem);
}

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--fougere);
  font-family: var(--f-texte);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

p { margin: 0 0 1em; }

h1, h2 { font-weight: 400; margin: 0; }

:focus-visible {
  outline: 3px solid var(--fougere);
  outline-offset: 3px;
  border-radius: 2px;
}
.corvee :focus-visible, .pied :focus-visible { outline-color: var(--volet); }

/* En-tête */

.entete {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  padding: 1.1rem var(--marge) 0;
}

.logo {
  font-family: var(--f-titre);
  font-size: 1.2rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.entete__prix {
  font-weight: 560;
  font-size: .95rem;
  text-decoration: underline;
  text-decoration-color: var(--volet);
  text-decoration-thickness: 2px;
  text-underline-offset: .25em;
  white-space: nowrap;
}

/* Boutons */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: .8rem 1.4rem;
  background: var(--volet);
  color: var(--fougere);
  font-family: var(--f-texte);
  font-weight: 680;
  font-size: 1.06rem;
  line-height: 1.15;
  text-decoration: none;
  border-radius: .3rem;
  transition: background-color .15s;
}
.bouton:hover { background: var(--volet-vif); }

.bouton--fonce { background: var(--fougere); color: var(--papier); }
.bouton--fonce:hover { background: #24493a; }

/* Une */

.une {
  padding: 1.1rem 0 var(--pas);
}

.une__titre {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3px;
}

.une__case {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tirage { display: block; position: relative; width: 100%; }
.tirage img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--kraft);
}

/* la phrase de chaque métier, posée sur sa photo comme une étiquette */
.une__ligne {
  position: relative;
  margin: -1.9rem 0 0 .55rem;
  max-width: calc(100% - 1.1rem);
  padding: .5rem .65rem .55rem;
  background: var(--papier);
  font-family: var(--f-titre);
  font-size: clamp(1.08rem, 5vw, 2.2rem);
  line-height: 1.06;
  text-wrap: balance;
}

.une__chute {
  grid-column: 1 / -1;
  margin-top: 1.3rem;
  padding: 0 var(--marge);
  font-family: var(--f-titre);
  font-size: clamp(3rem, 17.6vw, 8rem);
  line-height: .92;
  letter-spacing: -.015em;
}

.une__suite { margin-top: 1.4rem; padding: 0 var(--marge); }

.une__chapo {
  font-size: 1.12rem;
  line-height: 1.5;
  max-width: 30em;
}

.une__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .8rem;
  margin: 1.5rem 0 0;
}

.une__ou {
  font-size: .98rem;
  color: var(--fougere-doux);
  max-width: 24em;
}

/* La corvée */

.corvee {
  background: var(--fougere);
  color: var(--papier);
  padding: var(--pas) var(--marge);
}

.corvee__date {
  font-weight: 600;
  font-size: .95rem;
  color: var(--volet);
  margin-bottom: .6rem;
}

.corvee__titre {
  font-family: var(--f-titre);
  font-size: clamp(1.3rem, 5.4vw, 2rem);
  line-height: 1.16;
  max-width: 17em;
}

.liste {
  list-style: none;
  margin: 1.6rem 0 2rem;
  padding: 0;
  font-family: var(--f-titre);
  line-height: 1.16;
  container-type: inline-size;
}

.liste li { margin: 0 0 .1em; font-size: min(5rem, 9cqi); }

.liste s {
  position: relative;
  display: inline-block;
  text-decoration: none;
  white-space: nowrap;
}

.liste s svg {
  position: absolute;
  left: -.1em;
  top: 34%;
  width: calc(100% + .2em);
  height: .34em;
  overflow: visible;
}

.liste s path {
  fill: none;
  stroke: var(--volet);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.liste__reste { color: var(--volet); }

.corvee__fin { max-width: 30em; font-size: 1.1rem; }
.corvee__fin p:last-child { margin-bottom: 0; }

/* La preuve */

.preuve {
  background: var(--kraft-clair);
  padding: var(--pas) var(--marge);
}

.preuve__titre {
  font-family: var(--f-titre);
  font-size: clamp(2.3rem, 10.4vw, 6.4rem);
  line-height: .98;
  letter-spacing: -.012em;
  max-width: 13em;
  text-wrap: balance;
}

.preuve__texte {
  margin-top: 1.5rem;
  max-width: 31rem;
  font-size: 1.1rem;
}
.preuve__texte p:last-child { margin-bottom: 0; }

/* Photos */

.photos { padding: var(--pas) 0; }

.photos__tete {
  padding: 0 var(--marge);
  max-width: 44rem;
}

.photos__titre {
  font-family: var(--f-titre);
  font-size: clamp(2rem, 8.6vw, 4.2rem);
  line-height: 1.02;
  margin-bottom: 1.2rem;
}

.semaine { margin: 2.4rem 0 0; }

/* téléphone : la première photo en grand, les deux autres côte à côte dessous */
.trio {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0 var(--marge);
}

.brut {
  position: relative;
  flex: var(--r) 1 0;
  aspect-ratio: var(--r);
  min-width: 0;
}
.brut:first-child { flex-basis: 100%; }
.brut img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--kraft);
}

.brut__calque {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.brut__voile { fill: var(--papier); opacity: .64; }
.brut__cadre {
  fill: none;
  stroke: var(--volet);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.semaine figcaption {
  padding: .8rem var(--marge) 0;
  font-family: var(--f-titre);
  font-size: 1.15rem;
}

.photos__legende {
  font-size: .98rem;
  color: var(--fougere-doux);
  margin-bottom: 0;
}

.recadrer {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1.1rem;
  padding: .6rem .95rem .6rem .75rem;
  font: 600 .95rem/1.2 var(--f-texte);
  color: var(--fougere);
  background: transparent;
  border: 1.5px solid currentColor;
  border-radius: .3rem;
  cursor: pointer;
}
.recadrer[hidden] { display: none; }
.recadrer:hover { background: rgba(27, 58, 43, .06); }
.recadrer::before {
  content: "";
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid currentColor;
  border-radius: 2px;
  transition: background-color .2s;
}
.recadrer[aria-pressed="true"]::before {
  background: var(--volet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.4l3.1 3.1 6.5-7' fill='none' stroke='%231b3a2b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* Prix */

.prix {
  background: var(--volet);
  color: var(--fougere);
  padding: var(--pas) var(--marge);
  display: grid;
  gap: 3rem;
}

.prix__titre { line-height: 1; }

.prix__nombre {
  display: block;
  font-variant-numeric: lining-nums;
  font-family: var(--f-titre);
  font-size: clamp(6rem, 37vw, 15rem);
  line-height: .8;
  letter-spacing: -.03em;
  white-space: nowrap;
}

.prix__unite {
  display: block;
  margin-top: 1.1rem;
  font-family: var(--f-titre);
  font-size: clamp(1.5rem, 6.6vw, 2.6rem);
  line-height: 1.08;
}

.prix__an { font-size: 1.15rem; margin-top: 1rem; }
.prix__arret { font-size: 1.15rem; max-width: 24em; }
.prix__action { margin: 1.8rem 0 1.2rem; }
.prix__tva { font-size: .92rem; margin: 0; }

.prix__photo {
  order: -1;
  margin: calc(-1 * var(--pas)) calc(-1 * var(--marge)) 0;
}
.prix__photo img { width: 100%; }

/* Pour commencer */

.debut {
  padding: 0 var(--marge);
  display: grid;
  gap: 2.4rem;
}
.debut__photo { margin: 0 calc(-1 * var(--marge)); }

.debut__titre {
  font-family: var(--f-titre);
  font-size: clamp(2rem, 8.6vw, 3.6rem);
  line-height: 1.04;
  margin-bottom: 1.1rem;
}

.debut__texte { max-width: 34rem; }

.debut__adresse {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
}
.debut__adresse a {
  font-family: var(--f-titre);
  font-size: clamp(1.05rem, 5.6vw, 2.3rem);
  overflow-wrap: anywhere;
  line-height: 1.15;
  text-decoration-color: var(--volet);
  text-decoration-thickness: 3px;
  text-underline-offset: .18em;
}

.copier {
  font: 600 .9rem/1 var(--f-texte);
  color: var(--fougere);
  background: transparent;
  border: 1.5px solid currentColor;
  border-radius: .3rem;
  padding: .55rem .8rem;
  cursor: pointer;
}
.copier:hover { background: rgba(27, 58, 43, .06); }


.alundi {
  font-family: var(--f-titre);
  font-size: clamp(4rem, 22vw, 13rem);
  white-space: nowrap;
  line-height: .9;
  letter-spacing: -.02em;
  margin: var(--pas) 0 0;
  padding: 0 var(--marge) .12em;
}

/* Pied */

.pied {
  background: var(--fougere);
  color: var(--papier);
  padding: 3rem var(--marge) 3.5rem;
  font-size: .92rem;
  line-height: 1.5;
}

.pied__titre {
  font-family: var(--f-titre);
  font-size: 1.35rem;
  margin-bottom: 1.2rem;
}

.mentions { margin: 0; display: grid; gap: .9rem; max-width: 40rem; }
.mentions dt { font-weight: 650; }
.mentions dd { margin: 0; color: rgba(246, 241, 235, .82); }

.pied__liens { margin: 2rem 0 0; }
.pied a { text-decoration-color: var(--volet); text-underline-offset: .2em; }

/* Animations (uniquement si JavaScript est là pour les déclencher) */

.js .liste s path {
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .42s cubic-bezier(.65, 0, .35, 1);
  transition-delay: calc(var(--i) * .26s + .1s);
}
.js .liste s {
  transition: color .5s;
  transition-delay: calc(var(--i) * .26s + .4s);
}
.js .liste.est-fait s path { stroke-dashoffset: 0; }
.liste s, .js .liste.est-fait s { color: rgba(246, 241, 235, .5); }
.js .liste s { color: var(--papier); }

.js .brut__cadre {
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .3, 1);
}
.js .brut__voile {
  opacity: 0;
  transition: opacity .7s 1s;
}
.js .brut:nth-child(2) .brut__cadre { transition-delay: .35s; }
.js .brut:nth-child(2) .brut__voile { transition-delay: 1.35s; }
.js .brut:nth-child(3) .brut__cadre { transition-delay: .7s; }
.js .brut:nth-child(3) .brut__voile { transition-delay: 1.7s; }
.js .semaine.est-cadre .brut__cadre { stroke-dashoffset: 0; }
.js .semaine.est-cadre .brut__voile { opacity: .64; }

/* « Ne garder que cette partie » : le reste de la photo disparaît dans le papier */
.js .photos.manipule .brut__voile { transition: opacity .5s ease; }
.js .photos.manipule .brut__cadre { transition: opacity .35s ease; }
.js .photos.est-recadre .semaine .brut__voile { opacity: 1; }
.js .photos.est-recadre .semaine .brut__cadre { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .liste s path,
  .js .brut__cadre { stroke-dashoffset: 0; transition: none; }
  .js .liste s { color: rgba(246, 241, 235, .5); transition: none; }
  .js .brut__voile { opacity: .64; transition: none; }
}

/* Écrans larges */

@media (min-width: 60em) {
  :root { --marge: max(3.5rem, calc((100vw - 84rem) / 2)); }

  body { font-size: 1.125rem; }

  .entete { padding-top: 1.8rem; }
  .logo { font-size: 1.45rem; }
  .entete__prix { font-size: 1.05rem; }

  .une {
    display: grid;
    grid-template-columns: 1fr 1fr 1.22fr;
    grid-template-rows: auto auto auto;
    column-gap: 1.6rem;
    padding: 2.4rem var(--marge) var(--pas);
  }
  .une__titre {
    grid-column: 1 / -1;
    grid-row: 1 / span 2;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
    column-gap: normal;
  }
  .une__case {
    grid-row: 1 / span 2;
    display: grid;
    grid-template-rows: subgrid;
    justify-items: start;
  }
  .une__ligne {
    margin: -2.5rem 0 0 1rem;
    padding: .65rem .85rem .7rem;
    font-size: clamp(1.4rem, 2.05vw, 2.1rem);
    align-self: start;
    width: max-content;
    max-width: calc(100% - 2rem);
  }
  .une__chute {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    margin: 0;
    padding: 0 0 0 .4rem;
    font-size: clamp(4.4rem, 7.2vw, 7.6rem);
    line-height: .94;
  }
  .une__suite {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: subgrid;
    align-items: start;
    margin: 0;
    padding: 2.4rem 0 0;
  }
  .une__chapo { grid-column: 1 / span 2; margin: 0; max-width: 30em; font-size: 1.25rem; }
  .une__actions { grid-column: 3; margin: 0; padding-left: .4rem; }

  .corvee {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
    grid-template-rows: auto 1fr;
    column-gap: 4rem;
  }
  .corvee__tete { grid-column: 1; grid-row: 1; padding-top: .9rem; }
  .liste { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .corvee__fin { grid-column: 1; grid-row: 2; align-self: end; padding-bottom: .6rem; }

  .photos__tete {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 4rem;
    max-width: none;
  }
  .photos__titre { grid-row: 1 / span 4; }
  .recadrer { grid-column: 2; justify-self: start; }
  .semaine {
    margin-top: 3.4rem;
    display: flex;
    align-items: flex-end;
    gap: 1.6rem;
    padding: 0 var(--marge);
    container-type: inline-size;
  }
  .trio { flex-wrap: nowrap; gap: 1rem; padding: 0; }
  /* même hauteur pour les deux semaines, calculée pour que la plus large (3,67 photos carrées) tienne avec sa légende */
  .brut, .brut:first-child { flex: 0 0 auto; height: min(19rem, calc((100cqi - 15.2rem) / 3.67)); }
  .semaine figcaption { flex: 0 1 auto; padding: 0 0 .2rem; font-size: 1.45rem; line-height: 1.15; max-width: 8em; }

  .prix {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 4rem;
    padding: 0 0 0 var(--marge);
  }
  .prix__texte { padding: var(--pas) 0; align-self: center; }
  .prix__photo { order: 0; margin: 0; position: relative; min-height: 36rem; }
  .prix__photo img { position: absolute; inset: 0; height: 100%; object-fit: cover; }

  .preuve {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    column-gap: 4rem;
    align-items: end;
  }
  .preuve__texte { margin: 0; padding-bottom: .5rem; }

  .debut {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 4rem;
    padding: 0 var(--marge) 0 0;
  }
  .debut__photo { position: relative; min-height: 34rem; margin: 0; }
  .debut__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .debut__texte { padding: var(--pas) 0; align-self: center; }

  .mentions { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; column-gap: 3rem; }
}
