/* ════════════════════════════════════════
   HISTOIRE & TRADITIONS — styles spécifiques
   S'appuie sur les variables de style.css
   (--parch, --ink, --accent, --gold, --border…)
════════════════════════════════════════ */

.hero--traditions {
  padding-bottom: 2.5rem;
}

.hero-sub {
  margin-top: 1rem !important;
  font-style: normal !important;
  font-size: 0.98rem !important;
  color: var(--ink-light) !important;
  max-width: 620px !important;
}

/* ── Bannière de stats ── */
.trad-stats-band {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 2rem 2.5rem;
  text-align: center;
  color: var(--gold);
}

.trad-stats-band svg { width: 100%; max-width: 240px; height: 24px; margin: 0.4rem auto; display: block; }

.trad-stats-inner {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 0.6rem 0;
}

.trad-stat {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.trad-stat strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  color: var(--ink);
  letter-spacing: 0;
  font-weight: 600;
}

/* ── Cadre autour de la carte, avec marge pour les ornements EXTÉRIEURS ── */
.trad-frame {
  position: relative;
  padding: 2.6rem;
}

.trad-mapwrap {
  position: relative;
  border: 1px solid var(--gold);
  padding: 1.4rem;
}

.trad-mapwrap::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid var(--border);
  pointer-events: none;
}

.trad-corner {
  position: absolute;
  width: 64px;
  height: 64px;
  color: var(--gold);
  opacity: 0.8;
  pointer-events: none;
  z-index: 2;
}
.trad-corner.tl { top: 0; left: 0; }
.trad-corner.tr { top: 0; right: 0; transform: scaleX(-1); }
.trad-corner.bl { bottom: 0; left: 0; transform: scaleY(-1); }
.trad-corner.br { bottom: 0; right: 0; transform: scale(-1, -1); }

@media (max-width: 700px) {
  .trad-frame { padding: 1.6rem; }
  .trad-corner { width: 40px; height: 40px; }
}

/* ── Grille "dernières histoires ajoutées" (réutilise .plant-card du thème) ── */
.trad-latest-grid {
  max-width: 1125px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.trad-latest-card .plant-body { padding: 1.3rem 1.4rem; }
.trad-latest-card .plant-latin {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

/* ── Mise en garde ── */
.trad-disclaimer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  text-align: center;
}
.trad-disclaimer p {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-muted);
  line-height: 1.7;
}
.trad-disclaimer svg {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  margin-right: 0.3rem;
  color: var(--gold);
}
.trad-disclaimer a { color: var(--accent); }

/* ── Section carte ── */
.trad-map-section {
  background: var(--parch);
  padding: 1rem 2rem 5rem;
}

.trad-map-inner {
  max-width: 920px;
  margin: 0 auto;
}

.trad-crumb {
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin-bottom: 0.8rem;
  min-height: 1.2em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.trad-crumb span {
  cursor: pointer;
  font-style: italic;
}

.trad-crumb span.current {
  color: var(--ink);
  font-weight: 600;
  font-style: normal;
  cursor: default;
}

.trad-crumb span.sep {
  cursor: default;
  opacity: 0.5;
  font-style: normal;
  margin: 0 0.1rem;
}

.trad-mapwrap {
  background: #dfe7e1; /* "océan" désaturé, en accord avec --accent-light */
  box-shadow: 0 2px 16px rgba(30, 18, 8, 0.07);
  overflow: hidden;
}

#trad-svg {
  width: 100%;
  height: auto;
  display: block;
}

#trad-svg .ocean { fill: #dfe7e1; }

#trad-svg .bg-country {
  fill: var(--parch-dark);
  stroke: var(--parch);
  stroke-width: 0.4;
}

#trad-svg .zone {
  stroke: var(--parch);
  stroke-width: 1.1;
  cursor: pointer;
  transition: filter 0.15s;
}
#trad-svg .zone:hover { filter: brightness(1.1); }
#trad-svg .zone.muted { opacity: 0.55; }
#trad-svg .zone.muted:hover { filter: brightness(0.95); }

#trad-svg .country {
  stroke: var(--parch);
  stroke-width: 0.6;
  transition: filter 0.15s;
}
#trad-svg .country.has-data { cursor: pointer; }
#trad-svg .country.has-data:hover { filter: brightness(1.12); }
#trad-svg .country.no-data { fill: #c9c0a8; cursor: default; }

.trad-hint {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-style: italic;
  margin: 0.7rem 0 0;
}

.trad-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1rem 0 1.6rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.trad-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.trad-legend .dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 2px;
}

