/* Page des cahiers (refonte validée le 2026-11-19) : cartes alignées, vrai bouton d'achat, bandeau.
   Couleurs du site : brique rgb(176, 73, 50) des prix, vert sauge rgb(148, 175, 142) du compteur de panier. */

.tc-financement { font-weight: 500; color: rgb(176, 73, 50); }

.tc-bandeau {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 0;
  margin: 4px 0 18px; padding: 8px 6px; text-align: center; font-size: .92rem; color: #4e342e;
  border-top: 1px solid #eadfd4; border-bottom: 1px solid #eadfd4;
}
.tc-bandeau span + span::before { content: "\00B7";  /* · (échappé) */ margin: 0 .55em; color: rgb(176, 73, 50); font-weight: 700; }

/* Grille : 2 colonnes sur mobile, 3 sur tablette, 4 sur ordinateur. Chaque carte occupe 6 rangées
   partagées (subgrid) : titres, auteurs, prix et boutons alignés d'une carte à l'autre. */
.tc-cartes {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; row-gap: 30px;
  margin: 0 0 30px;
}
@media only screen and (min-width: 601px) { .tc-cartes { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 22px; } }
@media only screen and (min-width: 993px) { .tc-cartes { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; row-gap: 38px; } }

.tc-carte {
  display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 6px;
  text-align: center; min-width: 0;
}
@supports not (grid-template-rows: subgrid) {
  .tc-carte { display: flex; flex-direction: column; gap: 6px; }
  .tc-carte-actions { margin-top: auto; }
}
.tc-carte p { margin: 0; }
.tc-carte-couv { display: block; align-self: start; transition: box-shadow .25s; }
.tc-carte-couv:hover { box-shadow: 0 6px 14px rgba(0, 0, 0, .22); }
.tc-carte-couv img { display: block; width: 100%; height: auto; }

.tc-carte-titre { margin: 4px 0 0; font-size: 1rem; font-weight: 500; line-height: 1.3; text-align: center; }
.tc-carte-titre a { color: #000; }
.tc-carte-titre a:hover { color: rgb(176, 73, 50); }
.tc-carte-auteur { font-size: .95rem; color: #333; }
.tc-carte-resume { display: block; color: #5f5f5f; text-align: center; }
.tc-resume-texte {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  font-size: .86rem; line-height: 1.35;
}
.tc-resume-lien { display: block; margin-top: 3px; font-size: .9rem; font-weight: 500; color: rgb(176, 73, 50); }
.tc-carte-resume:hover .tc-resume-texte { color: #333; }
.tc-carte-resume:hover .tc-resume-lien { text-decoration: underline; text-underline-offset: 3px; }
.tc-carte-prix { font-size: 1rem; align-self: end; }

.tc-carte-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tc-carte-actions form { width: 100%; }
/* Bouton d'achat : brique et arrondi (variante A validée le 2026-11-19) ; après l'ajout, vert sauge du compteur
   de panier. « !important » : master.css impose le vert sauge à tous les .btn (« .btn { background-color: #94af8e !important } »). */
.tc-ajouter-btn.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; max-width: 230px; height: auto; min-height: 36px; padding: 7px 14px; line-height: 1.25;
  white-space: normal; text-transform: none; font-size: .92rem; letter-spacing: .2px;
  border-radius: 90px; background-color: rgb(176, 73, 50) !important; color: #fff;
}
.tc-ajouter-btn.btn:hover, .tc-ajouter-btn.btn:focus { background-color: rgb(150, 58, 38) !important; }
.tc-icone-panier { flex: none; }
.tc-ajouter-btn.btn.tc-ajoute { background-color: rgb(148, 175, 142) !important; color: #fff; }
.tc-ajouter-btn.btn.tc-ajoute:hover, .tc-ajouter-btn.btn.tc-ajoute:focus { background-color: rgb(128, 156, 122) !important; }
.tc-ajoute .tc-icone-panier { display: none; }
.tc-epuise { padding: 7px 0; color: #757575; font-style: italic; }

@media only screen and (max-width: 600px) {
  .tc-bandeau { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: .84rem; line-height: 1.3; }
  .tc-bandeau span + span::before { content: none; }
  .tc-carte-titre { font-size: .95rem; }
  .tc-resume-texte { font-size: .82rem; }
  .tc-ajouter-btn.btn { font-size: .84rem; padding: 6px 8px; }
}
