/* ============================================
   Outils PI & Droits d'auteur - Task 136
   ============================================ */

.pi-hub-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

.pi-hub-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pi-hub-header h1 {
    font-size: 1.75rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.pi-hub-header h1 i { color: #8B5CF6; }

.pi-hub-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.header-breadcrumb {
    text-align: left;
    margin-bottom: 1rem;
}

.header-breadcrumb a {
    color: #8B5CF6;
    text-decoration: none;
    font-size: 0.9rem;
}

.header-breadcrumb a:hover { text-decoration: underline; }

/* Stats header */
.header-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.stat-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-label {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Navigation tabs */
.pi-nav-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
    overflow-x: auto;
}

.pi-nav-tab {
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.pi-nav-tab:hover { color: #8B5CF6; }

.pi-nav-tab.active {
    color: #8B5CF6;
    border-bottom-color: #8B5CF6;
}

.pi-nav-tab i { margin-right: 0.4rem; }

/* Sections */
.pi-section {
    margin-bottom: 2.5rem;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.section-header h2 i { color: #8B5CF6; margin-right: 0.5rem; }

.section-header p { color: #64748b; font-size: 0.9rem; }

/* Progress bar */
.progress-bar-container {
    background: #e2e8f0;
    border-radius: 10px;
    height: 28px;
    position: relative;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8B5CF6, #a78bfa);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
}

/* Manuscrit selector */
.manuscrit-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.manuscrit-selector label {
    font-weight: 500;
    color: #475569;
    font-size: 0.9rem;
    white-space: nowrap;
}

.manuscrit-selector select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Checklist grid */
.checklist-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.checklist-item:hover { border-color: #8B5CF6; box-shadow: 0 2px 8px rgba(139,92,246,.1); }

.checklist-item.completed {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.checklist-toggle input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #8B5CF6;
    cursor: pointer;
}

.checklist-content h4 {
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 0.2rem;
}

.checklist-content p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.checklist-status { margin-left: auto; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-pending { background: #fef3c7; color: #d97706; }

/* Checklist détaillée */
.checklist-detailed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checklist-detail-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s;
}

.checklist-detail-item.completed {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.item-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.item-title { flex: 1; }

.item-title h3 {
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.item-desc { color: #64748b; font-size: 0.85rem; margin: 0; }

.item-status { text-align: right; }

.date-completed {
    display: block;
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.item-guide {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fffbeb;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #92400e;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.item-guide i { color: #f59e0b; margin-top: 2px; }

.item-notes { margin-top: 0.75rem; }

.notes-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 50px;
    font-family: inherit;
}

.notes-input:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139,92,246,.1);
}

/* Templates grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.template-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s;
}

.template-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-2px); }

.template-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: #fff;
    font-size: 1.2rem;
}

.template-card h4 {
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 0.4rem;
}

.template-card p {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.template-meta {
    margin-bottom: 0.75rem;
}

.plumes-cost {
    font-size: 0.8rem;
    color: #8B5CF6;
    font-weight: 600;
}

.btn-template {
    width: 100%;
    padding: 0.5rem;
    background: #8B5CF6;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-template:hover { background: #7c3aed; }

/* Bouton principal */
.btn-primary-large {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    background: #8B5CF6;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary-large:hover { background: #7c3aed; color: #fff; }
.btn-primary-large:disabled { opacity: 0.5; cursor: not-allowed; }

/* Plumes balance */
.plumes-balance-info {
    padding: 1rem 1.25rem;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #5b21b6;
}

.plumes-balance-info i { margin-right: 0.3rem; }

.balance-warning {
    display: inline-block;
    margin-left: 0.75rem;
    color: #dc2626;
    font-weight: 600;
}

/* Form */
.pi-form {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-group label i { color: #8B5CF6; margin-right: 0.3rem; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139,92,246,.1);
}

.form-actions {
    text-align: center;
    margin-top: 1.5rem;
}

/* Requests list */
.requests-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.request-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.request-type {
    font-size: 0.8rem;
    color: #8B5CF6;
    font-weight: 600;
}

.request-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.request-card h4 {
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 0.4rem;
}

.request-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #64748b;
}

.request-meta i { margin-right: 0.25rem; }

.urgency-normale { color: #6b7280; }
.urgency-urgente { color: #f59e0b; }
.urgency-critique { color: #ef4444; font-weight: 600; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.loading-placeholder {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .header-stats { flex-direction: column; align-items: stretch; }
    .stat-box { min-width: auto; }
    .templates-grid { grid-template-columns: 1fr; }
    .pi-nav-tabs { flex-wrap: nowrap; overflow-x: auto; }
    .item-header { flex-direction: column; }
}
