/**
 * Styles de base des pages d'archives (hub + jour).
 *
 * Volontairement neutre : sert de socle, l'integration fine au theme se fera ensuite.
 * Toutes les regles sont prefixees .pxn-archives pour eviter les collisions.
 */

/* ---------- Conteneur commun ---------- */
.pxn-archives {
    margin: 0 auto;
    padding: 24px 16px;
    max-width: 1080px;
}

.pxn-archives__inner {
    width: 100%;
}

.pxn-archives__title {
    margin: 0 0 24px;
    font-size: 1.8rem;
    line-height: 1.2;
}

.pxn-archives__empty {
    color: #666;
}

/* ---------- Hub : grille de mois en cards ---------- */
.pxn-archives__year {
    margin-bottom: 32px;
}

.pxn-archives__year-title {
    margin: 0 0 12px;
    font-size: 1.3rem;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 6px;
}

.pxn-archives__months-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.pxn-archives__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 72px;
    padding: 10px 8px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: #fafafa;
    /* pas de couleur imposee : l'ancre reprend la couleur de lien <a> du theme */
    text-decoration: none;
    text-align: center;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

a.pxn-archives__card:hover {
    border-color: #b9b9b9;
    background: #fff;
    transform: translateY(-1px);
}

.pxn-archives__card-month {
    font-weight: 600;
    text-transform: capitalize;
    font-size: .95rem;
    color: #000;
}

.pxn-archives__card-count {
    /* pastille ronde, taille fixe, fond colore, texte blanc */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--pxn-count-bg, #2563eb);
    color: #fff;
    font-size: .72rem;
    font-weight: bold;
    line-height: 1;
}

.pxn-archives__card--empty {
    background: #f3f3f3;
    color: #b3b3b3;
    border-style: dashed;
    cursor: default;
}

.pxn-archives__card--empty .pxn-archives__card-month {
    color: #b3b3b3;
}

.pxn-archives__card--empty .pxn-archives__card-count {
    background: #e0e0e0;
    color: #fff;
}

/* ---------- Jour : bloc de sujets ---------- */
.pxn-archives__topics {
    margin: 0 0 20px;
    color: #555;
    font-size: .95rem;
    line-height: 1.6;
}

/* ---------- Jour : barre de navigation ---------- */
.pxn-archives-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 28px;
    padding: 16px 18px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fafafa;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.pxn-archives-nav__home {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.pxn-archives-nav__home:hover {
    background: #1a1a1a;
    color: #fff;
}

.pxn-archives-nav__field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.pxn-archives-nav__label {
    color: #888;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.pxn-archives-nav__field select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    font-size: .9rem;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.pxn-archives-nav__field select:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .06);
}

.pxn-archives-nav__submit {
    height: 40px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}

.pxn-archives-nav__submit:hover {
    background: #000;
}

.pxn-archives-nav__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    font-size: 1.15rem;
    line-height: 1;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}

.pxn-archives-nav__step:hover {
    border-color: #1a1a1a;
    background: #f1f1f1;
}

.pxn-archives-nav__step.is-disabled {
    color: #ccc;
    border-color: #eee;
    background: #fafafa;
    pointer-events: none;
}

/* ---------- Jour : liste des articles ---------- */
.pxn-archives__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pxn-archives__item {
    padding-bottom: 18px;
    border-bottom: 1px solid #eee;
}

.pxn-archives__item-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    line-height: 1.3;
}

.pxn-archives__item-title a {
    color: #111;
    text-decoration: none;
}

.pxn-archives__item-title a:hover {
    text-decoration: underline;
}

.pxn-archives__item-excerpt {
    margin: 0 0 6px;
    color: #555;
    font-size: .95rem;
    line-height: 1.5;
}

.pxn-archives__item-date {
    display: block;
    color: #999;
    font-size: .8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 782px) {
    .pxn-archives__months-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .pxn-archives__months-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
