/* ── Catalogue specimens (liste) ─────────────────────────────────────────── */

.container-specimens {
    padding-bottom: 110px;
}

.specimens-intro {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.specimens-intro .nk-title-sep {
    margin-left: auto;
    margin-right: auto;
}

.specimens-stats {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 16px;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(195, 151, 74, 0.35);
    border-radius: 999px;
}

.specimens-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.specimen-filter {
    padding: 8px 18px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.specimen-filter:hover,
.specimen-filter.active {
    color: #fff;
    background: #c3974a;
    border-color: #c3974a;
}

.specimen-card {
    height: 100%;
    overflow: visible;
    background: transparent;
    border: none;
    transition: transform 0.35s ease;
    animation: specimenFadeUp 0.55s ease forwards;
    opacity: 0;
}

@keyframes specimenFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.specimen-card:hover {
    transform: translateY(-6px);
}

.specimen-card__link {
    display: block;
    color: inherit;
}

.specimen-card__link:focus-visible .specimen-holo-card {
    outline: 2px solid rgba(195, 151, 74, 0.75);
    outline-offset: 3px;
}

.specimen-card__viewer {
    position: relative;
    aspect-ratio: 0.68;
    max-width: 340px;
    margin-inline: auto;
}

.specimen-card__holo-space {
    width: 100%;
    height: 100%;
    perspective: 900px;
}

.specimen-holo-card {
    --mx: 0;
    --my: 0;
    --rx: 0deg;
    --ry: 0deg;
    --shine-x: 50%;
    --shine-y: 50%;

    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 1.875rem;
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transform-style: flat;
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.58),
        0 0 0 1px rgba(255, 255, 255, 0.16);
    will-change: transform;
    touch-action: none;
    cursor: pointer;
}

.specimen-card:hover .specimen-holo-card {
    box-shadow:
        0 42px 110px rgba(0, 0, 0, 0.66),
        0 0 0 1px rgba(255, 255, 255, 0.22),
        0 0 40px rgba(88, 247, 255, 0.12);
}

.specimen-holo-card__inner {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    background: #0f172a;
    isolation: isolate;
    transform: translateZ(0);
}

.specimen-holo-layer {
    position: absolute;
    pointer-events: none;
    will-change: transform, background-position;
}

.specimen-holo-layer--cover {
    inset: -18%;
}

.specimen-holo-layer--bg {
    z-index: 0;
    background:
        radial-gradient(circle at 50% 34%, rgba(195, 151, 74, 0.14), transparent 26%),
        radial-gradient(circle at 50% 70%, rgba(88, 247, 255, 0.1), transparent 32%),
        linear-gradient(145deg, #0b1026, #171135 46%, #07131e);
}

.specimen-holo-layer--stars {
    z-index: 2;
    opacity: 0.85;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1px, transparent 1.5px),
        radial-gradient(circle, rgba(88, 247, 255, 0.75) 0 1px, transparent 1.5px),
        radial-gradient(circle, rgba(195, 151, 74, 0.55) 0 1px, transparent 1.5px);
    background-size: 46px 46px, 74px 74px, 96px 96px;
    background-position:
        calc(var(--mx) * -20px) calc(var(--my) * -14px),
        calc(var(--mx) * 14px) calc(var(--my) * -24px),
        calc(var(--mx) * -18px) calc(var(--my) * 20px);
    transform: scale(1.08);
}

.specimen-holo-layer--shadow {
    z-index: 6;
    left: 12%;
    right: 12%;
    bottom: 22%;
    height: 74px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.62), transparent 70%);
    filter: blur(5px);
    transform: translate(calc(var(--mx) * -10px), calc(var(--my) * 8px));
}

.specimen-holo-layer--animal {
    inset: 1% -6% 22%;
    display: grid;
    place-items: center;
}

.specimen-holo-layer__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.specimen-holo-layer--animal-back {
    z-index: 8;
    opacity: 0.46;
    filter: blur(1.8px) saturate(1.8) hue-rotate(150deg);
    transform: translate(calc(var(--mx) * -16px), calc(var(--my) * -10px)) scale(1.04);
}

