/* CoAb Lecture — éléments partagés avec tout le site :
   badge de menu, vitrine d'accueil, bouton & feuille de partage, toast. Tout est préfixé cl- pour ne jamais toucher au thème. */

.cl-scope, .coabl, .cl-showcase, .cl-panel, .cl-toast, .cl-share-pill {
  --cl-bg: #FBF8F3; --cl-surface: #FFFFFF; --cl-surface-2: #F6F1E8; --cl-ink: #1C1B1A; --cl-ink-2: #4A453E;
  --cl-muted: #6B655C; --cl-line: #ECE6DC; --cl-line-2: #DDD5C8; --cl-accent: #0F766E; --cl-accent-ink: #FFFFFF;
  --cl-accent-soft: #E7F3F1; --cl-warm: #B45309; --cl-wa: #128C4A; --cl-radius: 16px;
  --cl-serif: "Literata", Georgia, "Times New Roman", serif;
  --cl-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Badge « Nouveau » dans les menus ---------- */
.cl-menu-badge {
  display: inline-flex; align-items: center; margin-left: 6px; padding: 2px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 700; line-height: 1.4; letter-spacing: .02em; text-transform: none;
  background: #0F766E; color: #fff; vertical-align: middle; animation: cl-pop .5s ease both .4s;
}
@keyframes cl-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Vitrine page d'accueil ---------- */
.cl-showcase {
  margin: 28px auto; max-width: 1180px; padding: 22px; border-radius: 22px;
  background: #1C1B1A; color: #FBF8F3; box-sizing: border-box; overflow: hidden; position: relative;
}
.cl-showcase *, .cl-showcase *::before, .cl-showcase *::after { box-sizing: border-box; }
.cl-showcase__head { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.cl-showcase__badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #1C1B1A; background: #F5C451; padding: 4px 10px; border-radius: 999px; }
.cl-showcase h2 { margin: 10px 0 6px; font: 700 clamp(22px, 4vw, 32px)/1.15 var(--cl-serif); color: #FFF7EC; }
.cl-showcase p { margin: 0; color: #D9D3C8; font-size: 15px; }
.cl-showcase__cta {
  display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 18px; border-radius: 12px;
  background: #F5C451; color: #1C1B1A !important; font-weight: 700; text-decoration: none !important; white-space: nowrap;
  transition: transform .15s ease;
}
.cl-showcase__cta:hover { transform: translateY(-1px); }
.cl-showcase__shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 128px; gap: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.cl-showcase__shelf::-webkit-scrollbar { display: none; }
.cl-showcase__book { display: grid; gap: 7px; text-decoration: none !important; color: #FBF8F3 !important; }
.cl-showcase__book .cl-cover { transition: transform .25s ease; }
.cl-showcase__book:hover .cl-cover { transform: translateY(-4px) rotate(-1deg); }
.cl-showcase__title { font-weight: 600; font-size: 13px; line-height: 1.3; }
.cl-showcase__meta { font-size: 12px; color: #B9B2A6; }
@media (min-width: 1000px) {
  .cl-showcase { padding: 32px; }
  .cl-showcase__shelf { grid-auto-flow: row; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; }
}

/* ---------- Couverture (commune) ---------- */
.cl-cover {
  position: relative; aspect-ratio: 3 / 4.2; border-radius: 10px; overflow: hidden; padding: 12px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--c, #7C2D12); color: var(--cf, #FFF7EC); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 6px 18px rgba(0,0,0,.12);
}
.cl-cover::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 7px; background: rgba(0,0,0,.16); }
.cl-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cl-cover__brand { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; position: relative; z-index: 1; }
.cl-cover__title { font: 700 16px/1.1 var(--cl-serif); position: relative; z-index: 1; overflow-wrap: anywhere; }

/* ---------- Bouton Partager injecté sur les fiches du site ---------- */
.cl-share-pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 16px; min-height: 42px; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid #0F766E; background: #fff; color: #0F766E; font-weight: 700; font-size: 14px; line-height: 1; font-family: inherit;
  cursor: pointer; transition: background .15s ease, transform .15s ease;
}
.cl-share-pill:hover { background: #E7F3F1; transform: translateY(-1px); }
.cl-share-pill .cl-wa-dot { width: 22px; height: 22px; border-radius: 50%; background: #128C4A; color: #fff; display: inline-grid; place-items: center; }

/* ---------- Feuille de partage / panneaux ---------- */
.cl-scrim { position: fixed; inset: 0; z-index: 99990; background: rgba(15,14,12,.45); opacity: 0; transition: opacity .25s ease; }
.cl-scrim.is-open { opacity: 1; }
.cl-panel {
  position: fixed; z-index: 99995; left: 0; right: 0; bottom: 0; box-sizing: border-box;
  background: var(--cl-surface); color: var(--cl-ink); border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.2);
  transform: translateY(105%); visibility: hidden; transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear .3s;
  max-height: 86vh; overflow-y: auto; font-family: var(--cl-sans);
}
.cl-panel *, .cl-panel *::before, .cl-panel *::after { box-sizing: border-box; }
.cl-panel.is-open { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.cl-panel__grip { width: 42px; height: 5px; border-radius: 3px; background: var(--cl-line-2); margin: 0 auto 14px; }
.cl-panel h2 { margin: 0 0 14px; font-size: 17px; color: var(--cl-ink); }
.cl-share__head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.cl-share__thumb { width: 48px; height: 48px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--cl-accent-soft); color: var(--cl-accent); }
.cl-share__head strong { display: block; font-size: 15px; color: var(--cl-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 270px; }
.cl-share__head span { display: block; font-size: 12px; color: var(--cl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 270px; }
.cl-share__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 14px 0; }
.cl-share__grid a, .cl-share__grid button {
  display: grid; justify-items: center; gap: 6px; padding: 6px 0; text-decoration: none !important; color: var(--cl-ink) !important;
  font-size: 11px; font-weight: 500; background: none; border: 0; cursor: pointer; font-family: inherit;
}
.cl-share__grid i { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 15px; color: #fff; transition: transform .15s ease; }
.cl-share__grid a:hover i, .cl-share__grid button:hover i { transform: scale(1.07); }
.cl-share__grid .cl-i-soft { background: var(--cl-surface-2); color: var(--cl-ink); }

.cl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 15px; line-height: 1.2; font-family: inherit; text-decoration: none !important;
  cursor: pointer; transition: transform .15s ease, filter .15s ease, background .15s ease; box-sizing: border-box;
}
.cl-btn:active { transform: translateY(1px); }
.cl-btn--primary { background: var(--cl-accent); color: var(--cl-accent-ink) !important; }
.cl-btn--primary:hover { filter: brightness(.94); }
.cl-btn--ghost { background: var(--cl-surface); border-color: var(--cl-line-2); color: var(--cl-ink) !important; }
.cl-btn--ghost:hover { background: var(--cl-surface-2); }
.cl-btn--wa { background: var(--cl-wa); color: #fff !important; }
.cl-btn--wa:hover { filter: brightness(.95); }
.cl-btn--dark { background: var(--cl-ink); color: var(--cl-bg) !important; }
.cl-btn--block { width: 100%; }
.cl-btn--lg { min-height: 54px; font-size: 16px; border-radius: 14px; }

.cl-toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 99999; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #1C1B1A; color: #FBF8F3; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: all .25s ease;
}
.cl-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 760px) {
  .cl-panel { left: 50%; right: auto; width: 460px; bottom: 24px; border-radius: 22px; transform: translate(-50%, 130%); }
  .cl-panel.is-open { transform: translate(-50%, 0); }
  .cl-toast { bottom: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .cl-panel, .cl-scrim, .cl-toast, .cl-menu-badge, .cl-cover, .cl-btn { transition: none !important; animation: none !important; }
}

/* ---------- Badge « Lire » à côté du logo (pages /lire/) ---------- */
.cl-logo-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 4px 10px 4px 8px; border-radius: 999px;
  background: #0F766E; color: #fff !important; font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: .02em;
  text-decoration: none !important; vertical-align: middle; white-space: nowrap; flex: none;
  box-shadow: 0 2px 8px rgba(15,118,110,.28); animation: cl-pop .45s cubic-bezier(.2,.8,.2,1) both .15s;
}
.cl-logo-badge:hover { background: #0B5A52; }
@media (max-width: 380px) { .cl-logo-badge span { display: none; } .cl-logo-badge { padding: 5px; } }

/* ---------- Couvertures photo ---------- */
.cl-cover--photo { color: #fff; }
.cl-cover--photo img { z-index: 0; transition: transform .5s ease; }
.cl-cover--photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(8,8,8,.86) 0%, rgba(8,8,8,.30) 48%, rgba(8,8,8,.10) 70%, rgba(8,8,8,.45) 100%); }
.cl-cover::after { z-index: 2; }
.cl-cover__brand, .cl-cover__title { z-index: 2; }
.cl-cover--photo .cl-cover__title { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.cl-cover--photo .cl-cover__brand { color: #F5C451; opacity: 1; font-weight: 700; }
a:hover .cl-cover--photo img { transform: scale(1.06); }

/* ---------- Lien de menu : badge qui attire l'œil ---------- */
.cl-menu-badge { background: #F59E0B; color: #1C1B1A; position: relative; box-shadow: 0 0 0 0 rgba(245,158,11,.6); animation: cl-pop .5s ease both .4s, cl-pulse 2.2s ease-out 1.2s infinite; }
@keyframes cl-pulse { 0% { box-shadow: 0 0 0 0 rgba(245,158,11,.55); } 70% { box-shadow: 0 0 0 9px rgba(245,158,11,0); } 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); } }
@media (prefers-reduced-motion: reduce) { .cl-menu-badge { animation: none !important; } }
