/* Fiches projet · même univers que l'accueil : papier découpé, couleurs de saison */
@font-face { font-family: "Bagnard"; src: url("../fonts/bagnard.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Orkney"; src: url("../fonts/orkney-regular-webfont.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Orkney"; src: url("../fonts/orkney-medium-webfont.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Orkney"; src: url("../fonts/orkney-bold-webfont.woff") format("woff"); font-weight: 700; font-display: swap; }

:root { --papier: #fbf7ee; --encre: #1f2a3a; --ombre: rgba(31, 42, 58, .2); }
body[data-saison="hiver"]     { --mur: #8fb3cf; --colline: #dfe9f2; --colline2: #ffffff; --sol: #eef3f7; --accent: #4f7fa8; }
body[data-saison="printemps"] { --mur: #a9c686; --colline: #93b771; --colline2: #82aa60; --sol: #7fae5c; --accent: #5f8f4e; }
body[data-saison="ete"]       { --mur: #f2bd55; --colline: #e9aa40; --colline2: #a5cc72; --sol: #f0dcaa; --accent: #c9801a; }
body[data-saison="automne"]   { --mur: #cf6f47; --colline: #bb5d38; --colline2: #e0ae62; --sol: #ecd09a; --accent: #b24a2c; }

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--mur); color: var(--encre);
  font: 400 17px/1.55 "Orkney", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .2; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
.meteo { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.meteo i { position: absolute; top: -5vh; border-radius: 50%; background: #fff8d6; opacity: .9; animation: tombe linear infinite; }
body[data-saison="printemps"] .meteo i { border-radius: 60% 10% 60% 10%; }
body[data-saison="automne"] .meteo i { border-radius: 2px 60% 2px 60%; }
body[data-saison="ete"] .meteo i { animation-name: monte; top: auto; bottom: -5vh; }
@keyframes monte { to { transform: translate3d(var(--dx, 4vw), -112vh, 0); } }
@keyframes tombe { to { transform: translate3d(var(--dx, 4vw), 112vh, 0) rotate(1turn); } }

/* ---------- En-tête ---------- */
.tete { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px clamp(16px, 3vw, 40px); pointer-events: none; }
.tete > * { pointer-events: auto; }
.marque {
  font: 400 26px/1 "Bagnard", Georgia, serif; letter-spacing: .04em; text-decoration: none;
  background: var(--papier); padding: 9px 16px 7px; border-radius: 3px; box-shadow: 3px 4px 0 var(--ombre); transform: rotate(-1.5deg);
}
.tete__gauche { display: flex; align-items: center; gap: 12px; }
.retour {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 500 13px/1 "Orkney", sans-serif; letter-spacing: .06em; text-transform: uppercase;
  background: var(--papier); padding: 8px 10px 8px 16px; border-radius: 4px; box-shadow: 3px 4px 0 var(--ombre); transform: rotate(.8deg);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.retour:hover { transform: rotate(-.6deg) translateY(-2px); }
.retour svg { width: 32px; height: 32px; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.retour:hover svg { transform: rotate(-90deg); }

/* ---------- Scène d'ouverture ---------- */
.scene { position: relative; min-height: min(92vh, 900px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: end; gap: clamp(16px, 3vw, 48px); padding: 24px clamp(16px, 5vw, 80px) 0; margin-top: -78px; padding-top: 110px; }
.scene::before, .scene::after { content: ""; position: absolute; left: -2vw; right: -2vw; bottom: 0; pointer-events: none; }
.scene::before { height: 46%; background: var(--colline); clip-path: polygon(0 34%, 9% 22%, 20% 30%, 33% 12%, 47% 26%, 60% 8%, 74% 24%, 87% 10%, 100% 26%, 100% 100%, 0 100%); }
.scene::after { height: 24%; background: var(--colline2); clip-path: polygon(0 40%, 12% 18%, 26% 34%, 41% 12%, 57% 30%, 72% 10%, 88% 30%, 100% 14%, 100% 100%, 0 100%); filter: drop-shadow(0 -4px 0 rgba(31, 42, 58, .08)); }
.fils { position: absolute; top: 0; left: 0; right: 0; height: 0; pointer-events: none; }
.fils span { position: absolute; top: 0; width: 2px; background: var(--papier); opacity: .8; transform-origin: top; animation: balance 5s ease-in-out infinite alternate; }
.fils span::after { content: ""; position: absolute; left: 50%; bottom: -1px; translate: -50% 100%; width: var(--t, 60px); aspect-ratio: 1; background: var(--f, #fff1b8); border-radius: 50%; box-shadow: 4px 5px 0 rgba(31, 42, 58, .14); }
@keyframes balance { from { rotate: -1.6deg; } to { rotate: 1.6deg; } }

.intro { position: relative; z-index: 2; align-self: center; background: var(--papier); padding: clamp(22px, 3vw, 40px); border-radius: 4px; box-shadow: 6px 7px 0 var(--ombre); transform: rotate(-1deg); margin-bottom: clamp(40px, 8vh, 110px); }
.etape { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
h1 { font: 400 clamp(44px, 6.2vw, 92px)/.95 "Bagnard", Georgia, serif; margin: 10px 0 18px; text-wrap: balance; }
.intro p { font-size: clamp(17px, 1.35vw, 20px); text-wrap: pretty; }
.heros { position: relative; z-index: 2; align-self: end; margin-bottom: 4%; }
.heros img { width: 100%; filter: drop-shadow(10px 12px 0 rgba(31, 42, 58, .16)); transform: rotate(1deg); animation: pose .9s cubic-bezier(.2, .9, .3, 1.15) both; transform-origin: 50% 100%; }
@keyframes pose { from { transform: rotate(-3deg) translateY(40px) scale(.94); opacity: 0; } }

/* ---------- Corps de la fiche ---------- */
main { position: relative; background: var(--sol); padding: clamp(36px, 6vw, 90px) clamp(16px, 5vw, 80px) clamp(60px, 8vw, 120px); }
.colonne { max-width: 1180px; margin: 0 auto; }
.carte { background: var(--papier); border-radius: 4px; box-shadow: 6px 7px 0 var(--ombre); padding: clamp(20px, 3vw, 38px); }
.reperes { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: clamp(18px, 3vw, 40px); transform: rotate(.5deg); margin-top: calc(clamp(36px, 6vw, 90px) * -1.6); position: relative; z-index: 3; }
.etiquette { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--papier); background: var(--accent); padding: 6px 10px 4px; border-radius: 2px; transform: rotate(-1.5deg); margin-bottom: 12px; }
.reperes ul { list-style: none; padding: 0; }
.reperes li + li { margin-top: 3px; }
.reperes strong { font: 400 24px/1.15 "Bagnard", Georgia, serif; }
.reperes img { max-width: 240px; margin-top: 14px; mix-blend-mode: multiply; }
.reperes .lieu { margin-top: 4px; }
.reperes .accroche { margin-top: 14px; font-style: italic; }

section.volet { margin-top: clamp(56px, 8vw, 120px); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 60px); align-items: start; }
section.volet:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
section.volet:nth-of-type(even) .texte { order: 2; }
.texte { position: sticky; top: 96px; }
.texte .carte { transform: rotate(-.8deg); }
section.volet:nth-of-type(even) .texte .carte { transform: rotate(.8deg); }
.texte h2 { font: 400 clamp(28px, 2.6vw, 40px)/1.08 "Bagnard", Georgia, serif; margin-bottom: 12px; text-wrap: balance; }
.texte p { text-wrap: pretty; }
.texte .chapeau { font: 400 clamp(21px, 1.9vw, 27px)/1.25 "Bagnard", Georgia, serif; }
section.volet.seul, section.volet.seul:nth-of-type(even) { grid-template-columns: minmax(0, 720px); justify-content: center; }
section.volet.seul .texte { position: static; }
section.volet.galerie, section.volet.galerie:nth-of-type(even) { display: block; }
section.volet.galerie > .etiquette { font-size: 13px; padding: 8px 12px 6px; margin-bottom: 20px; }
.bouton { display: inline-block; margin-top: 18px; font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--papier); background: var(--encre); padding: 13px 18px 11px; border-radius: 3px; box-shadow: 3px 4px 0 var(--accent); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.bouton:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 6px 7px 0 var(--accent); }

/* Les images : des tirages posés sur la table, légèrement de travers */
.tirages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 34px); }
.tirages figure { background: var(--papier); padding: clamp(8px, 1vw, 14px); border-radius: 3px; box-shadow: 6px 7px 0 var(--ombre); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.tirages figure:nth-child(odd) { transform: rotate(-1.2deg); }
.tirages figure:nth-child(even) { transform: rotate(1deg) translateY(14px); }
.tirages figure.large { grid-column: 1 / -1; transform: rotate(.5deg); }
.tirages figure.portrait { max-width: 340px; justify-self: center; }
.tirages figure:hover { transform: rotate(0) translateY(-6px) scale(1.015); box-shadow: 10px 13px 0 var(--ombre); z-index: 2; position: relative; }
.tirages figcaption { font-size: 13px; padding: 9px 4px 2px; color: rgba(31, 42, 58, .75); }

.fin { margin-top: clamp(60px, 8vw, 120px); text-align: center; }
.fin .carte { display: inline-block; transform: rotate(-1deg); padding: clamp(24px, 4vw, 48px) clamp(24px, 6vw, 80px); }
.fin h2 { font: 400 clamp(30px, 4vw, 54px)/1 "Bagnard", Georgia, serif; margin-bottom: 8px; }
.fin p a { font-weight: 700; text-decoration-color: var(--accent); text-underline-offset: 3px; }

@media (max-width: 860px) {
  .scene { grid-template-columns: 1fr; min-height: 0; }
  .intro { margin-bottom: 0; }
  .heros { margin: 0 auto 6%; max-width: 520px; }
  .reperes { grid-template-columns: 1fr; margin-top: -30px; }
  section.volet, section.volet:nth-of-type(even) { grid-template-columns: 1fr; }
  section.volet:nth-of-type(even) .texte { order: 0; }
  .texte { position: static; }
  .tirages { grid-template-columns: 1fr; }
  .tirages figure:nth-child(even) { transform: rotate(1deg); }
  .marque { font-size: 22px; }
  .retour { font-size: 11px; padding-left: 12px; gap: 6px; }
  .retour svg { width: 26px; height: 26px; }
  .tete { padding: 12px 12px; gap: 8px; }
  .tete__gauche { gap: 8px; }
  .contact summary { padding: 10px 11px 8px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .meteo, .fils span, .contact__carte { animation: none; }
  .meteo { display: none; }
  .heros img { animation: none; }
}

/* ---------- Bouton Contact (présent sur toutes les pages) ---------- */
.contact { position: relative; }
.contact summary {
  list-style: none; cursor: pointer; font: 700 13px/1 "Orkney", sans-serif; letter-spacing: .1em; text-transform: uppercase;
  color: var(--papier); background: var(--encre); padding: 12px 15px 10px; border-radius: 3px;
  box-shadow: 3px 4px 0 var(--accent); transform: rotate(1.2deg); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.contact summary { position: relative; z-index: 61; }
.contact summary:focus:not(:focus-visible) { outline: none; }
.contact summary::-webkit-details-marker { display: none; }
.contact summary:hover { transform: rotate(-1deg) translateY(-2px); }
.contact__carte {
  position: absolute; top: calc(100% + 30px); left: 0; z-index: 60; width: max-content; max-width: min(300px, 80vw);
  background: var(--papier); color: var(--encre); padding: 18px 22px 16px; border-radius: 4px;
  box-shadow: 5px 6px 0 rgba(31, 42, 58, .22);
  font: 400 16px/1.5 "Orkney", sans-serif;
  /* La carte tombe du haut de l'écran au bout de son fil, se balance d'avant en arrière, puis se berce doucement */
  transform-origin: 34px -140px;
  transform: rotate(-1.2deg);
}
.contact__carte.ouvre { animation: suspend 1.5s both, berce 4s ease-in-out 1.5s infinite alternate; }
.contact__carte.ferme { animation: remonte .75s both; }
@keyframes remonte {
  0% { transform: perspective(800px) translateY(0) rotateX(0deg) rotateZ(-1.2deg); animation-timing-function: ease-out; }
  22% { transform: perspective(800px) translateY(16px) rotateX(-16deg) rotateZ(1deg); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  100% { transform: perspective(800px) translateY(-110vh) rotateX(26deg) rotateZ(-3deg); }
}
.contact__carte::before {
  content: ""; position: absolute; left: 33px; bottom: 100%; width: 2px; height: 100vh;
  background: var(--papier); box-shadow: 1px 1px 0 rgba(31, 42, 58, .18);
}
.contact__carte::after {
  content: ""; position: absolute; left: 29px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 1px 1px 0 rgba(31, 42, 58, .25);
}
.contact[open] summary { transform: rotate(-1deg); }
.contact__titre { font: 400 24px/1.1 "Bagnard", Georgia, serif; margin-bottom: 6px; }
.contact__carte a { color: inherit; font-weight: 700; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.contact__carte p + p { margin-top: 4px; }
@keyframes suspend {
  0% { transform: perspective(800px) translateY(-110vh) rotateX(0deg) rotateZ(-3deg); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  38% { transform: perspective(800px) translateY(0) rotateX(-38deg) rotateZ(2.5deg); animation-timing-function: ease-out; }
  52% { transform: perspective(800px) translateY(-14px) rotateX(24deg) rotateZ(-2deg); animation-timing-function: ease-in-out; }
  66% { transform: perspective(800px) translateY(0) rotateX(-14deg) rotateZ(1.4deg); animation-timing-function: ease-in-out; }
  79% { transform: perspective(800px) translateY(-3px) rotateX(8deg) rotateZ(-1.4deg); animation-timing-function: ease-in-out; }
  90% { transform: perspective(800px) translateY(0) rotateX(-3.5deg) rotateZ(-1deg); animation-timing-function: ease-in-out; }
  100% { transform: perspective(800px) translateY(0) rotateX(0deg) rotateZ(-1.2deg); }
}
@keyframes berce { from { transform: perspective(800px) rotateX(1.5deg) rotateZ(-1.2deg); } to { transform: perspective(800px) rotateX(-1.5deg) rotateZ(1.2deg); } }


@media (prefers-reduced-motion: reduce) { .contact__carte { animation: none; transform: rotate(-1.2deg); } }

/* ---------- Page « Tous les projets » et page introuvable ---------- */
.tous { margin-top: 14px; font-size: 14px; }
.tous a { font-weight: 700; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.tous-projets main { min-height: 100vh; padding-top: clamp(20px, 3vw, 40px); }
.tous-projets .chapo { max-width: 780px; transform: rotate(-.6deg); }
.tous-projets .chapo .etape { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.tous-projets h1 { font-size: clamp(40px, 5.4vw, 76px); }
.saison[data-saison="hiver"]     { --accent: #4f7fa8; }
.saison[data-saison="printemps"] { --accent: #5f8f4e; }
.saison[data-saison="ete"]       { --accent: #c9801a; }
.saison[data-saison="automne"]   { --accent: #b24a2c; }
.saison { margin-top: clamp(40px, 6vw, 80px); }
.saison h2 { font: 400 clamp(26px, 3vw, 40px)/1.1 "Bagnard", Georgia, serif; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.projets { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(14px, 2vw, 24px); }
.projets .carte { display: flex; flex-direction: column; height: 100%; padding: 16px 18px 18px; text-decoration: none; transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.projets .carte:hover { transform: translate(-2px, -3px) rotate(-.8deg); box-shadow: 8px 10px 0 var(--accent); }
.projets img { width: 100%; height: 150px; object-fit: contain; margin-bottom: 12px; }
.projets strong { font: 400 24px/1.05 "Bagnard", Georgia, serif; }
.projets span { font-size: 13px; line-height: 1.4; margin-top: 6px; opacity: .8; }