.specimen-holo-layer--animal-main {
    z-index: 10;
    transform: translate(calc(var(--mx) * 18px), calc(var(--my) * 17px)) scale(1.02);
    filter:
        drop-shadow(calc(var(--mx) * -10px) calc(var(--my) * -6px) 0 rgba(195, 151, 74, 0.22))
        drop-shadow(calc(var(--mx) * 10px) calc(var(--my) * 6px) 0 rgba(88, 247, 255, 0.24))
        drop-shadow(0 16px 24px rgba(0, 0, 0, 0.38));
}

.specimen-holo-layer--animal-front {
    z-index: 12;
    opacity: 0.22;
    mix-blend-mode: screen;
    filter: brightness(1.8) contrast(1.25) saturate(1.6);
    transform: translate(calc(var(--mx) * 32px), calc(var(--my) * 26px)) scale(1.015);
}

.specimen-holo-layer--foil {
    z-index: 20;
    inset: -28%;
    background:
        radial-gradient(circle at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.85), transparent 9%),
        linear-gradient(
            115deg,
            transparent 0%,
            rgba(88, 247, 255, 0.14) 18%,
            rgba(255, 230, 128, 0.2) 31%,
            rgba(195, 151, 74, 0.16) 45%,
            transparent 58%,
            rgba(155, 92, 255, 0.18) 74%,
            transparent 100%
        );
    mix-blend-mode: color-dodge;
    opacity: 0.72;
    transform: translate(calc(var(--mx) * -26px), calc(var(--my) * -18px));
}

.specimen-holo-layer--lines {
    z-index: 21;
    inset: -8%;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1) 0px,
        rgba(255, 255, 255, 0.1) 1px,
        transparent 1px,
        transparent 5px
    );
    opacity: 0.35;
    mix-blend-mode: overlay;
    transform: translateX(calc(var(--mx) * -8px));
}

.specimen-holo-layer--frame {
    z-index: 24;
    inset: 12px;
    border-radius: 1.4375rem;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 22%, transparent 72%, rgba(255, 255, 255, 0.14));
    box-shadow:
        0 0 0 1px rgba(195, 151, 74, 0.12) inset,
        0 0 20px rgba(195, 151, 74, 0.14) inset;
}

@media (prefers-reduced-motion: reduce) {
    .specimen-holo-card {
        transform: none !important;
    }

    .specimen-holo-layer--animal-back,
    .specimen-holo-layer--animal-main,
    .specimen-holo-layer--animal-front,
    .specimen-holo-layer--foil,
    .specimen-holo-layer--lines,
    .specimen-holo-layer--shadow,
    .specimen-holo-layer--stars {
        transform: none !important;
    }
}

.specimen-holo-title {
    z-index: 25;
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.25rem;
    padding: 0.8rem 0.9rem;
    border-radius: 1rem;
    background: rgba(5, 8, 22, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translate(calc(var(--mx) * 14px), calc(var(--my) * 10px));
    pointer-events: none;
}

.specimen-holo-title .specimen-badge {
    display: none;
}

.specimen-holo-card__inner > .specimen-badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 30;
}

.specimen-holo-title__name {
    display: block;
    font-family: "Marcellus SC", serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    transition: color 0.2s;
}

.specimen-card__link:hover .specimen-holo-title__name {
    color: #c3974a;
}

.specimen-holo-title__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.68);
    transition: color 0.2s;
}

.specimen-card__link:hover .specimen-holo-title__cta {
    color: #c3974a;
}

.specimen-badge {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid transparent;
}

.specimen-badge--animaux {
    color: #f0d9a8;
    background: rgba(195, 151, 74, 0.18);
    border-color: rgba(195, 151, 74, 0.35);
}

.specimen-badge--plantes {
    color: #b8e0c8;
    background: rgba(45, 106, 79, 0.22);
    border-color: rgba(45, 106, 79, 0.4);
}

.specimen-badge--champignons {
    color: #f0c8a8;
    background: rgba(181, 98, 46, 0.2);
    border-color: rgba(181, 98, 46, 0.4);
}

.specimen-badge--unicellulaires {
    color: #d8c8f0;
    background: rgba(124, 107, 168, 0.2);
    border-color: rgba(124, 107, 168, 0.4);
}

