@charset "utf-8";
/* MOSAIQUE.CSS — la mosaïque des réalisations (accueil, page « Réalisations ») — repris de l'ancien site */
.ys-gal {
  --ys-vert: #1f2a22;
  --ys-olive: #6b7d4f;
  --ys-creme: #f1ebe6;
  --ys-ecart: clamp(14px, 2vw, 26px);   /* espace entre les photos */
  background: #fff;
  padding: clamp(80px, 9vw, 130px) clamp(20px, 5vw, 72px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #3c4a3e;
}
.ys-gal *, .ys-gal *::before, .ys-gal *::after { box-sizing: border-box; }
.ys-gal-cadre { max-width: 1240px; margin: 0 auto; }

/* l'en-tête : titre à gauche, lien à droite */
.ys-gal-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: clamp(40px, 5vw, 64px); }
.ys-gal .ys-gal-surtitre { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--ys-olive); }
.ys-gal .ys-gal-surtitre::before { content: ""; width: 40px; height: 1px; background: currentColor; opacity: .7; }
.ys-gal .ys-gal-titre { margin: 0; padding: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(34px, 3.6vw, 50px); font-weight: 500; line-height: 1.1; color: var(--ys-vert); }
.ys-gal .ys-gal-tout { display: inline-flex; align-items: center; gap: 14px; padding-bottom: 6px; font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--ys-vert); transition: color .3s ease; }
.ys-gal-tout span { display: block; width: 34px; height: 1px; background: currentColor; transition: width .35s ease; }
.ys-gal .ys-gal-tout:hover, .ys-gal .ys-gal-tout:focus-visible { color: var(--ys-olive); }
.ys-gal-tout:hover span, .ys-gal-tout:focus-visible span { width: 58px; }

/* la mosaïque : 12 colonnes, le script donne à chaque photo sa largeur */
.ys-gal-grille { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--ys-ecart); }
.ys-gal .ys-jardin {
  --ys-h: clamp(210px, 23vw, 310px);   /* rangée de 3 */
  position: relative;
  grid-column: span 4;                  /* valeur par défaut, avant le script */
  height: var(--ys-h);
  overflow: hidden;
  display: block;
  background: #e9e3da;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}
.ys-gal .ys-jardin.ys-r2 { --ys-h: clamp(240px, 30vw, 420px); }   /* rangée de 2 : plus haute */
.ys-gal .ys-jardin img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  border-radius: 0;
  transform: scale(1.1);
  transition: transform 1.6s cubic-bezier(.18, 1, .21, 1);
}
/* un voile en bas pour lire le nom */
.ys-gal .ys-jardin::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(20, 27, 22, .72) 0%, rgba(20, 27, 22, .15) 42%, rgba(20, 27, 22, 0) 62%);
  transition: opacity .5s ease;
}
/* le numéro, le nom, puis « Voir le jardin » */
.ys-gal .ys-jardin b {
  position: absolute;
  left: clamp(18px, 2vw, 28px);
  right: clamp(18px, 2vw, 28px);
  bottom: clamp(16px, 2vw, 26px);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .01em;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
  transition: transform .5s cubic-bezier(.18, 1, .21, 1);
}
.ys-gal .ys-jardin b::before {             /* le numéro, écrit par le script */
  content: attr(data-num);
  display: block;
  margin-bottom: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .3em;
  color: #f1ebe6;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
.ys-gal .ys-jardin b::after {              /* « Voir le jardin » au survol */
  content: "Voir le jardin  —";
  display: block;
  height: 0;
  margin-top: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  white-space: pre;
  color: var(--ys-creme);
  opacity: 0;
  transition: opacity .4s ease, height .4s ease, margin .4s ease;
}
.ys-gal .ys-jardin:hover img, .ys-gal .ys-jardin:focus-visible img { transform: scale(1.06); }
.ys-gal .ys-jardin:hover b::after, .ys-gal .ys-jardin:focus-visible b::after { height: 1.6em; margin-top: 10px; opacity: 1; }
.ys-gal .ys-jardin:focus-visible { outline: 2px solid var(--ys-olive); outline-offset: 3px; }

/* le dévoilement de bas en haut, à l'arrivée à l'écran (sur la photo et le voile,
   pas sur le lien lui-même : le navigateur doit « voir » le lien pour lancer l'effet) */
.ys-gal .ys-jardin { background: transparent; }
.ys-gal .ys-jardin img, .ys-gal .ys-jardin::before { clip-path: inset(100% 0 0 0); }
.ys-gal .ys-jardin img { transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1), transform 1.6s cubic-bezier(.18, 1, .21, 1); transition-delay: var(--ys-delai, 0s); }
.ys-gal .ys-jardin::before { transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1); transition-delay: var(--ys-delai, 0s); }
.ys-gal .ys-jardin b { opacity: 0; }
.ys-gal .ys-jardin.ys-vu img, .ys-gal .ys-jardin.ys-vu::before { clip-path: inset(0 0 0 0); }
.ys-gal .ys-jardin.ys-vu img { transform: scale(1); }
.ys-gal .ys-jardin.ys-vu b { opacity: 1; transition: opacity .8s ease calc(var(--ys-delai, 0s) + .7s); }
.ys-gal .ys-jardin.ys-vu:hover img, .ys-gal .ys-jardin.ys-vu:focus-visible img { transform: scale(1.06); transition: transform 1.2s cubic-bezier(.18, 1, .21, 1); }
.ys-gal-sans-anim .ys-jardin img, .ys-gal-sans-anim .ys-jardin::before { clip-path: none; transform: none; }
.ys-gal-sans-anim .ys-jardin b { opacity: 1; }

/* tablette : rangées de 2 seulement */
@media (max-width: 1024px) {
  .ys-gal .ys-jardin, .ys-gal .ys-jardin.ys-r2 { --ys-h: clamp(220px, 34vw, 320px); }
}
/* les petits points : cachés sur ordinateur et tablette */
.ys-gal-points { display: none; }

/* téléphone : un seul jardin à la fois, sur toute la largeur (moins les marges) */
@media (max-width: 767px) {
  .ys-gal-grille {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ys-gal-grille::-webkit-scrollbar { display: none; }
  .ys-gal .ys-jardin, .ys-gal .ys-jardin.ys-r2 { flex: 0 0 100%; max-width: 100%; height: auto; aspect-ratio: 4 / 3; scroll-snap-align: start; scroll-snap-stop: always; grid-column: auto !important; --ys-delai: 0s !important; }
  .ys-gal-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; margin-top: 18px; }
  .ys-gal .ys-gal-points button { display: grid; place-items: center; width: 26px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; cursor: pointer; }
  .ys-gal .ys-gal-points button::before { content: ""; display: block; width: 7px; height: 7px; border: 1px solid var(--ys-olive); border-radius: 50%; transition: background-color .3s ease, transform .3s ease; }
  .ys-gal .ys-gal-points button[aria-current="true"]::before { background: var(--ys-olive); transform: scale(1.3); }
  .ys-gal .ys-gal-points button:focus { outline: none; }
  .ys-gal .ys-gal-points button:focus-visible { outline: 2px solid var(--ys-olive); outline-offset: -4px; }
  .ys-gal .ys-jardin b::after { height: 1.6em; margin-top: 10px; opacity: 1; }   /* pas de survol au doigt : toujours visible */
  .ys-gal-tete { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .ys-gal .ys-jardin img, .ys-gal .ys-jardin::before, .ys-gal .ys-jardin b { clip-path: none !important; transform: none !important; opacity: 1 !important; transition: none !important; }
}
