/* ============================================================
   Noctua – Frise chronologique
   Style élégant, sobre, adapté à l'identité de la Chapelle de la Suche
   ============================================================ */

/* ── Variables & Reset ─────────────────────────────────── */

.noctua-frise {
    --noctua-accent:      #b8860b;
    --noctua-text:        #2c2c2c;
    --noctua-bg:          #f9f6f0;
    --noctua-muted:       #999;
    --noctua-dot-size:    10px;
    --noctua-dot-current: 16px;
    --noctua-line-height: 1px;
    --noctua-font:        'Georgia', 'Times New Roman', serif;
    --noctua-font-sans:   'Helvetica Neue', Arial, sans-serif;
    --noctua-transition:  0.25s ease;

    width: 100%;
    background: var(--noctua-bg);
    padding: 28px 24px 24px;
    box-sizing: border-box;
    overflow: hidden;
}

.noctua-frise *,
.noctua-frise *::before,
.noctua-frise *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Track (contient ligne + items) ───────────────────── */

.noctua-frise__track {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    width: 100%;
}

/* ── Ligne horizontale ────────────────────────────────── */

.noctua-frise__line {
    position: absolute;
    top: calc(var(--noctua-dot-current) / 2 - var(--noctua-line-height) / 2);
    left: 0;
    right: 0;
    height: var(--noctua-line-height);
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--noctua-accent) 8%,
        var(--noctua-accent) 92%,
        transparent 100%
    );
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

/* ── Liste des items ──────────────────────────────────── */

.noctua-frise__items {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    list-style: none;
    width: 100%;
    gap: 0;
}

/* ── Item individuel ──────────────────────────────────── */

.noctua-frise__item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* ── Lien ─────────────────────────────────────────────── */

.noctua-frise__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--noctua-text);
    gap: 10px;
    width: 100%;
    padding: 0 6px;
    transition: opacity var(--noctua-transition);
}

.noctua-frise__link:hover {
    opacity: 1 !important;
}

/* ── Pastille ─────────────────────────────────────────── */

.noctua-frise__dot {
    width: var(--noctua-dot-size);
    height: var(--noctua-dot-size);
    border-radius: 50%;
    background: var(--noctua-muted);
    border: 1.5px solid var(--noctua-bg);
    box-shadow: 0 0 0 1.5px var(--noctua-muted);
    transition:
        background var(--noctua-transition),
        box-shadow var(--noctua-transition),
        transform var(--noctua-transition);
    flex-shrink: 0;
}

/* Pastille — article courant */
.noctua-frise__item--current .noctua-frise__dot {
    width: var(--noctua-dot-current);
    height: var(--noctua-dot-current);
    background: var(--noctua-accent);
    box-shadow: 0 0 0 2px var(--noctua-bg), 0 0 0 3.5px var(--noctua-accent);
}

/* Pastille — passé */
.noctua-frise__item--past .noctua-frise__dot {
    opacity: 0.4;
}

/* Pastille — hover */
.noctua-frise__item:not(.noctua-frise__item--current) .noctua-frise__link:hover .noctua-frise__dot {
    background: var(--noctua-accent);
    box-shadow: 0 0 0 1.5px var(--noctua-bg), 0 0 0 3px var(--noctua-accent);
    opacity: 1;
    transform: scale(1.15);
}

/* ── Méta-infos (sous la pastille) ───────────────────── */

.noctua-frise__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3px;
    width: 100%;
}

/* Date */
.noctua-frise__date {
    font-family: var(--noctua-font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--noctua-accent);
    line-height: 1.2;
    white-space: nowrap;
}

/* Catégorie */
.noctua-frise__cat {
    font-family: var(--noctua-font-sans);
    font-size: 0.60rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--noctua-muted);
    line-height: 1.2;
}

/* Titre */
.noctua-frise__title {
    font-family: var(--noctua-font);
    font-size: 0.78rem;
    font-style: italic;
    color: var(--noctua-text);
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 120px;
}

/* États atténués */
.noctua-frise__item--past .noctua-frise__meta {
    opacity: 0.5;
}

.noctua-frise__item--current .noctua-frise__date {
    color: var(--noctua-accent);
    font-weight: 700;
}

.noctua-frise__item--current .noctua-frise__title {
    color: var(--noctua-text);
    opacity: 1;
    font-weight: 400;
}

.noctua-frise__item:not(.noctua-frise__item--current) .noctua-frise__link:hover .noctua-frise__meta {
    opacity: 1;
}

/* ── Indicateurs de débordement (···) ─────────────────── */

.noctua-frise__overflow {
    display: flex;
    align-items: center;
    padding: 0 8px;
    flex-shrink: 0;
    padding-top: 3px; /* aligner avec le centre de la pastille */
}

.noctua-frise__dots {
    font-family: var(--noctua-font-sans);
    font-size: 1rem;
    color: var(--noctua-muted);
    letter-spacing: 0.1em;
    line-height: 1;
    opacity: 0.5;
}

/* ── État vide ────────────────────────────────────────── */

.noctua-frise--empty {
    text-align: center;
    font-family: var(--noctua-font-sans);
    font-size: 0.85rem;
    color: var(--noctua-muted);
    padding: 20px;
}

/* ── Responsive ───────────────────────────────────────── */

/* Tablette : légèrement plus compact */
@media (max-width: 768px) {
    .noctua-frise {
        padding: 20px 12px 16px;
    }

    .noctua-frise__title {
        font-size: 0.72rem;
        max-width: 90px;
    }

    .noctua-frise__date {
        font-size: 0.62rem;
    }

    .noctua-frise__cat {
        font-size: 0.56rem;
    }
}

/* Mobile : masquer titre et catégorie sur les items non-courant,
   ne garder que date + pastille pour éviter l'écrasement */
@media (max-width: 480px) {
    .noctua-frise {
        padding: 16px 8px 12px;
    }

    .noctua-frise__item:not(.noctua-frise__item--current) .noctua-frise__cat,
    .noctua-frise__item:not(.noctua-frise__item--current) .noctua-frise__title {
        display: none;
    }

    .noctua-frise__item--current .noctua-frise__title {
        max-width: 80px;
    }

    .noctua-frise__dots {
        font-size: 0.8rem;
    }
}
