/**
 * File: carnet-rouge.css
 * Theme: Mehrle (enfant PIP'N'HUB)
 * Description: Style de la bulle d'accroche aléatoire en en-tête des articles
 *              de la catégorie "carnet-rouge". Le corps de page (contenu WP)
 *              n'est pas concerné par ce fichier.
 */

.cr-hero {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 40px 24px 32px;
  text-align: center;
  margin-bottom: var(--space-lg, 24px);
}

.cr-hero-bubble-row {
  display: grid;
  grid-template-columns: 68px 1fr 68px;
  align-items: start;
  gap: 14px;
  min-height: 240px;
  max-width: 680px;
  margin: 0 auto;
}

.cr-avatar-slot.left  { grid-column: 1; grid-row: 1; align-self: start; justify-self: start; }
.cr-avatar-slot.right { grid-column: 3; grid-row: 1; align-self: start; justify-self: end; }

.cr-hero-bubble-row.elle .cr-avatar-slot.right { visibility: hidden; }
.cr-hero-bubble-row.homme .cr-avatar-slot.left { visibility: hidden; }

.cr-bubble-stack {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 520px;
  align-self: start;
}

.cr-bubble-stack.elle  { align-items: flex-start; }
.cr-bubble-stack.homme { align-items: flex-end; }

.cr-bubble {
  position: relative;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.1px;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cr-bubble .cr-who {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.6;
  margin-bottom: 3px;
}

.cr-bubble .cr-time {
  display: block;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.45;
  margin-top: 4px;
  text-align: right;
}

.cr-bubble.elle {
  background: #ffd6e8;
  color: #7a1750;
  border-bottom-left-radius: 4px;
}

.cr-bubble.homme {
  background: #cfe8ff;
  color: #123a63;
  border-bottom-right-radius: 4px;
}

.cr-bubble.elle::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -6px;
  width: 12px;
  height: 12px;
  background: #ffd6e8;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.cr-bubble.homme::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -6px;
  width: 12px;
  height: 12px;
  background: #cfe8ff;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.cr-bubble + .cr-bubble {
  margin-top: -2px;
}

.cr-hero-nav {
  margin-top: 20px;
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.cr-hero-nav span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
}

.cr-hero-nav span:focus-visible {
  outline: 2px solid #999;
  outline-offset: 2px;
}

.cr-hero-nav span.active {
  background: #999;
}

.cr-hero-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.cr-avatar-slot {
  display: flex;
}

@media (max-width: 480px) {
  .cr-hero-bubble-row {
    grid-template-columns: 44px 1fr 44px;
    gap: 8px;
  }
  .cr-hero-avatar {
    width: 40px;
    height: 40px;
  }
}