.specimens-empty {
    text-align: center;
    padding: 48px 24px;
    color: rgba(255, 255, 255, 0.45);
}

/* ── Fiche specimen immersive (demo + header/footer app) ─────────────────── */

.specimen-immersive-shell {
    min-height: auto;
    background: transparent;
}

.specimen-immersive-shell > .nk-footer {
    position: relative;
    z-index: 20;
}

.specimen-entry-page {
    --entry-top: 80px;
    --entry-nav-h: 3.5rem;
    --entry-footer-space: 5rem;
    background: transparent;
    color: #e8ede9;
}

.entry-layout {
    position: relative;
    min-height: calc(100vh - var(--entry-top));
    overflow: visible;
}

.entry-stage {
    position: fixed;
    top: var(--entry-top);
    left: 0;
    width: 100vw;
    max-width: 100vw;
    bottom: 0;
    z-index: 1;
    height: calc(100vh - var(--entry-top));
    min-height: calc(100vh - var(--entry-top));
    background: transparent;
    pointer-events: none;
}

.entry-stage__canvas {
    position: absolute;
    top: var(--entry-nav-h);
    left: 0;
    z-index: 2;
    width: 100vw;
    max-width: 100vw;
    height: calc(100vh - var(--entry-top) - var(--entry-nav-h) - 1.5rem);
    touch-action: none;
    cursor: grab;
    pointer-events: auto;
}

.entry-stage__canvas:active {
    cursor: grabbing;
}

.entry-stage__watermark {
    position: absolute;
    left: 4vw;
    bottom: 8vh;
    font-family: "Marcellus SC", serif;
    font-size: clamp(8rem, 22vw, 18rem);
    line-height: 0.85;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    user-select: none;
}

.entry-stage__vignette {
    position: absolute;
    top: calc(-1 * var(--entry-top));
    left: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 35% 50%, transparent 40%, rgba(0, 0, 0, 0.35) 100%),
        linear-gradient(to right, transparent 42%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.75) 100%);
}

.entry-nav {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13rem 1.75rem 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
    pointer-events: auto;
    transition: padding 0.2s ease;
}

.entry-nav.down-link {
    padding: 13rem 1.75rem 0;
}

.entry-nav.mid-link {
    padding: 10rem 1.75rem 0;
}

.entry-nav.up-link {
    padding: 3rem 1.75rem 0;
}

.entry-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}

.entry-nav a:hover {
    color: #c3974a;
}

.entry-nav__meta {
    font-size: 0.6875rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.entry-scroll {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
    padding-bottom: var(--entry-footer-space);
}

.entry-article {
    width: 100%;
    max-width: 34rem;
    margin-top: calc(var(--entry-nav-h) + 1.5rem);
    padding: 2rem 1.75rem 2rem;
    pointer-events: auto;
}

.entry-article__inner {
    padding: 0 0 0 1.25rem;
    border-left: 2px solid var(--entry-accent, #c3974a);
}

.entry-kicker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.entry-kicker__cat {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--entry-accent, #c3974a);
}

.entry-kicker__num {
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    color: rgba(232, 237, 233, 0.35);
}

.entry-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 12;
}

.entry-title {
    font-family: "Marcellus SC", serif;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.05;
    color: #f4f7f5;
    margin: 0;
}

.entry-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(232, 237, 233, 0.75);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 12;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.entry-help-btn:hover,
.entry-help-btn:focus-visible {
    color: #c3974a;
    border-color: rgba(195, 151, 74, 0.5);
    background: rgba(195, 151, 74, 0.12);
    outline: none;
}

.entry-help-dialog {
    width: min(92vw, 22rem);
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    background: rgba(12, 12, 12, 0.96);
    color: #e8ede9;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
    z-index: 10050;
}

.entry-help-dialog::backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.entry-help-dialog__box {
    position: relative;
    padding: 1.5rem 1.25rem 1.25rem;
}

.entry-help-dialog__close {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    padding: 0;
    font-size: 1.25rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.45);
    background: none;
    border: none;
    cursor: pointer;
}

.entry-help-dialog__close:hover {
    color: #c3974a;
}

.entry-help-dialog__title {
    margin: 0 0 1rem;
    font-family: "Marcellus SC", serif;
    font-size: 1.125rem;
    color: #f4f7f5;
}

