/**
 * Mes Publications - Page Styles
 * Catalogue des oeuvres publiees de l'auteur
 */

/* ── Container ── */
.pub-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ── Header ── */
.pub-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: #fff;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.pub-header h1 {
    margin: 0 0 .4rem;
    font-size: 2rem;
    font-weight: 700;
}

.pub-header p {
    margin: 0;
    opacity: .9;
    font-size: 1.05rem;
}

.header-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.stat-box {
    background: rgba(255, 255, 255, 0.18);
    padding: .8rem 1.4rem;
    border-radius: 10px;
    backdrop-filter: blur(8px);
    min-width: 110px;
    text-align: center;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: .8rem;
    opacity: .85;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Toolbar ── */
.pub-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

/* ── Empty state ── */
.pub-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pub-empty h4 {
    margin-bottom: .5rem;
}

/* ── Grid cards ── */
.pub-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

/* Cover */
.pub-cover {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #e9ecef;
}

.pub-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pub-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.pub-visibility-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
}

/* Info */
.pub-info {
    padding: 1rem 1.1rem;
    flex: 1;
}

.pub-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 .35rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pub-editor {
    margin-bottom: .5rem;
}

/* Badges */
.pub-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .5rem;
}

.badge-genre {
    background: #e8f4fd;
    color: #1a73e8;
    font-weight: 500;
    font-size: .75rem;
}

.badge-format {
    font-weight: 500;
    font-size: .75rem;
}

.badge-format-broche {
    background: #fef3e2;
    color: #e67e22;
}

.badge-format-ebook {
    background: #e8fdf0;
    color: #27ae60;
}

.badge-public {
    background: #f3e8fd;
    color: #8e44ad;
    font-weight: 500;
    font-size: .75rem;
}

.pub-isbn {
    margin-bottom: .4rem;
}

.pub-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    font-size: .82rem;
    color: #6c757d;
}

/* Actions */
.pub-actions {
    display: flex;
    gap: .5rem;
    padding: .75rem 1.1rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

/* ── List view ── */
.pub-list-cover {
    width: 45px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.pub-list-cover-placeholder {
    width: 45px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    border-radius: 4px;
}

.pub-list .table th {
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
    border-bottom-width: 2px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .pub-header {
        padding: 1.5rem 1.2rem;
    }

    .pub-header h1 {
        font-size: 1.5rem;
    }

    .header-stats {
        gap: .8rem;
    }

    .stat-box {
        padding: .6rem 1rem;
        min-width: 80px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .pub-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .pub-toolbar .form-select,
    .pub-toolbar .input-group {
        max-width: 100% !important;
    }

    .pub-cover {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .pub-container {
        padding: 1rem .5rem;
    }

    .header-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}
