/* Bois-chanté, feuille de style
   Couleurs tirées du logo et du mur lavande de l’atelier. */

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --encre: #1f1830;        /* texte */
  --encre-douce: #4c4560;  /* texte secondaire */
  --mur: #9e8eae;          /* mur lavande de la photo d’accueil */
  --violette: #4b2fa6;     /* liens, focus */
  --lavande: #8f7cf0;      /* brins de lavande du logo */
  --brume: #f3f0fa;        /* fond pâle */
  --trait: #e4dff0;        /* filets */
  --blanc: #ffffff;
  --marge: clamp(1.25rem, 4vw, 3rem);
  --mesure: 72rem;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--encre);
  background: var(--blanc);
}

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

a {
  color: var(--violette);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--violette);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 { text-wrap: balance; }

.conteneur {
  width: min(100% - 2 * var(--marge), var(--mesure));
  margin-inline: auto;
}

.saut {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 20;
  padding: 0.5rem 1rem;
  background: var(--blanc);
  color: var(--encre);
}
.saut:focus { left: 0.75rem; }

/* En-tête */

.entete .conteneur {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 0.75rem;
}
.entete .logo img { width: clamp(8.5rem, 7rem + 4vw, 10.5rem); }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: inline-block;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  color: var(--encre);
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
}
.nav a:hover { border-bottom-color: var(--lavande); }

/* Accueil : la tablette de lutins sur le mur lavande */

.accueil {
  background: var(--mur);
  overflow: hidden;
}
.accueil .texte {
  position: relative;
  z-index: 1;
  padding-top: clamp(2rem, 4.5vw, 4rem);
}
.accueil h1 {
  max-width: 21ch;
  margin: 0 0 1.25rem;
  font-size: clamp(2.3rem, 1.3rem + 3.3vw, 4.1rem);
  font-weight: 430;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.chapeau {
  max-width: 38rem;
  margin: 0 0 2rem;
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.55;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 1.5rem;
  border: 1.5px solid var(--encre);
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
}
.bouton-plein { background: var(--encre); color: var(--blanc); }
.bouton-plein:hover { background: #3a2f55; border-color: #3a2f55; }
.bouton-contour { color: var(--encre); }
.bouton-contour:hover { background: rgba(255, 255, 255, 0.28); }

.tablette {
  display: block;
  max-width: 1600px;
  margin: clamp(-8rem, -9vw, -1.5rem) auto 0;
}
.tablette img {
  width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 26%);
}
@media (min-width: 1600px) {
  .tablette img {
    -webkit-mask-image:
      linear-gradient(to bottom, transparent 0, #000 26%),
      linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to bottom, transparent 0, #000 26%),
      linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
    mask-composite: intersect;
  }
}

/* Sections */

.creations,
.atelier,
.joindre { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3.1rem);
  font-weight: 420;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.intro { max-width: 40rem; }
.intro p { margin: 0; }

.index ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.index a {
  color: var(--encre);
  font-weight: 500;
  text-decoration-color: var(--lavande);
  text-decoration-thickness: 2px;
}

/* Catégories : étiquette à gauche, photos à droite */

.categorie {
  display: grid;
  gap: 1.25rem 3rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--trait);
}
@media (min-width: 900px) {
  .categorie { grid-template-columns: 16.5rem 1fr; }
  .etiquette {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }
}

h3 {
  margin: 0 0 0.6rem;
  font-size: 1.65rem;
  font-weight: 450;
  line-height: 1.15;
}
.etiquette p {
  margin: 0;
  color: var(--encre-douce);
}

h4 {
  margin: 0 0 0.9rem;
  color: var(--encre-douce);
  font-size: 1.1rem;
  font-weight: 500;
}
.sous-groupe + .sous-groupe { margin-top: 2.5rem; }

.galerie {
  columns: 3 9rem;
  column-gap: 0.75rem;
}
.galerie a {
  display: block;
  margin-bottom: 0.75rem;
  overflow: hidden;
  border-radius: 4px;
  background: var(--brume);
  break-inside: avoid;
  cursor: zoom-in;
}
.galerie img { width: 100%; }

/* L’atelier */

.atelier { background: var(--brume); }
.atelier .conteneur {
  display: grid;
  gap: 2rem 4rem;
  align-items: center;
}
@media (min-width: 860px) {
  .atelier .conteneur { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); }
}
.atelier figure { margin: 0; }
.atelier figure img { border-radius: 4px; }
.atelier figcaption {
  margin-top: 0.6rem;
  color: var(--encre-douce);
  font-size: 0.95rem;
}
.atelier .texte { max-width: 36rem; }

