:root {
  --ink: #111;
  --ink-2: #5f5f5f;
  --ink-3: #9a9a9a;
  --line: #e7e7e7;
  --bg-soft: #f4f4f2;
  --sun: #ffd400;
  --sun-soft: #fff4b8;
  --font: "Inter", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }
/* Les règles display ci-dessous ne doivent pas annuler l'attribut hidden. */
[hidden] { display: none !important; }
body { margin: 0; background: #fff; color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 12px; }
.textlink { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.textlink:hover { color: var(--ink); }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* --- En-tête ------------------------------------------------------------- */
.hero { background: var(--ink); color: #fff; }
.nav { display: flex; justify-content: space-between; align-items: center; min-height: 72px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.logo b { font-weight: 800; color: var(--sun); }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--sun); color: var(--ink); font-weight: 900; font-size: 20px; transform: rotate(-6deg); }
.account { display: flex; align-items: center; min-height: 40px; }
.me { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.me img { border-radius: 50%; border: 2px solid var(--sun); }
.me .textlink { color: #bdbdbd; font-weight: 500; }
.me .textlink:hover { color: #fff; }
.hero-body { padding-top: 40px; padding-bottom: 44px; }
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--sun); text-transform: capitalize; }
h1 { margin: 0; font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; font-weight: 800; letter-spacing: -.035em; }
h1 mark { background: var(--sun); color: var(--ink); padding: 0 .12em; border-radius: 6px; }
.lede { margin: 20px 0 0; max-width: 640px; font-size: 18px; line-height: 1.55; color: #cfcfcf; }
.lede abbr { text-decoration: none; }
.statbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 30px; }
.stat { background: #fff; color: var(--ink); font-weight: 700; padding: 8px 14px; border-radius: 999px; font-size: 14px; }
.updated { color: #a8a8a8; font-size: 14px; }
.btn-refresh { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; background: var(--sun); color: var(--ink); border: 0; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 700; cursor: pointer; transition: transform .15s; }
.btn-refresh::before { content: "↻"; font-size: 17px; line-height: 1; }
.btn-refresh:hover:not(:disabled) { transform: translateY(-2px); }
.btn-refresh:disabled { opacity: .6; cursor: progress; }

/* --- Mise en page -------------------------------------------------------- */
.layout { display: grid; grid-template-columns: 270px 1fr; gap: 36px; padding-top: 36px; padding-bottom: 72px; align-items: start; }
.filters { position: sticky; top: 20px; background: var(--bg-soft); border-radius: var(--radius); padding: 22px 20px; font-size: 14px; max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin; }
.search { display: block; margin-bottom: 24px; }
.search input { width: 100%; border: 2px solid transparent; background: #fff; padding: 11px 14px; border-radius: 10px; font: inherit; color: var(--ink); outline: none; }
.search input:focus { border-color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }
.facet { margin-bottom: 24px; }
.facet h2 { display: flex; justify-content: space-between; align-items: baseline; }
.facet h2 .textlink { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.facet ul { list-style: none; margin: 0; padding: 0; }
.facet ul.scroll { max-height: 250px; overflow-y: auto; scrollbar-width: thin; margin-right: -6px; padding-right: 6px; }

/* Secteurs en pastilles, pays et employeurs en liste à cocher. */
#sector { display: flex; flex-wrap: wrap; gap: 6px; }
#sector button { display: inline-flex; gap: 6px; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
#sector button .n { color: var(--ink-3); font-weight: 500; }
#sector button:hover { border-color: var(--ink); }
#sector button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
#sector button.on .n { color: var(--sun); }
#sector button.zero { opacity: .45; }

#country button, #company button { display: flex; width: 100%; align-items: center; gap: 10px; background: none; border: 0; padding: 5px 4px; border-radius: 7px; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
#country button::before, #company button::before { content: ""; flex: none; width: 16px; height: 16px; border: 1.5px solid #bdbdbd; border-radius: 5px; background: #fff; }
#country button:hover, #company button:hover { background: #fff; }
#country button span:first-child, #company button span:first-child { flex: 1; }
#country button .n, #company button .n { color: var(--ink-3); font-size: 12px; }
#country button.on::before, #company button.on::before { background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5' fill='none' stroke='%23111' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--ink); }
#country button.on, #company button.on { font-weight: 700; }
#country button.zero, #company button.zero { color: var(--ink-3); }

#reset { font-size: 13px; }

/* --- Résultats ----------------------------------------------------------- */
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 16px; flex-wrap: wrap; }
#count { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sort { font-size: 14px; color: var(--ink-2); }
.sort select { margin-left: 8px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 600; color: var(--ink); padding: 7px 10px; border-radius: 9px; cursor: pointer; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.row { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "side meta" "main main"; gap: 8px 20px; padding: 20px 22px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.row:hover { border-color: var(--ink); box-shadow: 5px 5px 0 var(--sun); transform: translate(-2px, -2px); }
.row-side { grid-area: side; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.company { font-size: 13px; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; }
.date { font-size: 13px; color: var(--ink-3); }
.row-main { grid-area: main; }
.title { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; }
/* Toute la carte est cliquable via le lien du titre. */
.title a { text-decoration: none; }
.title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.new { margin-left: 10px; display: inline-block; background: var(--sun); color: var(--ink); font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; vertical-align: 3px; text-transform: uppercase; letter-spacing: .04em; }
.excerpt { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.excerpt:empty { display: none; }
.row-meta { grid-area: meta; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.place, .sector { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
.place { background: var(--ink); color: #fff; }
.sector { background: var(--sun-soft); color: var(--ink); }
.empty { padding: 70px 20px; text-align: center; font-size: 17px; font-weight: 600; color: var(--ink-2); background: var(--bg-soft); border-radius: var(--radius); }

/* --- Pied de page -------------------------------------------------------- */
.footer { background: var(--ink); color: #bdbdbd; font-size: 14px; }
.footer .kicker { color: #fff; }
.footer a { color: #fff; text-underline-offset: 3px; }
.footer a:hover { color: var(--sun); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.3fr 1.4fr .9fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.footer-grid p { margin: 0; }
.footer-title { font-size: 26px !important; font-weight: 600; color: #fff; margin-bottom: 14px !important; letter-spacing: -.02em; }
.footer-title b { color: var(--sun); font-weight: 800; }
.footer-sources { line-height: 1.75; }
.footer-links { list-style: none; margin: 0; padding: 0; line-height: 2; }
.footer-base { display: flex; justify-content: space-between; border-top: 1px solid #2c2c2c; padding-top: 18px; padding-bottom: 24px; font-size: 13px; color: #8a8a8a; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 24px; }
  .filters { position: static; max-height: none; }
  .facet ul.scroll { max-height: 170px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .row { grid-template-columns: 1fr; grid-template-areas: "side" "main" "meta"; padding: 18px; }
  .row-meta { justify-content: flex-start; }
  .btn-refresh { margin-left: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .me span { display: none; }
}
