/*
  CSS Bootstrap 5 pour le module psblog (Actualités), thème "kerisac".
  Remplace entièrement modules/psblog/views/css/psblog.css (Bootstrap 3/
  PS1.6, classes obsolètes) — voir PsBlogHelper::loadMedia() pour le
  mécanisme de bascule (déclenché par la présence de themes/kerisac/css/
  modules/psblog/assets/psblog.css). Palette et langage visuel repris de
  modules/kerisachomeblocks (image à coin découpé, bouton pilule doré) pour
  rester cohérent avec le reste du site.
*/

:root{
  --kte-ink:#211811; --kte-paper:#FCFAF4; --kte-gold:#B8863B; --kte-oxblood:#BE281E;
}

.page-content--blog{
  max-width:1320px; margin:0 auto; padding:32px 30px 56px;
}

/* Barre de catégories (chips horizontales, remplace la sidebar d'origine) */
.kerisac-blog-categories{
  margin-bottom:28px; overflow-x:auto; -webkit-overflow-scrolling:touch;
}
.kerisac-blog-categories ul{
  list-style:none; margin:0; padding:0; display:flex; gap:.5rem; flex-wrap:nowrap;
}
.kerisac-blog-categories ul ul{ display:none; } /* sous-catégories cachées, on garde une seule rangée */
.kerisac-blog-categories li{ flex:0 0 auto; }
.kerisac-blog-categories li a{
  display:inline-flex; align-items:center; padding:8px 18px; border-radius:999px;
  background:rgba(33,24,17,.05); color:var(--kte-ink); text-decoration:none;
  font-size:13px; font-weight:600; white-space:nowrap; transition:background .2s,color .2s;
}
.kerisac-blog-categories li a span{ pointer-events:none; }
.kerisac-blog-categories li a:hover,
.kerisac-blog-categories li.selected a{
  background:var(--kte-gold); color:var(--kte-paper);
}

/* Grille d'articles (listing, catégorie, accueil, articles liés) */
.kerisac-blog-grid{
  display:grid; grid-template-columns:repeat(1,1fr); gap:2rem 1.75rem; margin-bottom:2.5rem;
}
@media (min-width:576px){
  .kerisac-blog-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (min-width:992px){
  .kerisac-blog-grid{ grid-template-columns:repeat(3,1fr); }
}
.kerisac-blog-grid--subcategories{ margin-bottom:1.5rem; }

/* Carte article — au repos, juste la photo (coin découpé) et le texte, sans
   fond ni ombre : le "card" n'apparaît qu'au survol (pseudo-élément
   positionné en absolu, débordant du contenu réel via des insets négatifs)
   pour ne pas alourdir la grille visuellement et ne provoquer aucun
   redimensionnement/reflow des cartes voisines quand il apparaît — même
   logique que le survol de .product-miniature__inner (thème, voir
   _product-miniature.scss) : une ombre portée qui monte la carte, plus un
   léger zoom sur la photo. */
.kerisac-blog-card{
  position:relative; z-index:0;
  display:flex; flex-direction:column; text-decoration:none; color:inherit;
}
.kerisac-blog-card::before{
  content:''; position:absolute; inset:-16px -16px -20px; z-index:-1;
  background:var(--kte-paper); border-radius:14px;
  opacity:0; box-shadow:0 0 0 rgba(33,24,17,0);
  transition:opacity .3s ease, box-shadow .3s ease;
}
.kerisac-blog-card:hover::before{
  opacity:1; box-shadow:0 14px 30px rgba(33,24,17,.18);
}
.kerisac-blog-card__photo{
  display:block; aspect-ratio:4/3; overflow:hidden; background:rgba(33,24,17,.05);
  border-radius:0 0 64px 0;
}
.kerisac-blog-card__photo img{
  width:100%; height:100%; object-fit:cover; display:block;
  transition:transform .4s ease;
}
.kerisac-blog-card:hover .kerisac-blog-card__photo img{
  transform:scale(1.06);
}
.kerisac-blog-card__body{
  display:flex; flex-direction:column; gap:6px; margin-top:14px;
}
.kerisac-blog-card__date{
  font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--kte-gold); font-weight:700;
}
.kerisac-blog-card__title{
  position:relative; z-index:2;
  font-size:17px; font-weight:700; margin:0; line-height:1.3;
}
.kerisac-blog-card__title a{ color:var(--kte-ink); text-decoration:none; }
.kerisac-blog-card__title a:hover{ color:var(--kte-gold); }
.kerisac-blog-card__excerpt{
  font-size:14px; color:rgba(33,24,17,.7); line-height:1.55; margin:0;
}
.kerisac-blog-card__cta{
  position:relative; z-index:2;
  display:inline-flex; align-items:center; justify-content:center; align-self:flex-start;
  margin-top:6px; padding:9px 22px; border:none; border-radius:999px;
  background:var(--kte-gold); color:var(--kte-paper);
  font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.06em;
  text-decoration:none; white-space:nowrap; cursor:pointer;
  box-shadow:0 5px 12px 2px rgba(30,33,70,.44);
  transition:background .2s;
}
.kerisac-blog-card__cta:hover{ background:var(--kte-oxblood); color:var(--kte-paper); }