.entry-help-dialog__list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
    line-height: 1.65;
    color: rgba(232, 237, 233, 0.72);
}

.entry-help-dialog__list li + li {
    margin-top: 0.65rem;
}

.entry-help-dialog__list strong {
    color: #c3974a;
    font-weight: 600;
}

.entry-scientific {
    font-family: "Marcellus SC", serif;
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-style: italic;
    color: rgba(232, 237, 233, 0.5);
    margin: 0.75rem 0 0;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.75rem 0 2rem;
}

.entry-tag {
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(232, 237, 233, 0.65);
    background: rgba(255, 255, 255, 0.04);
}

.entry-prose {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: rgba(232, 237, 233, 0.72);
}

.entry-prose p {
    margin: 0;
}

.entry-dropcap::first-letter {
    float: left;
    font-family: "Marcellus SC", serif;
    font-size: 3.75rem;
    line-height: 0.82;
    padding-right: 0.55rem;
    padding-top: 0.1rem;
    color: var(--entry-accent, #c3974a);
}

.entry-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding: 1.75rem 0;
    border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.entry-facts dt {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(232, 237, 233, 0.35);
    margin-bottom: 0.4rem;
}

.entry-facts dd {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: rgba(232, 237, 233, 0.7);
}

.entry-related {
    margin-top: 2.5rem;
}

.entry-related__label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(232, 237, 233, 0.35);
    margin-bottom: 1rem;
}

.entry-related__link {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}

.entry-related__link:hover {
    border-color: color-mix(in srgb, var(--entry-accent, #c3974a) 40%, transparent);
}

.entry-related__link:hover .entry-related__name {
    color: var(--entry-accent, #c3974a);
}

.entry-related__name {
    font-family: "Marcellus SC", serif;
    font-size: 1.125rem;
    color: #f4f7f5;
    transition: color 0.2s;
    margin: 0;
}

.entry-related__latin {
    font-size: 0.8125rem;
    font-style: italic;
    color: rgba(232, 237, 233, 0.4);
    margin: 0.15rem 0 0;
}

.entry-related__arrow {
    color: rgba(232, 237, 233, 0.3);
    transition: color 0.2s;
}

.entry-related__link:hover .entry-related__arrow {
    color: var(--entry-accent, #c3974a);
}

.entry-footer {
    margin-top: 3rem;
    margin-bottom: 0;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    color: rgba(232, 237, 233, 0.25);
}

@media (min-width: 768px) {
    .entry-article {
        padding: 3rem 3rem 2.5rem;
        max-width: 36rem;
    }
}

@media (min-width: 1220px) {
    .entry-layout {
        min-height: auto;
    }

    .entry-scroll {
        padding-right: clamp(2rem, 5vw, 5rem);
    }

    .entry-article {
        max-width: 28rem;
        padding-top: 2rem;
        padding-bottom: 2.5rem;
    }

    .entry-stage__vignette {
        background:
            radial-gradient(ellipse 70% 55% at 30% 48%, transparent 35%, rgba(0, 0, 0, 0.25) 100%),
            linear-gradient(to right, transparent 48%, rgba(0, 0, 0, 0.45) 68%, rgba(0, 0, 0, 0.65) 82%);
    }
}

@media (max-width: 1450px) {
    .specimen-entry-page {
        --entry-footer-space: 6rem;
    }

    .entry-stage {
        height: 78vh;
        min-height: 78vh;
        bottom: auto;
    }

    .entry-stage__canvas {
        height: calc(78vh - var(--entry-nav-h) - 1.5rem);
    }

    .entry-stage__vignette {
        background:
            linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.55) 78%, rgba(0, 0, 0, 0.8) 100%),
            radial-gradient(ellipse 90% 60% at 50% 35%, transparent 25%, rgba(0, 0, 0, 0.35) 100%);
    }

    .entry-scroll {
        margin-top: 78vh;
        padding-bottom: var(--entry-footer-space);
        background: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, 0.85) 8rem);
    }

    .entry-article {
        margin-top: 0;
        max-width: none;
        padding-bottom: 2.5rem;
    }

    .entry-stage__watermark {
        display: none;
    }
}

