/* ====================================================================
   PAPS MANAGER - STYLES
   ==================================================================== */

/* Conteneur principal */
#paps_selector_container {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

/* Sélecteur */
.paps-selector {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

/* Header */
.paps-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.paps-selector-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: 600;
}

.paps-icon {
    font-size: 1.5em;
}

.btn-paps-new {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-paps-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* PAP actif */
.paps-selector-current {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.paps-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.paps-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.paps-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-bottom: 2px solid #e0e0e0;
}

.paps-card-header strong {
    font-size: 1.1em;
    color: #333;
}

.paps-badge {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.paps-card-body {
    padding: 15px 20px;
}

.paps-card-body > div {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.paps-card-body > div:last-child {
    border-bottom: none;
}

.paps-card-body strong {
    color: #666;
    min-width: 100px;
    display: inline-block;
}

.paps-card-footer {
    padding: 10px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.paps-card-footer small {
    color: #999;
}

/* État vide */
.paps-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.paps-empty-state p {
    font-size: 1.1em;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.paps-empty-state small {
    color: #999;
}

/* Liste des PAPs */
.paps-selector-list {
    padding: 20px;
}

.paps-list-header {
    padding: 10px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 15px;
}

.paps-list-header strong {
    color: #333;
}

.paps-list-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.paps-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.paps-list-item:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(5px);
}

.paps-list-item.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.paps-item-info {
    flex: 1;
}

.paps-item-info strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
}

.paps-item-info small {
    color: #999;
    font-size: 0.9em;
}

.paps-item-actions {
    display: flex;
    gap: 10px;
}

.btn-paps-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2em;
}

.btn-paps-delete:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    animation: slideUp 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scrollbar personnalisée */
.paps-list-items::-webkit-scrollbar {
    width: 8px;
}

.paps-list-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.paps-list-items::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.paps-list-items::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Required mark */
.required {
    color: #dc3545;
    font-weight: bold;
}

/* Info box dans modal */
.modal-body .info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    #paps_selector_container {
        padding: 15px;
    }

    .paps-selector-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .btn-paps-new {
        width: 100%;
    }

    .paps-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .paps-item-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .modal-content {
        max-width: 95%;
    }
}