/* Lien invisible étiré sur toute la carte (voir le commentaire dans
   _grid_blog.tpl) : z-index intermédiaire, sous le titre et le bouton
   "Lire" (z-index:2, restent survolables/cliquables individuellement) mais
   au-dessus de la photo et du reste du contenu normal (auto), qui devient
   cliquable via ce lien plutôt que via son propre <a>. */
.kerisac-blog-card__stretched-link{
  position:absolute; inset:0; z-index:1;
}

/* Pagination */
.kerisac-blog-pagination{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:16px; margin-top:8px; text-align:center;
}
.kerisac-blog-pagination__count{ font-size:13px; color:rgba(33,24,17,.6); }
.kerisac-blog-pagination .pagination{ margin:0; }

/* Page article — la photo mord sur le padding latéral de .page-content--blog
   (30px, voir plus haut) pour occuper toute la largeur du conteneur au lieu
   d'être encadrée par le fond de la page (demande client 2026-09-04). */
.page-content--blog-single .kerisac-blog-article__photo{
  margin-left:-30px; margin-right:-30px;
}
.kerisac-blog-article__photo{
  aspect-ratio:16/7; overflow:hidden; border-radius:0 0 64px 0; margin-bottom:24px;
  background:rgba(33,24,17,.05);
}
.kerisac-blog-article__photo img{ width:100%; height:100%; object-fit:cover; display:block; }
.kerisac-blog-article__date{
  display:block; font-size:12px; text-transform:uppercase; letter-spacing:.06em;
  color:var(--kte-gold); font-weight:700; margin-bottom:12px;
}
.kerisac-blog-article__content{ line-height:1.7; }
.kerisac-blog-article__lead{ font-size:17px; font-weight:600; color:var(--kte-ink); }
.kerisac-blog-article__video{ margin:24px 0; }
.kerisac-blog-article__video iframe{ max-width:100%; }

.kerisac-blog-article__tags{
  display:flex; flex-wrap:wrap; gap:8px; margin:24px 0;
}
.kerisac-blog-tag{
  display:inline-flex; padding:6px 14px; border-radius:999px; background:rgba(33,24,17,.05);
  color:var(--kte-ink); font-size:12px; text-decoration:none;
}
.kerisac-blog-tag:hover{ background:var(--kte-gold); color:var(--kte-paper); }

.kerisac-blog-share{ display:flex; align-items:center; gap:10px; margin:24px 0; }
.kerisac-blog-share__label{ font-size:13px; font-weight:600; color:var(--kte-ink); margin-right:4px; }
.kerisac-blog-share__link{
  display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px;
  border-radius:50%; background:rgba(33,24,17,.05); color:var(--kte-ink); text-decoration:none;
}
.kerisac-blog-share__link:hover{ background:var(--kte-gold); color:var(--kte-paper); }

.kerisac-blog-related{ margin-top:40px; padding-top:32px; border-top:1px solid rgba(33,24,17,.1); }
.kerisac-blog-related__title{ font-size:20px; font-weight:700; margin-bottom:20px; color:var(--kte-ink); }

/* Commentaires */
.kerisac-blog-comments{ margin-top:40px; padding-top:32px; border-top:1px solid rgba(33,24,17,.1); }
.kerisac-blog-comments__title{ font-size:20px; font-weight:700; margin-bottom:20px; color:var(--kte-ink); }
.kerisac-blog-comments__form{ margin-top:32px; max-width:640px; }
.kerisac-blog-comments__captcha img{ display:block; margin-bottom:8px; max-height:60px; }
.comment-message{ margin-bottom:16px; }

.kerisac-blog-comment{ display:flex; gap:14px; padding:16px 0; border-bottom:1px solid rgba(33,24,17,.08); }
.kerisac-blog-comment__avatar{ width:48px; height:48px; border-radius:50%; flex-shrink:0; }
.kerisac-blog-comment__meta{ display:flex; gap:10px; align-items:baseline; margin-bottom:4px; }
.kerisac-blog-comment__author{ font-weight:700; font-size:14px; color:var(--kte-ink); }
.kerisac-blog-comment__date{ font-size:12px; color:rgba(33,24,17,.5); }
.kerisac-blog-comment__content{ font-size:14px; line-height:1.6; }

/* Widget accueil */
.kerisac-blog-home{ max-width:1320px; margin:0 auto; padding:44px 30px 56px; }
.kerisac-blog-home__title{
  display:inline-block; font-family:"KerisacLibra", serif; font-size:24px;
  font-weight:400; text-transform:uppercase; letter-spacing:.03em;
  color:var(--kte-ink); margin-bottom:24px;
  text-decoration:underline; text-decoration-color:#B8863B; text-underline-offset:.3em;
}
.kerisac-blog-home .kerisac-blog-grid{ margin-bottom:0; }
