/* HumanitaireHub — liste d'offres [hh_liste] (3.32.0) : filtres, onglets, trois modes d'affichage */

.hh-liste { max-width: 1000px; margin: 0 auto; padding: 8px 16px 40px; font-family: var(--hh-font, inherit); color: var(--hh-text, #1E293B); }
.hh-liste__titre { margin: 8px 0 18px; font-size: 1.9rem; line-height: 1.2; }

/* ── Barre de recherche et filtres ── */
.hh-lf { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.hh-lf__recherche { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--hh-border, #E2E8F0); border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--hh-shadow-md, 0 4px 6px rgba(0,0,0,.07)); }
.hh-lf__recherche input[type="search"] { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1rem; padding: 10px 4px; color: inherit; }
.hh-lf__recherche button { border: 0; background: var(--hh-cta, #F5B83D); color: var(--hh-cta-text, #1f2937); font-weight: 700; padding: 11px 22px; border-radius: 999px; cursor: pointer; font-size: .95rem; }
.hh-lf__recherche button:hover { filter: brightness(.95); }
.hh-lf__recherche:focus-within { box-shadow: 0 0 0 3px var(--hh-primary-light, #E0F7FA), var(--hh-shadow-md, 0 4px 6px rgba(0,0,0,.07)); }

.hh-lf__facettes { display: flex; flex-wrap: wrap; gap: 10px; }
.hh-lf__facette select, .hh-lf__tri select { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid var(--hh-border, #E2E8F0); border-radius: 999px; padding: 9px 34px 9px 16px; font-size: .92rem; color: var(--hh-text, #1E293B); max-width: 230px; cursor: pointer; }
.hh-lf__facette select:focus, .hh-lf__tri select:focus { outline: 0; border-color: var(--hh-primary, #0E7490); box-shadow: 0 0 0 3px var(--hh-primary-light, #E0F7FA); }
.hh-lf__facette select:not([value=""]):not(:has(option[value=""]:checked)) { border-color: var(--hh-primary, #0E7490); background-color: var(--hh-primary-light, #E0F7FA); font-weight: 600; }
.hh-lf__bouton-filtres { display: none; align-self: flex-start; background: #fff; border: 1px solid var(--hh-border, #E2E8F0); border-radius: 999px; padding: 9px 18px; font-weight: 600; cursor: pointer; }
.hh-lf__nb { display: inline-block; min-width: 20px; padding: 0 6px; text-align: center; border-radius: 999px; background: var(--hh-primary, #0E7490); color: #fff; font-size: .78rem; line-height: 20px; }

/* ── Onglets de période ── */
.hh-lf__onglets { display: flex; flex-wrap: wrap; gap: 8px; }
.hh-lf__onglet { position: relative; cursor: pointer; }
.hh-lf__onglet input { position: absolute; opacity: 0; pointer-events: none; }
.hh-lf__onglet span { display: inline-block; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--hh-border, #E2E8F0); font-size: .9rem; font-weight: 600; color: var(--hh-text-light, #64748B); transition: all .15s ease; }
.hh-lf__onglet:hover span { border-color: var(--hh-primary, #0E7490); color: var(--hh-primary, #0E7490); }
.hh-lf__onglet.is-actif span, .hh-lf__onglet input:checked + span { background: var(--hh-primary, #0E7490); border-color: var(--hh-primary, #0E7490); color: #fff; }
.hh-lf__onglet input:focus-visible + span { outline: 3px solid var(--hh-primary-light, #E0F7FA); outline-offset: 2px; }

/* ── Pastilles des filtres actifs ── */
.hh-lf__actifs { display: flex; flex-wrap: wrap; gap: 8px; }
.hh-lf__actifs:empty { display: none; }
.hh-lf__pastille { border: 1px solid var(--hh-primary, #0E7490); background: var(--hh-primary-light, #E0F7FA); color: var(--hh-primary-dark, #0B5D73); border-radius: 999px; padding: 5px 12px; font-size: .85rem; font-weight: 600; cursor: pointer; }
.hh-lf__pastille:hover { background: #fff; }
.hh-lf__effacer { border: 0; background: transparent; color: var(--hh-text-light, #64748B); text-decoration: underline; cursor: pointer; font-size: .85rem; padding: 5px 6px; }

/* ── Barre résultats : compte, tri, modes ── */
.hh-lf__barre { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 4px; }
.hh-lf__compte { font-weight: 700; margin-right: auto; }
.hh-lf__vues { display: inline-flex; border: 1px solid var(--hh-border, #E2E8F0); border-radius: 999px; overflow: hidden; background: #fff; }
.hh-lf__vues button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 8px 14px; cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--hh-text-light, #64748B); }
.hh-lf__vues button svg { fill: currentColor; }
.hh-lf__vues button.is-actif { background: var(--hh-primary, #0E7490); color: #fff; }
.hh-lf__vues button:not(.is-actif):hover { color: var(--hh-primary, #0E7490); }

.hh-lf__resultats { transition: opacity .2s ease; }
.hh-lf__resultats.is-chargement { opacity: .45; pointer-events: none; }
.hh-lf__go { align-self: flex-start; padding: 10px 20px; border-radius: 999px; border: 0; background: var(--hh-primary, #0E7490); color: #fff; font-weight: 700; }

/* ── Modes d'affichage ── */
.hh-vue-promo { grid-column: 1 / -1; }
.hh-jobs-grid.hh-vue-liste, .hh-jobs-grid.hh-vue-compact { display: flex; flex-direction: column; gap: 10px; }
.hh-vue-liste .hh-vue-promo, .hh-vue-compact .hh-vue-promo { margin: 6px 0; }

.hh-row { background: #fff; border: 1px solid var(--hh-border, #E2E8F0); border-radius: var(--hh-radius, 12px); transition: box-shadow .15s ease, border-color .15s ease; border-left-width: 4px; }
.hh-row:hover { box-shadow: var(--hh-shadow-md, 0 4px 6px rgba(0,0,0,.07)); border-color: var(--hh-primary, #0E7490); }
.hh-row.hh-deadline--urgent { border-left-color: var(--hh-danger, #EF4444); }
.hh-row.hh-deadline--warning { border-left-color: var(--hh-warning, #F59E0B); }
.hh-row.hh-deadline--ok { border-left-color: var(--hh-success, #10B981); }
.hh-row.hh-deadline--unknown, .hh-row.hh-deadline--expired { border-left-color: var(--hh-border, #E2E8F0); }
.hh-row__lien { display: grid; align-items: center; text-decoration: none; color: inherit; }
.hh-row__titre { font-weight: 700; color: var(--hh-text, #1E293B); }
.hh-row__nouveau { font-style: normal; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--hh-menthe, #2DD4BF); color: #073b3a; padding: 2px 7px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.hh-row__delai { display: inline-block; font-weight: 800; font-size: .82rem; padding: 4px 10px; border-radius: 999px; background: #F1F5F9; color: var(--hh-text-light, #64748B); white-space: nowrap; }
.hh-row__delai.hh-deadline--urgent { background: #FEE2E2; color: #B91C1C; }
.hh-row__delai.hh-deadline--warning { background: #FEF3C7; color: #B45309; }
.hh-row__delai.hh-deadline--ok { background: #D1FAE5; color: #047857; }

/* liste : vignette, corps, colonne de droite */
.hh-row--liste .hh-row__lien { grid-template-columns: 56px 1fr auto; gap: 16px; padding: 14px 18px; }
.hh-row__vignette { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--hh-border, #E2E8F0); background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hh-row__vignette img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 4px; }
.hh-row__initiale { font-weight: 800; font-size: 1.3rem; color: var(--hh-primary, #0E7490); }
.hh-row__corps { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hh-row--liste .hh-row__titre { font-size: 1.05rem; line-height: 1.3; }
.hh-row__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; color: var(--hh-text-light, #64748B); }
.hh-row__org-nom { font-weight: 700; color: var(--hh-primary-dark, #0B5D73); }
.hh-row__etiquette { background: #F1F5F9; border-radius: 999px; padding: 1px 9px; font-size: .78rem; }
.hh-row__droite { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hh-row__date { font-size: .8rem; color: var(--hh-text-light, #64748B); }

/* compact : une ligne */
.hh-row--compact .hh-row__lien { grid-template-columns: 200px 1fr 190px 92px; gap: 14px; padding: 9px 14px; font-size: .92rem; }
.hh-row--compact { border-radius: var(--hh-radius-sm, 8px); }
.hh-row__org { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; color: var(--hh-primary-dark, #0B5D73); }
.hh-row__org > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-row__logo { width: 24px; height: 24px; object-fit: contain; flex: none; }
.hh-row--compact .hh-row__titre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-row__lieu { color: var(--hh-text-light, #64748B); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-row--compact .hh-row__delai { justify-self: end; }

/* ── Pagination ── */
.hh-lpag { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0 8px; }
.hh-lpag__lien { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--hh-border, #E2E8F0); background: #fff; color: var(--hh-text, #1E293B); text-decoration: none; font-weight: 600; }
.hh-lpag__lien:hover { border-color: var(--hh-primary, #0E7490); color: var(--hh-primary, #0E7490); }
.hh-lpag__lien.is-active { background: var(--hh-primary, #0E7490); border-color: var(--hh-primary, #0E7490); color: #fff; }
.hh-lpag__vide { align-self: center; color: var(--hh-text-light, #64748B); }

.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* ── Téléphone ── */
@media (max-width: 760px) {
    .hh-lf__bouton-filtres { display: inline-flex; align-items: center; gap: 4px; }
    .hh-lf__facettes { display: none; flex-direction: column; }
    .hh-lf__facettes.is-ouvert { display: flex; }
    .hh-lf__facette select { max-width: none; width: 100%; }
    .hh-lf__onglets { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .hh-lf__onglet span { white-space: nowrap; }
    .hh-lf__vues button span { display: none; }
    .hh-lf__vues button { padding: 9px 13px; }
    .hh-row--liste .hh-row__lien { grid-template-columns: 44px 1fr; padding: 12px; gap: 12px; }
    .hh-row__vignette { width: 44px; height: 44px; }
    .hh-row__droite { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
    .hh-row--compact .hh-row__lien { grid-template-columns: 1fr auto; row-gap: 4px; }
    .hh-row--compact .hh-row__org { grid-column: 1 / 2; font-size: .8rem; }
    .hh-row--compact .hh-row__titre { grid-column: 1 / -1; white-space: normal; }
    .hh-row--compact .hh-row__lieu { grid-column: 1 / 2; font-size: .8rem; }
    .hh-row--compact .hh-row__delai { grid-column: 2 / 3; grid-row: 1 / 2; }
}

/* ── Surcharges du thème (3.32.0) : le thème colore tous les <button> ; on fixe nos couleurs ── */
.hh-liste .hh-lf__bouton-filtres { color: var(--hh-text, #1E293B); background: #fff; border: 1px solid var(--hh-border, #E2E8F0); font-size: .95rem; line-height: 1.2; }
.hh-liste .hh-lf__vues button { color: var(--hh-text-light, #64748B); background: transparent; }
.hh-liste .hh-lf__vues button.is-actif { color: #fff; background: var(--hh-primary, #0E7490); }
.hh-liste .hh-lf__pastille { color: var(--hh-primary-dark, #0B5D73); background: var(--hh-primary-light, #E0F7FA); }
.hh-liste .hh-lf__effacer { color: var(--hh-text-light, #64748B); background: transparent; }
.hh-liste .hh-lf__recherche button { color: var(--hh-cta-text, #1f2937); background: var(--hh-cta, #F5B83D); }
@media (max-width: 760px) {
    .hh-lf__recherche { padding-left: 14px; }
    .hh-liste .hh-lf__recherche button { padding: 10px 14px; font-size: .88rem; }
    .hh-lf__recherche input[type="search"] { font-size: .95rem; }
}
