/* ════════════════════════════════════════
   HERBARIUM — plant_planche.css
   Décors « planche d'herbier » de la fiche plante.
   À charger APRÈS plant.css (il ne remplace rien, il ajoute).
   Version sombre via body.is-toxic.
════════════════════════════════════════ */

body {
  --pl-sheet: #fbf6e8;
  --pl-card: var(--card, #fff9ee);
  --pl-grain: rgba(74, 51, 32, .04);
  --pl-shadow: var(--parch-dark, #e6d6aa);
  --pl-tape: rgba(237, 221, 176, .85);
}
body.is-toxic {
  --pl-sheet: #160b0b;
  --pl-card: #1a0d0d;
  --pl-grain: rgba(180, 60, 60, .05);
  --pl-shadow: #200f0f;
  --pl-tape: rgba(120, 60, 50, .6);
}

/* grain de papier très léger sur toute la page */
.plant-main {
  background-image: radial-gradient(var(--pl-grain) 1px, transparent 1.3px);
  background-size: 6px 6px;
}

/* ══════════════════════════════════
   EN-TÊTE : la planche encadrée
══════════════════════════════════ */
.pl-plate {
  position: relative;
  overflow: hidden;
  padding: clamp(1.6rem, 3.4vw, 2.8rem);
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold-light);
  outline-offset: -8px;
  background: color-mix(in srgb, var(--pl-card) 55%, transparent);
}
.pl-plate > * { position: relative; z-index: 1; }
.pl-vine {
  position: absolute;
  z-index: 0;
  width: 150px;
  height: 150px;
  color: var(--accent);
  opacity: .5;
  pointer-events: none;
}
.pl-vine--tl { top: -6px; left: -6px; }
.pl-vine--br { bottom: -6px; right: -6px; transform: rotate(180deg); }
.pl-watermark {
  position: absolute;
  z-index: 0;
  left: -1%;
  bottom: -8%;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(5rem, 14vw, 11rem);
  line-height: 1;
  color: var(--gold);
  opacity: .07;
  white-space: nowrap;
  pointer-events: none;
}
.pl-band {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.7rem;
  font-family: 'Cormorant SC', serif;
  font-size: .84rem;
  letter-spacing: .24em;
  color: var(--gold);
}
.pl-band::before,
.pl-band::after {
  content: "";
  flex: 1;
  min-width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.pl-band .pl-leaf { width: 18px; height: 18px; }

/* filet orné au-dessus de la taxonomie */
.plant-taxo { position: relative; }
.plant-taxo::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 60px;
  height: 7px;
  background: var(--parch);
  border-block: 1px solid var(--gold);
}
.is-toxic .plant-taxo::before { background: #0f0808; }

/* ── Feuille d'herbier : la photo y est montée avec des bandes de papier gommé ── */
.pl-sheet {
  position: relative;
  padding: 7% 7% 24%;
  background: var(--pl-sheet);
  border: 1px solid var(--border);
  box-shadow:
    5px 5px 0 var(--pl-shadow),
    6px 6px 0 var(--border),
    0 14px 34px rgba(30, 18, 8, .14);
}
.pl-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, transparent 55%, rgba(143, 104, 32, .10));
  pointer-events: none;
}
.pl-sheet .plant-image-frame {
  box-shadow: 0 2px 6px rgba(30, 18, 8, .18);
}
/* le texte alternatif d'une image cassée ne s'affiche jamais */
.plant-img { color: transparent; font-size: 0; }
/* crédit en haut de la photo (l'étiquette d'herbier occupe le bas) */
.pl-sheet .plant-img-credit { top: 0; bottom: auto; }
.pl-tape {
  position: absolute;
  z-index: 2;
  width: 64px;
  height: 18px;
  background: var(--pl-tape);
  border: 1px solid rgba(143, 104, 32, .25);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.pl-tape--1 { top: 4%; left: 2%; transform: rotate(-35deg); }
.pl-tape--2 { top: 4%; right: 2%; transform: rotate(35deg); }
.pl-tape--3 { bottom: 21%; left: 2%; transform: rotate(32deg); }
/* 4e bande : coin bas droit de la photo, en miroir de la 3e ; elle passe par-dessus l'étiquette */
.pl-tape--4 { bottom: 21%; right: 2%; transform: rotate(-32deg); z-index: 3; }
.pl-hlabel {
  position: absolute;
  z-index: 2;
  right: 5%;
  bottom: 3.5%;
  width: 62%;
  padding: .45rem .6rem .4rem;
  background: #fffdf5;
  border: 1px solid #b9a77a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  color: #2a1d10;
  font-size: .72rem;
  line-height: 1.35;
}
.pl-hlabel b {
  display: block;
  margin-bottom: .2rem;
  padding-bottom: .15rem;
  border-bottom: 1px solid #d8c8a0;
  font-family: 'Cormorant SC', serif;
  font-weight: 600;
  font-size: .62rem;
  letter-spacing: .16em;
  color: #6a5030;
}
.pl-hlabel i { display: block; font-family: 'Playfair Display', serif; font-size: .88rem; overflow-wrap: anywhere; }
.pl-hlabel span { display: block; color: #6a5a40; overflow-wrap: anywhere; }
.pl-seal {
  position: absolute;
  z-index: 3;
  left: -14px;
  top: 38%;
  width: 92px;
  height: 92px;
  transform: rotate(-16deg);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45));
}
.plant-image-wrap .img-deco { opacity: .55; }

