/**
 * Culmine — Blog
 *
 * Variables réglables depuis le shortcode, par des attributs css_* :
 *   --cbl-colonnes      colonnes de la grille        3
 *   --cbl-ecart         gouttière                    24px
 *   --cbl-rayon         arrondi des cartes           18px
 *   --cbl-fond          fond des cartes              #ffffff
 *   --cbl-filet         contour                      #e2e6d2
 *   --cbl-titre         couleur des titres           #3d543d
 *   --cbl-texte         couleur du corps             #6b6b6b
 *   --cbl-accent        onglet actif et liens        #6e824b
 */

.cbl {
  --cbl-colonnes: 3;
  --cbl-ecart: 24px;
  --cbl-rayon: 18px;
  --cbl-fond: #ffffff;
  --cbl-filet: #e2e6d2;
  --cbl-titre: #3d543d;
  --cbl-texte: #6b6b6b;
  --cbl-accent: #6e824b;
}

/* --- le tri --- */

.cbl-tri {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}

/* Deux classes : un kit de thème habille tous les <button> et une règle à
   classe unique perd. */
.cbl .cbl-onglet {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 10px 18px;
  min-height: 0;
  border: 1px solid var(--cbl-filet);
  border-radius: 100px;
  background: transparent;
  background-image: none;
  color: var(--cbl-texte);
  cursor: pointer;
  box-shadow: none;
  text-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.cbl .cbl-onglet:hover { border-color: var(--cbl-accent); color: var(--cbl-titre); }

.cbl .cbl-onglet.cbl-ici {
  background: var(--cbl-accent);
  border-color: var(--cbl-accent);
  color: #ffffff;
}

.cbl .cbl-onglet:focus-visible { outline: 2px solid var(--cbl-accent); outline-offset: 2px; }

/* --- la grille --- */

.cbl-liste {
  display: grid;
  grid-template-columns: repeat(var(--cbl-colonnes), minmax(0, 1fr));
  gap: var(--cbl-ecart);
  align-items: stretch;
}

.cbl-carte { display: block; }
.cbl-carte[hidden] { display: none; }

.cbl-lien {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--cbl-fond);
  border: 1px solid var(--cbl-filet);
  border-radius: var(--cbl-rayon);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 14px 30px -20px rgba(61, 84, 61, .45);
  transition: transform .2s ease, box-shadow .2s ease;
}

.cbl-lien:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -22px rgba(61, 84, 61, .55);
}

.cbl-vue { display: block; }

.cbl-vue .cbl-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.cbl-corps {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
}

.cbl-haut {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--cbl-texte);
  margin-bottom: 10px;
}

.cbl-cat {
  background: rgba(110, 130, 75, .12);
  color: var(--cbl-accent);
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
}

/* Deux classes : un kit de theme habille les h1-h6 a sa taille, et une regle a
   classe unique perd — le titre de carte sortait en 34 px. */
.cbl .cbl-titre {
  font-family: Nunito, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--cbl-titre);
  margin: 0 0 9px;
}

.cbl .cbl-extrait {
  display: block;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--cbl-texte);
}

.cbl .cbl-plus-lien {
  display: block;
  margin-top: auto;
  padding-top: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cbl-accent);
}

.cbl .cbl-plus-lien::after { content: " \2192"; }

/* --- le pied --- */

.cbl-rien {
  margin: 26px 0 0;
  color: var(--cbl-texte);
}

.cbl-pied {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.cbl .cbl-plus {
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1;
  padding: 14px 28px;
  min-height: 0;
  border: 1px solid var(--cbl-accent);
  border-radius: 100px;
  background: transparent;
  background-image: none;
  color: var(--cbl-accent);
  cursor: pointer;
  box-shadow: none;
  text-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  transition: background .15s ease, color .15s ease;
}

.cbl .cbl-plus:hover { background: var(--cbl-accent); color: #ffffff; }
.cbl .cbl-plus:focus-visible { outline: 2px solid var(--cbl-accent); outline-offset: 2px; }
.cbl .cbl-plus[hidden] { display: none; }

.cbl-vide {
  padding: 14px 16px;
  border: 1px dashed #9c5b3a;
  border-radius: 8px;
  color: #9c5b3a;
  font-size: 14px;
}

@media (max-width: 1024px) { .cbl { --cbl-colonnes: 2; } }
@media (max-width: 767px) { .cbl { --cbl-colonnes: 1; --cbl-ecart: 16px; } }
