/* ── FicheLists catalogue ── */

.fl-wrap { min-height: 60vh; }

/* Hero */
.fl-hero {
    padding: 50px 0 40px;
    background: linear-gradient(135deg, var(--card-color) 0%, color-mix(in srgb, var(--underline-color) 8%, var(--card-color)) 100%);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}
.fl-eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--underline-color);
    margin-bottom: 6px;
}
.fl-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    color: var(--title-color);
    margin: 0;
}
.fl-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--underline-color);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: opacity .15s, transform .15s;
}
.fl-btn-primary:hover { opacity: .88; transform: translateY(-1px); color: #fff; }

/* Catalog nav */
.list-catalog-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0 18px;
    padding: 8px;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.list-kind-switch,
.list-scope-switch {
    display: flex;
    align-items: center;
    gap: 6px;
}
.list-kind-switch { flex: 1 1 auto; }
.list-scope-switch {
    flex: 0 0 auto;
    padding: 4px;
    background: color-mix(in srgb, var(--p-color) 6%, transparent);
    border-radius: 8px;
}
.list-kind-link,
.list-scope-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.list-kind-link {
    gap: 10px;
    min-width: 150px;
    padding: 10px 14px;
    color: var(--p-color);
    border: 1px solid transparent;
    border-radius: 8px;
}
.list-kind-link i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--underline-color);
    background: color-mix(in srgb, var(--underline-color) 10%, transparent);
}
.list-kind-link span {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.list-kind-link strong {
    font-size: .86rem;
    color: var(--title-color);
}
.list-kind-link small {
    margin-top: 3px;
    font-size: .68rem;
    font-weight: 700;
    color: var(--p-color);
    text-transform: uppercase;
    letter-spacing: 0;
}
.list-kind-link:hover,
.list-scope-link:hover {
    background: color-mix(in srgb, var(--underline-color) 7%, transparent);
    color: var(--title-color);
}
.list-kind-link.active {
    background: color-mix(in srgb, var(--underline-color) 12%, var(--card-color));
    border-color: color-mix(in srgb, var(--underline-color) 35%, var(--border-color));
}
.list-kind-link.active i {
    color: #fff;
    background: var(--underline-color);
}
.list-scope-link {
    gap: 6px;
    padding: 8px 12px;
    border-radius: 7px;
    color: var(--p-color);
    font-size: .8rem;
    font-weight: 800;
    white-space: nowrap;
}
.list-scope-link.active {
    color: #fff;
    background: var(--underline-color);
}

/* Search + filters */
.fl-filters { display: flex; flex-direction: column; gap: 10px; }
.fl-search-wrap { position: relative; flex: 1; min-width: 180px; }
.fl-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--p-color); font-size: .88rem; }
.fl-search-input {
    width: 100%; background: var(--card-color); border: 1.5px solid var(--border-color); border-radius: 30px;
    padding: 10px 16px 10px 38px; font-size: .9rem; color: var(--title-color); font-family: inherit;
    transition: border-color .15s; box-sizing: border-box;
}
.fl-search-input:focus { outline: none; border-color: var(--underline-color); }
.fl-select {
    background: var(--card-color); border: 1.5px solid var(--border-color); border-radius: 30px;
    padding: 8px 14px; font-size: .82rem; color: var(--title-color); font-family: inherit; cursor: pointer;
    transition: border-color .15s;
}
.fl-select:focus { outline: none; border-color: var(--underline-color); }
.fl-clear {
    font-size: .8rem; font-weight: 700; color: var(--error-color); text-decoration: none;
    display: flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 20px;
    border: 1.5px solid color-mix(in srgb, var(--title-color) 15%, transparent); transition: background .15s;
}
.fl-clear:hover { background: color-mix(in srgb, #ef4444 10%, transparent); color: var(--error-color); }

.fl-community-toggle { display: inline-flex; border: 1.5px solid var(--border-color); border-radius: 30px; overflow: hidden; }
.fl-community-btn { padding: 8px 16px; font-size: .8rem; font-weight: 700; color: var(--p-color); text-decoration: none; transition: background .15s, color .15s; }
.fl-community-btn.active { background: var(--underline-color); color: #fff; }
.fl-community-btn:not(.active):hover { background: color-mix(in srgb, var(--underline-color) 8%, transparent); }

.fl-tag-chip { font-size: .65rem; padding: 2px 8px; border-radius: 20px; background: color-mix(in srgb, var(--p-color) 10%, transparent); color: var(--p-color); }

/* Card */
.fl-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.fl-card:hover { border-color: var(--underline-color); box-shadow: 0 4px 20px color-mix(in srgb, var(--underline-color) 14%, transparent); }
.fl-card-clickable { cursor: pointer; }
.fl-card-clickable:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--underline-color) 35%, transparent);
    outline-offset: 3px;
}
.fl-card-clickable:hover .fl-card-name { color: var(--underline-color); }
.fl-card-top { padding: 20px 20px 14px; flex: 1; }
.fl-card-main-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.fl-card-main-link:hover { color: inherit; }
.fl-card-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--title-color);
    margin: 0 0 6px;
    line-height: 1.3;
}
.fl-card-desc {
    font-size: .8rem;
    color: var(--p-color);
    margin: 0;
    line-height: 1.5;
}
.fl-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.fl-fcount { font-size: .76rem; color: var(--p-color); }

