/* Blog achatbot.eu — styles publics */

.blog-hero-cat {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 0.5rem;
  padding: 0;
  width: 100%;
  overflow: visible;
}

.blog-hero-cat img {
  display: block;
  width: min(96vw, 900px);
  height: auto;
  aspect-ratio: 1024 / 558;
  object-fit: cover;
  object-position: center 42%;
  /* Même logique que le hero : fondu radial vers le fond page */
  -webkit-mask-image: radial-gradient(
    ellipse 70% 74% at 50% 46%,
    #000 16%,
    rgba(0, 0, 0, 0.88) 40%,
    rgba(0, 0, 0, 0.4) 60%,
    transparent 76%
  );
  mask-image: radial-gradient(
    ellipse 70% 74% at 50% 46%,
    #000 16%,
    rgba(0, 0, 0, 0.88) 40%,
    rgba(0, 0, 0, 0.4) 60%,
    transparent 76%
  );
}

.blog-article-cover {
  --blog-cover-width: min(96vw, 960px);
  --blog-cover-crop-top: 26%;
  --blog-cover-full-h: calc(var(--blog-cover-width) * 9 / 16);
  width: var(--blog-cover-width);
  height: calc(var(--blog-cover-full-h) * (1 - var(--blog-cover-crop-top) / 100));
  margin: 0 auto 0.5rem;
  overflow: clip;
  display: flex;
  justify-content: center;
  position: relative;
  isolation: isolate;
}

.blog-article-cover img {
  display: block;
  width: 100%;
  height: var(--blog-cover-full-h);
  max-width: none;
  object-fit: cover;
  object-position: center center;
  /* Glisse l’image vers le haut pour masquer le logo overlay (bandeau ~26 % en tête) */
  transform: translateY(calc(-1 * var(--blog-cover-full-h) * var(--blog-cover-crop-top) / 100));
  /* Pas de fondu radial : il laissait transparaître « bot.eu » sur le fond noir */
  -webkit-mask-image: radial-gradient(
    ellipse 88% 72% at 50% 78%,
    #000 28%,
    rgba(0, 0, 0, 0.92) 58%,
    transparent 88%
  );
  mask-image: radial-gradient(
    ellipse 88% 72% at 50% 78%,
    #000 28%,
    rgba(0, 0, 0, 0.92) 58%,
    transparent 88%
  );
}

.blog-list h1,
.blog-article h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--text, #f5f5f5);
  text-align: center;
}

.blog-list .blog-lead {
  text-align: center;
}

.blog-list > .container > p:not(.blog-lead) {
  text-align: center;
  color: var(--muted, #9a9a9a);
}

.blog-article .blog-sujets {
  text-align: center;
  justify-content: center;
}

.blog-article .blog-meta {
  text-align: center;
}

.blog-lead {
  color: color-mix(in srgb, var(--text, #f5f5f5) 72%, var(--muted, #9a9a9a));
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

.blog-sujets-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 0 1.75rem;
}

.blog-sujets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
}

.blog-sujet {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #ffffff 22%, transparent);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.8125rem;
  background: transparent;
}

.blog-sujets-nav .blog-sujet:hover,
.blog-sujets-nav .blog-sujet.is-active,
.blog-sujets-nav .blog-sujet[aria-current="page"] {
  background: #ffffff;
  color: #0f172a;
  border-color: #ffffff;
}

.blog-card .blog-sujet {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-article .blog-sujet {
  color: #93c5fd;
  border-color: color-mix(in srgb, #93c5fd 40%, transparent);
}

.blog-empty {
  text-align: center;
  color: var(--muted, #9a9a9a);
}

.blog-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.blog-card {
  position: relative;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-card:hover {
  background: #f6f8fb;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
}

.blog-card h2 {
  font-size: 1.125rem;
  margin: 0.5rem 0;
}

.blog-card h2 a {
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
}

/* Lien étendu : toute la tuile devient cliquable sans imbriquer d'ancres */
.blog-card h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
}

.blog-card:hover h2 a,
.blog-card h2 a:hover {
  color: var(--primary, #2563eb);
}

.blog-card:focus-within {
  background: #f6f8fb;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #2563eb) 30%, transparent);
}

.blog-card h2 a:focus-visible {
  outline: none;
}

.blog-card-cover {
  margin: -1.25rem -1.25rem 0.9rem;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
}

.blog-card-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Les liens de sujets restent cliquables au-dessus du lien étendu */
.blog-card .blog-sujets {
  position: relative;
  z-index: 1;
}

.blog-pillar {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary, #2563eb);
  margin: 0;
}

.blog-excerpt {
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.blog-meta {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0.75rem 0 0;
}

.blog-breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted, #64748b);
  margin: 2rem 0 1rem;
}

.blog-breadcrumb a {
  color: var(--primary, #2563eb);
}

.blog-article .container {
  max-width: 720px;
}

.blog-content {
  line-height: 1.75;
  font-size: 1.0625rem;
}

/* Titre resté dans le corps d'un article : jamais au niveau du titre de page. */
.blog-article .blog-content h1 {
  font-size: 1.5rem;
  line-height: 1.35;
  text-align: left;
  margin: 2.25rem 0 0.75rem;
}

.blog-content h2 {
  font-size: 1.375rem;
  margin: 2.25rem 0 0.75rem;
}

.blog-content h3 {
  font-size: 1.0625rem;
  color: color-mix(in srgb, var(--text, #f5f5f5) 82%, var(--muted, #9a9a9a));
  margin: 1.5rem 0 0.5rem;
}

.blog-content p {
  margin: 0 0 1rem;
}

.blog-content ul,
.blog-content ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.blog-content a {
  color: var(--primary, #2563eb);
}

.blog-sources,
.blog-related,
.blog-author {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.blog-author {
  font-size: 0.9375rem;
  color: var(--text-muted, #64748b);
}

.blog-list,
.blog-article {
  padding: 2rem 0 4rem;
  min-height: 60vh;
}

.blog-draft-banner {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
}