/* ornement sous l'en-tête */
.pl-plate .header-ornament svg { height: 24px; }

/* ══════════════════════════════════
   CORPS
══════════════════════════════════ */
/* titres de section : filet orné + petite feuille */
.section-heading {
  position: relative;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--border);
}
.section-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 56px;
  height: 7px;
  background: var(--parch);
  border-block: 1px solid var(--gold);
}
.is-toxic .section-heading::after { background: #0f0808; }
.section-heading .pl-leaf {
  width: 20px;
  height: 20px;
  margin-left: auto;
  align-self: center;
  color: var(--accent);
  opacity: .7;
}

/* lettrine */
.plant-desc-text > p:first-child::first-letter {
  float: left;
  margin-right: .5rem;
  padding: .4rem .6rem .1rem 0;
  border-right: 1px solid var(--gold-light);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 4.2rem;
  line-height: .82;
  color: var(--accent);
}
.is-toxic .plant-desc-text > p:first-child::first-letter { border-color: rgba(180, 60, 60, .3); }

/* fleuron végétal à la place de ✦ */
.pl-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 1;
  letter-spacing: 0;
}
.pl-divider::before,
.pl-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light) 30%, var(--gold-light) 70%, transparent);
}
.is-toxic .pl-divider::before,
.is-toxic .pl-divider::after { background: linear-gradient(90deg, transparent, rgba(180, 60, 60, .3) 30%, rgba(180, 60, 60, .3) 70%, transparent); }
.pl-divider svg { width: 110px; height: 26px; color: var(--gold); opacity: .8; }
.is-toxic .pl-divider svg { color: #c07a5a; }

/* précautions : cartes avec ombre décalée */
.precaution-card { box-shadow: 3px 3px 0 var(--pl-shadow); }
.precaution-ico { width: 28px; height: 28px; color: var(--gold); }
.precaution-ico svg { width: 100%; height: 100%; display: block; }
.precaution-card--danger .precaution-ico { color: #c0392b; }
.is-toxic .precaution-ico { color: #c07a5a; }
.is-toxic .precaution-card--danger .precaution-ico { color: #e74c3c; }

/* usages : coin marqué à la couleur de la catégorie, feuille qui pivote */
.usage-bar { position: relative; }
.usage-bar::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: -1px;
  top: -1px;
  width: 10px;
  height: 10px;
  border: 0 solid;
  border-top-width: 2px;
  border-left-width: 2px;
  border-color: inherit;
  pointer-events: none;
}
.usage-bar-chev { display: inline-flex; }
.usage-bar-chev .pl-leaf { width: 20px; height: 20px; }

/* ══════════════════════════════════
   SOMMAIRE : fiches aux coins dorés + tampon
══════════════════════════════════ */
.pl-slab {
  position: relative;
  margin-bottom: 1.1rem;
  padding: 1.1rem 1.1rem 1.2rem;
  background: var(--pl-card);
  border: 1px solid var(--border);
  box-shadow: 4px 4px 0 var(--pl-shadow);
}
.pl-slab::before,
.pl-slab::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--gold);
  opacity: .7;
}
.pl-slab::before { top: -5px; left: -5px; border-width: 2px 0 0 2px; }
.pl-slab::after { bottom: -5px; right: -5px; border-width: 0 2px 2px 0; }
.pl-slab .sidebar-title { display: flex; align-items: center; gap: .5rem; }
.pl-slab .sidebar-title .pl-leaf { width: 16px; height: 16px; }
.is-toxic .pl-slab { background: #1a0d0d !important; }
.pl-stamp { display: flex; justify-content: center; padding-top: 1rem; }
.pl-stamp svg { width: 118px; height: 118px; color: var(--accent); opacity: .5; transform: rotate(-8deg); }

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 960px) {
  .pl-vine { width: 110px; height: 110px; }
  .pl-seal { left: -6px; width: 76px; height: 76px; }
  .pl-stamp { display: none; }
  .pl-slab { margin-bottom: .8rem; }
}
@media (max-width: 600px) {
  .pl-hlabel { width: 70%; font-size: .66rem; }
  .pl-tape { width: 48px; height: 14px; }
}

/* titres lisibles sur le fond sombre des plantes toxiques */
.is-toxic .section-heading { color: #f0d8d8; }
.is-toxic .pl-plate { background: rgba(26, 13, 13, .55); }