:root { color-scheme: light; --paper: #efe7d3; --ink: #2b2620; --dim: #71695b; --stem: #5f6e3c; --blend: multiply; --stitch: #9c3a2a;
  --indigo: #24395f; --ochre: #c58b1e; --black: #1f1c1a; --silk: #e4d9bf; --madder: #9c3a2a; --green: #3c6e47; }
:root.dark { color-scheme: dark; --paper: #201d18; --ink: #e8dfca; --dim: #a1977f; --stem: #8b9a5e; --blend: normal; --stitch: #d9735f; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: clamp(14px, 2.15vh, 20px); }
body { background: var(--paper); color: var(--ink); font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif; line-height: 1.5; }
/* Fibres du papier */
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: var(--blend);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.035 .9' numOctaves='3' seed='8'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .25 0 0 0 .5 -.18'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23f)'/%3E%3C/svg%3E"); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
noscript { display: block; padding: 2rem; max-width: 60ch; }

.js body { height: 100dvh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 2.5rem; padding: 3.5vh 4vw; }

/* Plantes */
.stage { position: relative; min-height: 0; min-width: 0; }
#plants, #wire { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#wire { pointer-events: none; opacity: 0; }
#wire.show { opacity: 1; }
.trunk, .leaf { fill: var(--stem); }
.leaf { opacity: .82; }
.hit { fill: none; stroke: transparent; stroke-width: 24; stroke-linecap: round; cursor: pointer; outline: none; }
.tie { stroke: var(--ochre); stroke-width: 2.5; stroke-linecap: round; }
.plant { cursor: pointer; }
.flower { outline: none; }
.flower .area { fill: transparent; }
.petal { mix-blend-mode: var(--blend); opacity: .86; }
.heart { fill: #3b2f1e; }
.yr { font-size: 12px; font-style: italic; fill: var(--dim); text-anchor: middle; }

/* Souffle d'air : chaque plante et chaque branche oscille à son rythme. */
.plant { transform-origin: var(--x) var(--g); animation: sway var(--d) ease-in-out var(--o) infinite alternate; }
.branch { transform-origin: var(--ax) var(--ay); animation: flutter calc(var(--d) * .62) ease-in-out var(--o) infinite alternate; }
@keyframes sway { from { transform: rotate(-1.1deg); } to { transform: rotate(1.4deg); } }
@keyframes flutter { from { transform: rotate(-2.6deg); } to { transform: rotate(2.2deg); } }
.lean { transform-origin: var(--x) var(--g); animation: rise 1.5s cubic-bezier(.2, .8, .2, 1) var(--r) backwards; }
@keyframes rise { from { transform: scale(.5, 0); opacity: 0; } }
.head { transition: transform .55s cubic-bezier(.34, 1.56, .64, 1); }
.flower:focus-visible .head { transform: scale(1.18); }
.flower.on .head { transform: scale(1.32); }
.flower.on .heart { fill: var(--ink); stroke: var(--paper); stroke-width: 2; }
.plant.on .trunk { fill: var(--ink); }

/* Légende de survol : un fil et une boîte carrée. */
#wire path { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; }
#wire rect { fill: var(--ink); opacity: 0; }
#wire.show path { stroke-dashoffset: 0; transition: stroke-dashoffset .28s ease-out; }
#wire.show rect { opacity: 1; transition: opacity .15s .2s; }
#tip { position: absolute; width: min(17rem, 62%); padding: .7rem .85rem; border: 1px solid color-mix(in srgb, var(--tint, var(--ink)) 45%, var(--ink)); background: color-mix(in srgb, var(--tint, var(--paper)) 17%, var(--paper));
  font-family: system-ui, sans-serif; font-size: .72rem; line-height: 1.45; pointer-events: none; opacity: 0; transform: translateY(4px); }
#tip.show { opacity: 1; transform: none; transition: opacity .2s .22s, transform .2s .22s; }
#tip b { display: block; font-size: .86rem; font-weight: 600; margin: .1rem 0 .25rem; }
#tip i { font-style: normal; color: var(--dim); }
/* Les trois logos ont la même largeur. */
.lockup { display: flex; align-items: center; gap: 4%; width: 11rem; }
.lockup img { display: block; width: 100%; height: auto; min-width: 0; }
.lockup.duo img { flex: 0 0 24%; width: 24%; }
.lockup.duo img + img { flex: 1; }
#tip .lockup { width: 7.5rem; margin: .4rem 0 .5rem; }
#tip > span:not(.lockup) { display: block; margin-top: .3rem; padding-top: .3rem; border-top: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }

/* Texte sur une étiquette de papier, posée sur l'étoffe. */
.side { position: relative; min-height: 0; padding: 2.6rem 2rem; display: flex; }
/* L'étoffe est un SVG. Son filtre irrégulier est interne au SVG : appliqué en CSS sur du HTML, il laissait des artefacts dans Chrome. */
#cloth { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 5px 7px rgba(30, 20, 10, .3)); }
.card { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--paper); outline: 2px dashed var(--stitch); outline-offset: -9px; padding: 2rem 2.1rem; box-shadow: 0 3px 9px rgba(30, 20, 10, .35);
  display: flex; flex-direction: column; justify-content: center; gap: 1.1rem; }
/* Langue et thème, en haut de l'étiquette */
.tools { position: absolute; top: 1.15rem; right: 1.35rem; display: flex; align-items: center; gap: .15rem; }
.tools a, .tools button { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; text-decoration: none; font-size: 1.05rem; line-height: 1; }
.tools a { opacity: .45; filter: grayscale(.6); }
.tools a[aria-current], .tools a:hover { opacity: 1; filter: none; }
.tools button { margin-left: .25rem; color: var(--dim); }
.tools button:hover { color: var(--ink); }
.tools svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tools .sun, .dark .tools .moon { display: none; }
.dark .tools .sun { display: block; }
h1 { font-size: 2.3rem; font-weight: 400; line-height: 1.1; }
.sub { color: var(--dim); font-style: italic; margin-top: .3rem; }
nav { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; }
nav button, nav a, .link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
nav button.on { text-decoration: none; font-style: italic; }
#pane { display: grid; gap: .6rem; align-content: start; min-height: 14rem; }
h2 { font-size: 1.45rem; font-weight: 400; line-height: 1.2; }
.kick { color: var(--dim); font-style: italic; }
.dim { color: var(--dim); font-size: .9rem; }
dl { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: .25rem 1rem; font-size: .92rem; }
dt { font-style: italic; } dd { color: var(--dim); }
footer { color: var(--dim); font-size: .8rem; }

@media (max-width: 820px) {
  html { font-size: clamp(13.5px, 1.9vh, 17px); }
  .js body { grid-template-columns: 1fr; grid-template-rows: 33dvh minmax(0, 1fr); gap: .5rem; padding: .6rem .7rem .7rem; }
  .side { padding: 1.5rem .7rem; }
  .card { padding: 1.3rem 1.3rem 1.1rem; justify-content: flex-start; gap: .5rem; }
  .tools { position: static; align-self: flex-end; margin: -.7rem -.5rem -.5rem 0; }
  .tools a, .tools button { width: 1.7rem; height: 1.7rem; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.2rem; }
  #pane { min-height: 0; }
  footer { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