/* Visibility badge */
.fl-vis-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    flex-shrink: 0;
}
.fl-vis-public  { background: color-mix(in srgb, #22c55e 15%, transparent); color: #16a34a; }
.fl-vis-private { background: color-mix(in srgb, #64748b 15%, transparent); color: #475569; }
.fl-vis-password{ background: color-mix(in srgb, #f59e0b 15%, transparent); color: #b45309; }

/* Action buttons */
.fl-btn-sm {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--p-color);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.fl-btn-sm:hover { background: var(--border-color); color: var(--title-color); }
.fl-btn-del:hover { background: color-mix(in srgb, #ef4444 15%, transparent); border-color: #ef4444; color: #ef4444; }
.fl-pin-active { background: color-mix(in srgb, #f59e0b 15%, transparent) !important; border-color: #f59e0b !important; color: #f59e0b !important; }
.fl-btn-sm:has(.fa-thumbtack):hover { background: color-mix(in srgb, #f59e0b 15%, transparent); border-color: #f59e0b; color: #f59e0b; }

/* Empty state */
.fl-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--p-color);
}
.fl-empty-icon { font-size: 3rem; opacity: .35; }

/* Pagination */
.fl-pagination { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 24px; }
.fl-page-btn {
    display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px;
    border-radius: 10px; background: var(--card-color); border: 1.5px solid var(--border-color);
    font-size: .82rem; font-weight: 700; color: var(--p-color); text-decoration: none;
    transition: background .15s, border-color .15s, color .15s; padding: 0 8px;
}
.fl-page-btn:hover, .fl-page-btn.active { background: var(--underline-color); border-color: var(--underline-color); color: #fff; }
.fl-page-ellipsis { border: none; background: transparent; color: var(--p-color); cursor: default; }

@media (max-width: 768px) {
    .list-catalog-nav {
        align-items: stretch;
        flex-direction: column;
    }
    .list-kind-switch,
    .list-scope-switch {
        width: 100%;
    }
    .list-kind-link,
    .list-scope-link {
        flex: 1 1 0;
        justify-content: center;
    }
    .list-kind-link {
        min-width: 0;
        padding: 9px 10px;
    }
}

@media (max-width: 575.98px) {
    .fl-hero { padding: 28px 0 22px; }
    .fl-select { width: 100%; }
    .fl-clear { width: 100%; justify-content: center; }
    .fl-community-toggle { width: 100%; }
    .fl-community-btn { flex: 1; text-align: center; justify-content: center; }
}
