/* ==========================================================================
   Palmarès des manuscrits — Homepage section
   ========================================================================== */

.palmares-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff5f5 50%, #f5f0ff 100%);
    position: relative;
    overflow: hidden;
}

.palmares-section::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Header */
.palmares-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.palmares-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 0.5rem;
}

.palmares-title i {
    color: #ff6b35;
    margin-right: 0.4rem;
}

.palmares-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

/* Grid */
.palmares-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Card */
.palmares-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
}

.palmares-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
}

/* Cover */
.palmares-card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e9ecef;
}

.palmares-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.palmares-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 3rem;
}

.palmares-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 100%);
    pointer-events: none;
}

/* Rank badge */
.palmares-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.palmares-rank i {
    font-size: 0.85rem;
}

.palmares-rank-1 {
    background: linear-gradient(135deg, #f7b733, #fc4a1a);
    box-shadow: 0 2px 8px rgba(252, 74, 26, 0.35);
}

.palmares-rank-2 {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.35);
}

.palmares-rank-3 {
    background: linear-gradient(135deg, #e67e22, #d35400);
    box-shadow: 0 2px 8px rgba(211, 84, 0, 0.35);
}

/* Genre badge */
.palmares-genre-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Card body */
.palmares-card-body {
    padding: 1rem 1.1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.palmares-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d2d2d;
    margin: 0 0 0.35rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.palmares-card-author {
    font-size: 0.82rem;
    color: #6c757d;
    margin: 0 0 0.5rem;
}

.palmares-card-author i {
    color: #764ba2;
    margin-right: 3px;
}

.palmares-card-desc {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.45;
    margin: 0 0 0.7rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta */
.palmares-card-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid #f0f0f0;
}

.palmares-meta-item {
    font-size: 0.75rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.palmares-meta-item i {
    font-size: 0.7rem;
}

.palmares-score {
    margin-left: auto;
    color: #ff6b35;
    font-weight: 600;
}

.palmares-score i {
    color: #ff6b35;
}

/* Footer link */
.palmares-footer {
    text-align: center;
}

.palmares-see-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.palmares-see-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
    color: #fff;
    text-decoration: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991px) {
    .palmares-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .palmares-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 575px) {
    .palmares-section {
        padding: 2rem 0;
    }

    .palmares-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    .palmares-title {
        font-size: 1.3rem;
    }

    .palmares-card-cover {
        aspect-ratio: 4 / 5;
    }
}
