/* ==========================================================================
   WEBIPHI — Page journal                                     wbp-journal.css
   --------------------------------------------------------------------------
   Refaite le 17/10/2026 : petites cartes en grille, filtres par catégorie
   et recherche (wbp-journal.js). Chargée par journal.html seulement.
   ========================================================================== */

/* --------------------------------------------------------------------------
   En-tête, plus bas qu'un héros : on vient ici pour lire la liste.
   -------------------------------------------------------------------------- */
.wbp-jhead{background:var(--wbp-bg-alt);border-bottom:1px solid var(--wbp-line)}
.wbp-jhead__in{padding-block:clamp(28px,4vw,48px) clamp(32px,4vw,52px)}
.wbp-jhead__in > *{max-width:820px}
.wbp-jhead h1{margin:14px 0 12px}
.wbp-jhead .wbp-lead{margin:0}

.wbp-jlist{padding-top:clamp(28px,4vw,44px)}

/* --------------------------------------------------------------------------
   Barre d'outils : recherche, puis catégories
   -------------------------------------------------------------------------- */
.wbp-jtools{display:grid;gap:16px;margin-bottom:12px}
.wbp-jtools[hidden],.wbp-jempty[hidden],.wbp-jcard[hidden]{display:none}

.wbp-jsearch{position:relative;max-width:520px}
.wbp-jsearch svg{
  position:absolute;left:16px;top:50%;width:20px;height:20px;margin-top:-10px;
  fill:none;stroke:var(--wbp-muted);stroke-width:1.8;stroke-linecap:round;pointer-events:none;
}
.wbp-jsearch input{
  width:100%;padding:14px 18px 14px 46px;
  font-family:inherit;font-size:1rem;color:var(--wbp-ink);
  background:#fff;border:1.5px solid var(--wbp-line);border-radius:999px;
  transition:border-color .18s, box-shadow .18s;
}
.wbp-jsearch input::placeholder{color:var(--wbp-muted)}
.wbp-jsearch input:focus{outline:none;border-color:var(--wbp-brand);box-shadow:0 0 0 3px rgba(106,7,25,.12)}
.wbp-jsearch input:focus-visible{outline:3px solid var(--wbp-brand-mid);outline-offset:1px}

/* Les pastilles défilent horizontalement sur téléphone plutôt que de
   s'empiler sur quatre lignes au-dessus des articles. */
.wbp-jcats{
  display:flex;gap:8px;overflow-x:auto;padding:4px 2px 6px;
  scrollbar-width:thin;
}
@media (min-width:860px){.wbp-jcats{flex-wrap:wrap;overflow:visible}}
.wbp-jcats button{
  flex:none;display:inline-flex;align-items:center;gap:7px;
  padding:9px 15px;border-radius:999px;cursor:pointer;
  font-family:inherit;font-size:.9375rem;font-weight:500;line-height:1.2;
  background:#fff;color:var(--wbp-ink-2);border:1.5px solid var(--wbp-line);
  transition:background .18s, border-color .18s, color .18s;
}
.wbp-jcats button span{
  min-width:22px;padding:2px 6px;border-radius:999px;
  background:var(--wbp-bg-alt);color:var(--wbp-muted);
  font-size:.75rem;font-weight:600;text-align:center;
}
.wbp-jcats button:hover{border-color:var(--wbp-brand-mid);color:var(--wbp-ink)}
.wbp-jcats button[aria-pressed="true"]{background:var(--wbp-brand);border-color:var(--wbp-brand);color:#fff}
.wbp-jcats button[aria-pressed="true"] span{background:rgba(255,255,255,.18);color:#fff}
.wbp-jcats button.is-empty:not([aria-pressed="true"]){color:var(--wbp-muted)}

.wbp-jcount{margin:0 0 20px;font-size:.875rem;color:var(--wbp-muted);min-height:1.4em}

/* --------------------------------------------------------------------------
   Grille de petites cartes : 4 par ligne sur grand écran
   -------------------------------------------------------------------------- */
.wbp-jgrid{list-style:none;margin:0;padding:0;display:grid;gap:20px}
@media (min-width:560px){.wbp-jgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:860px){.wbp-jgrid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:1200px){.wbp-jgrid{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Lien étiré sur le titre : un seul lien par carte au clavier. */
.wbp-jcard{
  position:relative;display:flex;flex-direction:column;
  background:#fff;border:1px solid var(--wbp-line);border-radius:var(--wbp-radius);
  overflow:hidden;transition:translate .25s var(--wbp-ease);
}
.wbp-jcard img{display:block;width:100%;height:auto;aspect-ratio:16 / 10;object-fit:cover}
.wbp-jcard__body{display:flex;flex-direction:column;gap:8px;flex:1;padding:16px 18px 18px}
.wbp-jcard__cat{
  font-size:.6875rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;
  color:var(--wbp-brand-mid);
}
.wbp-jcard h3{margin:0;font-size:1.0625rem;line-height:1.35;text-wrap:balance}
.wbp-jcard h3 a{color:var(--wbp-ink)}
.wbp-jcard h3 a::after{content:'';position:absolute;inset:0;z-index:1}
.wbp-jcard h3 a:focus-visible{outline:none}
.wbp-jcard:focus-within{outline:2px solid var(--wbp-brand-mid);outline-offset:3px}
/* Résumé coupé à deux lignes : les cartes gardent la même hauteur. */
.wbp-jcard p{
  margin:0;font-size:.9375rem;line-height:1.5;color:var(--wbp-ink-2);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.wbp-jcard__meta{display:block;margin-top:auto;padding-top:6px;font-size:.8125rem;color:var(--wbp-muted)}

@media (hover:hover) and (pointer:fine){
  .wbp-jcard:hover{translate:0 -3px;box-shadow:var(--wbp-shadow-m)}
  .wbp-jcard:hover h3 a{color:var(--wbp-brand)}
}

/* --------------------------------------------------------------------------
   Aucun résultat
   -------------------------------------------------------------------------- */
.wbp-jempty{
  display:flex;flex-direction:column;align-items:flex-start;gap:16px;
  padding:28px;border:1px dashed var(--wbp-line);border-radius:var(--wbp-radius);
}
.wbp-jempty p{margin:0;color:var(--wbp-ink-2)}
.wbp-jempty b{color:var(--wbp-ink)}
.wbp-jempty .wbp-btn{min-height:44px;padding:10px 20px;font-size:.9375rem}

@media (prefers-reduced-motion:reduce){
  .wbp-jcard,.wbp-jcats button,.wbp-jsearch input{transition:none}
  .wbp-jcard:hover{translate:none}
}

/* --------------------------------------------------------------------------
   Téléphone : carte en ligne, vignette à gauche
   Une colonne de cartes à image pleine largeur ferait un écran par article.
   En ligne, on en voit quatre ou cinq d'un coup d'œil.
   -------------------------------------------------------------------------- */
@media (max-width:559px){
  .wbp-jgrid{gap:12px}
  .wbp-jcard{display:grid;grid-template-columns:104px minmax(0,1fr);align-items:stretch}
  .wbp-jcard img{height:100%;aspect-ratio:auto;min-height:104px}
  .wbp-jcard__body{gap:5px;padding:12px 14px}
  .wbp-jcard h3{font-size:1rem}
  .wbp-jcard p{display:none}
  .wbp-jcard__meta{padding-top:2px}
}
