:root {
  --fp-mint:     #8EB69B;
  --fp-mint-dim: rgba(142,182,155,.10);
  --fp-mint-bd:  rgba(142,182,155,.18);
  --fp-bg:       #0b1a12;
  --fp-card-bg:  #0f2419;
  --fp-bd:       rgba(255,255,255,.08);
  --fp-bd2:      rgba(255,255,255,.14);
  --fp-tx:       #e8eaed;
  --fp-mu:       rgba(232,234,237,.38);
}

body.light-mode {
  --fp-bg:      #eef3ee;
  --fp-card-bg: #ffffff;
  --fp-bd:      rgba(0,0,0,.08);
  --fp-bd2:     rgba(0,0,0,.14);
  --fp-tx:      #0f2014;
  --fp-mu:      rgba(15,32,20,.42);
}

.fp-page {
  padding: 0 16px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

@keyframes fp-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fp-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fp-scale-in {
  from { opacity: 0; transform: scale(.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── STRIPES & ACCENTS ── */
.fp-stripe-1,  .fp-accent-1  { background: linear-gradient(90deg,#5a9e7a,#3d7558); }
.fp-stripe-2,  .fp-accent-2  { background: linear-gradient(90deg,#9e8a5a,#7a6a3d); }
.fp-stripe-3,  .fp-accent-3  { background: linear-gradient(90deg,#5a7a9e,#3d5a7a); }
.fp-stripe-4,  .fp-accent-4  { background: linear-gradient(90deg,#9e5a7a,#7a3d5a); }
.fp-stripe-5,  .fp-accent-5  { background: linear-gradient(90deg,#7a9e5a,#5a7a3d); }
.fp-stripe-6,  .fp-accent-6  { background: linear-gradient(90deg,#5a9e7a,#3d7558); }
.fp-stripe-7,  .fp-accent-7  { background: linear-gradient(90deg,#9e8a5a,#7a6a3d); }
.fp-stripe-8,  .fp-accent-8  { background: linear-gradient(90deg,#5a7a9e,#3d5a7a); }
.fp-stripe-9,  .fp-accent-9  { background: linear-gradient(90deg,#9e5a7a,#7a3d5a); }
.fp-stripe-10, .fp-accent-10 { background: linear-gradient(90deg,#7a9e5a,#5a7a3d); }

/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════ */
.fp-header {
  padding: 20px 0 20px;
  animation: fp-fade-up .45s ease both;
}
.fp-header-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.fp-header-lbl {
  font-size: 9px; text-transform: uppercase;
  letter-spacing: .18em; color: var(--fp-mint);
  opacity: .8; display: block; margin-bottom: 5px;
}
.fp-header-title {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 500; color: var(--fp-tx);
  margin: 0 0 5px;
}
.fp-header-count { font-size: 12px; color: var(--fp-mu); }

/* ── Boutons style playlist (Partager / Ajouter / Modifier) ── */
.fp-header-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.fp-action-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 22px;
  font-size: 12px; font-weight: 500;
  color: rgba(232,234,237,.78);
  background: rgba(255,255,255,.09);
  border: 0.5px solid rgba(255,255,255,.14);
  text-decoration: none;
  transition: background .14s, color .14s, border-color .14s;
  cursor: pointer; white-space: nowrap;
}
.fp-action-btn:hover {
  background: rgba(255,255,255,.16);
  color: var(--fp-tx);
}
.fp-action-btn--mint {
  background: rgba(142,182,155,.18);
  border-color: rgba(142,182,155,.3);
  color: var(--fp-mint);
}
.fp-action-btn--mint:hover {
  background: rgba(142,182,155,.28);
  color: #b2d4bf;
}
body.light-mode .fp-action-btn {
  color: rgba(15,32,20,.75);
  background: rgba(0,0,0,.06);
  border-color: rgba(0,0,0,.14);
}
body.light-mode .fp-action-btn:hover {
  background: rgba(0,0,0,.11);
  color: var(--fp-tx);
}
body.light-mode .fp-action-btn--mint {
  background: rgba(45,102,69,.12);
  border-color: rgba(45,102,69,.28);
  color: #2d6645;
}

/* ── TAGS ── */
.fp-tag {
  font-size: 9px; text-transform: uppercase; letter-spacing: .07em;
  padding: 2px 7px; border-radius: 20px;
}
.fp-tag-pdf {
  background: rgba(142,182,155,.1); color: rgba(142,182,155,.8);
  border: 0.5px solid rgba(142,182,155,.22);
}
.fp-tag-audio {
  background: rgba(197,184,168,.1); color: rgba(142, 182, 155, .8);
  border: 0.5px solid rgba(197,184,168,.22);
}
body.light-mode .fp-tag-pdf   { background: rgba(45,102,69,.1);  color: #2d6645; border-color: rgba(45,102,69,.25); }
body.light-mode .fp-tag-audio { background: rgba(140,110,70,.1); color: #6b5030; border-color: rgba(140,110,70,.25); }

/* ════════════════════════════════════════
   MOBILE — pill list
════════════════════════════════════════ */
.fp-mobile { display: flex; flex-direction: column; gap: 12px; }
.fp-desktop { display: none; }

.fp-pill {
  display: flex; align-items: center; gap: 15px;
  background: var(--fp-card-bg);
  border: 0.5px solid var(--fp-bd);
  border-radius: 20px;
  padding: 18px 18px;
  text-decoration: none;
  position: relative; overflow: hidden;
  width: 100%; box-sizing: border-box;
  opacity: 0;
  animation: fp-fade-up .42s ease both;
  animation-delay: calc(var(--delay, 0) * 55ms + 80ms);
  transition: transform .18s, border-color .18s, background .14s;
  min-height: 80px;
}
.fp-pill:hover {
  transform: translateX(5px);
  border-color: var(--fp-mint-bd);
  background: rgba(142,182,155,.04);
}

.fp-pill-stripe {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 20px 0 0 20px;
}

.fp-pill-icon {
  width: 58px; height: 58px; border-radius: 16px; flex-shrink: 0;
  background: var(--fp-mint-dim);
  border: 0.5px solid var(--fp-mint-bd);
  display: flex; align-items: center; justify-content: center;
  color: var(--fp-mint); transition: background .14s;
}
.fp-pill:hover .fp-pill-icon { background: rgba(142,182,155,.18); }

.fp-pill-info { flex: 1; min-width: 0; overflow: hidden; width: 0; }
.fp-pill-name {
  font-size: 16px; font-weight: 500; color: var(--fp-tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
  margin-bottom: 7px;
}
.fp-pill-row2 { display: flex; align-items: center; gap: 8px; overflow: hidden; max-width: 100%; }
.fp-pill-filecount {
  font-size: 12px; color: var(--fp-mu);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.fp-pill-right {
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: space-between;
  flex-shrink: 0; gap: 8px; min-width: 42px;
}
.fp-pill-count { display: none; }
.fp-pill-date {
  font-size: 10px; color: var(--fp-mu);
  white-space: nowrap;
}
.fp-pill-fav {
  background: none; border: none; cursor: pointer;
  color: var(--fp-mu); padding: 6px;
  border-radius: 9px; flex-shrink: 0;
  transition: color .14s, background .12s;
  display: flex; align-items: center;
}
.fp-pill-fav:hover { color: var(--fp-mint); background: var(--fp-mint-dim); }

/* ════════════════════════════════════════
   DESKTOP — accent bottom cards
════════════════════════════════════════ */
@media (min-width: 769px) {
  .fp-mobile  { display: none; }
  .fp-desktop { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
}
@media (min-width: 1024px) {
  .fp-desktop { grid-template-columns: repeat(3,1fr); }
}

.fp-card {
  background: var(--fp-card-bg);
  border: 0.5px solid var(--fp-bd);
  border-radius: 18px;
  padding: 22px 22px 0;
  overflow: hidden; text-decoration: none;
  display: block; position: relative;
  opacity: 0;
  animation: fp-scale-in .44s cubic-bezier(.22,.68,0,1.2) both;
  animation-delay: calc(var(--delay, 0) * 60ms + 60ms);
  transition: transform .2s, border-color .18s;
  min-height: 190px;
}
.fp-card:hover {
  transform: translateY(-5px);
  border-color: var(--fp-mint-bd);
}

.fp-card-top {
  display: flex; align-items: flex-start; gap: 13px; margin-bottom: 14px;
}
.fp-card-icon {
  width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0;
  background: var(--fp-mint-dim); border: 0.5px solid var(--fp-mint-bd);
  display: flex; align-items: center; justify-content: center;
  color: var(--fp-mint); transition: background .14s;
}
.fp-card:hover .fp-card-icon { background: rgba(142,182,155,.18); }

.fp-card-head { flex: 1; min-width: 0; }
.fp-card-name {
  font-size: 16px; font-weight: 500; color: var(--fp-tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fp-card-desc {
  font-size: 13px; color: var(--fp-mu); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.fp-card-fav {
  background: none; border: none; cursor: pointer;
  color: var(--fp-mu); padding: 7px; margin-top: -4px;
  border-radius: 9px; flex-shrink: 0;
  transition: color .14s, background .12s;
  display: flex; align-items: center;
}
.fp-card-fav:hover { color: var(--fp-mint); background: var(--fp-mint-dim); }

.fp-card-mid {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.fp-card-badge {
  font-size: 9px; text-transform: uppercase; letter-spacing: .07em;
  padding: 3px 9px; border-radius: 5px; display: inline-block;
}
.fp-badge-pdf {
  background: rgba(142,182,155,.1); color: rgba(142,182,155,.8);
  border: 0.5px solid rgba(142,182,155,.22);
}
.fp-badge-audio {
  background: rgba(197,184,168,.1); color: rgba(142, 182, 155, .8);
  border: 0.5px solid rgba(197,184,168,.22);
}
body.light-mode .fp-badge-pdf   { background: rgba(45,102,69,.1);  color: #2d6645; border-color: rgba(45,102,69,.25); }
body.light-mode .fp-badge-audio { background: rgba(140,110,70,.1); color: #6b5030; border-color: rgba(140,110,70,.25); }

.fp-card-filecount {
  font-size: 26px; font-weight: 500;
  color: rgba(232,234,237,.6); line-height: 1;
}
body.light-mode .fp-card-filecount { color: #1a3a22; }
.fp-card-filecount span {
  font-size: 10px; font-weight: 400;
  color: var(--fp-mu); margin-left: 4px;
  vertical-align: middle;
}

.fp-card-foot {
  display: flex; align-items: center;
  padding: 11px 0;
  border-top: 0.5px solid var(--fp-bd);
}
.fp-card-meta {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--fp-mu);
}
.fp-card-accent {
  height: 3px; margin: 0 -22px;
  border-radius: 0 0 18px 18px;
}

/* ── EMPTY STATE ── */
.fp-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 64px 24px 40px; text-align: center; gap: 12px;
  animation: fp-fade-in .5s ease both .1s;
}
.fp-empty-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--fp-mint-dim); border: 0.5px solid var(--fp-mint-bd);
  display: flex; align-items: center; justify-content: center;
  color: var(--fp-mint); margin-bottom: 8px;
}
.fp-empty-title { font-size: 16px; font-weight: 500; color: var(--fp-tx); margin: 0; }
.fp-empty-sub   { font-size: 13px; color: var(--fp-mu); margin: 0; line-height: 1.7; }
.fp-empty-link {
  color: var(--fp-mint); text-decoration: none;
  border-bottom: 1px solid rgba(142,182,155,.3);
  transition: border-color .14s;
}
.fp-empty-link:hover { border-color: var(--fp-mint); }