.accroche {
  margin: 0 0 1.1rem;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  font-weight: 430;
  line-height: 1.3;
}

/* Ses chapeaux successifs, coiffés comme les lutins de la tablette */
.chapeaux {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.chapeaux li {
  position: relative;
  padding-left: 2.2rem;
}
.chapeaux li::before {
  content: "";
  position: absolute;
  top: 0.32em;
  left: 0;
  width: 1.5rem;
  height: 1.25rem;
  background: var(--chapeau, var(--encre));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M6.5 1.5h11l-.8 9.2H7.3z'/%3E%3Cpath d='M7.4 12h9.2l-.2 2H7.6z'/%3E%3Cellipse cx='12' cy='16.3' rx='11' ry='2.6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M6.5 1.5h11l-.8 9.2H7.3z'/%3E%3Cpath d='M7.4 12h9.2l-.2 2H7.6z'/%3E%3Cellipse cx='12' cy='16.3' rx='11' ry='2.6'/%3E%3C/svg%3E") no-repeat center / contain;
}
.chapeaux li:nth-child(1) { --chapeau: #857a45; }
.chapeaux li:nth-child(2) { --chapeau: #b23a26; }
.chapeaux li:nth-child(3) { --chapeau: #8e4f7a; }
.chapeaux li:nth-child(4) { --chapeau: #c9523f; }
.chapeaux li:nth-child(5) { --chapeau: #6e4b33; }
.chapeaux li:nth-child(6) { --chapeau: var(--lavande); }


/* Nous joindre */

.joindre .conteneur {
  display: grid;
  gap: 2rem 4rem;
}
@media (min-width: 860px) {
  .joindre .conteneur { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
.joindre .texte { max-width: 34rem; }
.joindre .texte p { margin-bottom: 0; }
.joindre .actions { margin-top: 1.5rem; }

.coordonnees { margin: 0; }
.coordonnees div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding-block: 0.85rem;
  border-top: 1px solid var(--trait);
}
.coordonnees div:last-child { border-bottom: 1px solid var(--trait); }
.coordonnees dt { font-weight: 500; }
.coordonnees dd { margin: 0; }

/* Pied de page */

.pied {
  padding-block: 1.75rem;
  background: var(--mur);
}
.pied .conteneur {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
.pied p { margin: 0; }
.pied a { color: var(--encre); }

/* Visionneuse de photos */

body.visionneuse-ouverte { overflow: hidden; }

.visionneuse {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(24, 18, 36, 0.95);
  color: var(--blanc);
}
.visionneuse::backdrop { background: rgba(24, 18, 36, 0.6); }
.visionneuse figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  height: 100%;
  margin: 0;
  padding: 4rem 4.75rem 0;
}
.visionneuse img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 3px;
}
.visionneuse figcaption {
  max-width: 42rem;
  padding: 0.9rem 1rem 1.5rem;
  text-align: center;
}
.visionneuse .compteur {
  margin-left: 0.5rem;
  opacity: 0.7;
  white-space: nowrap;
}

.v-bouton {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--blanc);
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.v-bouton:hover { background: rgba(255, 255, 255, 0.26); }
.v-bouton:focus-visible { outline-color: var(--blanc); }
.v-fermer { top: 0.75rem; right: 0.75rem; }
.v-prec { top: 50%; left: 0.75rem; transform: translateY(-50%); }
.v-suiv { top: 50%; right: 0.75rem; transform: translateY(-50%); }
.visionneuse.seule .v-prec,
.visionneuse.seule .v-suiv { display: none; }

@media (max-width: 640px) {
  .visionneuse figure { padding: 3.75rem 0.75rem 4.5rem; }
  .v-prec, .v-suiv { top: auto; bottom: 0.9rem; transform: none; }
  .v-prec { left: calc(50% - 3.75rem); }
  .v-suiv { right: calc(50% - 3.75rem); }
  .visionneuse figcaption { padding-bottom: 0.5rem; }
}