/* ── Fil d'Ariane (même look que sur plante.php / usage_fiche.php) ── */
.trad-bc {
  padding: 0.55rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(244, 236, 213, 0.8);
}
.breadcrumb-inner {
  max-width: 1100px;
  margin: 0 auto;
  font-size: 0.82rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.breadcrumb-inner a { color: var(--ink-muted); text-decoration: none; transition: color 0.2s; }
.breadcrumb-inner a:hover { color: var(--accent); }
.bc-sep { opacity: 0.45; }
.bc-current { color: var(--ink-light); font-style: italic; }

/* ── Bannière (pas de photo — juste le texte, thème parchemin/doré) ── */
.trad-banner {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 2rem 0;
}

.trad-banner-plante {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}
.trad-banner-plante a {
  color: var(--accent);
  text-decoration: none;
  font-style: italic;
  border-bottom: 1px solid var(--accent-light);
}
.trad-banner-plante a:hover { border-color: var(--accent); }
.trad-banner-plante-commun { color: var(--ink-muted); font-style: normal; }

.trad-banner-tag {
  font-family: 'Cormorant SC', 'EB Garamond', serif;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.trad-banner-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.8rem;
}

.trad-banner-sub {
  font-size: 1.05rem;
  color: var(--ink-muted);
  font-style: italic;
  line-height: 1.6;
  max-width: 560px;
  margin: 0;
}

.header-ornament {
  color: var(--gold);
  margin-top: 2rem;
  width: 100%;
  max-width: 460px;
}
.header-ornament svg { width: 100%; height: 20px; }

/* ── Corps de la fiche ── */
.trad-fiche-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.4rem 2rem 4rem;
}

.trad-fiche-body p {
  font-size: 1.08rem;
  color: var(--ink-light);
  line-height: 1.85;
  margin-bottom: 1.3rem;
}

.trad-fiche-body p.trad-first-p::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem;
  font-weight: 700;
  float: left;
  line-height: 0.8;
  padding: 0.1rem 0.4rem 0 0;
  color: var(--gold);
}

.uf-back-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.uf-back-link:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 700px) {
  .trad-banner { padding: 2rem 1.2rem 0; }
  .trad-fiche-wrap { padding: 1.8rem 1.2rem 3rem; }
  .trad-fiche-body p.trad-first-p::first-letter { font-size: 2.4rem; }
}
.trad-panel { margin-top: 0.5rem; }

.trad-cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
}

.trad-card {
  background: #fff9ee;
  border: 1px solid var(--border);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.trad-card:hover { border-color: var(--accent); background: var(--accent-light); }
.trad-card p {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  margin: 0;
  color: var(--ink);
}

.trad-content-card {
  background: #fff9ee;
  border: 1px solid var(--border);
  padding: 1.4rem 1.6rem;
}
.trad-content-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 1rem;
}

/* ── Liste d'histoires / légendes nommées (remplace les anciennes catégories génériques) ── */
.trad-story-list {
  display: flex;
  flex-direction: column;
}

.trad-story {
  display: block;
  border-top: 1px solid var(--border);
  padding: 0.9rem 0;
  text-decoration: none;
  transition: background 0.15s;
}
.trad-story:first-child { border-top: none; padding-top: 0; }
.trad-story:hover .t { color: var(--accent); }

.trad-story p.t {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 0.25rem;
  transition: color 0.15s;
}
.trad-story p.d {
  font-size: 0.92rem;
  color: var(--ink-light);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 700px) {
  .trad-map-section { padding: 1rem 1.2rem 3.5rem; }
}

/* ══════════════════════════════════
   BASCULE VERS MYTHES & LÉGENDES
   Onglet fixé au bord gauche de l'écran, coloré dans la palette
   nocturne de l'autre section (aperçu de la destination),
   qui glisse entièrement à l'écran au survol.
══════════════════════════════════ */
.trad-swap {
  position: fixed;
  left: 0;
  top: 55%;
  transform: translateY(-50%) translateX(-62%);
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.1rem 0.75rem 0.85rem;
  background: linear-gradient(135deg, #181229, #0d0a18);
  border: 1px solid rgba(216, 201, 138, 0.35);
  border-radius: 0 50px 50px 0;
  text-decoration: none;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1), box-shadow 0.3s;
}
.trad-swap:hover {
  transform: translateY(-50%) translateX(0);
  box-shadow: 6px 0 28px rgba(0, 0, 0, 0.35);
}
.trad-swap-arrow {
  font-size: 1.2rem;
  line-height: 1;
  color: #d8c98a;
}
.trad-swap-label {
  font-family: 'EB Garamond', serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  font-style: italic;
  color: #e8dcc0;
}
@media (max-width: 700px) {
  .trad-swap {
    padding: 0.6rem 0.8rem 0.6rem 0.6rem;
    transform: translateY(-50%) translateX(-70%);
  }
  .trad-swap-label { display: none; }
}

/* ── blason de page, en haut du hero (repris de la page de bifurcation) ── */
.trad-hero-emblem {
  display: block;
  width: 90px;
  height: 90px;
  margin: 0 auto 1.2rem;
  opacity: 0.9;
}

/* ══════════════════════════════════
   TRANSITION EN GLISSEMENT ENTRE PAGES
   (voir /assets/js/page-swap.js)
══════════════════════════════════ */
body {
  transition: transform 0.48s cubic-bezier(.4,0,.2,1), opacity 0.42s ease;
}
html.enter-right body,
html.enter-left body {
  transition: none;
  opacity: 0;
}
html.enter-right body { transform: translateX(100%); }
html.enter-left body { transform: translateX(-100%); }
html.enter-right body.page-slide-ready,
html.enter-left body.page-slide-ready {
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.48s cubic-bezier(.4,0,.2,1), opacity 0.42s ease;
}
html.exit-left body { transform: translateX(-100%); opacity: 0; }
html.exit-right body { transform: translateX(100%); opacity: 0; }