/* ---------- Polices manuscrites (licence OFL, auto-hébergées) ---------- */
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/caveat/caveat-latin-wght-normal.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/caveat/caveat-latin-ext-wght-normal.woff2") format("woff2");
  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: "Permanent Marker";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/permanent-marker/permanent-marker-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Kalam";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/kalam/kalam-latin-400-normal.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Kalam";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/kalam/kalam-latin-ext-400-normal.woff2") format("woff2");
  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: "Kalam";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/kalam/kalam-latin-700-normal.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Kalam";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/kalam/kalam-latin-ext-700-normal.woff2") format("woff2");
  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;
}

/* Largeur du polaroïd, animable */
@property --w {
  syntax: "<length>";
  inherits: true;
  initial-value: 240px;
}

:root {
  --bordeaux: #8a000a; /* Bordeaux II UBS : RGB 138, 0, 10 */
  --bordeaux-deep: #620007;
  --bordeaux-soft: #9a0b16;
  --paper: #fbfaf6;
  --ink: #23262d;
  --title-font: "Brand Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ui-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --name-font: "Caveat", "Segoe Print", cursive;
  --name-weight: 600;
  --bg: radial-gradient(ellipse 120% 95% at 50% 35%, var(--bordeaux-soft) 0%, var(--bordeaux) 50%, var(--bordeaux-deep) 100%);
}

/* ---------- Polaroïd ----------
   Largeur --w ; bordure 5,5 % ; photo carrée ; bandeau du nom 25,5 % ;
   hauteur totale = 1,2 × largeur. */
.polaroid {
  --pad: calc(var(--w) * 0.055);
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  width: var(--w);
  box-sizing: border-box;
  padding: var(--pad) var(--pad) 0;
  background: linear-gradient(165deg, #fffefb 0%, #f6f3eb 100%);
  border-radius: calc(var(--w) * 0.012);
  box-shadow:
    0 calc(var(--w) * 0.03) calc(var(--w) * 0.075) rgba(0, 0, 0, 0.38),
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.01) rgba(0, 0, 0, 0.25);
  transform-origin: 50% 50%;
}
.polaroid .ph {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #dcd8cf;
}
.polaroid .ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.polaroid .ph::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 calc(var(--w) * 0.025) rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
.polaroid figcaption {
  height: calc(var(--w) * 0.255);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 calc(var(--w) * 0.06);
  box-sizing: border-box;
  font-family: var(--name-font);
  font-weight: var(--name-weight);
  font-size: calc(var(--w) * var(--fs, 0.12));
  line-height: 1.15;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.polaroid.static {
  position: relative;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
